@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,744 +2,632 @@
2
2
  @import "./initial-variables";
3
3
 
4
4
  %delete {
5
- @extend %unselectable;
6
-
7
- -moz-appearance: none;
8
- -webkit-appearance: none;
9
- background-color: rgba(black, 0.2);
10
- border: none;
11
- border-radius: $radius-rounded;
12
- cursor: pointer;
13
- display: inline-block;
14
- flex-grow: 0;
15
- flex-shrink: 0;
16
- font-size: 0;
17
- height: 20px;
18
- max-height: 20px;
19
- max-width: 20px;
20
- min-height: 20px;
21
- min-width: 20px;
22
- outline: none;
23
- position: relative;
24
- vertical-align: top;
25
- width: 20px;
26
-
27
- &::before,
28
- &::after {
29
- background-color: #fff;
30
- content: '';
31
- display: block;
32
- left: 50%;
33
- position: absolute;
34
- top: 50%;
35
- transform: translateX(-50%) translateY(-50%) rotate(45deg);
36
- transform-origin: center center;
37
- }
38
-
39
- &::before {
40
- height: 2px;
41
- width: 50%;
42
- }
43
-
44
- &::after {
45
- height: 50%;
46
- width: 2px;
47
- }
48
-
49
- &:hover,
50
- &:focus {
51
- background-color: rgba(black, 0.3);
52
- }
53
-
54
- &:active {
55
- background-color: rgba(black, 0.4);
56
- }
57
-
58
- // Sizes
59
- &.is-small {
60
- height: 16px;
61
- max-height: 16px;
62
- max-width: 16px;
63
- min-height: 16px;
64
- min-width: 16px;
65
- width: 16px;
66
- }
67
-
68
- &.is-medium {
69
- height: 24px;
70
- max-height: 24px;
71
- max-width: 24px;
72
- min-height: 24px;
73
- min-width: 24px;
74
- width: 24px;
75
- }
76
-
77
- &.is-large {
78
- height: 32px;
79
- max-height: 32px;
80
- max-width: 32px;
81
- min-height: 32px;
82
- min-width: 32px;
83
- width: 32px;
84
- }
5
+ @extend %unselectable;
6
+
7
+ -moz-appearance: none;
8
+ -webkit-appearance: none;
9
+ background-color: rgba(black, 0.2);
10
+ border: none;
11
+ border-radius: 9999px;
12
+ cursor: pointer;
13
+ display: inline-block;
14
+ flex-grow: 0;
15
+ flex-shrink: 0;
16
+ font-size: 0;
17
+ height: 20px;
18
+ max-height: 20px;
19
+ max-width: 20px;
20
+ min-height: 20px;
21
+ min-width: 20px;
22
+ outline: none;
23
+ position: relative;
24
+ vertical-align: top;
25
+ width: 20px;
26
+
27
+ &::before,
28
+ &::after {
29
+ background-color: #fff;
30
+ content: '';
31
+ display: block;
32
+ left: 50%;
33
+ position: absolute;
34
+ top: 50%;
35
+ transform: translateX(-50%) translateY(-50%) rotate(45deg);
36
+ transform-origin: center center;
37
+ }
38
+
39
+ &::before {
40
+ height: 2px;
41
+ width: 50%;
42
+ }
43
+
44
+ &::after {
45
+ height: 50%;
46
+ width: 2px;
47
+ }
48
+
49
+ &:hover,
50
+ &:focus {
51
+ background-color: rgba(black, 0.3);
52
+ }
53
+
54
+ &:active {
55
+ background-color: rgba(black, 0.4);
56
+ }
57
+
58
+ // Sizes
59
+ &.is-small {
60
+ height: 16px;
61
+ max-height: 16px;
62
+ max-width: 16px;
63
+ min-height: 16px;
64
+ min-width: 16px;
65
+ width: 16px;
66
+ }
67
+
68
+ &.is-medium {
69
+ height: 24px;
70
+ max-height: 24px;
71
+ max-width: 24px;
72
+ min-height: 24px;
73
+ min-width: 24px;
74
+ width: 24px;
75
+ }
76
+
77
+ &.is-large {
78
+ height: 32px;
79
+ max-height: 32px;
80
+ max-width: 32px;
81
+ min-height: 32px;
82
+ min-width: 32px;
83
+ width: 32px;
84
+ }
85
85
  }
