-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update-font-guidance
- Loading branch information
Showing
11 changed files
with
86 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,38 @@ | ||
// Components | ||
import Button from './components/button/button' | ||
import CharacterCount from './components/character-count/character-count' | ||
import Checkboxes from './components/checkboxes/checkboxes' | ||
import Details from './components/details/details' | ||
import ErrorSummary from './components/error-summary/error-summary' | ||
import Header from './components/header/header' | ||
import Radios from './components/radios/radios' | ||
import SkipLink from './components/skip-link/skip-link' | ||
import Tabs from './components/tabs/tabs' | ||
import initButton from './components/button/button' | ||
import initCharacterCount from './components/character-count/character-count' | ||
import initCheckboxes from './components/checkboxes/checkboxes' | ||
import initDetails from './components/details/details' | ||
import initErrorSummary from './components/error-summary/error-summary' | ||
import initHeader from './components/header/header' | ||
import initRadios from './components/radios/radios' | ||
import initSkipLink from './components/skip-link/skip-link' | ||
import initTabs from './components/tabs/tabs' | ||
|
||
import './polyfills' | ||
|
||
/** | ||
* Use this function to initialise nhsuk-frontend components within a | ||
* given scope. This function is called by default with the document | ||
* element, but you can call it again later with a new DOM element | ||
* containing nhsuk-frontend components which you wish to initialise. | ||
* | ||
* @param {HTMLElement} scope | ||
*/ | ||
export function initAll(scope) { | ||
initButton({ scope }) | ||
initCharacterCount({ scope }) | ||
initCheckboxes({ scope }) | ||
initDetails({ scope }) | ||
initErrorSummary({ scope }) | ||
initRadios({ scope }) | ||
initTabs({ scope }) | ||
} | ||
|
||
// Initialize components | ||
document.addEventListener('DOMContentLoaded', () => { | ||
CharacterCount() | ||
Button() | ||
Checkboxes() | ||
Details() | ||
ErrorSummary() | ||
Header() | ||
Radios() | ||
SkipLink() | ||
Tabs() | ||
initHeader() | ||
initSkipLink() | ||
|
||
initAll(document) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# SonarQube properties | ||
sonar.projectKey=nhsuk-frontend | ||
sonar.organization=nhsdigital | ||
|
||
# Project language | ||
sonar.language=js | ||
|
||
# Encoding of the source code. Default is default system encoding | ||
sonar.sourceEncoding=UTF-8 | ||
|
||
# Add file exclusions | ||
sonar.exclusions=reports/** | ||
|
||
# Add coverage exclusions | ||
sonar.coverage.exclusions=**/*.config.js,**/coverage/**,**/*check-report.html | ||
|
||
# Adding the dependency-check parameter | ||
sonar.dependencyCheck.htmlReportPath=reports/dependency-check/dependency-check-report.html | ||
|
||
# Encoding of the source code. Default is default system encoding | ||
sonar.sourceEncoding=UTF-8 | ||
|
||
# Adding the coverage analysis parameter | ||
sonar.javascript.lcov.reportPaths=./coverage/lcov.info |