qc-trousse-sdg 1.4.4 → 1.4.6

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 (77) hide show
  1. package/README.md +81 -53
  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/img/QUEBEC_blanc.svg +3 -12
  6. package/dist/img/QUEBEC_couleur.svg +3 -23
  7. package/dist/js/qc-sdg.min.js +1 -1
  8. package/index.html +1 -1
  9. package/package.json +1 -1
  10. package/plugins/buildHtmlDoc.js +5 -1
  11. package/public/css/qc-doc-sdg.css +31 -28
  12. package/public/css/qc-sdg-design-tokens.css +0 -2
  13. package/public/css/qc-sdg-no-grid.css +158 -112
  14. package/public/css/qc-sdg.css +158 -112
  15. package/public/img/QUEBEC_blanc.svg +3 -12
  16. package/public/img/QUEBEC_couleur.svg +3 -23
  17. package/public/img/favicon.ico +0 -0
  18. package/public/index.html +37 -31
  19. package/public/js/qc-doc-sdg.js +7550 -4468
  20. package/public/js/qc-sdg.js +10295 -7247
  21. package/rollup.config.js +3 -4
  22. package/src/doc/_index.html +3 -0
  23. package/src/doc/components/Code.svelte +13 -5
  24. package/src/doc/components/Exemple.svelte +0 -13
  25. package/src/doc/scss/components/_code.scss +4 -21
  26. package/src/doc/scss/components/_exemple.scss +21 -0
  27. package/src/doc/scss/qc-doc-sdg.scss +1 -0
  28. package/src/sdg/_components.js +0 -1
  29. package/src/sdg/bases/form/_form.scss +0 -4
  30. package/src/sdg/bases/links/_links.html +10 -10
  31. package/src/sdg/components/Alert/Alert.svelte +1 -1
  32. package/src/sdg/components/Alert/_alert.html +2 -2
  33. package/src/sdg/components/Checkbox/Checkbox.svelte +3 -3
  34. package/src/sdg/components/Checkbox/CheckboxWC.svelte +3 -3
  35. package/src/sdg/components/Checkbox/{updateInput.svelte.js → updateChoiceInput.svelte.js} +6 -1
  36. package/src/sdg/components/ChoiceGroup/ChoiceGroup.svelte +2 -2
  37. package/src/sdg/components/ChoiceGroup/Test/ChoiceGroupeEmbededTest.svelte +3 -0
  38. package/src/sdg/components/ChoiceGroup/Test/checkboxBaselineTest.html +3 -0
  39. package/src/sdg/components/ChoiceGroup/_choiceGroup.html +0 -2
  40. package/src/sdg/components/DropdownList/DropdownList.svelte +4 -7
  41. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItems.svelte +1 -6
  42. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsMultiple/_dropdownListItemsMultiple.scss +3 -8
  43. package/src/sdg/components/DropdownList/DropdownListItems/DropdownListItemsSingle/_dropdownListItemsSingle.scss +1 -2
  44. package/src/sdg/components/DropdownList/DropdownListItems/_dropdownListItems.scss +2 -4
  45. package/src/sdg/components/DropdownList/SelectWC.svelte +31 -50
  46. package/src/sdg/components/DropdownList/Test/DropdownListSvelteTest.svelte +37 -2
  47. package/src/sdg/components/DropdownList/Test/{dropdownListTest.html → dropdownListBaselineTest.html} +19 -1
  48. package/src/sdg/components/DropdownList/Test/dropdownListTestUtils.js +14 -0
  49. package/src/sdg/components/DropdownList/_dropdownList.scss +11 -16
  50. package/src/sdg/components/DropdownList/_select.html +9 -0
  51. package/src/sdg/components/Fieldset/_fieldset.scss +17 -4
  52. package/src/sdg/components/FormfieldRow/_formfieldRow.html +7 -7
  53. package/src/sdg/components/Label/_label.scss +1 -0
  54. package/src/sdg/components/Notice/_notice.html +3 -3
  55. package/src/sdg/components/PivFooter/PivFooter.svelte +2 -2
  56. package/src/sdg/components/PivHeader/PivHeader.svelte +79 -74
  57. package/src/sdg/components/PivHeader/Test/pivHeaderBaselineTest.html +14 -3
  58. package/src/sdg/components/PivHeader/Test/pivHeaderEmbeddedTest.svelte +2 -1
  59. package/src/sdg/components/PivHeader/Test/pivHeaderTest.js +9 -0
  60. package/src/sdg/components/PivHeader/_pivHeader.html +3 -2
  61. package/src/sdg/components/PivHeader/_pivHeader.scss +52 -23
  62. package/src/sdg/components/TextField/Test/textFieldBaselineTest.html +24 -5
  63. package/src/sdg/components/TextField/TextField.svelte +29 -25
  64. package/src/sdg/components/TextField/TextFieldWC.svelte +18 -8
  65. package/src/sdg/components/TextField/_textField.html +0 -5
  66. package/src/sdg/components/TextField/_textField.scss +6 -13
  67. package/src/sdg/components/utils.js +55 -14
  68. package/src/sdg/qc-sdg-test.js +4 -0
  69. package/src/sdg/scss/settings/_tokens.scss +0 -4
  70. package/tests/buildSvelteTestsIgnore.json +2 -1
  71. package/tests/dropdown-list-baseline.spec.ts +51 -4
  72. package/tests/piv-header-baseline.spec.ts +3 -0
  73. package/src/sdg/components/Button/Button.svelte +0 -50
  74. package/src/sdg/components/Button/ButtonWC.svelte +0 -36
  75. package/src/sdg/components/CharCount/_charCount.html +0 -7
  76. package/src/sdg/components/RadioButton/_radioButton.html +0 -24
  77. package/tests/piv-header-svelte.spec.ts +0 -11
