@trilogy-ds/styles 0.0.1-beta-4 → 0.0.1-beta.11

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 (86) hide show
  1. package/README.md +47 -0
  2. package/dist/default/trilogy-mangled.css +1 -1
  3. package/dist/default/trilogy-partials.css +1 -1
  4. package/dist/default/trilogy.css +1 -1
  5. package/framework/src/base/_color.scss +14 -36
  6. package/framework/src/base/_generic.scss +4 -1
  7. package/framework/src/base/_helpers.scss +10 -29
  8. package/framework/src/base/_loading.scss +7 -0
  9. package/framework/src/components/_accordion.scss +15 -36
  10. package/framework/src/components/_all.scss +0 -3
  11. package/framework/src/components/_breadcrumb.scss +39 -34
  12. package/framework/src/components/_card.scss +6 -5
  13. package/framework/src/components/_countdown.scss +49 -47
  14. package/framework/src/components/_disclaimer.scss +6 -5
  15. package/framework/src/components/_divider.scss +2 -2
  16. package/framework/src/components/_dropdown.scss +95 -101
  17. package/framework/src/components/_fab.scss +6 -21
  18. package/framework/src/components/_media.scss +2 -2
  19. package/framework/src/components/_modal.scss +172 -166
  20. package/framework/src/components/_otp.scss +9 -28
  21. package/framework/src/components/_pagination.scss +109 -131
  22. package/framework/src/components/_plus-symbol.scss +1 -1
  23. package/framework/src/components/_popover.scss +1 -4
  24. package/framework/src/components/_price.scss +118 -169
  25. package/framework/src/components/_product-tour.scss +1 -3
  26. package/framework/src/components/_segmented-control.scss +39 -51
  27. package/framework/src/components/_slider.scss +70 -70
  28. package/framework/src/components/_stepper.scss +16 -140
  29. package/framework/src/components/_tabs.scss +32 -55
  30. package/framework/src/components/_timeline.scss +49 -42
  31. package/framework/src/elements/_alert.scss +4 -5
  32. package/framework/src/elements/_all.scss +0 -2
  33. package/framework/src/elements/_badge.scss +54 -59
  34. package/framework/src/elements/_box.scss +5 -23
  35. package/framework/src/elements/_button.scss +29 -129
  36. package/framework/src/elements/_checkbox.scss +21 -27
  37. package/framework/src/elements/_chips.scss +76 -81
  38. package/framework/src/elements/_entry.scss +73 -89
  39. package/framework/src/elements/_form.scss +15 -15
  40. package/framework/src/elements/_input-gauge.scss +36 -32
  41. package/framework/src/elements/_link.scss +47 -62
  42. package/framework/src/elements/_list.scss +0 -36
  43. package/framework/src/elements/_notification.scss +2 -3
  44. package/framework/src/elements/_other.scss +1 -1
  45. package/framework/src/elements/_paragraph.scss +4 -26
  46. package/framework/src/elements/_progress.scss +9 -18
  47. package/framework/src/elements/_radio.scss +1 -1
  48. package/framework/src/elements/_select.scss +209 -245
  49. package/framework/src/elements/_sticker.scss +8 -9
  50. package/framework/src/elements/_switch.scss +85 -88
  51. package/framework/src/elements/_table.scss +11 -72
  52. package/framework/src/elements/_tag.scss +104 -104
  53. package/framework/src/elements/_textarea.scss +92 -106
  54. package/framework/src/elements/_title.scss +86 -84
  55. package/framework/src/elements/_toaster.scss +2 -3
  56. package/framework/src/grid/_columns.scss +5 -5
  57. package/framework/src/layout/_hero.scss +129 -211
  58. package/framework/src/layout/_section.scss +3 -3
  59. package/framework/src/layout/_toolbar.scss +6 -6
  60. package/framework/src/utilities/_controls.scss +37 -39
  61. package/framework/src/utilities/_derived-variables.scss +3 -14
  62. package/framework/src/utilities/_initial-variables.scss +38 -23
  63. package/framework/src/utilities/_mixins.scss +523 -582
  64. package/package.json +4 -3
  65. package/framework/src/components/_menu.scss +0 -213
  66. package/framework/src/components/_search-modal.scss +0 -197
  67. package/framework/src/components/_slices.scss +0 -316
  68. package/framework/src/components/_switch.scss +0 -209
  69. package/framework/src/elements/_checkradio.scss +0 -173
  70. package/framework/src/elements/_options.scss +0 -146
  71. package/framework/src/elements/_timeline.scss +0 -283
  72. /package/dist/default/assets/icons/all/{all/alert.svg → alert.svg} +0 -0
  73. /package/dist/default/assets/icons/all/{all/arrow-down.svg → arrow-down.svg} +0 -0
  74. /package/dist/default/assets/icons/all/{all/arrow-left.svg → arrow-left.svg} +0 -0
  75. /package/dist/default/assets/icons/all/{all/arrow-right.svg → arrow-right.svg} +0 -0
  76. /package/dist/default/assets/icons/all/{all/arrow-up.svg → arrow-up.svg} +0 -0
  77. /package/dist/default/assets/icons/all/{all/bell.svg → bell.svg} +0 -0
  78. /package/dist/default/assets/icons/all/{all/check-circle.svg → check-circle.svg} +0 -0
  79. /package/dist/default/assets/icons/all/{all/check.svg → check.svg} +0 -0
  80. /package/dist/default/assets/icons/all/{all/exclamation-circle.svg → exclamation-circle.svg} +0 -0
  81. /package/dist/default/assets/icons/all/{all/eye-slash.svg → eye-slash.svg} +0 -0
  82. /package/dist/default/assets/icons/all/{all/eye.svg → eye.svg} +0 -0
  83. /package/dist/default/assets/icons/all/{all/infos-circle.svg → infos-circle.svg} +0 -0
  84. /package/dist/default/assets/icons/all/{all/search.svg → search.svg} +0 -0
  85. /package/dist/default/assets/icons/all/{all/times.svg → times.svg} +0 -0
  86. /package/dist/default/assets/icons/all/{all/trash.svg → trash.svg} +0 -0
