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.
Files changed (292) 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/scss/base/_fonts.scss +0 -29
  284. package/src/sdg/scss/base/_typography.scss +0 -94
  285. package/src/sdg/scss/components/_icons.scss +0 -169
  286. package/src/sdg/scss/components/_separator.scss +0 -5
  287. /package/dist/img/{loupe-piv-droite.svg → piv-search.svg} +0 -0
  288. /package/src/sdg/{scss/base → bases/colors}/_colors.scss +0 -0
  289. /package/src/sdg/{scss/base → bases/figures}/_figure.scss +0 -0
  290. /package/src/sdg/{scss → bases}/grid/_grid-lib.scss +0 -0
  291. /package/src/sdg/{scss → bases}/grid/_grid.scss +0 -0
  292. /package/src/sdg/{scss/base → bases/lists}/_lists.scss +0 -0
@@ -24,29 +24,21 @@
24
24
  }}" />
25
25
 
26
26
  <script>
27
- import { Utils } from "../utils";
28
27
  import PivFooter from "./PivFooter.svelte";
29
- import DefaultCopyright from "./_defaultCopyright.svelte";
30
-
31
- const lang = Utils.getPageLanguage();
28
+ import { Utils } from "../utils"
32
29
 
33
30
  let {
34
- copyrightText,
35
- copyrightUrl,
36
31
  self,
37
- slots,
38
- defaultSlot,
39
32
  ...props
40
33
  } = $props();
41
- $inspect(self,slots,defaultSlot);
34
+
42
35
  </script>
