@trilogy-ds/styles 0.0.1-beta.5 → 0.0.1-beta.50

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 (87) 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 +20 -37
  8. package/framework/src/base/_loading.scss +8 -1
  9. package/framework/src/base/_reset.scss +8 -3
  10. package/framework/src/components/_accordion.scss +40 -86
  11. package/framework/src/components/_all.scss +0 -6
  12. package/framework/src/components/_breadcrumb.scss +39 -34
  13. package/framework/src/components/_card.scss +7 -78
  14. package/framework/src/components/_countdown.scss +49 -47
  15. package/framework/src/components/_divider.scss +2 -2
  16. package/framework/src/components/_fab.scss +12 -26
  17. package/framework/src/components/_level.scss +1 -1
  18. package/framework/src/components/_media.scss +2 -2
  19. package/framework/src/components/_modal.scss +167 -166
  20. package/framework/src/components/_otp.scss +9 -28
  21. package/framework/src/components/_pagination.scss +104 -133
  22. package/framework/src/components/_plus-symbol.scss +1 -1
  23. package/framework/src/components/_popover.scss +255 -255
  24. package/framework/src/components/_price.scss +196 -166
  25. package/framework/src/components/_product-tour.scss +2 -4
  26. package/framework/src/components/_range.scss +73 -72
  27. package/framework/src/components/_segmented-control.scss +37 -51
  28. package/framework/src/components/_stepper.scss +18 -142
  29. package/framework/src/components/_tabs.scss +32 -59
  30. package/framework/src/components/_timeline.scss +52 -45
  31. package/framework/src/elements/_alert.scss +5 -8
  32. package/framework/src/elements/_all.scss +1 -3
  33. package/framework/src/elements/_autocomplete.scss +32 -0
  34. package/framework/src/elements/_badge.scss +54 -59
  35. package/framework/src/elements/_box.scss +8 -115
  36. package/framework/src/elements/_button.scss +15 -133
  37. package/framework/src/elements/_checkbox.scss +21 -27
  38. package/framework/src/elements/_chips.scss +74 -83
  39. package/framework/src/elements/_dot.scss +1 -1
  40. package/framework/src/elements/_entry.scss +76 -88
  41. package/framework/src/elements/_form.scss +17 -15
  42. package/framework/src/elements/_icon.scss +3 -3
  43. package/framework/src/elements/_input-gauge.scss +32 -33
  44. package/framework/src/elements/_input-icons.scss +33 -31
  45. package/framework/src/elements/_link.scss +38 -65
  46. package/framework/src/elements/_list.scss +38 -46
  47. package/framework/src/elements/_loader.scss +1 -1
  48. package/framework/src/elements/_other.scss +2 -2
  49. package/framework/src/elements/_paragraph.scss +4 -26
  50. package/framework/src/elements/_progress.scss +12 -21
  51. package/framework/src/elements/_radio.scss +2 -2
  52. package/framework/src/elements/_select.scss +84 -301
  53. package/framework/src/elements/_sticker.scss +12 -27
  54. package/framework/src/elements/_switch.scss +85 -88
  55. package/framework/src/elements/_table.scss +173 -226
  56. package/framework/src/elements/_tag.scss +104 -105
  57. package/framework/src/elements/_textarea.scss +95 -105
  58. package/framework/src/elements/_title.scss +89 -87
  59. package/framework/src/elements/_toaster.scss +3 -4
  60. package/framework/src/grid/_columns.scss +5 -5
  61. package/framework/src/layout/_all.scss +0 -1
  62. package/framework/src/layout/_hero.scss +109 -207
  63. package/framework/src/layout/_section.scss +7 -14
  64. package/framework/src/theming/_all.scss +3 -0
  65. package/framework/src/theming/buttons_partial.scss +30 -0
  66. package/framework/src/theming/common_partials.scss +9 -0
  67. package/framework/src/theming/links_partial.scss +20 -0
  68. package/framework/src/utilities/_all.scss +3 -0
  69. package/framework/src/utilities/_background.scss +15 -0
  70. package/framework/src/utilities/_controls.scss +37 -48
  71. package/framework/src/utilities/_derived-variables.scss +3 -14
  72. package/framework/src/utilities/_initial-variables.scss +22 -26
  73. package/framework/src/utilities/_mixins.scss +481 -593
  74. package/framework/src/utilities/_pre.scss +1 -0
  75. package/package.json +3 -2
  76. package/framework/src/components/_disclaimer.scss +0 -84
  77. package/framework/src/components/_dropdown.scss +0 -128
  78. package/framework/src/components/_menu.scss +0 -213
  79. package/framework/src/components/_search-modal.scss +0 -197
  80. package/framework/src/components/_slices.scss +0 -316
  81. package/framework/src/components/_slider.scss +0 -92
  82. package/framework/src/components/_switch.scss +0 -209
  83. package/framework/src/elements/_checkradio.scss +0 -173
  84. package/framework/src/elements/_notification.scss +0 -151
  85. package/framework/src/elements/_options.scss +0 -146
  86. package/framework/src/elements/_timeline.scss +0 -283
  87. package/framework/src/layout/_toolbar.scss +0 -100
