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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +47 -0
  2. package/dist/default/trilogy-mangled.css +1 -1
  3. package/dist/default/trilogy-partials.css +1 -1
  4. package/dist/default/trilogy.css +1 -1
  5. package/framework/src/base/_color.scss +14 -36
  6. package/framework/src/base/_generic.scss +4 -1
  7. package/framework/src/base/_helpers.scss +10 -29
  8. package/framework/src/base/_loading.scss +7 -0
  9. package/framework/src/components/_accordion.scss +10 -36
  10. package/framework/src/components/_all.scss +0 -3
  11. package/framework/src/components/_breadcrumb.scss +39 -34
  12. package/framework/src/components/_card.scss +6 -5
  13. package/framework/src/components/_countdown.scss +49 -47
  14. package/framework/src/components/_disclaimer.scss +6 -5
  15. package/framework/src/components/_divider.scss +2 -2
  16. package/framework/src/components/_dropdown.scss +95 -101
  17. package/framework/src/components/_fab.scss +6 -21
  18. package/framework/src/components/_media.scss +2 -2
  19. package/framework/src/components/_modal.scss +172 -166
  20. package/framework/src/components/_otp.scss +9 -28
  21. package/framework/src/components/_pagination.scss +109 -131
  22. package/framework/src/components/_plus-symbol.scss +1 -1
  23. package/framework/src/components/_popover.scss +1 -4
  24. package/framework/src/components/_price.scss +118 -169
  25. package/framework/src/components/_product-tour.scss +1 -3
  26. package/framework/src/components/_segmented-control.scss +39 -51
  27. package/framework/src/components/_slider.scss +70 -70
  28. package/framework/src/components/_stepper.scss +16 -140
  29. package/framework/src/components/_tabs.scss +32 -55
  30. package/framework/src/components/_timeline.scss +49 -42
  31. package/framework/src/elements/_alert.scss +4 -5
  32. package/framework/src/elements/_all.scss +0 -2
  33. package/framework/src/elements/_badge.scss +54 -59
  34. package/framework/src/elements/_box.scss +5 -23
  35. package/framework/src/elements/_button.scss +29 -129
  36. package/framework/src/elements/_checkbox.scss +21 -27
  37. package/framework/src/elements/_chips.scss +76 -81
  38. package/framework/src/elements/_entry.scss +73 -89
  39. package/framework/src/elements/_form.scss +15 -15
  40. package/framework/src/elements/_input-gauge.scss +36 -32
  41. package/framework/src/elements/_link.scss +47 -62
  42. package/framework/src/elements/_list.scss +0 -36
  43. package/framework/src/elements/_notification.scss +2 -3
  44. package/framework/src/elements/_other.scss +1 -1
  45. package/framework/src/elements/_paragraph.scss +4 -26
  46. package/framework/src/elements/_progress.scss +9 -18
  47. package/framework/src/elements/_radio.scss +1 -1
  48. package/framework/src/elements/_select.scss +209 -245
  49. package/framework/src/elements/_sticker.scss +8 -9
  50. package/framework/src/elements/_switch.scss +85 -88
  51. package/framework/src/elements/_table.scss +11 -72
  52. package/framework/src/elements/_tag.scss +104 -104
  53. package/framework/src/elements/_textarea.scss +92 -106
  54. package/framework/src/elements/_title.scss +86 -84
  55. package/framework/src/elements/_toaster.scss +2 -3
  56. package/framework/src/grid/_columns.scss +5 -5
  57. package/framework/src/layout/_hero.scss +129 -211
  58. package/framework/src/layout/_section.scss +3 -3
  59. package/framework/src/layout/_toolbar.scss +6 -6
  60. package/framework/src/utilities/_controls.scss +37 -39
  61. package/framework/src/utilities/_derived-variables.scss +3 -14
  62. package/framework/src/utilities/_initial-variables.scss +38 -23
  63. package/framework/src/utilities/_mixins.scss +522 -582
  64. package/package.json +4 -3
  65. package/framework/src/components/_menu.scss +0 -213
  66. package/framework/src/components/_search-modal.scss +0 -197
  67. package/framework/src/components/_slices.scss +0 -316
  68. package/framework/src/components/_switch.scss +0 -209
  69. package/framework/src/elements/_checkradio.scss +0 -173
  70. package/framework/src/elements/_options.scss +0 -146
  71. package/framework/src/elements/_timeline.scss +0 -283
  72. /package/dist/default/assets/icons/all/{all/alert.svg → alert.svg} +0 -0
  73. /package/dist/default/assets/icons/all/{all/arrow-down.svg → arrow-down.svg} +0 -0
  74. /package/dist/default/assets/icons/all/{all/arrow-left.svg → arrow-left.svg} +0 -0
  75. /package/dist/default/assets/icons/all/{all/arrow-right.svg → arrow-right.svg} +0 -0
  76. /package/dist/default/assets/icons/all/{all/arrow-up.svg → arrow-up.svg} +0 -0
  77. /package/dist/default/assets/icons/all/{all/bell.svg → bell.svg} +0 -0
  78. /package/dist/default/assets/icons/all/{all/check-circle.svg → check-circle.svg} +0 -0
  79. /package/dist/default/assets/icons/all/{all/check.svg → check.svg} +0 -0
  80. /package/dist/default/assets/icons/all/{all/exclamation-circle.svg → exclamation-circle.svg} +0 -0
  81. /package/dist/default/assets/icons/all/{all/eye-slash.svg → eye-slash.svg} +0 -0
  82. /package/dist/default/assets/icons/all/{all/eye.svg → eye.svg} +0 -0
  83. /package/dist/default/assets/icons/all/{all/infos-circle.svg → infos-circle.svg} +0 -0
  84. /package/dist/default/assets/icons/all/{all/search.svg → search.svg} +0 -0
  85. /package/dist/default/assets/icons/all/{all/times.svg → times.svg} +0 -0
  86. /package/dist/default/assets/icons/all/{all/trash.svg → trash.svg} +0 -0
