@dodlhuat/basix 1.4.2 → 1.5.0

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 (121) hide show
  1. package/README.md +55 -9
  2. package/css/alert.scss +9 -9
  3. package/css/badge.scss +5 -25
  4. package/css/bottom-sheet.scss +2 -6
  5. package/css/breadcrumb.scss +18 -9
  6. package/css/calendar.scss +19 -29
  7. package/css/carousel.scss +3 -3
  8. package/css/chart.scss +1 -6
  9. package/css/checkbox.scss +1 -1
  10. package/css/chips.scss +13 -23
  11. package/css/code-viewer.scss +2 -2
  12. package/css/color-picker.scss +3 -5
  13. package/css/context-menu.scss +3 -8
  14. package/css/datepicker.scss +84 -71
  15. package/css/defaults.scss +25 -0
  16. package/css/docs.scss +6 -6
  17. package/css/dropdown.scss +3 -8
  18. package/css/editor.scss +15 -18
  19. package/css/file-uploader.scss +6 -17
  20. package/css/flyout-menu.scss +5 -1
  21. package/css/form.scss +43 -57
  22. package/css/gallery.scss +15 -0
  23. package/css/group-picker.scss +28 -17
  24. package/css/icons.scss +7 -327
  25. package/css/lightbox.scss +7 -7
  26. package/css/mixins.scss +77 -0
  27. package/css/modal.scss +4 -8
  28. package/css/parameters.scss +8 -2
  29. package/css/placeholder.scss +2 -17
  30. package/css/popover.scss +2 -7
  31. package/css/properties.scss +0 -5
  32. package/css/push-menu.scss +1 -1
  33. package/css/range-slider.scss +7 -6
  34. package/css/stepper.scss +4 -3
  35. package/css/style.css +279 -554
  36. package/css/style.css.map +1 -1
  37. package/css/style.min.css +1 -1
  38. package/css/style.min.css.map +1 -1
  39. package/css/tabs.scss +3 -7
  40. package/css/timepicker.scss +3 -3
  41. package/css/tooltip.scss +1 -1
  42. package/css/typography.scss +3 -3
  43. package/css/virtual-dropdown.scss +12 -27
  44. package/js/bottom-sheet.d.ts +5 -5
  45. package/js/bottom-sheet.js +41 -58
  46. package/js/calendar.d.ts +1 -2
  47. package/js/calendar.js +77 -84
  48. package/js/carousel.d.ts +2 -1
  49. package/js/carousel.js +25 -16
  50. package/js/chart.d.ts +1 -1
  51. package/js/chart.js +104 -65
  52. package/js/code-viewer.d.ts +1 -1
  53. package/js/code-viewer.js +7 -18
  54. package/js/color-picker.d.ts +2 -2
  55. package/js/color-picker.js +20 -22
  56. package/js/context-menu.d.ts +1 -1
  57. package/js/context-menu.js +10 -12
  58. package/js/datepicker.d.ts +14 -3
  59. package/js/datepicker.js +180 -99
  60. package/js/docs-nav.js +1 -1
  61. package/js/dropdown.d.ts +1 -1
  62. package/js/dropdown.js +4 -5
  63. package/js/editor.d.ts +1 -1
  64. package/js/editor.js +30 -34
  65. package/js/file-uploader.d.ts +2 -9
  66. package/js/file-uploader.js +57 -86
  67. package/js/flyout-menu.d.ts +3 -3
  68. package/js/flyout-menu.js +20 -22
  69. package/js/gallery.d.ts +6 -2
  70. package/js/gallery.js +49 -20
  71. package/js/group-picker.d.ts +2 -1
  72. package/js/group-picker.js +30 -34
  73. package/js/lightbox.d.ts +5 -3
  74. package/js/lightbox.js +36 -31
  75. package/js/listeners.d.ts +7 -0
  76. package/js/listeners.js +14 -0
  77. package/js/modal.d.ts +4 -1
  78. package/js/modal.js +17 -22
  79. package/js/popover.d.ts +2 -2
  80. package/js/popover.js +42 -37
  81. package/js/position.js +3 -5
  82. package/js/push-menu.d.ts +8 -2
  83. package/js/push-menu.js +34 -23
  84. package/js/range-slider.d.ts +2 -2
  85. package/js/range-slider.js +7 -6
  86. package/js/scroll.js +4 -7
  87. package/js/scrollbar.d.ts +3 -3
  88. package/js/scrollbar.js +39 -42
  89. package/js/select.d.ts +1 -1
  90. package/js/select.js +20 -24
  91. package/js/sidebar-nav.d.ts +2 -1
  92. package/js/sidebar-nav.js +15 -10
  93. package/js/stepper.d.ts +1 -1
  94. package/js/stepper.js +9 -11
  95. package/js/table.d.ts +1 -1
  96. package/js/table.js +24 -23
  97. package/js/tabs.d.ts +1 -1
  98. package/js/tabs.js +10 -17
  99. package/js/theme.d.ts +1 -0
  100. package/js/theme.js +6 -15
  101. package/js/timepicker.d.ts +8 -6
  102. package/js/timepicker.js +36 -36
  103. package/js/toast.d.ts +4 -1
  104. package/js/toast.js +13 -5
  105. package/js/tooltip.d.ts +1 -4
  106. package/js/tooltip.js +14 -23
  107. package/js/tree.d.ts +0 -1
  108. package/js/tree.js +6 -11
  109. package/js/utils.js +7 -8
  110. package/js/virtual-dropdown.d.ts +1 -1
  111. package/js/virtual-dropdown.js +26 -28
  112. package/package.json +2 -1
  113. package/svg-icons/chevron_right.svg +1 -0
  114. package/svg-icons/keyboard_arrow_down.svg +1 -0
  115. package/css/calendar.css +0 -928
  116. package/css/guitar-chords.css +0 -251
  117. package/fonts/MaterialSymbolsOutlined.woff2 +0 -0
  118. package/js/form-builder.js +0 -107
  119. package/js/guitar-chords.js +0 -268
  120. package/js/lazy-loader.js +0 -121
  121. package/js/request.js +0 -51