43
- <PivFooter {...props} >
36
+ <PivFooter {...props} slots={$$slots}>
44
37
  {#snippet mainSlot()}
45
38
  <slot />
46
39
  {/snippet}
47
40
  {#snippet copyrightSlot()}
48
- <slot name="copyright">
49
- <DefaultCopyright {copyrightText} {copyrightUrl} />
50
- </slot>
41
+ <slot name="copyright" />
51
42
  {/snippet}
52
- </PivFooter>
43
+ </PivFooter>
44
+ <link rel='stylesheet' href='{Utils.cssPath}'>
@@ -0,0 +1,153 @@
1
+ <h2 id="piv-footer">Pied de page du PIV (qc-piv-footer)</h2>
2
+
3
+ <h3>Exemples</h3>
4
+
5
+
6
+ <qc-doc-exemple id="piv-footer-1"
7
+ caption="Exemple de pied de page du PIV de base">
8
+ <qc-piv-footer>
9
+ <nav aria-label="Navigation du pied de page">
10
+ <ul>
11
+ <li><a href="/">Accessibilité</a></li>
12
+ <li><a href="/">Plan du site</a></li>
13
+ <li><a href="/">Accès à l’information</a></li>
14
+ <li><a href="/">Politique de confidentialité</a></li>
15
+ <li><a href="/">Conditions d’utilisation</a></li>
16
+ <li><a href="/">À propos de Québec.ca</a></li>
17
+ </ul>
18
+ </nav>
19
+ </qc-piv-footer>
20
+ </qc-doc-exemple>
21
+ <!-- <qc-code target-id="piv-footer-1"></qc-code>-->
22
+
23
+ <qc-doc-exemple id="piv-footer-ex-2"
24
+ caption="Exemple de pied de page du PIV personnalisé."
25
+ >
26
+ <qc-piv-footer
27
+ logo-src="img/piv-MCE-theme-clair.svg"
28
+ logo-src-dark-theme="img/piv-MCE-theme-sombre.svg"
29
+ >
30
+ <nav aria-label="Navigation du pied de page">
31
+ <ul>
32
+ <li><a href="/">Accès à l’information</a></li>
33
+ <li><a href="/">Politique de confidentialité</a></li>
34
+ </ul>
35
+ </nav>
36
+ <qc-external-link slot="copyright">
37
+ <a
38
+ target="_blank"
39
+ rel="noopener"
40
+ href="https://www.quebec.ca/droit-auteur">
41
+ © Gouvernement du Québec, 2023
42
+ </a>
43
+ </qc-external-link>
44
+ </qc-piv-footer>
45
+ </qc-doc-exemple>
46
+ <!-- <qc-code target-id="piv-footer-ex-2"></qc-code>-->
47
+
48
+ <h3>Documentation technique</h3>
49
+
50
+ <h4>Attributs</h4>
51
+ <div class="table-overflow">
52
+ <table class="qc-table qc-striped component-attributes-description">
53
+ <thead>
54
+ <tr>
55
+ <th>Nom</th>
56
+ <th>Valeur attendue</th>
57
+ <th>Valeur par défaut</th>
58
+ <th>Description</th>
59
+ </tr>
60
+ </thead>
61
+ <tbody>
62
+ <tr>
63
+ <td>logo-url</td>
64
+ <td>Adresse du lien au clic sur l’image</td>
65
+ <td>/</td>
66
+ <td>Cible du lien contenant le logo</td>
67
+ </tr>
68
+ <tr>
69
+ <td>logo-src</td>
70
+ <td>Le chemin de l’image en thème clair.</td>
71
+ <td>Le chemin vers l’image dist/img/QUEBEC_couleur.svg de la trousse</td>
72
+ <td>Adresse de l’image du pied de page en thème clair (fond transparent, texte et drapeaux en
73
+ couleur, voir <a href="#piv-footer-ex-2">l’exemple de pied de page PIV personnalisé</a>).
74
+ </td>
75
+ </tr>
76
+ <tr>
77
+ <td>logo-src-dark-theme</td>
78
+ <td>Le chemin de l’image en thème sombre.</td>
79
+ <td>Le chemin vers l’image dist/img/QUEBEC_blanc.svg de la trousse</td>
80
+ <td>Adresse de l’image du pied de page en thème sombre (fond transparent, texte et drapeaux en
81
+ blanc, voir <a href="#piv-footer-ex-2">l’exemple de pied de page PIV personnalisé</a>).
82
+ </td>
83
+ </tr>
84
+ <tr>
85
+ <td>logo-alt</td>
86
+ <td>Texte</td>
87
+ <td>
88
+ <dl>
89
+ <dt>Français</dt>
90
+ <dd>Logo du gouvernement du Québec</dd>
91
+ <dt>Anglais</dt>
92
+ <dd>Logo of government of Québec</dd>
93
+ </dl>
94
+ </td>
95
+ <td>Texte alternatif du logo pour les lecteurs d’écran</td>
96
+ </tr>
97
+ <tr>
98
+ <td>logo-width</td>
99
+ <td>Nombre</td>
100
+ <td>139</td>
101
+ <td>Largeur de l’image en px</td>
102
+ </tr>
103
+ <tr>
104
+ <td>logo-height</td>
105
+ <td>Nombre</td>
106
+ <td>35</td>
107
+ <td>Hauteur de l’image en px</td>
108
+ </tr>
109
+ <tr>
110
+ <td>copyright-text</td>
111
+ <td>Texte</td>
112
+ <td>© Gouvernement du Québec, &lt;année en cours AAAA&gt;</td>
113
+ <td>Texte du lien de droit d'auteur affiché dans le pied de page.</td>
114
+ </tr>
115
+ <tr>
116
+ <td>copyright-url</td>
117
+ <td>Adresse</td>
118
+ <td>
119
+ <dl>
120
+ <dt>Français</dt>
121
+ <dd>https://www.quebec.ca/droit-auteur</dd>
122
+ <dt>Anglais</dt>
123
+ <dd>https://www.quebec.ca/en/copyright</dd>
124
+ </dl>
125
+ </td>
126
+ <td>L’adresse de la page du droit d’auteur sur quebec.ca</td>
127
+ </tr>
128
+ </tbody>
129
+ </table>
130
+ </div>
131
+
132
+ <qc-notice type="information">Les images du pied de page PIV doivent respecter
133
+ <qc-external-link><a href="https://www.piv.gouv.qc.ca/fileadmin/documents/guide/section1_general.pdf">les
134
+ normes graphiques du système d’identification visuelle.</a>. Nous vous invitons à privilégier le format
135
+ SVG, qui permet de conserver la lisibilité de l’image en cas de zoom.
136
+ </qc-external-link>
137
+ </qc-notice>
138
+
139
+ <h4>Zones d’ajout de contenu HTML</h4>
140
+
141
+ <p>Ci-dessous, les zones d’ajout de contenu HTML (balise &lt;slot&gt;) délimitées en pointillé.</p>
142
+ <qc-doc-exemple id="qc-piv-footer-slots"
143
+ caption="Présentation des zones d’ajout de contenu du pied de page PIV">
144
+ <qc-piv-footer>
145
+ <div style="border:2px dashed;padding: var(--qc-spacer-xs);">
146
+ Contenu par défaut
147
+ </div>
148
+ <div slot="copyright"
149
+ style="border:2px dashed;padding: var(--qc-spacer-xs);">
150
+ slot="copyright"
151
+ </div>
152
+ </qc-piv-footer>
153
+ </qc-doc-exemple>
@@ -1,4 +1,4 @@
1
- @use "qc-sdg-lib" as *;
1
+ @use "../../scss/qc-sdg-lib" as *;
2
2
  @use "sass:math";
3
3
 
4
4
  @mixin pivLinks() {
@@ -1,23 +1,22 @@
1
1
  <script>
2
2
  import { onMount, tick } from "svelte";
3
3
  import { Utils } from "../utils"
4
- import DefaultLinks from "./_defaultLinks.svelte"
5
4
 
6
5
  const lang = Utils.getPageLanguage();
7
6
 
8
7
  let {
9
- self,
8
+ customElementParent,
10
9
  logoUrl = '/',
11
10
  fullWidth = 'false',
12
11
  logoSrc = Utils.imagesRelativePath + 'QUEBEC_blanc.svg',
13
12
  logoAlt = lang === 'fr' ? 'Logo du gouvernement du Québec' : 'Logo of government of Québec',
14
13
  titleUrl = '/',
15
14
  titleText = '',
16
- linksLabel,
17
- altLanguageText,
18
- altLanguageUrl,
19
- joinUsText,
20
- joinUsUrl,
15
+ joinUsText = lang === 'fr' ? 'Nous joindre' : 'Contact us',
16
+ joinUsUrl = '',
17
+ altLanguageText = lang === 'fr' ? 'English' : 'Français',
18
+ altLanguageUrl = '',
19
+ linksLabel = lang === 'fr' ? 'Navigation PIV' : 'PIV navigation',
21
20
  goToContent = 'true',
22
21
  goToContentAnchor = '#main',
23
22
  goToContentText = lang === 'fr' ? 'Passer au contenu' : 'Skip to content',
@@ -25,36 +24,24 @@
25
24
  hideSearchText = lang === 'fr' ? 'Masquer la barre de recherche' : 'Hide search bar',
26
25
  enableSearch = 'false',
27
26
  showSearch = 'false',
28
- links,
29
- search
27
+ linksSlot,
28
+ searchZoneSlot,
29
+ slots = false
30
30
  } = $props()
31
- console.log('PivHeader self', self);
31
+
32
32
  let containerClass = $state('qc-container')
33
33
  , searchZone = $state(null)
34
- , displaySearchForm = $state(false);
35
-
36
- // $effect(_ => {
37
- // if (displaySearchForm) {
38
- // let input = self
39
- // ? self.querySelector('[slot="search-zone"] input')
40
- // : searchZone.querySelector('input')
41
- // ;
42
- // input?.focus();
43
- // }
44
- // })
45
- $inspect(self)
34
+ , displaySearchForm = $state(false)
35
+ ;
46
36
 
47
37
  function focusOnSearchInput() {
48
38
 
49
39
  if (displaySearchForm) {
50
-
51
- let input = self
52
- ? self.querySelector('[slot="search-zone"] input')
40
+ let input = customElementParent
41
+ ? customElementParent.querySelector('[slot="search-zone"] input')
53
42
  : searchZone.querySelector('input')
54
43
  ;
55
- console.log('focusOnSearchInput', self, searchZone, input );
56
44
  input?.focus();
57
-
58
45
  }
59
46
  }
60
47
 
@@ -79,28 +66,26 @@
79
66
  </a>
80
67
  </div>
81
68
  {/if}
69
+ {#snippet title()}
70
+ {#if titleUrl && titleText}
71
+ <div class="title">
72
+ <a href="{titleUrl}">
73
+ {titleText}
74
+ </a>
75
+ </div>
76
+ {/if}
77
+ {/snippet}
78
+ <div class="piv-top">
82
79
 
83
- <div class="piv-top">
84
- <div class="signature-group">
85
- <a href="{logoUrl}"
86
- class="logo"
80
+ <a href="{logoUrl}"
81
+ class="logo"
87
82
  rel="noreferrer"
88
83
  aria-label="{logoAlt}"
89
84
  >
90
85
  <div role="img"></div>
91
- </a>
92
-
93
- {#if titleText}
94
- <div class="title">
95
- <a href="{titleUrl}"
96
- class="title">
97
- {titleText}
98
- </a>
99
- </div>
100
-
101
- {/if}
102
- </div>
86
+ </a>
103
87
 
88
+ {@render title()}
104
89
  <div class="right-section">
105
90
  {#if Utils.isTruthy(enableSearch)}
106
91
  <a class="qc-search"
@@ -118,27 +103,36 @@
118
103
  </a>
119
104
  {/if}
120
105
  <div class="links">
121
- {#if links}
122
- {@render links()}
106
+ {#if (!slots || slots['links']) && linksSlot }
107
+ {@render linksSlot()}
123
108
  <!-- Le bloc else est present uniquement pour le cas ou PivHeader est utilise sans le wrapper PivHeaderWC.svelte -->
124
109
  {:else}
125
- <DefaultLinks {joinUsUrl}
126
- {joinUsText}
127
- {altLanguageUrl}
128
- {altLanguageText}
129
- {linksLabel}/>
110
+ {#if joinUsUrl || altLanguageUrl}
111
+ <nav aria-label="{linksLabel}">
112
+ <ul>
113
+ {#if altLanguageUrl}
114
+ <li><a href="{altLanguageUrl}">{altLanguageText}</a></li>
115
+ {/if}
116
+ {#if joinUsUrl}
117
+ <li><a href="{joinUsUrl}">{joinUsText}</a></li>
118
+ {/if}
119
+ </ul>
120
+ </nav>
121
+ {/if}
130
122
  {/if}
131
123
  </div>
132
124
  </div>
133
125
  </div>
126
+ {@render title()}
134
127
 
135
- <div class="piv-bottom">
128
+ <div class="piv-bottom">
136
129
  {#if displaySearchForm}
137
130
  <div class="search-zone" bind:this={searchZone}>
138
- {@render search?.()}
131
+ {#if searchZoneSlot}
132
+ {@render searchZoneSlot()}
133
+ {/if}
139
134
  </div>
140
135
  {/if}
141
136
  </div>
142
137
  </div>
143
138
  </div>
144
- <link rel='stylesheet' href='{Utils.cssPath}'>
@@ -33,36 +33,25 @@
33
33
  }}" />
34
34
 
35
35
  <script>
36
- import { Utils } from "../utils";
37
36
  import PivHeader from "./PivHeader.svelte";
38
- import DefaultLinks from "./_defaultLinks.svelte";
39
-
40
- const lang = Utils.getPageLanguage();
37
+ import { Utils } from "../utils"
41
38
 
42
39
  let {
43
40
  self,
44
- joinUsText,
45
- joinUsUrl,
46
- altLanguageText,
47
- altLanguageUrl,
48
- linksLabel,
49
41
  ...props
50
42
  } = $props()
51
43
 
52
44
  </script>
53
45
 
54
- <PivHeader {self} {...props}>
55
- {#snippet links()}
56
- <slot name="links">
57
- <DefaultLinks {joinUsUrl}
58
- {joinUsText}
59
- {altLanguageUrl}
60
- {altLanguageText}
61
- {linksLabel}/>
62
- </slot>
46
+ <PivHeader customElementParent={self}
47
+ {...props}
48
+ slots={$$slots} >
49
+ {#snippet linksSlot()}
50
+ <slot name="links" />
63
51
  {/snippet}
64
-
65
- {#snippet search()}
52
+ {#snippet searchZoneSlot()}
66
53
  <slot name="search-zone" />
67
54
  {/snippet}
68
55
  </PivHeader>
56
+ <link rel='stylesheet' href='{Utils.cssPath}'>
57
+
@@ -0,0 +1 @@
1
+ <qc-piv-header-embedded-test></qc-piv-header-embedded-test>
@@ -0,0 +1,28 @@
1
+ <svelte:options customElement={{
2
+ tag: 'qc-piv-header-embedded-test',
3
+ shadow: "none",
4
+ }}/>
5
+
6
+ <script>
7
+ import PivHeader from "../PivHeader.svelte";
8
+ import { Utils } from '../../utils.js';
9
+ </script>
10
+
11
+ {#snippet linksSlot()}
12
+ <nav aria-label="Navigation PIV">
13
+ <ul>
14
+ <li><a href="#fakeEnglish">English</a>
15
+ </li>
16
+ <li><a href="javascript:;">Nous joindre</a>
17
+ </li>
18
+ </ul>
19
+ </nav>
20
+ {/snippet}
21
+
22
+ <PivHeader logoAlt="Accédez à Québec.ca" joinUsUrl="#join-us" altLanguageUrl="#fakeEnglish" {linksSlot}></PivHeader>
23
+
24
+ <br>
25
+
26
+ <PivHeader titleText="Titre du site ou du service" titleUrl="https://www.quebec.ca/" logoAlt="Accédez à Québec.ca" {linksSlot}></PivHeader>
27
+
28
+ <link rel='stylesheet' href='{Utils.cssPath}'>
@@ -0,0 +1,43 @@
1
+ <qc-piv-header alt-logo="Accédez à Québec.ca"
2
+ join-us-url="#join-us"
3
+ alt-language-url="#fakeEnglish">
4
+ </qc-piv-header>
5
+
6
+ <br>
7
+
8
+ <qc-piv-header title-text="Titre du site ou du service"
9
+ title-url="https://www.quebec.ca/"
10
+ alt-logo="Accédez à Québec.ca">
11
+ <nav slot="links"
12
+ aria-label="Navigation PIV">
13
+ <ul>
14
+ <li><a href="#fakeEnglish">English</a>
15
+ </li>
16
+ <li><a href="javascript:;">Nous joindre</a>
17
+ </li>
18
+ </ul>
19
+ </nav>
20
+ </qc-piv-header>
21
+
22
+ <br>
23
+
24
+ <div id="pivEnteteExempleRecherchePersonnalisee">
25
+ <qc-piv-header title-text="Titre du site ou du service"
26
+ alt-logo="Accédez à Québec.ca"
27
+ enable-search="true"
28
+ show-search="true">
29
+ <ul slot="links">
30
+ <li><a href="#fakeEnglish">English</a>
31
+ </li>
32
+ <li><a href="javascript:;">Nous joindre</a>
33
+ </li>
34
+ </ul>
35
+
36
+ <form slot="search-zone"
37
+ method="get"
38
+ action="https://www.google.ca/search">
39
+ <qc-search-bar name="q"
40
+ piv-background=""></qc-search-bar>
41
+ </form>
42
+ </qc-piv-header>
43
+ </div>