@@ -2,744 +2,684 @@
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: $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
+ }
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;
164
163
  }
165
164
 
166
165
  @mixin overlay($offset: 0) {
167
- position: absolute;
168
- top: $offset;
169
- bottom: $offset;
170
- left: $offset;
171
- right: $offset;
166
+ position: absolute;
167
+ top: $offset;
168
+ bottom: $offset;
169
+ left: $offset;
170
+ right: $offset;
172
171
  }
173
172
 
174
173
  @mixin placeholder {
175
- $placeholders: ':-moz' ':-webkit-input' '-moz' '-ms-input';
174
+ $placeholders: ':-moz' ':-webkit-input' '-moz' '-ms-input';
176
175
 
177
- @each $placeholder in $placeholders {
178
- &:#{$placeholder}-placeholder {
179
- @content;
180
- }
176
+ @each $placeholder in $placeholders {
177
+ &:#{$placeholder}-placeholder {
178
+ @content;
181
179
  }
180
+ }
182
181
  }
183
182
 
184
183
  @mixin unselectable {
185
- @extend %unselectable;
184
+ @extend %unselectable;
186
185
  }
187
186
 
188
187
  @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;
188
+ font-family: trilogy-all;
189
+ font-style: normal;
190
+ font-weight: normal;
191
+ display: inline-block;
192
+ text-decoration: inherit;
193
+ margin-right: 0.2em;
194
+ text-align: center;
196
195
 
197
- /* For safety - reset parent styles, that can break glyph codes*/
198
- font-variant: normal;
199
- text-transform: none;
196
+ /* For safety - reset parent styles, that can break glyph codes*/
197
+ font-variant: normal;
198
+ text-transform: none;
200
199
 
201
- /* fix buttons height, for twitter bootstrap */
202
- line-height: 1em;
200
+ /* fix buttons height, for twitter bootstrap */
201
+ line-height: 1em;
203
202
 
204
- /* remove if not needed */
205
- margin-left: 0.2em;
203
+ /* remove if not needed */
204
+ margin-left: 0.2em;
206
205
 
207
- /* Font smoothing. That was taken from TWBS */
208
- -webkit-font-smoothing: antialiased;
209
- -moz-osx-font-smoothing: grayscale;
206
+ /* Font smoothing. That was taken from TWBS */
207
+ -webkit-font-smoothing: antialiased;
208
+ -moz-osx-font-smoothing: grayscale;
210
209
  }
211
210
 
212
211
  // Responsiveness