86
86
 
87
87
  %unselectable {
88
- -webkit-touch-callout: none;
89
- -webkit-user-select: none;
90
- -moz-user-select: none;
91
- -ms-user-select: none;
92
- user-select: none;
88
+ -webkit-touch-callout: none;
89
+ -webkit-user-select: none;
90
+ -moz-user-select: none;
91
+ -ms-user-select: none;
92
+ user-select: none;
93
93
  }
94
94
 
95
95
  @mixin delete {
96
- @extend %delete;
97
- }
98
-
99
- @mixin arrow($color, $direction: 'down') {
100
- background-color: $color;
101
- @if $direction == 'up' {
102
- content: "";
103
- mask-image: url('./assets/icons/all/arrow-up.svg');
104
- } @else if $direction == 'left' {
105
- content: "";
106
- mask-image: url('./assets/icons/all/arrow-left.svg');
107
- } @else if $direction == 'right' {
108
- content: "";
109
- mask-image: url('./assets/icons/all/arrow-right.svg');
110
- } @else {
111
- content: "";
112
- mask-image: url('./assets/icons/all/arrow-down.svg');
113
- }
96
+ @extend %delete;
97
+ }
98
+
99
+ @mixin arrow( $direction: 'down') {
100
+ background-color: currentColor;
101
+ @if $direction == 'up' {
102
+ content: "";
103
+ mask-image: url('./assets/icons/all/arrow-up.svg');
104
+ } @else if $direction == 'left' {
105
+ content: "";
106
+ mask-image: url('./assets/icons/all/arrow-left.svg');
107
+ } @else if $direction == 'right' {
108
+ content: "";
109
+ mask-image: url('./assets/icons/all/arrow-right.svg');
110
+ } @else {
111
+ content: "";
112
+ mask-image: url('./assets/icons/all/arrow-down.svg');
113
+ }
114
114
 
115
115
  min-width: 15px;
116
116
  min-height: 15px;
117
117
  mask-size: 15px;
118
- color: $color;
119
- position: absolute;
120
- display: inline-block;
118
+ position: absolute;
119
+ display: inline-block;
121
120
  }
122
121
 
123
122
  @mixin block {
124
- &:not(:last-child) {
125
- margin-bottom: 15px;
126
- }
123
+ &:not(:last-child) {
124
+ margin-bottom: 15px;
125
+ }
127
126
  }
128
127
 
129
128
  @mixin clearfix {
130
- &::after {
131
- clear: both;
132
- content: ' ';
133
- display: table;
134
- }
129
+ &::after {
130
+ clear: both;
131
+ content: ' ';
132
+ display: table;
133
+ }
135
134
  }
136
135
 