@@ -13,7 +13,7 @@
13
13
  <ul>
14
14
  <li><a href="#fakeEnglish">English</a>
15
15
  </li>
16
- <li><a href="javascript:;">Nous joindre</a>
16
+ <li><a href="#">Nous joindre</a>
17
17
  </li>
18
18
  </ul>
19
19
  </nav>
@@ -23,13 +23,14 @@
23
23
 
24
24
  <div id="pivEnteteExempleRecherchePersonnalisee">
25
25
  <qc-piv-header title-text="Titre du site ou du service"
26
+ title-url=""
26
27
  alt-logo="Accédez à Québec.ca"
27
28
  enable-search="true"
28
29
  show-search="true">
29
30
  <ul slot="links">
30
31
  <li><a href="#fakeEnglish">English</a>
31
32
  </li>
32
- <li><a href="javascript:;">Nous joindre</a>
33
+ <li><a href="#">Nous joindre</a>
33
34
  </li>
34
35
  </ul>
35
36
 
@@ -40,4 +41,14 @@
40
41
  piv-background=""></qc-search-bar>
41
42
  </form>
42
43
  </qc-piv-header>
43
- </div>
44
+ </div>
45
+
46
+ <br>
47
+
48
+ <qc-piv-header
49
+ id="piv-header-mce"
50
+ alt-logo="Accédez à Québec.ca"
51
+ join-us-url="#join-us"
52
+ alt-language-url="#fakeEnglish"
53
+ >
54
+ </qc-piv-header>
@@ -13,7 +13,8 @@
13
13
  <ul>
14
14
  <li><a href="#fakeEnglish">English</a>
15
15
  </li>
16
- <li><a href="javascript:;">Nous joindre</a>
16
+ <!-- svelte-ignore a11y_invalid_attribute -->
17
+ <li><a href="#">Nous joindre</a>
17
18
  </li>
18
19
  </ul>
19
20
  </nav>
@@ -0,0 +1,9 @@
1
+ import {Utils} from "../../utils";
2
+
3
+ export function setMcePivHeaderLogoSrc() {
4
+ document.getElementById('piv-header-mce')
5
+ ?.setAttribute(
6
+ 'logo-src',
7
+ `${Utils.imagesRelativePath}piv-mce-theme-sombre.svg`
8
+ );
9
+ }
@@ -26,7 +26,7 @@
26
26
  <ul>