213
212
  @mixin from($device) {
214
- @media screen and (min-width: $device) {
215
- @content;
216
- }
213
+ @media screen and (min-width: $device) {
214
+ @content;
215
+ }
217
216
  }
218
217
 
219
218
  @mixin until($device) {
220
- @media screen and (max-width: $device - 1px) {
221
- @content;
222
- }
219
+ @media screen and (max-width: $device - 1px) {
220
+ @content;
221
+ }
223
222
  }
224
223
 
225
224
  @mixin mobile {
226
- @media screen and (max-width: $tablet - 1px) {
227
- @content;
228
- }
225
+ @media screen and (max-width: $tablet - 1px) {
226
+ @content;
227
+ }
229
228
  }
230
229
 
231
230
  @mixin tablet {
232
- @media screen and (min-width: $tablet), print {
233
- @content;
234
- }
231
+ @media screen and (min-width: $tablet), print {
232
+ @content;
233
+ }
235
234
  }
236
235
 
237
236
  @mixin tablet-only {
238
- @media screen and (min-width: $tablet) and (max-width: $desktop - 1px) {
239
- @content;
240
- }
237
+ @media screen and (min-width: $tablet) and (max-width: $desktop - 1px) {
238
+ @content;
239
+ }
241
240
  }
242
241
 
243
242
  @mixin touch {
244
- @media screen and (max-width: $desktop - 1px) {
245
- @content;
246
- }
243
+ @media screen and (max-width: $desktop - 1px) {
244
+ @content;
245
+ }
247
246
  }
248
247
 
249
248
  @mixin desktop {
250
- @media screen and (min-width: $desktop) {
251
- @content;
252
- }
249
+ @media screen and (min-width: $desktop) {
250
+ @content;
251
+ }
253
252
  }
254
253
 
255
254
  @mixin desktop-only {
256
- @media screen and (min-width: $desktop) and (max-width: $widescreen - 1px) {
257
- @content;
258
- }
255
+ @media screen and (min-width: $desktop) and (max-width: $widescreen - 1px) {
256
+ @content;
257
+ }
259
258
  }
260
259
 
261
260
  @mixin until-widescreen {
262
- @media screen and (max-width: $widescreen - 1px) {
263
- @content;
264
- }
261
+ @media screen and (max-width: $widescreen - 1px) {
262
+ @content;
263
+ }
265
264
  }
266
265
 
267
266
  @mixin widescreen {
268
- @media screen and (min-width: $widescreen) {
269
- @content;
270
- }
267
+ @media screen and (min-width: $widescreen) {
268
+ @content;
269
+ }
271
270
  }
272
271
 
273
272
  @mixin widescreen-only {
274
- @media screen and (min-width: $widescreen) and (max-width: $fullhd - 1px) {
275
- @content;
276
- }
273
+ @media screen and (min-width: $widescreen) and (max-width: $fullhd - 1px) {
274
+ @content;
275
+ }
277
276
  }
278
277
 
279
278
  @mixin until-fullhd {
280
- @media screen and (max-width: $fullhd - 1px) {
281
- @content;
282
- }
279
+ @media screen and (max-width: $fullhd - 1px) {
280
+ @content;
281
+ }
283
282
  }
284
283
 
285
284
  @mixin fullhd {
286
- @media screen and (min-width: $fullhd) {
287
- @content;
288
- }
285
+ @media screen and (min-width: $fullhd) {
286
+ @content;
287
+ }
289
288
  }
290
289
 
291
290
  @mixin all-desktop-only {
292
- @media screen and (min-width: $desktop) and (max-width: $fullhd - 1px) {
293
- @content;
294
- }
291
+ @media screen and (min-width: $desktop) and (max-width: $fullhd - 1px) {
292
+ @content;
293
+ }
295
294
  }
296
295
 
