@trilogy-ds/styles 0.0.1-beta.8 → 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
@@ -2,743 +2,634 @@
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 getColor('neutral-fade');
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-functionnal {
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('accent'));
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: getColor('neutral');
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('font') !important;
373
+ filter: grayscale(100%);
374
+ opacity: 1 !important;
375
+ transition: all 0.2s ease-out;
376
+ }
427
377
 
428
- &:hover,
429
- &.is-hovered,
430
- &:focus,
431
- &.is-focused {
432
- outline: 1px auto getVariantColor('alternate', 1);
433
- }
378
+ @include hover();
379
+ }
380
+
381
+ @mixin checkbox-and-radio($type) {
382
+ //TILES WRAPPER
383
+ .#{$type}-tiles {
384
+ display: flex;
385
+ gap: 16px;
386
+ flex-wrap: wrap;
387
+ }
388
+
389
+ //BOTH
390
+ .#{$type},
391
+ .#{$type}-tile {
392
+ position: relative;
393
+
394
+ label.#{$type}-label {
395
+ cursor: pointer;
396
+ font-size: 14px;
434
397
 
435
- &[disabled] {
436
- background-color: getColor('grey-disabled');
437
- border-color: getColor('grey-disabled');
438
- color: getColor('grey');
398
+ &:before,
399
+ &:after {
400
+ content: '';
401
+ position: absolute;
402
+ width: 18px;
403
+ height: 18px;
404
+ }
405
+
406
+ &:before {
407
+ border: var(--border);
408
+ }
439
409
  }
440
- }
441
410
 
442
- @mixin checkradio {
443
- outline: 0;
444
- user-select: none;
445
- display: inline-block;
446
- vertical-align: baseline;
447
- position: absolute;
448
- opacity: 0;
411
+ input {
412
+ display: none;
449
413
 
450
- + label {
451
- cursor: pointer;
452
- position: relative;
453
- display: flex;
454
- align-items: center;
414
+ &:checked ~ label.#{$type}-label {
415
+ border-color: getColor('main');
455
416
 
456
- &:hover {
457
- &::before {
458
- animation-duration: 0.4s;
459
- animation-fill-mode: both;
460
- animation-name: hover-color;
461
- }
417
+ &:before {
418
+ border-color: getColor('main');
462
419
  }
463
420
 
464
- &::before,
465
- &::after {
466
- content: '';
421
+ &:after {
422
+ background-color: getColor('main');
467
423
  }
468
-
469
- &::before {
470
- border: 1px solid getColor('grey');
471
- margin: 0 10px 0 0;
472
- min-width: 16px;
473
- min-height: 16px;
424
+ }
425
+
426
+ &:disabled,
427
+ &:disabled:checked {
428
+ & ~ label.#{$type}-label {
429
+ &:after {
430
+ background-color: getColor('disabled-fade');
431
+ }
474
432
  }
433
+ }
475
434
 
476
- &::after {
477
- position: absolute;
478
- display: none;
435
+ &:disabled {
436
+ & ~ label.#{$type}-label {
437
+ &:after {
438
+ background-color: transparent;
439
+ }
479
440
  }
441
+ }
480
442
  }
481
- }
443
+ }
482
444
 
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
- }
445
+ // SIMPLE WITH LABEL ONLY
446
+ .#{$type} {
447
+ display: flex;
448
+ align-items: center;
449
+ margin: 6px 8px;
450
+ width: fit-content;
505
451
 
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
- }
452
+ input:disabled,
453
+ input:disabled:checked {
454
+ & ~ label.#{$type}-label {
455
+ @include disabledRulesWithoutBG;
456
+ }
549
457
  }
550
458
 
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
- }
459
+ label.#{$type}-label {
460
+ padding: 4px;
461
+ padding-left: 34px;
568
462
 
569
- input:checked ~ label.#{$type}-label {
570
- font-weight: bold;
571
- }
463
+ &:before,
464
+ &:after {
465
+ top: 50%;
466
+ transform: translateY(-50%);
467
+ left: 0;
468
+ }
469
+ }
572
470
 
573
- input:not(:disabled) ~ label.#{$type}-label {
574
- &:hover {
575
- &:before {
576
- border-color: getColor('alternate');
577
- border-width: 2px;
578
- }
579
- }
471
+ &:hover &:not(disabled) {
472
+ label.#{$type}-label {
473
+ &:before {
474
+ @include hoverRules();
580
475
  }
476
+ }
581
477
  }
582
478
 
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;
479
+ &:focus {
480
+ border: 2px;
481
+ border-color: getColor('main');
482
+ }
483
+ }
592
484
 
