@trilogy-ds/styles 4.15.2 → 4.15.3

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.
@@ -55,8 +55,8 @@
55
55
  .checkbox-tile {
56
56
  input:checked ~ label.checkbox-label {
57
57
  &:after {
58
- top: 16px;
59
- left: 16px;
58
+ top: 15px;
59
+ left: 15px;
60
60
  }
61
61
  }
62
62
  }
@@ -68,4 +68,3 @@
68
68
  }
69
69
  }
70
70
  }
71
-
@@ -71,8 +71,12 @@
71
71
  left: 18px;
72
72
  }
73
73
  }
74
- }
75
74
 
76
- .radio-tile[aria-checked="true"] {
77
- cursor: default;
75
+ input:checked:disabled ~ label.radio-label {
76
+ &:after {
77
+ background-color: getColor('neutral');
78
+ top: 19px;
79
+ left: 19px;
80
+ }
81
+ }
78
82
  }
@@ -1,99 +1,216 @@
1
1
  @use "sass:math";
2
- @import './stepper-legacy';
3
2
 
4
- .stepper-container {
5
- .stepper-items {
6
- display: flex;
7
- position: relative;
8
- justify-content: space-between;
9
- min-height: 44px;
10
- gap: $spacing-2;
11
- margin-top: $spacing-3;
3
+ .stepper-wrapper {
4
+ display: flex;
5
+ position: relative;
6
+ justify-content: space-between;
7
+ min-height: 44px;
8
+ gap: $spacing-4;
9
+
10
+ @include touch {
11
+ gap : $spacing-2;
12
12
  }
13
+ }
13
14
 
14
- .stepper-item {
15
- display: flex;
16
- flex-direction: column;
17
- width: 100%;
15
+ .stepper-item {
16
+ display: flex;
17
+ flex-direction: column;
18
+ width: 100%;
19
+
20
+ &:before {
21
+ content: "";
22
+ display: block;
23
+ height: 4px;
24
+ border-radius: var(--radius-small);
25
+ background-size: 200% !important;
26
+ background-color: getColor('neutral');
27
+ }
28
+
29
+ &.is-error {
18
30
 
19
31
  &:before {
20
- content: "";
21
- display: block;
22
- height: 4px;
23
- border-radius: var(--radius-small);
24
- background-size: 200% !important;
25
- background-color: getColor('neutral');
32
+ background-color: getColor('error') !important;
33
+
34
+ }
35
+ &.is-current{
36
+ &:before{
37
+ animation: progress 1s;
38
+ }
39
+
40
+ }
41
+
42
+ .step-bars {
43
+ background: getColor('error') !important;
26
44
  }
27
45
 
28
- &.is-error {
29
- &:before {
46
+ color: getColor('font');
47
+
48
+ .step-label {
49
+
50
+ &::before {
51
+ content: "";
52
+ mask-image: url('./assets/icons/all/times.svg') !important;
30
53
  background-color: getColor('error') !important;
54
+ border-width: 0;
55
+ mask-size: 20px;
56
+ width: 20px;
57
+ height: 20px;
58
+ align-self: baseline;
59
+ margin-top: 2px;
31
60
  }
32
61
 
33
- &.is-current {
34
- &:before {
35
- animation: progress 1s;
36
- }
62
+ .icon {
63
+ display: none;
37
64
  }
38
65
  }
66
+ }
39
67
 
40
- &.is-done {
41
- &:before {
42
- background-color: getColor('font');
68
+ &.is-done {
69
+
70
+ &:before {
71
+ background-color: getColor('font');
72
+ }
73
+
74
+ .step-bars {
75
+ background: getColor('font');
76
+ transition: background-color 1s ease-in-out;
77
+ }
78
+
79
+ .step-label {
80
+ &::before {
81
+ content: "";
82
+ mask-image: url('./assets/icons/all/check-circle.svg');
83
+ background-color: getColor('success');
84
+ border-width: 0;
85
+ min-width: 20px;
86
+ mask-size: 20px;
87
+ height: 20px;
88
+ align-self: baseline;
89
+ margin-top: 2px;
43
90
  }
44
91
  }
92
+ }
45
93
 
46
- &.is-current,
47
- &.is-active {
48
- &:before {
49
- background-color: getColor('main');
50
- animation: progress 1s;
94
+ &.is-current,
95
+ &.is-active {
96
+
97
+ &:before {
98
+ background-color: getColor('main');
99
+ animation: progress 1s;
100
+ }
101
+
102
+ .step-bars {
103
+ background: getColor('main');
104
+ }
105
+
106
+ .step-label {
107
+ font-style: normal;
108
+ font-weight: 600;
109
+ font-size: 20px;
110
+ line-height: 22px;
111
+ width: max-content;
112
+
113
+ .icon [class^=tri-], .icon [class*=" tri-"] {
114
+ height: 22px;
115
+ width: 22px;
116
+ margin: 0 4px 0 -4px;
117
+ }
118
+
119
+ @include tablet-only {
120
+ width: 90% !important;
121
+ }
122
+
123
+ @include mobile {
124
+ font-size: 18px;
125
+ width: 90%;
51
126
  }
52
127
  }
53
128
  }
129
+ }
54
130
 
55
- .step-count {
56
- margin-bottom: $spacing-2 !important;
131
+ .step-bars {
132
+ height: 4px;
133
+ background: getColor('disabled');
134
+ border-radius: var(--radius-small);
135
+ display: none;
136
+ }
137
+
138
+ .step-label {
139
+ display: flex;
140
+ align-items: center;
141
+ color: getColor('font');
142
+ font-style: normal;
143
+ font-weight: 400;
144
+ font-size: 16px;
145
+ line-height: 24px;
146
+ padding-top: $spacing-2;
147
+ gap: $spacing-1;
148
+ .icon {
149
+ font-size: 20px;
150
+ height: auto;
151
+ }
152
+
153
+ @include touch {
154
+ position: absolute;
155
+ top: 10px;
156
+ left: 0;
57
157
  }
158
+ }
58
159
 
59
- .step-label {
60
- transition: opacity 0.3s ease-in-out;
61
- animation: fadeInLabel 0.4s ease-out;
160
+ @include desktop {
161
+ .step-count {
162
+ display: none;
62
163
  }
164
+ }
63
165
 
64
- @keyframes fadeInLabel {
65
- 0% {
66
- opacity: 0;
67
- }
68
- 100% {
69
- opacity: 1;
70
- }
166
+ @include mobile {
167
+ .step-count {
168
+ position: absolute;
169
+ top: 23px;
170
+ right: 8px;
171
+ font-size: 14px;
172
+ line-height: 18px;
173
+ font-weight: 600;
71
174
  }
72
175
 
73
- @include mobile {
74
- .step-count {
75
- font-size: 12px !important;
76
- line-height: 18px !important;
77
- }
176
+ .stepper-item:not(.is-current) {
177
+ display: flex;
178
+
78
179
  .step-label {
79
- font-size: 14px !important;
80
- line-height: 18px !important;
180
+ display: none;
81
181
  }
182
+ }
183
+ }
82
184
 
83
- .stepper-wrapper .icon {
84
- font-size: 16px !important;
85
- }
185
+ @include tablet-only {
186
+ .step-count {
187
+ position: absolute;
188
+ top: 24px;
189
+ right: 8px;
190
+ font-size: 14px;
191
+ line-height: 18px;
192
+ font-weight: 600;
86
193
  }
87
194
 
88
- @keyframes progress {
89
- 0%, 100% {
90
- background-image: linear-gradient(to right, transparent 0, transparent 50%, getColor('neutral') 50%, getColor('neutral') 100%);
91
- }
92
- 0% {
93
- background-position: 100% 0;
94
- }
95
- 100% {
96
- background-position: 0 0;
195
+ .stepper-item:not(.is-current) {
196
+ display: flex;
197
+
198
+ .step-label {
199
+ display: none;
97
200
  }
98
201
  }
99
202
  }
203
+
204
+
205
+ @keyframes progress {
206
+ 0%, 100% {
207
+ background-image: linear-gradient(to right, transparent 0, transparent 50%, getColor('neutral') 50%, getColor('neutral') 100%);
208
+ }
209
+ 0% {
210
+ background-position: 100% 0;
211
+ }
212
+ 100% {
213
+ background-position: 0 0;
214
+ }
215
+ }
216
+
@@ -44,61 +44,6 @@
44
44
  display: flex;
45
45
  gap: 16px;
46
46
  flex-wrap: wrap;
47
-
48
- &.is-grid {
49
- display: grid;
50
-
51
- & > .radio-tile {
52
- width: 100%;
53
- }
54
- }
55
- @for $i from 1 through 12 {
56
- &.is-grid-cols-#{$i} {
57
- grid-template-columns: repeat(#{$i}, 1fr);
58
- }
59
- }
60
- @include mobile {
61
- @for $i from 1 through 12 {
62
- &.is-grid-cols-mobile-#{$i} {
63
- grid-template-columns: repeat(#{$i}, 1fr);
64
- }
65
- }
66
- }
67
- @include tablet {
68
- @for $i from 1 through 12 {
69
- &.is-grid-cols-tablet-#{$i} {
70
- grid-template-columns: repeat(#{$i}, 1fr);
71
- }
72
- }
73
- }
74
- @include touch {
75
- @for $i from 1 through 12 {
76
- &.is-grid-cols-touch-#{$i} {
77
- grid-template-columns: repeat(#{$i}, 1fr);
78
- }
79
- }
80
- }
81
- @include desktop {
82
- @for $i from 1 through 12 {
83
- &.is-grid-cols-desktop-#{$i} {
84
- grid-template-columns: repeat(#{$i}, 1fr);
85
- }
86
- }
87
- }
88
- @include widescreen {
89
- @for $i from 1 through 12 {
90
- &.is-grid-cols-widescreen-#{$i} {
91
- grid-template-columns: repeat(#{$i}, 1fr);
92
- }
93
- }
94
- }
95
- @include fullhd {
96
- @for $i from 1 through 12 {
97
- &.is-grid-cols-fullhd-#{$i} {
98
- grid-template-columns: repeat(#{$i}, 1fr);
99
- }
100
- }
101
- }
102
47
  }
103
48
 
104
49
  //BOTH
@@ -210,59 +155,20 @@
210
155
  }
211
156
  }
212
157
 
213
- .#{$type}-tiles:not(.is-grid) {
214
- .#{$type}-tile:not(.is-horizontal) {
215
- max-width: 160px;
216
- }
217
- }
218
-
219
158
  //TILE ONLY
220
159
  .#{$type}-tile {
221
160
  position: relative;
222
- display: flex;
223
- flex-direction: column;
224
- position: relative;
225
- padding: 40px 16px 16px;
226
- border: var(--border);
227
- border-radius: var(--radius);
228
- box-sizing: border-box;
229
- background-color: getColor('background');
161
+ max-width: 160px;
162
+ display: inline-block;
230
163
  text-align: center;
231
- align-items: center;
232
- font-size: 14px;
233
-
234
- &[aria-disabled="true"] {
235
- @include disabledRules;
236
- filter: none;
237
- label.#{$type}-label {
238
- cursor: not-allowed !important;
239
- }
240
- }
241
164
 
242
- &[aria-checked="true"] {
243
- border-color: getColor('main');
244
- border-width: 2px;
245
- padding: 15px;
246
- padding-top: 39px;
247
- label.radio-label:before {
248
- top: 15px;
249
- left: 15px;
250
- }
251
- .#{$type}-sticker {
252
- top: -1px;
253
- right: 15px;
165
+ input:disabled,
166
+ input:disabled:checked {
167
+ & ~ label.#{$type}-label {
168
+ @include disabledRules;
254
169
  }
255
170
  }
256
-
257
- &:not([aria-disabled="true"]) {
258
- cursor: pointer;
259
- }
260
-
261
- &:not([aria-disabled="true"]):not([aria-checked="true"]) {
262
- @include label-states;
263
- }
264
-
265
- &:has(input:focus-visible) {
171
+ &:has(input:focus-visible) label.#{$type}-label{
266
172
  outline: 1px solid;
267
173
  }
268
174
 
@@ -274,22 +180,67 @@
274
180
  margin-right: 0;
275
181
  }
276
182
 
277
- .#{$type}-content {
278
- display: flex;
279
- flex-direction: column;
280
- }
281
-
282
183
  label.#{$type}-label {
283
184
  display: block;
284
- font-weight: bold;
285
- width: 100%;
286
- display: block;
287
- font-size: 16px;
288
- order: - 1;
185
+ position: relative;
186
+ padding: 40px 16px 16px;
187
+ border: var(--border);
188
+ border-radius: var(--radius);
189
+ box-sizing: border-box;
190
+ background-color: getColor('background');
191
+ height: 100%;
192
+
289
193
  &:before {
290
194
  top: 16px;
291
195
  left: 16px;
292
196
  }
197
+
198
+ span.#{$type}-title {
199
+ font-weight: bold;
200
+ width: 100%;
201
+ display: block;
202
+ font-size: 16px;
203
+ }
204
+ }
205
+
206
+ input {
207
+ &:not(:disabled):not(:checked) ~ label.radio-label {
208
+ @include label-states;
209
+ }
210
+
211
+ &:not(:disabled) ~ label.checkbox-label {
212
+ @include label-states;
213
+ }
214
+
215
+ &:checked:not(:disabled) ~ label.#{$type}-label {
216
+ border-color: getColor('main');
217
+ border-width: 2px;
218
+ padding: 15px;
219
+ padding-top: 39px;
220
+
221
+ &:before {
222
+ top: 15px;
223
+ left: 15px;
224
+ }
225
+
226
+ span.#{$type}-title {
227
+ color: getColor('main');
228
+ }
229
+ }
230
+
231
+ &:disabled {
232
+ & ~ label.#{$type}-label {
233
+ &:before {
234
+ border-color: getColor('disabled') !important;
235
+ }
236
+ }
237
+ }
238
+
239
+ &:disabled:checked ~ label.#{$type}-label {
240
+ .checkbox-title {
241
+ color: getColor('disabled');
242
+ }
243
+ }
293
244
  }
294
245
 
295
246
  .#{$type}-sticker {
@@ -300,34 +251,44 @@
300
251
  }
301
252
 
302
253
  &.is-horizontal {
303
- flex-direction: row;
254
+ display: flex;
255
+ justify-content: space-between;
304
256
  align-items: center;
305
257
  max-width: unset;
306
258
  width: 100%;
307
259
  position: relative;
308
- text-align: left;
309
- padding: $spacing-4 $spacing-4 $spacing-4 $spacing-8;
310
- align-items: center;
311
260
 
312
261
  &.is-narrow {
313
262
  width: fit-content;
314
263
  }
315
264
 
265
+ input {
266
+ &:checked:not(:disabled) ~ label.#{$type}-label {
267
+ padding: ($spacing-4 - 1px) ($spacing-4 - 1px) ($spacing-4 - 1px) ($spacing-8 - 1px);
268
+ }
269
+
270
+ }
271
+
316
272
  label.#{$type}-label {
273
+ width: 100%;
274
+ display: flex;
275
+ align-items: center;
276
+ justify-content: flex-start;
277
+ text-align: left;
278
+ padding: $spacing-4 $spacing-4 $spacing-4 $spacing-8;
279
+
280
+
317
281
  &:before,
318
282
  &:after {
319
283
  top: 50% !important;
320
284
  transform: translateY(-50%);
321
285
  }
322
- }
286
+ > .icon {
287
+ margin-right: $spacing-4;
288
+ }
323
289
 
324
- & > .icon {
325
- margin-right: $spacing-4;
326
290
  }
327
291
 
328
- &[aria-checked="true"] {
329
- padding: ($spacing-4 - 1px) ($spacing-4 - 1px) ($spacing-4 - 1px) ($spacing-8 - 1px);
330
- }
331
292
  }
332
293
  }
333
294
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trilogy-ds/styles",
3
- "version": "4.15.2",
3
+ "version": "4.15.3",
4
4
  "author": "Bouygues Telecom",
5
5
  "repository": {
6
6
  "type": "git",