297
296
  @mixin hamburger($hamburger-dimensions) {
298
- cursor: pointer;
297
+ cursor: pointer;
298
+ display: block;
299
+ height: $hamburger-dimensions;
300
+ position: relative;
301
+ width: $hamburger-dimensions;
302
+
303
+ span {
304
+ background-color: currentColor;
299
305
  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
- }
306
+ height: 1px;
307
+ left: 50%;
308
+ margin-left: -7px;
309
+ position: absolute;
310
+ top: 50%;
311
+ transition: none $speed $easing;
312
+ transition-property: background, left, opacity, transform;
313
+ width: 15px;
319
314
 
320
- &:nth-child(2) {
321
- margin-top: -1px;
322
- }
315
+ &:nth-child(1) {
316
+ margin-top: -6px;
317
+ }
323
318
 
324
- &:nth-child(3) {
325
- margin-top: 4px;
326
- }
319
+ &:nth-child(2) {
320
+ margin-top: -1px;
327
321
  }
328
322
 
329
- &:hover {
330
- background-color: rgba(black, 0.05);
323
+ &:nth-child(3) {
324
+ margin-top: 4px;
331
325
  }
326
+ }
332
327
 
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
- }
328
+ &:hover {
329
+ background-color: rgba(black, 0.05);
330
+ }
331
+
332
+ // Modifers
333
+ &.is-active {
334
+ span {
335
+ &:nth-child(1) {
336
+ margin-left: -5px;
337
+ transform: rotate(45deg);
338
+ transform-origin: left top;
339
+ }
340
+
341
+ &:nth-child(2) {
342
+ opacity: 0;
343
+ }
344
+
345
+ &:nth-child(3) {
346
+ margin-left: -5px;
347
+ transform: rotate(-45deg);
348
+ transform-origin: left bottom;
349
+ }
352
350
  }
351
+ }
353
352
  }
354
353
 
355
354
  @mixin ellipsis() {
356
- white-space: nowrap;
357
- overflow-x: hidden;
358
- text-overflow: ellipsis;
355
+ white-space: nowrap;
356
+ overflow-x: hidden;
357
+ text-overflow: ellipsis;
359
358
  }
360
359
 
361
360
  @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
- }
361
+ a,
362
+ span,
363
+ p,
364
+ i,
365
+ strong,
366
+ h1,
367
+ h2,
368
+ h3,
369
+ h4,
370
+ h5,
371
+ label,
372
+ h6 {
373
+ @content;
374
+ }
376
375
  }
377
376
 
378
377
  @mixin heading-tags() {
379
- h1,
380
- h2,
381
- h3,
382
- h4,
383
- h5,
384
- h6 {
385
- @content;
386
- }
378
+ h1,
379
+ h2,
380
+ h3,
381
+ h4,
382
+ h5,
383
+ h6 {
384
+ @content;
385
+ }
387
386
  }
388
387
 
389
388
  @mixin apply-shadow-box {
390
- box-shadow: $shadow;
389
+ box-shadow: $shadow;
391
390
  }
392
391
 
393
392
  @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
- }
393
+ @each $name, $pair in $colors-brand-funcionnal {
394
+ $color: getColor($name);
395
+ $brandName: getColorBrandName($name);
396
+ &.is-#{$brandName} {
397
+ #{$property}: $color;
400
398
  }
399
+ }
401
400
  }
402
401
 
403
402
  @mixin pattern-light($size, $x-pos: top, $y-pos: center) {
404
- background-size: $size;
405
- background-position: $x-pos $y-pos;
403
+ background-size: $size;
404
+ background-position: $x-pos $y-pos;
406
405
  }
407
406
 
408
407
  @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;
408
+ background: linear-gradient(#1b3650, getColor('alternate'));
409
+ background-size: auto, $size, auto;
410
+ background-position: top left, $x-pos $y-pos, top left;
412
411
  }
413
412
 
414
413
  // import sass bulma