137
136
  @mixin center($width, $height: 0) {
138
- position: absolute;
137
+ position: absolute;
139
138
 
140
- @if $height != 0 {
141
- left: calc(50% - (#{$width} / 2));
142
- top: calc(50% - (#{$height} / 2));
143
- } @else {
144
- left: calc(50% - (#{$width} / 2));
145
- top: calc(50% - (#{$width} / 2));
146
- }
139
+ @if $height != 0 {
140
+ left: calc(50% - (#{$width} / 2));
141
+ top: calc(50% - (#{$height} / 2));
142
+ } @else {
143
+ left: calc(50% - (#{$width} / 2));
144
+ top: calc(50% - (#{$width} / 2));
145
+ }
147
146
  }
148
147
 
149
148
  @mixin spinner {
150
- animation: spinAround 500ms infinite linear;
151
- border: 2px solid getColor('grey-light');
152
- border-radius: 290486px;
153
- border-right-color: transparent;
154
- border-top-color: transparent;
155
- content: '';
156
- display: block;
157
- height: 1em;
158
- position: relative;
159
- width: 1em;
149
+ animation: spinAround 500ms infinite linear;
150
+ border: 2px solid getBGColor('neutral-dark');
151
+ border-radius: 290486px;
152
+ border-right-color: transparent;
153
+ border-top-color: transparent;
154
+ content: '';
155
+ display: block;
156
+ height: 1em;
157
+ position: relative;
158
+ width: 1em;
160
159
  }
161
160
 
162
161
  @mixin overflow-touch {
163
- -webkit-overflow-scrolling: touch;
162
+ -webkit-overflow-scrolling: touch;
163
+ }
164
+
165
+ @mixin label-states {
166
+ &:focus,
167
+ &:active,
168
+ &:hover {
169
+ @include hover();
170
+ }
164
171
  }
165
172
 
166
173
  @mixin overlay($offset: 0) {
167
- position: absolute;
168
- top: $offset;
169
- bottom: $offset;
170
- left: $offset;
171
- right: $offset;
174
+ position: absolute;
175
+ top: $offset;
176
+ bottom: $offset;
177
+ left: $offset;
178
+ right: $offset;
172
179
  }
173
180
 
174
181
  @mixin placeholder {
175
- $placeholders: ':-moz' ':-webkit-input' '-moz' '-ms-input';
182
+ $placeholders: ':-moz' ':-webkit-input' '-moz' '-ms-input';
176
183
 
177
- @each $placeholder in $placeholders {
178
- &:#{$placeholder}-placeholder {
179
- @content;
180
- }
184
+ @each $placeholder in $placeholders {
185
+ &:#{$placeholder}-placeholder {
186
+ @content;
181
187
  }
188
+ }
182
189
  }
183
190
 
184
191
  @mixin unselectable {
185
- @extend %unselectable;
192
+ @extend %unselectable;
186
193
  }
187
194
 
188
195
  @mixin ui-icon {
189
- font-family: trilogy-all;
190
- font-style: normal;
191
- font-weight: normal;
192
- display: inline-block;
193
- text-decoration: inherit;
194
- margin-right: 0.2em;
195
- text-align: center;
196
+ font-family: trilogy-all;
197
+ font-style: normal;
198
+ font-weight: normal;
199
+ display: inline-block;
200
+ text-decoration: inherit;
201
+ margin-right: 0.2em;
202
+ text-align: center;
196
203
 
197
- /* For safety - reset parent styles, that can break glyph codes*/
198
- font-variant: normal;
199
- text-transform: none;
204
+ /* For safety - reset parent styles, that can break glyph codes*/
205
+ font-variant: normal;
206
+ text-transform: none;
200
207
 
201
- /* fix buttons height, for twitter bootstrap */
202
- line-height: 1em;
208
+ /* fix buttons height, for twitter bootstrap */
209
+ line-height: 1em;
203
210
 
204
- /* remove if not needed */
205
- margin-left: 0.2em;
211
+ /* remove if not needed */
212
+ margin-left: 0.2em;
206
213
 
207
- /* Font smoothing. That was taken from TWBS */
208
- -webkit-font-smoothing: antialiased;
209
- -moz-osx-font-smoothing: grayscale;
214
+ /* Font smoothing. That was taken from TWBS */
215
+ -webkit-font-smoothing: antialiased;
216
+ -moz-osx-font-smoothing: grayscale;
210
217
  }
211
218
 
212
219
  // Responsiveness
213
220
  @mixin from($device) {
214
- @media screen and (min-width: $device) {
215
- @content;
216
- }
221
+ @media screen and (min-width: $device) {
222
+ @content;
223
+ }
217
224
  }
218
225
 
219
226
  @mixin until($device) {
220
- @media screen and (max-width: $device - 1px) {
221
- @content;
222
- }
227
+ @media screen and (max-width: $device - 1px) {
228
+ @content;
229
+ }
223
230
  }
224
231
 
225
232
  @mixin mobile {
226
- @media screen and (max-width: $tablet - 1px) {
227
- @content;
228
- }
233
+ @media screen and (max-width: $tablet - 1px) {
234
+ @content;
235
+ }
229
236
  }
230
237
 
231
238
  @mixin tablet {
232
- @media screen and (min-width: $tablet), print {
233
- @content;
234
- }
239
+ @media screen and (min-width: $tablet), print {
240
+ @content;
241
+ }
235
242
  }
236
243
 
237
244
  @mixin tablet-only {
238
- @media screen and (min-width: $tablet) and (max-width: $desktop - 1px) {
239
- @content;
240
- }
245
+ @media screen and (min-width: $tablet) and (max-width: $desktop - 1px) {
246
+ @content;
247
+ }
241
248
  }
242
249
 
243
250
  @mixin touch {
244
- @media screen and (max-width: $desktop - 1px) {
245
- @content;
246
- }
251
+ @media screen and (max-width: $desktop - 1px) {
252
+ @content;
253
+ }
247
254
  }
248
255
 
249
256
  @mixin desktop {
250
- @media screen and (min-width: $desktop) {
251
- @content;
252
- }
257
+ @media screen and (min-width: $desktop) {
258
+ @content;
259
+ }
253
260
  }
254
261
 
255
262
  @mixin desktop-only {
256
- @media screen and (min-width: $desktop) and (max-width: $widescreen - 1px) {
257
- @content;
258
- }
263
+ @media screen and (min-width: $desktop) and (max-width: $widescreen - 1px) {
264
+ @content;
265
+ }
259
266
  }
260
267
 
261
268
  @mixin until-widescreen {
262
- @media screen and (max-width: $widescreen - 1px) {
263
- @content;
264
- }
269
+ @media screen and (max-width: $widescreen - 1px) {
270
+ @content;
271
+ }
265
272
  }
266
273
 
267
274
  @mixin widescreen {
268
- @media screen and (min-width: $widescreen) {
269
- @content;
270
- }
275
+ @media screen and (min-width: $widescreen) {
276
+ @content;
277
+ }
271
278
  }
272
279
 
273
280
  @mixin widescreen-only {
274
- @media screen and (min-width: $widescreen) and (max-width: $fullhd - 1px) {
275
- @content;
276
- }
281
+ @media screen and (min-width: $widescreen) and (max-width: $fullhd - 1px) {
282
+ @content;
283
+ }
277
284
  }
278
285
 
279
286
  @mixin until-fullhd {
280
- @media screen and (max-width: $fullhd - 1px) {
281
- @content;
282
- }
287
+ @media screen and (max-width: $fullhd - 1px) {
288
+ @content;
289
+ }
283
290
  }
284
291
 
285
292
  @mixin fullhd {
286
- @media screen and (min-width: $fullhd) {
287
- @content;
288
- }
293
+ @media screen and (min-width: $fullhd) {
294
+ @content;
295
+ }
289
296
  }
290
297
 
291
298
  @mixin all-desktop-only {
292
- @media screen and (min-width: $desktop) and (max-width: $fullhd - 1px) {
293
- @content;
294
- }
295
- }
296
-
297
- @mixin hamburger($hamburger-dimensions) {
298
- cursor: pointer;
299
- display: block;
300
- height: $hamburger-dimensions;
301
- position: relative;
302
- width: $hamburger-dimensions;
303
-
304
- span {
305
- background-color: currentColor;
306
- display: block;
307
- height: 1px;
308
- left: 50%;
309
- margin-left: -7px;
310
- position: absolute;
311
- top: 50%;
312
- transition: none $speed $easing;
313
- transition-property: background, left, opacity, transform;
314
- width: 15px;
315
-
316
- &:nth-child(1) {
317
- margin-top: -6px;
318
- }
319
-
320
- &:nth-child(2) {
321
- margin-top: -1px;
322
- }
323
-
324
- &:nth-child(3) {
325
- margin-top: 4px;
326
- }
327
- }
328
-
329
- &:hover {
330
- background-color: rgba(black, 0.05);
331
- }
332
-
333
- // Modifers
334
- &.is-active {
335
- span {
336
- &:nth-child(1) {
337
- margin-left: -5px;
338
- transform: rotate(45deg);
339
- transform-origin: left top;
340
- }
341
-
342
- &:nth-child(2) {
343
- opacity: 0;
344
- }
345
-
346
- &:nth-child(3) {
347
- margin-left: -5px;
348
- transform: rotate(-45deg);
349
- transform-origin: left bottom;
350
- }
351
- }
352
- }
299
+ @media screen and (min-width: $desktop) and (max-width: $fullhd - 1px) {
300
+ @content;
301
+ }
353
302
  }
354
303
 
355
304
  @mixin ellipsis() {
356
- white-space: nowrap;
357
- overflow-x: hidden;
358
- text-overflow: ellipsis;
305
+ white-space: nowrap;
306
+ overflow-x: hidden;
307
+ text-overflow: ellipsis;
359
308
  }
360
309
 
361
310
  @mixin text-tags() {
362
- a,
363
- span,
364
- p,
365
- i,
366
- strong,
367
- h1,
368
- h2,
369
- h3,
370
- h4,
371
- h5,
372
- label,
373
- h6 {
374
- @content;
375
- }
311
+ a,
312
+ span,
313
+ p,
314
+ i,
315
+ strong,
316
+ h1,
317
+ h2,
318
+ h3,
319
+ h4,
320
+ h5,
321
+ label,
322
+ h6 {
323
+ @content;
324
+ }
376
325
  }
377
326
 
378
327
  @mixin heading-tags() {
379
- h1,
380
- h2,
381
- h3,
382
- h4,
383
- h5,
384
- h6 {
385
- @content;
386
- }
328
+ h1,
329
+ h2,
330
+ h3,
331
+ h4,
332
+ h5,
333
+ h6 {
334
+ @content;
335
+ }
387
336
  }
388
337
 
389
338
  @mixin apply-shadow-box {
390
- box-shadow: $shadow;
339
+ box-shadow: $shadow;
391
340
  }
392
341
 
393
342
  @mixin apply-colors($property: 'color') {
394
- @each $name, $pair in $colors-brand-funcionnal {
395
- $color: getColor($name);
396
- $brandName: getColorBrandName($name);
397
- &.is-#{$brandName} {
398
- #{$property}: $color;
399
- }
343
+ @each $name, $pair in $colors-brand-funcionnal {
344
+ $color: getColor($name);
345
+ $brandName: getColorBrandName($name);
346
+ &.is-#{$brandName} {
347
+ #{$property}: $color;
400
348
  }
349
+ }
401
350
  }
402
351
 
403
352
  @mixin pattern-light($size, $x-pos: top, $y-pos: center) {
404
- background-size: $size;
405
- background-position: $x-pos $y-pos;
353
+ background-size: $size;
354
+ background-position: $x-pos $y-pos;
406
355
  }
407
356
 
408
357
  @mixin pattern-dark($size, $x-pos: top, $y-pos: center) {
409
- background: linear-gradient(#1b3650, getColor('alternate'));
410
- background-size: auto, $size, auto;
411
- background-position: top left, $x-pos $y-pos, top left;
358
+ background: linear-gradient(#1b3650, getColor('alternate'));
359
+ background-size: auto, $size, auto;
360
+ background-position: top left, $x-pos $y-pos, top left;
412
361
  }
413
362
 
414
363
  // import sass bulma
415
364
  @mixin input {
416
- @include control;
417
- height: 56px;
418
- background-color: #fff;
419
- border-color: getColor('grey');
420
- color: getColor('font');
365
+ @include control;
366
+ height: 56px;
367
+ background-color: getColor('background');
368
+ border-color: getBGColor('font');
369
+ color: getColor('font');
421
370
 
422
- @include placeholder {
423
- color: getColor('grey') !important;
424
- opacity: 1 !important;
425
- transition: all 0.2s ease-out;
426
- }
371
+ @include placeholder {
372
+ color: getColor('neutral') !important;
373
+ opacity: 1 !important;
374
+ transition: all 0.2s ease-out;
375
+ }
427
376
 
428
- &:hover,
429
- &.is-hovered,
430
- &:focus,
431
- &.is-focused {
432
- outline: 1px auto getVariantColor('alternate', 1);
433
- }
377
+ @include hover();
378
+ }
379
+
380
+ @mixin checkbox-and-radio($type) {
381
+ //BOTH
382
+ .#{$type},
383
+ .#{$type}-tile {
384
+ position: relative;
385
+
386
+ label.#{$type}-label {
387
+ cursor: pointer;
388
+ font-size: 14px;
389
+
390
+ &:before,
391
+ &:after {
392
+ content: '';
393
+ position: absolute;
394
+ width: 18px;
395
+ height: 18px;
396
+ }
434
397
 
435
- &[disabled] {
436
- background-color: getColor('grey-disabled');
437
- border-color: getColor('grey-disabled');
438
- color: getColor('grey');
398
+ &:before {
399
+ border: var(--border);
400
+ }
439
401
  }
440
- }
441
402
 
442
- @mixin checkradio {
443
- outline: 0;
444
- user-select: none;
445
- display: inline-block;
446
- vertical-align: baseline;
447
- position: absolute;
448
- opacity: 0;
403
+ input {
404
+ display: none;
449
405
 
450
- + label {
451
- cursor: pointer;
452
- position: relative;
453
- display: flex;
454
- align-items: center;
406
+ &:checked ~ label.#{$type}-label {
407
+ border-color: getColor('main');
455
408
 
456
- &:hover {
457
- &::before {
458
- animation-duration: 0.4s;
459
- animation-fill-mode: both;
460
- animation-name: hover-color;
461
- }
409
+ &:before {
410
+ border-color: getColor('main');
462
411
  }
463
412
 
464
- &::before,
465
- &::after {
466
- content: '';
413
+ &:after {
414
+ background-color: getColor('main');
467
415
  }
468
-
469
- &::before {
470
- border: 1px solid getColor('grey');
471
- margin: 0 10px 0 0;
472
- min-width: 16px;
473
- min-height: 16px;
416
+ }
417
+
418
+ &:disabled,
419
+ &:disabled:checked {
420
+ & ~ label.#{$type}-label {
421
+ &:after {
422
+ background-color: getBGColor('disabled');
423
+ }
474
424
  }
425
+ }
475
426
 
476
- &::after {
477
- position: absolute;
478
- display: none;
427
+ &:disabled {
428
+ & ~ label.#{$type}-label {
429
+ &:after {
430
+ background-color: transparent;
431
+ }
479
432
  }
433
+ }
480
434
  }
481
- }
435
+ }
482
436
 
483
- @mixin checkbox-and-radio($type) {
484
- //BOTH
485
- .#{$type},
486
- .#{$type}-tile {
487
- position: relative;
488
-
489
- label.#{$type}-label {
490
- cursor: pointer;
491
- font-size: 14px;
492
-
493
- &:before,
494
- &:after {
495
- content: '';
496
- position: absolute;
497
- width: 18px;
498
- height: 18px;
499
- }
500
-
501
- &:before {
502
- border: 1px solid getColor('grey');
503
- }
504
- }
437
+ // SIMPLE WITH LABEL ONLY
438
+ .#{$type} {
439
+ display: flex;
440
+ align-items: center;
441
+ margin: 6px 8px;
442
+ width: fit-content;
505
443
 
506
- input {
507
- display: none;
508
-
509
- &:checked ~ label.#{$type}-label {
510
- border-color: getColor('alternate');
511
-
512
- &:before {
513
- border-color: getColor('alternate');
514
- }
515
-
516
- &:after {
517
- background-color: getColor('alternate');
518
- }
519
- }
520
-
521
- &:disabled,
522
- &:disabled:checked {
523
- & ~ label.#{$type}-label {
524
- cursor: no-drop;
525
- color: getColor('grey-darker');
526
- border-color: getColor('grey-disabled');
527
-
528
- &:before {
529
- border-color: getColor('grey-disabled');
530
- }
531
-
532
- &:after {
533
- background-color: getColor('grey-disabled');
534
- }
535
- }
536
- }
537
-
538
- &:disabled {
539
- & ~ label.#{$type}-label {
540
- &:after {
541
- background-color: transparent;
542
- }
543
- }
544
- & .icon {
545
- background-color: getColor('grey-darker');
546
- }
547
- }
548
- }
444
+ input:disabled,
445
+ input:disabled:checked {
446
+ & ~ label.#{$type}-label {
447
+ @include disabledRulesWithoutBG;
448
+ }
549
449
  }
550
450
 
551
- // SIMPLE WITH LABEL ONLY
552
- .#{$type} {
553
- display: flex;
554
- align-items: center;
555
- margin: 6px 8px;
556
-
557
- label.#{$type}-label {
558
- padding: 4px;
559
- padding-left: 34px;
560
-
561
- &:before,
562
- &:after {
563
- top: 50%;
564
- transform: translateY(-50%);
565
- left: 0;
566
- }
567
- }
451
+ label.#{$type}-label {
452
+ padding: 4px;
453
+ padding-left: 34px;
568
454
 
569
- input:checked ~ label.#{$type}-label {
570
- font-weight: bold;
571
- }
455
+ &:before,
456
+ &:after {
457
+ top: 50%;
458
+ transform: translateY(-50%);
459
+ left: 0;
460
+ }
461
+ }
572
462
 
573
- input:not(:disabled) ~ label.#{$type}-label {
574
- &:hover {
575
- &:before {
576
- border-color: getColor('alternate');
577
- border-width: 2px;
578
- }
579
- }
463
+ &:hover &:not(disabled) {
464
+ label.#{$type}-label {
465
+ &:before {
466
+ @include hoverRules();
580
467
  }
468
+ }
581
469
  }
582
470
 
583
- //TILE ONLY
584
- .#{$type}-tile {
585
- position: relative;
586
- max-width: 160px;
587
- display: inline-block;
588
- margin: 0;
589
- margin-right: 16px;
590
- margin-top: 16px;
591
- text-align: center;
471
+ &:focus {
472
+ border: 2px;
473
+ border-color: getColor('main');
474
+ }
475
+ }
476
+
477
+ //TILE ONLY
478
+ .#{$type}-tile {
479
+ position: relative;
480
+ max-width: 160px;
481
+ display: inline-block;
482
+ margin: 0;
483
+ margin-right: 16px;
484
+ margin-top: 16px;
485
+ text-align: center;
486
+
487
+ input:disabled,
488
+ input:disabled:checked {
489
+ & ~ label.#{$type}-label {
490
+ @include disabledRules;
491
+ }
492
+ }
493
+
494
+ &:first-child {
495
+ margin-left: 0;
496
+ }
497
+
498
+ &:last-child {
499
+ margin-right: 0;
500
+ }
501
+
502
+ label.#{$type}-label {
503
+ display: block;
504
+ position: relative;
505
+ padding: 40px 16px 16px;
506
+ border: var(--border);
507
+ border-radius: var(--radius);
508
+ box-sizing: border-box;
509
+ background-color: getColor('background');
510
+
511
+ &:before {
512
+ top: 16px;
513
+ right: 16px;
514
+ }
515
+
516
+ span.#{$type}-title {
517
+ font-weight: bold;
518
+ width: 100%;
519
+ display: block;
520
+ font-size: 16px;
521
+ }
522
+ }
523
+
524
+ input {
592
525
 
593
- &:first-child {
594
- margin-left: 0;
526
+ &:not(:disabled):not(:checked) ~ label.radio-label {
527
+ @include label-states;
528
+ }
529
+
530
+ &:not(:disabled) ~ label.checkbox-label {
531
+ @include label-states;
532
+ }
533
+
534
+ &:checked:not(:disabled) ~ label.#{$type}-label {
535
+ border-color: getColor('main');
536
+ border-width: 2px;
537
+ padding: 15px;
538
+ padding-top: 39px;
539
+
540
+ &:before {
541
+ top: 15px;
542
+ right: 15px;
595
543
  }
596
544
 
597
- &:last-child {
598
- margin-right: 0;
545
+ span.#{$type}-title {
546
+ color: getColor('main');
599
547
  }
548
+ }
600
549
 
601
- label.#{$type}-label {
602
- display: block;
603
- position: relative;
604
- padding: 40px 16px 16px;
605
- border: 1px solid getColor('font');
606
- border-radius: 8px;
607
- box-sizing: border-box;
608
-
609
- &:before {
610
- top: 16px;
611
- right: 16px;
612
- }
613
-
614
- span.#{$type}-title {
615
- font-weight: bold;
616
- width: 100%;
617
- display: block;
618
- font-size: 16px;
619
- }
550
+ &:disabled {
551
+ & ~ label.#{$type}-label {
552
+ &:before {
553
+ border-color: getColor('disabled') !important;
554
+ }
620
555
  }
556
+ }
621
557
 
622
- input {
623
- &:not(:disabled) ~ label.#{$type}-label {
624
- &:focus,
625
- &:active,
626
- &:hover {
627
- border-color: getColor('alternate');
628
- border-width: 2px;
629
- padding: 15px;
630
- padding-top: 39px;
631
-
632
- &:before {
633
- top: 15px;
634
- right: 15px;
635
- }
636
- }
637
- }
638
-
639
- &:checked:not(:disabled) ~ label.#{$type}-label {
640
- border-color: getColor('alternate');
641
- border-width: 2px;
642
- padding: 15px;
643
- padding-top: 39px;
644
-
645
- &:before {
646
- top: 15px;
647
- right: 15px;
648
- }
649
-
650
- span.#{$type}-title {
651
- color: getColor('alternate');
652
- }
653
- }
654
-
655
- &:disabled {
656
- & ~ label.#{$type}-label {
657
- background-color: getColor('grey-disabled');
658
- color: getColor('grey-dark') !important;
659
-
660
- &:hover {
661
- border-width: 1px;
662
- }
663
-
664
- &:focus,
665
- &:active,
666
- &:hover {
667
- padding: 16px;
668
- padding-top: 40px;
669
- }
670
-
671
- &:before {
672
- border-color: getColor('grey') !important;
673
- }
674
- }
675
- }
676
-
677
- &:disabled:checked ~ label.#{$type}-label {
678
- &:before {
679
- border-color: getColor('grey') !important;
680
- }
681
-
682
- .checkbox-title {
683
- color: getColor('grey-dark');
684
- }
685
- }
558
+ &:disabled:checked ~ label.#{$type}-label {
559
+ .checkbox-title {
560
+ color: getColor('disabled');
686
561
  }
