qc-trousse-sdg 1.4.0-develop.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -5
- package/dist/css/qc-sdg-design-tokens.min.css +1 -1
- package/dist/css/qc-sdg-no-grid.min.css +1 -1
- package/dist/css/qc-sdg.min.css +1 -1
- package/dist/fonts/open-sans-v43-latin-500.woff2 +0 -0
- package/dist/fonts/open-sans-v43-latin-500italic.woff2 +0 -0
- package/dist/fonts/open-sans-v43-latin-600.woff2 +0 -0
- package/dist/fonts/open-sans-v43-latin-600italic.woff2 +0 -0
- package/dist/fonts/open-sans-v43-latin-700.woff2 +0 -0
- package/dist/fonts/open-sans-v43-latin-700italic.woff2 +0 -0
- package/dist/fonts/open-sans-v43-latin-italic.woff2 +0 -0
- package/dist/fonts/open-sans-v43-latin-regular.woff2 +0 -0
- package/dist/fonts/roboto-mono-v30-latin-500.woff2 +0 -0
- package/dist/fonts/roboto-mono-v30-latin-500italic.woff2 +0 -0
- package/dist/fonts/roboto-mono-v30-latin-600.woff2 +0 -0
- package/dist/fonts/roboto-mono-v30-latin-600italic.woff2 +0 -0
- package/dist/fonts/roboto-mono-v30-latin-700.woff2 +0 -0
- package/dist/fonts/roboto-mono-v30-latin-700italic.woff2 +0 -0
- package/dist/fonts/roboto-mono-v30-latin-italic.woff2 +0 -0
- package/dist/fonts/roboto-mono-v30-latin-regular.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-500.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-500italic.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-600.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-600italic.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-700.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-700italic.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-italic.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-regular.woff2 +0 -0
- package/dist/img/icon/adresse.svg +4 -0
- package/dist/img/icon/arrow-up.svg +3 -0
- package/dist/img/icon/calendar.svg +1 -0
- package/dist/img/icon/checkmark.svg +3 -0
- package/dist/img/icon/chevron-up-thin.svg +5 -0
- package/dist/img/{chevron-white.svg → icon/chevron-up.svg} +1 -1
- package/{public/img → dist/img/icon}/clipboard.svg +3 -3
- package/dist/img/icon/clock.svg +1 -0
- package/dist/img/icon/email.svg +1 -0
- package/dist/img/icon/error.svg +1 -0
- package/{public/img/exclamation-white.svg → dist/img/icon/exclamation.svg} +2 -2
- package/{public/img → dist/img/icon}/external-link.svg +2 -2
- package/dist/img/icon/information.svg +1 -0
- package/dist/img/icon/ligth-bulb.svg +1 -0
- package/{public/img → dist/img/icon}/minus.svg +1 -1
- package/dist/img/icon/note.svg +1 -0
- package/dist/img/icon/phone.svg +1 -0
- package/dist/img/{plus.svg → icon/plus.svg} +1 -1
- package/{public/img → dist/img/icon}/question-mark.svg +2 -2
- package/dist/img/icon/search-thin.svg +10 -0
- package/dist/img/icon/search.svg +1 -0
- package/dist/img/icon/success.svg +1 -0
- package/dist/img/icon/user.svg +6 -0
- package/dist/img/icon/warning.svg +1 -0
- package/dist/img/icon/website.svg +1 -0
- package/dist/img/icon/xclose.svg +1 -0
- package/dist/js/qc-sdg.min.js +1 -1
- package/package.json +11 -3
- package/playwright.config.ts +79 -0
- package/plugins/buildDevDoc.js +36 -0
- package/plugins/buildHtmlDoc.js +43 -0
- package/plugins/buildTestFixtures.js +37 -0
- package/public/css/qc-doc-sdg.css +4 -67
- package/public/css/qc-sdg-design-tokens.css +17 -0
- package/public/css/qc-sdg-no-grid.css +2001 -1108
- package/public/css/qc-sdg.css +1999 -1106
- package/public/img/checkmark.svg +3 -0
- package/public/img/question.svg +10 -0
- package/public/index.html +3104 -1387
- package/public/js/qc-doc-sdg.js +5705 -285
- package/public/js/qc-sdg.js +5660 -1415
- package/rollup.config.js +67 -41
- package/scripts/buildImagesMap.js +85 -0
- package/scripts/check-release-note.sh +11 -0
- package/scripts/compile-doc.sh +4 -0
- package/src/doc/_index.html +100 -0
- package/src/doc/_nav.html +53 -0
- package/src/doc/_test.html +32 -0
- package/src/doc/components/Code.svelte +6 -2
- package/src/doc/components/TopNav.svelte +8 -9
- package/src/doc/components/color-doc.svelte +1 -1
- package/src/doc/ejs/layout/index.ejs +129 -0
- package/src/doc/qc-doc-sdg.js +1 -2
- package/src/doc/scss/components/_code.scss +1 -1
- package/src/doc/scss/jQueryUI/_jquery-ui.autocomplete.scss +1 -0
- package/src/doc/scss/qc-doc-sdg.scss +1 -1
- package/src/doc/scss/settings/_base.scss +4 -0
- package/src/sdg/_components.js +9 -2
- package/src/sdg/{components → bases}/Icon/Icon.svelte +13 -6
- package/src/sdg/bases/Icon/IconDoc.ejs +129 -0
- package/src/sdg/{components → bases}/Icon/IconWC.svelte +3 -1
- package/src/sdg/bases/Icon/Test/IconEmbeddedTest.html +1 -0
- package/src/sdg/bases/Icon/Test/IconEmbeddedTest.svelte +168 -0
- package/src/sdg/bases/Icon/Test/iconTest.html +156 -0
- package/src/sdg/bases/Icon/_icon.html +254 -0
- package/src/sdg/bases/Icon/_icons.scss +47 -0
- package/src/sdg/{scss/base → bases/accessibility}/_accessibility.scss +1 -1
- package/src/sdg/bases/colors/_colors.html +112 -0
- package/src/sdg/bases/figures/_figure.html +16 -0
- package/src/sdg/{scss/base → bases/form}/_form.scss +10 -3
- package/src/sdg/bases/grid/_grid.html +118 -0
- package/src/sdg/bases/headings/_headings.html +18 -0
- package/src/sdg/bases/headings/_headings.scss +25 -0
- package/src/sdg/{scss/base → bases/layout}/_layout.scss +1 -4
- package/src/sdg/bases/links/_links.html +104 -0
- package/src/sdg/bases/links/_links.scss +51 -0
- package/src/sdg/bases/lists/_lists.html +27 -0
- package/src/sdg/bases/separator/_separator.html +7 -0
- package/src/sdg/bases/separator/_separator.scss +5 -0
- package/src/sdg/bases/shadings/_shadings.html +14 -0
- package/src/sdg/{scss/base → bases/shadings}/_shadings.scss +1 -1
- package/src/sdg/bases/typography/_font.html +45 -0
- package/src/sdg/bases/typography/_fonts.scss +162 -0
- package/src/sdg/bases/typography/_paragraph.html +17 -0
- package/src/sdg/bases/typography/_paragraph.scss +33 -0
- package/src/sdg/components/Alert/Alert.svelte +2 -5
- package/src/sdg/components/Alert/AlertWC.svelte +3 -2
- package/src/sdg/components/Alert/_alert.html +110 -0
- package/src/sdg/{scss/components → components/Alert}/_alert.scss +1 -1
- package/src/sdg/components/Button/Button.svelte +50 -0
- package/src/sdg/components/Button/ButtonWC.svelte +36 -0
- package/src/sdg/components/Button/Test/buttonTest.html +349 -0
- package/src/sdg/components/Button/_button.html +186 -0
- package/src/sdg/components/Button/_button.scss +202 -0
- package/src/sdg/components/CharCount/_charCount.html +7 -0
- package/src/sdg/components/Checkbox/Checkbox.svelte +77 -0
- package/src/sdg/components/Checkbox/CheckboxWC.svelte +49 -0
- package/src/sdg/components/Checkbox/_checkbox.html +86 -0
- package/src/sdg/components/Checkbox/_checkbox.scss +70 -0
- package/src/sdg/components/Checkbox/updateInput.svelte.js +23 -0
- package/src/sdg/components/ChoiceGroup/ChoiceGroup.svelte +56 -0
- package/src/sdg/components/ChoiceGroup/ChoiceGroupWC.svelte +47 -0
- package/src/sdg/components/ChoiceGroup/Test/ChoiceGroupeEmbededTest.svelte +261 -0
- package/src/sdg/components/ChoiceGroup/Test/checkboxEmbeddedTest.html +1 -0
- package/src/sdg/components/ChoiceGroup/Test/checkboxTest.html +253 -0
- package/src/sdg/components/ChoiceGroup/Test/radiosEmbeddedTest.html +1 -0
- package/src/sdg/components/ChoiceGroup/Test/radiosTest.html +185 -0
- package/src/sdg/components/ChoiceGroup/ToggleSwitchGroupWC.svelte +56 -0
- package/src/sdg/components/ChoiceGroup/_choiceGroup.html +285 -0
- package/src/sdg/components/ChoiceGroup/_choiceGroup.scss +32 -0
- package/src/sdg/components/ChoiceGroup/_selectionButton.scss +53 -0
- package/src/sdg/components/ChoiceGroup/_selectionButtons.html +130 -0
- package/src/sdg/components/DropdownList/DropdownList.svelte +394 -0
- package/src/sdg/components/DropdownList/DropdownListButton/DropdownListButton.svelte +43 -0
- package/src/sdg/components/DropdownList/DropdownListButton/_dropdownListButton.scss +65 -0
- package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItems.svelte +110 -0
- package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsMultiple/DropdownListItemsMultiple.svelte +185 -0
- package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsMultiple/_dropdownListItemsMultiple.scss +19 -0
- package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsSingle/DropdownListItemsSingle.svelte +136 -0
- package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsSingle/_dropdownListItemsSingle.scss +11 -0
- package/src/sdg/components/DropdownList/DropdownListItems/_dropdownListItems.scss +67 -0
- package/src/sdg/components/DropdownList/SelectWC.svelte +158 -0
- package/src/sdg/components/DropdownList/Test/DropdownListEmbeddedTest.svelte +89 -0
- package/src/sdg/components/DropdownList/Test/dropdownListEmbeddedTest.html +1 -0
- package/src/sdg/components/DropdownList/Test/dropdownListTest.html +194 -0
- package/src/sdg/components/DropdownList/Test/dropdownListTestUtils.js +113 -0
- package/src/sdg/components/DropdownList/_dropdownList.scss +73 -0
- package/src/sdg/components/DropdownList/_select.html +212 -0
- package/src/sdg/components/ExternalLink/ExternalLink.svelte +1 -1
- package/src/sdg/components/Fieldset/Fieldset.svelte +73 -0
- package/src/sdg/components/Fieldset/_fieldset.scss +95 -0
- package/src/sdg/components/FormError/FormError.svelte +51 -0
- package/src/sdg/components/FormError/_formError.scss +21 -0
- package/src/sdg/components/FormfieldRow/_formfieldRow.html +108 -0
- package/src/sdg/components/IconButton/IconButton.svelte +1 -1
- package/src/sdg/components/IconButton/_iconButton.scss +14 -0
- package/src/sdg/components/Label/Label.svelte +28 -0
- package/src/sdg/components/Label/LabelText.svelte +4 -0
- package/src/sdg/components/Label/_label.scss +19 -0
- package/src/sdg/components/Notice/Notice.svelte +1 -2
- package/src/sdg/components/Notice/NoticeWC.svelte +3 -0
- package/src/sdg/components/Notice/_notice.html +141 -0
- package/src/sdg/{scss/components → components/Notice}/_notice.scss +1 -1
- package/src/sdg/components/PivFooter/PivFooter.svelte +8 -9
- package/src/sdg/components/PivFooter/PivFooterWC.svelte +6 -14
- package/src/sdg/components/PivFooter/_pivFooter.html +153 -0
- package/src/sdg/{scss/components → components/PivFooter}/_pivFooter.scss +1 -1
- package/src/sdg/components/PivHeader/PivHeader.svelte +47 -53
- package/src/sdg/components/PivHeader/PivHeaderWC.svelte +9 -20
- package/src/sdg/components/PivHeader/Test/pivHeaderEmbeddedTest.html +1 -0
- package/src/sdg/components/PivHeader/Test/pivHeaderEmbeddedTest.svelte +28 -0
- package/src/sdg/components/PivHeader/Test/pivHeaderTest.html +43 -0
- package/src/sdg/components/PivHeader/_pivHeader.html +221 -0
- package/src/sdg/{scss/components → components/PivHeader}/_pivHeader.scss +55 -77
- package/src/sdg/components/RadioButton/_radioButton.html +24 -0
- package/src/sdg/components/RadioButton/_radioButton.scss +29 -0
- package/src/sdg/components/SearchBar/SearchBar.svelte +12 -32
- package/src/sdg/components/SearchBar/_searchBar.html +125 -0
- package/src/sdg/{scss/components → components/SearchBar}/_searchBar.scss +3 -3
- package/src/sdg/components/SearchInput/SearchInput.svelte +26 -4
- package/src/sdg/components/SearchInput/SearchInputWC.svelte +3 -1
- package/src/sdg/components/SearchInput/_searchInput.html +85 -0
- package/src/sdg/{scss/components → components/SearchInput}/_searchInput.scss +27 -2
- package/src/sdg/components/TextField/Doc/TextFieldDemo.svelte +143 -0
- package/src/sdg/components/TextField/Test/TextFieldEmbededTest.svelte +129 -0
- package/src/sdg/components/TextField/Test/textFieldEmbeddedTest.html +1 -0
- package/src/sdg/components/TextField/Test/textFieldTest.html +121 -0
- package/src/sdg/components/TextField/TextField.svelte +171 -0
- package/src/sdg/components/TextField/TextFieldWC.svelte +90 -0
- package/src/sdg/components/TextField/_textField.html +218 -0
- package/src/sdg/components/TextField/_textField.scss +110 -0
- package/src/sdg/components/TextField/textFieldUtils.js +19 -0
- package/src/sdg/components/ToTop/ToTop.svelte +2 -4
- package/src/sdg/components/ToTop/_toTop.html +45 -0
- package/src/sdg/{scss/components → components/ToTop}/_toTop.scss +2 -2
- package/src/sdg/components/ToggleSwitch/Test/ToggleSwitchEmbeddedTest.svelte +46 -0
- package/src/sdg/components/ToggleSwitch/Test/toggleSwitchEmbeddedTest.html +1 -0
- package/src/sdg/components/ToggleSwitch/Test/toggleSwitchTest.html +34 -0
- package/src/sdg/components/ToggleSwitch/ToggleSwitch.svelte +34 -0
- package/src/sdg/components/ToggleSwitch/ToggleSwitchWC.svelte +66 -0
- package/src/sdg/components/ToggleSwitch/_toggleSwitch.html +160 -0
- package/src/sdg/components/ToggleSwitch/_toggleSwitch.scss +97 -0
- package/src/sdg/components/utils.js +81 -1
- package/src/sdg/qc-sdg-test.js +6 -0
- package/src/sdg/scss/lib/_functions.scss +10 -2
- package/src/sdg/scss/lib/_mixins.scss +63 -26
- package/src/sdg/scss/qc-sdg.scss +1 -1
- package/src/sdg/scss/qc-sgd-no-grid.scss +30 -18
- package/src/sdg/scss/settings/_base.scss +5 -33
- package/src/sdg/scss/settings/_images.scss +30 -0
- package/src/sdg/scss/settings/_tokens.scss +23 -0
- package/src/sdg/scss/utilities/_display.scss +1 -1
- package/src/sdg/scss/utilities/_states.scss +13 -0
- package/tests/button.spec.ts +11 -0
- package/tests/choice-group.spec.ts +36 -0
- package/tests/dropdown-list.spec.ts +529 -0
- package/tests/icon.spec.ts +19 -0
- package/tests/pivHeader.spec.ts +22 -0
- package/tests/textfield.spec.ts +21 -0
- package/tests/toggle-switch.spec.ts +20 -0
- package/dist/img/arrow-up-white.svg +0 -3
- package/dist/img/chevron-blue.svg +0 -3
- package/dist/img/clipboard.svg +0 -8
- package/dist/img/error-white.svg +0 -1
- package/dist/img/error.svg +0 -1
- package/dist/img/exclamation-white.svg +0 -37
- package/dist/img/external-link-white.svg +0 -18
- package/dist/img/external-link.svg +0 -10
- package/dist/img/facebook.svg +0 -6
- package/dist/img/information-white.svg +0 -1
- package/dist/img/information.svg +0 -1
- package/dist/img/linkedin.svg +0 -5
- package/dist/img/loupe-piv-fonce.svg +0 -1
- package/dist/img/minus.svg +0 -6
- package/dist/img/qc-sprite.svg +0 -1
- package/dist/img/question-mark.svg +0 -47
- package/dist/img/success-white.svg +0 -1
- package/dist/img/success.svg +0 -1
- package/dist/img/twitter.svg +0 -8
- package/dist/img/warning.svg +0 -1
- package/dist/img/xclose-blue.svg +0 -6
- package/dist/img/xclose-white.svg +0 -1
- package/dist/img/youtube.svg +0 -3
- package/public/img/ampoule.svg +0 -1
- package/public/img/arrow-up-white.svg +0 -3
- package/public/img/chevron-blue.svg +0 -3
- package/public/img/chevron-white.svg +0 -3
- package/public/img/error-white.svg +0 -1
- package/public/img/error.svg +0 -1
- package/public/img/external-link-white.svg +0 -18
- package/public/img/facebook.svg +0 -6
- package/public/img/information-white.svg +0 -1
- package/public/img/information.svg +0 -1
- package/public/img/linkedin.svg +0 -5
- package/public/img/logo-piv-footer-mess.png +0 -0
- package/public/img/loupe-piv-droite.svg +0 -1
- package/public/img/loupe-piv-fonce.svg +0 -1
- package/public/img/note.svg +0 -1
- package/public/img/piv-bas-MCE-theme-clair.png +0 -0
- package/public/img/piv-bas-MCE-theme-sombre.png +0 -0
- package/public/img/piv-logo-pied-de-page.svg +0 -37
- package/public/img/plus.svg +0 -6
- package/public/img/qc-sprite.svg +0 -1
- package/public/img/quebec-logo.svg +0 -13
- package/public/img/success-white.svg +0 -1
- package/public/img/success.svg +0 -1
- package/public/img/twitter.svg +0 -8
- package/public/img/warning.svg +0 -1
- package/public/img/xclose-blue.svg +0 -6
- package/public/img/xclose-white.svg +0 -1
- package/public/img/youtube.svg +0 -3
- package/src/doc/scss/components/_button.scss +0 -61
- package/src/sdg/components/PivFooter/_defaultCopyright.svelte +0 -11
- package/src/sdg/components/PivHeader/_defaultLinks.svelte +0 -24
- package/src/sdg/components/QcCustomElement.js +0 -10
- package/src/sdg/scss/base/_fonts.scss +0 -29
- package/src/sdg/scss/base/_typography.scss +0 -94
- package/src/sdg/scss/components/_icons.scss +0 -169
- package/src/sdg/scss/components/_separator.scss +0 -5
- /package/dist/img/{loupe-piv-droite.svg → piv-search.svg} +0 -0
- /package/src/sdg/{scss/base → bases/colors}/_colors.scss +0 -0
- /package/src/sdg/{scss/base → bases/figures}/_figure.scss +0 -0
- /package/src/sdg/{scss → bases}/grid/_grid-lib.scss +0 -0
- /package/src/sdg/{scss → bases}/grid/_grid.scss +0 -0
- /package/src/sdg/{scss/base → bases/lists}/_lists.scss +0 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
<h2 id="buttons">Boutons</h2>
|
|
2
|
+
<h3>Exemples</h3>
|
|
3
|
+
|
|
4
|
+
<qc-doc-exemple caption="Exemples des différentes variantes de boutons.">
|
|
5
|
+
<div class="qc-row">
|
|
6
|
+
<div class="qc-col-sm-12 qc-col-lg-3">
|
|
7
|
+
<div>
|
|
8
|
+
<button class="qc-button qc-primary">Principal</button>
|
|
9
|
+
</div>
|
|
10
|
+
<div>
|
|
11
|
+
<button class="qc-button qc-primary qc-button-rounded">Principal</button>
|
|
12
|
+
</div>
|
|
13
|
+
<div>
|
|
14
|
+
<button class="qc-button qc-primary" disabled>Principal</button>
|
|
15
|
+
</div>
|
|
16
|
+
<div>
|
|
17
|
+
<button class="qc-button qc-primary qc-compact">Principal</button>
|
|
18
|
+
</div>
|
|
19
|
+
<div>
|
|
20
|
+
<button class="qc-button qc-primary qc-compact qc-button-rounded">Principal</button>
|
|
21
|
+
</div>
|
|
22
|
+
<div>
|
|
23
|
+
<button class="qc-button qc-primary qc-compact" disabled>Principal</button>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div class="qc-col-sm-12 qc-col-lg-3">
|
|
28
|
+
<div>
|
|
29
|
+
<button class="qc-button qc-secondary">Secondaire</button>
|
|
30
|
+
</div>
|
|
31
|
+
<div>
|
|
32
|
+
<button class="qc-button qc-secondary qc-button-rounded">Secondaire</button>
|
|
33
|
+
</div>
|
|
34
|
+
<div>
|
|
35
|
+
<button class="qc-button qc-secondary" disabled>Secondaire</button>
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<button class="qc-button qc-secondary qc-compact">Secondaire</button>
|
|
39
|
+
</div>
|
|
40
|
+
<div>
|
|
41
|
+
<button class="qc-button qc-secondary qc-compact qc-button-rounded">Secondaire</button>
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<button class="qc-button qc-secondary qc-compact" disabled>Secondaire</button>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div class="qc-col-sm-12 qc-col-lg-3">
|
|
49
|
+
<div>
|
|
50
|
+
<button class="qc-button qc-tertiary">Tertiaire</button>
|
|
51
|
+
</div>
|
|
52
|
+
<div>
|
|
53
|
+
<button class="qc-button qc-tertiary qc-button-rounded">Tertiaire</button>
|
|
54
|
+
</div>
|
|
55
|
+
<div>
|
|
56
|
+
<button class="qc-button qc-tertiary" disabled>Tertiaire</button>
|
|
57
|
+
</div>
|
|
58
|
+
<div>
|
|
59
|
+
<button class="qc-button qc-tertiary qc-compact">Tertiaire</button>
|
|
60
|
+
</div>
|
|
61
|
+
<div>
|
|
62
|
+
<button class="qc-button qc-tertiary qc-compact qc-button-rounded">Tertiaire</button>
|
|
63
|
+
</div>
|
|
64
|
+
<div>
|
|
65
|
+
<button class="qc-button qc-tertiary qc-compact" disabled>Tertiaire</button>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div class="qc-col-sm-12 qc-col-lg-3">
|
|
70
|
+
<div>
|
|
71
|
+
<button class="qc-button qc-danger">Avertissement</button>
|
|
72
|
+
</div>
|
|
73
|
+
<div>
|
|
74
|
+
<button class="qc-button qc-danger qc-button-rounded">Avertissement</button>
|
|
75
|
+
</div>
|
|
76
|
+
<div>
|
|
77
|
+
<button class="qc-button qc-danger" disabled>Avertissement</button>
|
|
78
|
+
</div>
|
|
79
|
+
<div>
|
|
80
|
+
<button class="qc-button qc-danger qc-compact">Avertissement</button>
|
|
81
|
+
</div>
|
|
82
|
+
<div>
|
|
83
|
+
<button class="qc-button qc-danger qc-compact qc-button-rounded">Avertissement</button>
|
|
84
|
+
</div>
|
|
85
|
+
<div>
|
|
86
|
+
<button class="qc-button qc-danger qc-compact" disabled>Avertissement</button>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div>
|
|
92
|
+
<button class="qc-button qc-simple">
|
|
93
|
+
<qc-icon type="information"></qc-icon>
|
|
94
|
+
Action
|
|
95
|
+
</button>
|
|
96
|
+
|
|
97
|
+
<button class="qc-button qc-simple" disabled>
|
|
98
|
+
<qc-icon type="plus"></qc-icon>
|
|
99
|
+
Action
|
|
100
|
+
</button>
|
|
101
|
+
</div>
|
|
102
|
+
<div>
|
|
103
|
+
<button class="qc-button qc-simple qc-compact">
|
|
104
|
+
<qc-icon type="information"></qc-icon>
|
|
105
|
+
Action
|
|
106
|
+
</button>
|
|
107
|
+
|
|
108
|
+
<button class="qc-button qc-simple qc-compact" disabled>
|
|
109
|
+
<qc-icon type="plus"></qc-icon>
|
|
110
|
+
Action
|
|
111
|
+
</button>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
</qc-doc-exemple>
|
|
115
|
+
|
|
116
|
+
<qc-doc-exemple caption="Exemples de boutons avec icône.<br/>NB: voir la section <a href='#icons'>Icônes</a> pour plus de détails concernant le composant <code>qc-icon</code>.">
|
|
117
|
+
<div>
|
|
118
|
+
<button class="qc-button qc-primary">
|
|
119
|
+
<qc-icon type="arrow-up" rotate="-90"></qc-icon>
|
|
120
|
+
Précédent
|
|
121
|
+
</button>
|
|
122
|
+
|
|
123
|
+
<button class="qc-button qc-primary">
|
|
124
|
+
Suivant
|
|
125
|
+
<qc-icon type="arrow-up" rotate="90"></qc-icon>
|
|
126
|
+
</button>
|
|
127
|
+
</div>
|
|
128
|
+
</qc-doc-exemple>
|
|
129
|
+
|
|
130
|
+
<qc-doc-exemple caption="Exemples avec un lien et un bouton de soumission.">
|
|
131
|
+
<a href="javascript:void(0);"
|
|
132
|
+
class="qc-button qc-primary"
|
|
133
|
+
role="button"
|
|
134
|
+
>
|
|
135
|
+
Action
|
|
136
|
+
</a>
|
|
137
|
+
<input type="submit" value="Action" class="qc-button qc-primary" />
|
|
138
|
+
</qc-doc-exemple>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
<h3>Classes CSS</h3>
|
|
142
|
+
|
|
143
|
+
<div class="table-overflow">
|
|
144
|
+
<table class="qc-table qc-striped">
|
|
145
|
+
<thead>
|
|
146
|
+
<tr>
|
|
147
|
+
<th>Classe / Attribut</th>
|
|
148
|
+
<th>Description</th>
|
|
149
|
+
</tr>
|
|
150
|
+
</thead>
|
|
151
|
+
<tbody>
|
|
152
|
+
<tr>
|
|
153
|
+
<td><code>qc‑button</code></td>
|
|
154
|
+
<td>Classe de base obligatoire pour tous les boutons. Définit la typographie, la taille, les marges, le padding, et le comportement responsive.</td>
|
|
155
|
+
</tr>
|
|
156
|
+
<tr>
|
|
157
|
+
<td><code>qc‑compact</code></td>
|
|
158
|
+
<td>Variante compacte du bouton avec des dimensions réduites et un padding plus petit.</td>
|
|
159
|
+
</tr>
|
|
160
|
+
<tr>
|
|
161
|
+
<td><code>qc‑button‑rounded</code></td>
|
|
162
|
+
<td>Ajoute un rayon de bordure pour arrondir les coins du bouton.</td>
|
|
163
|
+
</tr>
|
|
164
|
+
<tr>
|
|
165
|
+
<td><code>qc‑primary</code></td>
|
|
166
|
+
<td>Bouton principal avec fond bleu et texte blanc.</td>
|
|
167
|
+
</tr>
|
|
168
|
+
<tr>
|
|
169
|
+
<td><code>qc‑secondary</code></td>
|
|
170
|
+
<td>Bouton secondaire avec fond blanc et texte bleu.</td>
|
|
171
|
+
</tr>
|
|
172
|
+
<tr>
|
|
173
|
+
<td><code>qc‑tertiary</code></td>
|
|
174
|
+
<td>Bouton tertiaire avec fond blanc et texte bleu.</td>
|
|
175
|
+
</tr>
|
|
176
|
+
<tr>
|
|
177
|
+
<td><code>qc‑danger</code></td>
|
|
178
|
+
<td>Bouton d’avertissement avec fond rouge et texte blanc.</td>
|
|
179
|
+
</tr>
|
|
180
|
+
<tr>
|
|
181
|
+
<td><code>qc‑simple</code></td>
|
|
182
|
+
<td>Bouton sans fond ni bordure.</td>
|
|
183
|
+
</tr>
|
|
184
|
+
</tbody>
|
|
185
|
+
</table>
|
|
186
|
+
</div>
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
@use "qc-sdg-lib" as *;
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
.qc-button {
|
|
5
|
+
font-family: token-value(font family, content);
|
|
6
|
+
font-size: token-value(font size, md);
|
|
7
|
+
font-weight: token-value(font weight, bold);
|
|
8
|
+
line-height: token-value(line height, md);
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
gap: rem(8);
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
min-width: rem(112);
|
|
15
|
+
max-width: rem(360);
|
|
16
|
+
min-height: rem(56);
|
|
17
|
+
padding: rem(16) rem(24);
|
|
18
|
+
vertical-align: middle;
|
|
19
|
+
border: 2px solid transparent;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
margin-right: rem(32);
|
|
22
|
+
margin-bottom: token-value(spacer, md);
|
|
23
|
+
|
|
24
|
+
&:focus,
|
|
25
|
+
&:focus-visible {
|
|
26
|
+
outline: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.qc-compact {
|
|
30
|
+
font-weight: token-value(font weight, semi-bold);
|
|
31
|
+
min-width: rem(80);
|
|
32
|
+
min-height: rem(40);
|
|
33
|
+
padding: rem(8) rem(16);
|
|
34
|
+
border-width: 1px;
|
|
35
|
+
margin-right: token-value(spacer, md);
|
|
36
|
+
margin-bottom: token-value(spacer, sm);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.qc-button-rounded {
|
|
40
|
+
border-radius: rem(4);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.qc-primary {
|
|
44
|
+
color: token-value(color white);
|
|
45
|
+
background-color: token-value(color blue piv);
|
|
46
|
+
border-color: token-value(color blue piv);
|
|
47
|
+
box-shadow: 0 1px 4px token-value(color box_shadow);
|
|
48
|
+
|
|
49
|
+
&:hover:not(:disabled),
|
|
50
|
+
&.qc-hover {
|
|
51
|
+
background-color: token-value(color blue, regular);
|
|
52
|
+
border-color: token-value(color blue, regular);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:focus:not(:disabled),
|
|
56
|
+
&.qc-focus {
|
|
57
|
+
background-color: token-value(color blue, regular);
|
|
58
|
+
border-color: token-value(color blue, dark);
|
|
59
|
+
box-shadow:
|
|
60
|
+
0 2px 8px token-value(color box_shadow),
|
|
61
|
+
0 0 0 2px token-value(color blue, light);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:active:not(:disabled),
|
|
65
|
+
&.qc-active {
|
|
66
|
+
background-color: token-value(color blue, regular_light);
|
|
67
|
+
border-color: token-value(color blue, regular_light);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.qc-secondary {
|
|
72
|
+
color: token-value(color blue, piv);
|
|
73
|
+
background-color: token-value(color white);
|
|
74
|
+
border-color: token-value(color blue, piv);
|
|
75
|
+
|
|
76
|
+
&:hover:not(:disabled),
|
|
77
|
+
&:focus:not(:disabled),
|
|
78
|
+
&:active:not(:disabled),
|
|
79
|
+
&.qc-hover, &.qc-focus, &.qc-active {
|
|
80
|
+
background-color: rgba(map.get(map.get(map.get($xl-tokens, color), blue), piv), 0.16);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:focus:not(:disabled),
|
|
84
|
+
&.qc-focus {
|
|
85
|
+
border-color: token-value(color blue, dark);
|
|
86
|
+
box-shadow: 0 0 0 2px token-value(color blue, light);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:active:not(:disabled),
|
|
90
|
+
&.qc-active {
|
|
91
|
+
background-color: rgba(map.get(map.get(map.get($xl-tokens, color), blue), piv), 0.08);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&.qc-tertiary {
|
|
96
|
+
color: token-value(color blue, piv);
|
|
97
|
+
background-color: token-value(color white);
|
|
98
|
+
border-color: token-value(color white);
|
|
99
|
+
|
|
100
|
+
&:hover:not(:disabled),
|
|
101
|
+
&.qc-hover{
|
|
102
|
+
background-color: rgba(map.get(map.get(map.get($xl-tokens, color), grey), light), 0.24);
|
|
103
|
+
text-decoration: underline;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:focus:not(:disabled),
|
|
107
|
+
&.qc-focus {
|
|
108
|
+
background-color: rgba(map.get(map.get(map.get($xl-tokens, color), grey), light), 0.24);
|
|
109
|
+
border-color: token-value(color blue, dark);
|
|
110
|
+
box-shadow: 0 0 0 2px token-value(color blue, light);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&:active:not(:disabled),
|
|
114
|
+
&.qc-active {
|
|
115
|
+
background-color: rgba(map.get(map.get(map.get($xl-tokens, color), grey), light), 0.16);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&.qc-danger {
|
|
120
|
+
color: token-value(color white);
|
|
121
|
+
background-color: token-value(color red regular);
|
|
122
|
+
border-color: token-value(color white);
|
|
123
|
+
|
|
124
|
+
&:hover:not(:disabled),
|
|
125
|
+
&.qc-hover {
|
|
126
|
+
background-color: token-value(color red medium);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:focus:not(:disabled),
|
|
130
|
+
&.qc-focus {
|
|
131
|
+
background-color: token-value(color red medium);
|
|
132
|
+
border-color: token-value(color blue, dark);
|
|
133
|
+
box-shadow: 0 0 0 2px token-value(color blue, light);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&:active:not(:disabled),
|
|
137
|
+
&.qc-active {
|
|
138
|
+
background-color: token-value(color red regular_light);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&:disabled,
|
|
143
|
+
&.qc-disabled {
|
|
144
|
+
background-color: token-value(color grey, light);
|
|
145
|
+
border-color: token-value(color grey, light);
|
|
146
|
+
color: token-value(color white);
|
|
147
|
+
cursor: not-allowed;
|
|
148
|
+
box-shadow: none;
|
|
149
|
+
opacity: 1;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.qc-icon {
|
|
153
|
+
display: inline-block;
|
|
154
|
+
width: rem(16);
|
|
155
|
+
height: rem(16);
|
|
156
|
+
background-color: currentColor;
|
|
157
|
+
mask-size: 100% 100%;
|
|
158
|
+
mask-repeat: no-repeat;
|
|
159
|
+
flex-shrink: 0;
|
|
160
|
+
|
|
161
|
+
&.qc-custom-icon {
|
|
162
|
+
mask:var(--img-src);
|
|
163
|
+
mask-size: 100% 100%;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&.qc-simple {
|
|
168
|
+
color: token-value(color blue, piv);
|
|
169
|
+
background-color: transparent;
|
|
170
|
+
border-color: transparent;
|
|
171
|
+
padding: 0;
|
|
172
|
+
min-width: unset;
|
|
173
|
+
min-height: unset;
|
|
174
|
+
|
|
175
|
+
&:hover:not(:disabled),
|
|
176
|
+
&:active:not(:disabled) {
|
|
177
|
+
text-decoration: underline;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&:focus:not(:disabled) {
|
|
181
|
+
border-color: token-value(color blue, light);
|
|
182
|
+
box-shadow: 0 0 0 2px token-value(color blue, light);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&.qc-compact {
|
|
186
|
+
font-size: token-value(font size, sm);
|
|
187
|
+
line-height: token-value(line height, sm);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&:disabled,
|
|
191
|
+
&.qc-disabled {
|
|
192
|
+
color: token-value(color, grey regular);
|
|
193
|
+
cursor: not-allowed;
|
|
194
|
+
box-shadow: none;
|
|
195
|
+
opacity: 1;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@at-root a#{&}{
|
|
200
|
+
text-decoration: none;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { Utils } from "../utils";
|
|
3
|
+
import FormError from "../FormError/FormError.svelte";
|
|
4
|
+
import {getContext, onMount} from "svelte";
|
|
5
|
+
import {updateInput, onChange} from "./updateInput.svelte";
|
|
6
|
+
|
|
7
|
+
const lang = Utils.getPageLanguage(),
|
|
8
|
+
qcCheckoxContext = getContext("qc-checkbox");
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
id,
|
|
12
|
+
name,
|
|
13
|
+
value,
|
|
14
|
+
description,
|
|
15
|
+
required = $bindable(false),
|
|
16
|
+
disabled,
|
|
17
|
+
compact = false,
|
|
18
|
+
checked = $bindable(false),
|
|
19
|
+
invalid = $bindable(false),
|
|
20
|
+
invalidText,
|
|
21
|
+
children,
|
|
22
|
+
labelElement,
|
|
23
|
+
requiredSpan = $bindable(),
|
|
24
|
+
input,
|
|
25
|
+
...rest
|
|
26
|
+
} = $props();
|
|
27
|
+
|
|
28
|
+
let label = $state(rest.label),
|
|
29
|
+
rootElement = $state()
|
|
30
|
+
;
|
|
31
|
+
|
|
32
|
+
onMount(() => {
|
|
33
|
+
if (qcCheckoxContext) return;
|
|
34
|
+
labelElement = rootElement?.querySelector('label')
|
|
35
|
+
input = rootElement?.querySelector('input')
|
|
36
|
+
onChange(input, _invalid => invalid = _invalid)
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
$effect(() => {
|
|
40
|
+
if (labelElement) {
|
|
41
|
+
label = labelElement.querySelector('span')?.textContent;
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
$effect(_ => updateInput(input, required, invalid, compact, false, false))
|
|
46
|
+
|
|
47
|
+
$effect(() => {
|
|
48
|
+
if (!required) return;
|
|
49
|
+
if (!labelElement) return;
|
|
50
|
+
labelElement.appendChild(requiredSpan);
|
|
51
|
+
})
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
{#snippet requiredSpanSnippet()}
|
|
55
|
+
{#if required}
|
|
56
|
+
<span class="qc-required"
|
|
57
|
+
aria-hidden="true"
|
|
58
|
+
bind:this={requiredSpan}
|
|
59
|
+
>*</span>
|
|
60
|
+
{/if}
|
|
61
|
+
{/snippet}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
<div class={[
|
|
65
|
+
"qc-checkbox-single",
|
|
66
|
+
invalid && "qc-checkbox-single-invalid"
|
|
67
|
+
]}
|
|
68
|
+
{compact}
|
|
69
|
+
bind:this={rootElement}
|
|
70
|
+
>
|
|
71
|
+
{@render requiredSpanSnippet()}
|
|
72
|
+
{@render children?.()}
|
|
73
|
+
<FormError {invalid}
|
|
74
|
+
{invalidText}
|
|
75
|
+
{label}
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<svelte:options customElement={{
|
|
2
|
+
tag: 'qc-checkbox',
|
|
3
|
+
props: {
|
|
4
|
+
required: { attribute: 'required', type: 'Boolean' },
|
|
5
|
+
compact: { attribute: 'compact', type: 'Boolean' },
|
|
6
|
+
invalid: { attribute: 'invalid', type: 'Boolean' },
|
|
7
|
+
invalidText: { attribute: 'invalid-text', type: 'String' }
|
|
8
|
+
}
|
|
9
|
+
}} />
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import Checkbox from "./Checkbox.svelte";
|
|
13
|
+
import {onMount, setContext} from "svelte";
|
|
14
|
+
import {Utils} from "../utils";
|
|
15
|
+
import {onChange} from "./updateInput.svelte";
|
|
16
|
+
|
|
17
|
+
setContext('qc-checkbox', true);
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
required = $bindable(false),
|
|
21
|
+
compact,
|
|
22
|
+
invalid = $bindable(false),
|
|
23
|
+
invalidText
|
|
24
|
+
} = $props();
|
|
25
|
+
let requiredSpan = $state(null),
|
|
26
|
+
labelElement = $state(),
|
|
27
|
+
input = $state()
|
|
28
|
+
;
|
|
29
|
+
|
|
30
|
+
onMount(() => {
|
|
31
|
+
labelElement = $host()
|
|
32
|
+
.querySelector('label')
|
|
33
|
+
input = $host().querySelector('input')
|
|
34
|
+
onChange(input, _invalid => invalid = _invalid)
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
</script>
|
|
38
|
+
<Checkbox
|
|
39
|
+
bind:invalid
|
|
40
|
+
{compact}
|
|
41
|
+
{required}
|
|
42
|
+
{invalidText}
|
|
43
|
+
{labelElement}
|
|
44
|
+
{input}
|
|
45
|
+
bind:requiredSpan
|
|
46
|
+
>
|
|
47
|
+
<slot />
|
|
48
|
+
</Checkbox>
|
|
49
|
+
<link rel='stylesheet' href='{Utils.cssPath}'>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
<h4 id="checkbox">Case à cocher unique (qc-checkbox)</h4>
|
|
4
|
+
|
|
5
|
+
<qc-doc-exemple caption="Exemple d’une case à cocher obligatoire.">
|
|
6
|
+
<form id="exemple-tos-form">
|
|
7
|
+
<qc-checkbox required >
|
|
8
|
+
<label>
|
|
9
|
+
<input type="checkbox"
|
|
10
|
+
name="consentement"
|
|
11
|
+
value="oui"
|
|
12
|
+
id="consentement"
|
|
13
|
+
/>
|
|
14
|
+
<span >J’accepte les conditions d’utilisation</span>
|
|
15
|
+
</label>
|
|
16
|
+
</qc-checkbox>
|
|
17
|
+
|
|
18
|
+
<button class="qc-button qc-primary qc-compact"
|
|
19
|
+
type="submit">
|
|
20
|
+
S'inscrire
|
|
21
|
+
</button>
|
|
22
|
+
</form>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
const tosForm = document.getElementById("exemple-tos-form");
|
|
26
|
+
const consentement = document.getElementById("consentement");
|
|
27
|
+
tosForm.addEventListener("submit", (event) => {
|
|
28
|
+
event.preventDefault();
|
|
29
|
+
if(consentement.checked) {
|
|
30
|
+
const formData = new FormData(event.target);
|
|
31
|
+
let alertParts = ["Formulaire soumis avec les données suivantes :"];
|
|
32
|
+
for (const [key, value] of formData.entries()) {
|
|
33
|
+
alertParts.push(`${key} : ${value}`);
|
|
34
|
+
}
|
|
35
|
+
alert(alertParts.join("\n"));
|
|
36
|
+
} else {
|
|
37
|
+
consentement.closest('qc-checkbox').invalid = true;
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
</script>
|
|
41
|
+
</qc-doc-exemple>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
<h4>Attributs de qc-checkbox</h4>
|
|
45
|
+
<div class="table-overflow">
|
|
46
|
+
<table class="qc-table qc-striped component-attributes-description">
|
|
47
|
+
<thead>
|
|
48
|
+
<tr>
|
|
49
|
+
<th>Nom</th>
|
|
50
|
+
<th>Valeur attendue</th>
|
|
51
|
+
<th>Valeur par défaut</th>
|
|
52
|
+
<th>Description</th>
|
|
53
|
+
</tr>
|
|
54
|
+
</thead>
|
|
55
|
+
<tbody>
|
|
56
|
+
<tr>
|
|
57
|
+
<td>compact</td>
|
|
58
|
+
<td>na</td>
|
|
59
|
+
<td>na</td>
|
|
60
|
+
<td>Affiche la case à cocher au format compact</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<td>required</td>
|
|
64
|
+
<td>na</td>
|
|
65
|
+
<td>na</td>
|
|
66
|
+
<td>Ajoute un astérisque pour indiquer que la sélection est obligatoire.</td>
|
|
67
|
+
</tr>
|
|
68
|
+
<tr>
|
|
69
|
+
<td>invalid</td>
|
|
70
|
+
<td>na</td>
|
|
71
|
+
<td>na</td>
|
|
72
|
+
<td>
|
|
73
|
+
Affiche le message d’erreur (voir l’exemple de case à cocher obligatoire).
|
|
74
|
+
<br/>NB : `invalid` prend automatiquement la valeur `false` dès que la case est cochée.
|
|
75
|
+
</td>
|
|
76
|
+
</tr>
|
|
77
|
+
<tr>
|
|
78
|
+
<td>invalid-text</td>
|
|
79
|
+
<td>Texte</td>
|
|
80
|
+
<td>"Le champ {nom du champ} est obligatoire" ou "{field name} field is required"</td>
|
|
81
|
+
<td>Message d’erreur à afficher lorsque la case est invalide.</td>
|
|
82
|
+
</tr>
|
|
83
|
+
</tbody>
|
|
84
|
+
</table>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@use "qc-sdg-lib" as *;
|
|
2
|
+
@use "../Fieldset/fieldset" as *;
|
|
3
|
+
@use "../../bases/Icon/icons" as *;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
input[type="checkbox"].qc-choicefield {
|
|
7
|
+
&:checked {
|
|
8
|
+
|
|
9
|
+
background-color: token-value(color blue regular)!important;
|
|
10
|
+
|
|
11
|
+
&::before {
|
|
12
|
+
width: rem(12);
|
|
13
|
+
height: rem(7);
|
|
14
|
+
border: rem(3) solid token-value(color, blue, regular);
|
|
15
|
+
border-top: 0;
|
|
16
|
+
border-right: 0;
|
|
17
|
+
transform: rotate(-45deg);
|
|
18
|
+
top: rem(2);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&::after {
|
|
22
|
+
@extend .icon-checkmark;
|
|
23
|
+
content: "";
|
|
24
|
+
position: absolute;
|
|
25
|
+
left: 50%;
|
|
26
|
+
top: 50%;
|
|
27
|
+
transform: translate(-50%, -50%);
|
|
28
|
+
mask-size: contain;
|
|
29
|
+
mask-repeat: no-repeat;
|
|
30
|
+
mask-position: center;
|
|
31
|
+
background-color: token-value(color, white);
|
|
32
|
+
width: token-value(spacer, md);
|
|
33
|
+
height: rem(18);
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&.qc-compact {
|
|
38
|
+
&:checked {
|
|
39
|
+
&::before {
|
|
40
|
+
width: rem(8);
|
|
41
|
+
height: rem(5);
|
|
42
|
+
border: rem(2) solid token-value(color, blue, regular);
|
|
43
|
+
border-top: 0;
|
|
44
|
+
border-right: 0;
|
|
45
|
+
transform: rotate(-45deg);
|
|
46
|
+
top: rem(1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&::after {
|
|
50
|
+
width: token-value(spacer, sm);
|
|
51
|
+
height: rem(12);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.qc-checkbox-single {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
margin-bottom: token-value(spacer content-block mb);
|
|
61
|
+
width: fit-content;
|
|
62
|
+
|
|
63
|
+
label {
|
|
64
|
+
flex-grow: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.qc-checkbox-single-invalid {
|
|
68
|
+
@extend .qc-fieldset-invalid;
|
|
69
|
+
}
|
|
70
|
+
}
|