415
414
  @mixin input {
416
- @include control;
417
- height: 56px;
418
- background-color: #fff;
419
- border-color: getColor('grey');
420
- color: getColor('font');
415
+ @include control;
416
+ height: 56px;
417
+ background-color: getColor('background');
418
+ border-color: getBGColor('font');
419
+ color: getColor('font');
421
420
 
422
- @include placeholder {
423
- color: getColor('grey') !important;
424
- opacity: 1 !important;
425
- transition: all 0.2s ease-out;
426
- }
421
+ @include placeholder {
422
+ color: getColor('neutral') !important;
423
+ opacity: 1 !important;
424
+ transition: all 0.2s ease-out;
425
+ }
427
426
 
428
- &:hover,
429
- &.is-hovered,
430
- &:focus,
431
- &.is-focused {
432
- outline: 1px auto getVariantColor('alternate', 1);
433
- }
427
+ @include hover();
428
+ }
429
+
430
+ @mixin checkbox-and-radio($type) {
431
+ //BOTH
432
+ .#{$type},
433
+ .#{$type}-tile {
434
+ position: relative;
435
+
436
+ label.#{$type}-label {
437
+ cursor: pointer;
438
+ font-size: 14px;
434
439
 
435
- &[disabled] {
436
- background-color: getColor('grey-disabled');
437
- border-color: getColor('grey-disabled');
438
- color: getColor('grey');
440
+ &:before,
441
+ &:after {
442
+ content: '';
443
+ position: absolute;
444
+ width: 18px;
445
+ height: 18px;
446
+ }
447
+
448
+ &:before {
449
+ border: 1px solid getBGColor('font');
450
+ }
439
451
  }
440
- }
441
452
 
442
- @mixin checkradio {
443
- outline: 0;
444
- user-select: none;
445
- display: inline-block;
446
- vertical-align: baseline;
447
- position: absolute;
448
- opacity: 0;
453
+ input {
454
+ display: none;
449
455
 
450
- + label {
451
- cursor: pointer;
452
- position: relative;
453
- display: flex;
454
- align-items: center;
456
+ &:checked ~ label.#{$type}-label {
457
+ border-color: getColor('main');
455
458
 
456
- &:hover {
457
- &::before {
458
- animation-duration: 0.4s;
459
- animation-fill-mode: both;
460
- animation-name: hover-color;
461
- }
459
+ &:before {
460
+ border-color: getColor('main');
462
461
  }
463
462
 
464
- &::before,
465
- &::after {
466
- content: '';
463
+ &:after {
464
+ background-color: getColor('main');
467
465
  }
468
-
469
- &::before {
470
- border: 1px solid getColor('grey');
471
- margin: 0 10px 0 0;
472
- min-width: 16px;
473
- min-height: 16px;
466
+ }
467
+
468
+ &:disabled,
469
+ &:disabled:checked {
470
+ & ~ label.#{$type}-label {
471
+ &:after {
472
+ background-color: getBGColor('disabled');
473
+ }
474
474
  }
475
+ }
475
476
 
476
- &::after {
477
- position: absolute;
478
- display: none;
477
+ &:disabled {
478
+ & ~ label.#{$type}-label {
479
+ &:after {
480
+ background-color: transparent;
481
+ }
479
482
  }
483
+ }
480
484
  }
481
- }
485
+ }
482
486
 
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
- }
487
+ // SIMPLE WITH LABEL ONLY
488
+ .#{$type} {
489
+ display: flex;
490
+ align-items: center;
491
+ margin: 6px 8px;
505
492
 
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
- }
493
+ input:disabled,
494
+ input:disabled:checked {
495
+ & ~ label.#{$type}-label {
496
+ @include disabledRulesWithoutBG;
497
+ }
549
498
  }
550
499
 
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
- }
500
+ label.#{$type}-label {
501
+ padding: 4px;
502
+ padding-left: 34px;
568
503
 
569
- input:checked ~ label.#{$type}-label {
570
- font-weight: bold;
571
- }
504
+ &:before,
505
+ &:after {
506
+ top: 50%;
507
+ transform: translateY(-50%);
508
+ left: 0;
509
+ }
510
+ }
572
511
 
573
- input:not(:disabled) ~ label.#{$type}-label {
574
- &:hover {
575
- &:before {
576
- border-color: getColor('alternate');
577
- border-width: 2px;
578
- }
579
- }
512
+ input:checked ~ label.#{$type}-label {
513
+ font-weight: bold;
514
+ }
515
+
516
+ &:hover {
517
+ label.#{$type}-label {
518
+ &:before {
519
+ @include hoverRules();
580
520
  }
521
+ }
581
522
  }
