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
|
@@ -1,31 +1,53 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import IconButton from "../IconButton/IconButton.svelte";
|
|
3
3
|
import {Utils} from "../utils";
|
|
4
|
+
import Icon from "../../bases/Icon/Icon.svelte";
|
|
4
5
|
|
|
5
6
|
const lang = Utils.getPageLanguage();
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
let {
|
|
9
10
|
value = $bindable(''),
|
|
10
|
-
ariaLabel = lang === "fr" ? "Rechercher
|
|
11
|
+
ariaLabel = lang === "fr" ? "Rechercher..." : "Search...",
|
|
11
12
|
clearAriaLabel = lang === "fr" ? "Effacer le texte" : "Clear text",
|
|
13
|
+
leftIcon = false,
|
|
14
|
+
id = `qc-search-input-${Math.random().toString(36).slice(2, 11)}`,
|
|
12
15
|
...rest
|
|
13
16
|
} = $props();
|
|
14
17
|
|
|
18
|
+
leftIcon = leftIcon === true || leftIcon === "true" || leftIcon === "";
|
|
19
|
+
const isDisabled = rest.disabled === true || rest.disabled === "true" || rest.disabled === "";
|
|
20
|
+
|
|
15
21
|
let searchInput;
|
|
22
|
+
|
|
23
|
+
export function focus() {
|
|
24
|
+
searchInput?.focus();
|
|
25
|
+
}
|
|
16
26
|
</script>
|
|
17
27
|
|
|
18
|
-
<div class=
|
|
28
|
+
<div class={[
|
|
29
|
+
"qc-search-input",
|
|
30
|
+
leftIcon && "qc-search-left-icon",
|
|
31
|
+
leftIcon && isDisabled && "qc-search-left-icon-disabled"
|
|
32
|
+
]} >
|
|
33
|
+
{#if leftIcon}
|
|
34
|
+
<Icon type="search-thin"
|
|
35
|
+
iconColor="grey-regular"
|
|
36
|
+
class={`qc-icon${isDisabled ? ' is-disabled' : ''}`}
|
|
37
|
+
/>
|
|
38
|
+
{/if}
|
|
19
39
|
<input bind:this={searchInput}
|
|
20
|
-
bind:value
|
|
40
|
+
bind:value
|
|
21
41
|
type="search"
|
|
22
42
|
autocomplete="off"
|
|
23
43
|
aria-label={ariaLabel}
|
|
44
|
+
class={isDisabled ? "qc-disabled" : ""}
|
|
45
|
+
id={id}
|
|
24
46
|
{...rest}
|
|
25
47
|
/>
|
|
26
48
|
{#if value}
|
|
27
49
|
<IconButton type="button"
|
|
28
|
-
icon="
|
|
50
|
+
icon="xclose"
|
|
29
51
|
iconColor="blue-piv"
|
|
30
52
|
iconSize="sm"
|
|
31
53
|
aria-label={clearAriaLabel}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
tag: 'qc-search-input',
|
|
3
3
|
shadow: 'none',
|
|
4
4
|
props: {
|
|
5
|
+
id: {attribute: 'id'},
|
|
5
6
|
ariaLabel: {attribute:'aria-label'},
|
|
6
|
-
clearAriaLabel: {attribute: 'clear-aria-label'}
|
|
7
|
+
clearAriaLabel: {attribute: 'clear-aria-label'},
|
|
8
|
+
leftIcon: {attribute: 'left-icon'}
|
|
7
9
|
}
|
|
8
10
|
}}" />
|
|
9
11
|
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<h2 id="search-input">Champ de recherche</h2>
|
|
2
|
+
<h3>Exemples</h3>
|
|
3
|
+
|
|
4
|
+
<qc-doc-exemple caption="Exemples de champs de recherche">
|
|
5
|
+
<qc-search-input
|
|
6
|
+
placeholder="Rechercher un article"
|
|
7
|
+
aria-label="Rechercher un article"
|
|
8
|
+
clear-aria-label="Effacer le texte"
|
|
9
|
+
left-icon
|
|
10
|
+
></qc-search-input>
|
|
11
|
+
|
|
12
|
+
<br>
|
|
13
|
+
|
|
14
|
+
<qc-search-input
|
|
15
|
+
value="Climat"
|
|
16
|
+
placeholder="Rechercher un sujet"
|
|
17
|
+
aria-label="Rechercher un sujet"
|
|
18
|
+
clear-aria-label="Effacer le texte"
|
|
19
|
+
left-icon
|
|
20
|
+
></qc-search-input>
|
|
21
|
+
|
|
22
|
+
<br>
|
|
23
|
+
|
|
24
|
+
<qc-search-input
|
|
25
|
+
placeholder="Recherche désactivée"
|
|
26
|
+
aria-label="Recherche désactivée"
|
|
27
|
+
disabled
|
|
28
|
+
left-icon
|
|
29
|
+
clear-aria-label="Effacer le texte"
|
|
30
|
+
></qc-search-input>
|
|
31
|
+
</qc-doc-exemple>
|
|
32
|
+
|
|
33
|
+
<h3>Documentation technique</h3>
|
|
34
|
+
|
|
35
|
+
<h4>Attributs</h4>
|
|
36
|
+
<div class="table-overflow">
|
|
37
|
+
<table class="qc-table qc-striped component-attributes-description">
|
|
38
|
+
<thead>
|
|
39
|
+
<tr>
|
|
40
|
+
<th>Nom</th>
|
|
41
|
+
<th>Valeur attendue</th>
|
|
42
|
+
<th>Valeur par défaut</th>
|
|
43
|
+
<th>Description</th>
|
|
44
|
+
</tr>
|
|
45
|
+
</thead>
|
|
46
|
+
<tbody>
|
|
47
|
+
<tr>
|
|
48
|
+
<td>value</td>
|
|
49
|
+
<td>Texte</td>
|
|
50
|
+
<td>""</td>
|
|
51
|
+
<td>Valeur inscrite par défaut dans le champ de recherche.</td>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td>placeholder</td>
|
|
55
|
+
<td>Texte</td>
|
|
56
|
+
<td>""</td>
|
|
57
|
+
<td>Texte indicatif affiché lorsque le champ est vide.</td>
|
|
58
|
+
</tr>
|
|
59
|
+
<tr>
|
|
60
|
+
<td>aria-label</td>
|
|
61
|
+
<td>Texte</td>
|
|
62
|
+
<td>"Rechercher..." ou "Search..."</td>
|
|
63
|
+
<td>Libellé accessible pour les lecteurs d'écrans.</td>
|
|
64
|
+
</tr>
|
|
65
|
+
<tr>
|
|
66
|
+
<td>clear-aria-label</td>
|
|
67
|
+
<td>Texte</td>
|
|
68
|
+
<td>"Effacer le texte" ou "Clear text"</td>
|
|
69
|
+
<td>Libellé accessible du bouton pour effacer le champ.</td>
|
|
70
|
+
</tr>
|
|
71
|
+
<tr>
|
|
72
|
+
<td>disabled</td>
|
|
73
|
+
<td>na</td>
|
|
74
|
+
<td>na</td>
|
|
75
|
+
<td>Désactive le champ.</td>
|
|
76
|
+
</tr>
|
|
77
|
+
<tr>
|
|
78
|
+
<td>name</td>
|
|
79
|
+
<td>Texte</td>
|
|
80
|
+
<td>""</td>
|
|
81
|
+
<td>Nom du champ utilisé lors de la soumission du formulaire.</td>
|
|
82
|
+
</tr>
|
|
83
|
+
</tbody>
|
|
84
|
+
</table>
|
|
85
|
+
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "qc-sdg-lib" as *;
|
|
1
|
+
@use "../../scss/qc-sdg-lib" as *;
|
|
2
2
|
|
|
3
3
|
qc-search-input {
|
|
4
4
|
display: block;
|
|
@@ -10,7 +10,7 @@ qc-search-input {
|
|
|
10
10
|
%qc-search-wrapper {
|
|
11
11
|
@extend %qc-formcontrol-box;
|
|
12
12
|
display: flex;
|
|
13
|
-
align-items:
|
|
13
|
+
align-items: center;
|
|
14
14
|
&::before {
|
|
15
15
|
border: 1px solid token-value(color formfield border);
|
|
16
16
|
}
|
|
@@ -24,6 +24,12 @@ qc-search-input {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
%qc-search-disabled {
|
|
28
|
+
background-color: token-value(color grey pale);
|
|
29
|
+
border: 1px solid token-value(color, grey, regular);
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
.qc-search-input {
|
|
28
34
|
@extend %qc-search-wrapper;
|
|
29
35
|
input[type=search] {
|
|
@@ -44,14 +50,23 @@ qc-search-input {
|
|
|
44
50
|
display: none;
|
|
45
51
|
}
|
|
46
52
|
&::placeholder {
|
|
53
|
+
width: 100%;
|
|
47
54
|
color: token-value(color grey medium);
|
|
48
55
|
font-weight: normal;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
}
|
|
58
|
+
&:placeholder-shown {
|
|
59
|
+
text-overflow: ellipsis;
|
|
49
60
|
}
|
|
50
61
|
&:focus,&:focus-visible {
|
|
51
62
|
outline: none;
|
|
52
63
|
}
|
|
53
64
|
}
|
|
54
65
|
|
|
66
|
+
&.qc-search-left-icon {
|
|
67
|
+
padding-left: token-value(spacer, xs);
|
|
68
|
+
}
|
|
69
|
+
|
|
55
70
|
button {
|
|
56
71
|
@extend %qc-formcontrol-box;
|
|
57
72
|
&::before {
|
|
@@ -59,6 +74,16 @@ qc-search-input {
|
|
|
59
74
|
}
|
|
60
75
|
cursor: pointer;
|
|
61
76
|
}
|
|
77
|
+
|
|
78
|
+
&.qc-search-left-icon-disabled {
|
|
79
|
+
&::before {
|
|
80
|
+
@extend %qc-search-disabled;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
qc-icon {
|
|
84
|
+
@extend %qc-search-disabled;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
62
87
|
}
|
|
63
88
|
|
|
64
89
|
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<svelte:options customElement={{
|
|
2
|
+
tag: 'qc-textfield-demo',
|
|
3
|
+
props: {
|
|
4
|
+
label: { attribute: 'label', type: 'String' },
|
|
5
|
+
required: { attribute: 'required', type: 'Boolean' },
|
|
6
|
+
description: { attribute: 'description', type: 'String' },
|
|
7
|
+
size: { attribute: 'size', type: 'String' },
|
|
8
|
+
maxlength: { attribute: 'max-length', type: 'Number' },
|
|
9
|
+
invalid: { attribute: 'invalid', type: 'Boolean', reflect: true },
|
|
10
|
+
invalidText: { attribute: 'invalid-text', type: 'String' },
|
|
11
|
+
}
|
|
12
|
+
}} />
|
|
13
|
+
<script>
|
|
14
|
+
|
|
15
|
+
import TextField from "../TextField.svelte";
|
|
16
|
+
import {Utils} from "../../utils";
|
|
17
|
+
import Checkbox from "../../Checkbox/Checkbox.svelte";
|
|
18
|
+
import DropdownList from "../../DropdownList/DropdownList.svelte";
|
|
19
|
+
import ChoiceGroup from "../../ChoiceGroup/ChoiceGroup.svelte";
|
|
20
|
+
let {
|
|
21
|
+
invalid,
|
|
22
|
+
invalidText,
|
|
23
|
+
label = "Démo",
|
|
24
|
+
description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
25
|
+
required,
|
|
26
|
+
maxlength = 10,
|
|
27
|
+
value,
|
|
28
|
+
placeholder,
|
|
29
|
+
size,
|
|
30
|
+
maxlengthReached = $bindable(false),
|
|
31
|
+
invalidAtSubmit = $bindable(false),
|
|
32
|
+
} = $props();
|
|
33
|
+
let inputTag = $state("input"),
|
|
34
|
+
inputType = $state("text"),
|
|
35
|
+
multiligne = $state(false)
|
|
36
|
+
;
|
|
37
|
+
$inspect(multiligne, inputTag, inputType)
|
|
38
|
+
$effect(() => {
|
|
39
|
+
console.log(multiligne, inputTag, inputType)
|
|
40
|
+
if (multiligne) {
|
|
41
|
+
inputTag = "textarea";
|
|
42
|
+
inputType = undefined;
|
|
43
|
+
} else {
|
|
44
|
+
inputTag = "input";
|
|
45
|
+
inputType = "text";
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
</script>
|
|
49
|
+
<TextField
|
|
50
|
+
{label}
|
|
51
|
+
{invalid}
|
|
52
|
+
{invalidText}
|
|
53
|
+
{size}
|
|
54
|
+
{required}
|
|
55
|
+
description={multiligne ? description : undefined}
|
|
56
|
+
maxlength={multiligne ? maxlength : undefined}
|
|
57
|
+
>
|
|
58
|
+
<svelte:element
|
|
59
|
+
this={inputTag}
|
|
60
|
+
{inputType}
|
|
61
|
+
{value}
|
|
62
|
+
name="textfield-demo"
|
|
63
|
+
{placeholder}
|
|
64
|
+
>
|
|
65
|
+
|
|
66
|
+
</svelte:element>
|
|
67
|
+
</TextField>
|
|
68
|
+
<div class="attributes">
|
|
69
|
+
<Checkbox compact>
|
|
70
|
+
<label>
|
|
71
|
+
<input type="checkbox"
|
|
72
|
+
bind:checked={multiligne}>
|
|
73
|
+
Multiligne
|
|
74
|
+
</label>
|
|
75
|
+
</Checkbox>
|
|
76
|
+
<ChoiceGroup legend="Size" selectionButton inline>
|
|
77
|
+
{#each ['xs','sm','md','lg','xl'] as _size}
|
|
78
|
+
<label>
|
|
79
|
+
<input type="radio"
|
|
80
|
+
name="size"
|
|
81
|
+
bind:group={size}
|
|
82
|
+
value="{_size}"
|
|
83
|
+
/>
|
|
84
|
+
{_size}
|
|
85
|
+
</label>
|
|
86
|
+
{/each}
|
|
87
|
+
</ChoiceGroup>
|
|
88
|
+
<Checkbox compact>
|
|
89
|
+
<label>
|
|
90
|
+
<input type="checkbox"
|
|
91
|
+
bind:checked={required}>
|
|
92
|
+
Required
|
|
93
|
+
</label>
|
|
94
|
+
</Checkbox>
|
|
95
|
+
<Checkbox compact>
|
|
96
|
+
<label>
|
|
97
|
+
<input type="checkbox"
|
|
98
|
+
bind:checked={invalid}>
|
|
99
|
+
Invalid
|
|
100
|
+
</label>
|
|
101
|
+
</Checkbox>
|
|
102
|
+
<TextField label="placeholder">
|
|
103
|
+
<input type="text"
|
|
104
|
+
bind:value={placeholder} />
|
|
105
|
+
</TextField>
|
|
106
|
+
<TextField label="Libellé du champ">
|
|
107
|
+
<input type="text"
|
|
108
|
+
bind:value={label}
|
|
109
|
+
/>
|
|
110
|
+
</TextField>
|
|
111
|
+
<TextField label="Message d'erreur">
|
|
112
|
+
<input type="text"
|
|
113
|
+
bind:value={invalidText}
|
|
114
|
+
/>
|
|
115
|
+
</TextField>
|
|
116
|
+
{#if multiligne}
|
|
117
|
+
<TextField label="Description"
|
|
118
|
+
size="lg"
|
|
119
|
+
>
|
|
120
|
+
<input type="text"
|
|
121
|
+
bind:value={description}
|
|
122
|
+
/>
|
|
123
|
+
</TextField>
|
|
124
|
+
<TextField label="Maxlength"
|
|
125
|
+
size="xs"
|
|
126
|
+
>
|
|
127
|
+
<input type="number"
|
|
128
|
+
bind:value={maxlength} />
|
|
129
|
+
</TextField>
|
|
130
|
+
{/if}
|
|
131
|
+
</div>
|
|
132
|
+
<style>
|
|
133
|
+
.attributes {
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
flex-wrap: wrap;
|
|
137
|
+
gap: 0 24px;
|
|
138
|
+
max-height: 352px;
|
|
139
|
+
}
|
|
140
|
+
</style>
|
|
141
|
+
|
|
142
|
+
<link rel='stylesheet' href='{Utils.cssPath.replace("qc-doc","qc")}' >
|
|
143
|
+
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<svelte:options customElement={{
|
|
2
|
+
tag: 'qc-textfield-embedded-test'
|
|
3
|
+
}}/>
|
|
4
|
+
<script>
|
|
5
|
+
import TextField from "../TextField.svelte";
|
|
6
|
+
import {Utils} from '../../utils.js';
|
|
7
|
+
</script>
|
|
8
|
+
<TextField label="Très petit"
|
|
9
|
+
size="xs">
|
|
10
|
+
<input type="text"
|
|
11
|
+
name="text-xs"
|
|
12
|
+
placeholder="25"
|
|
13
|
+
/>
|
|
14
|
+
</TextField>
|
|
15
|
+
|
|
16
|
+
<TextField size="sm">
|
|
17
|
+
<label for="text-sm">Petit</label>
|
|
18
|
+
<input type="text"
|
|
19
|
+
id="text-sm"
|
|
20
|
+
name="text-sm"
|
|
21
|
+
placeholder="25"
|
|
22
|
+
/>
|
|
23
|
+
</TextField>
|
|
24
|
+
|
|
25
|
+
<TextField label="Moyen"
|
|
26
|
+
size="md"
|
|
27
|
+
invalid
|
|
28
|
+
>
|
|
29
|
+
<input type="text"
|
|
30
|
+
name="text-md"
|
|
31
|
+
placeholder="Long placeholder lorem ipsum dolor sit amet"
|
|
32
|
+
/>
|
|
33
|
+
</TextField>
|
|
34
|
+
|
|
35
|
+
<TextField name="text-lg"
|
|
36
|
+
label="Large"
|
|
37
|
+
size="lg"
|
|
38
|
+
placeholder="Long placeholder lorem ipsum dolor sit amet"
|
|
39
|
+
required>
|
|
40
|
+
<input type="text"
|
|
41
|
+
name="text-lg"
|
|
42
|
+
/>
|
|
43
|
+
</TextField>
|
|
44
|
+
|
|
45
|
+
<TextField
|
|
46
|
+
label="Très large"
|
|
47
|
+
size="xl"
|
|
48
|
+
|
|
49
|
+
>
|
|
50
|
+
<input type="text"
|
|
51
|
+
placeholder="Long placeholder lorem ipsum dolor sit amet"
|
|
52
|
+
name="text-xl"
|
|
53
|
+
disabled
|
|
54
|
+
/>
|
|
55
|
+
</TextField>
|
|
56
|
+
|
|
57
|
+
<div class="qc-formfield-row">
|
|
58
|
+
<TextField
|
|
59
|
+
label="Combiné 1"
|
|
60
|
+
size="sm"
|
|
61
|
+
>
|
|
62
|
+
<input type="text"
|
|
63
|
+
placeholder="Long placeholder lorem ipsum dolor sit amet"
|
|
64
|
+
name="combo-1"
|
|
65
|
+
/>
|
|
66
|
+
</TextField>
|
|
67
|
+
|
|
68
|
+
<TextField
|
|
69
|
+
label="Combiné 2"
|
|
70
|
+
size="xs"
|
|
71
|
+
>
|
|
72
|
+
<input type="text"
|
|
73
|
+
name="combo-2"
|
|
74
|
+
/>
|
|
75
|
+
</TextField>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="qc-formfield-row">
|
|
78
|
+
<TextField
|
|
79
|
+
label="Combiné 1 invalide"
|
|
80
|
+
size="sm"
|
|
81
|
+
invalid
|
|
82
|
+
>
|
|
83
|
+
<input type="text"
|
|
84
|
+
name="invalid-combo-1"
|
|
85
|
+
/>
|
|
86
|
+
</TextField>
|
|
87
|
+
|
|
88
|
+
<TextField
|
|
89
|
+
label="Combiné 2"
|
|
90
|
+
size="xs"
|
|
91
|
+
invalid
|
|
92
|
+
>
|
|
93
|
+
<input type="text"
|
|
94
|
+
name="invalid-combo-2"
|
|
95
|
+
/>
|
|
96
|
+
</TextField>
|
|
97
|
+
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<TextField
|
|
101
|
+
label="Commentaires"
|
|
102
|
+
size="lg"
|
|
103
|
+
description="Vous pouvez entrer des commentaires dans la zone de texte ci-dessous."
|
|
104
|
+
>
|
|
105
|
+
<textarea name="zone-lg" id="zone-lg"></textarea>
|
|
106
|
+
</TextField>
|
|
107
|
+
|
|
108
|
+
<TextField
|
|
109
|
+
label="Suggestions"
|
|
110
|
+
description="Vous pouvez entrer des suggestions dans la zone de texte ci-dessous."
|
|
111
|
+
size="xl"
|
|
112
|
+
maxlength="10"
|
|
113
|
+
required
|
|
114
|
+
>
|
|
115
|
+
<textarea name="zone-xl"></textarea>
|
|
116
|
+
</TextField>
|
|
117
|
+
|
|
118
|
+
<TextField label="Suggestions"
|
|
119
|
+
description="Vous pouvez entrer des suggestions dans la zone de texte ci-dessous."
|
|
120
|
+
size="xl"
|
|
121
|
+
maxlength="10"
|
|
122
|
+
required
|
|
123
|
+
invalid
|
|
124
|
+
>
|
|
125
|
+
<textarea name="zone-xl-invalid"
|
|
126
|
+
id="zone-xl-invalid"
|
|
127
|
+
>Lorem ipsum dolor sit amet, consectetur adipiscing elit</textarea>
|
|
128
|
+
</TextField>
|
|
129
|
+
<link rel='stylesheet' href='{Utils.cssPath}'>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<qc-textfield-embedded-test></qc-textfield-embedded-test>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<qc-textfield label="Très petit"
|
|
2
|
+
size="xs">
|
|
3
|
+
<input type="text"
|
|
4
|
+
name="text-xs"
|
|
5
|
+
placeholder="25"
|
|
6
|
+
/>
|
|
7
|
+
</qc-textfield>
|
|
8
|
+
|
|
9
|
+
<qc-textfield size="sm"
|
|
10
|
+
>
|
|
11
|
+
<label for="text-sm">Petit</label>
|
|
12
|
+
<input type="text"
|
|
13
|
+
id="text-sm"
|
|
14
|
+
name="text-sm"
|
|
15
|
+
placeholder="25"
|
|
16
|
+
/>
|
|
17
|
+
</qc-textfield>
|
|
18
|
+
|
|
19
|
+
<qc-textfield label="Moyen"
|
|
20
|
+
size="md"
|
|
21
|
+
invalid
|
|
22
|
+
>
|
|
23
|
+
<input type="text"
|
|
24
|
+
name="text-md"
|
|
25
|
+
placeholder="Long placeholder lorem ipsum dolor sit amet"
|
|
26
|
+
/>
|
|
27
|
+
</qc-textfield>
|
|
28
|
+
|
|
29
|
+
<qc-textfield name="text-lg"
|
|
30
|
+
label="Large"
|
|
31
|
+
size="lg"
|
|
32
|
+
placeholder="Long placeholder lorem ipsum dolor sit amet"
|
|
33
|
+
required>
|
|
34
|
+
<input type="text"
|
|
35
|
+
name="text-lg"
|
|
36
|
+
/>
|
|
37
|
+
</qc-textfield>
|
|
38
|
+
|
|
39
|
+
<qc-textfield
|
|
40
|
+
label="Très large"
|
|
41
|
+
size="xl"
|
|
42
|
+
|
|
43
|
+
>
|
|
44
|
+
<input type="text"
|
|
45
|
+
placeholder="Long placeholder lorem ipsum dolor sit amet"
|
|
46
|
+
name="text-xl"
|
|
47
|
+
disabled
|
|
48
|
+
/>
|
|
49
|
+
</qc-textfield>
|
|
50
|
+
|
|
51
|
+
<div class="qc-formfield-row">
|
|
52
|
+
<qc-textfield
|
|
53
|
+
label="Combiné 1"
|
|
54
|
+
size="sm"
|
|
55
|
+
>
|
|
56
|
+
<input type="text"
|
|
57
|
+
placeholder="Long placeholder lorem ipsum dolor sit amet"
|
|
58
|
+
name="combo-1"
|
|
59
|
+
/>
|
|
60
|
+
</qc-textfield>
|
|
61
|
+
|
|
62
|
+
<qc-textfield
|
|
63
|
+
label="Combiné 2"
|
|
64
|
+
size="xs"
|
|
65
|
+
>
|
|
66
|
+
<input type="text"
|
|
67
|
+
name="combo-2"
|
|
68
|
+
/>
|
|
69
|
+
</qc-textfield>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="qc-formfield-row">
|
|
72
|
+
<qc-textfield
|
|
73
|
+
label="Combiné 1 invalide"
|
|
74
|
+
size="sm"
|
|
75
|
+
invalid
|
|
76
|
+
>
|
|
77
|
+
<input type="text"
|
|
78
|
+
name="invalid-combo-1"
|
|
79
|
+
/>
|
|
80
|
+
</qc-textfield>
|
|
81
|
+
|
|
82
|
+
<qc-textfield
|
|
83
|
+
label="Combiné 2"
|
|
84
|
+
size="xs"
|
|
85
|
+
invalid
|
|
86
|
+
>
|
|
87
|
+
<input type="text"
|
|
88
|
+
name="invalid-combo-2"
|
|
89
|
+
/>
|
|
90
|
+
</qc-textfield>
|
|
91
|
+
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<qc-textfield label="Commentaires"
|
|
95
|
+
size="lg"
|
|
96
|
+
description="Vous pouvez entrer des commentaires dans la zone de texte ci-dessous."
|
|
97
|
+
>
|
|
98
|
+
<textarea name="zone-lg" id="zone-lg"></textarea>
|
|
99
|
+
</qc-textfield>
|
|
100
|
+
|
|
101
|
+
<qc-textfield
|
|
102
|
+
label="Suggestions"
|
|
103
|
+
description="Vous pouvez entrer des suggestions dans la zone de texte ci-dessous."
|
|
104
|
+
size="xl"
|
|
105
|
+
max-length="10"
|
|
106
|
+
required
|
|
107
|
+
>
|
|
108
|
+
<textarea name="zone-xl"></textarea>
|
|
109
|
+
</qc-textfield>
|
|
110
|
+
|
|
111
|
+
<qc-textfield label="Suggestions"
|
|
112
|
+
description="Vous pouvez entrer des suggestions dans la zone de texte ci-dessous."
|
|
113
|
+
size="xl"
|
|
114
|
+
max-length="10"
|
|
115
|
+
required
|
|
116
|
+
invalid
|
|
117
|
+
>
|
|
118
|
+
<textarea name="zone-xl-invalid"
|
|
119
|
+
id="zone-xl-invalid"
|
|
120
|
+
>Lorem ipsum dolor sit amet, consectetur adipiscing elit</textarea>
|
|
121
|
+
</qc-textfield>
|