@trilogy-ds/styles 0.0.5-beta-v4 → 0.0.9-beta-v4

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,14 +1,20 @@
1
1
  body:not(.is-tight) {
2
- .accordions:not(:last-child) {
2
+ .accordion:not(:last-child) {
3
+ margin-bottom: 24px;
4
+ }
5
+ .buttons:not(:last-child) {
3
6
  margin-bottom: 24px;
4
7
  }
5
8
  .card:not(:last-child) {
6
9
  margin-bottom: 24px;
7
10
  }
11
+ .columns:not(:last-child) {
12
+ margin-bottom: 24px;
13
+ }
8
14
  .box:not(:last-child) {
9
15
  margin-bottom: 24px;
10
16
  }
11
- *:has(+.divider):not(:last-child) {
17
+ *:has(+ .divider):not(:last-child) {
12
18
  margin-bottom: 24px;
13
19
  }
14
20
  .divider:not(:last-child) {
@@ -65,7 +71,10 @@ body:not(.is-tight) {
65
71
  .progress-radial:not(:last-child) {
66
72
  margin-bottom: 8px;
67
73
  }
68
- .radio:not(:last-child) {
74
+ .radios:not(:last-child) {
75
+ margin-bottom: 12px;
76
+ }
77
+ :not(.radios) >.radios:not(:last-child) {
69
78
  margin-bottom: 12px;
70
79
  }
71
80
  .checkbox:not(:last-child) {
@@ -74,10 +83,16 @@ body:not(.is-tight) {
74
83
  .switch:not(:last-child) {
75
84
  margin-bottom: 12px;
76
85
  }
77
- .radio-tile:not(:last-child) {
86
+ .radio-tiles:not(:last-child) {
87
+ margin-bottom: 16px;
88
+ }
89
+ :not(.radio-tiles) > .radio-tile:not(:last-child) {
90
+ margin-bottom: 24px;
91
+ }
92
+ .checkbox-tiles:not(:last-child) {
78
93
  margin-bottom: 24px;
79
94
  }
80
- .checkbox-tile:not(:last-child) {
95
+ :not(.checkbox-tiles) > .checkbox-tile:not(:last-child) {
81
96
  margin-bottom: 24px;
82
97
  }
83
98
  .field:not(:last-child) {
@@ -101,7 +116,10 @@ body:not(.is-tight) {
101
116
  .sticker:not(:last-child) {
102
117
  margin-bottom: 8px;
103
118
  }
104
- .tag:not(:last-child) {
119
+ .tags:not(:last-child) {
120
+ margin-bottom: 16px;
121
+ }
122
+ :not(.tags) > .tag:not(:last-child) {
105
123
  margin-bottom: 8px;
106
124
  }
107
125
  .title.is-level-1:not(:last-child) {
@@ -150,16 +168,22 @@ body:not(.is-tight) {
150
168
 
151
169
  @include mobile() {
152
170
  body:not(.is-tight) {
153
- .accordions:not(:last-child) {
171
+ .accordion:not(:last-child) {
172
+ margin-bottom: 16px;
173
+ }
174
+ .buttons:not(:last-child) {
154
175
  margin-bottom: 16px;
155
176
  }
156
177
  .card:not(:last-child) {
157
178
  margin-bottom: 16px;
158
179
  }
180
+ .columns:not(:last-child) {
181
+ margin-bottom: 16px;
182
+ }
159
183
  .box:not(:last-child) {
160
184
  margin-bottom: 16px;
161
185
  }
162
- *:has(+.divider):not(:last-child) {
186
+ *:has(+ .divider):not(:last-child) {
163
187
  margin-bottom: 16px;
164
188
  }
165
189
  .divider:not(:last-child) {
@@ -216,7 +240,10 @@ body:not(.is-tight) {
216
240
  .progress-radial:not(:last-child) {
217
241
  margin-bottom: 8px;
218
242
  }
219
- .radio:not(:last-child) {
243
+ .radios:not(:last-child) {
244
+ margin-bottom: 12px;
245
+ }
246
+ :not(.radios) >.radios:not(:last-child) {
220
247
  margin-bottom: 12px;
221
248
  }
222
249
  .checkbox:not(:last-child) {
@@ -225,10 +252,16 @@ body:not(.is-tight) {
225
252
  .switch:not(:last-child) {
226
253
  margin-bottom: 12px;
227
254
  }
228
- .radio-tile:not(:last-child) {
255
+ .radio-tiles:not(:last-child) {
256
+ margin-bottom: 12px;
257
+ }
258
+ :not(.radio-tiles) > .radio-tile:not(:last-child) {
259
+ margin-bottom: 16px;
260
+ }
261
+ .checkbox-tiles:not(:last-child) {
229
262
  margin-bottom: 16px;
230
263
  }
231
- .checkbox-tile:not(:last-child) {
264
+ :not(.checkbox-tiles) > .checkbox-tile:not(:last-child) {
232
265
  margin-bottom: 16px;
233
266
  }
234
267
  .field:not(:last-child) {
@@ -252,7 +285,10 @@ body:not(.is-tight) {
252
285
  .sticker:not(:last-child) {
253
286
  margin-bottom: 8px;
254
287
  }
255
- .tag:not(:last-child) {
288
+ .tags:not(:last-child) {
289
+ margin-bottom: 16px;
290
+ }
291
+ :not(.tags) > .tag:not(:last-child) {
256
292
  margin-bottom: 8px;
257
293
  }
258
294
  .title.is-level-1:not(:last-child) {
@@ -3,7 +3,7 @@
3
3
  margin: -2.5px;
4
4
  align-items: center;
5
5
  display: flex;
6
- justify-content: space-between;
6
+ justify-content: center;
7
7
  text-align: center;
8
8
 
9
9
  .pagination-previous,
@@ -38,7 +38,6 @@
38
38
  .pagination-list {
39
39
  flex: 0 0 auto;
40
40
  flex-wrap: wrap;
41
- flex-grow: 1;
42
41
  align-items: center;
43
42
  display: flex;
44
43
  justify-content: center;
@@ -53,6 +53,11 @@ $button-border-width: 2px !default;
53
53
  }
54
54
  }
55
55
 
56
+ &.is-ghost:hover {
57
+ background-color: var(--color-main-fade);
58
+ filter: none !important;
59
+ }
60
+
56
61
  &[disabled],
57
62
  &[aria-disabled=true] {
58
63
  background-color: getColorValue('main-fade') !important;
@@ -2,7 +2,8 @@
2
2
 
3
3
  .radios {
4
4
  width: 100%;
5
- gap: 16px;
5
+ column-gap: $spacing-5;
6
+ row-gap: $spacing-3;
6
7
  display: flex;
7
8
  flex-wrap: wrap;
8
9
  flex-direction: column;
@@ -1,11 +1,14 @@
1
-
2
1
  .select {
3
2
  position: relative;
4
- input { cursor: pointer;}
3
+
4
+ input {
5
+ cursor: pointer;
6
+ }
5
7
 
6
8
  select {
7
9
  width: 100%;
8
10
  @include input;
11
+
9
12
  &:focus {
10
13
  padding-left: 15px !important;
11
14
  }
@@ -14,14 +17,15 @@
14
17
  .has-icons-left {
15
18
  select {
16
19
  padding-left: 45px;
20
+
17
21
  &:focus {
18
22
  padding-left: 44px !important;
19
23
  }
20
24
  }
21
25
  }
22
26
 
23
- &-options {
24
- box-shadow: 0 0 8px #0000001a;
27
+ &-options {
28
+ box-shadow: 0 0 8px #0000001a;
25
29
  border-radius: 4px;
26
30
  overflow: hidden;
27
31
  position: absolute;
@@ -32,65 +36,70 @@
32
36
  }
33
37
 
34
38
  .field {
39
+ margin-bottom: 0 !important;
40
+
35
41
  &.focus {
36
- &:after{
42
+ &:after {
37
43
  @include arrow('up');
38
44
  right: 12px;
39
- top:50%;
40
- transform: translate(-50%,-50%);
45
+ top: 50%;
46
+ transform: translate(-50%, -50%);
41
47
  }
42
48
  }
49
+
43
50
  &:not(.focus) {
44
- &:after{
51
+ &:after {
45
52
  @include arrow();
46
53
  right: 12px;
47
- top:50%;
48
- transform: translate(-50%,-50%);
54
+ top: 50%;
55
+ transform: translate(-50%, -50%);
49
56
  }
50
57
  }
51
- }
58
+ }
52
59
 
53
60
 
54
61
  &-trilogy_modal_open {
55
62
  position: fixed;
56
- top:0;
57
- left:0;
58
- right:0;
59
- bottom:0;
63
+ top: 0;
64
+ left: 0;
65
+ right: 0;
66
+ bottom: 0;
60
67
  z-index: 1000;
61
68
  }
62
69
 
63
- .radio-tile {
64
- input:checked {
65
- &~label.radio-label {
66
- font-weight: $weight-black ;
70
+ .select-options {
71
+ background-color: getColor('background');
72
+
73
+ li.option {
74
+ padding: $spacing-3 $spacing-4;
75
+ cursor: pointer;
76
+ display: flex;
77
+ gap: $spacing-2;
78
+
79
+ @include hover;
80
+
81
+ &.is-disabled {
82
+ color: getColor('disabled');
83
+ background-color: getColor('disabled-fade');
84
+ cursor: not-allowed;
85
+ }
86
+
87
+ &[data-selected="true"] {
88
+ font-weight: $weight-black;
89
+
67
90
  &:after {
68
91
  content: "" !important;
69
92
  mask-image: url('./assets/icons/all/check.svg') !important;
70
93
  background-color: getColor('main') !important;
71
94
  mask-size: 18px !important;
72
- top: 25px !important;
73
95
  right: 18px !important;
74
- height:18px !important;
75
- width: 18px !important
96
+ height: 18px !important;
97
+ width: 18px !important;
98
+ position: absolute;
76
99
  }
77
- }
78
- }
79
-
80
- label.radio-label {
81
- border:none !important;
82
- border-radius: 0 !important;
83
- height: 52px;
84
- &:before { display: none; }
85
- @include hover
86
- }
87
-
88
- &.focus label.radio-label { @include hoverRules(); }
89
-
90
- .icon.is-medium {
91
- font-size: $text-20 !important;
100
+ }
92
101
  }
93
- }
102
+ }
94
103
  }
95
104
 
96
105
 
@@ -8,8 +8,13 @@
8
8
  }
9
9
 
10
10
  input {
11
- display: none;
11
+ opacity: 0;
12
+ position: absolute;
13
+ outline: none;
12
14
 
15
+ &:focus-visible ~ label:before{
16
+ outline: 2px solid;
17
+ }
13
18
  &:disabled ~ label,
14
19
  &:disabled:checked ~ label {
15
20
  cursor: not-allowed;
@@ -6,23 +6,8 @@ $tag-delete-margin: 1px !default;
6
6
  justify-content: flex-start;
7
7
  align-items: center;
8
8
  flex-wrap: wrap;
9
- margin-bottom: 16px;
10
-
11
- // multi-tags : ajout d'une marge bottom, supprimable par facette
12
- &:not(.is-gapless) {
13
- &:not(:last-child) {
14
- margin-right: 8px;
15
- }
16
-
17
- .tag {
18
- margin-bottom: 10px;
19
- }
20
- }
21
-
9
+ gap: $spacing-3;
22
10
  // multi-tags : ajout d'une marge à droite de chaque tag
23
- .tag:not(:last-child) {
24
- margin-right: 8px;
25
- }
26
11
 
27
12
  // centrage des tags
28
13
  &.is-centered {
@@ -34,7 +19,6 @@ $tag-delete-margin: 1px !default;
34
19
  cursor: pointer;
35
20
 
36
21
  .tag {
37
- margin-right: 0;
38
22
 
39
23
  &:not(:first-child) {
40
24
  border-bottom-left-radius: 0;
@@ -10,7 +10,7 @@ $button-colors: (
10
10
  'accent':['conversion', 'accent', 'background'],
11
11
  'primary': ['primary', 'main', 'background'],
12
12
  'secondary': ['secondary', 'main-fade', 'main'],
13
- 'ghost': ['ghost', 'background', 'main'],
13
+ 'ghost': ['ghost', 'transparent', 'main']
14
14
  ) !default;
15
15
 
16
16
  %buttons-states {
@@ -11,6 +11,7 @@ $suffix: '';
11
11
  */
12
12
  $colors: (
13
13
  'background': [#fff, 'white', 'main'],
14
+ 'transparent': ['transparent', 'transparent', 'transparent'],
14
15
  'main':[ #3d5d7e, 'main', 'white'],
15
16
  'main-fade':[ #eff2f8, 'main-fade', 'white'],
16
17
  'accent':[ #da641b,'accent', 'white'],
@@ -409,7 +409,9 @@
409
409
  }
410
410
 
411
411
  input {
412
- display: none;
412
+ opacity: 0;
413
+ position: absolute;
414
+ outline: none;
413
415
 
414
416
  &:checked ~ label.#{$type}-label {
415
417
  border-color: getColor('main');
@@ -422,6 +424,9 @@
422
424
  background-color: getColor('main');
423
425
  }
424
426
  }
427
+ &:focus-visible ~ label.#{$type}-label:before {
428
+ outline: 1px solid;
429
+ }
425
430
 
426
431
  &:disabled,
427
432
  &:disabled:checked {
@@ -446,7 +451,6 @@
446
451
  .#{$type} {
447
452
  display: flex;
448
453
  align-items: center;
449
- margin: 6px 8px;
450
454
  width: fit-content;
451
455
 
452
456
  input:disabled,
@@ -457,8 +461,7 @@
457
461
  }
458
462
 
459
463
  label.#{$type}-label {
460
- padding: 4px;
461
- padding-left: 34px;
464
+ padding-left: 30px;
462
465
 
463
466
  &:before,
464
467
  &:after {
@@ -495,6 +498,9 @@
495
498
  @include disabledRules;
496
499
  }
497
500
  }
501
+ &:has(input:focus-visible) label.#{$type}-label{
502
+ outline: 1px solid;
503
+ }
498
504
 
499
505
  &:first-child {
500
506
  margin-left: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trilogy-ds/styles",
3
- "version": "0.0.5-beta-v4",
3
+ "version": "0.0.9-beta-v4",
4
4
  "author": "Bouygues Telecom",
5
5
  "license": "UNLICENSED",
6
6
  "files": [