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.
Files changed (293) hide show
  1. package/README.md +22 -5
  2. package/dist/css/qc-sdg-design-tokens.min.css +1 -1
  3. package/dist/css/qc-sdg-no-grid.min.css +1 -1
  4. package/dist/css/qc-sdg.min.css +1 -1
  5. package/dist/fonts/open-sans-v43-latin-500.woff2 +0 -0
  6. package/dist/fonts/open-sans-v43-latin-500italic.woff2 +0 -0
  7. package/dist/fonts/open-sans-v43-latin-600.woff2 +0 -0
  8. package/dist/fonts/open-sans-v43-latin-600italic.woff2 +0 -0
  9. package/dist/fonts/open-sans-v43-latin-700.woff2 +0 -0
  10. package/dist/fonts/open-sans-v43-latin-700italic.woff2 +0 -0
  11. package/dist/fonts/open-sans-v43-latin-italic.woff2 +0 -0
  12. package/dist/fonts/open-sans-v43-latin-regular.woff2 +0 -0
  13. package/dist/fonts/roboto-mono-v30-latin-500.woff2 +0 -0
  14. package/dist/fonts/roboto-mono-v30-latin-500italic.woff2 +0 -0
  15. package/dist/fonts/roboto-mono-v30-latin-600.woff2 +0 -0
  16. package/dist/fonts/roboto-mono-v30-latin-600italic.woff2 +0 -0
  17. package/dist/fonts/roboto-mono-v30-latin-700.woff2 +0 -0
  18. package/dist/fonts/roboto-mono-v30-latin-700italic.woff2 +0 -0
  19. package/dist/fonts/roboto-mono-v30-latin-italic.woff2 +0 -0
  20. package/dist/fonts/roboto-mono-v30-latin-regular.woff2 +0 -0
  21. package/dist/fonts/roboto-v48-latin-500.woff2 +0 -0
  22. package/dist/fonts/roboto-v48-latin-500italic.woff2 +0 -0
  23. package/dist/fonts/roboto-v48-latin-600.woff2 +0 -0
  24. package/dist/fonts/roboto-v48-latin-600italic.woff2 +0 -0
  25. package/dist/fonts/roboto-v48-latin-700.woff2 +0 -0
  26. package/dist/fonts/roboto-v48-latin-700italic.woff2 +0 -0
  27. package/dist/fonts/roboto-v48-latin-italic.woff2 +0 -0
  28. package/dist/fonts/roboto-v48-latin-regular.woff2 +0 -0
  29. package/dist/img/icon/adresse.svg +4 -0
  30. package/dist/img/icon/arrow-up.svg +3 -0
  31. package/dist/img/icon/calendar.svg +1 -0
  32. package/dist/img/icon/checkmark.svg +3 -0
  33. package/dist/img/icon/chevron-up-thin.svg +5 -0
  34. package/dist/img/{chevron-white.svg → icon/chevron-up.svg} +1 -1
  35. package/{public/img → dist/img/icon}/clipboard.svg +3 -3
  36. package/dist/img/icon/clock.svg +1 -0
  37. package/dist/img/icon/email.svg +1 -0
  38. package/dist/img/icon/error.svg +1 -0
  39. package/{public/img/exclamation-white.svg → dist/img/icon/exclamation.svg} +2 -2
  40. package/{public/img → dist/img/icon}/external-link.svg +2 -2
  41. package/dist/img/icon/information.svg +1 -0
  42. package/dist/img/icon/ligth-bulb.svg +1 -0
  43. package/{public/img → dist/img/icon}/minus.svg +1 -1
  44. package/dist/img/icon/note.svg +1 -0
  45. package/dist/img/icon/phone.svg +1 -0
  46. package/dist/img/{plus.svg → icon/plus.svg} +1 -1
  47. package/{public/img → dist/img/icon}/question-mark.svg +2 -2
  48. package/dist/img/icon/search-thin.svg +10 -0
  49. package/dist/img/icon/search.svg +1 -0
  50. package/dist/img/icon/success.svg +1 -0
  51. package/dist/img/icon/user.svg +6 -0
  52. package/dist/img/icon/warning.svg +1 -0
  53. package/dist/img/icon/website.svg +1 -0
  54. package/dist/img/icon/xclose.svg +1 -0
  55. package/dist/js/qc-sdg.min.js +1 -1
  56. package/package.json +11 -3
  57. package/playwright.config.ts +79 -0
  58. package/plugins/buildDevDoc.js +36 -0
  59. package/plugins/buildHtmlDoc.js +43 -0
  60. package/plugins/buildTestFixtures.js +37 -0
  61. package/public/css/qc-doc-sdg.css +4 -67
  62. package/public/css/qc-sdg-design-tokens.css +17 -0
  63. package/public/css/qc-sdg-no-grid.css +2001 -1108
  64. package/public/css/qc-sdg.css +1999 -1106
  65. package/public/img/checkmark.svg +3 -0
  66. package/public/img/question.svg +10 -0
  67. package/public/index.html +3104 -1387
  68. package/public/js/qc-doc-sdg.js +5705 -285
  69. package/public/js/qc-sdg.js +5660 -1415
  70. package/rollup.config.js +67 -41
  71. package/scripts/buildImagesMap.js +85 -0
  72. package/scripts/check-release-note.sh +11 -0
  73. package/scripts/compile-doc.sh +4 -0
  74. package/src/doc/_index.html +100 -0
  75. package/src/doc/_nav.html +53 -0
  76. package/src/doc/_test.html +32 -0
  77. package/src/doc/components/Code.svelte +6 -2
  78. package/src/doc/components/TopNav.svelte +8 -9
  79. package/src/doc/components/color-doc.svelte +1 -1
  80. package/src/doc/ejs/layout/index.ejs +129 -0
  81. package/src/doc/qc-doc-sdg.js +1 -2
  82. package/src/doc/scss/components/_code.scss +1 -1
  83. package/src/doc/scss/jQueryUI/_jquery-ui.autocomplete.scss +1 -0
  84. package/src/doc/scss/qc-doc-sdg.scss +1 -1
  85. package/src/doc/scss/settings/_base.scss +4 -0
  86. package/src/sdg/_components.js +9 -2
  87. package/src/sdg/{components → bases}/Icon/Icon.svelte +13 -6
  88. package/src/sdg/bases/Icon/IconDoc.ejs +129 -0
  89. package/src/sdg/{components → bases}/Icon/IconWC.svelte +3 -1
  90. package/src/sdg/bases/Icon/Test/IconEmbeddedTest.html +1 -0
  91. package/src/sdg/bases/Icon/Test/IconEmbeddedTest.svelte +168 -0
  92. package/src/sdg/bases/Icon/Test/iconTest.html +156 -0
  93. package/src/sdg/bases/Icon/_icon.html +254 -0
  94. package/src/sdg/bases/Icon/_icons.scss +47 -0
  95. package/src/sdg/{scss/base → bases/accessibility}/_accessibility.scss +1 -1
  96. package/src/sdg/bases/colors/_colors.html +112 -0
  97. package/src/sdg/bases/figures/_figure.html +16 -0
  98. package/src/sdg/{scss/base → bases/form}/_form.scss +10 -3
  99. package/src/sdg/bases/grid/_grid.html +118 -0
  100. package/src/sdg/bases/headings/_headings.html +18 -0
  101. package/src/sdg/bases/headings/_headings.scss +25 -0
  102. package/src/sdg/{scss/base → bases/layout}/_layout.scss +1 -4
  103. package/src/sdg/bases/links/_links.html +104 -0
  104. package/src/sdg/bases/links/_links.scss +51 -0
  105. package/src/sdg/bases/lists/_lists.html +27 -0
  106. package/src/sdg/bases/separator/_separator.html +7 -0
  107. package/src/sdg/bases/separator/_separator.scss +5 -0
  108. package/src/sdg/bases/shadings/_shadings.html +14 -0
  109. package/src/sdg/{scss/base → bases/shadings}/_shadings.scss +1 -1
  110. package/src/sdg/bases/typography/_font.html +45 -0
  111. package/src/sdg/bases/typography/_fonts.scss +162 -0
  112. package/src/sdg/bases/typography/_paragraph.html +17 -0
  113. package/src/sdg/bases/typography/_paragraph.scss +33 -0
  114. package/src/sdg/components/Alert/Alert.svelte +2 -5
  115. package/src/sdg/components/Alert/AlertWC.svelte +3 -2
  116. package/src/sdg/components/Alert/_alert.html +110 -0
  117. package/src/sdg/{scss/components → components/Alert}/_alert.scss +1 -1
  118. package/src/sdg/components/Button/Button.svelte +50 -0
  119. package/src/sdg/components/Button/ButtonWC.svelte +36 -0
  120. package/src/sdg/components/Button/Test/buttonTest.html +349 -0
  121. package/src/sdg/components/Button/_button.html +186 -0
  122. package/src/sdg/components/Button/_button.scss +202 -0
  123. package/src/sdg/components/CharCount/_charCount.html +7 -0
  124. package/src/sdg/components/Checkbox/Checkbox.svelte +77 -0
  125. package/src/sdg/components/Checkbox/CheckboxWC.svelte +49 -0
  126. package/src/sdg/components/Checkbox/_checkbox.html +86 -0
  127. package/src/sdg/components/Checkbox/_checkbox.scss +70 -0
  128. package/src/sdg/components/Checkbox/updateInput.svelte.js +23 -0
  129. package/src/sdg/components/ChoiceGroup/ChoiceGroup.svelte +56 -0
  130. package/src/sdg/components/ChoiceGroup/ChoiceGroupWC.svelte +47 -0
  131. package/src/sdg/components/ChoiceGroup/Test/ChoiceGroupeEmbededTest.svelte +261 -0
  132. package/src/sdg/components/ChoiceGroup/Test/checkboxEmbeddedTest.html +1 -0
  133. package/src/sdg/components/ChoiceGroup/Test/checkboxTest.html +253 -0
  134. package/src/sdg/components/ChoiceGroup/Test/radiosEmbeddedTest.html +1 -0
  135. package/src/sdg/components/ChoiceGroup/Test/radiosTest.html +185 -0
  136. package/src/sdg/components/ChoiceGroup/ToggleSwitchGroupWC.svelte +56 -0
  137. package/src/sdg/components/ChoiceGroup/_choiceGroup.html +285 -0
  138. package/src/sdg/components/ChoiceGroup/_choiceGroup.scss +32 -0
  139. package/src/sdg/components/ChoiceGroup/_selectionButton.scss +53 -0
  140. package/src/sdg/components/ChoiceGroup/_selectionButtons.html +130 -0
  141. package/src/sdg/components/DropdownList/DropdownList.svelte +394 -0
  142. package/src/sdg/components/DropdownList/DropdownListButton/DropdownListButton.svelte +43 -0
  143. package/src/sdg/components/DropdownList/DropdownListButton/_dropdownListButton.scss +65 -0
  144. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItems.svelte +110 -0
  145. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsMultiple/DropdownListItemsMultiple.svelte +185 -0
  146. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsMultiple/_dropdownListItemsMultiple.scss +19 -0
  147. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsSingle/DropdownListItemsSingle.svelte +136 -0
  148. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsSingle/_dropdownListItemsSingle.scss +11 -0
  149. package/src/sdg/components/DropdownList/DropdownListItems/_dropdownListItems.scss +67 -0
  150. package/src/sdg/components/DropdownList/SelectWC.svelte +158 -0
  151. package/src/sdg/components/DropdownList/Test/DropdownListEmbeddedTest.svelte +89 -0
  152. package/src/sdg/components/DropdownList/Test/dropdownListEmbeddedTest.html +1 -0
  153. package/src/sdg/components/DropdownList/Test/dropdownListTest.html +194 -0
  154. package/src/sdg/components/DropdownList/Test/dropdownListTestUtils.js +113 -0
  155. package/src/sdg/components/DropdownList/_dropdownList.scss +73 -0
  156. package/src/sdg/components/DropdownList/_select.html +212 -0
  157. package/src/sdg/components/ExternalLink/ExternalLink.svelte +1 -1
  158. package/src/sdg/components/Fieldset/Fieldset.svelte +73 -0
  159. package/src/sdg/components/Fieldset/_fieldset.scss +95 -0
  160. package/src/sdg/components/FormError/FormError.svelte +51 -0
  161. package/src/sdg/components/FormError/_formError.scss +21 -0
  162. package/src/sdg/components/FormfieldRow/_formfieldRow.html +108 -0
  163. package/src/sdg/components/IconButton/IconButton.svelte +1 -1
  164. package/src/sdg/components/IconButton/_iconButton.scss +14 -0
  165. package/src/sdg/components/Label/Label.svelte +28 -0
  166. package/src/sdg/components/Label/LabelText.svelte +4 -0
  167. package/src/sdg/components/Label/_label.scss +19 -0
  168. package/src/sdg/components/Notice/Notice.svelte +1 -2
  169. package/src/sdg/components/Notice/NoticeWC.svelte +3 -0
  170. package/src/sdg/components/Notice/_notice.html +141 -0
  171. package/src/sdg/{scss/components → components/Notice}/_notice.scss +1 -1
  172. package/src/sdg/components/PivFooter/PivFooter.svelte +8 -9
  173. package/src/sdg/components/PivFooter/PivFooterWC.svelte +6 -14
  174. package/src/sdg/components/PivFooter/_pivFooter.html +153 -0
  175. package/src/sdg/{scss/components → components/PivFooter}/_pivFooter.scss +1 -1
  176. package/src/sdg/components/PivHeader/PivHeader.svelte +47 -53
  177. package/src/sdg/components/PivHeader/PivHeaderWC.svelte +9 -20
  178. package/src/sdg/components/PivHeader/Test/pivHeaderEmbeddedTest.html +1 -0
  179. package/src/sdg/components/PivHeader/Test/pivHeaderEmbeddedTest.svelte +28 -0
  180. package/src/sdg/components/PivHeader/Test/pivHeaderTest.html +43 -0
  181. package/src/sdg/components/PivHeader/_pivHeader.html +221 -0
  182. package/src/sdg/{scss/components → components/PivHeader}/_pivHeader.scss +55 -77
  183. package/src/sdg/components/RadioButton/_radioButton.html +24 -0
  184. package/src/sdg/components/RadioButton/_radioButton.scss +29 -0
  185. package/src/sdg/components/SearchBar/SearchBar.svelte +12 -32
  186. package/src/sdg/components/SearchBar/_searchBar.html +125 -0
  187. package/src/sdg/{scss/components → components/SearchBar}/_searchBar.scss +3 -3
  188. package/src/sdg/components/SearchInput/SearchInput.svelte +26 -4
  189. package/src/sdg/components/SearchInput/SearchInputWC.svelte +3 -1
  190. package/src/sdg/components/SearchInput/_searchInput.html +85 -0
  191. package/src/sdg/{scss/components → components/SearchInput}/_searchInput.scss +27 -2
  192. package/src/sdg/components/TextField/Doc/TextFieldDemo.svelte +143 -0
  193. package/src/sdg/components/TextField/Test/TextFieldEmbededTest.svelte +129 -0
  194. package/src/sdg/components/TextField/Test/textFieldEmbeddedTest.html +1 -0
  195. package/src/sdg/components/TextField/Test/textFieldTest.html +121 -0
  196. package/src/sdg/components/TextField/TextField.svelte +171 -0
  197. package/src/sdg/components/TextField/TextFieldWC.svelte +90 -0
  198. package/src/sdg/components/TextField/_textField.html +218 -0
  199. package/src/sdg/components/TextField/_textField.scss +110 -0
  200. package/src/sdg/components/TextField/textFieldUtils.js +19 -0
  201. package/src/sdg/components/ToTop/ToTop.svelte +2 -4
  202. package/src/sdg/components/ToTop/_toTop.html +45 -0
  203. package/src/sdg/{scss/components → components/ToTop}/_toTop.scss +2 -2
  204. package/src/sdg/components/ToggleSwitch/Test/ToggleSwitchEmbeddedTest.svelte +46 -0
  205. package/src/sdg/components/ToggleSwitch/Test/toggleSwitchEmbeddedTest.html +1 -0
  206. package/src/sdg/components/ToggleSwitch/Test/toggleSwitchTest.html +34 -0
  207. package/src/sdg/components/ToggleSwitch/ToggleSwitch.svelte +34 -0
  208. package/src/sdg/components/ToggleSwitch/ToggleSwitchWC.svelte +66 -0
  209. package/src/sdg/components/ToggleSwitch/_toggleSwitch.html +160 -0
  210. package/src/sdg/components/ToggleSwitch/_toggleSwitch.scss +97 -0
  211. package/src/sdg/components/utils.js +81 -1
  212. package/src/sdg/qc-sdg-test.js +6 -0
  213. package/src/sdg/scss/lib/_functions.scss +10 -2
  214. package/src/sdg/scss/lib/_mixins.scss +63 -26
  215. package/src/sdg/scss/qc-sdg.scss +1 -1
  216. package/src/sdg/scss/qc-sgd-no-grid.scss +30 -18
  217. package/src/sdg/scss/settings/_base.scss +5 -33
  218. package/src/sdg/scss/settings/_images.scss +30 -0
  219. package/src/sdg/scss/settings/_tokens.scss +23 -0
  220. package/src/sdg/scss/utilities/_display.scss +1 -1
  221. package/src/sdg/scss/utilities/_states.scss +13 -0
  222. package/tests/button.spec.ts +11 -0
  223. package/tests/choice-group.spec.ts +36 -0
  224. package/tests/dropdown-list.spec.ts +529 -0
  225. package/tests/icon.spec.ts +19 -0
  226. package/tests/pivHeader.spec.ts +22 -0
  227. package/tests/textfield.spec.ts +21 -0
  228. package/tests/toggle-switch.spec.ts +20 -0
  229. package/dist/img/arrow-up-white.svg +0 -3
  230. package/dist/img/chevron-blue.svg +0 -3
  231. package/dist/img/clipboard.svg +0 -8
  232. package/dist/img/error-white.svg +0 -1
  233. package/dist/img/error.svg +0 -1
  234. package/dist/img/exclamation-white.svg +0 -37
  235. package/dist/img/external-link-white.svg +0 -18
  236. package/dist/img/external-link.svg +0 -10
  237. package/dist/img/facebook.svg +0 -6
  238. package/dist/img/information-white.svg +0 -1
  239. package/dist/img/information.svg +0 -1
  240. package/dist/img/linkedin.svg +0 -5
  241. package/dist/img/loupe-piv-fonce.svg +0 -1
  242. package/dist/img/minus.svg +0 -6
  243. package/dist/img/qc-sprite.svg +0 -1
  244. package/dist/img/question-mark.svg +0 -47
  245. package/dist/img/success-white.svg +0 -1
  246. package/dist/img/success.svg +0 -1
  247. package/dist/img/twitter.svg +0 -8
  248. package/dist/img/warning.svg +0 -1
  249. package/dist/img/xclose-blue.svg +0 -6
  250. package/dist/img/xclose-white.svg +0 -1
  251. package/dist/img/youtube.svg +0 -3
  252. package/public/img/ampoule.svg +0 -1
  253. package/public/img/arrow-up-white.svg +0 -3
  254. package/public/img/chevron-blue.svg +0 -3
  255. package/public/img/chevron-white.svg +0 -3
  256. package/public/img/error-white.svg +0 -1
  257. package/public/img/error.svg +0 -1
  258. package/public/img/external-link-white.svg +0 -18
  259. package/public/img/facebook.svg +0 -6
  260. package/public/img/information-white.svg +0 -1
  261. package/public/img/information.svg +0 -1
  262. package/public/img/linkedin.svg +0 -5
  263. package/public/img/logo-piv-footer-mess.png +0 -0
  264. package/public/img/loupe-piv-droite.svg +0 -1
  265. package/public/img/loupe-piv-fonce.svg +0 -1
  266. package/public/img/note.svg +0 -1
  267. package/public/img/piv-bas-MCE-theme-clair.png +0 -0
  268. package/public/img/piv-bas-MCE-theme-sombre.png +0 -0
  269. package/public/img/piv-logo-pied-de-page.svg +0 -37
  270. package/public/img/plus.svg +0 -6
  271. package/public/img/qc-sprite.svg +0 -1
  272. package/public/img/quebec-logo.svg +0 -13
  273. package/public/img/success-white.svg +0 -1
  274. package/public/img/success.svg +0 -1
  275. package/public/img/twitter.svg +0 -8
  276. package/public/img/warning.svg +0 -1
  277. package/public/img/xclose-blue.svg +0 -6
  278. package/public/img/xclose-white.svg +0 -1
  279. package/public/img/youtube.svg +0 -3
  280. package/src/doc/scss/components/_button.scss +0 -61
  281. package/src/sdg/components/PivFooter/_defaultCopyright.svelte +0 -11
  282. package/src/sdg/components/PivHeader/_defaultLinks.svelte +0 -24
  283. package/src/sdg/components/QcCustomElement.js +0 -10
  284. package/src/sdg/scss/base/_fonts.scss +0 -29
  285. package/src/sdg/scss/base/_typography.scss +0 -94
  286. package/src/sdg/scss/components/_icons.scss +0 -169
  287. package/src/sdg/scss/components/_separator.scss +0 -5
  288. /package/dist/img/{loupe-piv-droite.svg → piv-search.svg} +0 -0
  289. /package/src/sdg/{scss/base → bases/colors}/_colors.scss +0 -0
  290. /package/src/sdg/{scss/base → bases/figures}/_figure.scss +0 -0
  291. /package/src/sdg/{scss → bases}/grid/_grid-lib.scss +0 -0
  292. /package/src/sdg/{scss → bases}/grid/_grid.scss +0 -0
  293. /package/src/sdg/{scss/base → bases/lists}/_lists.scss +0 -0
