qc-trousse-sdg 1.4.2 → 1.4.4

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.
@@ -1,6 +1,12 @@
1
1
  @use "qc-sdg-lib" as *;
2
2
  @use "sass:map";
3
3
 
4
+ %button-disabled {
5
+ cursor: not-allowed;
6
+ box-shadow: none;
7
+ opacity: 1;
8
+ }
9
+
4
10
  .qc-button {
5
11
  font-family: token-value(font family, content);
6
12
  font-size: token-value(font size, md);
@@ -14,11 +20,11 @@
14
20
  min-width: rem(112);
15
21
  max-width: rem(360);
16
22
  min-height: rem(56);
17
- padding: rem(16) rem(24);
23
+ // Compensation pour la bordure en retirant 2px de padding de chaque côté
24
+ padding: rem(14) rem(22);
18
25
  vertical-align: middle;
19
- border: 2px solid transparent;
26
+ border: rem(2) solid transparent;
20
27
  cursor: pointer;
21
- margin-right: rem(32);
22
28
  margin-bottom: token-value(spacer, md);
23
29
 
24
30
  &:focus,
@@ -30,9 +36,9 @@
30
36
  font-weight: token-value(font weight, semi-bold);
31
37
  min-width: rem(80);
32
38
  min-height: rem(40);
33
- padding: rem(8) rem(16);
34
- border-width: 1px;
35
- margin-right: token-value(spacer, md);
39
+ // Compensation pour la bordure en retirant 1px de padding de chaque côté
40
+ padding: rem(7) rem(15);
41
+ border-width: rem(1);
36
42
  margin-bottom: token-value(spacer, sm);
37
43
  }
38
44
 
@@ -66,6 +72,14 @@
66
72
  background-color: token-value(color blue, regular_light);
67
73
  border-color: token-value(color blue, regular_light);
68
74
  }
75
+
76
+ &:disabled,
77
+ &.qc-disabled {
78
+ background-color: token-value(color grey, light);
79
+ border-color: token-value(color grey, light);
80
+ color: token-value(color white);
81
+ @extend %button-disabled;
82
+ }
69
83
  }
70
84
 
71
85
  &.qc-secondary {
@@ -90,6 +104,13 @@
90
104
  &.qc-active {
91
105
  background-color: rgba(map.get(map.get(map.get($xl-tokens, color), blue), piv), 0.08);
92
106
  }
107
+
108
+ &:disabled,
109
+ &.qc-disabled {
110
+ border-color: token-value(color grey, regular);
111
+ color: token-value(color grey regular);
112
+ @extend %button-disabled;
113
+ }
93
114
  }
94
115
 
95
116
  &.qc-tertiary {
@@ -114,6 +135,12 @@
114
135
  &.qc-active {
115
136
  background-color: rgba(map.get(map.get(map.get($xl-tokens, color), grey), light), 0.16);
116
137
  }
138
+
139
+ &:disabled,
140
+ &.qc-disabled {
141
+ color: token-value(color grey regular);
142
+ @extend %button-disabled;
143
+ }
117
144
  }
118
145
 
119
146
  &.qc-danger {
@@ -137,16 +164,14 @@
137
164
  &.qc-active {
138
165
  background-color: token-value(color red regular_light);
139
166
  }
140
- }
141
167
 
142
- &:disabled,
143
- &.qc-disabled {
144
- background-color: token-value(color grey, light);
145
- border-color: token-value(color grey, light);
146
- color: token-value(color white);
147
- cursor: not-allowed;
148
- box-shadow: none;
149
- opacity: 1;
168
+ &:disabled,
169
+ &.qc-disabled {
170
+ background-color: token-value(color grey, light);
171
+ border-color: token-value(color grey, light);
172
+ color: token-value(color white);
173
+ @extend %button-disabled;
174
+ }
150
175
  }
151
176
 
