@filip.mazev/blocks 1.4.16 → 1.4.17

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.
@@ -0,0 +1,36 @@
1
+ @use 'mixins' as *;
2
+ @use 'motion' as *;
3
+
4
+ // Shared clear action for search and selection controls.
5
+ @mixin field-clear-action {
6
+ @include bx-transition(color, 0.15s, ease);
7
+
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ box-sizing: border-box;
12
+ background: transparent;
13
+ border: none;
14
+ padding: spacing(1);
15
+ inline-size: spacing(6);
16
+ block-size: spacing(6);
17
+ border-radius: radius(sm);
18
+ color: var(--bx-text-secondary);
19
+ cursor: pointer;
20
+ flex-shrink: 0;
21
+
22
+ &:focus-visible {
23
+ outline: 2px solid var(--bx-border-brand);
24
+ outline-offset: 0;
25
+ }
26
+
27
+ &:hover:not(:disabled) {
28
+ color: var(--bx-text-primary);
29
+ background: var(--bx-bg-element-hover);
30
+ }
31
+
32
+ &:disabled {
33
+ cursor: not-allowed;
34
+ opacity: 0.5;
35
+ }
36
+ }
@@ -6,3 +6,5 @@
6
6
  @forward 'field-state';
7
7
  @forward 'choice-finish';
8
8
  @forward 'text-overflow';
9
+ @forward 'slider-rail';
10
+ @forward 'field-actions';
@@ -0,0 +1,11 @@
1
+ @use 'mixins' as *;
2
+
3
+ // Shared finish and geometry for native slider tracks and the range slider rail.
4
+ @mixin slider-rail {
5
+ box-sizing: border-box;
6
+ height: spacing(2);
7
+ border: 1px solid var(--bx-border-strong);
8
+ border-radius: radius(pill);
9
+ background: var(--bx-bg-neutral);
10
+ box-shadow: inset 0 1px 2px rgb(0 0 0 / 16%);
11
+ }
@@ -1,18 +1,16 @@
1
1
  @use 'mixins' as *;
2
2
  @use 'motion' as *;
3
+ @use 'slider-rail' as *;
3
4
 
4
5
  // Native range pseudo-elements differ across engines and must remain separate rules.
5
6
  @mixin track {
6
- box-sizing: border-box;
7
- height: spacing(2);
8
- border: 1px solid var(--bx-border-strong);
9
- border-radius: radius(pill);
7
+ @include slider-rail;
8
+
10
9
  background: linear-gradient(
11
10
  to right,
12
11
  var(--bx-accent) 0 var(--bx-slider-progress, 50%),
13
12
  var(--bx-bg-neutral) var(--bx-slider-progress, 50%) 100%
14
13
  );
15
- box-shadow: inset 0 1px 2px rgb(0 0 0 / 16%);
16
14
  }
17
15
 
18
16
  @mixin thumb {