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,89 @@
|
|
|
1
|
+
<svelte:options customElement={{
|
|
2
|
+
tag: 'qc-select-embedded-test'
|
|
3
|
+
}} />
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import DropdownList from "../DropdownList.svelte";
|
|
7
|
+
import {Utils} from "../../utils";
|
|
8
|
+
import * as dropdownListTest from "./dropdownListTestUtils";
|
|
9
|
+
import Button from "../../Button/Button.svelte";
|
|
10
|
+
|
|
11
|
+
let singleChoiceOptions = $state(dropdownListTest.genericOptions());
|
|
12
|
+
let singleChoiceWithSearchOptions = $state(dropdownListTest.genericOptions());
|
|
13
|
+
let multipleChoiceOptions = $state(dropdownListTest.genericOptions());
|
|
14
|
+
let invalidOptions = $state(dropdownListTest.genericOptions());
|
|
15
|
+
let restaurants = $state(dropdownListTest.restaurantsArray());
|
|
16
|
+
let regions = $state(dropdownListTest.regionsArray());
|
|
17
|
+
|
|
18
|
+
singleChoiceOptions[0].checked = true;
|
|
19
|
+
singleChoiceWithSearchOptions[0].checked = true;
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<DropdownList
|
|
23
|
+
id="dropdown-list-single-choice"
|
|
24
|
+
label="Choix unique"
|
|
25
|
+
items={singleChoiceOptions}
|
|
26
|
+
/>
|
|
27
|
+
|
|
28
|
+
<div style="height: 40rem;">
|
|
29
|
+
<DropdownList
|
|
30
|
+
id="dropdown-list-single-choice-no-scroll"
|
|
31
|
+
label="Choix unique avec recherche"
|
|
32
|
+
enableSearch={true}
|
|
33
|
+
items={singleChoiceWithSearchOptions}
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<DropdownList
|
|
38
|
+
id="dropdown-list-multiple-choices"
|
|
39
|
+
label="Choix multiples"
|
|
40
|
+
multiple
|
|
41
|
+
items={multipleChoiceOptions}
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<div class="qc-formfield-row">
|
|
45
|
+
<DropdownList
|
|
46
|
+
id="dropdown-list-invalid"
|
|
47
|
+
label="État invalide"
|
|
48
|
+
invalid="true"
|
|
49
|
+
items={invalidOptions}
|
|
50
|
+
/>
|
|
51
|
+
<DropdownList
|
|
52
|
+
id="dropdown-list-single-choice-other"
|
|
53
|
+
label="Autre choix"
|
|
54
|
+
items={singleChoiceOptions}
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<DropdownList
|
|
59
|
+
id="dropdown-list-disabled"
|
|
60
|
+
label="Désactivé"
|
|
61
|
+
disabled="true"
|
|
62
|
+
items={JSON.parse(JSON.stringify(multipleChoiceOptions))}
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
<form id="dropdown-list-embedded-test-form">
|
|
66
|
+
<DropdownList
|
|
67
|
+
label="Types de restaurants"
|
|
68
|
+
required="true"
|
|
69
|
+
placeholder="Types de restaurants"
|
|
70
|
+
enableSearch={true}
|
|
71
|
+
searchPlaceholder="Rechercher un restaurant"
|
|
72
|
+
items={restaurants}
|
|
73
|
+
invalidText="Veuillez choisir un type de restaurant."
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<DropdownList
|
|
77
|
+
label="Régions desservies"
|
|
78
|
+
multiple="true"
|
|
79
|
+
placeholder="Sélectionner une région"
|
|
80
|
+
enableSearch={true}
|
|
81
|
+
searchPlaceholder="Rechercher les régions"
|
|
82
|
+
items={regions}
|
|
83
|
+
width="lg"
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
<Button label="Envoyer" type="submit" compact="true" />
|
|
87
|
+
</form>
|
|
88
|
+
|
|
89
|
+
<link rel='stylesheet' href='{Utils.cssPath}'>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<qc-select-embedded-test></qc-select-embedded-test>
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
<qc-select id="qc-select-single-choice">
|
|
2
|
+
<label for="select-single-choice">Choix unique</label>
|
|
3
|
+
<select id="select-single-choice">
|
|
4
|
+
<option value="1" selected>Option 1</option>
|
|
5
|
+
<option value="2">Option 2</option>
|
|
6
|
+
<option value="3">Option 3</option>
|
|
7
|
+
<option value="4">Option 4</option>
|
|
8
|
+
<option value="5">Option 5</option>
|
|
9
|
+
<option value="6">Option 6</option>
|
|
10
|
+
<option value="7">Option 7</option>
|
|
11
|
+
<option value="8">Option 8</option>
|
|
12
|
+
<option value="9">Option 9</option>
|
|
13
|
+
<option value="10">Option 10</option>
|
|
14
|
+
<option value="11">Option 11</option>
|
|
15
|
+
<option value="12">Option 12</option>
|
|
16
|
+
<option value="13">Option 13</option>
|
|
17
|
+
<option value="14">Option 14</option>
|
|
18
|
+
<option value="15">Option 15</option>
|
|
19
|
+
<option value="16" disabled>Option 16 (désactivée)</option>
|
|
20
|
+
</select>
|
|
21
|
+
</qc-select>
|
|
22
|
+
|
|
23
|
+
<div style="height: 40rem;">
|
|
24
|
+
<qc-select id="qc-select-single-choice-search" enable-search>
|
|
25
|
+
<label for="select-single-choice-search">Choix unique avec recherche</label>
|
|
26
|
+
<select id="select-single-choice-search">
|
|
27
|
+
<option value="1" selected>Option 1</option>
|
|
28
|
+
<option value="2">Option 2</option>
|
|
29
|
+
<option value="3">Option 3</option>
|
|
30
|
+
<option value="4">Option 4</option>
|
|
31
|
+
<option value="5">Option 5</option>
|
|
32
|
+
<option value="6">Option 6</option>
|
|
33
|
+
<option value="7">Option 7</option>
|
|
34
|
+
<option value="8">Option 8</option>
|
|
35
|
+
<option value="9">Option 9</option>
|
|
36
|
+
<option value="10">Option 10</option>
|
|
37
|
+
<option value="11">Option 11</option>
|
|
38
|
+
<option value="12">Option 12</option>
|
|
39
|
+
<option value="13">Option 13</option>
|
|
40
|
+
<option value="14">Option 14</option>
|
|
41
|
+
<option value="15">Option 15</option>
|
|
42
|
+
<option value="16" >Option 16</option>
|
|
43
|
+
</select>
|
|
44
|
+
</qc-select>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<qc-select id="qc-select-multiple-choices">
|
|
48
|
+
<label for="select-multiple-choices">Choix multiples</label>
|
|
49
|
+
<select multiple id="select-multiple-choices">
|
|
50
|
+
<option value="1">Option 1</option>
|
|
51
|
+
<option value="2">Option 2</option>
|
|
52
|
+
<option value="3">Option 3</option>
|
|
53
|
+
<option value="4">Option 4</option>
|
|
54
|
+
<option value="5">Option 5</option>
|
|
55
|
+
<option value="6">Option 6</option>
|
|
56
|
+
<option value="7">Option 7</option>
|
|
57
|
+
<option value="8">Option 8</option>
|
|
58
|
+
<option value="9">Option 9</option>
|
|
59
|
+
<option value="10">Option 10</option>
|
|
60
|
+
<option value="11">Option 11</option>
|
|
61
|
+
<option value="12">Option 12</option>
|
|
62
|
+
<option value="13">Option 13</option>
|
|
63
|
+
<option value="14">Option 14</option>
|
|
64
|
+
<option value="15">Option 15</option>
|
|
65
|
+
<option value="16" disabled>Option 16 (désactivée)</option>
|
|
66
|
+
</select>
|
|
67
|
+
</qc-select>
|
|
68
|
+
|
|
69
|
+
<div class="qc-formfield-row">
|
|
70
|
+
<qc-select id="qc-select-invalid" invalid>
|
|
71
|
+
<label for="select-invalid">État invalide</label>
|
|
72
|
+
<select multiple id="select-invalid">
|
|
73
|
+
<option value="1">Option 1</option>
|
|
74
|
+
<option value="2">Option 2</option>
|
|
75
|
+
<option value="3">Option 3</option>
|
|
76
|
+
<option value="4">Option 4</option>
|
|
77
|
+
<option value="5">Option 5</option>
|
|
78
|
+
<option value="6">Option 6</option>
|
|
79
|
+
<option value="7">Option 7</option>
|
|
80
|
+
<option value="8">Option 8</option>
|
|
81
|
+
<option value="9">Option 9</option>
|
|
82
|
+
<option value="10">Option 10</option>
|
|
83
|
+
<option value="11">Option 11</option>
|
|
84
|
+
<option value="12">Option 12</option>
|
|
85
|
+
<option value="13">Option 13</option>
|
|
86
|
+
<option value="14">Option 14</option>
|
|
87
|
+
<option value="15">Option 15</option>
|
|
88
|
+
<option value="16">Option 16</option>
|
|
89
|
+
</select>
|
|
90
|
+
</qc-select>
|
|
91
|
+
|
|
92
|
+
<qc-select id="qc-select-single-choice-other">
|
|
93
|
+
<label for="select-single-choice-other">Autre choix</label>
|
|
94
|
+
<select id="select-single-choice-other">
|
|
95
|
+
<option value="1" selected>Option 1</option>
|
|
96
|
+
<option value="2">Option 2</option>
|
|
97
|
+
<option value="3">Option 3</option>
|
|
98
|
+
<option value="4">Option 4</option>
|
|
99
|
+
<option value="5">Option 5</option>
|
|
100
|
+
<option value="6">Option 6</option>
|
|
101
|
+
<option value="7">Option 7</option>
|
|
102
|
+
<option value="8">Option 8</option>
|
|
103
|
+
<option value="9">Option 9</option>
|
|
104
|
+
<option value="10">Option 10</option>
|
|
105
|
+
<option value="11">Option 11</option>
|
|
106
|
+
<option value="12">Option 12</option>
|
|
107
|
+
<option value="13">Option 13</option>
|
|
108
|
+
<option value="14">Option 14</option>
|
|
109
|
+
<option value="15">Option 15</option>
|
|
110
|
+
<option value="16" disabled>Option 16 (désactivée)</option>
|
|
111
|
+
</select>
|
|
112
|
+
</qc-select>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<qc-select id="qc-select-disabled">
|
|
116
|
+
<label for="select-disabled">Désactivé</label>
|
|
117
|
+
<select id="select-disabled" disabled>disabled</select>
|
|
118
|
+
</qc-select>
|
|
119
|
+
|
|
120
|
+
<form id="dropdown-list-form">
|
|
121
|
+
<qc-select
|
|
122
|
+
id="dropdown-list-restaurants"
|
|
123
|
+
placeholder="Types de restaurants"
|
|
124
|
+
enable-search
|
|
125
|
+
search-placeholder="Rechercher un type restaurant"
|
|
126
|
+
required
|
|
127
|
+
invalid-text="Veuillez choisir un type de restaurant."
|
|
128
|
+
>
|
|
129
|
+
<label for="dropdown-list-restaurants-select">Types de restaurants</label>
|
|
130
|
+
<select id="dropdown-list-restaurants-select">
|
|
131
|
+
<option value="">Types de restaurants</option>
|
|
132
|
+
<option value="Pizzeria">Pizzeria</option>
|
|
133
|
+
<option value="Pâtisserie">Pâtisserie</option>
|
|
134
|
+
<option value="Steakhouse">Steakhouse</option>
|
|
135
|
+
<option value="Bar">Bar</option>
|
|
136
|
+
<option value="Casse-croûte">Casse-croûte</option>
|
|
137
|
+
<option value="Boîte à pâtes">Boîte à pâtes</option>
|
|
138
|
+
<option value="Restaurant à burgers">Restaurant à burgers</option>
|
|
139
|
+
</select>
|
|
140
|
+
</qc-select>
|
|
141
|
+
|
|
142
|
+
<qc-select
|
|
143
|
+
id="dropdown-list-regions"
|
|
144
|
+
placeholder="Sélectionner une région"
|
|
145
|
+
width="lg"
|
|
146
|
+
enable-search
|
|
147
|
+
search-placeholder="Rechercher les régions"
|
|
148
|
+
>
|
|
149
|
+
<label for="dropdown-list-regions-select">Régions desservies</label>
|
|
150
|
+
<select id="dropdown-list-regions-select" multiple>
|
|
151
|
+
<option value="Capitale-nationale">Capitale-nationale</option>
|
|
152
|
+
<option value="Centre-du-Québec" selected>Centre-du-Québec</option>
|
|
153
|
+
<option value="Montérégie" selected>Montérégie</option>
|
|
154
|
+
<option value="Outaouais">Outaouais</option>
|
|
155
|
+
<option value="Saguenay-Lac-Saint-Jean">Saguenay-Lac-Saint-Jean</option>
|
|
156
|
+
<option value="Gaspésie-Îles-de-la-Madeleine">Gaspésie-Îles-de-la-Madeleine</option>
|
|
157
|
+
<option value="Nord-du-Québec">Nord-du-Québec</option>
|
|
158
|
+
<option value="Bas-Saint-Laurent">Bas-Saint-Laurent</option>
|
|
159
|
+
</select>
|
|
160
|
+
</qc-select>
|
|
161
|
+
|
|
162
|
+
<button id="qc-select-form-test-submit" type="submit" class="qc-button qc-primary qc-compact">Envoyer</button>
|
|
163
|
+
</form>
|
|
164
|
+
|
|
165
|
+
<script>
|
|
166
|
+
const dropdownListForm = document.getElementById("dropdown-list-form");
|
|
167
|
+
|
|
168
|
+
dropdownListForm.addEventListener("submit", (event) => {
|
|
169
|
+
event.preventDefault();
|
|
170
|
+
|
|
171
|
+
let isValid = true;
|
|
172
|
+
const requiredFields = dropdownListForm.querySelectorAll("qc-select[required]");
|
|
173
|
+
|
|
174
|
+
requiredFields.forEach(field => {
|
|
175
|
+
const value = field.value;
|
|
176
|
+
|
|
177
|
+
if (!value || value.length <= 0) {
|
|
178
|
+
field.invalid = true;
|
|
179
|
+
isValid = false;
|
|
180
|
+
} else {
|
|
181
|
+
field.invalid = false;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
if (isValid) {
|
|
186
|
+
const formEntries = dropdownListForm.querySelectorAll("qc-select");
|
|
187
|
+
let alertParts = ["Formulaire soumis avec les données suivantes :"];
|
|
188
|
+
formEntries.forEach((field) => {
|
|
189
|
+
alertParts.push(`${field.label}: ${field.value.join(", ")}`);
|
|
190
|
+
});
|
|
191
|
+
alert(alertParts.join("\n"));
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
</script>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
export function genericOptions() {
|
|
2
|
+
let genericOptions = [];
|
|
3
|
+
for (let i = 1; i <= 16; i++) {
|
|
4
|
+
genericOptions.push({
|
|
5
|
+
value: i,
|
|
6
|
+
label: `Option ${i}`,
|
|
7
|
+
disabled: false,
|
|
8
|
+
checked: false,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return genericOptions;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function restaurantsArray() {
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
label: "Pizzeria",
|
|
19
|
+
value: "Pizzeria",
|
|
20
|
+
checked: false,
|
|
21
|
+
disabled: false,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: "Pâtisserie",
|
|
25
|
+
value: "Pâtisserie",
|
|
26
|
+
checked: false,
|
|
27
|
+
disabled: false,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: "Steakhouse",
|
|
31
|
+
value: "Steakhouse",
|
|
32
|
+
checked: false,
|
|
33
|
+
disabled: false,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: "Bar",
|
|
37
|
+
value: "Bar",
|
|
38
|
+
checked: false,
|
|
39
|
+
disabled: false,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: "Casse-croûte",
|
|
43
|
+
value: "Casse-croûte",
|
|
44
|
+
checked: false,
|
|
45
|
+
disabled: false,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: "Boîte à pâtes",
|
|
49
|
+
value: "Boîte à pâtes",
|
|
50
|
+
checked: false,
|
|
51
|
+
disabled: false,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: "Restaurant à burgers",
|
|
55
|
+
value: "Restaurant à burgers",
|
|
56
|
+
checked: false,
|
|
57
|
+
disabled: false,
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function regionsArray() {
|
|
63
|
+
return [
|
|
64
|
+
{
|
|
65
|
+
label: "Capitale-nationale",
|
|
66
|
+
value: "Capitale-nationale",
|
|
67
|
+
checked: false,
|
|
68
|
+
disabled: false,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
label: "Centre-du-Québec",
|
|
72
|
+
value: "Centre-du-Québec",
|
|
73
|
+
checked: true,
|
|
74
|
+
disabled: false,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: "Montérégie",
|
|
78
|
+
value: "Montérégie",
|
|
79
|
+
checked: true,
|
|
80
|
+
disabled: false,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: "Outaouais",
|
|
84
|
+
value: "Outaouais",
|
|
85
|
+
checked: false,
|
|
86
|
+
disabled: false,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: "Saguenay-Lac-Saint-Jean",
|
|
90
|
+
value: "Saguenay-Lac-Saint-Jean",
|
|
91
|
+
checked: false,
|
|
92
|
+
disabled: false,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: "Gaspésie-Îles-de-la-Madeleine",
|
|
96
|
+
value: "Gaspésie-Îles-de-la-Madeleine",
|
|
97
|
+
checked: false,
|
|
98
|
+
disabled: false,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: "Nord-du-Québec",
|
|
102
|
+
value: "Nord-du-Québec",
|
|
103
|
+
checked: false,
|
|
104
|
+
disabled: false,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: "Bas-Saint-Laurent",
|
|
108
|
+
value: "Bas-Saint-Laurent",
|
|
109
|
+
checked: false,
|
|
110
|
+
disabled: false,
|
|
111
|
+
}
|
|
112
|
+
];
|
|
113
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@use "../../scss/qc-sdg-lib" as *;
|
|
2
|
+
@use "DropdownListItems/dropdownListItems";
|
|
3
|
+
@use "DropdownListButton/dropdownListButton";
|
|
4
|
+
@use "sass:math";
|
|
5
|
+
|
|
6
|
+
$min-height: 40;
|
|
7
|
+
$border: 1;
|
|
8
|
+
|
|
9
|
+
.qc-dropdown-list-margin {
|
|
10
|
+
margin-bottom: rem(32);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.qc-dropdown-list-root {
|
|
14
|
+
width: 100%;
|
|
15
|
+
|
|
16
|
+
&-xs { max-width: token-value(size, max-width, xs); }
|
|
17
|
+
&-sm { max-width: token-value(size, max-width, sm); }
|
|
18
|
+
&-md { max-width: token-value(size, max-width, md); }
|
|
19
|
+
&-lg { max-width: token-value(size, max-width, lg); }
|
|
20
|
+
&-xl { max-width: token-value(size, max-width, xl); }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.qc-dropdown-list-container {
|
|
24
|
+
width: 100%;
|
|
25
|
+
|
|
26
|
+
.qc-label {
|
|
27
|
+
margin-bottom: rem(4);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-xs { max-width: token-value(size, max-width, xs); }
|
|
31
|
+
&-sm { max-width: token-value(size, max-width, sm); }
|
|
32
|
+
&-md { max-width: token-value(size, max-width, md); }
|
|
33
|
+
&-lg { max-width: token-value(size, max-width, lg); }
|
|
34
|
+
&-xl { max-width: token-value(size, max-width, xl); }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.qc-dropdown-list {
|
|
38
|
+
display: flex;
|
|
39
|
+
position: relative;
|
|
40
|
+
border: rem($border) solid token-value(color, grey, medium);
|
|
41
|
+
min-height: rem($min-height);
|
|
42
|
+
background-color: token-value(color, background);
|
|
43
|
+
|
|
44
|
+
&.qc-dropdown-list-invalid {
|
|
45
|
+
border: rem(2) solid token-value(color, red, regular) !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.qc-dropdown-list-search {
|
|
50
|
+
margin: token-value(spacer, xs);
|
|
51
|
+
|
|
52
|
+
* {
|
|
53
|
+
z-index: 12;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.qc-dropdown-list-expanded {
|
|
58
|
+
position: absolute;
|
|
59
|
+
width: calc(100% + 2px);
|
|
60
|
+
left: -(rem($border));
|
|
61
|
+
right: -(rem($border));
|
|
62
|
+
top: 100%;
|
|
63
|
+
z-index: 11; // Index supérieur à l'index du mixin qc-formcontrol-box
|
|
64
|
+
|
|
65
|
+
background-color: token-value(color, background);
|
|
66
|
+
border-left: rem($border) solid token-value(color, grey, medium);
|
|
67
|
+
border-right: rem($border) solid token-value(color, grey, medium);
|
|
68
|
+
border-bottom: rem($border) solid token-value(color, grey, medium);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.qc-dropdown-list-hidden {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
<h3 id="select">Liste déroulante</h3>
|
|
2
|
+
|
|
3
|
+
<h4>Exemples</h4>
|
|
4
|
+
|
|
5
|
+
<qc-doc-exemple caption="Exemple de listes déroulantes en sélection dans différents états">
|
|
6
|
+
<qc-select id="qc-select-single-choice">
|
|
7
|
+
<label for="select-single-choice">Choix unique</label>
|
|
8
|
+
<select id="select-single-choice">
|
|
9
|
+
<option value="" selected>Faire une sélection</option>
|
|
10
|
+
<option value="1">Option 1</option>
|
|
11
|
+
<option value="2">Option 2</option>
|
|
12
|
+
<option value="3">Option 3</option>
|
|
13
|
+
<option value="4">Option 4</option>
|
|
14
|
+
<option value="5">Option 5</option>
|
|
15
|
+
<option value="6">Option 6</option>
|
|
16
|
+
<option value="7">Option 7</option>
|
|
17
|
+
<option value="8">Option 8</option>
|
|
18
|
+
<option value="9">Option 9</option>
|
|
19
|
+
<option value="10">Option 10</option>
|
|
20
|
+
<option value="11">Option 11</option>
|
|
21
|
+
<option value="12">Option 12</option>
|
|
22
|
+
<option value="13">Option 13</option>
|
|
23
|
+
<option value="14">Option 14</option>
|
|
24
|
+
<option value="15">Option 15</option>
|
|
25
|
+
<option value="16" disabled>Option 16 (désactivée)</option>
|
|
26
|
+
</select>
|
|
27
|
+
</qc-select>
|
|
28
|
+
|
|
29
|
+
<qc-select id="qc-select-single-choice-search" enable-search>
|
|
30
|
+
<label for="select-single-choice-search">Choix unique avec recherche</label>
|
|
31
|
+
<select id="select-single-choice-search">
|
|
32
|
+
<option value="" selected>Faire une sélection</option>
|
|
33
|
+
<option value="1">Option 1</option>
|
|
34
|
+
<option value="2">Option 2</option>
|
|
35
|
+
<option value="3">Option 3</option>
|
|
36
|
+
<option value="4">Option 4</option>
|
|
37
|
+
<option value="5">Option 5</option>
|
|
38
|
+
<option value="6">Option 6</option>
|
|
39
|
+
<option value="7">Option 7</option>
|
|
40
|
+
<option value="8">Option 8</option>
|
|
41
|
+
<option value="9">Option 9</option>
|
|
42
|
+
<option value="10">Option 10</option>
|
|
43
|
+
<option value="11">Option 11</option>
|
|
44
|
+
<option value="12">Option 12</option>
|
|
45
|
+
<option value="13">Option 13</option>
|
|
46
|
+
<option value="14">Option 14</option>
|
|
47
|
+
<option value="15">Option 15</option>
|
|
48
|
+
<option value="16">Option 16</option>
|
|
49
|
+
</select>
|
|
50
|
+
</qc-select>
|
|
51
|
+
|
|
52
|
+
<qc-select id="qc-select-multiple-choices">
|
|
53
|
+
<label for="select-multiple-choices">Choix multiples</label>
|
|
54
|
+
<select multiple id="select-multiple-choices">
|
|
55
|
+
<option value="1">Option 1</option>
|
|
56
|
+
<option value="2" selected>Option 2</option>
|
|
57
|
+
<option value="3" selected>Option 3</option>
|
|
58
|
+
<option value="4" disabled>Option 4 (désactivée)</option>
|
|
59
|
+
</select>
|
|
60
|
+
</qc-select>
|
|
61
|
+
|
|
62
|
+
<qc-select id="qc-select-disabled">
|
|
63
|
+
<label for="select-disabled">Désactivé</label>
|
|
64
|
+
<select id="select-disabled" disabled></select>
|
|
65
|
+
</qc-select>
|
|
66
|
+
|
|
67
|
+
<qc-select id="qc-select-invalid"
|
|
68
|
+
invalid
|
|
69
|
+
required >
|
|
70
|
+
<label for="select-invalid">État invalide</label>
|
|
71
|
+
<select id="select-invalid"
|
|
72
|
+
>
|
|
73
|
+
<option value=""></option>
|
|
74
|
+
<option value="1" >Option 1</option>
|
|
75
|
+
<option value="2">Option 2</option>
|
|
76
|
+
</select>
|
|
77
|
+
</qc-select>
|
|
78
|
+
</qc-doc-exemple>
|
|
79
|
+
|
|
80
|
+
<h4>Documentation technique</h4>
|
|
81
|
+
|
|
82
|
+
<h5>Attributs</h5>
|
|
83
|
+
<div class="table-overflow">
|
|
84
|
+
<table class="qc-table qc-striped component-attributes-description">
|
|
85
|
+
<thead>
|
|
86
|
+
<tr>
|
|
87
|
+
<th>Nom</th>
|
|
88
|
+
<th>Valeur attendue</th>
|
|
89
|
+
<th>Valeur par défaut</th>
|
|
90
|
+
<th>Description</th>
|
|
91
|
+
</tr>
|
|
92
|
+
</thead>
|
|
93
|
+
<tbody>
|
|
94
|
+
<tr>
|
|
95
|
+
<td>id</td>
|
|
96
|
+
<td>Texte</td>
|
|
97
|
+
<td>Chaîne de caractères aléatoire</td>
|
|
98
|
+
<td>Identifiant de la liste déroulante</td>
|
|
99
|
+
</tr>
|
|
100
|
+
<tr>
|
|
101
|
+
<td>label</td>
|
|
102
|
+
<td>Contenu HTML</td>
|
|
103
|
+
<td>""</td>
|
|
104
|
+
<td>
|
|
105
|
+
Libellé de la liste déroulante.
|
|
106
|
+
<br>N.B. : Le contenu de l'élément <code>label</code> en slot est utilisé en priorité.
|
|
107
|
+
</td>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr>
|
|
110
|
+
<td>width</td>
|
|
111
|
+
<td>"xs", "sm", "md", "lg", "xl"</td>
|
|
112
|
+
<td>"md"</td>
|
|
113
|
+
<td>
|
|
114
|
+
Largeur de la liste déroulante. Voir <a href="#textfield-sizes">l'illustration des tailles de champ texte</a>
|
|
115
|
+
pour une indication visuelle des tailles disponibles.
|
|
116
|
+
</td>
|
|
117
|
+
</tr>
|
|
118
|
+
<tr>
|
|
119
|
+
<td>enable-search</td>
|
|
120
|
+
<td>na</td>
|
|
121
|
+
<td>na</td>
|
|
122
|
+
<td>Affiche un champ de recherche instantanée dans le haut des options de la liste déroulante</td>
|
|
123
|
+
</tr>
|
|
124
|
+
<tr>
|
|
125
|
+
<td>required</td>
|
|
126
|
+
<td>na</td>
|
|
127
|
+
<td>na</td>
|
|
128
|
+
<td>Indique aux internautes que la sélection est obligatoire en ajoutant un astérisque dans le libellé</td>
|
|
129
|
+
</tr>
|
|
130
|
+
<tr>
|
|
131
|
+
<td>disabled</td>
|
|
132
|
+
<td>na</td>
|
|
133
|
+
<td>na</td>
|
|
134
|
+
<td>
|
|
135
|
+
Désactive la liste déroulante
|
|
136
|
+
<br>N.B. : L'attribut <code>disabled</code> de l'élément <code>select</code> en slot est utilisé en priorité.
|
|
137
|
+
</td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td>invalid</td>
|
|
141
|
+
<td>na</td>
|
|
142
|
+
<td>na</td>
|
|
143
|
+
<td>
|
|
144
|
+
Indique si la liste déroulante est dans un état invalide
|
|
145
|
+
<br/>NB : <code>invalid</code> prend automatiquement la valeur <code>false</code>
|
|
146
|
+
dès que l'attribut <code>value</code> est modifié.
|
|
147
|
+
</td>
|
|
148
|
+
</tr>
|
|
149
|
+
<tr>
|
|
150
|
+
<td>invalid-text</td>
|
|
151
|
+
<td>Texte</td>
|
|
152
|
+
<td>Le champ (libellé du champ) est obligatoire. / (libellé du champ) field is required.</td>
|
|
153
|
+
<td>Message d’erreur à afficher lorsque la liste déroulante est invalide</td>
|
|
154
|
+
</tr>
|
|
155
|
+
<tr>
|
|
156
|
+
<td>placeholder</td>
|
|
157
|
+
<td>Texte</td>
|
|
158
|
+
<td>Faire une sélection / Select an option</td>
|
|
159
|
+
<td>
|
|
160
|
+
<i>Placeholder</i> de la boîte de la liste déroulante
|
|
161
|
+
<br> N.B. : Si non précisé, le <i>placeholder</i> prend le texte de la première option avec une valeur vide (<code>value=""</code>).
|
|
162
|
+
Voir l'exemple de <a href="#qc-select-single-choice">liste déroulante avec choix unique</a>.
|
|
163
|
+
</td>
|
|
164
|
+
</tr>
|
|
165
|
+
<tr>
|
|
166
|
+
<td>search-placeholder</td>
|
|
167
|
+
<td>Texte</td>
|
|
168
|
+
<td>""</td>
|
|
169
|
+
<td><i>Placeholder</i> du champ de recherche</td>
|
|
170
|
+
</tr>
|
|
171
|
+
<tr>
|
|
172
|
+
<td>no-options-message</td>
|
|
173
|
+
<td>Contenu HTML</td>
|
|
174
|
+
<td>Aucun élément/No item</td>
|
|
175
|
+
<td>Texte indiquant l'absence d'options dans la liste.</td>
|
|
176
|
+
</tr>
|
|
177
|
+
<tr>
|
|
178
|
+
<td>multiple</td>
|
|
179
|
+
<td>na</td>
|
|
180
|
+
<td>na</td>
|
|
181
|
+
<td>
|
|
182
|
+
Active la sélection multiple.
|
|
183
|
+
<br>N.B. : L'attribut <code>multiple</code> de l'élément <code>select</code> est utilisé en priorité.
|
|
184
|
+
</td>
|
|
185
|
+
</tr>
|
|
186
|
+
</tbody>
|
|
187
|
+
</table>
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
<h5>Propriété JS</h5>
|
|
191
|
+
|
|
192
|
+
<div class="table-overflow">
|
|
193
|
+
<table class="qc-table qc-striped component-attributes-description">
|
|
194
|
+
<thead>
|
|
195
|
+
<tr>
|
|
196
|
+
<th>Nom</th>
|
|
197
|
+
<th>Type</th>
|
|
198
|
+
<th>Description</th>
|
|
199
|
+
</tr>
|
|
200
|
+
</thead>
|
|
201
|
+
<tbody>
|
|
202
|
+
<tr>
|
|
203
|
+
<td>value</td>
|
|
204
|
+
<td>Tableau de chaîne de caractères</td>
|
|
205
|
+
<td>Valeur(s) sélectionnée(s) dans la liste déroulante</td>
|
|
206
|
+
</tr>
|
|
207
|
+
</tbody>
|
|
208
|
+
</table>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
<h5>Zone d'ajout de contenu HTML</h5>
|
|
212
|
+
<p>Ce composant ne comporte qu'une seule zone d'ajout de contenu.</p>
|