593
- &:first-child {
594
- margin-left: 0;
485
+ //TILE ONLY
486
+ .#{$type}-tile {
487
+ position: relative;
488
+ max-width: 160px;
489
+ display: inline-block;
490
+ text-align: center;
491
+
492
+ input:disabled,
493
+ input:disabled:checked {
494
+ & ~ label.#{$type}-label {
495
+ @include disabledRules;
496
+ }
497
+ }
498
+
499
+ &:first-child {
500
+ margin-left: 0;
501
+ }
502
+
503
+ &:last-child {
504
+ margin-right: 0;
505
+ }
506
+
507
+ label.#{$type}-label {
508
+ display: block;
509
+ position: relative;
510
+ padding: 40px 16px 16px;
511
+ border: var(--border);
512
+ border-radius: var(--radius);
513
+ box-sizing: border-box;
514
+ background-color: getColor('background');
515
+
516
+ &:before {
517
+ top: 16px;
518
+ right: 16px;
519
+ }
520
+
521
+ span.#{$type}-title {
522
+ font-weight: bold;
523
+ width: 100%;
524
+ display: block;
525
+ font-size: 16px;
526
+ }
527
+ }
528
+
529
+ input {
530
+ &:not(:disabled):not(:checked) ~ label.radio-label {
531
+ @include label-states;
532
+ }
533
+
534
+ &:not(:disabled) ~ label.checkbox-label {
535
+ @include label-states;
536
+ }
537
+
538
+ &:checked:not(:disabled) ~ label.#{$type}-label {
539
+ border-color: getColor('main');
540
+ border-width: 2px;
541
+ padding: 15px;
542
+ padding-top: 39px;
543
+
544
+ &:before {
545
+ top: 15px;
546
+ right: 15px;
595
547
  }
596
548
 
597
- &:last-child {
598
- margin-right: 0;
549
+ span.#{$type}-title {
550
+ color: getColor('main');
599
551
  }
552
+ }
600
553
 
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
- }
554
+ &:disabled {
555
+ & ~ label.#{$type}-label {
556
+ &:before {
557
+ border-color: getColor('disabled') !important;
558
+ }
620
559
  }
560
+ }
621
561
 
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
- }
562
+ &:disabled:checked ~ label.#{$type}-label {
563
+ .checkbox-title {
564
+ color: getColor('disabled');
686
565
  }
566
+ }
567
+ }
568
+
569
+ &.is-horizontal {
570
+ display: flex;
571
+ justify-content: space-between;
572
+ align-items: center;
573
+ max-width: unset;
574
+ width: 100%;
575
+ position: relative;
576
+
577
+ &.is-narrow {
578
+ width: fit-content;
579
+ }
687
580
 
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 48px 16px 16px !important;
713
- }
714
- }
715
- }
716
- }
717
-
718
- label.#{$type}-label {
719
- width: 100%;
720
- display: flex;
721
- align-items: center;
722
- justify-content: flex-start;
723
- text-align: left;
724
- padding: 16px 48px 16px 16px;
725
-
726
- &:focus,
727
- &:active,
728
- &:hover {
729
- padding: 15px 48px 15px 15px !important;
730
- }
731
-
732
- &:before,
733
- &:after {
734
- top: 50% !important;
735
- transform: translateY(-50%);
736
- }
737
- }
738
-
739
- .icon {
740
- margin-right: 16px;
741
- }
581
+ input {
582
+ &:checked:not(:disabled) ~ label.#{$type}-label {
583
+ padding: 15px;
584
+ padding-right: 47px;
742
585
  }
586
+
587
+ }
588
+
589
+ label.#{$type}-label {
590
+ width: 100%;
591
+ display: flex;
592
+ align-items: center;
593
+ justify-content: flex-start;
594
+ text-align: left;
595
+ padding: 16px 48px 16px 16px;
596
+
597
+ &:before,
598
+ &:after {
599
+ top: 50% !important;
600
+ transform: translateY(-50%);
601
+ }
602
+ }
603
+
604
+ .icon {
605
+ margin-right: 16px;
606
+ }
743
607
  }
608
+ }
609
+ }
610
+
611
+ @mixin hoverRules {
612
+ background-color: getColor('main-fade');
613
+ }
614
+
615
+ @mixin hover {
616
+ &:hover:not(.is-disabled):not(:focus) {
617
+ @include hoverRules();
618
+ }
619
+ &:focus:not(.is-disabled), &:focus-visible:not(.is-disabled) {
620
+ border: 2px solid currentColor;
621
+ }
622
+ }
623
+
624
+ @mixin disabledRulesWithoutBG {
625
+ border-color: getColor('disabled') !important;
626
+ box-shadow: none !important;
627
+ color: getColor('disabled') !important;
628
+ cursor: not-allowed !important;
629
+ filter: grayscale(1);
630
+ }
631
+
632
+ @mixin disabledRules {
633
+ background-color: getColor('disabled-fade') !important;
634
+ @include disabledRulesWithoutBG;
744
635
  }