qc-trousse-sdg 1.2.5-dev → 1.3.0-develop.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 (97) hide show
  1. package/README.md +18 -3
  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 +1 -1
  6. package/dist/img/QUEBEC_couleur.svg +24 -0
  7. package/dist/js/qc-sdg.min.js +1 -1
  8. package/package.json +23 -18
  9. package/public/css/qc-doc-sdg.css +247 -335
  10. package/public/css/qc-sdg-design-tokens.css +111 -64
  11. package/public/css/qc-sdg-no-grid.css +932 -428
  12. package/public/css/qc-sdg.css +941 -609
  13. package/public/img/QUEBEC_blanc.svg +1 -1
  14. package/public/img/QUEBEC_couleur.svg +24 -0
  15. package/public/img/ampoule.svg +1 -0
  16. package/public/img/note.svg +1 -0
  17. package/public/img/piv-MCE-theme-clair.svg +79 -0
  18. package/public/img/piv-MCE-theme-sombre.svg +62 -0
  19. package/public/img/piv-bas-MCE-theme-clair.png +0 -0
  20. package/public/img/piv-bas-MCE-theme-sombre.png +0 -0
  21. package/public/img/piv-logo-pied-de-page.svg +37 -0
  22. package/public/index.html +871 -715
  23. package/public/js/qc-doc-exemple.js +9 -0
  24. package/public/js/qc-doc-sdg.js +6893 -3724
  25. package/public/js/qc-sdg.js +2103 -962
  26. package/rollup.config.js +58 -23
  27. package/src/doc/components/Code.svelte +69 -0
  28. package/src/doc/components/Exemple.svelte +71 -0
  29. package/src/doc/components/Switch.svelte +108 -0
  30. package/src/doc/components/TopNav.svelte +53 -0
  31. package/src/doc/components/color-doc.svelte +44 -0
  32. package/src/doc/qc-doc-sdg.js +25 -14
  33. package/src/doc/scss/_tables.scss +1 -2
  34. package/src/doc/scss/components/_button.scss +14 -14
  35. package/src/doc/scss/components/_code.scss +106 -4
  36. package/src/doc/scss/jQueryUI/_jquery-ui.autocomplete.scss +48 -0
  37. package/src/doc/scss/qc-doc-sdg.scss +76 -75
  38. package/src/sdg/components/Button/IconButton.svelte +29 -0
  39. package/src/sdg/components/Icon.svelte +39 -0
  40. package/src/sdg/components/{pivHeader.svelte → PivHeader/pivHeader.svelte} +49 -69
  41. package/src/sdg/components/SearchBar/searchBar.svelte +87 -0
  42. package/src/sdg/components/SearchInput/SearchInput.svelte +48 -0
  43. package/src/sdg/components/alert.svelte +40 -23
  44. package/src/sdg/components/componentWrapper.js +0 -3
  45. package/src/sdg/components/externalLink.svelte +92 -0
  46. package/src/sdg/components/notice.svelte +61 -34
  47. package/src/sdg/components/pivFooter.svelte +37 -36
  48. package/src/sdg/components/toTop.svelte +16 -10
  49. package/src/sdg/components/utils.js +28 -4
  50. package/src/sdg/qc-sdg.js +11 -3
  51. package/src/sdg/scss/_qc-sdg-lib.scss +3 -0
  52. package/src/sdg/scss/base/_accessibility.scss +4 -0
  53. package/src/sdg/scss/base/_colors.scss +10 -10
  54. package/src/sdg/scss/base/_figure.scss +14 -9
  55. package/src/sdg/scss/base/_fonts.scss +4 -4
  56. package/src/sdg/scss/base/_form.scss +7 -0
  57. package/src/sdg/scss/base/_layout.scss +45 -0
  58. package/src/sdg/scss/base/_lists.scss +5 -5
  59. package/src/sdg/scss/base/_shadings.scss +3 -11
  60. package/src/sdg/scss/base/_typography.scss +42 -25
  61. package/src/sdg/scss/components/_alert.scss +11 -34
  62. package/src/sdg/scss/components/_icons.scss +67 -38
  63. package/src/sdg/scss/components/_notice.scss +51 -44
  64. package/src/sdg/scss/components/_pivFooter.scss +35 -23
  65. package/src/sdg/scss/components/_pivHeader.scss +131 -154
  66. package/src/sdg/scss/components/_searchBar.scss +75 -0
  67. package/src/sdg/scss/components/_searchInput.scss +64 -0
  68. package/src/sdg/scss/components/_separator.scss +2 -5
  69. package/src/sdg/scss/components/_toTop.scss +4 -6
  70. package/src/sdg/scss/grid/_grid-lib.scss +516 -0
  71. package/src/sdg/scss/grid/_grid.scss +78 -0
  72. package/src/sdg/scss/lib/_functions.scss +78 -0
  73. package/src/sdg/scss/lib/_gridless-lib.scss +4 -0
  74. package/src/sdg/scss/lib/_mixins.scss +221 -0
  75. package/src/sdg/scss/qc-design-tokens.scss +31 -8
  76. package/src/sdg/scss/qc-sdg-utilities.scss +1 -0
  77. package/src/sdg/scss/qc-sdg.scss +1 -1
  78. package/src/sdg/scss/qc-sgd-no-grid.scss +20 -15
  79. package/src/sdg/scss/settings/_base.scss +58 -0
  80. package/src/sdg/scss/settings/_tokens.scss +145 -77
  81. package/src/sdg/scss/utilities/_display.scss +43 -3
  82. package/src/sdg/scss/utilities/_themes.scss +17 -0
  83. package/src/sdg/scss/vendor/modern-css-reset/src/reset.css +9 -8
  84. package/dist/img/logo-quebec-piv-footer.svg +0 -1
  85. package/dist/img/quebec-logo.svg +0 -13
  86. package/public/img/logo-quebec-piv-footer.svg +0 -1
  87. package/src/doc/components/code.svelte +0 -54
  88. package/src/sdg/scss/base/_grid.scss +0 -9
  89. package/src/sdg/scss/functions/_tokens.scss +0 -12
  90. package/src/sdg/scss/functions/_utils.scss +0 -44
  91. package/src/sdg/scss/modules/_grid.scss +0 -19
  92. package/src/sdg/scss/modules/_helpers.scss +0 -32
  93. package/src/sdg/scss/modules/_map.scss +0 -14
  94. package/src/sdg/scss/modules/_tokens.scss +0 -3
  95. package/src/sdg/scss/modules/_utils.scss +0 -55
  96. package/src/sdg/scss/settings/_grid.scss +0 -24
  97. package/src/sdg/scss/settings/_settings.scss +0 -12
