qc-trousse-sdg 1.4.6 → 1.4.7

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 (57) hide show
  1. package/README.md +10 -0
  2. package/dist/css/qc-sdg-no-grid.min.css +1 -1
  3. package/dist/css/qc-sdg.min.css +1 -1
  4. package/dist/js/qc-sdg.min.js +1 -1
  5. package/package-lock.json +4689 -0
  6. package/package.json +1 -1
  7. package/public/css/qc-doc-sdg.css +38 -6
  8. package/public/css/qc-sdg-no-grid.css +47 -20
  9. package/public/css/qc-sdg.css +47 -20
  10. package/public/index.html +58 -20
  11. package/public/js/qc-doc-sdg.js +294 -204
  12. package/public/js/qc-sdg.js +663 -315
  13. package/src/doc/qc-doc-sdg.js +6 -1
  14. package/src/doc/scss/components/_exemple.scss +5 -1
  15. package/src/doc/scss/qc-doc-sdg.scss +22 -4
  16. package/src/sdg/bases/Icon/Icon.svelte +2 -0
  17. package/src/sdg/bases/links/_links.scss +18 -12
  18. package/src/sdg/components/Alert/Alert.svelte +28 -9
  19. package/src/sdg/components/Alert/AlertWC.svelte +20 -5
  20. package/src/sdg/components/Alert/Test/AlertSvelteTest.svelte +25 -0
  21. package/src/sdg/components/Alert/Test/alertBaselineTest.html +13 -0
  22. package/src/sdg/components/Alert/Test/alertSvelteTest.html +1 -0
  23. package/src/sdg/components/Alert/_alert.html +23 -11
  24. package/src/sdg/components/Checkbox/Checkbox.svelte +6 -5
  25. package/src/sdg/components/DropdownList/DropdownList.svelte +65 -14
  26. package/src/sdg/components/DropdownList/DropdownListButton/DropdownListButton.svelte +2 -6
  27. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItems.svelte +4 -22
  28. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsMultiple/DropdownListItemsMultiple.svelte +2 -1
  29. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsSingle/DropdownListItemsSingle.svelte +2 -1
  30. package/src/sdg/components/DropdownList/SelectWC.svelte +39 -13
  31. package/src/sdg/components/DropdownList/Test/DropdownListSvelteTest.svelte +2 -2
  32. package/src/sdg/components/DropdownList/Test/dropdownListBaselineTest.html +7 -0
  33. package/src/sdg/components/DropdownList/_dropdownList.scss +7 -5
  34. package/src/sdg/components/DropdownList/_select.html +31 -5
  35. package/src/sdg/components/ExternalLink/ExternalLink.svelte +36 -74
  36. package/src/sdg/components/ExternalLink/ExternalLinkWC.svelte +44 -1
  37. package/src/sdg/components/ExternalLink/externalLinkBaselineTest.html +45 -0
  38. package/src/sdg/components/Fieldset/_fieldset.scss +1 -1
  39. package/src/sdg/components/Label/LabelText.svelte +2 -1
  40. package/src/sdg/components/Label/_label.scss +10 -2
  41. package/src/sdg/components/PivFooter/_pivFooter.html +4 -4
  42. package/src/sdg/components/TextField/Test/TextFieldEmbededTest.svelte +19 -3
  43. package/src/sdg/components/TextField/Test/textFieldBaselineTest.html +5 -2
  44. package/src/sdg/components/TextField/TextField.svelte +12 -6
  45. package/src/sdg/components/TextField/TextFieldWC.svelte +18 -6
  46. package/src/sdg/components/TextField/textFieldUtils.js +3 -2
  47. package/src/sdg/components/utils.js +23 -0
  48. package/src/sdg/qc-sdg-test.js +2 -1
  49. package/src/sdg/scss/lib/_mixins.scss +6 -0
  50. package/src/sdg/scss/utilities/_states.scss +1 -1
  51. package/tests/alert-baseline.spec.ts +23 -0
  52. package/tests/alert-svelte.spec.ts +23 -0
  53. package/tests/buildSvelteTestsIgnore.json +2 -1
  54. package/tests/dropdown-list-baseline.spec.ts +8 -0
  55. package/tests/external-link-baseline.spec.ts +30 -0
  56. package/tests/textfield-baseline.spec.ts +5 -5
  57. package/tests/textfield-svelte.spec.ts +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qc-trousse-sdg",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "Trousse de développement du Système de design gouvernemental du Québec",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -167,6 +167,9 @@ code.hljs {