27
27
  <li><a href="#fakeEnglish">English</a>
28
28
  </li>
29
- <li><a href="javascript:;">Nous joindre</a>
29
+ <li><a href="#">Nous joindre</a>
30
30
  </li>
31
31
  </ul>
32
32
  </nav>
@@ -39,6 +39,7 @@
39
39
  >
40
40
  <div id="pivEnteteExempleRecherchePersonnalisee">
41
41
  <qc-piv-header title-text="Titre du site ou du service"
42
+ title-url=""
42
43
  alt-logo="Accédez à Québec.ca"
43
44
  enable-search="true"
44
45
  show-search="true"
@@ -46,7 +47,7 @@
46
47
  <ul slot="links">
47
48
  <li><a href="#fakeEnglish">English</a>
48
49
  </li>
49
- <li><a href="javascript:;">Nous joindre</a>
50
+ <li><a href="#">Nous joindre</a>
50
51
  </li>
51
52
  </ul>
52
53
 
@@ -44,27 +44,48 @@ qc-piv-header {
44
44
  }
45
45
  .piv-top {
46
46
  display: flex;
47
+ flex-wrap: nowrap;
48
+ gap: token-value(spacer sm);
47
49
  align-items: start;
48
50
  min-width: rem(72);
49
- .logo {
51
+
52
+ .signature-group {
50
53
  display: flex;
51
- flex-basis: rem(256);
52
- margin-right: 0;
53
- [role=img] {
54
- background-image: var(--logo-src);
55
- background-repeat: no-repeat;
56
- background-size: 100%;
57
- background-position: center;
58
- margin-right: 16px;
59
- min-width: 150px;
60
- width: 100%;
61
- max-width: rem(200);
54
+ flex-grow: 1;
55
+ flex-wrap: wrap;
56
+ align-items: start;
57
+ margin-right: auto;
58
+ & > * {
62
59
  min-height: rem(72);
63
60
  }
61
+
62
+ .logo {
63
+ display: flex;
64
+ align-items: center;
65
+ flex-basis: rem(264);
66
+
67
+ a {
68
+ display: flex;
69
+ height: fit-content;
70
+ width: fit-content;
71
+ outline-offset: rem(4);
72
+
73
+ img {
74
+ display: flex;
75
+ flex-basis: min-content;
76
+ min-width: 150px;
77
+ width: 100%;
78
+ height: 100%;
79
+ max-width: rem(200);
80
+ min-height: rem(40);
81
+ }
82
+ }
83
+ }
64
84
  }
85
+
65
86
  .title {
66
- align-items: center;
67
- align-self: center;
87
+ display: block;
88
+ align-content: center;
68
89
  }
69
90
  .right-section {
70
91
  min-width: fit-content;
@@ -108,19 +129,19 @@ qc-piv-header {
108
129
  }
109
130
  }
110
131
 
132
+ .page-title {
133
+ display: inline-block;
134
+ }
135
+
111
136
  qc-piv-header,
112
137
  .qc-piv-header {
113
138
  a {
114
- --qc-color-link-focus-outline: #{token-value(color blue pale)};
139
+ --qc-color-link-focus-outline: #{map.get($colors, blue, pale)};
115
140
  --qc-color-link-hover: white;
116
141
  --qc-color-link-text: white;
117
142
  --qc-color-link-visited: white;
118
143
  --qc-color-link-active: white;
119
144
 
120
- font-family: token-value(font family header);
121
- text-decoration: none;
122
- font-weight: token-value(font weight regular);
123
-
124
145
  &:hover {
125
146
  text-decoration: underline;
126
147
  }
@@ -130,6 +151,12 @@ qc-piv-header,
130
151
  outline-offset: -2px;
131
152
  }
132
153
  }
154
+
155
+ a, span {
156
+ font-family: token-value(font family header);
157
+ text-decoration: none;
158
+ font-weight: token-value(font weight regular);
159
+ }
133
160
  }
134
161
 
135
162
  .go-to-content {
@@ -161,10 +188,6 @@ qc-piv-header,
161
188
  flex: 1 1 auto;
162
189
  margin-right: auto;
163
190
  min-width: 0;
164
- img {
165
- width: 100%;
166
- margin-right: rem(16);
167
- }
168
191
  }
169
192
 
170
193
  .title {
@@ -191,6 +214,12 @@ qc-piv-header,
191
214
  }
192
215
  }
193
216
 
217
+ .no-link-title {
218
+ margin: 0;
219
+ font-weight: token-value(font weight regular);
220
+ font-size: token-value(font size md);
221
+ }
222
+
194
223
 
195
224
 
196
225
 
@@ -35,7 +35,6 @@
35
35
  name="text-lg"
36
36
  />
37
37
  </qc-textfield>
38
-
39
38
  <qc-textfield
40
39
  label="Très large"
41
40
  size="xl"
@@ -47,11 +46,23 @@
47
46
  disabled
48
47
  />
49
48
  </qc-textfield>
49
+ <div style="width: 500px; max-width: 100%;padding: 10px; border: 1px solid #ccc;">
50
+ <qc-textfield
51
+ label="Très large"
52
+ size="xl"
50
53
 
54
+ >
55
+ <input type="text"
56
+ placeholder="Long placeholder lorem ipsum dolor sit amet"
57
+ name="text-xl"
58
+ disabled
59
+ />
60
+ </qc-textfield>
61
+ </div>
51
62
  <div class="qc-formfield-row">
52
63
  <qc-textfield
53
- label="Combiné 1"
54
- size="sm"
64
+ label="Combiné 1 Long placeholder lorem ipsum dolor sit amet"
65
+ size="lg"
55
66
  >
56
67
  <input type="text"
57
68
  placeholder="Long placeholder lorem ipsum dolor sit amet"
@@ -60,7 +71,7 @@
60
71
  </qc-textfield>
61
72
 
62
73
  <qc-textfield
63
- label="Combiné 2"
74
+ label="Combiné 2 Long placeholder lorem ipsum dolor sit amet"
64
75
  size="xs"
65
76
  >
66
77
  <input type="text"
@@ -92,12 +103,20 @@
92
103
  </div>
93
104
 
94
105
  <qc-textfield label="Commentaires"
95
- size="lg"
96
106
  description="Vous pouvez entrer des commentaires dans la zone de texte ci-dessous."
97
107
  >
98
108
  <textarea name="zone-lg" id="zone-lg"></textarea>
99
109
  </qc-textfield>
100
110
 
111
+ <qc-textfield label="Commentaires"
112
+ description="Vous pouvez entrer des commentaires dans la zone de texte ci-dessous."
113
+ >
114
+ <input type="text"
115
+ name="zone-lg-input"
116
+ placeholder="Long placeholder lorem ipsum dolor sit amet"
117
+ />
118
+ </qc-textfield>
119
+
101
120
  <qc-textfield
102
121
  label="Suggestions"
103
122
  description="Vous pouvez entrer des suggestions dans la zone de texte ci-dessous."
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { Utils } from "../utils";
2
+ import {Utils} from "../utils";
3
3
  import Label from "../Label/Label.svelte";
4
4
  import {getContext, onMount} from "svelte";
5
5
  import FormError from "../FormError/FormError.svelte";
@@ -11,7 +11,7 @@
11
11
  label = '',
12
12
  required = $bindable(false),
13
13
  description,
14
- size,
14
+ size = $bindable(),
15
15
  maxlength,
16
16
  maxlengthReached = $bindable(false),
17
17
  invalidAtSubmit = $bindable(false),
@@ -43,7 +43,7 @@
43
43
 
44
44
  onMount(() => {
45
45
  if (webComponentMode) return;
46
- if (! input) {
46
+ if (!input) {
47
47
  input = rootElement.querySelector('input,textarea');
48
48
  }
49
49
  onMountInput(
@@ -54,6 +54,12 @@
54
54
  )
55
55
  })
56
56
 
57
+ $effect(() => {
58
+ if (size) return;
59
+ if (!input) return;
60
+ size = input.tagName === 'INPUT' ? 'md' : 'lg';
61
+ })
62
+
57
63
  $effect(() => {
58
64
  invalidAtSubmit = (required && !value) || maxlengthReached;
59
65
  })
@@ -72,7 +78,6 @@
72
78
  })
