@sdxc/ui 2026.11.22 → 2026.11.26
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.
|
@@ -19,6 +19,12 @@ const DEFAULT_STEP = 1;
|
|
|
19
19
|
* already that thick keeps its own box.
|
|
20
20
|
*/
|
|
21
21
|
const THUMB_HIT_INSET = "min(0px, calc((100% - max(var(--ui-slider-thumb-size, 1.25rem), var(--ui-target-size, 1.5rem))) / 2))";
|
|
22
|
+
/**
|
|
23
|
+
* How far WebKit's thumb moves down its input to sit on the rail's centre line: WebKit draws it at
|
|
24
|
+
* the start of an input that {@link THUMB_HIT_INSET} grew past the thumb, so it takes half the
|
|
25
|
+
* growth as margin. Firefox centres its thumb on its own.
|
|
26
|
+
*/
|
|
27
|
+
const THUMB_CENTER_OFFSET = "calc((max(var(--ui-slider-thumb-size, 1.25rem), var(--ui-target-size, 1.5rem)) - var(--ui-slider-thumb-size, 1.25rem)) / 2)";
|
|
22
28
|
/**
|
|
23
29
|
* Renders the root `<div>`, stacking its children and resolving range, value, orientation
|
|
24
30
|
* and thumb id into context. Nested parts scope orientation rules to its `data-slot`, so an
|
|
@@ -164,6 +170,7 @@ Slider.Thumb = function SliderThumb(handle) {
|
|
|
164
170
|
when("&:disabled", cursor("not-allowed")),
|
|
165
171
|
outlineStyle("none"),
|
|
166
172
|
when("&::-webkit-slider-runnable-track", [appearance(), bs("100%"), bg("transparent")]),
|
|
173
|
+
when("&::-webkit-slider-thumb", raw({ marginBlockStart: THUMB_CENTER_OFFSET })),
|
|
167
174
|
when("&::-moz-range-track", [
|
|
168
175
|
appearance(),
|
|
169
176
|
bs("100%"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdxc/ui",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.26",
|
|
4
4
|
"description": "Styled, accessible remix/component components rendered as server HTML",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"optional": true
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "a6d84fa08849d9318c95ac92e15cc77973a91561",
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|