562
+ }
563
+ }
564
+
565
+ &.is-horizontal {
566
+ display: flex;
567
+ justify-content: space-between;
568
+ align-items: center;
569
+ max-width: unset;
570
+ width: auto;
571
+ margin: 16px 0;
572
+ position: relative;
573
+
574
+ &.is-narrow {
575
+ width: fit-content;
576
+ }
577
+
578
+ input {
579
+ &:checked:not(:disabled) ~ label.#{$type}-label {
580
+ padding: 15px;
581
+ padding-right: 47px;
582
+ }
583
+
584
+ }
687
585
 
688
- &.is-horizontal {
689
- display: flex;
690
- justify-content: space-between;
691
- align-items: center;
692
- max-width: unset;
693
- width: auto;
694
- margin: 16px 0;
695
- position: relative;
696
-
697
- &.is-narrow{
698
- width: fit-content;
699
- }
700
-
701
- input {
702
- &:checked:not(:disabled) ~ label.#{$type}-label {
703
- padding: 15px;
704
- padding-right: 47px;
705
- }
706
-
707
- &:disabled {
708
- & ~ label.#{$type}-label {
709
- &:focus,
710
- &:active,
711
- &:hover {
712
- padding: 16px !important;
713
- padding-right: 48px;
714
- }
715
- }
716
- }
717
- }
718
-
719
- label.#{$type}-label {
720
- width: 100%;
721
- display: flex;
722
- align-items: center;
723
- justify-content: flex-start;
724
- text-align: left;
725
- padding: 16px 48px 16px 16px;
726
-
727
- &:focus,
728
- &:active,
729
- &:hover {
730
- padding: 15px 48px 15px 15px !important;
731
- }
732
-
733
- &:before,
734
- &:after {
735
- top: 50% !important;
736
- transform: translateY(-50%);
737
- }
738
- }
739
-
740
- .icon {
741
- margin-right: 16px;
742
- }
586
+ label.#{$type}-label {
587
+ width: 100%;
588
+ display: flex;
589
+ align-items: center;
590
+ justify-content: flex-start;
591
+ text-align: left;
592
+ padding: 16px 48px 16px 16px;
593
+
594
+ &:before,
595
+ &:after {
596
+ top: 50% !important;
597
+ transform: translateY(-50%);
743
598
  }
599
+ }
600
+
601
+ .icon {
602
+ margin-right: 16px;
603
+ }
744
604
  }
605
+ }
606
+ }
607
+
608
+ @mixin hoverRules {
609
+ background-color: var(--color-bg-hovered);
610
+ }
611
+
612
+ @mixin hover {
613
+ &:hover:not(.is-disabled):not(:focus) {
614
+ @include hoverRules();
615
+ }
616
+ &:focus:not(.is-disabled), &:focus-visible:not(.is-disabled) {
617
+ border: 2px solid currentColor;
618
+ }
619
+ }
620
+
621
+
622
+ @mixin disabledRulesWithoutBG {
623
+ border-color: transparent !important;
624
+ box-shadow: none !important;
625
+ color: getColor('disabled') !important;
626
+ cursor: not-allowed !important;
627
+ filter: grayscale(1);
628
+ }
629
+
630
+ @mixin disabledRules {
631
+ background-color: getBGColor('disabled') !important;
632
+ @include disabledRulesWithoutBG;
745
633
  }