@trilogy-ds/styles 0.0.1-beta-3 → 0.0.1-beta.10

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 +10 -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 +522 -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,108 +1,105 @@
1
1
  .switch {
2
- position: relative;
3
- margin: 8px;
2
+ position: relative;
3
+ margin: 8px;
4
4
 
5
- input {
6
- display: none;
5
+ input {
6
+ display: none;
7
7
 
8
- &:disabled ~ label,
9
- &:disabled:checked ~ label {
10
- &:hover {
11
- cursor: no-drop;
12
- }
13
-
14
- &:before {
15
- background-color: getColor('grey-disabled');
16
- }
17
- }
8
+ &:disabled ~ label,
9
+ &:disabled:checked ~ label {
10
+ cursor: not-allowed;
11
+ &:before {
12
+ background-color: getColor('disabled');
13
+ }
14
+ }
18
15
 
19
- &:disabled ~ label {
20
- &:after {
21
- $colorSvg: encodecolor(getColorValue('grey-dark'));
22
- content: url('data:image/svg+xml; utf8, <svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#{$colorSvg}" stroke-linecap="round" stroke-width="3.2" fill="none"><path d="M12.6 12.6L31.4 31.4M12.6 31.4L31.4 12.6"/></svg>');
23
- }
24
- }
16
+ &:disabled ~ label {
17
+ &:after {
18
+ $colorSvg: encodecolor(getColorValue('neutral-dark'));
19
+ content: url('data:image/svg+xml; utf8, <svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#{$colorSvg}" stroke-linecap="round" stroke-width="3.2" fill="none"><path d="M12.6 12.6L31.4 31.4M12.6 31.4L31.4 12.6"/></svg>');
20
+ }
21
+ }
25
22
 
26
- &:disabled:checked ~ label {
27
- &:after {
28
- $colorSvg: encodecolor(getColorValue('grey-dark'));
29
- content: url('data:image/svg+xml; utf8, <svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#{$colorSvg}" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" fill="none"><path d="M11.3 22.4L18.1 29.3L32.7 14.7"/></svg>');
30
- }
31
- }
23
+ &:disabled:checked ~ label {
24
+ &:after {
25
+ $colorSvg: encodecolor(getColorValue('neutral-dark'));
26
+ content: url('data:image/svg+xml; utf8, <svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#{$colorSvg}" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" fill="none"><path d="M11.3 22.4L18.1 29.3L32.7 14.7"/></svg>');
27
+ }
32
28
  }
29
+ }
33
30
 
34
- label {
35
- width: 100%;
36
- display: flex;
37
- align-items: center;
38
- cursor: pointer;
39
- padding: $spacing-1;
40
- padding-right: 60px;
31
+ label {
32
+ width: 100%;
33
+ display: flex;
34
+ align-items: center;
35
+ cursor: pointer;
36
+ padding: $spacing-1;
37
+ padding-right: 60px;
41
38
 
42
- &:before {
43
- content: '';
44
- position: absolute;
45
- top: 50%;
46
- transform: translateY(-50%);
47
- right: 0;
48
- border-radius: 24px;
49
- width: 44px;
50
- height: 22px;
51
- background-color: getColorValue('grey');
52
- margin-left: 16px;
53
- }
39
+ &:before {
40
+ content: '';
41
+ position: absolute;
42
+ top: 50%;
43
+ transform: translateY(-50%);
44
+ right: 0;
45
+ border-radius: 24px;
46
+ width: 44px;
47
+ height: 22px;
48
+ background-color: getBGColor('font');
49
+ margin-left: 16px;
50
+ }
54
51
 
55
- &:after {
56
- $colorSvg: encodecolor(getColorValue('grey'));
57
- content: url('data:image/svg+xml; utf8, <svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#{$colorSvg}" stroke-linecap="round" stroke-width="3.2" fill="none"><path d="M12.6 12.6L31.4 31.4M12.6 31.4L31.4 12.6"/></svg>');
58
- position: absolute;
59
- top: 50%;
60
- transform: translateY(-50%);
61
- right: calc(44px - 18px - 2px);
62
- border-radius: 50%;
63
- width: 18px;
64
- height: 18px;
65
- background-color: getColorValue('background');
66
- transition: 0.3s;
67
- }
52
+ &:after {
53
+ $colorSvg: encodecolor(getBGColorValue('font'));
54
+ content: url('data:image/svg+xml; utf8, <svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#{$colorSvg}" stroke-linecap="round" stroke-width="3.2" fill="none"><path d="M12.6 12.6L31.4 31.4M12.6 31.4L31.4 12.6"/></svg>');
55
+ position: absolute;
56
+ top: 50%;
57
+ transform: translateY(-50%);
58
+ right: calc(44px - 18px - 2px);
59
+ border-radius: 50%;
60
+ width: 18px;
61
+ height: 18px;
62
+ background-color: getColorValue('background');
63
+ transition: 0.3s;
68
64
  }
65
+ }
69
66
 
70
- input:checked {
71
- & ~ label {
72
- font-weight: bold;
67
+ input:checked {
68
+ & ~ label {
69
+ font-weight: bold;
73
70
 
74
- &:before {
75
- background-color: getColorValue('alternate');
76
- }
71
+ &:before {
72
+ background-color: getColorValue('main');
73
+ }
77
74
 
78
- &:after {
79
- right: 2px;
80
- $colorSvg: encodecolor(getColorValue('alternate'));
81
- content: url('data:image/svg+xml; utf8, <svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#{$colorSvg}" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" fill="none"><path d="M11.3 22.4L18.1 29.3L32.7 14.7"/></svg>');
82
- background-color: getColorValue('background');
83
- }
84
- }
75
+ &:after {
76
+ right: 2px;
77
+ $colorSvg: encodecolor(getColorValue('main'));
78
+ content: url('data:image/svg+xml; utf8, <svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#{$colorSvg}" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" fill="none"><path d="M11.3 22.4L18.1 29.3L32.7 14.7"/></svg>');
79
+ background-color: getColorValue('background');
80
+ }
85
81
  }
82
+ }
86
83
 
87
- &.is-reversed {
88
- label {
89
- flex-direction: row-reverse;
90
- padding-right: 0;
91
- padding-left: 60px;
84
+ &.is-reversed {
85
+ label {
86
+ flex-direction: row-reverse;
87
+ padding-right: 0;
88
+ padding-left: 60px;
92
89
 
93
- &:before {
94
- left: 0;
95
- margin-left: 0;
96
- margin-right: 16px;
97
- }
90
+ &:before {
91
+ left: 0;
92
+ margin-left: 0;
93
+ margin-right: 16px;
94
+ }
98
95
 
99
- &:after {
100
- left: 2px;
101
- }
102
- }
96
+ &:after {
97
+ left: 2px;
98
+ }
99
+ }
103
100
 
104
- input:checked ~ label:after {
105
- left: calc(44px - 18px - 2px);
106
- }
101
+ input:checked ~ label:after {
102
+ left: calc(44px - 18px - 2px);
107
103
  }
104
+ }
108
105
  }
@@ -11,7 +11,7 @@
11
11
  @include block;
12
12
 
13
13
  background-color: transparent;
14
- color: getColor('grey-dark');
14
+ color: getColor('neutral-dark');
15
15
 
16
16
  &:not(:last-child) {
17
17
  margin-bottom: 30px;
@@ -21,12 +21,12 @@
21
21
  * @deprecated "Use multiples <tr><th> instead"
22
22
  */
23
23
  tbody .is-body-header {
24
- background-color: getColor('grey-light');
24
+ background-color: getBGColor('neutral-dark');
25
25
  }
26
26
 
27
27
  td,
28
28
  th {
29
- border: 1px solid getColor('grey-light');
29
+ border: 1px solid getBGColor('neutral-dark');
30
30
  border-width: 0;
31
31
  padding: 20px;
32
32
  vertical-align: top;
@@ -53,10 +53,9 @@
53
53
  }
54
54
 
55
55
  tr {
56
- @each $name, $pair in $colors-feedback {
57
- $bg-color: nth($pair, 1);
56
+ @each $name in $colors-feedback {
58
57
  &.is-#{$name} {
59
- background-color:getColor($bg-color);
58
+ background-color:getBGColor($name);
60
59
  }
61
60
  }
62
61
 
@@ -71,7 +70,7 @@
71
70
  }
72
71
 
73
72
  td {
74
- border-bottom: 1px solid getColor('grey-light');
73
+ border-bottom: 1px solid getBGColor('neutral-dark');
75
74
 
76
75
  > p {
77
76
  margin: 0;
@@ -155,45 +154,12 @@
155
154
 
156
155
  &:not(.is-bordered).is-comparative {
157
156
  th {
158
- border-right: 1px solid getColor('grey-lighter');
157
+ border-right: 1px solid getBGColor('neutral');
159
158
  }
160
159
 
161
160
  td {
162
161
  &:not(:last-child) {
163
- border-right: 1px solid getColor('grey-light');
164
- }
165
- }
166
- }
167
-
168
- &.is-compact {
169
- td,
170
- th {
171
- padding: math.div(20px, 3) math.div(20px, 3);
172
- }
173
- }
174
-
175
- &.is-large {
176
- thead {
177
- height: 50px;
178
-
179
- th {
180
- color: getVariantColor('alternate',2);
181
- font-weight: 600;
182
- text-transform: uppercase;
183
- }
184
- }
185
-
186
- tbody {
187
- border-top: 1px solid #d8d8d8;
188
-
189
- tr {
190
- td {
191
- height: 40px;
192
- }
193
-
194
- &:not(.is-body-header) td {
195
- height: 96px;
196
- }
162
+ border-right: 1px solid getBGColor('neutral-dark');
197
163
  }
198
164
  }
199
165
  }
@@ -218,45 +184,18 @@
218
184
  width: 100%;
219
185
  }
220
186
 
221
- &.is-hoverable {
222
- tbody {
223
- tr:not(.is-selected) {
224
- &:hover {
225
- background-color: getColor('grey-lighter');
226
- }
227
- }
228
- }
229
-
230
- &.is-striped {
231
- tbody {
232
- tr:not(.is-selected) {
233
- &:hover {
234
- background-color: getColor('grey-light');
235
- }
236
- }
237
- }
238
- }
239
- }
240
-
241
- &.is-narrow {
242
- td,
243
- th {
244
- padding: 0.25em 0.5em;
245
- }
246
- }
247
-
248
187
  &.is-striped {
249
188
  tbody {
250
189
  tr:not(.is-selected) {
251
190
  &:nth-child(even) {
252
- background-color: getColor('grey-lighter');
191
+ background-color: getBGColor('neutral');
253
192
  }
254
193
  }
255
194
  }
256
195
  }
257
196
 
258
197
  .subtable {
259
- background-color: getColor('grey-lighter');
198
+ background-color: getBGColor('neutral');
260
199
  border-radius: $radius;
261
200
  padding: $box-padding * 2;
262
201
 
@@ -269,7 +208,7 @@
269
208
 
270
209
  tr:not(:first-child) {
271
210
  td {
272
- border-top: 1px solid getColor('grey-dark');
211
+ border-top: 1px solid getColor('neutral-dark');
273
212
  }
274
213
  }
275
214
 
@@ -3,129 +3,129 @@ $tag-delete-margin: 1px !default;
3
3
 
4
4
  // container pour multi-tags ou tags avec actions
5
5
  .tags {
6
- align-items: center;
7
- display: inline-flex;
8
- flex-wrap: wrap;
9
- justify-content: flex-start;
10
- margin-bottom: 16px;
11
-
12
- // multi-tags : ajout d'une marge bottom, supprimable par facette
13
- &:not(.is-gapless) {
14
- &:not(:last-child) {
15
- margin-right: 8px;
16
- }
17
-
18
- .tag {
19
- margin-bottom: 10px;
20
- }
6
+ align-items: center;
7
+ display: inline-flex;
8
+ flex-wrap: wrap;
9
+ justify-content: flex-start;
10
+ margin-bottom: 16px;
11
+
12
+ // multi-tags : ajout d'une marge bottom, supprimable par facette
13
+ &:not(.is-gapless) {
14
+ &:not(:last-child) {
15
+ margin-right: 8px;
21
16
  }
22
17
 
23
- // multi-tags : ajout d'une marge à droite de chaque tag
24
- .tag:not(:last-child) {
25
- margin-right: 8px;
18
+ .tag {
19
+ margin-bottom: 10px;
26
20
  }
21
+ }
27
22
 
28
- // centrage des tags
29
- &.is-centered {
30
- justify-content: center;
31
- }
23
+ // multi-tags : ajout d'une marge à droite de chaque tag
24
+ .tag:not(:last-child) {
25
+ margin-right: 8px;
26
+ }
32
27
 
33
- // tags avec actions
34
- &.has-addons {
35
- cursor: pointer;
36
-
37
- .tag {
38
- margin-right: 0;
39
-
40
- &:not(:first-child) {
41
- border-bottom-left-radius: 0;
42
- border-top-left-radius: 0;
43
- }
44
-
45
- &:not(:last-child) {
46
- border-bottom-right-radius: 0;
47
- border-top-right-radius: 0;
48
- }
49
-
50
- &:first-child {
51
- padding-right: 5px;
52
- }
53
-
54
- + .tag {
55
- padding: 0;
56
- position: relative;
57
- width: 25px;
58
- border-width: 0;
59
-
60
- // fixme : cette règle ne devrait-elle pas s'appliquer à TOUS les buttons ?
61
- cursor: inherit;
62
-
63
- // affichage d'une fausse croix avec 2 traits penchés
64
- &:empty {
65
- &::before,
66
- &::after {
67
- position: absolute;
68
- content: '';
69
- height: 10px;
70
- width: 2px;
71
- background-color: currentColor;
72
- top: 50%;
73
- left: 30%;
74
- }
75
-
76
- &::before {
77
- transform: translate(50%, -50%) rotate(45deg);
78
- }
79
-
80
- &::after {
81
- transform: translate(50%, -50%) rotate(-45deg);
82
- }
83
- }
84
- }
85
- }
28
+ // centrage des tags
29
+ &.is-centered {
30
+ justify-content: center;
31
+ }
86
32
 
87
- &.is-inverted {
88
- .tag {
89
- background-color: getColor(getColor('background'));
90
- }
33
+ // tags avec actions
34
+ &.has-addons {
35
+ cursor: pointer;
36
+
37
+ .tag {
38
+ margin-right: 0;
39
+
40
+ &:not(:first-child) {
41
+ border-bottom-left-radius: 0;
42
+ border-top-left-radius: 0;
43
+ }
44
+
45
+ &:not(:last-child) {
46
+ border-bottom-right-radius: 0;
47
+ border-top-right-radius: 0;
48
+ }
49
+
50
+ &:first-child {
51
+ padding-right: 5px;
52
+ }
53
+
54
+ + .tag {
55
+ padding: 0;
56
+ position: relative;
57
+ width: 25px;
58
+ border-width: 0;
59
+
60
+ // fixme : cette règle ne devrait-elle pas s'appliquer à TOUS les buttons ?
61
+ cursor: inherit;
62
+
63
+ // affichage d'une fausse croix avec 2 traits penchés
64
+ &:empty {
65
+ &::before,
66
+ &::after {
67
+ position: absolute;
68
+ content: '';
69
+ height: 10px;
70
+ width: 2px;
71
+ background-color: currentColor;
72
+ top: 50%;
73
+ left: 30%;
74
+ }
75
+
76
+ &::before {
77
+ transform: translate(50%, -50%) rotate(45deg);
78
+ }
79
+
80
+ &::after {
81
+ transform: translate(50%, -50%) rotate(-45deg);
82
+ }
91
83
  }
84
+ }
85
+ }
92
86
 
87
+ &.is-inverted {
88
+ .tag {
89
+ background-color: getColor(getColor('background'));
90
+ }
93
91
  }
92
+
93
+ }
94
94
  }
95
95
 
96
96
  .tag {
97
- align-items: center;
98
- background-color: getColor('background');
99
- border-radius: $tag-radius;
100
- color: getColor('font');
101
- display: inline-flex;
102
- font-size: $size-medium;
103
- font-weight: $weight-medium;
104
- height: 28px;
105
- justify-content: center;
106
- line-height: 20px;
107
- padding: $spacing-1 $spacing-2;
108
- white-space: nowrap;
109
-
110
- &.is-small {
111
- font-size: $text-12;
112
- line-height: 15px;
113
- height: 23px;
114
- }
97
+ align-items: center;
98
+ background-color: getBGColor('font');
99
+ border-radius: $tag-radius;
100
+ color: getColor('font');
101
+ display: inline-flex;
102
+ font-size: $size-medium;
103
+ font-weight: $weight-medium;
104
+ height: 28px;
105
+ justify-content: center;
106
+ line-height: 20px;
107
+ padding: $spacing-1 $spacing-2;
108
+ white-space: nowrap;
109
+
110
+ &.is-small {
111
+ font-size: $text-12;
112
+ line-height: 15px;
113
+ height: 23px;
114
+ }
115
115
 
116
116
 
117
- @include mobile {
118
- font-size: 12px;
119
- line-height: 15px;
120
- }
117
+ @include mobile {
118
+ font-size: 12px;
119
+ line-height: 15px;
120
+ }
121
121
 
122
- @each $name, $pair in $colors-feedback {
123
- $bg-color: nth($pair, 1);
122
+ @each $name in $colors-feedback {
124
123
  &.is-#{$name}:not(.is-inverted) {
125
- background-color: getColor($bg-color);
124
+ background-color: getBGColor($name);
126
125
  }
127
126
  &.is-inverted.is-#{$name} {
128
127
  color: getColor($name);
128
+ background-color: invertColor($name);
129
129
  }
130
130
  }
131
131
  }