73
79
 
74
80
 
75
-
76
81
  $effect(() => {
77
82
  charCountText = ''
78
83
  if (!maxlength) return;
@@ -83,12 +88,12 @@
83
88
  const s = over > 1 ? 's' : '';
84
89
  charCountText =
85
90
  remaining >= 0
86
- ? lang === 'fr'
87
- ? `${remaining} caractère${s} restant${s}`
88
- : `${remaining} character${s} remaining`
89
- : lang === 'fr'
90
- ? `${over} caractère${s} en trop`
91
- : `${over} character${s} over the limit`
91
+ ? lang === 'fr'
92
+ ? `${remaining} caractère${s} restant${s}`
93
+ : `${remaining} character${s} remaining`
94
+ : lang === 'fr'
95
+ ? `${over} caractère${s} en trop`
96
+ : `${over} character${s} over the limit`
92
97
 
93
98
  });
94
99
 
@@ -107,7 +112,7 @@
107
112
  invalid && errorId,
108
113
  maxlength && charCountId,
109
114
  ].filter(Boolean)
110
- .join(' ')
115
+ .join(' ')
111
116
  )
112
117
  input.setAttribute('aria-invalid', invalid)
113
118
  input.setAttribute('aria-required', required)
@@ -116,7 +121,6 @@
116
121
  </script>
