@trilogy-ds/styles 0.0.1-beta.9 → 0.0.3-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.
Files changed (94) hide show
  1. package/dist/default/trilogy-mangled.css +1 -1
  2. package/dist/default/trilogy-partials.css +1 -1
  3. package/dist/default/trilogy.css +1 -1
  4. package/framework/src/base/_color.scss +9 -39
  5. package/framework/src/base/_generic.scss +4 -1
  6. package/framework/src/base/_helpers.scss +13 -38
  7. package/framework/src/base/_loading.scss +8 -1
  8. package/framework/src/base/_reset.scss +8 -3
  9. package/framework/src/components/_accordion.scss +53 -88
  10. package/framework/src/components/_all.scss +1 -7
  11. package/framework/src/components/_autolayout.scss +302 -0
  12. package/framework/src/components/_breadcrumb.scss +39 -34
  13. package/framework/src/components/_card.scss +8 -79
  14. package/framework/src/components/_countdown.scss +49 -47
  15. package/framework/src/components/_divider.scss +10 -15
  16. package/framework/src/components/_fab.scss +25 -38
  17. package/framework/src/components/_modal.scss +161 -158
  18. package/framework/src/components/_otp.scss +10 -29
  19. package/framework/src/components/_pagination.scss +59 -161
  20. package/framework/src/components/_plus-symbol.scss +1 -1
  21. package/framework/src/components/_popover.scss +260 -260
  22. package/framework/src/components/_price.scss +119 -170
  23. package/framework/src/components/_product-tour.scss +2 -4
  24. package/framework/src/components/_progress-radial.scss +24 -19
  25. package/framework/src/components/_range.scss +73 -72
  26. package/framework/src/components/_segmented-control.scss +51 -53
  27. package/framework/src/components/_stepper.scss +42 -222
  28. package/framework/src/components/_tabs.scss +46 -81
  29. package/framework/src/components/_timeline.scss +27 -112
  30. package/framework/src/elements/_alert.scss +13 -10
  31. package/framework/src/elements/_all.scss +1 -4
  32. package/framework/src/elements/_autocomplete.scss +32 -0
  33. package/framework/src/elements/_badge.scss +67 -61
  34. package/framework/src/elements/_box.scss +64 -161
  35. package/framework/src/elements/_button.scss +15 -141
  36. package/framework/src/elements/_checkbox.scss +29 -26
  37. package/framework/src/elements/_chips.scss +69 -85
  38. package/framework/src/elements/_container.scss +7 -39
  39. package/framework/src/elements/_entry.scss +76 -88
  40. package/framework/src/elements/_form.scss +26 -23
  41. package/framework/src/elements/_icon.scss +4 -4
  42. package/framework/src/elements/_image.scss +50 -40
  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 +45 -44
  47. package/framework/src/elements/_loader.scss +2 -2
  48. package/framework/src/elements/_other.scss +0 -37
  49. package/framework/src/elements/_paragraph.scss +35 -69
  50. package/framework/src/elements/_progress.scss +33 -22
  51. package/framework/src/elements/_radio.scss +45 -31
  52. package/framework/src/elements/_select.scss +85 -304
  53. package/framework/src/elements/_sticker.scss +12 -27
  54. package/framework/src/elements/_switch.scss +101 -99
  55. package/framework/src/elements/_table.scss +175 -228
  56. package/framework/src/elements/_tag.scss +104 -105
  57. package/framework/src/elements/_textarea.scss +113 -105
  58. package/framework/src/elements/_title.scss +89 -87
  59. package/framework/src/elements/_toaster.scss +4 -5
  60. package/framework/src/grid/_columns.scss +257 -764
  61. package/framework/src/grid/_rows.scss +45 -38
  62. package/framework/src/layout/_all.scss +0 -1
  63. package/framework/src/layout/_hero.scss +89 -215
  64. package/framework/src/layout/_section.scss +5 -29
  65. package/framework/src/theming/_all.scss +3 -0
  66. package/framework/src/theming/buttons_partial.scss +32 -0
  67. package/framework/src/theming/common_partials.scss +10 -0
  68. package/framework/src/theming/links_partial.scss +20 -0
  69. package/framework/src/utilities/_a11y.scss +13 -0
  70. package/framework/src/utilities/_all.scss +4 -0
  71. package/framework/src/utilities/_background.scss +19 -0
  72. package/framework/src/utilities/_colors.scss +40 -0
  73. package/framework/src/utilities/_controls.scss +38 -49
  74. package/framework/src/utilities/_derived-variables.scss +4 -15
  75. package/framework/src/utilities/_initial-variables.scss +4 -36
  76. package/framework/src/utilities/_mixins.scss +483 -592
  77. package/framework/src/utilities/_pre.scss +1 -0
  78. package/package.json +3 -3
  79. package/framework/src/components/_autolayout2.scss +0 -38
  80. package/framework/src/components/_disclaimer.scss +0 -84
  81. package/framework/src/components/_dropdown.scss +0 -128
  82. package/framework/src/components/_level.scss +0 -120
  83. package/framework/src/components/_media.scss +0 -64
  84. package/framework/src/components/_menu.scss +0 -213
  85. package/framework/src/components/_search-modal.scss +0 -197
  86. package/framework/src/components/_slices.scss +0 -316
  87. package/framework/src/components/_slider.scss +0 -92
  88. package/framework/src/components/_switch.scss +0 -209
  89. package/framework/src/elements/_checkradio.scss +0 -173
  90. package/framework/src/elements/_dot.scss +0 -6
  91. package/framework/src/elements/_notification.scss +0 -151
  92. package/framework/src/elements/_options.scss +0 -146
  93. package/framework/src/elements/_timeline.scss +0 -283
  94. package/framework/src/layout/_toolbar.scss +0 -100