@@ -1,81 +1,76 @@
1
1
  .title .badge {
2
- margin-left: 0.6em;
3
- margin-right: 0.6em;
2
+ margin-left: 0.6em;
3
+ margin-right: 0.6em;
4
4
  }
5
5
 
6
6
  @mixin badge {
7
- display: inline-flex;
8
- border-radius: 99em;
9
- color: getColor('background');
10
- background: getColor('alternate');;
11
- font-size: $text-10;
12
- min-height: $text-20;
13
- min-width: $text-20;
14
- justify-content: center;
15
- align-items: center;
7
+ display: inline-flex;
8
+ border-radius: 99em;
9
+ color: getColor('background');
10
+ background: getColor('main');;
11
+ font-size: $text-10;
12
+ min-height: $text-20;
13
+ min-width: $text-20;
14
+ justify-content: center;
15
+ align-items: center;
16
16
 
17
- &:empty {
18
- min-width: $text-10;
19
- min-height: $text-10;
20
- }
17
+ &:empty {
18
+ min-width: $text-10;
19
+ min-height: $text-10;
20
+ }
21
21
 
22
- &.is-up {
23
- position: absolute;
24
- left: 50%;
25
- top: $text-10;
26
- right: $text-24;
27
- }
22
+ &.is-up {
23
+ position: absolute;
24
+ left: 50%;
25
+ top: $text-10;
26
+ right: $text-24;
27
+ }
28
28
 
29
- &.is-inverted {
30
- color: getColor('main');
31
- background: getColor('background');
32
- }
33
-
34
- ul.menu-list li a & {
35
- margin: 0 $text-15;
36
- max-height: 17px;
37
- }
29
+ &.is-inverted {
30
+ color: getColor('main');
31
+ background: getColor('background');
32
+ }
38
33
  }
39
34
 
40
35
  .badge {
41
- @include badge;
36
+ @include badge;
42
37
  }
43
38
 