117
122
 
118
123
  {#snippet textfield()}
119
-
120
124
  {#if label}
121
125
  <Label
122
126
  {required}
@@ -124,29 +128,29 @@
124
128
  text={label}
125
129
  forId={input?.id}
126
130
  bind:rootElement={labelElement}
127
- />
131
+ />
128
132
  {/if}
129
133
 
130
134
  {#if description}
131
135
  <div
132
- bind:this={descriptionElement}
133
- id={descriptionId}
134
- class="qc-description">
135
- {@html description}
136
+ bind:this={descriptionElement}
137
+ id={descriptionId}
138
+ class="qc-description">
139
+ {@html description}
136
140
  </div>
137
141
  {/if}
138
142
 
139
143
  {@render children()}
140
144
 
141
- {#if maxlength !== null}
145
+ {#if maxlength && maxlength !== null}
142
146
  <div
143
- bind:this={maxlengthElement}
144
- id={charCountId}
145
- class={[
146
- 'qc-textfield-charcount',
147
- maxlengthReached && 'qc-max-reached'
148
- ]}
149
- aria-live="polite"
147
+ bind:this={maxlengthElement}
148
+ id={charCountId}
149
+ class={[
150
+ 'qc-textfield-charcount',
151
+ maxlengthReached && 'qc-max-reached'
152
+ ]}
153
+ aria-live="polite"
150
154
  >
151
155
  {@html charCountText}
152
156
  </div>
@@ -26,6 +26,7 @@
26
26
  description,
27
27
  required,
28
28
  maxlength,
29
+ size,
29
30
  maxlengthReached = $bindable(false),
30
31
  invalidAtSubmit = $bindable(false),
31
32
  } = $props();
@@ -46,6 +47,12 @@
46
47
  invalidParam => invalid = invalidParam
47
48
  )
48
49
  })
50
+
51
+ $effect(() => {
52
+ if (!size) return;
53
+ $host().setAttribute('size', size);
54
+ })
55
+
49
56
  $effect(() => {
50
57
  if (!input) return;
51
58
  if (label) {
@@ -54,18 +61,20 @@
54
61
  if (description) {
55
62
  input.before(descriptionElement);
56
63
  }
57
- if (invalid) {
58
- if (textFieldRow) {
59
- textFieldRow.appendChild(formErrorElement);
60
- }
61
- else {
62
- input.after(formErrorElement);
63
- }
64
- }
65
64
  if (maxlength) {
66
65
  input.after(maxlengthElement);
67
66
  }
68
67
  })
68
+
69
+ $effect(() => {
70
+ if (!formErrorElement) return;
71
+ if (textFieldRow) {
72
+ textFieldRow.appendChild(formErrorElement);
73
+ }
74
+ else {
75
+ input.after(formErrorElement);
76
+ }
77
+ })
69
78
  </script>
70
79
 
71
80
  <TextField
@@ -75,6 +84,7 @@
75
84
  {required}
76
85
  {maxlength}
77
86
  {value}
87
+ bind:size
78
88
  bind:invalid
79
89
  bind:invalidText
80
90
  bind:maxlengthReached
@@ -182,11 +182,6 @@
182
182
  </table>
183
183
  </div>
184
184
 
185
- <h4>Champs alignés horizontalement (classe <code>qc-textfield-row</code>)</h4>
186
-
187
- <p>Les champs regroupés sur une ligne peuvent être placés dans un div avec la classe <code>qc-textfield-row</code>. De cette façon, les messages d'erreur ne provoquent pas de décalage. <br/>
188
- Voir le code des champs Téléphone et Poste dans l'exemple ci-dessus.</p>
189
-
190
185
  <h4>Propriété js</h4>
191
186
  <div class="table-overflow">
192
187
  <table class="qc-table qc-striped component-attributes-description">
@@ -62,18 +62,10 @@ textarea {
62
62
  }
63
63
 
64
64
  $sizes: map.get($lg-tokens, size, max-width);
65
- input ,
66
- input + .qc-textfield-charcount {
67
- .qc-textfield &,
68
- qc-textfield & {
69
- max-width: token-value(size input max-width);
70
- }
71
- }
72
- textarea,
73
- textarea + .qc-textfield-charcount {
74
- .qc-textfield &,
75
- qc-textfield & {
76
- max-width: token-value(size textarea max-width);
65
+
66
+ @each $size, $width in $sizes {
67
+ [size="#{$size}"] {
68
+ max-width: 100%;
77
69
  }
78
70
  }
79
71
 
@@ -84,7 +76,8 @@ textarea,
84
76
  & + .qc-textfield-charcount {
85
77
  @each $size, $width in $sizes {
86
78
  [size="#{$size}"] & {
87
- max-width: $width;
79
+ max-width: 100%;
80
+ width: $width;
88
81
  }
89
82
  }
90
83
  }
@@ -16,15 +16,14 @@ export class Utils {
16
16
  `${this.assetsBasePath}/img/`
17
17
  .replace('//','/')
18
18
  static cssFileName =
19
- document
20
- .currentScript
21
- .getAttribute('sdg-css-filename')
22
- || 'qc-sdg.min.css'
19
+ getCssFileName(document.currentScript.getAttribute('sdg-css-filename'), document.currentScript.src);
23
20
  static cssPath =
24
- document
25
- .currentScript
26
- .getAttribute('sdg-css-path')
27
- || this.cssRelativePath + this.cssFileName
21
+ getCssPath(
22
+ document.currentScript.getAttribute('sdg-css-path'),
23
+ document.currentScript.src,
24
+ this.cssRelativePath,
25
+ this.cssFileName
26
+ );
28
27
  static sharedTexts =
29
28
  { openInNewTab :
30
29
  { fr: 'Ce lien s’ouvrira dans un nouvel onglet.'
@@ -33,8 +32,8 @@ export class Utils {
33
32
  }
34
33
 
35
34
  /**
36
- * Get current page language based on html lang attribute
37
- * @returns {string} language code (fr/en).
35
+ * Get current page language based on HTML lang attribute
36
+ * @returns {string} language code (fr/en).
38
37
  */
39
38
  static getPageLanguage() {
40
39
  return document.getElementsByTagName("html")[0].getAttribute("lang") || "fr";
@@ -56,12 +55,12 @@ export class Utils {
56
55
  /**
57
56
  * extract and clean prefixed attributes
58
57
  * example:
59
- * computeFieldsAttributes("radio" , {"radio-class":"my-radio", "radio-data-foo":"foo", "other":"other value"})
58
+ * computeFieldsAttributes("radio", {"radio-class": "my-radio", "radio-data-foo": "foo", "other": "other value"})
60
59
  * return {"class":"my-radio", "data-foo":"foo"}
61
60
  *
62
61
  </div>
63
62
  * @param {(string|string[])} prefix - Une chaîne de caractères ou un tableau de chaînes.
64
- * @param restProps - ojbect of attributes
63
+ * @param restProps - object of attributes
65
64
  * @returns {*} - object of attributes
66
65
  */
67
66
  static computeFieldsAttributes(prefix , restProps) {
@@ -125,8 +124,8 @@ export class Utils {
125
124
  word = replaceAccents(word, /[ùûü]/gi, 'u');
126
125
  word = replaceAccents(word, /[ïî]/gi, 'i');
127
126
  word = replaceAccents(word, /[ôö]/gi, 'i');
128
- word = replaceAccents(word, /[œ]/gi, 'oe');
129
- word = replaceAccents(word, /[æ]/gi, 'ae');
127
+ word = replaceAccents(word, /œ/gi, 'oe');
128
+ word = replaceAccents(word, /æ/gi, 'ae');
130
129
 
131
130
  // Remplace les caractères spéciaux par des espaces.
132
131
  word = word.replaceAll(/[-_—–]/gi, ' ');
@@ -136,3 +135,45 @@ export class Utils {
136
135
  return word.toLowerCase();
137
136
  }
138
137
  }
138
+
139
+ function getCacheBustingParam(cssPath, currentScriptSrc) {
140
+ const pattern = /\?.*$/;
141
+
142
+ const cssCacheBustingParam = cssPath?.match(pattern);
143
+ if (cssCacheBustingParam && cssCacheBustingParam.length > 0) {
144
+ return '';
145
+ }
146
+
147
+ const scriptCacheBustingParam = currentScriptSrc?.match(pattern);
148
+ if (scriptCacheBustingParam && scriptCacheBustingParam.length > 0) {
149
+ return scriptCacheBustingParam[0];
150
+ }
151
+
152
+ return '';
153
+ }
154
+
155
+ function getCssFileName(sdgCssFilename, src) {
156
+ const cssPattern =/^.*\.css/;
157
+
158
+ if (!cssPattern.test(sdgCssFilename)) {
159
+ return 'qc-sdg.min.css' + getCacheBustingParam(
160
+ 'qc-sdg.min.css', src
161
+ );
162
+ } else {
163
+ return sdgCssFilename + getCacheBustingParam(
164
+ sdgCssFilename, src
165
+ );
166
+ }
167
+ }
168
+
169
+ function getCssPath(sdgCssPath, src, cssRelativePath, cssFileName) {
170
+ const cssPattern =/^.*\.css/;
171
+
172
+ if (!cssPattern.test(sdgCssPath)) {
173
+ return cssRelativePath + cssFileName;
174
+ } else {
175
+ return sdgCssPath + getCacheBustingParam(
176
+ sdgCssPath, src
177
+ );
178
+ }
179
+ }
@@ -1,3 +1,7 @@
1
+ import {setMcePivHeaderLogoSrc} from "./components/PivHeader/Test/pivHeaderTest";
2
+
3
+ setMcePivHeaderLogoSrc();
4
+
1
5
  export * from './bases/Icon/Test/IconEmbeddedTest.svelte';
2
6
  export * from './components/TextField/Test/TextFieldEmbededTest.svelte';
3
7
  export * from "./components/DropdownList/Test/DropdownListSvelteTest.svelte";
@@ -216,11 +216,7 @@ $lg-tokens: (
216
216
  lg: rem(528),
217
217
  xl: rem(825)
218
218
  ),
219
- input: (
220
- max-width: token-value(size max-width md),
221
- ),
222
219
  textarea: (
223
- max-width: token-value(size max-width lg),
224
220
  min-height: rem(108)
225
221
  ),
226
222
  search-bar: (
@@ -1,4 +1,5 @@
1
1
  [
2
2
  "**/button-baseline.spec.ts",
3
- "**/dropdown-list-baseline.spec.ts"
3
+ "**/dropdown-list-baseline.spec.ts",
4
+ "**/piv-header-baseline.spec.ts"
4
5
  ]