@@ -1,15 +1,21 @@
1
1
  @use 'sass:math';
2
2
  @import "../utilities/spacing";
3
3
 
4
- $space-between-tiles: 5px;
5
- $padding-box: $spacing-5;
6
- $padding-box-mobile: $spacing-4;
4
+ :root {
5
+ --padding-box: #{$spacing-5};
6
+ @include mobile {
7
+ --padding-box: #{$spacing-4};
8
+ }
9
+ }
10
+
11
+ $highlighted-border-width: 4px;
12
+
7
13
 
8
14
  a.box {
9
15
  cursor: pointer;
10
16
  transition: box-shadow $animation-duration;
11
17
 
12
- &:hover,
18
+ #{$hoverSelector},
13
19
  &:active,
14
20
  &:focus {
15
21
  box-shadow: $focus-shadow;
@@ -17,99 +23,31 @@ a.box {
17
23
  }
18
24
 
19
25
  .box {
20
- box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
21
26
  background-color: getColor('background');
22
- border-radius: $radius;
23
- color: getColor('font');
27
+ box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
28
+ border-radius: var(--radius);
24
29
  display: flex;
25
30
  flex-direction: column;
26
31
  justify-content: flex-start;
27
32
  position: relative;
28
- padding: 24px;
29
-
30
- @include mobile {
31
- padding: 16px;
32
- }
33
+ padding: var(--padding-box);
33
34
 
34
35
  &:not(:last-child) {
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
- }
40
+ outline: var(--border-active);
41
+ }
92
42
 
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
- }
43
+ &.is-offset-header {
44
+ @include tablet {
45
+ margin-top: 40px;
100
46
 
101
- &:only-child {
102
- border-radius: ($radius - 2px);
103
- padding: 22px;
104
- @include mobile {
105
- padding: 14px;
106
- }
47
+ &.is-fullheight {
48
+ height: calc(100% - 40px);
107
49
  }
108
50
  }
109
-
110
- > .box-footer {
111
- margin: 12.5px 5.5px 5.5px;
112
- }
113
51
  }
114
52
 
115
53
  &.is-fullheight {
@@ -118,36 +56,33 @@ a.box {
118
56
  }
119
57
  }
120
58
 
121
- &.is-highlighted {
122
- .box-content {
123
- padding-left: 23px;
124
- border-left: 8px solid transparent;
59
+ &.is-flat {
60
+ box-shadow: none;
61
+ border: var(--border);
62
+
63
+ .box-header {
64
+ margin-top: calc(var(--padding-box) * -1 - 1px);
65
+ margin-left: calc(var(--padding-box) * -1 - 1px);
66
+ margin-right: calc(var(--padding-box) * -1 - 1px);
125
67
  }
68
+ }
126
69
 
127
- @each $name, $pair in $colors-brand-funcionnal {
70
+ &.is-highlighted {
71
+ border-left: $highlighted-border-width solid transparent;
72
+ border-top-left-radius: calc(var(--radius) + $highlighted-border-width);
73
+ border-bottom-left-radius: calc(var(--radius) + $highlighted-border-width);
74
+ @each $name, $pair in $colors-brand-functionnal {
128
75
  $color: getColor($name);
129
76
  $brandName: getColorBrandName($name);
130
77
 
131
- &.is-#{$brandName} .box-content {
78
+ &.is-#{$brandName} {
132
79
  border-left-color: $color;
133
- border-left-width: 4px;
80
+ border-left-width: $highlighted-border-width;
134
81
  }
135
82
  }
136
- }
137
-
138
- &.is-flat {
139
- box-shadow: none;
140
- border: 1px solid getColor('grey-dark');
141
-
142
- &.has-hat > .is-hat {
143
- left: -1px;
144
- right: -1px;
145
- }
146
83
 
147
84
  .box-header {
148
- margin-top: calc(-#{$padding-box} - 1px);
149
- margin-left: calc(-#{$padding-box} - 1px);
150
- margin-right: calc(-#{$padding-box} - 1px);
85
+ margin-left: calc(var(--padding-box) * -1 - $highlighted-border-width);
151
86
  }
152
87
  }
153
88
 
@@ -155,25 +90,21 @@ a.box {
155
90
  z-index: inherit;
156
91
  background-color: getColor('font');
157
92
  color: getColor('background');
158
- margin-top: -$padding-box;
159
- margin-left: -$padding-box;
160
- margin-right: -$padding-box;
93
+ margin-top: calc(var(--padding-box) * -1);
94
+ margin-left: calc(var(--padding-box) * -1);
95
+ margin-right: calc(var(--padding-box) * -1);
161
96
  padding: 8px;
162
- padding-left: 24px;
97
+ padding-left: var(--padding-box);
98
+ padding-right: var(--padding-box);
163
99
  box-shadow: none;
164
- border-radius: $radius $radius 0 0;
165
100
  font-size: 15px;
166
101
  display: flex;
167
102
  justify-content: center;
168
103
  flex-direction: column;
169
104
  align-items: center;
170
105
  font-weight: $weight-semibold;
171
-
172
- @include mobile {
173
- margin-top: -16px;
174
- margin-left: -16px;
175
- margin-right: -16px;
176
- }
106
+ border-radius: var(--radius) var(--radius) 0 0;
107
+ height: 40px;
177
108
 
178
109
  @include tablet {
179
110
  flex-direction: row;
@@ -193,65 +124,33 @@ a.box {
193
124
 
194
125
  ~ .box-content {
195
126
  margin-top: 0;
196
- border-radius: 0 0 $radius $radius;
197
127
  }
198
128
  }
199
129
 
200
130
  .box-content {
201
- background-color: getColor('background');
202
- color: getColor('font');
203
- margin: -$padding-box;
204
- padding: $padding-box;
205
-
206
- @include mobile {
207
- margin: -$padding-box-mobile;
208
- padding: $padding-box-mobile;
209
- }
210
-
211
- @include mobile {
212
- text-align: left;
213
- }
131
+ margin-left: calc(var(--padding-box) * -1);
132
+ margin-right: calc(var(--padding-box) * -1);
133
+ padding: var(--padding-box);
214
134
 
215
135
  &:first-child {
216
- border-radius: $radius $radius 0 0;
136
+ margin-top: calc(var(--padding-box) * -1);
137
+ border-top-left-radius: var(--radius);
138
+ border-top-right-radius: var(--radius);
217
139
  }
218
140
 
219
141
  &:last-child {
220
- border-radius: 0 0 $radius $radius;
142
+ margin-bottom: calc(var(--padding-box) * -1);
143
+ border-bottom-left-radius: var(--radius);
144
+ border-bottom-right-radius: var(--radius);
221
145
  }
222
146
 
223
- &:only-child {
224
- border-radius: $radius;
147
+ @include mobile {
148
+ text-align: left;
225
149
  }
226
150
 
227
151
  > .is-unboxed {
228
- margin-left: -$padding-box;
229
- margin-right: -$padding-box;
230
- width: auto;
231
-
232
- @include desktop {
233
- margin-left: -$padding-box;
234
- margin-right: -$padding-box;
235
- }
236
- }
237
-
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
- }
152
+ margin-left: calc(var(--padding-box) * -1);
153
+ margin-right: calc(var(--padding-box) * -1);
255
154
  }
256
155
 
257
156
  &.is-transparent {
@@ -260,8 +159,12 @@ a.box {
260
159
  }
261
160
 
262
161
  .box-footer {
263
- padding-top: $padding-box;
264
- border-top: 1px solid getColor('grey-disabled');
265
- margin: 12.5px 7.5px 7.5px;
162
+ margin-left: calc(var(--padding-box) * -1);
163
+ margin-right: calc(var(--padding-box) * -1);
164
+ margin-bottom: calc(var(--padding-box) * -1);
165
+ padding: var(--padding-box);
166
+ border-top: 1px solid getColor('neutral-fade');
167
+ border-bottom-left-radius: var(--radius);
168
+ border-bottom-right-radius: var(--radius);
266
169
  }
267
170
  }
@@ -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%;
@@ -25,168 +19,48 @@ $is-check-button-icon-pos-left: 5px;
25
19
  .has-text-centered & {
26
20
  justify-content: center;
27
21
  }
28
-
29
- &.is-mobile {
30
- flex-wrap: wrap;
31
-
32
- .button {
33
- margin-bottom: 16px;
34
- }
35
- }
36
22
  }
37
23
 
38
24
  .button {
39
25
  @include control;
40
26
  @include unselectable;
27
+ @extend %buttons-states;
41
28
 
42
29
  background-color: white;
43
30
  border-width: $button-border-width;
44
- border-radius: 4px;
31
+ border-radius: var(--radius-small);
45
32
  cursor: pointer;
46
33
  justify-content: center;
47
34
  text-align: center;
48
- font-family: $body-family;
49
35
  white-space: nowrap;
50
- height: 44px;
51
36
  padding: 0 $spacing-4;
52
- font-size: $text-15;
53
37
  text-decoration: inherit;
54
38
  font-weight: $weight-semibold;
55
39
 
56
- &:focus {
57
- outline: 1px auto getVariantColor('font', 1);
58
- }
59
-
60
40
  @include mobile {
61
41
  width: 100%;
62
42
  margin: 8px 0 !important;
63
43
  }
64
44
 
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;
45
+ @each $name, $pair in $button-colors {
46
+ $variantName: nth($pair, 1);
47
+ $colorBG: getColor(#{nth($pair, 2)});
48
+ $colorText: getColor(nth($pair, 3));
80
49
 
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
- }
50
+ &.is-#{$variantName} {
51
+ background-color: $colorBG;
52
+ color: $colorText;
91
53
  }
92
54
  }
93
55
 
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
- }
56
+ &[disabled],
57
+ &[aria-disabled=true] {
58
+ background-color: getColorValue('main-fade') !important;
59
+ color: getColorValue('disabled-fade') !important
102
60
  }
103
61
 
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
- }
113
- }
114
-
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
- }
62
+ &.is-loading {
63
+ background-color: getColorValue('neutral');
155
64
  }
156
65
 
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
66
  }
@@ -2,38 +2,41 @@
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
- }
27
+ input:checked ~ label.checkbox-label {
28
+ &:after {
29
+ top: 15px;
30
+ right: 15px;
31
31
  }
32
- input:checked:disabled ~ label.checkbox-label {
33
- &:after {
34
- background-color: getColor('grey');
35
- top: $spacing-4;
36
- right: $spacing-4;
37
- }
32
+ }
33
+ }
34
+
35
+ .checkbox {
36
+ input:not(:disabled):not(:checked) ~ label.checkbox-label:hover {
37
+ &:before {
38
+ @include hoverRules()
38
39
  }
40
+ }
39
41
  }
42
+