582
523
 
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;
524
+ &:focus {
525
+ border: 2px;
526
+ border-color: getColor('main');
527
+ }
528
+ }
529
+
530
+ //TILE ONLY
531
+ .#{$type}-tile {
532
+ position: relative;
533
+ max-width: 160px;
534
+ display: inline-block;
535
+ margin: 0;
536
+ margin-right: 16px;
537
+ margin-top: 16px;
538
+ text-align: center;
539
+
540
+ input:disabled,
541
+ input:disabled:checked {
542
+ & ~ label.#{$type}-label {
543
+ @include disabledRules;
544
+ }
545
+ }
546
+
547
+ &:first-child {
548
+ margin-left: 0;
549
+ }
550
+
551
+ &:last-child {
552
+ margin-right: 0;
553
+ }
554
+
555
+ label.#{$type}-label {
556
+ display: block;
557
+ position: relative;
558
+ padding: 40px 16px 16px;
559
+ border: 1px solid getBGColor('font');
560
+ border-radius: 8px;
561
+ box-sizing: border-box;
562
+
563
+ &:before {
564
+ top: 16px;
565
+ right: 16px;
566
+ }
567
+
568
+ span.#{$type}-title {
569
+ font-weight: bold;
570
+ width: 100%;
571
+ display: block;
572
+ font-size: 16px;
573
+ }
574
+ }
575
+
576
+ input {
577
+ &:not(:disabled) ~ label.#{$type}-label {
578
+ &:focus,
579
+ &:active,
580
+ &:hover {
581
+ @include hover();
582
+ }
583
+ }
584
+
585
+ &:checked:not(:disabled) ~ label.#{$type}-label {
586
+ border-color: getColor('main');
587
+ border-width: 2px;
588
+ padding: 15px;
589
+ padding-top: 39px;
592
590
 
593
- &:first-child {
594
- margin-left: 0;
591
+ &:before {
592
+ top: 15px;
593
+ right: 15px;
595
594
  }
596
595
 
597
- &:last-child {
598
- margin-right: 0;
596
+ span.#{$type}-title {
597
+ color: getColor('main');
599
598
  }
599
+ }
600
600
 
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
- }
601
+ &:disabled {
602
+ & ~ label.#{$type}-label {
603
+ &:before {
604
+ border-color: getColor('disabled') !important;
605
+ }
620
606
  }
607
+ }
621
608
 
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
- }
609
+ &:disabled:checked ~ label.#{$type}-label {
610
+ .checkbox-title {
611
+ color: getColor('disabled');
686
612
  }
613
+ }
614
+ }
615
+
616
+ &.is-horizontal {
617
+ display: flex;
618
+ justify-content: space-between;
619
+ align-items: center;
620
+ max-width: unset;
621
+ width: auto;
622
+ margin: 16px 0;
623
+ position: relative;
624
+
625
+ &.is-narrow {
626
+ width: fit-content;
627
+ }
628
+
629
+ input {
630
+ &:checked:not(:disabled) ~ label.#{$type}-label {
631
+ padding: 15px;
632
+ padding-right: 47px;
633
+ }
634
+
635
+ }
687
636
 
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
- }
637
+ label.#{$type}-label {
638
+ width: 100%;
639
+ display: flex;
640
+ align-items: center;
641
+ justify-content: flex-start;
642
+ text-align: left;
643
+ padding: 16px 48px 16px 16px;
644
+
645
+ &:before,
646
+ &:after {
647
+ top: 50% !important;
648
+ transform: translateY(-50%);
743
649
  }
650
+ }
651
+
652
+ .icon {
653
+ margin-right: 16px;
654
+ }
744
655
  }
656
+ }
657
+ }
658
+
659
+ @mixin hoverRules {
660
+ background-color: var(--color-bg-hovered);
661
+ }
662
+
663
+ @mixin hover {
664
+ &:hover:not(.is-disabled) {
665
+ @include hoverRules();
666
+ }
667
+ &:focus:not(.is-disabled), &:focus-visible:not(.is-disabled) {
668
+ @include hoverRules();
669
+ border: 1px solid currentColor;
670
+ }
671
+ }
672
+
673
+
674
+ @mixin disabledRulesWithoutBG {
675
+ border-color: transparent !important;
676
+ box-shadow: none !important;
677
+ color: getColor('disabled') !important;
678
+ cursor: not-allowed !important;
679
+ filter: grayscale(1);
680
+ }
681
+
682
+ @mixin disabledRules {
683
+ background-color: getBGColor('disabled') !important;
684
+ @include disabledRulesWithoutBG;
745
685
  }