@@ -1,21 +1,26 @@
1
- @use "../modules/tokens" as *;
2
- @use "../modules/utils" as *;
3
- @use "../modules/grid" as *;
4
-
5
- qc-piv-footer {
6
- display: block;
7
- margin-top: rem(40);
8
- padding-bottom: rem(4 * $base-spacer);
9
- @include content-font(sm);
1
+ @use "qc-sdg-lib" as *;
2
+ @use "sass:math";
10
3
 
4
+ @mixin pivLinks() {
11
5
  a {
12
6
  text-decoration: none;
13
7
  &:hover {
14
8
  text-decoration: underline;
15
9
  }
16
10
  }
11
+ }
12
+
13
+ qc-piv-footer {
14
+ margin-top: rem(40);
15
+ padding-bottom: rem(40);
16
+ display: flex;
17
+ flex-direction: column;
18
+ align-items: center;
19
+
20
+ @include content-font(sm);
17
21
 
18
22
  ul {
23
+ max-inline-size: none;
19
24
  margin: 0 0 token-value(spacer sm) 0;
20
25
  padding: 0;
21
26
  width: 100%;
@@ -28,26 +33,33 @@ qc-piv-footer {
28
33
  padding: 0 token-value(spacer sm) token-value(spacer xs);
29
34
  margin: 0;
30
35
  text-align: center;
31
-
32
- &:hover {
33
- text-decoration: underline;
34
- }
35
36
  }
36
37
  }
37
38
 
39
+ @include pivLinks();
40
+
38
41
  }
39
42
 
40
43
  .qc-piv-footer {
41
- a {
42
- text-decoration: none;
43
- &:hover {
44
- text-decoration: underline;
44
+ //margin-top: rem(40);
45
+ display: flex;
46
+ flex-direction: column;
47
+ align-items: center;
48
+
49
+ @include pivLinks();
50
+
51
+ .logo {
52
+ display: block;
53
+ width: calc(var(--logo-width) * #{$rem-ratio}rem);
54
+ height: calc(var(--logo-height) * #{$rem-ratio}rem);
55
+ img {
56
+ width: 100%;
57
+ height: 100%;
45
58
  }
46
59
  }
47
-
48
- .qc-container {
49
- display: flex;
50
- flex-direction: column;
51
- align-items: center;
60
+ .copyright {
61
+ margin-top: rem(8);
52
62
  }
53
- }
63
+
64
+ }
65
+
@@ -1,12 +1,33 @@
1
- @use "../modules/tokens" as *;
2
- @use "../modules/utils" as *;
3
- @use "../modules/grid" as *;
1
+ @use "qc-sdg-lib" as *;
2
+ @use "sass:map";
4
3
 
4
+ $colors : map.get($themes-tokens, light, lg, color);
5
+
6
+ %piv-links {
7
+ &, & ul {
8
+ list-style: none;
9
+ padding: 0;
10
+ margin: 0;
11
+ height: 100%;
12
+
13
+ li {
14
+ padding: 0;
15
+ margin: 0;
16
+ @include content-font(sm);
17
+ }
18
+
19
+ a {
20
+ font-size: rem(12.8);
21
+ }
22
+ }
23
+ }
5
24
 
6
25
  qc-piv-header {
26
+ --qc-piv-header-bg: 1;
7
27
  display: block;
8
- min-height: rem(72);
9
- background-color: token-value(color, blue, piv);
28
+ // pas de token ici ; le PIV a toujours ce fond, indépendamment du thème
29
+ // on se base donc sur les valeurs scss
30
+ background-color: map.get($colors, blue, piv);
10
31
  width: 100%;
11
32
 
12
33
  [slot=links] {
@@ -15,66 +36,72 @@ qc-piv-header {
15
36
  }
16
37
 
17
38
  .qc-piv-header {
18
- color: token-value(color white);
19
-
20
- a {
21
- color: token-value(color white);
22
- text-decoration: none;
23
-
24
- &:hover, &:focus {
25
- color: token-value(color white);
26
- text-decoration: underline;
27
- }
39
+ color: map.get($colors, white);
40
+ .go-to-content {
41
+ position: relative;
28
42
  }
29
-
30
43
  .piv-top {
31
44
  display: flex;
32
- justify-content: space-between;
33
- align-items: center;
34
-
35
- .logo {
36
- margin-right: rem(64);
37
- @include media-mobile() {
38
- margin: 0;
45
+ flex-wrap: wrap;
46
+ //justify-content: space-between;
47
+ align-items: start;
48
+ > * {
49
+ min-height: rem(72);
50
+ }
51
+ .signature-group {
52
+ display: flex;
53
+ flex-grow: 1;
54
+ flex-wrap: wrap;
55
+ align-items: start;
56
+ margin-right: auto;
57
+ * {
58
+ min-height: rem(72);
39
59
  }
40
-
41
- a {
42
- display: block;
60
+ .logo {
61
+ display: flex;
62
+ flex-basis: rem(256);
63
+ //margin-right: rem(64);
64
+ [role=img] {
65
+ background-image: var(--logo-src);
66
+ background-repeat: no-repeat;
67
+ background-size: 100%;
68
+ background-position: center;
69
+ margin-right: 16px;
70
+ min-width: 150px;
71
+ //object-fit: fill;
72
+ width: 100%;
73
+ max-width: rem(200);
74
+ min-height: rem(72);
75
+ }
43
76
  }
44
-
45
- img {
46
- height: rem(72);
47
- min-width: rem(200);
77
+ .title {
78
+ display: flex;
79
+ flex-grow: 1;
80
+ align-items: center;
81
+ @include content-font(100);
82
+ flex-basis: fit-content;
83
+ //margin-top: auto;
84
+ //margin-bottom: auto;
85
+ //margin-right: auto;
86
+ //padding-right: 40px;
87
+ > * {
88
+ //display: -webkit-box;
89
+ //-webkit-line-clamp: 2;
90
+ //-webkit-box-orient: vertical;
91
+ //overflow: hidden;
92
+ //max-height: rem(72);
93
+ }
48
94
  }
49
95
  }
50
96
 
51
- .title {
52
- width: 100%;
53
- padding: token-value(spacer sm) 0;
54
- min-height: rem(72);
55
- align-items: center;
56
- display: flex;
57
- margin-right: rem(40);
58
-
59
- a {
60
- @include content-font(100);
61
- font-family: token-value(font, family, header);
62
97
 
63
- &:hover, &:focus {
64
- text-decoration: underline;
65
- }
66
98
 
67
- .description {
68
- font-size: token-value(font size sm);
69
- }
70
- }
71
- }
72
99
 
73
100
  .right-section {
74
101
  min-width: fit-content;
75
102
  display: flex;
76
103
  align-items: center;
77
-
104
+ flex-basis: fit-content;
78
105
  .links ul {
79
106
  @extend %piv-links;
80
107
  }
@@ -85,8 +112,15 @@ qc-piv-header {
85
112
  }
86
113
 
87
114
  .qc-search {
115
+ background-image: getImageUrl(loupe-piv-droite);
116
+ background-repeat: no-repeat;
88
117
  min-width: rem(24);
89
118
  height: rem(24);
119
+ margin-right: token-value(spacer md);;
120
+ @include media-mobile() {
121
+ margin-right: token-value(spacer sm);
122
+ }
123
+
90
124
  span {
91
125
  @include sr-only();
92
126
  }
@@ -94,91 +128,32 @@ qc-piv-header {
94
128
  }
95
129
 
96
130
  .piv-bottom {
97
- .title {
98
- display: none;
99
- }
100
131
  .search-zone {
101
132
  padding-bottom: token-value(spacer md);
102
- form {
103
- .input-group {
104
- width: 100%;
105
- display: flex;
106
- justify-content: space-between;
107
- align-items: stretch;
108
- input {
109
- width: 100%;
110
- padding: rem(6) rem(12) ;
111
- border: 1px solid token-value(color blue dark);
112
- border-right: none;
113
- &:focus {
114
- outline: rem(2) solid token-value(color blue light);
115
- border-right: 1px solid black;
116
- z-index: 1;
117
- }
118
- &::placeholder {
119
- font-size: token-value(font size sm);
120
- }
121
- }
122
- button {
123
- display: flex;
124
- justify-content: center;
125
- border: 1px solid token-value(color blue dark);
126
- border-left: none;
127
- background-color: white;
128
- width: rem(2.6 * 16);
129
- &:focus{
130
- outline: rem(2) solid token-value(color blue light);
131
- border-left: 1px solid black;
132
- }
133
- .qc-search-submit {
134
- min-width: rem(24);
135
- height: rem(24);
136
- align-self: center;
137
- }
138
- .sr-description {
139
- position: absolute;
140
- width: 1px;
141
- height: 1px;
142
- clip: rect(0 0 0 0);
143
- }
144
- }
145
-
146
- }
147
- }
148
133
  }
149
-
150
134
  }
151
135
  }
152
136
 
137
+ qc-piv-header,
138
+ .qc-piv-header {
139
+ a {
140
+ --qc-color-link-focus-outline: white;
141
+ --qc-color-link-hover: white;
142
+ --qc-color-link-text: white;
143
+ --qc-color-link-visited: white;
144
+ --qc-color-link-active: white;
153
145
 
154
- %piv-links {
155
- &, & ul {
156
- list-style: none;
157
- padding: 0;
158
- margin: 0;
159
- height: 100%;
160
- margin-left: token-value(spacer md);
161
- @include media-mobile() {
162
- margin-left: token-value(spacer sm);
163
- }
146
+ font-family: token-value(font family header);
147
+ text-decoration: none;
148
+ font-weight: token-value(font weight regular);
164
149
 
165
- li {
166
- padding: 0;
167
- margin: 0;
168
- @include content-font(sm);
150
+ &:hover {
151
+ text-decoration: underline;
169
152
  }
170
-
171
- a {
172
- font-family: token-value(font family header);
173
- text-decoration: none;
174
- font-size: rem(12);
175
- color: token-value(color white);
176
- font-weight: token-value(font weight regular);
177
-
178
- &:focus, &:hover {
179
- text-decoration: underline;
180
- color: token-value(color white);
181
- }
153
+ }
154
+ a:focus-visible, a:focus {
155
+ &:has(img) {
156
+ outline-offset: -2px;
182
157
  }
183
158
  }
184
159
  }
@@ -191,53 +166,55 @@ qc-piv-header {
191
166
  @include sr-only();
192
167
 
193
168
  &:focus {
169
+ top: 2px;
194
170
  width: inherit;
195
- height: inherit;
171
+ height: 24px;
196
172
  overflow: inherit;
197
173
  clip: inherit;
198
174
  white-space: inherit;
199
- color: token-value(color white);
200
- background-color: token-value(color blue piv);
175
+ color: map.get($colors, white);
176
+ background-color: map.get($colors, blue, piv);
177
+ margin:0;
201
178
  }
202
179
  }
203
180
  }
204
181
 
205
-
206
- @include media-tablet() {
182
+ @include media-mobile(){
207
183
  .qc-piv-header {
208
184
  .piv-top {
209
- .logo img {
210
- min-width: rem(175);
211
- width: rem(175);
185
+ flex-wrap: wrap;
186
+ .logo {
187
+ flex-shrink: 1;
188
+ margin-right: auto;
189
+ min-width: 0;
190
+ img {
191
+ width: 100%;
192
+ margin-right: rem(16);
193
+ }
212
194
  }
213
195
 
214
196
  .title {
215
- display: none;
197
+ min-width: 100%;
198
+ padding: 0;
199
+ //height: auto;
200
+ height: fit-content;
201
+ max-height: fit-content;
202
+ order: 2;
203
+ margin-left: 0;
204
+ margin-right: 0;
205
+ display: flex;
206
+ align-items: center;
216
207
  }
217
208
 
218
209
  .right-section {
219
- min-width: rem(130);
220
- }
221
- }
222
-
223
- .piv-bottom {
224
- .title {
225
- margin: 0;
226
- display: flex;
227
- padding-bottom: token-value(spacer sm);
210
+ min-width: 0;
211
+ margin-right: 0;
212
+ margin-left: 0;
228
213
  }
229
214
  }
230
215
  }
231
216
  }
232
217
 
233
- @include media-mobile() {
234
- .qc-piv-header {
235
- .piv-top {
236
- height: rem(72);
237
218
 
238
- .right-section {
239
- min-width: fit-content;
240
- }
241
- }
242
- }
243
- }
219
+
220
+
@@ -0,0 +1,75 @@
1
+ @use "qc-sdg-lib" as *;
2
+ @use "searchInput" as *;
3
+
4
+ qc-search-bar {
5
+ position: relative;
6
+ display: block;
7
+ max-width: rem(640);
8
+ }
9
+ .qc-search-bar {
10
+ @extend %qc-search-wrapper;
11
+ width: 100%;
12
+ border: 0;
13
+ &:has(input:focus) {
14
+ [type=submit]::before {
15
+ inset: 2px 2px 2px 0;
16
+ border: 0;
17
+ }
18
+ }
19
+ .qc-search-input {
20
+ margin:0;
21
+ width: 100%;
22
+ outline: none!important;
23
+ &::before {
24
+ content:none!important;
25
+ }
26
+ }
27
+
28
+ [type=submit] {
29
+ z-index: 1;
30
+ background-color: transparent;
31
+ &::before {
32
+ z-index: -1;
33
+ background: token-value(color blue piv);
34
+ border: 1px solid token-value(color formfield border);
35
+ transition: background-color .15s;
36
+ }
37
+ &:hover {
38
+ &::before {
39
+ background-color: token-value(color blue regular);
40
+ }
41
+ }
42
+ &:active {
43
+ &::before {
44
+ background-color: token-value(color blue regular_light);
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ .qc-search-bar.piv-background {
51
+ --qc-color-formfield-focus-outline: #{token-value(color blue pale)};
52
+ [type=submit] {
53
+ &::before {
54
+ background: token-value(color background);
55
+ border-left-width: 0;
56
+ }
57
+ &:focus {
58
+ &::before {
59
+ border-left-width: 2px;
60
+ background-color: rgba(token-value(color grey light rgb), .24);
61
+ }
62
+ }
63
+ &:hover {
64
+ &::before {
65
+ background-color: rgba(token-value(color grey light rgb), .24);
66
+ }
67
+ }
68
+ &:active {
69
+ &::before {
70
+ background-color: rgba(token-value(color grey light rgb), .16);
71
+ }
72
+ }
73
+ }
74
+ }
75
+
@@ -0,0 +1,64 @@
1
+ @use "qc-sdg-lib" as *;
2
+
3
+ qc-search-input {
4
+ display: block;
5
+ width: 100%;
6
+ // TODO mettre un token
7
+ max-width: rem(548);
8
+ }
9
+
10
+ %qc-search-wrapper {
11
+ @extend %qc-formcontrol-box;
12
+ display: flex;
13
+ align-items: stretch;
14
+ &::before {
15
+ border: 1px solid token-value(color formfield border);
16
+ }
17
+ button {
18
+ @extend %qc-formcontrol-box;
19
+ &::before {
20
+ background: transparent;
21
+ }
22
+ width: rem(40);
23
+ flex-shrink: 0;
24
+ }
25
+ }
26
+
27
+ .qc-search-input {
28
+ @extend %qc-search-wrapper;
29
+ input[type=search] {
30
+ display: block;
31
+ position: relative;
32
+ color: token-value(color text primary);
33
+ width: 100%;
34
+ background: transparent;
35
+ //height: auto;
36
+ margin-right: 0;
37
+ padding: rem(8) rem(0) rem(8) rem(8);
38
+ border: 0;
39
+ // clears the ‘X’ from Chrome
40
+ &::-webkit-search-decoration,
41
+ &::-webkit-search-cancel-button,
42
+ &::-webkit-search-results-button,
43
+ &::-webkit-search-results-decoration {
44
+ display: none;
45
+ }
46
+ &::placeholder {
47
+ color: token-value(color grey medium);
48
+ font-weight: normal;
49
+ }
50
+ &:focus,&:focus-visible {
51
+ outline: none;
52
+ }
53
+ }
54
+
55
+ button {
56
+ @extend %qc-formcontrol-box;
57
+ &::before {
58
+ background: transparent;
59
+ }
60
+ cursor: pointer;
61
+ }
62
+ }
63
+
64
+
@@ -1,8 +1,5 @@
1
- @use "../modules/tokens" as *;
2
- @use "../modules/utils" as *;
1
+ @use "qc-sdg-lib" as *;
3
2
 
4
3
  hr {
5
- margin: token-value(spacer lg) 0;
6
- border: 0;
7
- border-bottom: 1px solid token-value(color grey light);
4
+ @include ruler();
8
5
  }
@@ -1,7 +1,5 @@
1
- @use "modules/tokens" as *;
2
- @use "modules/utils" as *;
3
- @use "../modules/grid" as *;
4
- @use "../base/shadings" as *;
1
+ @use "qc-sdg-lib" as *;
2
+ @use "base/shadings" as *;
5
3
 
6
4
  .qc-to-top {
7
5
  &[demo="false"] {
@@ -21,7 +19,7 @@
21
19
  opacity: 0;
22
20
  background-size: rem(16) rem(20);
23
21
 
24
- @extend .qc-shading-1;
22
+ @include qc-shading(1);
25
23
 
26
24
  &[style*='block']{ display: flex !important; }
27
25
  &:hover {
@@ -31,7 +29,7 @@
31
29
  background-color: token-value( color blue regular);
32
30
  outline: 2px solid token-value(color blue light);
33
31
  border: 2px solid token-value(color blue dark);
34
- @extend .qc-shading-2;
32
+ @include qc-shading(2);
35
33
  }
36
34
  &:active {
37
35
  background-color: token-value( color blue light);