@@ -2,12 +2,12 @@
2
2
  @import '../utilities/spacing';
3
3
 
4
4
  @import 'alert';
5
+ @import 'autocomplete';
5
6
  @import 'badge';
6
7
  @import 'box';
7
8
  @import 'button';
8
9
  @import 'chips';
9
10
  @import 'checkbox';
10
- @import 'checkradio';
11
11
  @import 'container';
12
12
  @import 'dot';
13
13
  @import 'entry';
@@ -17,9 +17,7 @@
17
17
  @import 'loader';
18
18
  @import 'link';
19
19
  @import 'list';
20
- @import 'notification';
21
20
  @import 'toaster';
22
- @import 'options';
23
21
  @import 'progress';
24
22
  @import 'paragraph';
25
23
  @import 'radio';
@@ -0,0 +1,32 @@
1
+ .is-autocomplete {
2
+ .autocomplete-menu {
3
+ display: none;
4
+ }
5
+
6
+ &.is-active {
7
+ .autocomplete-menu {
8
+ display: block;
9
+ border: 1px solid rgba(0,38,60,.4);
10
+ padding: calc($spacing-1 + 1px) calc($spacing-2 + 2px);
11
+ border-radius: 4px;
12
+ max-height: 220px;
13
+ overflow-y: auto;
14
+ background-color: getColor('background');
15
+ z-index: 10000;
16
+ }
17
+
18
+ .autocomplete-item {
19
+ cursor: pointer;
20
+ padding: calc($spacing-1 - 0.25px) calc($spacing-1 + 1px);
21
+
22
+ &.is-active, &[data-autocomplete-item-hover] {
23
+ @include hoverRules();
24
+ margin-left: calc(2px - $spacing-3 );
25
+ margin-right: calc(2px - $spacing-3 );
26
+ border-top: 1px solid var(--color-bg-hovered);
27
+ border-bottom: 1px solid var(--color-bg-hovered);
28
+ padding: calc($spacing-1 - 1.25px) calc($spacing-4 - 1px);
29
+ }
30
+ }
31
+ }
32
+ }
@@ -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: 9999px;
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: 9999px;
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;
@@ -17,10 +18,10 @@ a.box {
17
18
  }
18
19
 
