@sdxc/ui 2026.11.22 → 2026.11.27
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.
|
@@ -114,8 +114,8 @@ export function Lightbox(handle) {
|
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
116
|
* One photo filling the track: the picture contained in the space above its counter and
|
|
117
|
-
* caption, with a link to each neighbour that addresses it by id
|
|
118
|
-
*
|
|
117
|
+
* caption, with a link to each neighbour that addresses it by id. On a narrow viewer the
|
|
118
|
+
* counter keeps its own line, so the photo's space stays the same from slide to slide.
|
|
119
119
|
*
|
|
120
120
|
* @param handle Runtime handle carrying the slide's photo and position.
|
|
121
121
|
* @returns The render function producing the slide's markup.
|
|
@@ -158,16 +158,22 @@ function LightboxSlide(handle) {
|
|
|
158
158
|
], children: photo.art })), _jsxs("figcaption", { mix: [
|
|
159
159
|
raw({
|
|
160
160
|
display: "flex",
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
flexWrap: "wrap",
|
|
161
|
+
flexDirection: "column",
|
|
162
|
+
gap: "0.25rem",
|
|
163
|
+
alignItems: "center",
|
|
165
164
|
paddingInline: "1rem",
|
|
166
165
|
fontSize: "0.875rem",
|
|
167
166
|
lineHeight: 1.4,
|
|
168
167
|
textAlign: "center",
|
|
169
168
|
color: "rgb(255 255 255 / 0.86)",
|
|
170
169
|
}),
|
|
170
|
+
at(GUTTER_WIDTH, CONTAINER_NAME, raw({
|
|
171
|
+
flexDirection: "row",
|
|
172
|
+
flexWrap: "wrap",
|
|
173
|
+
gap: "0.75rem",
|
|
174
|
+
alignItems: "baseline",
|
|
175
|
+
justifyContent: "center",
|
|
176
|
+
})),
|
|
171
177
|
], children: [_jsx("span", { "data-lightbox-announce": "", "data-slot": "lightbox-counter", mix: [tabularNums(), raw({ color: "rgb(255 255 255 / 0.6)" })], children: `${index + 1} / ${total}` }), photo.caption === undefined ? null : (_jsx("span", { "data-lightbox-announce": "", "data-slot": "lightbox-caption", children: photo.caption }))] }), hasPrevious ? (_jsx(LightboxStep, { href: `#${slideId(viewer, index - 1)}`, to: index - 1, label: labels.previous, side: "start" })) : null, hasNext ? (_jsx(LightboxStep, { href: `#${slideId(viewer, index + 1)}`, to: index + 1, label: labels.next, side: "end" })) : null] }));
|
|
172
178
|
};
|
|
173
179
|
}
|
|
@@ -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.27",
|
|
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": "a02e72f0baabdf2cda53d1a3f32ef2449a59650d",
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|