qc-trousse-sdg 1.4.0-develop.0 → 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/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,46 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import ToggleSwitch from "../ToggleSwitch.svelte";
|
|
3
|
+
import Fieldset from "../../Fieldset/Fieldset.svelte";
|
|
4
|
+
import {Utils} from "../../utils";
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<svelte:options customElement={{
|
|
8
|
+
tag: 'qc-toggle-switch-embedded-test'
|
|
9
|
+
}} />
|
|
10
|
+
|
|
11
|
+
<Fieldset
|
|
12
|
+
elementsGap="md"
|
|
13
|
+
maxWidth="25.6rem"
|
|
14
|
+
>
|
|
15
|
+
<ToggleSwitch
|
|
16
|
+
label="1<sup>er</sup>   commutateur"
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
<ToggleSwitch
|
|
20
|
+
label="Texte aligné sur la droite"
|
|
21
|
+
textAlign="end"
|
|
22
|
+
/>
|
|
23
|
+
</Fieldset>
|
|
24
|
+
|
|
25
|
+
<Fieldset
|
|
26
|
+
legend="Préférences de notifications de messages"
|
|
27
|
+
elementsGap="md"
|
|
28
|
+
maxWidth="25.6rem"
|
|
29
|
+
>
|
|
30
|
+
<ToggleSwitch
|
|
31
|
+
label="Nouveaux messages"
|
|
32
|
+
justified="true"
|
|
33
|
+
checked="true"
|
|
34
|
+
/>
|
|
35
|
+
<ToggleSwitch
|
|
36
|
+
label="Modifications de messages"
|
|
37
|
+
justified="true"
|
|
38
|
+
/>
|
|
39
|
+
<ToggleSwitch
|
|
40
|
+
label="Messages supprimés (désactivé)"
|
|
41
|
+
justified="true"
|
|
42
|
+
disabled="true"
|
|
43
|
+
/>
|
|
44
|
+
</Fieldset>
|
|
45
|
+
|
|
46
|
+
<link rel='stylesheet' href='{Utils.cssPath}'>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<qc-toggle-switch-embedded-test></qc-toggle-switch-embedded-test>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<qc-toggle-switch-group
|
|
2
|
+
id="foo"
|
|
3
|
+
max-width="25.6rem"
|
|
4
|
+
>
|
|
5
|
+
<qc-toggle-switch
|
|
6
|
+
label="1<sup>er</sup>   commutateur"
|
|
7
|
+
></qc-toggle-switch>
|
|
8
|
+
<qc-toggle-switch
|
|
9
|
+
label="Texte aligné sur la droite"
|
|
10
|
+
text-align="end"
|
|
11
|
+
></qc-toggle-switch>
|
|
12
|
+
</qc-toggle-switch-group>
|
|
13
|
+
|
|
14
|
+
<qc-toggle-switch-group
|
|
15
|
+
id="switch-group"
|
|
16
|
+
legend="Préférences de notifications de messages"
|
|
17
|
+
justified
|
|
18
|
+
max-width="25.6rem"
|
|
19
|
+
>
|
|
20
|
+
<qc-toggle-switch
|
|
21
|
+
id="nouveaux-messages"
|
|
22
|
+
label="Nouveaux messages"
|
|
23
|
+
checked
|
|
24
|
+
></qc-toggle-switch>
|
|
25
|
+
<qc-toggle-switch
|
|
26
|
+
id="modifications-messages"
|
|
27
|
+
label="Modifications de messages"
|
|
28
|
+
></qc-toggle-switch>
|
|
29
|
+
<qc-toggle-switch
|
|
30
|
+
id="messages-supprimes"
|
|
31
|
+
label="Messages supprimés (désactivé)"
|
|
32
|
+
disabled
|
|
33
|
+
></qc-toggle-switch>
|
|
34
|
+
</qc-toggle-switch-group>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
let {
|
|
3
|
+
label,
|
|
4
|
+
id,
|
|
5
|
+
checked = $bindable(false),
|
|
6
|
+
disabled = $bindable(false),
|
|
7
|
+
justified,
|
|
8
|
+
textAlign
|
|
9
|
+
} = $props();
|
|
10
|
+
|
|
11
|
+
const usedId = "toggle-switch-" + (id ?
|
|
12
|
+
id : Math.random().toString(36));
|
|
13
|
+
|
|
14
|
+
let usedLabelTextAlignment = textAlign?.toLowerCase() === "end" ? "end" : "start";
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<label class={[
|
|
18
|
+
"qc-switch", justified && "qc-switch-justified"
|
|
19
|
+
]} for={usedId}>
|
|
20
|
+
<input
|
|
21
|
+
id={usedId}
|
|
22
|
+
type="checkbox"
|
|
23
|
+
role="switch"
|
|
24
|
+
bind:checked={checked}
|
|
25
|
+
{disabled}
|
|
26
|
+
/>
|
|
27
|
+
|
|
28
|
+
<span class={[
|
|
29
|
+
"qc-switch-label", usedLabelTextAlignment === "end" && "qc-switch-label-end"
|
|
30
|
+
]}>
|
|
31
|
+
{@html label}
|
|
32
|
+
</span>
|
|
33
|
+
<span class="qc-switch-slider"></span>
|
|
34
|
+
</label>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<svelte:options customElement = {{
|
|
2
|
+
tag: 'qc-toggle-switch',
|
|
3
|
+
shadow: 'none',
|
|
4
|
+
props: {
|
|
5
|
+
id: {attribute: 'id', type: 'String'},
|
|
6
|
+
label: {attribute: 'label', type: 'String'},
|
|
7
|
+
checked: {attribute: 'checked', type: 'Boolean', reflect: true},
|
|
8
|
+
disabled: {attribute: 'disabled', type: 'Boolean', reflect: true},
|
|
9
|
+
justified: {attribute: 'justified', type: 'Boolean', reflect: true},
|
|
10
|
+
textAlign: {attribute: 'text-align', type: 'String'},
|
|
11
|
+
}
|
|
12
|
+
}} />
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import ToggleSwitch from "./ToggleSwitch.svelte";
|
|
16
|
+
import {onMount, onDestroy} from "svelte";
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
id,
|
|
20
|
+
label,
|
|
21
|
+
checked = $bindable(false),
|
|
22
|
+
disabled = false,
|
|
23
|
+
justified = false,
|
|
24
|
+
textAlign,
|
|
25
|
+
...rest
|
|
26
|
+
} = $props();
|
|
27
|
+
|
|
28
|
+
let parent = $state();
|
|
29
|
+
let index;
|
|
30
|
+
onMount(() => {
|
|
31
|
+
parent = $host().closest("qc-toggle-switch-group");
|
|
32
|
+
|
|
33
|
+
if (parent) {
|
|
34
|
+
parent.items.push({
|
|
35
|
+
id,
|
|
36
|
+
label,
|
|
37
|
+
disabled,
|
|
38
|
+
checked,
|
|
39
|
+
justified,
|
|
40
|
+
textAlign,
|
|
41
|
+
});
|
|
42
|
+
index = parent.items.length - 1;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
onDestroy(() => {
|
|
46
|
+
parent.items.splice(index, 1);
|
|
47
|
+
})
|
|
48
|
+
$effect(() => {
|
|
49
|
+
if (parent) {
|
|
50
|
+
checked = parent.items[index].checked;
|
|
51
|
+
$host().dispatchEvent(new Event("change"));
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
{#if !parent}
|
|
57
|
+
<ToggleSwitch
|
|
58
|
+
{label}
|
|
59
|
+
bind:checked
|
|
60
|
+
{disabled}
|
|
61
|
+
{justified}
|
|
62
|
+
{textAlign}
|
|
63
|
+
{...rest}
|
|
64
|
+
/>
|
|
65
|
+
{/if}
|
|
66
|
+
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<!-- Commutateur -->
|
|
2
|
+
<h3 id="toggle-switch">Commutateur</h3>
|
|
3
|
+
<p>
|
|
4
|
+
Le commutateur peut être utilisé seul ou en groupe. Contrairement aux <a href="#checkbox">cases à cocher</a>, le
|
|
5
|
+
commutateur agit immédiatement sur la page où il est inséré.
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<h4>Exemples</h4>
|
|
9
|
+
<qc-doc-exemple
|
|
10
|
+
caption="Exemple de commutateurs seuls avec leurs libellés respectivement à gauche et à droite."
|
|
11
|
+
>
|
|
12
|
+
<div style="display: flex; flex-direction: column; gap: 2.4rem">
|
|
13
|
+
<qc-toggle-switch
|
|
14
|
+
id="switch-status"
|
|
15
|
+
label="Afficher l'état du commutateur à la console."
|
|
16
|
+
></qc-toggle-switch>
|
|
17
|
+
<qc-toggle-switch
|
|
18
|
+
id="switch-status-2"
|
|
19
|
+
label="Libellé aligné à droite (afficher au format mobile pour voir la différence)."
|
|
20
|
+
text-align="end"
|
|
21
|
+
></qc-toggle-switch>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
document.getElementById("switch-status")
|
|
26
|
+
.addEventListener("change", (event) => {
|
|
27
|
+
console.log(`'switch-status' mis à ${event.target.checked}`);
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
</qc-doc-exemple>
|
|
31
|
+
|
|
32
|
+
<qc-doc-exemple caption="Exemple de commutateurs en groupe avec différents états">
|
|
33
|
+
<qc-toggle-switch-group
|
|
34
|
+
id="switch-group"
|
|
35
|
+
legend="Préférences de notifications de messages"
|
|
36
|
+
justified
|
|
37
|
+
max-width="25.6rem"
|
|
38
|
+
>
|
|
39
|
+
<qc-toggle-switch
|
|
40
|
+
id="nouveaux-messages"
|
|
41
|
+
label="Nouveaux messages"
|
|
42
|
+
checked
|
|
43
|
+
></qc-toggle-switch>
|
|
44
|
+
<qc-toggle-switch
|
|
45
|
+
id="modifications-messages"
|
|
46
|
+
label="Modifications de messages"
|
|
47
|
+
></qc-toggle-switch>
|
|
48
|
+
<qc-toggle-switch
|
|
49
|
+
id="messages-supprimes"
|
|
50
|
+
label="Messages supprimés (désactivé)"
|
|
51
|
+
disabled
|
|
52
|
+
></qc-toggle-switch>
|
|
53
|
+
</qc-toggle-switch-group>
|
|
54
|
+
<script>
|
|
55
|
+
document.getElementById("switch-group").querySelectorAll("qc-toggle-switch")
|
|
56
|
+
.forEach(switchElement => {
|
|
57
|
+
switchElement.addEventListener("change", (event) => {
|
|
58
|
+
console.log(`'${event.target.id}' mis à ${event.target.checked}`);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
</script>
|
|
62
|
+
</qc-doc-exemple>
|
|
63
|
+
|
|
64
|
+
<h4>Documentation technique</h4>
|
|
65
|
+
|
|
66
|
+
<h5>Attributs de <code>qc-toggle-switch</code></h5>
|
|
67
|
+
<table class="qc-table qc-striped component-attributes-description">
|
|
68
|
+
<thead>
|
|
69
|
+
<tr>
|
|
70
|
+
<th>Nom</th>
|
|
71
|
+
<th>Valeur attendue</th>
|
|
72
|
+
<th>Valeur par défaut</th>
|
|
73
|
+
<th>Description</th>
|
|
74
|
+
</tr>
|
|
75
|
+
</thead>
|
|
76
|
+
<tbody>
|
|
77
|
+
<tr>
|
|
78
|
+
<td>label</td>
|
|
79
|
+
<td>Contenu HTML</td>
|
|
80
|
+
<td></td>
|
|
81
|
+
<td>Contenu du libellé du commutateur</td>
|
|
82
|
+
</tr>
|
|
83
|
+
<tr>
|
|
84
|
+
<td>checked</td>
|
|
85
|
+
<td>na</td>
|
|
86
|
+
<td>na</td>
|
|
87
|
+
<td>Active le commutateur par défaut</td>
|
|
88
|
+
</tr>
|
|
89
|
+
<tr>
|
|
90
|
+
<td>disabled</td>
|
|
91
|
+
<td>na</td>
|
|
92
|
+
<td>na</td>
|
|
93
|
+
<td>Désactive le commutateur</td>
|
|
94
|
+
</tr>
|
|
95
|
+
<tr>
|
|
96
|
+
<td>justified</td>
|
|
97
|
+
<td>na</td>
|
|
98
|
+
<td>na</td>
|
|
99
|
+
<td>
|
|
100
|
+
Permet au commutateur et son libellé de prendre toute la largeur disponible
|
|
101
|
+
</td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr>
|
|
104
|
+
<td>text-align</td>
|
|
105
|
+
<td>"start" ou "end"</td>
|
|
106
|
+
<td>"start"</td>
|
|
107
|
+
<td>Alignement du texte du libellé</td>
|
|
108
|
+
</tr>
|
|
109
|
+
</tbody>
|
|
110
|
+
</table>
|
|
111
|
+
|
|
112
|
+
<h5>Attributs de <code>qc-toggle-switch-group</code></h5>
|
|
113
|
+
<table class="qc-table qc-striped component-attributes-description">
|
|
114
|
+
<thead>
|
|
115
|
+
<tr>
|
|
116
|
+
<th>Nom</th>
|
|
117
|
+
<th>Valeur attendue</th>
|
|
118
|
+
<th>Valeur par défaut</th>
|
|
119
|
+
<th>Description</th>
|
|
120
|
+
</tr>
|
|
121
|
+
</thead>
|
|
122
|
+
<tbody>
|
|
123
|
+
<tr>
|
|
124
|
+
<td>legend</td>
|
|
125
|
+
<td>Contenu HTML</td>
|
|
126
|
+
<td></td>
|
|
127
|
+
<td>Contenu de la légende du groupe de commutateurs</td>
|
|
128
|
+
</tr>
|
|
129
|
+
<tr>
|
|
130
|
+
<td>disabled</td>
|
|
131
|
+
<td>na</td>
|
|
132
|
+
<td>na</td>
|
|
133
|
+
<td>Désactive le groupe de commutateurs</td>
|
|
134
|
+
</tr>
|
|
135
|
+
<tr>
|
|
136
|
+
<td>justified</td>
|
|
137
|
+
<td>na</td>
|
|
138
|
+
<td>na</td>
|
|
139
|
+
<td>
|
|
140
|
+
Permet au commutateur et son libellé de prendre toute la largeur disponible.
|
|
141
|
+
<br> N.B. : Cette valeur a priorité sur celle des commutateurs du groupe.
|
|
142
|
+
</td>
|
|
143
|
+
</tr>
|
|
144
|
+
<tr>
|
|
145
|
+
<td>text-align</td>
|
|
146
|
+
<td>"start" ou "end"</td>
|
|
147
|
+
<td>"start"</td>
|
|
148
|
+
<td>
|
|
149
|
+
Alignement du texte des libellés des commutateurs.
|
|
150
|
+
<br> N.B. : Cette valeur a priorité sur celle des commutateurs du groupe.
|
|
151
|
+
</td>
|
|
152
|
+
</tr>
|
|
153
|
+
<tr>
|
|
154
|
+
<td>max-width</td>
|
|
155
|
+
<td>Toute valeur acceptée par la directive css <code>max-width</code></td>
|
|
156
|
+
<td>"fit-content"</td>
|
|
157
|
+
<td>Largeur maximale des commutateurs dans le groupe</td>
|
|
158
|
+
</tr>
|
|
159
|
+
</tbody>
|
|
160
|
+
</table>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@use "../../scss/qc-sdg-lib" as *;
|
|
2
|
+
@use "sass:math";
|
|
3
|
+
|
|
4
|
+
$width: 56;
|
|
5
|
+
$height: 32;
|
|
6
|
+
$border: 1;
|
|
7
|
+
|
|
8
|
+
.qc-switch {
|
|
9
|
+
display: flex;
|
|
10
|
+
width: fit-content;
|
|
11
|
+
margin: 0;
|
|
12
|
+
gap: token-value(spacer, sm);
|
|
13
|
+
position: relative;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
|
|
16
|
+
&:has(input:disabled) {
|
|
17
|
+
color: token-value(color, grey, regular);
|
|
18
|
+
cursor: not-allowed;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
input[type=checkbox] {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
width: 0;
|
|
24
|
+
height: 0;
|
|
25
|
+
|
|
26
|
+
position: absolute;
|
|
27
|
+
|
|
28
|
+
&:checked ~ .qc-switch-slider {
|
|
29
|
+
background-color: token-value(color, blue, regular);
|
|
30
|
+
border-color: transparent;
|
|
31
|
+
|
|
32
|
+
&::before {
|
|
33
|
+
transform: translateX(rem($width - $height));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:focus ~ .qc-switch-slider {
|
|
38
|
+
outline: rem(2) solid token-value(color, blue, light);
|
|
39
|
+
outline-offset: rem(2);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:disabled ~ .qc-switch-slider {
|
|
43
|
+
border-color: transparent;
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
|
|
46
|
+
&::before {
|
|
47
|
+
border: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.qc-switch-label {
|
|
54
|
+
display: flex;
|
|
55
|
+
margin-top: rem(3);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.qc-switch-label-end {
|
|
59
|
+
justify-content: end;
|
|
60
|
+
text-align: right;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.qc-switch-slider {
|
|
64
|
+
display: inline-flex;
|
|
65
|
+
position: relative;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
min-width: rem($width);
|
|
68
|
+
min-height: rem($height);
|
|
69
|
+
max-width: rem($width);
|
|
70
|
+
max-height: rem($height);
|
|
71
|
+
top: 0;
|
|
72
|
+
left: 0;
|
|
73
|
+
right: 0;
|
|
74
|
+
bottom: 0;
|
|
75
|
+
background-color: token-value(color, grey, light);
|
|
76
|
+
transition: background-color .3s ease-out;
|
|
77
|
+
border-radius: rem(math.div($height, 2));
|
|
78
|
+
border: rem($border) solid token-value(color, grey, medium);
|
|
79
|
+
|
|
80
|
+
&::before {
|
|
81
|
+
position: absolute;
|
|
82
|
+
content: "";
|
|
83
|
+
height: rem($height - 4 * $border);
|
|
84
|
+
width: rem($height - 4 * $border);
|
|
85
|
+
left: rem($border);
|
|
86
|
+
bottom: rem($border);
|
|
87
|
+
background-color: token-value(color, white);
|
|
88
|
+
border: rem($border) solid token-value(color, grey, dark);
|
|
89
|
+
border-radius: 50%;
|
|
90
|
+
transition: all .3s ease-out;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.qc-switch-justified {
|
|
95
|
+
justify-content: space-between;
|
|
96
|
+
width: 100%;
|
|
97
|
+
}
|
|
@@ -53,6 +53,86 @@ export class Utils {
|
|
|
53
53
|
return false;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* extract and clean prefixed attributes
|
|
58
|
+
* example:
|
|
59
|
+
* computeFieldsAttributes("radio" , {"radio-class":"my-radio", "radio-data-foo":"foo", "other":"other value"})
|
|
60
|
+
* return {"class":"my-radio", "data-foo":"foo"}
|
|
61
|
+
*
|
|
62
|
+
</div>
|
|
63
|
+
* @param {(string|string[])} prefix - Une chaîne de caractères ou un tableau de chaînes.
|
|
64
|
+
* @param restProps - ojbect of attributes
|
|
65
|
+
* @returns {*} - object of attributes
|
|
66
|
+
*/
|
|
67
|
+
static computeFieldsAttributes(prefix , restProps) {
|
|
68
|
+
let output = {},
|
|
69
|
+
_prefix = prefix + '-'
|
|
70
|
+
Object
|
|
71
|
+
.entries(restProps)
|
|
72
|
+
.forEach(([prop,value]) => {
|
|
73
|
+
if (prop.startsWith(_prefix)) {
|
|
74
|
+
const prefixProp = prop.replace(new RegExp('^' + _prefix), '')
|
|
75
|
+
output[prefixProp] = value;
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
return output;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Checks if the current node or one of its children is currently in focus
|
|
84
|
+
* @param node The element's node to check
|
|
85
|
+
* @returns {boolean} If the current node or one of its children is currently in focus
|
|
86
|
+
*/
|
|
87
|
+
static componentIsActive(node) {
|
|
88
|
+
if (!node) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const root = node.getRootNode();
|
|
93
|
+
return node.contains(root.activeElement);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Waits for a specified amount of time
|
|
98
|
+
* @param ms The amount of time to wait
|
|
99
|
+
* @returns {Promise<unknown>} The resolution of the sleep action
|
|
100
|
+
*/
|
|
101
|
+
static sleep(ms) {
|
|
102
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
static generateId(prefix = '') {
|
|
106
|
+
return prefix + "-" + (Math.floor(Math.random() * 90000) + 10000);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Returns the word in lowercase and with accented letters replaced by their non-accented counterparts
|
|
112
|
+
* @param str
|
|
113
|
+
* @returns {string}
|
|
114
|
+
*/
|
|
115
|
+
static cleanupSearchPrompt(str) {
|
|
116
|
+
let word = String(str)
|
|
117
|
+
|
|
118
|
+
const replaceAccents = (str, search, replace) => {
|
|
119
|
+
return str.replaceAll(new RegExp(search, 'gi'), replace);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Supprime les accents.
|
|
123
|
+
word = replaceAccents(word, /[éèêë]/gi, 'e');
|
|
124
|
+
word = replaceAccents(word, /[àäâ]/gi, 'a');
|
|
125
|
+
word = replaceAccents(word, /[ùûü]/gi, 'u');
|
|
126
|
+
word = replaceAccents(word, /[ïî]/gi, 'i');
|
|
127
|
+
word = replaceAccents(word, /[ôö]/gi, 'i');
|
|
128
|
+
word = replaceAccents(word, /[œ]/gi, 'oe');
|
|
129
|
+
word = replaceAccents(word, /[æ]/gi, 'ae');
|
|
56
130
|
|
|
131
|
+
// Remplace les caractères spéciaux par des espaces.
|
|
132
|
+
word = word.replaceAll(/[-_—–]/gi, ' ');
|
|
133
|
+
word = word.replaceAll(/’/gi, "'");
|
|
57
134
|
|
|
58
|
-
|
|
135
|
+
// Convertit le mot en minuscules.
|
|
136
|
+
return word.toLowerCase();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './bases/Icon/Test/IconEmbeddedTest.svelte';
|
|
2
|
+
export * from './components/TextField/Test/TextFieldEmbededTest.svelte';
|
|
3
|
+
export * from "./components/DropdownList/Test/DropdownListEmbeddedTest.svelte";
|
|
4
|
+
export * from "./components/ChoiceGroup/Test/ChoiceGroupeEmbededTest.svelte";
|
|
5
|
+
export * from "./components/ToggleSwitch/Test/ToggleSwitchEmbeddedTest.svelte";
|
|
6
|
+
export * from "./components/PivHeader/Test/pivHeaderEmbeddedTest.svelte";
|
|
@@ -49,9 +49,17 @@ $rem-ratio: math.div(1, .16 * $percent-root-font-size);
|
|
|
49
49
|
@return string.unquote(deep-implode(map.get($google-fonts, $font), ','));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
@function getImageUrl($nom, $images: $images) {
|
|
52
|
+
@function getImageUrl($nom, $images: $images, $base64: true) {
|
|
53
53
|
$image: map.get($images, $nom);
|
|
54
|
-
|
|
54
|
+
$prefix: '';
|
|
55
|
+
@if $base64 {
|
|
56
|
+
$prefix: 'data:image/svg+xml;base64,';
|
|
57
|
+
@return url('#{$prefix}#{$image}');
|
|
58
|
+
}
|
|
59
|
+
@else {
|
|
60
|
+
@return url('#{$image}');
|
|
61
|
+
}
|
|
62
|
+
|
|
55
63
|
}
|
|
56
64
|
|
|
57
65
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@use "settings/base" as *;
|
|
6
6
|
|
|
7
7
|
@use "functions" as *;
|
|
8
|
-
@use "
|
|
8
|
+
@use "../../bases/grid/grid-lib" as grid;
|
|
9
9
|
|
|
10
10
|
// toujours utiliser ces mixins pour la déclarations des tailles de police:
|
|
11
11
|
// cela garantit que la taille police est conforme aux exigences du SDG
|
|
@@ -51,30 +51,6 @@
|
|
|
51
51
|
outline-offset: 1px;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
@mixin external-link-img() {
|
|
55
|
-
$ratio : math.div(11,16) * 1em;
|
|
56
|
-
height: $ratio;
|
|
57
|
-
width: $ratio;
|
|
58
|
-
display: inline-block;
|
|
59
|
-
mask: getImageUrl(external-link) no-repeat;
|
|
60
|
-
background: token-value(color link text);
|
|
61
|
-
mask-size: $ratio;
|
|
62
|
-
margin-left: 4px;
|
|
63
|
-
a:visited & {
|
|
64
|
-
background: token-value(color link visited);
|
|
65
|
-
}
|
|
66
|
-
a:focus & {
|
|
67
|
-
background: token-value(color link hover);
|
|
68
|
-
}
|
|
69
|
-
a:hover & {
|
|
70
|
-
background: token-value(color link hover);
|
|
71
|
-
}
|
|
72
|
-
a:active & {
|
|
73
|
-
background: token-value(color link active);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
54
|
@mixin sr-only() {
|
|
79
55
|
position: absolute;
|
|
80
56
|
width: 1px;
|
|
@@ -131,7 +107,10 @@
|
|
|
131
107
|
inset: 0;
|
|
132
108
|
z-index: -5
|
|
133
109
|
}
|
|
134
|
-
&:has(input:focus),
|
|
110
|
+
&:has(input:focus),
|
|
111
|
+
&:focus,
|
|
112
|
+
&:has(textarea:focus),
|
|
113
|
+
{
|
|
135
114
|
outline: 2px solid token-value(color formfield focus outline);
|
|
136
115
|
&::before {
|
|
137
116
|
border: 2px solid token-value(color formfield focus border);
|
|
@@ -218,3 +197,61 @@
|
|
|
218
197
|
}
|
|
219
198
|
}
|
|
220
199
|
|
|
200
|
+
%check-row {
|
|
201
|
+
display: flex;
|
|
202
|
+
max-width: fit-content;
|
|
203
|
+
align-items: start;
|
|
204
|
+
margin: 0;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
font-weight: normal;
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
&:has(input:disabled) {
|
|
210
|
+
color: token-value(color, grey, regular);
|
|
211
|
+
cursor: not-allowed;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
input.qc-choicefield {
|
|
215
|
+
display: flex;
|
|
216
|
+
position: relative;
|
|
217
|
+
appearance: none;
|
|
218
|
+
margin: 0 token-value(spacer, xs) 0 0;
|
|
219
|
+
background-color: token-value(color, white);
|
|
220
|
+
border-style: solid;
|
|
221
|
+
border-color: token-value(color, blue, dark);
|
|
222
|
+
|
|
223
|
+
&:not(:disabled):hover {
|
|
224
|
+
cursor: pointer;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&::before {
|
|
228
|
+
content: "";
|
|
229
|
+
position: absolute;
|
|
230
|
+
margin: auto;
|
|
231
|
+
inset: 0;
|
|
232
|
+
overflow: hidden;
|
|
233
|
+
opacity: 0;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&:checked {
|
|
237
|
+
border-color: token-value(color blue regular);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&:disabled {
|
|
241
|
+
cursor: not-allowed;
|
|
242
|
+
border-color: token-value(color, grey, light);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&.qc-compact {
|
|
246
|
+
min-width: token-value(spacer, sm);
|
|
247
|
+
min-height: token-value(spacer, sm);
|
|
248
|
+
max-width: token-value(spacer, sm);
|
|
249
|
+
max-height: token-value(spacer, sm);
|
|
250
|
+
|
|
251
|
+
border-width: 1px;
|
|
252
|
+
margin-top: rem(4);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
|
package/src/sdg/scss/qc-sdg.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@use "qc-sgd-no-grid";
|
|
2
|
-
@use "grid/grid";
|
|
2
|
+
@use "../bases/grid/grid";
|