19
20
  .box {
20
- box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
21
21
  background-color: getColor('background');
22
- border-radius: $radius;
23
- color: getColor('font');
22
+ box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
23
+ border-radius: var(--radius);
24
+ overflow: hidden;
24
25
  display: flex;
25
26
  flex-direction: column;
26
27
  justify-content: flex-start;
@@ -35,81 +36,8 @@ a.box {
35
36
  margin-bottom: 15px;
36
37
  }
37
38
 
38
- &.has-background {
39
- background-repeat: no-repeat;
40
-
41
- &.is-inverted {
42
- .box-content {
43
- color: getColor('background');
44
- }
45
-
46
- .title,
47
- .subtitle,
48
- .text,
49
- .paragraph,
50
- p {
51
- color: getColor('background');
52
- }
53
- }
54
-
55
- .box-content {
56
- background-color: transparent;
57
- }
58
- }
59
-
60
-
61
39
  &.is-active {
62
- border: 2px solid getColor('alternate');
63
-
64
- > .box-header {
65
- border-radius: ($radius - 2px) ($radius - 2px) 0 0;
66
- padding-top: 6px;
67
- padding-left: 22px;
68
- padding-right: 6px;
69
- }
70
-
71
- ~ .box-content {
72
- border-radius: 0 0 ($radius - 2px) ($radius - 2px);
73
-
74
- }
75
-
76
- > .box-content {
77
- padding-left: 22px;
78
- padding-right: 22px;
79
- @include mobile {
80
- padding-left: 14px;
81
- padding-right: 14px;
82
- }
83
-
84
- &:first-child {
85
- border-radius: ($radius - 2px) ($radius - 2px) 0 0;
86
- padding-top: 22px;
87
- @include mobile {
88
- padding-top: 14px;
89
- }
90
-
91
- }
92
-
93
- &:last-child {
94
- border-radius: 0 0 ($radius - 2px) ($radius - 2px);
95
- padding-bottom: 22px;
96
- @include mobile {
97
- padding-bottom: 14px;
98
- }
99
- }
100
-
101
- &:only-child {
102
- border-radius: ($radius - 2px);
103
- padding: 22px;
104
- @include mobile {
105
- padding: 14px;
106
- }
107
- }
108
- }
109
-
110
- > .box-footer {
111
- margin: 12.5px 5.5px 5.5px;
112
- }
40
+ outline: var(--border-active);
113
41
  }
114
42
 
115
43
  &.is-fullheight {
@@ -137,7 +65,7 @@ a.box {
137
65
 
138
66
  &.is-flat {
139
67
  box-shadow: none;
140
- border: 1px solid getColor('grey-dark');
68
+ border: var(--border);
141
69
 
142
70
  &.has-hat > .is-hat {
143
71
  left: -1px;
@@ -161,7 +89,6 @@ a.box {
161
89
  padding: 8px;
162
90
  padding-left: 24px;
163
91
  box-shadow: none;
164
- border-radius: $radius $radius 0 0;
165
92
  font-size: 15px;
166
93
  display: flex;
167
94
  justify-content: center;
@@ -193,13 +120,10 @@ a.box {
193
120
 
194
121
  ~ .box-content {
195
122
  margin-top: 0;
196
- border-radius: 0 0 $radius $radius;
197
123
  }
198
124
  }
199
125
 
200
126
  .box-content {
201
- background-color: getColor('background');
202
- color: getColor('font');
203
127
  margin: -$padding-box;
204
128
  padding: $padding-box;
205
129
 
@@ -212,18 +136,6 @@ a.box {
212
136
  text-align: left;
213
137
  }
214
138
 
215
- &:first-child {
216
- border-radius: $radius $radius 0 0;
217
- }
218
-
219
- &:last-child {
220
- border-radius: 0 0 $radius $radius;
221
- }
222
-
223
- &:only-child {
224
- border-radius: $radius;
225
- }
226
-
227
139
  > .is-unboxed {
228
140
  margin-left: -$padding-box;
229
141
  margin-right: -$padding-box;
@@ -235,25 +147,6 @@ a.box {
235
147
  }
236
148
  }
237
149
 
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
150
  &.is-transparent {
258
151
  background-color: transparent;
259
152
  }
@@ -261,7 +154,7 @@ a.box {
261
154
 
262
155
  .box-footer {
263
156
  padding-top: $padding-box;
264
- border-top: 1px solid getColor('grey-disabled');
157
+ border-top: var(--border);
265
158
  margin: 12.5px 7.5px 7.5px;
266
159
  }
267
160
  }
@@ -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%;
@@ -38,155 +32,43 @@ $is-check-button-icon-pos-left: 5px;
38
32
  .button {
39
33
  @include control;
40
34
  @include unselectable;
35
+ @extend %buttons-states;
41
36
 
42
37
  background-color: white;
43
38
  border-width: $button-border-width;
44
- border-radius: 4px;
39
+ border-radius: var(--radius-small);
45
40
  cursor: pointer;
46
41
  justify-content: center;
47
42
  text-align: center;
48
- font-family: $body-family;
49
43
  white-space: nowrap;
50
- height: 44px;
51
44
  padding: 0 $spacing-4;
52
- font-size: $text-15;
53
45
  text-decoration: inherit;
54
46
  font-weight: $weight-semibold;
55
47
 
56
- &:focus {
57
- outline: 1px auto getVariantColor('font', 1);
58
- }
59
-
60
48
  @include mobile {
61
49
  width: 100%;
62
50
  margin: 8px 0 !important;
63
51
  }
64
52
 
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;
53
+ @each $name, $pair in $button-colors {
54
+ $variantName: nth($pair, 1);
55
+ $colorBG: getColor(#{nth($pair, 2)});
56
+ $colorText: getColor(nth($pair, 3));
80
57
 
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);
58
+ &.is-#{$variantName} {
59
+ background-color: $colorBG;
60
+ color: $colorText;
101
61
  }
102
62
  }
103
63
 
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
- }
64
+ &[disabled],
65
+ &[aria-disabled=true] {
66
+ background-color: getBGColorValue('main') !important;
67
+ color: getBGColorValue('disabled') !important
113
68
  }
114
69
 
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);
134
- }
135
- }
136
-
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
- }
70
+ &.is-loading {
71
+ background-color: getColorValue('neutral');
155
72
  }
156
73
 
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
74
  }
@@ -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: var(--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
  }