package/css/icons.scss CHANGED
@@ -1,328 +1,8 @@
1
- @font-face {
2
- font-family: "Material Symbols Outlined 24pt";
3
- src: url("../fonts/MaterialSymbolsOutlined.woff2") format("woff2");
1
+ .icon-svg {
2
+ display: inline-block;
3
+ width: 24px;
4
+ height: 24px;
5
+ fill: currentColor;
6
+ flex-shrink: 0;
7
+ vertical-align: middle;
4
8
  }
5
-
6
- .icon {
7
- font-family: "Material Symbols Outlined 24pt", serif;
8
- font-style: normal;
9
- font-weight: normal;
10
- font-variant: normal;
11
- text-transform: none;
12
- line-height: 1;
13
- font-size: 24px;
14
- -webkit-font-smoothing: antialiased;
15
- -moz-osx-font-smoothing: grayscale;
16
- }
17
-
18
- .icon-delete::before {
19
- content: "\e872";
20
- }
21
-
22
- .icon-search::before {
23
- content: "\e8b6";
24
- }
25
-
26
- .icon-splitscreen_vertical_add::before {
27
- content: "\f4fc";
28
- }
29
-
30
- .icon-splitscreen_add::before {
31
- content: "\f4fd";
32
- }
33
-
34
- .icon-push_pin::before {
35
- content: "\f10d";
36
- }
37
-
38
- .icon-block::before {
39
- content: "\e033";
40
- }
41
-
42
- .icon-check_circle::before {
43
- content: "\e86c";
44
- }
45
-
46
- .icon-stars::before {
47
- content: "\e8d0";
48
- }
49
-
50
- .icon-support::before {
51
- content: "\ef73";
52
- }
53
-
54
- .icon-refresh::before {
55
- content: "\e5d5";
56
- }
57
-
58
- .icon-sync::before {
59
- content: "\e627";
60
- }
61
-
62
- .icon-language::before {
63
- content: "\e894";
64
- }
65
-
66
- .icon-article::before {
67
- content: "\ef42";
68
- }
69
-
70
- .icon-list_alt::before {
71
- content: "\e0ee";
72
- }
73
-
74
- .icon-add_box::before {
75
- content: "\e146";
76
- }
77
-
78
- .icon-disabled_by_default::before {
79
- content: "\f230";
80
- }
81
-
82
- .icon-help_center::before {
83
- content: "\f1c0";
84
- }
85
-
86
- .icon-pages::before {
87
- content: "\e7f9";
88
- }
89
-
90
- .icon-add_photo_alternate::before {
91
- content: "\e43e";
92
- }
93
-
94
- .icon-calendar_today::before {
95
- content: "\e935";
96
- }
97
-
98
- .icon-assignment_turned_in::before {
99
- content: "\e862";
100
- }
101
-
102
- .icon-finance::before {
103
- content: "\e6bf";
104
- }
105
-
106
- .icon-save::before {
107
- content: "\e161";
108
- }
109
-
110
- .icon-folder::before {
111
- content: "\e2c7";
112
- }
113
-
114
- .icon-folder_off::before {
115
- content: "\eb83";
116
- }
117
-
118
- .icon-folder_open::before {
119
- content: "\e2c8";
120
- }
121
-
122
- .icon-mail::before {
123
- content: "\e0be";
124
- }
125
-
126
- .icon-attach_file::before {
127
- content: "\e226";
128
- }
129
-
130
- .icon-chat_bubble::before {
131
- content: "\e0ca";
132
- }
133
-
134
- .icon-cases::before {
135
- content: "\e992";
136
- }
137
-
138
- .icon-send::before {
139
- content: "\e163";
140
- }
141
-
142
- .icon-bookmark::before {
143
- content: "\e866";
144
- }
145
-
146
- .icon-label::before {
147
- content: "\e892";
148
- }
149
-
150
- .icon-filter_alt::before {
151
- content: "\ef4f";
152
- }
153
-
154
- .icon-filter_alt_off::before {
155
- content: "\eb32";
156
- }
157
-
158
- .icon-notifications_active::before {
159
- content: "\e7f7";
160
- }
161
-
162
- .icon-more_horiz::before {
163
- content: "\e5d3";
164
- }
165
-
166
- .icon-more_vert::before {
167
- content: "\e5d4";
168
- }
169
-
170
- .icon-navigate_before::before {
171
- content: "\e408";
172
- }
173
-
174
- .icon-navigate_next::before {
175
- content: "\e409";
176
- }
177
-
178
- .icon-keyboard_double_arrow_left::before {
179
- content: "\eac3";
180
- }
181
-
182
- .icon-keyboard_double_arrow_right::before {
183
- content: "\eac9";
184
- }
185
-
186
- .icon-first_page::before {
187
- content: "\e5dc";
188
- }
189
-
190
- .icon-last_page::before {
191
- content: "\e5dd";
192
- }
193
-
194
- .icon-expand_less::before {
195
- content: "\e5ce";
196
- }
197
-
198
- .icon-expand_more::before {
199
- content: "\e5cf";
200
- }
201
-
202
- .icon-zoom_in_map::before {
203
- content: "\eb2d";
204
- }
205
-
206
- .icon-zoom_out_map::before {
207
- content: "\e56b";
208
- }
209
-
210
- .icon-drag_pan::before {
211
- content: "\f71e";
212
- }
213
-
214
- .icon-format_list_bulleted::before {
215
- content: "\e241";
216
- }
217
-
218
- .icon-format_list_numbered::before {
219
- content: "\e242";
220
- }
221
-
222
- .icon-check::before {
223
- content: "\e5ca";
224
- }
225
-
226
- .icon-remove::before {
227
- content: "\e15b";
228
- }
229
-
230
- .icon-add::before {
231
- content: "\e145";
232
- }
233
-
234
- .icon-close::before {
235
- content: "\e14c";
236
- }
237
-
238
- .icon-format_bold::before {
239
- content: "\e238";
240
- }
241
-
242
- .icon-format_italic::before {
243
- content: "\e23f";
244
- }
245
-
246
- .icon-format_underlined::before {
247
- content: "\e249";
248
- }
249
-
250
- .icon-home::before {
251
- content: "\e88a";
252
- }
253
-
254
- .icon-favorite::before {
255
- content: "\e87d";
256
- }
257
-
258
- .icon-edit::before {
259
- content: "\e150";
260
- }
261
-
262
- .icon-layers::before {
263
- content: "\e53b";
264
- }
265
-
266
- .icon-cloud::before {
267
- content: "\e2bd";
268
- }
269
-
270
- .icon-print::before {
271
- content: "\e555";
272
- }
273
-
274
- .icon-share::before {
275
- content: "\e80d";
276
- }
277
-
278
- .icon-tune::before {
279
- content: "\e429";
280
- }
281
-
282
- .icon-power_settings_new::before {
283
- content: "\e8ac";
284
- }
285
-
286
- .icon-timeline::before {
287
- content: "\e922";
288
- }
289
-
290
- .icon-bar_chart::before {
291
- content: "\e26b";
292
- }
293
-
294
- .icon-bar_chart_4_bars::before {
295
- content: "\f681";
296
- }
297
-
298
- .icon-finance_mode::before {
299
- content: "\ef92";
300
- }
301
-
302
- .icon-database::before {
303
- content: "\f20e";
304
- }
305
-
306
- .icon-settings::before {
307
- content: "\e8b8";
308
- }
309
-
310
- .icon-person::before {
311
- content: "\e7fd";
312
- }
313
-
314
- .icon-menu_open::before {
315
- content: "\e7ad";
316
- }
317
-
318
- .icon-menu::before {
319
- content: "\e7ac";
320
- }
321
-
322
- .icon-light::before {
323
- content: "\e81a";
324
- }
325
-
326
- .icon-dark::before {
327
- content: "\ef44";
328
- }
package/css/lightbox.scss CHANGED
@@ -59,9 +59,9 @@
59
59
  transition: background 0.2s ease, color 0.2s ease, opacity 0.3s ease;
60
60
  -webkit-tap-highlight-color: transparent;
61
61
 
62
- .icon {
63
- font-size: 1.25rem;
64
- line-height: 1;
62
+ .icon-svg {
63
+ width: 1.25rem;
64
+ height: 1.25rem;
65
65
  }
66
66
 
67
67
  &:hover {
@@ -219,9 +219,9 @@
219
219
  transform 0.2s ease;
220
220
  -webkit-tap-highlight-color: transparent;
221
221
 
222
- .icon {
223
- font-size: 1.5rem;
224
- line-height: 1;
222
+ .icon-svg {
223
+ width: 1.5rem;
224
+ height: 1.5rem;
225
225
  }
226
226
 
227
227
  &:hover {
@@ -247,7 +247,7 @@
247
247
  width: 2rem;
248
248
  height: 2rem;
249
249
 
250
- .icon { font-size: 1.25rem; }
250
+ .icon-svg { width: 1.25rem; height: 1.25rem; }
251
251
  }
252
252
 
253
253
  .lightbox-prev { left: calc($spacing * 0.5); }
package/css/mixins.scss CHANGED
@@ -1,3 +1,5 @@
1
+ @use "parameters" as *;
2
+
1
3
  @mixin focus-ring($offset: 2px) {
2
4
  outline: 2px solid var(--accent-color);
3
5
  outline-offset: $offset;
@@ -6,3 +8,78 @@
6
8
  @mixin focus-glow($tint: 35%, $size: 3px, $color: var(--accent-color)) {
7
9
  box-shadow: 0 0 0 #{$size} color-mix(in srgb, #{$color} #{$tint}, transparent);
8
10
  }
11
+
12
+ @mixin field-shadow-rest() {
13
+ box-shadow:
14
+ inset 0 1.5px 4px rgba(0, 0, 0, 0.05),
15
+ 0 1px 2px rgba(0, 0, 0, 0.04);
16
+ }
17
+
18
+ @mixin field-shadow-hover() {
19
+ box-shadow:
20
+ inset 0 1.5px 4px rgba(0, 0, 0, 0.045),
21
+ 0 2px 8px rgba(0, 0, 0, 0.07);
22
+ }
23
+
24
+ @mixin field-shadow-focus($color: var(--accent-color), $ambient: true) {
25
+ @if $ambient {
26
+ box-shadow:
27
+ inset 0 1px 3px rgba(0, 0, 0, 0.03),
28
+ 0 0 0 3.5px color-mix(in srgb, #{$color} 13%, transparent),
29
+ 0 2px 12px rgba(0, 0, 0, 0.06);
30
+ } @else {
31
+ box-shadow:
32
+ inset 0 1px 3px rgba(0, 0, 0, 0.03),
33
+ 0 0 0 3.5px color-mix(in srgb, #{$color} 13%, transparent);
34
+ }
35
+ }
36
+
37
+ // Shared shell for floating panels (dropdowns, menus, popovers): background,
38
+ // border and elevation. Radius stays per-caller since components intentionally
39
+ // vary there.
40
+ @mixin float-panel($radius: $radius-panel) {
41
+ background: var(--background);
42
+ border: 1px solid var(--divider);
43
+ border-radius: $radius;
44
+ box-shadow:
45
+ 0 8px 32px rgba(0, 0, 0, 0.11),
46
+ 0 2px 8px rgba(0, 0, 0, 0.06);
47
+ }
48
+
49
+ @mixin hide-scrollbar {
50
+ scrollbar-width: none;
51
+
52
+ &::-webkit-scrollbar {
53
+ display: none;
54
+ }
55
+ }
56
+
57
+ // Tinted "tag" look shared by badges and chips: a translucent tint of $color
58
+ // over the background, plus a matching tinted border.
59
+ @mixin tinted-tag($color, $bg-tint: $tint-medium, $border-tint: $tint-strong) {
60
+ background: color-mix(in srgb, #{$color} #{$bg-tint}, var(--background));
61
+ color: $color;
62
+ border-color: color-mix(in srgb, #{$color} #{$border-tint}, transparent);
63
+ }
64
+
65
+ // Loading shimmer, shared by the .placeholder utility and any component's
66
+ // own skeleton state. Relies on the global `placeholder-shimmer` keyframe.
67
+ @mixin shimmer-bg {
68
+ background: linear-gradient(
69
+ 90deg,
70
+ var(--divider) 25%,
71
+ var(--secondary-background) 50%,
72
+ var(--divider) 75%
73
+ );
74
+ background-size: 200% 100%;
75
+ animation: placeholder-shimmer 1.5s ease-in-out infinite;
76
+ }
77
+
78
+ @mixin muted-icon-color {
79
+ color: var(--secondary-text);
80
+ transition: color 0.15s ease;
81
+
82
+ &:hover {
83
+ color: var(--primary-text);
84
+ }
85
+ }
package/css/modal.scss CHANGED
@@ -1,5 +1,6 @@
1
1
  @use "properties";
2
2
  @use "parameters" as *;
3
+ @use "mixins" as *;
3
4
 
4
5
  .modal-wrapper {
5
6
  position: fixed;
@@ -58,12 +59,7 @@
58
59
  right: $spacing;
59
60
  cursor: pointer;
60
61
  z-index: 1;
61
- color: var(--secondary-text);
62
- transition: color 0.15s ease;
63
-
64
- &:hover {
65
- color: var(--primary-text);
66
- }
62
+ @include muted-icon-color;
67
63
  }
68
64
 
69
65
  .header {
@@ -122,13 +118,13 @@
122
118
  width: 100%;
123
119
  max-width: 100%;
124
120
  max-height: 85vh;
125
- border-radius: calc($border-radius * 3) calc($border-radius * 3) 0 0;
121
+ border-radius: $radius-xl $radius-xl 0 0;
126
122
  border-bottom: none;
127
123
  transform: translateY(20px);
128
124
  padding-bottom: calc($spacing + env(safe-area-inset-bottom));
129
125
 
130
126
  .header {
131
- border-radius: calc($border-radius * 3) calc($border-radius * 3) 0 0;
127
+ border-radius: $radius-xl $radius-xl 0 0;
132
128
  }
133
129
 
134
130
  .footer {
@@ -3,7 +3,13 @@ $border-radius: 0.4rem;
3
3
  $form-height: 2rem;
4
4
  $shadow: 0 1px 2px rgba(56, 65, 74, .15);
5
5
 
6
- $radius-sm: calc($border-radius / 2);
6
+ $radius-xs: calc($border-radius * 0.5);
7
+ $radius-sm: calc($border-radius * 0.75);
8
+ $radius-md: calc($border-radius * 1.5);
7
9
  $radius-lg: calc($border-radius * 2);
8
10
  $radius-panel: calc($border-radius * 2.5);
9
- $radius-xl: calc($border-radius * 4);
11
+ $radius-xl: calc($border-radius * 4);
12
+
13
+ $tint-subtle: 8%;
14
+ $tint-medium: 12%;
15
+ $tint-strong: 20%;
@@ -1,5 +1,6 @@
1
1
  @use "properties";
2
2
  @use "parameters" as *;
3
+ @use "mixins" as *;
3
4
 
4
5
  .placeholder {
5
6
  display: inline-block;
@@ -7,14 +8,7 @@
7
8
  min-height: calc($spacing * 0.65);
8
9
  margin-right: calc($spacing / 2);
9
10
  border-radius: $border-radius;
10
- background: linear-gradient(
11
- 90deg,
12
- var(--divider) 25%,
13
- var(--secondary-background) 50%,
14
- var(--divider) 75%
15
- );
16
- background-size: 200% 100%;
17
- animation: placeholder-shimmer 1.5s ease-in-out infinite;
11
+ @include shimmer-bg;
18
12
 
19
13
  @for $i from 1 through 12 {
20
14
  &.w-#{$i} {
@@ -22,12 +16,3 @@
22
16
  }
23
17
  }
24
18
  }
25
-
26
- @keyframes placeholder-shimmer {
27
- 0% {
28
- background-position: 200% 0;
29
- }
30
- 100% {
31
- background-position: -200% 0;
32
- }
33
- }
package/css/popover.scss CHANGED
@@ -1,18 +1,13 @@
1
1
  @use "properties";
2
2
  @use "parameters" as *;
3
+ @use "mixins" as *;
3
4
 
4
5
  $arrow: 6px;
5
6
 
6
7
  .popover {
7
8
  position: fixed;
8
9
  z-index: 900;
9
- background: var(--background);
10
- border: 1px solid var(--divider);
11
- border-radius: $radius-panel;
12
- box-shadow:
13
- 0 0 0 1px rgba(0, 0, 0, 0.03),
14
- 0 4px 6px -2px rgba(0, 0, 0, 0.05),
15
- 0 12px 24px -4px rgba(0, 0, 0, 0.12);
10
+ @include float-panel;
16
11
  min-width: 160px;
17
12
  max-width: 320px;
18
13
  opacity: 0;
@@ -20,11 +20,6 @@
20
20
  --primary-dark: #1A1B1F;
21
21
  --primary-light: #F0F1F3;
22
22
  --hover: rgba(0, 0, 0, 0.04);
23
- --radius-sm: 0.25rem;
24
- --radius-md: 0.4rem;
25
- --radius-lg: 0.75rem;
26
- --radius-xl: 1rem;
27
- --radius-full: 9999px;
28
23
  }
29
24
 
30
25
  [data-theme="dark"] {
@@ -100,7 +100,7 @@ nav.push-menu {
100
100
  flex-shrink: 0;
101
101
  width: 1.75rem;
102
102
  height: 1.75rem;
103
- border-radius: calc($border-radius * 0.75);
103
+ border-radius: $radius-sm;
104
104
  border: none;
105
105
  background: rgba(255, 255, 255, 0.08);
106
106
  color: rgba(255, 255, 255, 0.65);
@@ -1,5 +1,6 @@
1
1
  @use "properties";
2
2
  @use "parameters" as *;
3
+ @use "mixins" as *;
3
4
 
4
5
  $track-height: 4px;
5
6
  $thumb-size: 1.1rem;
@@ -70,30 +71,30 @@ $thumb-size: 1.1rem;
70
71
 
71
72
  &:hover::-webkit-slider-thumb {
72
73
  transform: scale(1.15);
73
- box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-color) 15%, transparent);
74
+ @include focus-glow($tint: 15%, $size: 6px);
74
75
  }
75
76
 
76
77
  &:hover::-moz-range-thumb {
77
78
  transform: scale(1.15);
78
- box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-color) 15%, transparent);
79
+ @include focus-glow($tint: 15%, $size: 6px);
79
80
  }
80
81
 
81
82
  &:active::-webkit-slider-thumb {
82
83
  transform: scale(1.22);
83
- box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent-color) 18%, transparent);
84
+ @include focus-glow($tint: 18%, $size: 9px);
84
85
  }
85
86
 
86
87
  &:active::-moz-range-thumb {
87
88
  transform: scale(1.22);
88
- box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent-color) 18%, transparent);
89
+ @include focus-glow($tint: 18%, $size: 9px);
89
90
  }
90
91
 
91
92
  &:focus-visible::-webkit-slider-thumb {
92
- box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-color) 25%, transparent);
93
+ @include focus-glow($tint: 25%, $size: 4px);
93
94
  }
94
95
 
95
96
  &:focus-visible::-moz-range-thumb {
96
- box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-color) 25%, transparent);
97
+ @include focus-glow($tint: 25%, $size: 4px);
97
98
  }