167
167
  .exemple-area > figure > figcaption {
168
168
  display: block;
169
169
  }
170
+ .exemple-area > figure:has(qc-select) {
171
+ overflow-x: visible;
172
+ }
170
173
 
171
174
  table.qc-table {
172
175
  margin-bottom: 0;
@@ -352,39 +355,68 @@ h1, h2, h3, h4, h5, h6 {
352
355
  border: 1px solid var(--qc-color-grey-light);
353
356
  }
354
357
 
358
+ a.pseudo-visited {
359
+ color: var(--qc-color-link-visited);
360
+ }
361
+ a.pseudo-visited > .qc-ext-link-img {
362
+ background-color: var(--qc-color-link-visited);
363
+ }
355
364
  a.pseudo-hover {
356
365
  color: var(--qc-color-link-hover);
357
366
  text-decoration: none;
358
367
  }
368
+ a.pseudo-hover .qc-ext-link-text {
369
+ text-decoration: none;
370
+ }
371
+ a.pseudo-hover > .qc-ext-link-img {
372
+ background-color: var(--qc-color-link-hover);
373
+ }
359
374
  a.pseudo-active {
360
375
  color: var(--qc-color-link-active);
361
376
  text-decoration: none;
362
377
  }
378
+ a.pseudo-active .qc-ext-link-text {
379
+ text-decoration: none;
380
+ }
381
+ a.pseudo-active > .qc-ext-link-img {
382
+ background-color: var(--qc-color-link-active);
383
+ }
363
384
  a.pseudo-focus {
364
385
  color: var(--qc-color-link-hover);
365
386
  text-decoration: none;
387
+ }
388
+ a.pseudo-focus .qc-ext-link-text {
389
+ text-decoration: none;
390
+ }
391
+ a.pseudo-focus {
366
392
  outline: 2px solid var(--qc-color-link-focus-outline);
367
393
  outline-offset: 1px;
368
394
  }
369
- a.pseudo-visited {
370
- color: var(--qc-color-link-visited) !important;
395
+ a.pseudo-focus > .qc-ext-link-img {
396
+ background-color: var(--qc-color-link-text);
371
397
  }
372
398
  a.not-visited:visited:not(:hover) {
373
399
  color: var(--qc-color-link-text);
374
400
  }
401
+ a.not-visited:visited:not(:hover) > .qc-ext-link-text {
402
+ color: var(--qc-color-link-text);
403
+ }
375
404
 
376
- a.pseudo-visited span.qc-ext-link-img {
405
+ a.pseudo-visited div.qc-ext-link-img {
377
406
  background: var(--qc-color-link-visited) !important;
378
407
  }
379
- a.pseudo-focus span.qc-ext-link-img {
408
+ a.pseudo-focus div.qc-ext-link-img {
380
409
  background: var(--qc-color-link-hover) !important;
381
410
  }
382
- a.pseudo-hover span.qc-ext-link-img {
411
+ a.pseudo-hover div.qc-ext-link-img {
383
412
  background: var(--qc-color-link-hover) !important;
384
413
  }
385
- a.pseudo-active span.qc-ext-link-img {
414
+ a.pseudo-active div.qc-ext-link-img {
386
415
  background: var(--qc-color-link-active) !important;
387
416
  }
417
+ a.not-visited:visited:not(:hover) div.qc-ext-link-img {
418
+ background: var(--qc-color-link-text) !important;
419
+ }
388
420
 
389
421
  p, h1, h2, h3, h4, h5, h6 {
390
422
  hyphens: auto;
@@ -755,7 +755,7 @@ qc-icon {
755
755
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDEuNjkxIDMwMS42OTEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMwMS42OTEgMzAxLjY5MTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwb2x5Z29uIHBvaW50cz0iMTE5LjE1MSwwIDEyOS42LDIxOC40MDYgMTcyLjA2LDIxOC40MDYgMTgyLjU0LDAiIC8+Cgk8cmVjdCB4PSIxMzAuNTYzIiB5PSIyNjEuMTY4IiB3aWR0aD0iNDAuNTI1IiBoZWlnaHQ9IjQwLjUyMyIgLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K");
756
756
  }
757
757
 
758
- .icon-external-link, span.qc-ext-link-img, .qc-icon[data-img-type=external-link] {
758
+ .icon-external-link, .qc-ext-link-img, .qc-icon[data-img-type=external-link] {
759
759
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOS4yMDciIGhlaWdodD0iMjkuNjA4IiB2aWV3Qm94PSIwIDAgMjkuMjA3IDI5LjYwOCI+CiAgPGcgaWQ9Ikdyb3VwZV8zOTQiIGRhdGEtbmFtZT0iR3JvdXBlIDM5NCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzOSAtNTQ1LjYyNCkiPgogICAgPGcgaWQ9Ikdyb3VwZV8zOTAiIGRhdGEtbmFtZT0iR3JvdXBlIDM5MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE3MjIuMDA4IDQzNy41MjQpIj4KICAgICAgPGcgaWQ9Ikdyb3VwZV8zODkiIGRhdGEtbmFtZT0iR3JvdXBlIDM4OSI+CiAgICAgICAgPHBhdGggaWQ9IlRyYWPDqV82NzEiIGRhdGEtbmFtZT0iVHJhY8OpIDY3MSIgZD0iTTE4ODQuMDg3LDEyMC44MTRhMS4xNDUsMS4xNDUsMCwwLDAtMS4xNDUsMS4xNDV2MTMuNDU4SDE4NjMuM3YtMjAuMWgxMy4wNTdhMS4xNDYsMS4xNDYsMCwxLDAsMC0yLjI5MWgtMTUuMzQ4djI0LjY4M2gyNC4yMjVWMTIxLjk1OUExLjE0NiwxLjE0NiwwLDAsMCwxODg0LjA4NywxMjAuODE0WiIgLz4KICAgICAgICA8cGF0aCBpZD0iVHJhY8OpXzY3MiIgZGF0YS1uYW1lPSJUcmFjw6kgNjcyIiBkPSJNMTg3OS43OTIsMTA4LjFhMS4xNDYsMS4xNDYsMCwwLDAsMCwyLjI5MWg2LjUzM2wtMTQuMDE5LDE0LjE3YTEuMTQ2LDEuMTQ2LDAsMCwwLDEuNjI5LDEuNjExbDEzLjk4OS0xNC4xNHY2LjM3N2ExLjE0NiwxLjE0NiwwLDAsMCwyLjI5MSwwVjEwOC4xWiIgLz4KICAgICAgPC9nPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg==");
760
760
  }
761
761
 
@@ -826,6 +826,10 @@ qc-icon {
826
826
  a {
827
827
  color: var(--qc-color-link-text);
828
828
  }
829
+ a:has(.qc-ext-link-text) {
830
+ white-space: nowrap;
831
+ text-decoration: none;
832
+ }
829
833
  a:visited {
830
834
  color: var(--qc-color-link-visited);
831
835
  }
@@ -833,9 +837,17 @@ a:hover {
833
837
  color: var(--qc-color-link-hover);
834
838
  text-decoration: none;
835
839
  }
840
+ a:hover .qc-ext-link-text {
841
+ text-decoration: none;
842
+ }
836
843
  a:focus, a:focus-visible {
837
844
  color: var(--qc-color-link-hover);
838
845
  text-decoration: none;
846
+ }
847
+ a:focus .qc-ext-link-text, a:focus-visible .qc-ext-link-text {
848
+ text-decoration: none;
849
+ }
850
+ a:focus, a:focus-visible {
839
851
  outline: 2px solid var(--qc-color-link-focus-outline);
840
852
  outline-offset: 1px;
841
853
  }
@@ -843,33 +855,38 @@ a:active {
843
855
  color: var(--qc-color-link-active);
844
856
  text-decoration: none;
845
857
  }
858
+ a:active .qc-ext-link-text {
859
+ text-decoration: none;
860
+ }
846
861
  a .img-wrap {
847
862
  white-space: nowrap;
848
863
  }
849
864
 
850
- span.qc-ext-link-img {
865
+ .qc-external-link .qc-ext-link-text {
866
+ white-space: normal;
867
+ text-decoration: underline;
868
+ }
869
+
870
+ .qc-ext-link-img {
851
871
  height: 0.6875em;
852
872
  width: 0.6875em;
853
- display: inline-block;
854
873
  background: var(--qc-color-link-text);
855
874
  mask-size: 0.6875em;
856
- margin-left: 4px;
875
+ display: inline-block;
876
+ mask-repeat: no-repeat;
857
877
  }
858
- a:visited span.qc-ext-link-img {
878
+ a:visited .qc-ext-link-img {
859
879
  background: var(--qc-color-link-visited);
860
880
  }
861
- a:focus span.qc-ext-link-img {
881
+ a:focus .qc-ext-link-img {
862
882
  background: var(--qc-color-link-hover);
863
883
  }
864
- a:hover span.qc-ext-link-img {
884
+ a:hover .qc-ext-link-img {
865
885
  background: var(--qc-color-link-hover);
866
886
  }
867
- a:active span.qc-ext-link-img {
887
+ a:active .qc-ext-link-img {
868
888
  background: var(--qc-color-link-active);
869
889
  }
870
- .img-wrap + span.qc-ext-link-img {
871
- display: none;
872
- }
873
890
 
874
891
  p {
875
892
  margin-top: 0;
@@ -1270,7 +1287,7 @@ hr {
1270
1287
  line-height: var(--qc-line-height-md);
1271
1288
  font-weight: var(--qc-font-weight-bold);
1272
1289
  color: var(--qc-color-red-regular);
1273
- margin-left: 0.6rem;
1290
+ margin-left: var(--qc-spacer-xs);
1274
1291
  }
1275
1292
 
1276
1293
  .qc-disabled {
@@ -2013,9 +2030,9 @@ input[type=radio].qc-choicefield:checked.qc-compact::before {
2013
2030
  justify-items: start;
2014
2031
  }
2015
2032
  .qc-fieldset legend {
2016
- font-weight: var(--qc-font-weight-content-bold);
2017
2033
  display: inline-block;
2018
2034
  margin-bottom: var(--qc-spacer-md);
2035
+ white-space: nowrap;
2019
2036
  }
2020
2037
  .qc-fieldset.qc-compact {
2021
2038
  margin-bottom: var(--qc-spacer-sm);
@@ -2168,9 +2185,10 @@ input[type=checkbox].qc-choicefield.qc-compact:checked::after {
2168
2185
  }
2169
2186
  .qc-label, qc-textfield label,
2170
2187
  .qc-textfield label {
2171
- font-weight: var(--qc-font-weight-content-bold);
2172
- display: block;
2188
+ display: inline-block;
2173
2189
  width: fit-content;
2190
+ white-space: nowrap;
2191
+ margin: 0;
2174
2192
  }
2175
2193
  .qc-label.qc-compact, qc-textfield label.qc-compact,
2176
2194
  .qc-textfield label.qc-compact {
@@ -2186,6 +2204,14 @@ input[type=checkbox].qc-choicefield.qc-compact:checked::after {
2186
2204
  cursor: not-allowed;
2187
2205
  }
2188
2206
 
2207
+ .qc-label-text {
2208
+ white-space: wrap;
2209
+ margin: 0;
2210
+ font-size: var(--qc-font-size-md);
2211
+ line-height: var(--qc-line-height-md);
2212
+ font-weight: var(--qc-font-weight-bold);
2213
+ }
2214
+
2189
2215
  qc-textfield,
2190
2216
  .qc-textfield {
2191
2217
  display: block;
@@ -2608,15 +2634,16 @@ li[aria-selected=true] {
2608
2634
 
2609
2635
  .qc-dropdown-list-expanded {
2610
2636
  position: absolute;
2611
- width: calc(100% + 2px);
2612
- left: -0.1rem;
2613
- right: -0.1rem;
2614
- top: 100%;
2637
+ width: calc(100% + 2 * var(--dropdown-button-border) px);
2638
+ left: calc(var(--dropdown-button-border) * 0.1 * -1rem);
2639
+ right: calc(var(--dropdown-button-border) * 0.1 * -1rem);
2640
+ top: calc(var(--dropdown-items-top-offset) * 0.1 * 1rem);
2615
2641
  z-index: 11;
2616
2642
  background-color: var(--qc-color-background);
2617
2643
  border-left: 0.1rem solid var(--qc-color-grey-medium);
2618
2644
  border-right: 0.1rem solid var(--qc-color-grey-medium);
2619
- border-bottom: 0.1rem solid var(--qc-color-grey-medium);
2645
+ border-bottom: calc(var(--dropdown-items-bottom-border) * 0.1 * 1rem) solid var(--qc-color-grey-medium);
2646
+ border-top: calc(var(--dropdown-items-top-border) * 0.1 * 1rem) solid var(--qc-color-grey-medium);
2620
2647
  }
2621
2648
 
2622
2649
  .qc-dropdown-list-hidden {
@@ -755,7 +755,7 @@ qc-icon {
755
755
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDEuNjkxIDMwMS42OTEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMwMS42OTEgMzAxLjY5MTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwb2x5Z29uIHBvaW50cz0iMTE5LjE1MSwwIDEyOS42LDIxOC40MDYgMTcyLjA2LDIxOC40MDYgMTgyLjU0LDAiIC8+Cgk8cmVjdCB4PSIxMzAuNTYzIiB5PSIyNjEuMTY4IiB3aWR0aD0iNDAuNTI1IiBoZWlnaHQ9IjQwLjUyMyIgLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K");
756
756
  }
757
757
 
758
- .icon-external-link, span.qc-ext-link-img, .qc-icon[data-img-type=external-link] {
758
+ .icon-external-link, .qc-ext-link-img, .qc-icon[data-img-type=external-link] {
759
759
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOS4yMDciIGhlaWdodD0iMjkuNjA4IiB2aWV3Qm94PSIwIDAgMjkuMjA3IDI5LjYwOCI+CiAgPGcgaWQ9Ikdyb3VwZV8zOTQiIGRhdGEtbmFtZT0iR3JvdXBlIDM5NCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzOSAtNTQ1LjYyNCkiPgogICAgPGcgaWQ9Ikdyb3VwZV8zOTAiIGRhdGEtbmFtZT0iR3JvdXBlIDM5MCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE3MjIuMDA4IDQzNy41MjQpIj4KICAgICAgPGcgaWQ9Ikdyb3VwZV8zODkiIGRhdGEtbmFtZT0iR3JvdXBlIDM4OSI+CiAgICAgICAgPHBhdGggaWQ9IlRyYWPDqV82NzEiIGRhdGEtbmFtZT0iVHJhY8OpIDY3MSIgZD0iTTE4ODQuMDg3LDEyMC44MTRhMS4xNDUsMS4xNDUsMCwwLDAtMS4xNDUsMS4xNDV2MTMuNDU4SDE4NjMuM3YtMjAuMWgxMy4wNTdhMS4xNDYsMS4xNDYsMCwxLDAsMC0yLjI5MWgtMTUuMzQ4djI0LjY4M2gyNC4yMjVWMTIxLjk1OUExLjE0NiwxLjE0NiwwLDAsMCwxODg0LjA4NywxMjAuODE0WiIgLz4KICAgICAgICA8cGF0aCBpZD0iVHJhY8OpXzY3MiIgZGF0YS1uYW1lPSJUcmFjw6kgNjcyIiBkPSJNMTg3OS43OTIsMTA4LjFhMS4xNDYsMS4xNDYsMCwwLDAsMCwyLjI5MWg2LjUzM2wtMTQuMDE5LDE0LjE3YTEuMTQ2LDEuMTQ2LDAsMCwwLDEuNjI5LDEuNjExbDEzLjk4OS0xNC4xNHY2LjM3N2ExLjE0NiwxLjE0NiwwLDAsMCwyLjI5MSwwVjEwOC4xWiIgLz4KICAgICAgPC9nPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg==");
760
760
  }
761
761
 
@@ -826,6 +826,10 @@ qc-icon {
826
826
  a {
827
827
  color: var(--qc-color-link-text);
828
828
  }
829
+ a:has(.qc-ext-link-text) {
830
+ white-space: nowrap;
831
+ text-decoration: none;
832
+ }
829
833
  a:visited {
830
834
  color: var(--qc-color-link-visited);
831
835
  }
@@ -833,9 +837,17 @@ a:hover {
833
837
  color: var(--qc-color-link-hover);
834
838
  text-decoration: none;
835
839
  }
840
+ a:hover .qc-ext-link-text {
841
+ text-decoration: none;
842
+ }
836
843
  a:focus, a:focus-visible {
837
844
  color: var(--qc-color-link-hover);
838
845
  text-decoration: none;
846
+ }
847
+ a:focus .qc-ext-link-text, a:focus-visible .qc-ext-link-text {
848
+ text-decoration: none;
849
+ }
850
+ a:focus, a:focus-visible {
839
851
  outline: 2px solid var(--qc-color-link-focus-outline);
840
852
  outline-offset: 1px;
841
853
  }
@@ -843,33 +855,38 @@ a:active {
843
855
  color: var(--qc-color-link-active);
844
856
  text-decoration: none;
845
857
  }
858
+ a:active .qc-ext-link-text {
859
+ text-decoration: none;
860
+ }
846
861
  a .img-wrap {
847
862
  white-space: nowrap;
848
863
  }
849
864
 
850
- span.qc-ext-link-img {
865
+ .qc-external-link .qc-ext-link-text {
866
+ white-space: normal;
867
+ text-decoration: underline;
868
+ }
869
+
870
+ .qc-ext-link-img {
851
871
  height: 0.6875em;
852
872
  width: 0.6875em;
853
- display: inline-block;
854
873
  background: var(--qc-color-link-text);
855
874
  mask-size: 0.6875em;
856
- margin-left: 4px;
875
+ display: inline-block;
876
+ mask-repeat: no-repeat;
857
877
  }
858
- a:visited span.qc-ext-link-img {
878
+ a:visited .qc-ext-link-img {
859
879
  background: var(--qc-color-link-visited);
860
880
  }
861
- a:focus span.qc-ext-link-img {
881
+ a:focus .qc-ext-link-img {
862
882
  background: var(--qc-color-link-hover);
863
883
  }
864
- a:hover span.qc-ext-link-img {
884
+ a:hover .qc-ext-link-img {
865
885
  background: var(--qc-color-link-hover);
866
886
  }
867
- a:active span.qc-ext-link-img {
887
+ a:active .qc-ext-link-img {
868
888
  background: var(--qc-color-link-active);
869
889
  }
870
- .img-wrap + span.qc-ext-link-img {
871
- display: none;
872
- }
873
890
 
874
891
  p {
875
892
  margin-top: 0;
@@ -1270,7 +1287,7 @@ hr {
1270
1287
  line-height: var(--qc-line-height-md);
1271
1288
  font-weight: var(--qc-font-weight-bold);
1272
1289
  color: var(--qc-color-red-regular);
1273
- margin-left: 0.6rem;
1290
+ margin-left: var(--qc-spacer-xs);
1274
1291
  }
1275
1292
 
1276
1293
  .qc-disabled {
@@ -2013,9 +2030,9 @@ input[type=radio].qc-choicefield:checked.qc-compact::before {
2013
2030
  justify-items: start;
2014
2031
  }
2015
2032
  .qc-fieldset legend {
2016
- font-weight: var(--qc-font-weight-content-bold);
2017
2033
  display: inline-block;
2018
2034
  margin-bottom: var(--qc-spacer-md);
2035
+ white-space: nowrap;
2019
2036
  }
2020
2037
  .qc-fieldset.qc-compact {
2021
2038
  margin-bottom: var(--qc-spacer-sm);
@@ -2168,9 +2185,10 @@ input[type=checkbox].qc-choicefield.qc-compact:checked::after {
2168
2185
  }
2169
2186
  .qc-label, qc-textfield label,
2170
2187
  .qc-textfield label {
2171
- font-weight: var(--qc-font-weight-content-bold);
2172
- display: block;
2188
+ display: inline-block;
2173
2189
  width: fit-content;
2190
+ white-space: nowrap;
2191
+ margin: 0;
2174
2192
  }
2175
2193
  .qc-label.qc-compact, qc-textfield label.qc-compact,
2176
2194
  .qc-textfield label.qc-compact {
@@ -2186,6 +2204,14 @@ input[type=checkbox].qc-choicefield.qc-compact:checked::after {
2186
2204
  cursor: not-allowed;
2187
2205
  }
2188
2206
 
2207
+ .qc-label-text {
2208
+ white-space: wrap;
2209
+ margin: 0;
2210
+ font-size: var(--qc-font-size-md);
2211
+ line-height: var(--qc-line-height-md);
2212
+ font-weight: var(--qc-font-weight-bold);
2213
+ }
2214
+
2189
2215
  qc-textfield,
2190
2216
  .qc-textfield {
2191
2217
  display: block;
@@ -2608,15 +2634,16 @@ li[aria-selected=true] {
2608
2634
 
2609
2635
  .qc-dropdown-list-expanded {
2610
2636
  position: absolute;
2611
- width: calc(100% + 2px);
2612
- left: -0.1rem;
2613
- right: -0.1rem;
2614
- top: 100%;
2637
+ width: calc(100% + 2 * var(--dropdown-button-border) px);
2638
+ left: calc(var(--dropdown-button-border) * 0.1 * -1rem);
2639
+ right: calc(var(--dropdown-button-border) * 0.1 * -1rem);
2640
+ top: calc(var(--dropdown-items-top-offset) * 0.1 * 1rem);
2615
2641
  z-index: 11;
2616
2642
  background-color: var(--qc-color-background);
2617
2643
  border-left: 0.1rem solid var(--qc-color-grey-medium);
2618
2644
  border-right: 0.1rem solid var(--qc-color-grey-medium);
2619
- border-bottom: 0.1rem solid var(--qc-color-grey-medium);
2645
+ border-bottom: calc(var(--dropdown-items-bottom-border) * 0.1 * 1rem) solid var(--qc-color-grey-medium);
2646
+ border-top: calc(var(--dropdown-items-top-border) * 0.1 * 1rem) solid var(--qc-color-grey-medium);
2620
2647
  }
2621
2648
 
2622
2649
  .qc-dropdown-list-hidden {
package/public/index.html CHANGED
@@ -848,15 +848,16 @@
848
848
  </p>
849
849
 
850
850
  <qc-doc-exemple id="alert-warning"
851
- caption="Exemple d’alerte jaune">
851
+ caption="Exemple d’alerte jaune masquable. Elle reste masquée après rafraîchissement de la page tant que la session courante est active.">
852
852
  <qc-alert id="alerte-masquable"
853
853
  type="warning"
854
854
  maskable="true"
855
855
  content="Alerte jaune d’importance élevée"
856
+ persist-hidden
857
+ persistence-key="hash-1234"
856
858
  >
857
859
  </qc-alert>
858
860
  </qc-doc-exemple>
859
- <!-- <qc-code target-id="alert-warning"></qc-code>-->
860
861
 
861
862
  <h4>Alerte bleue</h4>
862
863
  <qc-doc-exemple id="alert-general"
@@ -867,8 +868,6 @@
867
868
  </qc-alert>
868
869
  </qc-doc-exemple>
869
870
 
870
- <!-- <qc-code target-id="alert-general"></qc-code>-->
871
-
872
871
  <h3>Documentation technique</h3>
873
872
 
874
873
  <h4>Attributs</h4>
@@ -888,12 +887,6 @@
888
887
  <td>"general"</td>
889
888
  <td>Type de l’alerte : s'il s'agit d’une alerte bleue ou jaune</td>
890
889
  </tr>
891
- <tr>
892
- <td>maskable</td>
893
- <td>"true" ou "false"</td>
894
- <td>"true"</td>
895
- <td>Afficher le bouton de fermeture de l’alerte</td>
896
- </tr>
897
890
  <tr>
898
891
  <td>content</td>
899
892
  <td>Texte</td>
@@ -914,6 +907,25 @@
914
907
  qc-container-fluid)
915
908
  </td>
916
909
  </tr>
910
+ <tr>
911
+ <td>maskable</td>
912
+ <td>"true" ou "false"</td>
913
+ <td>"true"</td>
914
+ <td>Afficher le bouton de fermeture de l’alerte</td>
915
+ </tr>
916
+ <tr>
917
+ <td>persist-hidden</td>
918
+ <td>na</td>
919
+ <td></td>
920
+ <td>Masque l'alerte de façon persistente une fois qu'elle est masquée par l'internaute, c‑à‑d. qu'elle reste masquée lorsque l'utilisateur rafraîchit la page, pendant tout le temps de sa session.</td>
921
+ </tr>
922
+ <tr>
923
+ <td>persistence-key</td>
924
+ <td>Chaîne de caractère</td>
925
+ <td>Id de l'élément, valeur nulle sinon</td>
926
+ <td>Clé pour le stockage de session (<code>Window.sessionStorage</code>). Si non défini, l'id de l'élément sera utilisé. Si celui-ci non plus n'est pas défini, la persistence du masquage n'aura pas lieu.</td>
927
+ </tr>
928
+
917
929
  </table>
918
930
  </div>
919
931
 
@@ -926,7 +938,7 @@
926
938
  document.addEventListener(
927
939
  'qc.alert.hide',
928
940
  (e) => {
929
- console.log('Fermeture de l\'alerte id=\'' + e.target.id + '\'');
941
+ console.log(`Fermeture de l'alerte id='${e.target.id}'`);
930
942
  }
931
943
  )
932
944
  </script>
@@ -2425,6 +2437,20 @@
2425
2437
  </select>
2426
2438
  </qc-select>
2427
2439
 
2440
+ <script>
2441
+ const selectElement = document.getElementById("select-single-choice");
2442
+
2443
+ selectElement.addEventListener("change", (event) => {
2444
+ console.log("Option sélectionnée :", event.target.value);
2445
+ });
2446
+ selectElement.addEventListener("qc.select.show", () => {
2447
+ console.log("Options affichées");
2448
+ });
2449
+ selectElement.addEventListener("qc.select.hide", () => {
2450
+ console.log("Options cachées");
2451
+ });
2452
+ </script>
2453
+
2428
2454
  <qc-select id="qc-select-single-choice-search" enable-search>
2429
2455
  <label for="select-single-choice-search">Choix unique avec recherche</label>
2430
2456
  <select id="select-single-choice-search">
@@ -2600,11 +2626,11 @@
2600
2626
  <div class="table-overflow">
2601
2627
  <table class="qc-table qc-striped component-attributes-description">
2602
2628
  <thead>
2603
- <tr>
2604
- <th>Nom</th>
2605
- <th>Type</th>
2606
- <th>Description</th>
2607
- </tr>
2629
+ <tr>
2630
+ <th>Nom</th>
2631
+ <th>Type</th>
2632
+ <th>Description</th>
2633
+ </tr>
2608
2634
  </thead>
2609
2635
  <tbody>
2610
2636
  <tr>
@@ -2612,10 +2638,22 @@
2612
2638
  <td>Tableau de chaîne de caractères</td>
2613
2639
  <td>Valeur(s) sélectionnée(s) dans la liste déroulante</td>
2614
2640
  </tr>
2641
+ <tr>
2642
+ <td>expanded</td>
2643
+ <td>Booléen</td>
2644
+ <td>Indique que la liste déroulante est ouverte</td>
2645
+ </tr>
2615
2646
  </tbody>
2616
2647
  </table>
2617
2648
  </div>
2618
2649
 
2650
+ <h5>Événements JS</h5>
2651
+ <ul>
2652
+ <li>Un événement JS <code class="qc-bg-color-grey-pale">change</code> est émis lors du changement de valeur sélectionnée dans la liste déroulante.</li>
2653
+ <li>Un événement JS <code class="qc-bg-color-grey-pale">qc.select.show</code> est émis lorsqu'une liste déroulante est ouverte.</li>
2654
+ <li>Un événement JS <code class="qc-bg-color-grey-pale">qc.select.hide</code> est émis lorsqu'une liste déroulante est fermée.</li>
2655
+ </ul>
2656
+
2619
2657
  <h5>Zone d'ajout de contenu HTML</h5>
2620
2658
  <p>Ce composant ne comporte qu'une seule zone d'ajout de contenu.</p>
2621
2659
 
@@ -3072,7 +3110,7 @@
3072
3110
  <td>Le chemin de l’image en thème clair.</td>
3073
3111
  <td>Le chemin vers l’image dist/img/QUEBEC_couleur.svg de la trousse</td>
3074
3112
  <td>Adresse de l’image du pied de page en thème clair (fond transparent, texte et drapeaux en
3075
- couleur, voir <a href="#piv-footer-ex-2">l’exemple de pied de page PIV personnalisé</a>).
3113
+ couleur, voir <a href="#piv-footer-ex-2">l’exemple de pied de page du PIV personnalisé</a>).
3076
3114
  </td>
3077
3115
  </tr>
3078
3116
  <tr>
@@ -3080,7 +3118,7 @@
3080
3118
  <td>Le chemin de l’image en thème sombre.</td>
3081
3119
  <td>Le chemin vers l’image dist/img/QUEBEC_blanc.svg de la trousse</td>
3082
3120
  <td>Adresse de l’image du pied de page en thème sombre (fond transparent, texte et drapeaux en
3083
- blanc, voir <a href="#piv-footer-ex-2">l’exemple de pied de page PIV personnalisé</a>).
3121
+ blanc, voir <a href="#piv-footer-ex-2">l’exemple de pied de page du PIV personnalisé</a>).
3084
3122
  </td>
3085
3123
  </tr>
3086
3124
  <tr>
@@ -3131,7 +3169,7 @@
3131
3169
  </table>
3132
3170
  </div>
3133
3171
 
3134
- <qc-notice type="information">Les images du pied de page PIV doivent respecter
3172
+ <qc-notice type="information">Les images du pied de page du PIV doivent respecter
3135
3173
  <qc-external-link><a href="https://www.piv.gouv.qc.ca/fileadmin/documents/guide/section1_general.pdf">les
3136
3174
  normes graphiques du système d’identification visuelle.</a>. Nous vous invitons à privilégier le format
3137
3175
  SVG, qui permet de conserver la lisibilité de l’image en cas de zoom.
@@ -3142,7 +3180,7 @@
3142
3180
 
3143
3181
  <p>Ci-dessous, les zones d’ajout de contenu HTML (balise &lt;slot&gt;) délimitées en pointillé.</p>
3144
3182
  <qc-doc-exemple id="qc-piv-footer-slots"
3145
- caption="Présentation des zones d’ajout de contenu du pied de page PIV">
3183
+ caption="Présentation des zones d’ajout de contenu du pied de page du PIV">
3146
3184
  <qc-piv-footer>
3147
3185
  <div style="border:2px dashed;padding: var(--qc-spacer-xs);">
3148
3186
  Contenu par défaut