152
177
  .qc-icon {
@@ -190,9 +215,7 @@
190
215
  &:disabled,
191
216
  &.qc-disabled {
192
217
  color: token-value(color, grey regular);
193
- cursor: not-allowed;
194
- box-shadow: none;
195
- opacity: 1;
218
+ @extend %button-disabled;
196
219
  }
197
220
  }
198
221
 
@@ -200,3 +223,13 @@
200
223
  text-decoration: none;
201
224
  }
202
225
  }
226
+
227
+ .qc-button-group {
228
+ display: flex;
229
+ flex-wrap: wrap;
230
+ column-gap: rem(4 * $base-spacer);
231
+
232
+ &.qc-compact {
233
+ column-gap: token-value(spacer, md);
234
+ }
235
+ }
@@ -17,6 +17,11 @@ label.qc-selection-button {
17
17
 
18
18
  &:has(input:checked)::before {
19
19
  background-color: token-value(color, blue, pale);
20
+ border-color: token-value(color, blue, light);
21
+ }
22
+
23
+ &:focus, &:has(input:focus)::before {
24
+ border-color: inherit;
20
25
  }
21
26
 
22
27
  &:has(input:disabled)::before {
@@ -6,7 +6,7 @@ $min-height: 40;
6
6
  display: flex;
7
7
  width: 100%;
8
8
  justify-content: space-between;
9
- height: rem($min-height);
9
+ height: rem($min-height - 2);
10
10
  align-items: center;
11
11
  background-color: token-value(color, background);
12
12
  border: none;
@@ -43,6 +43,10 @@ $border: 1;
43
43
 
44
44
  &.qc-dropdown-list-invalid {
45
45
  border: rem(2) solid token-value(color, red, regular) !important;
46
+
47
+ & > .qc-dropdown-button {
48
+ height: rem(36);
49
+ }
46
50
  }
47
51
  }
48
52
 
@@ -1,7 +1,7 @@
1
1
  @use "qc-sdg-lib" as *;
2
2
 
3
3
  .qc-label {
4
- font-weight: token-value(font weight content medium);
4
+ font-weight: token-value(font weight content bold);
5
5
  display: block;
6
6
 
7
7
  &.qc-compact {
@@ -28,7 +28,7 @@ textarea {
28
28
  position: relative;
29
29
  color: token-value(color text primary);
30
30
  background-color: token-value(color background);
31
- padding: rem(8);
31
+ padding: rem(7);
32
32
  text-overflow: ellipsis;
33
33
  overflow: hidden;
34
34
  margin-top: rem(4);
@@ -43,7 +43,7 @@ textarea {
43
43
  &:focus-visible {
44
44
  outline: 2px solid token-value(color formfield focus outline);
45
45
  border: 2px solid token-value(color formfield focus border);
46
- padding: rem(7);
46
+ padding: rem(6);
47
47
  }
48
48
 
49
49
  &:disabled {
@@ -56,7 +56,7 @@ textarea {
56
56
  [invalid] > & {
57
57
  border-color: token-value(color, red, regular);
58
58
  border-width: 2px;
59
- padding: rem(7);
59
+ padding: rem(6);
60
60
  }
61
61
 
62
62
  }
@@ -29,6 +29,7 @@
29
29
  background-color: token-value( color blue regular);
30
30
  outline: 2px solid token-value(color blue light);
31
31
  border: 2px solid token-value(color blue dark);
32
+ outline-offset: 0;
32
33
  @include qc-shading(2);
33
34
  }
34
35
  &:active {
@@ -22,9 +22,3 @@ $grid-aliases: (
22
22
  mobile: xs
23
23
  );
24
24
 
25
-
26
- //TODO 1 -générer automatiquement cette map à partir du contenu du fichie img en javascript (avec gupl ou autre)
27
- //TODO 2 - demander des nouvelles icône les plus neutres possibles
28
- //TODO 3 - faire le ménage ; certaines icones sont présentées en 2 couleaurs, ce qui est inutile depuis l'introduction de qc-icon
29
-
30
-