44
39
  .badge-and-text {
45
- display: flex;
46
- align-items: center;
40
+ display: flex;
41
+ align-items: center;
47
42
 
48
- p {
49
- margin-bottom: 0 !important;
43
+ p {
44
+ margin-bottom: 0 !important;
50
45
 
51
- + .badge {
52
- @include badge;
46
+ + .badge {
47
+ @include badge;
53
48
 
54
- &.is-level {
55
- position: relative;
56
- margin-left: 60px;
57
- }
58
- }
49
+ &.is-level {
50
+ position: relative;
51
+ margin-left: 60px;
52
+ }
59
53
  }
54
+ }
60
55
  }
61
56
 
62
57
  [data-badge-number] {
63
- position: relative;
58
+ position: relative;
64
59
 
65
- &::after {
66
- content: attr(data-badge-number);
67
- position: absolute;
68
- margin-left: -15px;
69
- top: -7px;
70
- color: getColor('background');
71
- left: 100%;
72
- background: getColor('main');
73
- font-size: $text-10;
74
- min-height: $text-20;
75
- min-width: $text-20;
76
- display: flex;
77
- align-items: center;
78
- justify-content: center;
79
- border-radius: 100%;
80
- }
60
+ &::after {
61
+ content: attr(data-badge-number);
62
+ position: absolute;
63
+ margin-left: -15px;
64
+ top: -7px;
65
+ color: getColor('background');
66
+ left: 100%;
67
+ background: getColor('main');
68
+ font-size: $text-10;
69
+ min-height: $text-20;
70
+ min-width: $text-20;
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ border-radius: 100%;
75
+ }
81
76
  }
@@ -5,11 +5,12 @@ $space-between-tiles: 5px;
5
5
  $padding-box: $spacing-5;
6
6
  $padding-box-mobile: $spacing-4;
7
7
 
8
+ /* @toto : add to figma */
8
9
  a.box {
9
10
  cursor: pointer;
10
11
  transition: box-shadow $animation-duration;
11
12
 
12
- &:hover,
13
+ #{$hoverSelector},
13
14
  &:active,
14
15
  &:focus {
15
16
  box-shadow: $focus-shadow;
@@ -59,7 +60,7 @@ a.box {
59
60
 
60
61
 
61
62
  &.is-active {
62
- border: 2px solid getColor('alternate');
63
+ border: 2px solid getColor('main');
63
64
 
64
65
  > .box-header {
65
66
  border-radius: ($radius - 2px) ($radius - 2px) 0 0;
@@ -137,7 +138,7 @@ a.box {
137
138
 
138
139
  &.is-flat {
139
140
  box-shadow: none;
140
- border: 1px solid getColor('grey-dark');
141
+ border: 1px solid getBGColor('font');
141
142
 
142
143
  &.has-hat > .is-hat {
143
144
  left: -1px;
@@ -235,25 +236,6 @@ a.box {
235
236
  }
236
237
  }
237
238
 
238
- &.is-grey,
239
- &.tiles-container {
240
- padding: $padding-box;
241
-
242
- .tile.is-parent,
243
- .tile.is-child:not(.box) {
244
- padding: $space-between-tiles;
245
- }
246
-
247
- .tile.is-vertical > .tile.is-child:not(:last-child) {
248
- margin-bottom: ($space-between-tiles * 2) !important;
249
- }
250
-
251
- .box {
252
- box-shadow: none;
253
- padding: $padding-box;
254
- }
255
- }
256
-
257
239
  &.is-transparent {
258
240
  background-color: transparent;
259
241
  }
@@ -261,7 +243,7 @@ a.box {
261
243
 
262
244
  .box-footer {
263
245
  padding-top: $padding-box;
264
- border-top: 1px solid getColor('grey-disabled');
246
+ border-top: 1px solid getBGColor('font');
265
247
  margin: 12.5px 7.5px 7.5px;
266
248
  }
267
249
  }
@@ -1,10 +1,4 @@
1
1
  $button-border-width: 2px !default;
2
- $button-padding-vertical: calc(0.375em - #{$button-border-width}) !default;
3
-
4
- $button-disabled-shadow: none !default;
5
- $button-disabled-opacity: 1 !default;
6
-
7
- $is-check-button-icon-pos-left: 5px;
8
2
 
9
3
  .buttons {
10
4
  width: 100%;
@@ -41,7 +35,7 @@ $is-check-button-icon-pos-left: 5px;
41
35
 
42
36
  background-color: white;
43
37
  border-width: $button-border-width;
44
- border-radius: 4px;
38
+ border-radius: $radius-small;
45
39
  cursor: pointer;
46
40
  justify-content: center;
47
41
  text-align: center;
@@ -53,140 +47,46 @@ $is-check-button-icon-pos-left: 5px;
53
47
  text-decoration: inherit;
54
48
  font-weight: $weight-semibold;
55
49
 
56
- &:focus {
57
- outline: 1px auto getVariantColor('font', 1);
58
- }
59
-
60
50
  @include mobile {
61
51
  width: 100%;
62
52
  margin: 8px 0 !important;
63
53
  }
64
54
 
65
- &.is-loading {
66
- color: transparent !important;
67
- pointer-events: none;
68
-
69
- &::after {
70
- @include spinner;
71
- @include center(1em);
72
-
73
- position: absolute !important;
74
- }
75
- }
76
-
77
- &[class*='is-'] {
78
- &[disabled] {
79
- @extend %disabled;
80
-
81
- background-color: getColor('bg-disabled');
82
- border-color: transparent;
83
- box-shadow: none;
84
- color: getColor('disabled');
85
-
86
- &:hover {
87
- color: getColor('disabled');
88
- background-color: getColor('bg-disabled');
89
- border-color: getColor('bg-disabled');
90
- }
91
- }
92
- }
93
-
94
- @each $name, $pair in $colors {
95
- $color: nth($pair, 1);
96
- $invColor: nth($pair, 3);
97
-
98
- &.is-#{$color} {
99
- background-color: getColor($name);
100
- color: invertColor($name);
101
- }
55
+ #{$hoverSelector} {
56
+ filter: brightness(0.8)
102
57
  }
103
58
 
104
- %disabled {
105
- background-color: getColor('bg-disabled');
106
- color: getColor('disabled');
107
- box-shadow: $button-disabled-shadow;
108
- opacity: $button-disabled-opacity;
109
-
110
- &:hover {
111
- color: getColor('disabled');
112
- }
59
+ &:active {
60
+ filter: brightness(0.7)
113
61
  }
114
62
 
115
-
116
- &.is-primary {
117
- background-color: getColor('main');
118
- border-color: getColor('main');
119
- color: getColor('background');
120
-
121
- &:hover,
122
- &.is-hovered {
123
- background-color: getVariantColor('main',2);
124
- border-color: getVariantColor('main',2);
125
- opacity: 1;
126
- }
127
-
128
- &:focus,
129
- &.is-focused,
130
- &:active,
131
- &.is-active {
132
- background-color: getVariantColor('main',1);
133
- border-color: getVariantColor('main',1);
63
+ @each $name, $pair in $btn-colors {
64
+ $variantName: nth($pair, 1);
65
+ $colorBG: getColor(#{nth($pair, 2)});
66
+ $colorText: getColor(nth($pair, 3));
67
+ $effectHover: nth($pair, 4);
68
+ $effectActive: nth($pair, 5);
69
+
70
+ &.is-#{$variantName} {
71
+ background-color: $colorBG;
72
+ color: $colorText;
73
+
74
+ @if $effectHover {
75
+ #{$hoverSelector} {
76
+ filter: $effectHover;
77
+ }
78
+ }
79
+ @if $effectActive {
80
+ &:active {
81
+ filter: $effectActive;
82
+ }
83
+ }
134
84
  }
135
85
  }
136
86
 
137
- &.is-secondary {
138
- background-color: getColor('alternate');
139
- color: getColor('background');
140
- border-color: getColor('alternate');
141
-
142
- &:hover,
143
- &.is-hovered {
144
- color: getColor('background');
145
- background-color: getVariantColor('alternate',1);
146
- }
147
-
148
- &:focus,
149
- &.is-focused,
150
- &:active,
151
- &.is-active {
152
- color: getColor('background');
153
- background-color: getVariantColor('alternate',2);
154
- }
87
+ &:focus-visible {
88
+ outline: 2px solid getColor('main');
89
+ outline-offset: 2px;
155
90
  }
156
91
 
157
- &.is-tertiary {
158
- background-color: getColor('background');
159
- border: 2px solid getVariantColor('alternate',2);
160
- color: getColor('alternate');
161
-
162
- &:hover,
163
- &.is-hovered{
164
- color: getColor('alternate');
165
- background-color: getVariantColor('alternate',3);
166
- border-color: getVariantColor('alternate',2);
167
-
168
- }
169
-
170
- &:focus,
171
- &.is-focused{
172
- color: getColor('alternate');
173
- background-color: getVariantColor('alternate',3);
174
- border-color: getColor('alternate');
175
- }
176
-
177
- &:active,
178
- &.is-active {
179
- color: getVariantColor('alternate',1);
180
- background-color: getVariantColor('alternate',3);
181
- border: 2px solid currentColor;
182
- }
183
-
184
- &:disabled,
185
- &[disabled],
186
- &[disabled]:hover{
187
- background-color: getColor('background');
188
- border: 2px solid getColor('grey-light');
189
- color: getColor('disabled');
190
- }
191
- }
192
92
  }
@@ -2,38 +2,32 @@
2
2
 
3
3
  .checkbox,
4
4
  .checkbox-tile {
5
- input:checked ~ label.checkbox-label {
6
- &:before {
7
- background-color: getColor('alternate');
8
- }
9
- &:after {
10
- content: "";
11
- mask-image: url('./assets/icons/all/check.svg');
12
- background-color: getColor('background');
13
- mask-size: 18px;
14
- }
5
+ input:checked ~ label.checkbox-label {
6
+ &:before {
7
+ background-color: getColor('main');
15
8
  }
16
9
 
17
- label.checkbox-label {
18
- &:before,
19
- &:after {
20
- border-radius: 4px;
21
- }
10
+ &:after {
11
+ content: "";
12
+ mask-image: url('./assets/icons/all/check.svg');
13
+ background-color: getColor('background');
14
+ mask-size: 18px;
22
15
  }
16
+ }
17
+
18
+ label.checkbox-label {
19
+ &:before,
20
+ &:after {
21
+ border-radius: $radius-small;
22
+ }
23
+ }
23
24
  }
24
25
 
25
26
  .checkbox-tile {
26
- input:checked ~ label.checkbox-label {
27
- &:after {
28
- top: 15px;
29
- right: 15px;
30
- }
31
- }
32
- input:checked:disabled ~ label.checkbox-label {
33
- &:after {
34
- background-color: getColor('grey');
35
- top: $spacing-4;
36
- right: $spacing-4;
37
- }
27
+ input:checked ~ label.checkbox-label {
28
+ &:after {
29
+ top: 15px;
30
+ right: 15px;
38
31
  }
32
+ }
39
33
  }
@@ -1,100 +1,95 @@
1
1
  $chip-radius: 30px !default;
2
2
 
3
3
  .chips-list {
4
- align-items: center;
5
- display: inline-flex;
6
- justify-content: flex-start;
7
- margin-bottom: 16px;
8
- flex-wrap: wrap;
4
+ align-items: center;
5
+ display: inline-flex;
6
+ justify-content: flex-start;
7
+ margin-bottom: 16px;
8
+ flex-wrap: wrap;
9
9
 
10
- // multi-chips : ajout d'une marge bottom, supprimable par facette
11
- &:not(.is-gapless) {
12
- &:not(:last-child) {
13
- margin-right: 8px;
14
- }
15
-
16
- .chips {
17
- margin-bottom: 10px;
18
- }
10
+ // multi-chips : ajout d'une marge bottom, supprimable par facette
11
+ &:not(.is-gapless) {
12
+ &:not(:last-child) {
13
+ margin-right: 8px;
19
14
  }
20
15
 
21
- // multi-chips : ajout d'une marge à droite de chaque chip
22
- .chips:not(:last-child) {
23
- margin-right: 8px;
16
+ .chips {
17
+ margin-bottom: 10px;
24
18
  }
19
+ }
25
20
 
26
- // centrage des chips
27
- &.is-centered {
28
- justify-content: center;
29
- }
21
+ // multi-chips : ajout d'une marge à droite de chaque chip
22
+ .chips:not(:last-child) {
23
+ margin-right: 8px;
24
+ }
30
25
 
31
- &.is-multiple {
32
- .chips.is-active:before {
33
- content: "";
34
- mask-image: url('./assets/icons/all/check.svg');
35
- background-color: getColor('background');
36
- margin-right: 4px;
37
- margin-left: -8px;
38
- width: 20px;
39
- height: 20px;
40
- mask-size: 20px;
41
- }
26
+ // centrage des chips
27
+ &.is-centered {
28
+ justify-content: center;
29
+ }
30
+
31
+ &.is-multiple {
32
+ .chips.is-active:before {
33
+ content: "";
34
+ mask-image: url('./assets/icons/all/check.svg');
35
+ background-color: currentColor;
36
+ margin-right: 4px;
37
+ margin-left: -8px;
38
+ width: 20px;
39
+ height: 20px;
40
+ mask-size: 20px;
42
41
  }
42
+ }
43
43
 
44
- .chips {
45
- align-items: center;
46
- background-color: getColor('grey-lighter');
47
- border-radius: $chip-radius;
48
- color: getColor('font');
49
- display: inline-flex;
50
- font-weight: 400;
51
- font-size: $size-normal;
52
- height: 32px;
53
- justify-content: center;
54
- line-height: 2;
55
- padding: 6px $spacing-4;
56
- white-space: nowrap;
57
- cursor: pointer;
58
- border: 1px solid getColor('grey-light');
44
+ .chips {
45
+ align-items: center;
46
+ background-color: white;
47
+ border-radius: $chip-radius;
48
+ color: getColor('font');
49
+ display: inline-flex;
50
+ font-weight: 400;
51
+ font-size: $size-normal;
52
+ height: 32px;
53
+ justify-content: center;
54
+ line-height: 2;
55
+ padding: 6px $spacing-4;
56
+ white-space: nowrap;
57
+ cursor: pointer;
58
+ border: 1px solid getBGColor('font');
59
59
 
60
- &:not(.is-disabled) {
61
- &:hover {
62
- background-color: getColor('grey-light');
63
- border: 2px solid currentColor;
64
- color: getColor('alternate');
65
- padding: 5px 15px;
66
- }
60
+ &:not(.is-disabled) {
67
61
 
68
- &:focus,
69
- &:focus-visible,
70
- &.is-active {
71
- background-color: getColor('alternate');
72
- color: white;
73
- font-weight: 600;
74
- border: 2px solid getColor('alternate');
75
- padding: 5px 15px;
76
- }
77
- }
62
+ &.is-active {
63
+ background-color: getColor('main');
64
+ color: white;
65
+ font-weight: 600;
66
+ border: 2px solid getColor('main');
67
+ padding: 5px 15px;
78
68
 
79
- &.is-disabled {
80
- background-color: getColor('grey-disabled');
81
- color: getColor('grey-darker');
82
- cursor: no-drop;
83
- border: 1px solid getColor('grey-disabled');
69
+ #{$hoverSelector} {
70
+ background-color: getColor('main');
71
+ color: white;
84
72
  }
73
+ }
85
74
 
86
- &.is-inverted {
87
- background-color: white;
88
- color: getColor('alternate');
75
+ #{$hoverSelector} {
76
+ background-color: var(--color-bg-hovered);
89
77
 
90
- &:active,
91
- &:hover,
92
- &:focus,
93
- &:focus-visible,
94
- &.is-active {
95
- background-color: getColor('alternate') !important;
96
- color: getColor('background') !important;
97
- }
98
- }
78
+ }
79
+ }
80
+
81
+ &.is-inverted {
82
+ background-color: white;
83
+ color: getColor('alternate');
84
+
85
+ &:active,
86
+ &:hover,
87
+ &:focus,
88
+ &:focus-visible,
89
+ &.is-active {
90
+ background-color: getColor('alternate') !important;
91
+ color: getColor('background') !important;
92
+ }
99
93
  }
94
+ }
100
95
  }