@@ -0,0 +1,23 @@
1
+ export function updateInput(input, required, invalid, compact, selectionButton, inline, name) {
2
+ if (!input ) return;
3
+ if (input.role === "switch") return;
4
+ let label = input.closest('label');
5
+ input.classList.add('qc-choicefield')
6
+ label.classList.add('qc-choicefield-label')
7
+ input.classList.toggle('qc-selection-button', selectionButton)
8
+ label.classList.toggle('qc-selection-button', selectionButton)
9
+ label.classList.toggle('qc-selection-button-inline', inline)
10
+ input.setAttribute('aria-required', required ? 'true' : "false");
11
+ input.setAttribute('aria-invalid', invalid ? 'true' : "false")
12
+ input.classList.toggle('qc-compact', compact ? compact : selectionButton)
13
+ if (name && !input.hasAttribute('name')) {
14
+ input.setAttribute('name', name)
15
+ }
16
+ }
17
+
18
+ export function onChange(input, setInvalid) {
19
+ input.addEventListener(
20
+ 'change',
21
+ () => setInvalid(false)
22
+ )
23
+ }
@@ -0,0 +1,56 @@
1
+ <script>
2
+ import Fieldset from "../Fieldset/Fieldset.svelte";
3
+ import {onMount} from "svelte";
4
+ import {updateInput} from "../Checkbox/updateInput.svelte";
5
+
6
+ let {
7
+ invalid = $bindable(false),
8
+ invalidText,
9
+ children,
10
+ compact = false,
11
+ selectionButton = false,
12
+ inline = false,
13
+ host,
14
+ name,
15
+ required,
16
+ ...restProps
17
+ } = $props();
18
+ let fieldsetElement = $state();
19
+
20
+ let onchange = e => {
21
+ if (invalid && e.target.checked) {
22
+ invalid = false;
23
+ }
24
+ }
25
+ $effect(() => {
26
+ (host ? host : fieldsetElement)
27
+ .querySelectorAll('input, .qc-choicefield')
28
+ .forEach(
29
+ input =>
30
+ updateInput(
31
+ input,
32
+ required,
33
+ invalid,
34
+ compact,
35
+ selectionButton,
36
+ inline,
37
+ name)
38
+ )
39
+ })
40
+
41
+
42
+ </script>
43
+ <Fieldset
44
+ {required}
45
+ {compact}
46
+ {selectionButton}
47
+ {inline}
48
+ bind:invalid
49
+ {invalidText}
50
+ {onchange}
51
+ bind:rootElement={fieldsetElement}
52
+ {...restProps}
53
+ >
54
+ {@render children()}
55
+ </Fieldset>
56
+
@@ -0,0 +1,47 @@
1
+ <svelte:options customElement="{{
2
+ tag: 'qc-choice-group',
3
+ props: {
4
+ name: {attribute: 'name', type: 'String'},
5
+ legend: {attribute:'legend', type: 'String'},
6
+ compact: {attribute:'compact', type: 'Boolean'},
7
+ required: {attribute: 'required', type: 'Boolean'},
8
+ invalid: {attribute: 'invalid', type: 'Boolean'},
9
+ invalidText: {attribute: 'invalid-text', type: 'String'},
10
+ selectionButton: {attribute: 'selection-button', type: 'Boolean'},
11
+ columnCount: {attribute: 'column-count', type: 'String'},
12
+ inline: {attribute: 'inline', type: 'Boolean'}
13
+ }
14
+ }}" />
15
+
16
+ <script>
17
+ import ChoiceGroup from "./ChoiceGroup.svelte";
18
+ import {Utils} from "../utils";
19
+
20
+ let {
21
+ name,
22
+ legend,
23
+ compact,
24
+ required,
25
+ invalid = $bindable(false),
26
+ invalidText,
27
+ selectionButton,
28
+ columnCount,
29
+ inline
30
+ } = $props();
31
+
32
+ </script>
33
+ <ChoiceGroup
34
+ {name}
35
+ {legend}
36
+ {compact}
37
+ {required}
38
+ bind:invalid
39
+ {invalidText}
40
+ {selectionButton}
41
+ {columnCount}
42
+ {inline}
43
+ host={$host()}
44
+ >
45
+ <slot/>
46
+ </ChoiceGroup>
47
+ <link rel='stylesheet' href='{Utils.cssPath}'>
@@ -0,0 +1,261 @@
1
+ <svelte:options customElement={{
2
+ tag: 'qc-choicegroup-embedded-test'
3
+ }}/>
4
+ <script>
5
+
6
+ import {Utils} from '../../utils.js';
7
+ import ChoiceGroup from "../ChoiceGroup.svelte";
8
+ import Checkbox from "../../Checkbox/Checkbox.svelte";
9
+ let {type} = $props()
10
+ </script>
11
+
12
+ <ChoiceGroup legend="Boutons de sélection"
13
+ selectionButton
14
+ columnCount="2"
15
+ name="tile-1"
16
+ >
17
+ <label>
18
+ <input {type}
19
+
20
+ value="1"
21
+ checked
22
+ />
23
+ <span class="qc-tile">
24
+ <span class="qc-tile-text">Option 1</span>
25
+ <span class="qc-tile-description">Ceci est une <b>longue</b> description servant à montrer l'affichage des boutons de sélection.</span>
26
+ </span>
27
+ </label>
28
+
29
+ <label>
30
+ <input {type}
31
+
32
+ value="2"
33
+ />
34
+ <span class="qc-tile">
35
+ <span class="qc-tile-text">Option 2</span>
36
+ </span>
37
+ </label>
38
+ <label>
39
+ <input {type}
40
+
41
+ value="3"
42
+ disabled
43
+ />
44
+ <span class="qc-tile">
45
+ <span class="qc-tile-text">Option 3 (désactivée)</span>
46
+ </span>
47
+ </label>
48
+ </ChoiceGroup>
49
+
50
+ <ChoiceGroup legend="Boutons de sélection inline"
51
+ name="tile-2"
52
+ selectionButton
53
+ inline
54
+ columnCount="2"
55
+ >
56
+ <label>
57
+ <input {type}
58
+
59
+ value="1"
60
+ checked
61
+ />
62
+ <span class="qc-tile">
63
+ <span class="qc-tile-text">Option 1</span>
64
+ </span>
65
+ </label>
66
+
67
+ <label>
68
+ <input {type}
69
+
70
+ value="2"
71
+ />
72
+ <span class="qc-tile">
73
+ <span class="qc-tile-text">Option 2</span>
74
+ </span>
75
+ </label>
76
+ <label>
77
+ <input {type}
78
+
79
+ value="3"
80
+ disabled
81
+ />
82
+ <span class="qc-tile">
83
+ <span class="qc-tile-text">Option 3 (désactivée)</span>
84
+ </span>
85
+ </label>
86
+ </ChoiceGroup>
87
+
88
+ <div class="qc-row">
89
+ <div class="qc-col-sm-12 qc-col-lg-6">
90
+ {#if type === 'checkbox'}
91
+ <Checkbox>
92
+ <label>
93
+ <input {type}
94
+ name="consentement-1"
95
+ value="oui"
96
+ />
97
+ <span >J’accepte les conditions d’utilisation</span>
98
+ </label>
99
+ </Checkbox>
100
+
101
+ <Checkbox
102
+ required
103
+ invalid
104
+ invalidText="Veuillez accepter les conditions d’utilisation"
105
+ >
106
+ <label>
107
+ <input {type}
108
+ name="consentement-2"
109
+ value="oui"
110
+ />
111
+ <span >J’accepte les conditions d’utilisation</span>
112
+ </label>
113
+ </Checkbox>
114
+ {/if}
115
+
116
+ <ChoiceGroup legend="Exemple de base"
117
+ name="base-1"
118
+ >
119
+ <label>
120
+ <input {type}
121
+
122
+ value="1"
123
+ checked
124
+ />
125
+ <span >Option 1</span>
126
+ </label>
127
+ <label>
128
+ <input {type}
129
+
130
+ value="2"
131
+ />
132
+ <span >Option 2</span>
133
+ </label>
134
+ <label>
135
+ <input {type}
136
+
137
+ value="3"
138
+ disabled
139
+ />
140
+ <span >Option 3 (désactivée)</span>
141
+ </label>
142
+ </ChoiceGroup>
143
+
144
+ <ChoiceGroup legend="Invalid"
145
+ name="base-2"
146
+ invalid
147
+ required
148
+ >
149
+ <label>
150
+ <input {type}
151
+ value="1"
152
+
153
+ />
154
+ <span >Option 1</span>
155
+ </label>
156
+ <label>
157
+ <input {type}
158
+
159
+ value="2"
160
+ />
161
+ <span >Option 2</span>
162
+ </label>
163
+ <label>
164
+ <input {type}
165
+ value="3"
166
+ disabled
167
+ />
168
+ <span >Option 3 (désactivée)</span>
169
+ </label>
170
+ </ChoiceGroup>
171
+ </div>
172
+ <div class="qc-col-sm-12 qc-col-lg-6">
173
+ {#if type === 'checkbox'}
174
+ <Checkbox compact >
175
+ <label>
176
+ <input {type}
177
+ name="consentement-compact-1"
178
+ value="oui"
179
+ />
180
+ <span >J’accepte les conditions d’utilisation</span>
181
+ </label>
182
+ </Checkbox>
183
+
184
+
185
+
186
+ <Checkbox
187
+ compact
188
+ invalid
189
+ required
190
+ invalidText="Veuillez accepter les conditions d’utilisation"
191
+ >
192
+ <label>
193
+ <input {type}
194
+ name="consentement-compact-2"
195
+ value="oui"
196
+ />
197
+ <span >J’accepte les conditions d’utilisation</span>
198
+ </label>
199
+ </Checkbox>
200
+ {/if}
201
+
202
+ <ChoiceGroup legend="Compact"
203
+ name="compact-1"
204
+ compact
205
+ >
206
+ <label>
207
+ <input {type}
208
+ value="1"
209
+ checked
210
+ />
211
+ <span >Option 1</span>
212
+ </label>
213
+ <label>
214
+ <input {type}
215
+
216
+ value="2"
217
+ />
218
+ <span >Option 2</span>
219
+ </label>
220
+ <label>
221
+ <input {type}
222
+
223
+ value="3"
224
+ disabled
225
+ />
226
+ <span >Option 3 (désactivée)</span>
227
+ </label>
228
+ </ChoiceGroup>
229
+
230
+ <ChoiceGroup legend="Invalid"
231
+ name="compact-2"
232
+ compact
233
+ invalid
234
+ required
235
+ >
236
+ <label>
237
+ <input {type}
238
+
239
+ value="1"
240
+ />
241
+ <span >Option 1</span>
242
+ </label>
243
+ <label>
244
+ <input {type}
245
+
246
+ value="2"
247
+ />
248
+ <span >Option 2</span>
249
+ </label>
250
+ <label>
251
+ <input {type}
252
+
253
+ value="3"
254
+ disabled
255
+ />
256
+ <span >Option 3 (désactivée)</span>
257
+ </label>
258
+ </ChoiceGroup>
259
+ </div>
260
+ </div>
261
+ <link rel='stylesheet' href='{Utils.cssPath}'>
@@ -0,0 +1 @@
1
+ <qc-choicegroup-embedded-test type="checkbox"></qc-choicegroup-embedded-test>
@@ -0,0 +1,253 @@
1
+
2
+ <qc-choice-group legend="Boutons de sélection"
3
+ selection-button
4
+ column-count="2"
5
+ name="tile-1"
6
+ >
7
+ <label>
8
+ <input type="checkbox"
9
+
10
+ value="1"
11
+ checked
12
+ />
13
+ <span class="qc-tile">
14
+ <span class="qc-tile-text">Option 1</span>
15
+ <span class="qc-tile-description">Ceci est une <b>longue</b> description servant à montrer l'affichage des boutons de sélection.</span>
16
+ </span>
17
+ </label>
18
+
19
+ <label>
20
+ <input type="checkbox"
21
+
22
+ value="2"
23
+ />
24
+ <span class="qc-tile">
25
+ <span class="qc-tile-text">Option 2</span>
26
+ </span>
27
+ </label>
28
+ <label>
29
+ <input type="checkbox"
30
+
31
+ value="3"
32
+ disabled
33
+ />
34
+ <span class="qc-tile">
35
+ <span class="qc-tile-text">Option 3 (désactivée)</span>
36
+ </span>
37
+ </label>
38
+ </qc-choice-group>
39
+
40
+ <qc-choice-group legend="Boutons de sélection inline"
41
+ name="tile-2"
42
+ selection-button
43
+ inline
44
+ column-count="2"
45
+ >
46
+ <label>
47
+ <input type="checkbox"
48
+
49
+ value="1"
50
+ checked
51
+ />
52
+ <span class="qc-tile">
53
+ <span class="qc-tile-text">Option 1</span>
54
+ </span>
55
+ </label>
56
+
57
+ <label>
58
+ <input type="checkbox"
59
+
60
+ value="2"
61
+ />
62
+ <span class="qc-tile">
63
+ <span class="qc-tile-text">Option 2</span>
64
+ </span>
65
+ </label>
66
+ <label>
67
+ <input type="checkbox"
68
+
69
+ value="3"
70
+ disabled
71
+ />
72
+ <span class="qc-tile">
73
+ <span class="qc-tile-text">Option 3 (désactivée)</span>
74
+ </span>
75
+ </label>
76
+ </qc-choice-group>
77
+
78
+ <div class="qc-row">
79
+ <div class="qc-col-sm-12 qc-col-lg-6">
80
+ <qc-checkbox>
81
+ <label>
82
+ <input type="checkbox"
83
+ name="consentement-1"
84
+ value="oui"
85
+ />
86
+ <span >J’accepte les conditions d’utilisation</span>
87
+ </label>
88
+ </qc-checkbox>
89
+
90
+ <qc-checkbox
91
+ required
92
+ invalid
93
+ invalid-text="Veuillez accepter les conditions d’utilisation"
94
+ >
95
+ <label>
96
+ <input type="checkbox"
97
+ name="consentement-2"
98
+ value="oui"
99
+ />
100
+ <span>J’accepte les conditions d’utilisation</span>
101
+ </label>
102
+ </qc-checkbox>
103
+
104
+
105
+ <qc-choice-group legend="Exemple de base"
106
+ name="base-1"
107
+ >
108
+ <label>
109
+ <input type="checkbox"
110
+
111
+ value="1"
112
+ checked
113
+ />
114
+ <span >Option 1</span>
115
+ </label>
116
+ <label>
117
+ <input type="checkbox"
118
+
119
+ value="2"
120
+ />
121
+ <span >Option 2</span>
122
+ </label>
123
+ <label>
124
+ <input type="checkbox"
125
+
126
+ value="3"
127
+ disabled
128
+ />
129
+ <span >Option 3 (désactivée)</span>
130
+ </label>
131
+ </qc-choice-group>
132
+
133
+ <qc-choice-group legend="Invalid"
134
+ name="base-2"
135
+ invalid
136
+ required
137
+ >
138
+ <label>
139
+ <input type="checkbox"
140
+ value="1"
141
+
142
+ />
143
+ <span >Option 1</span>
144
+ </label>
145
+ <label>
146
+ <input type="checkbox"
147
+
148
+ value="2"
149
+ />
150
+ <span >Option 2</span>
151
+ </label>
152
+ <label>
153
+ <input type="checkbox"
154
+
155
+ value="3"
156
+ disabled
157
+ />
158
+ <span >Option 3 (désactivée)</span>
159
+ </label>
160
+ </qc-choice-group>
161
+ </div>
162
+ <div class="qc-col-sm-12 qc-col-lg-6">
163
+ <qc-checkbox compact
164
+ >
165
+ <label>
166
+ <input type="checkbox"
167
+ name="consentement-compact-1"
168
+ value="oui"
169
+ />
170
+ <span >J’accepte les conditions d’utilisation</span>
171
+ </label>
172
+ </qc-checkbox>
173
+
174
+
175
+
176
+ <qc-checkbox
177
+ compact
178
+ invalid
179
+ required
180
+ invalid-text="Veuillez accepter les conditions d’utilisation"
181
+ >
182
+ <label>
183
+ <input type="checkbox"
184
+ name="consentement-compact-2"
185
+ value="oui"
186
+ />
187
+ <span >J’accepte les conditions d’utilisation</span>
188
+ </label>
189
+ </qc-checkbox>
190
+
191
+ <qc-choice-group legend="Compact"
192
+ name="compact-1"
193
+ compact
194
+ >
195
+ <label>
196
+ <input type="checkbox"
197
+
198
+ value="1"
199
+ checked
200
+ />
201
+ <span >Option 1</span>
202
+ </label>
203
+ <label>
204
+ <input type="checkbox"
205
+
206
+ value="2"
207
+ />
208
+ <span >Option 2</span>
209
+ </label>
210
+ <label>
211
+ <input type="checkbox"
212
+
213
+ value="3"
214
+ disabled
215
+ />
216
+ <span >Option 3 (désactivée)</span>
217
+ </label>
218
+ </qc-choice-group>
219
+
220
+ <qc-choice-group legend="Invalid"
221
+ name="compact-2"
222
+ compact
223
+ invalid
224
+ required
225
+ >
226
+ <label>
227
+ <input type="checkbox"
228
+
229
+ value="1"
230
+ />
231
+ <span >Option 1</span>
232
+ </label>
233
+ <label>
234
+ <input type="checkbox"
235
+
236
+ value="2"
237
+ />
238
+ <span >Option 2</span>
239
+ </label>
240
+ <label>
241
+ <input type="checkbox"
242
+
243
+ value="3"
244
+ disabled
245
+ />
246
+ <span >Option 3 (désactivée)</span>
247
+ </label>
248
+ </qc-choice-group>
249
+ </div>
250
+ </div>
251
+
252
+
253
+
@@ -0,0 +1 @@
1
+ <qc-choicegroup-embedded-test type="radio"></qc-choicegroup-embedded-test>