98
99
 
99
100
  &:disabled {
package/css/stepper.scss CHANGED
@@ -1,11 +1,12 @@
1
1
  @use "properties";
2
2
  @use "parameters" as *;
3
+ @use "mixins" as *;
3
4
 
4
5
  $indicator-size: 2rem;
5
6
  $connector-thickness: 2px;
6
7
 
7
8
  @keyframes stepper-pulse {
8
- 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-color) 35%, transparent); }
9
+ 0% { @include focus-glow($tint: 35%, $size: 0); }
9
10
  65% { box-shadow: 0 0 0 6px transparent; }
10
11
  100% { box-shadow: 0 0 0 0 transparent; }
11
12
  }
@@ -116,7 +117,7 @@ $connector-thickness: 2px;
116
117
  &.active {
117
118
  .stepper-indicator {
118
119
  border-color: var(--accent-color);
119
- background: color-mix(in srgb, var(--accent-color) 10%, var(--background));
120
+ background: color-mix(in srgb, var(--accent-color) $tint-medium, var(--background));
120
121
  color: var(--accent-color);
121
122
  animation: stepper-pulse 2.4s ease-out 3;
122
123
  }
@@ -151,7 +152,7 @@ $connector-thickness: 2px;
151
152
  &.error {
152
153
  .stepper-indicator {
153
154
  border-color: var(--error);
154
- background: color-mix(in srgb, var(--error) 10%, var(--background));
155
+ background: color-mix(in srgb, var(--error) $tint-medium, var(--background));
155
156
  color: var(--error);
156
157
  animation: none;
157
158
  }