@plexui/vue 0.42.15 → 0.42.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.
- package/dist/es/components/Icon/index.js +1 -0
- package/dist/es/components/Icon/index.js.map +1 -1
- package/dist/es/components/Icon/svg/SearchLg.js +10 -0
- package/dist/es/components/Icon/svg/SearchLg.js.map +1 -0
- package/dist/es/components/Slider/Slider.js +109 -7
- package/dist/es/components/Slider/Slider.js.map +1 -1
- package/dist/es/components/Tip/Tip.js +8 -0
- package/dist/es/components/Tip/Tip.js.map +1 -1
- package/dist/es/components/Toolbar/Toolbar.js +2 -2
- package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/types/components/Icon/index.d.ts +1 -0
- package/dist/types/components/Icon/svg/SearchLg.d.ts +3 -0
- package/dist/types/components/Slider/Slider.d.ts +31 -2
- package/dist/types/components/Tip/Tip.d.ts +21 -0
- package/package.json +2 -2
|
@@ -73,6 +73,23 @@ const extractSize = (entry, box, sizeType) => {
|
|
|
73
73
|
};
|
|
74
74
|
// The minimum difference we enforce between marks, in pixels
|
|
75
75
|
const MINIMUM_MARK_SPACING_PX = 16;
|
|
76
|
+
/**
|
|
77
|
+
* With ticks the knob's centre runs from half its width in from either end, where the ticks stand, but the primitive
|
|
78
|
+
* maps a pointer across the whole root. A pointer event's x is moved, before the primitive reads it, to where its
|
|
79
|
+
* mapping gives the value under the knob's centre: a press on a tick takes that tick's value, and the primitive keeps
|
|
80
|
+
* doing the rest (the thumb it moves, its focus, the range's order). The knob's layout width is scaled as the root is
|
|
81
|
+
* (a pressed knob grows into the lens; an ancestor may be scaled), so the two are measured alike.
|
|
82
|
+
*/
|
|
83
|
+
const onKnobTravel = (event, root, thumb) => {
|
|
84
|
+
const rect = root.getBoundingClientRect();
|
|
85
|
+
const scale = root.offsetWidth > 0 ? rect.width / root.offsetWidth : 1;
|
|
86
|
+
const knob = (thumb?.offsetWidth ?? 0) * scale;
|
|
87
|
+
const travel = rect.width - knob;
|
|
88
|
+
if (travel <= 0)
|
|
89
|
+
return;
|
|
90
|
+
const share = clamp((event.clientX - rect.left - knob / 2) / travel, 0, 1);
|
|
91
|
+
Object.defineProperty(event, "clientX", { value: rect.left + share * rect.width, configurable: true });
|
|
92
|
+
};
|
|
76
93
|
/**
|
|
77
94
|
* A press on the track of a range moves the thumb whose value lies nearest the press, which the slider primitive
|
|
78
95
|
* (a port of Radix) focuses only once that value changes. Focusing it at once lets a phone draw the knob being
|
|
@@ -110,6 +127,8 @@ const SliderMarks = defineComponent({
|
|
|
110
127
|
getThumb: { type: Function, required: true },
|
|
111
128
|
min: { type: Number, required: true },
|
|
112
129
|
max: { type: Number, required: true },
|
|
130
|
+
/** With ticks a phone's knob travels as the primitive places it, not clamped (Slider.module.css): the marks move with it */
|
|
131
|
+
ticks: { type: Boolean, default: false },
|
|
113
132
|
},
|
|
114
133
|
setup(props) {
|
|
115
134
|
// We seperate the container and measure divs so that our resize observer
|
|
@@ -134,6 +153,9 @@ const SliderMarks = defineComponent({
|
|
|
134
153
|
// Its layout width: a pressed knob is scaled into the lens
|
|
135
154
|
const thumbHalfWidth = thumb.offsetWidth / 2;
|
|
136
155
|
const clamped = getComputedStyle(thumb).getPropertyValue("--slider-thumb-travel").trim() === "clamped";
|
|
156
|
+
// Over the track on an iOS phone the marks at the ends of the range stand this far in from the track's ends
|
|
157
|
+
// (touch.css); elsewhere they are centred under their values like the rest
|
|
158
|
+
const endInset = parseFloat(getComputedStyle(container).getPropertyValue("--slider-mark-end-inset"));
|
|
137
159
|
// Wipe all styles so we can accurately determine the positions of the marks
|
|
138
160
|
markElements.forEach((markEl) => {
|
|
139
161
|
markEl.style.width = "";
|
|
@@ -153,7 +175,12 @@ const SliderMarks = defineComponent({
|
|
|
153
175
|
// Under the knob's centre at the mark's value, accounting for the width of the mark itself
|
|
154
176
|
let left = thumbCentre(valuePercent, width, thumbHalfWidth, clamped) - markHalfWidth;
|
|
155
177
|
// Clamp to the left and right bounds of the container
|
|
156
|
-
|
|
178
|
+
const inset = Number.isNaN(endInset) ? 0 : endInset;
|
|
179
|
+
left = Math.max(inset, Math.min(left, width - inset - markWidth));
|
|
180
|
+
if (!Number.isNaN(endInset) && markValue === min)
|
|
181
|
+
left = inset;
|
|
182
|
+
if (!Number.isNaN(endInset) && markValue === max)
|
|
183
|
+
left = Math.max(inset, width - inset - markWidth);
|
|
157
184
|
markEl.style.left = `${left}px`;
|
|
158
185
|
});
|
|
159
186
|
};
|
|
@@ -212,7 +239,7 @@ const SliderMarks = defineComponent({
|
|
|
212
239
|
onBeforeUnmount(() => {
|
|
213
240
|
observer?.disconnect();
|
|
214
241
|
});
|
|
215
|
-
watch([() => props.marks, () => props.min, () => props.max, sliderWidth, tabletAndUp], layoutMarks, { flush: "post" });
|
|
242
|
+
watch([() => props.marks, () => props.min, () => props.max, sliderWidth, tabletAndUp, () => props.ticks], layoutMarks, { flush: "post" });
|
|
216
243
|
return () => h("div", { class: s.MarksContainer, ref: marksContainerRef }, [
|
|
217
244
|
h("div", { ref: measureRef }, props.marks.map((mark) => h("div", { "key": mark.value, "class": s.Mark, "data-mark": "true" }, [
|
|
218
245
|
h("span", { class: s.MarkLabel }, mark.label),
|
|
@@ -220,6 +247,50 @@ const SliderMarks = defineComponent({
|
|
|
220
247
|
]);
|
|
221
248
|
},
|
|
222
249
|
});
|
|
250
|
+
/** Where the steps are this many, the dots could not stand 9px apart on any screen: none are drawn */
|
|
251
|
+
const MAX_TICKS = 300;
|
|
252
|
+
// The least room between two dots: three dots' widths
|
|
253
|
+
const MINIMUM_TICK_SPACING_PX = 9;
|
|
254
|
+
/** The values `ticks` names, within the scale, each once and in order */
|
|
255
|
+
const tickValues = (values, min, max) => [...new Set(values.filter((value) => Number.isFinite(value) && value >= min && value <= max))].sort((a, b) => a - b);
|
|
256
|
+
/**
|
|
257
|
+
* The dots of `ticks`, at each step or at the values named, placed by CSS (Slider.module.css) from their share of the
|
|
258
|
+
* knob's travel; they show once the track's width puts the closest two 9px apart or more.
|
|
259
|
+
*/
|
|
260
|
+
const SliderTicks = defineComponent({
|
|
261
|
+
name: "SliderTicks",
|
|
262
|
+
props: { shares: { type: Array, required: true } },
|
|
263
|
+
setup(props) {
|
|
264
|
+
const el = ref(null);
|
|
265
|
+
const width = ref(undefined);
|
|
266
|
+
const shown = ref(false);
|
|
267
|
+
// The knob widens at the phone breakpoint (14 to 38), also where the track's width stays
|
|
268
|
+
const tabletAndUp = useBreakpoint("md");
|
|
269
|
+
let observer;
|
|
270
|
+
const measure = () => {
|
|
271
|
+
if (!el.value || !width.value)
|
|
272
|
+
return;
|
|
273
|
+
const thumb = parseFloat(getComputedStyle(el.value).getPropertyValue("--slider-thumb-width")) || 14;
|
|
274
|
+
const shares = props.shares;
|
|
275
|
+
const closest = shares.reduce((least, share, i) => (i === 0 ? least : Math.min(least, share - shares[i - 1])), 1);
|
|
276
|
+
shown.value = (width.value - thumb) * closest >= MINIMUM_TICK_SPACING_PX;
|
|
277
|
+
};
|
|
278
|
+
onMounted(() => {
|
|
279
|
+
const target = el.value;
|
|
280
|
+
if (!target || typeof window === "undefined" || !("ResizeObserver" in window))
|
|
281
|
+
return;
|
|
282
|
+
observer = new ResizeObserver(([entry]) => {
|
|
283
|
+
const next = extractSize(entry, "contentBoxSize", "inlineSize");
|
|
284
|
+
if (next !== width.value)
|
|
285
|
+
width.value = next;
|
|
286
|
+
});
|
|
287
|
+
observer.observe(target, { box: "content-box" });
|
|
288
|
+
});
|
|
289
|
+
onBeforeUnmount(() => observer?.disconnect());
|
|
290
|
+
watch([width, () => props.shares.join(","), tabletAndUp], measure, { flush: "post" });
|
|
291
|
+
return () => h("span", { "ref": el, "class": s.Ticks, "aria-hidden": "true", "data-shown": shown.value ? "" : undefined }, props.shares.map((share, index) => h("span", { "key": index, "class": s.Tick, "data-tick": "", "style": { "--slider-tick-at": String(share) } })));
|
|
292
|
+
},
|
|
293
|
+
});
|
|
223
294
|
const SliderComponent = defineComponent({
|
|
224
295
|
name: "Slider",
|
|
225
296
|
inheritAttrs: false,
|
|
@@ -247,8 +318,19 @@ const SliderComponent = defineComponent({
|
|
|
247
318
|
ariaLabel: String,
|
|
248
319
|
/** Id of an element that names the slider; takes precedence over `label` */
|
|
249
320
|
ariaLabelledby: String,
|
|
250
|
-
/**
|
|
321
|
+
/**
|
|
322
|
+
* Labels of points of the scale, each at the knob's place at its value: under the track, or over it on an iOS
|
|
323
|
+
* phone (touch.css), as Settings' Balance writes L, its value and R (15/20, the baseline 31px over the track's
|
|
324
|
+
* middle, a mark at either end of the range 5px in from that end of the track). Horizontal only.
|
|
325
|
+
*/
|
|
251
326
|
marks: Array,
|
|
327
|
+
/**
|
|
328
|
+
* A dot at each step under the track, where the knob's centre stands on it, the knob covering its own: iOS
|
|
329
|
+
* 27.2's ticks on a phone (3px, 8.5px under the track's middle, `--slider-tick-*`), drawn where the steps stand
|
|
330
|
+
* 9px or more apart. Horizontal only; the Plex Android phone draws none. An array of values puts the dots at those
|
|
331
|
+
* values only, as Settings' Balance marks its ends and its middle under a slider of fine steps. @default false
|
|
332
|
+
*/
|
|
333
|
+
ticks: { type: [Boolean, Array], default: false },
|
|
252
334
|
/** Color of the slider track */
|
|
253
335
|
trackColor: String,
|
|
254
336
|
/** Color of the slider progress along the track */
|
|
@@ -303,6 +385,8 @@ const SliderComponent = defineComponent({
|
|
|
303
385
|
// drags, a scroll the browser takes over): the slider's own pointerup never comes then, so the window hears the
|
|
304
386
|
// lift and a lost capture ends the press too.
|
|
305
387
|
let releasePress = null;
|
|
388
|
+
// Whether the last render drew ticks
|
|
389
|
+
let ticked = false;
|
|
306
390
|
const endPress = () => {
|
|
307
391
|
releasePress?.();
|
|
308
392
|
releasePress = null;
|
|
@@ -501,11 +585,11 @@ const SliderComponent = defineComponent({
|
|
|
501
585
|
emit("focus", evt);
|
|
502
586
|
};
|
|
503
587
|
// Radix value/onChange wiring
|
|
504
|
-
const handleValueChange = (
|
|
588
|
+
const handleValueChange = (primitiveValues) => {
|
|
505
589
|
if (props.disabled)
|
|
506
590
|
return;
|
|
507
591
|
debouncedOnChange.cancel();
|
|
508
|
-
reportChange(isRange() ?
|
|
592
|
+
reportChange(isRange() ? primitiveValues : primitiveValues[0]);
|
|
509
593
|
};
|
|
510
594
|
return () => {
|
|
511
595
|
// Read every piece of state, as a React render depends on all of them
|
|
@@ -528,6 +612,16 @@ const SliderComponent = defineComponent({
|
|
|
528
612
|
const minStepsBetweenThumbs = range ? props.minStepsBetweenThumbs : undefined;
|
|
529
613
|
// Show marks only in horizontal orientation
|
|
530
614
|
const showMarks = marks.length > 0 && !isVertical;
|
|
615
|
+
// A dot at each step: whole steps only, and no more than a wide track could hold 9px apart
|
|
616
|
+
const stepCount = props.step > 0 ? (props.max - props.min) / props.step : 0;
|
|
617
|
+
const tickCount = Math.round(stepCount);
|
|
618
|
+
// The dots' shares of the knob's travel: each step's, or those of the values `ticks` names
|
|
619
|
+
const tickShares = isVertical || max <= min ? []
|
|
620
|
+
: Array.isArray(props.ticks) ? tickValues(props.ticks, min, max).map((v) => (v - min) / (max - min))
|
|
621
|
+
: props.ticks && tickCount >= 1 && tickCount <= MAX_TICKS && Math.abs(stepCount - tickCount) < 1e-6 ? Array.from({ length: tickCount + 1 }, (_, i) => i / tickCount)
|
|
622
|
+
: [];
|
|
623
|
+
const showTicks = tickShares.length > 0;
|
|
624
|
+
ticked = showTicks;
|
|
531
625
|
// Format range display text
|
|
532
626
|
const rangeDisplayText = range
|
|
533
627
|
? value.map((v) => `${prefixUnit ?? ""}${v.toFixed(precision.value)}${unit ?? ""}`).join(" – ")
|
|
@@ -625,6 +719,8 @@ const SliderComponent = defineComponent({
|
|
|
625
719
|
"onPointerdown": (event) => {
|
|
626
720
|
if (disabled)
|
|
627
721
|
return;
|
|
722
|
+
if (ticked)
|
|
723
|
+
onKnobTravel(event, event.currentTarget, thumbElement);
|
|
628
724
|
pointerDown.value = true;
|
|
629
725
|
releasePress?.();
|
|
630
726
|
const { pointerId } = event;
|
|
@@ -641,11 +737,17 @@ const SliderComponent = defineComponent({
|
|
|
641
737
|
if (range)
|
|
642
738
|
focusThumbToMove(event, event.currentTarget, radixValue, props.min, props.max, isVertical, false);
|
|
643
739
|
},
|
|
740
|
+
// The primitive takes the root's own pointermove: the capture phase hears it first
|
|
741
|
+
"onPointermoveCapture": (event) => {
|
|
742
|
+
if (ticked)
|
|
743
|
+
onKnobTravel(event, event.currentTarget, thumbElement);
|
|
744
|
+
},
|
|
644
745
|
"onPointerup": endPress,
|
|
645
746
|
"onPointercancel": endPress,
|
|
646
747
|
"onLostpointercapture": endPress,
|
|
647
748
|
"data-pressed": isPointerDown ? "" : undefined,
|
|
648
749
|
"data-range": range ? "" : undefined,
|
|
750
|
+
"data-ticks": showTicks ? "" : undefined,
|
|
649
751
|
"style": toCssVariables({
|
|
650
752
|
"slider-duration": `${animationDurationMS}ms`,
|
|
651
753
|
"slider-track-color": trackColor,
|
|
@@ -653,7 +755,7 @@ const SliderComponent = defineComponent({
|
|
|
653
755
|
}),
|
|
654
756
|
}, {
|
|
655
757
|
default: () => [
|
|
656
|
-
h(SliderTrack, { class: s.Track }, { default: () => h(SliderRange, { class: s.Range }) }),
|
|
758
|
+
h(SliderTrack, { class: s.Track }, { default: () => [h(SliderRange, { class: s.Range }), showTicks ? h(SliderTicks, { shares: tickShares }) : null] }),
|
|
657
759
|
...(range
|
|
658
760
|
? value.map((_, i) => h(SliderThumb, {
|
|
659
761
|
"key": i,
|
|
@@ -681,7 +783,7 @@ const SliderComponent = defineComponent({
|
|
|
681
783
|
]),
|
|
682
784
|
],
|
|
683
785
|
}),
|
|
684
|
-
showMarks ? h(SliderMarks, { marks, getThumb, min, max }) : null,
|
|
786
|
+
showMarks ? h(SliderMarks, { marks, getThumb, min, max, ticks: showTicks }) : null,
|
|
685
787
|
])),
|
|
686
788
|
]);
|
|
687
789
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../../src/components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AG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;iBACjE,CAAC,CAAC;aACJ,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAEF,wDAAwD;AACxD,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,EAAE,CACtD,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;AAwCzG,MAAM,CAAC,MAAM,MAAM,GAAG,eAErB,CAAA;AAED;;;GAGG;AACH,MAAM,aAAa,GAAG,CAAC,IAAY,EAAU,EAAE;IAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,MAAM,CAAA;IACjD,OAAO,QAAQ,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,WAAW,CAAA;AAC5E,CAAC,CAAA","sourcesContent":["import {\n Comment,\n Fragment,\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n watch,\n type PropType,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { useBreakpoint } from \"../../composables/useBreakpoints.js\"\nimport { toCssVariables } from \"../../lib/helpers.js\"\nimport { hasContent as hasSlotContent } from \"../../lib/slotContent.js\"\nimport { Button } from \"../Button/index.js\"\nimport { Reload } from \"../Icon/index.js\"\nimport { Tooltip } from \"../Tooltip/index.js\"\nimport { SliderRange, SliderRoot, SliderThumb, SliderTrack } from \"./sliderPrimitive.js\"\nimport s from \"@plexui/styles/components/Slider/Slider.module.css\"\n\n// Vue port of packages/ui/src/components/Slider/Slider.tsx. Props, defaults,\n// rendered DOM and behaviour match React (checked by the parity tests).\n// - `value` + `update:value` (also `change`, as React calls it `onChange`)\n// support `v-model:value`; the value is a number, or an array with `range`.\n// - `label` is a prop or the `label` slot (rich content, e.g. a tooltip).\n// - React's `startAdornment` / `endAdornment` are the slots of those names.\n// - `aria-label` / `aria-labelledby` are the `ariaLabel` / `ariaLabelledby` props.\n// - React's `onFocus` / `onBlur` become the `focus` / `blur` emits: from the\n// value input, and from the thumbs (React's bubbling focus events, so\n// `focusin` / `focusout` on the slider root).\n// - React reads no other props, so other attributes are not passed on.\n// - The slider itself is Radix's, ported in ./sliderPrimitive.ts.\n\nexport type SliderMark = {\n value: number\n label: string\n}\n\n/** lodash `clamp`: NaN stays NaN */\nconst clamp = (number: number, lower: number, upper: number) => {\n let result = number\n if (result === result) {\n result = result <= upper ? result : upper\n result = result >= lower ? result : lower\n }\n return result\n}\n\n/** lodash `round(number, precision)` */\nconst round = (number: number, precision: number) => {\n const digits = Math.min(Math.trunc(precision), 292)\n if (!digits || !Number.isFinite(number)) return Math.round(number)\n let pair = `${number}e`.split(\"e\")\n const value = Math.round(Number(`${pair[0]}e${Number(pair[1]) + digits}`))\n pair = `${value}e`.split(\"e\")\n return Number(`${pair[0]}e${Number(pair[1]) - digits}`)\n}\n\n/** lodash `debounce(func, wait)` with its defaults: trailing call only */\nconst debounce = <T>(func: (value: T) => void, wait: number) => {\n let timer: ReturnType<typeof setTimeout> | undefined\n let lastValue: T\n const debounced = (value: T) => {\n lastValue = value\n if (timer !== undefined) clearTimeout(timer)\n timer = setTimeout(() => {\n timer = undefined\n func(lastValue)\n }, wait)\n }\n debounced.cancel = () => {\n if (timer !== undefined) clearTimeout(timer)\n timer = undefined\n }\n return debounced\n}\n\nconst hasContent = (nodes: VNodeArrayChildren | undefined): boolean =>\n !!nodes?.some((node) => {\n if (node == null || typeof node === \"boolean\") return false\n if (Array.isArray(node)) return hasContent(node)\n if (typeof node !== \"object\") return node !== \"\"\n const vnode = node as VNode\n if (vnode.type === Comment) return false\n if (vnode.type === Fragment) return hasContent(vnode.children as VNodeArrayChildren)\n return true\n })\n\ntype ResizeEntryBox = \"contentBoxSize\" | \"borderBoxSize\" | \"devicePixelContentBoxSize\"\n\n// Same reading as usehooks-ts' useResizeObserver (content-box)\nconst extractSize = (entry: ResizeObserverEntry, box: ResizeEntryBox, sizeType: \"inlineSize\" | \"blockSize\") => {\n const boxSize = entry[box] as ResizeObserverSize[] | ResizeObserverSize | undefined\n if (!boxSize) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"]\n }\n return undefined\n }\n return Array.isArray(boxSize) ? boxSize[0]![sizeType] : boxSize[sizeType]\n}\n\n// The minimum difference we enforce between marks, in pixels\nconst MINIMUM_MARK_SPACING_PX = 16\n\n/**\n * A press on the track of a range moves the thumb whose value lies nearest the press, which the slider primitive\n * (a port of Radix) focuses only once that value changes. Focusing it at once lets a phone draw the knob being\n * pressed as the lens of glass (Slider.module.css), even when the press leaves the value as it is. The thumb is\n * the one the primitive moves: the pointer mapped onto min to max across the root (from the right in a\n * right-to-left direction; the port maps left to right), the nearest value, the first on a tie. A press on a\n * thumb itself is left to the primitive, which focuses that thumb.\n */\nconst focusThumbToMove = (event: PointerEvent, root: HTMLElement, values: number[], min: number, max: number, vertical: boolean, rtl: boolean) => {\n const thumbs = Array.from(root.querySelectorAll<HTMLElement>('[role=\"slider\"]'))\n if (thumbs.includes(event.target as HTMLElement)) return\n const rect = root.getBoundingClientRect()\n const ratio = vertical ? (rect.bottom - event.clientY) / rect.height : (rtl ? rect.right - event.clientX : event.clientX - rect.left) / rect.width\n const pointerValue = min + ratio * (max - min)\n const distances = values.map((value) => Math.abs(value - pointerValue))\n const thumb = thumbs[distances.indexOf(Math.min(...distances))]\n if (thumb && thumb !== document.activeElement) thumb.focus({ preventScroll: true, focusVisible: false } as FocusOptions)\n}\n\n/** A knob's value from 0 to 1, by which a phone stands the knob on its value as iOS does (Slider.module.css). */\nconst thumbPercentStyle = (value: number, min: number, max: number) => ({\n \"--slider-thumb-percent\": String(max > min ? clamp((value - min) / (max - min), 0, 1) : 0),\n})\n\n/**\n * Where a knob's centre stands at a value (0 to 1), from the start of a track `width` wide. The primitive (Radix)\n * eases the knob over the whole track to keep it inside; on a phone it stands on the value and stops half its\n * width from each end, as iOS (`clamped`, Slider.module.css).\n */\nconst thumbCentre = (percent: number, width: number, thumbHalf: number, clamped: boolean) =>\n clamped ? clamp(percent * width, thumbHalf, width - thumbHalf) : percent * width + thumbHalf * (1 - 2 * percent)\n\nconst SliderMarks = defineComponent({\n name: \"SliderMarks\",\n props: {\n marks: { type: Array as PropType<SliderMark[]>, required: true },\n getThumb: { type: Function as PropType<() => HTMLElement | null>, required: true },\n min: { type: Number, required: true },\n max: { type: Number, required: true },\n },\n setup(props) {\n // We seperate the container and measure divs so that our resize observer\n // does not fire when we adjust the height of the marks container.\n const marksContainerRef = ref<HTMLDivElement | null>(null)\n const measureRef = ref<HTMLDivElement | null>(null)\n\n // We measure the width of the slider within this component so that sliders\n // without marks do not pay a performance penalty.\n const sliderWidth = ref<number | undefined>(undefined)\n // The knob's travel changes at the phone breakpoint (Slider.module.css), also where the width stays\n const tabletAndUp = useBreakpoint(\"md\")\n let observer: ResizeObserver | undefined\n\n // React's useLayoutEffect on [marks, thumbRef, min, max, sliderWidth]\n const layoutMarks = () => {\n const thumb = props.getThumb()\n const container = marksContainerRef.value\n\n // Impossible\n if (!thumb || !container) {\n return\n }\n\n const markElements = Array.from(container.querySelectorAll<HTMLDivElement>(\"[data-mark]\"))\n\n // Its layout width: a pressed knob is scaled into the lens\n const thumbHalfWidth = thumb.offsetWidth / 2\n const clamped = getComputedStyle(thumb).getPropertyValue(\"--slider-thumb-travel\").trim() === \"clamped\"\n\n // Wipe all styles so we can accurately determine the positions of the marks\n markElements.forEach((markEl) => {\n markEl.style.width = \"\"\n markEl.style.display = \"\"\n })\n\n const width = sliderWidth.value\n const { marks, min, max } = props\n\n const positionMarks = () => {\n if (!width) {\n return\n }\n\n markElements.forEach((markEl, index) => {\n const markValue = marks[index]!.value\n const valuePercent = (markValue - min) / (max - min)\n const markWidth = markEl.getBoundingClientRect().width\n const markHalfWidth = markWidth / 2\n\n // Under the knob's centre at the mark's value, accounting for the width of the mark itself\n let left = thumbCentre(valuePercent, width, thumbHalfWidth, clamped) - markHalfWidth\n\n // Clamp to the left and right bounds of the container\n left = Math.max(0, Math.min(left, width - markWidth))\n\n markEl.style.left = `${left}px`\n })\n }\n\n const marksHaveCollisions = () => {\n for (let i = 0; i < markElements.length - 1; i++) {\n const currentRect = markElements[i]!.getBoundingClientRect()\n const nextRect = markElements[i + 1]!.getBoundingClientRect()\n\n if (currentRect.right + MINIMUM_MARK_SPACING_PX > nextRect.left) {\n return true\n }\n }\n return false\n }\n\n positionMarks()\n\n // If we have collisions, try to wrap the content\n if (marksHaveCollisions()) {\n markElements.forEach((markEl) => {\n markEl.style.width = \"min-content\"\n })\n\n positionMarks()\n\n // Hide all marks if we still have collisions\n if (marksHaveCollisions()) {\n markElements.forEach((markEl) => {\n markEl.style.display = \"none\"\n })\n }\n }\n\n const tallestHeight = Math.max(...markElements.map((markEl) => markEl.getBoundingClientRect().height))\n\n // Give our container a height so that we allocate space on the page\n // for the marks and push down other content when we have to wrap\n container.style.height = tallestHeight > 0 ? `${tallestHeight}px` : \"\"\n // Placed against the slider's width: the marks show, at their own height (Slider.module.css)\n if (width) container.dataset.measured = \"\"\n }\n\n onMounted(() => {\n layoutMarks()\n\n // usehooks-ts useResizeObserver: only a changed content box updates the width\n const measure = measureRef.value\n if (!measure || typeof window === \"undefined\" || !(\"ResizeObserver\" in window)) {\n return\n }\n const previousSize: { width?: number; height?: number } = { width: undefined, height: undefined }\n observer = new ResizeObserver(([entry]) => {\n const width = extractSize(entry!, \"contentBoxSize\", \"inlineSize\")\n const height = extractSize(entry!, \"contentBoxSize\", \"blockSize\")\n if (previousSize.width === width && previousSize.height === height) {\n return\n }\n previousSize.width = width\n previousSize.height = height\n sliderWidth.value = width\n })\n observer.observe(measure, { box: \"content-box\" })\n })\n\n onBeforeUnmount(() => {\n observer?.disconnect()\n })\n\n watch([() => props.marks, () => props.min, () => props.max, sliderWidth, tabletAndUp], layoutMarks, { flush: \"post\" })\n\n return () =>\n h(\"div\", { class: s.MarksContainer, ref: marksContainerRef }, [\n h(\n \"div\",\n { ref: measureRef },\n props.marks.map((mark) =>\n h(\"div\", { \"key\": mark.value, \"class\": s.Mark, \"data-mark\": \"true\" }, [\n h(\"span\", { class: s.MarkLabel }, mark.label),\n ]),\n ),\n ),\n ])\n },\n})\n\nconst SliderComponent = defineComponent({\n name: \"Slider\",\n inheritAttrs: false,\n props: {\n /** The minimum value the slider can have */\n min: { type: Number, required: true },\n /** The maximum value the slider can have */\n max: { type: Number, required: true },\n /** The step increment between slider values */\n step: { type: Number, required: true },\n /**\n * The current value: a number, or an array of values (one per thumb)\n * with `range`. Bind with `v-model:value`.\n */\n value: { type: [Number, Array] as PropType<number | number[]>, required: true },\n /** When true, the slider has one thumb per value of the `value` array. @default false */\n range: { type: Boolean, default: false },\n /** Unit to display next to the slider value (e.g., ms, px) */\n unit: String,\n /** Unit to display before the slider value (e.g., $) */\n prefixUnit: String,\n /** Label for the slider; the `label` slot takes rich content */\n label: String,\n /** Accessible name for the slider when there is no visible `label` */\n ariaLabel: String,\n /** Id of an element that names the slider; takes precedence over `label` */\n ariaLabelledby: String,\n /** List of marks to display below the slider track (horizontal only) */\n marks: Array as PropType<SliderMark[]>,\n /** Color of the slider track */\n trackColor: String,\n /** Color of the slider progress along the track */\n rangeColor: String,\n /** Disables the slider and its value input. @default false */\n disabled: { type: Boolean, default: false },\n /** Orientation of the slider. @default \"horizontal\" */\n orientation: { type: String as PropType<\"horizontal\" | \"vertical\">, default: \"horizontal\" },\n /** Value offered as a \"reset to default\" option (single thumb only) */\n resetValue: Number,\n /** Text of the reset button's tooltip (single thumb only). @default \"Reset to default\" */\n resetTooltip: String,\n /** Minimum number of steps between thumbs (range only) */\n minStepsBetweenThumbs: Number,\n },\n emits: {\n /** The value changed (`v-model:value`): a number, or an array with `range` */\n \"update:value\": (_value: number | number[]) => { void _value; return true },\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (_value: number | number[]) => { void _value; return true },\n /** The value input or a thumb gained focus */\n \"focus\": (_event: FocusEvent) => { void _event; return true },\n /** The value input or a thumb lost focus */\n \"blur\": (_event: FocusEvent) => { void _event; return true },\n },\n setup(props, { attrs, slots, emit, expose }) {\n const id = useId()\n const labelId = `${id}-label`\n const isRange = () => props.range === true\n const precision = computed(() => String(props.step).split(\".\")[1]?.length ?? 0)\n\n const reportChange = (value: number | number[]) => {\n emit(\"update:value\", value)\n emit(\"change\", value)\n }\n\n // Single-mode state for editable input\n const inputValue = ref<string>(isRange() ? \"\" : String((props.value as number).toFixed(precision.value)))\n const setInputValueNumber = (nextValue: number) => {\n inputValue.value = nextValue.toFixed(precision.value)\n }\n\n // prevents input from jumping around while the user is typing; an\n // immediate change (a key, blur) cancels the pending typed one\n const debouncedOnChange = debounce((value: number) => {\n if (!props.disabled && !isRange()) reportChange(value)\n }, 250)\n // Cancel pending input when its owner unmounts.\n onBeforeUnmount(() => debouncedOnChange.cancel())\n\n const pointerDown = ref(false)\n // A phone's reset is a button of its own beside the value (below)\n const tabletAndUp = useBreakpoint(\"md\")\n // A press ends where the finger lifts, even when something else takes the pointer away (a sheet that a touch\n // drags, a scroll the browser takes over): the slider's own pointerup never comes then, so the window hears the\n // lift and a lost capture ends the press too.\n let releasePress: (() => void) | null = null\n const endPress = () => {\n releasePress?.()\n releasePress = null\n pointerDown.value = false\n }\n onBeforeUnmount(() => releasePress?.())\n const resetPending = ref(false)\n // Read the controlled owner after a reset request, including a refused request.\n watch([resetPending, () => props.value, isRange], () => {\n if (!resetPending.value) return\n resetPending.value = false\n if (!isRange()) setInputValueNumber(props.value as number)\n }, { flush: \"post\" })\n watch([() => props.disabled, isRange, () => props.value, precision], () => {\n if (!props.disabled) return\n debouncedOnChange.cancel()\n endPress()\n // A sync watcher runs at each prop as Vue sets them one by one: a disabled range switched to one thumb has\n // range off here while its value is still the array, and the number comes with the next prop\n if (!isRange() && typeof props.value === \"number\") setInputValueNumber(props.value)\n }, { flush: \"sync\" })\n const isMounted = ref(false)\n\n // Used to position the input over the thumb\n const inputRef = ref<HTMLInputElement | null>(null)\n const rootRef = ref<HTMLElement | null>(null)\n // We assume that the width of the thumb does not change from render to render\n let thumbElement: HTMLElement | null = null\n const setRoot = (element: HTMLElement | null) => {\n rootRef.value = element\n }\n const setThumb = (element: HTMLElement | null) => {\n thumbElement = element\n }\n const getThumb = () => thumbElement\n\n expose({ root: rootRef })\n\n // Calculate animation duration based on the distance the thumb needs to move\n // Skip custom animation for range mode: let Radix handle it\n const percent = computed(() => (isRange() ? 0 : ((props.value as number) - props.min) / (props.max - props.min)))\n // Plex's usePrevious: the percent before its latest change (recorded after\n // the render that changed it), the same across renders that keep it\n let lastPercent = percent.value\n let previousPercent = percent.value\n watch(\n percent,\n (next) => {\n previousPercent = lastPercent\n lastPercent = next\n },\n { flush: \"post\" },\n )\n const getPreviousPercent = () => (Object.is(lastPercent, percent.value) ? previousPercent : lastPercent)\n\n // Sort marks for collision detection (again only when a value or label changes, as in React)\n const marksKey = () => JSON.stringify((props.marks ?? []).map(({ value, label }) => [value, label]))\n let sortedMarks: SliderMark[] = []\n let sortedMarksKey: string | undefined\n const getMarks = () => {\n const key = marksKey()\n if (key !== sortedMarksKey) {\n sortedMarks = [...(props.marks ?? [])].sort((a, b) => a.value - b.value)\n sortedMarksKey = key\n }\n return sortedMarks\n }\n\n // Validate marks\n const validateMarks = () => {\n const markValues = new Set<number>()\n for (const mark of getMarks()) {\n if (mark.value < props.min || mark.value > props.max) {\n throw new Error(`Slider mark value ${mark.value} is out of bounds [${props.min}, ${props.max}]`)\n }\n if (markValues.has(mark.value)) {\n throw new Error(\"Slider marks must have unique values\")\n }\n markValues.add(mark.value)\n }\n }\n\n // Update value if out of bounds (single mode only)\n const clampOutOfBounds = () => {\n if (isRange()) return\n const v = props.value as number\n const clamped = clamp(v, props.min, props.max)\n if (clamped !== v) {\n reportChange(clamped)\n setInputValueNumber(clamped)\n }\n }\n\n const syncInputValue = () => {\n if (isRange()) return\n if (inputRef.value !== document.activeElement) {\n setInputValueNumber(props.value as number)\n }\n }\n\n // React's mount effects, in their order\n onMounted(() => {\n isMounted.value = true\n validateMarks()\n clampOutOfBounds()\n syncInputValue()\n })\n watch([marksKey, () => props.min, () => props.max], validateMarks, { flush: \"post\" })\n watch([() => props.min, () => props.max, precision, isRange], clampOutOfBounds, { flush: \"post\" })\n watch([() => props.value, precision, isRange], syncInputValue, { flush: \"post\" })\n\n // Single-mode keyboard handler: a key's change replaces a pending typed one\n const handleKeyDown = (evt: KeyboardEvent) => {\n if (props.disabled || isRange()) return\n const singleValue = props.value as number\n const { min, max, step } = props\n if (evt.key === \"Home\") {\n evt.preventDefault()\n debouncedOnChange.cancel()\n reportChange(min)\n setInputValueNumber(min)\n }\n if (evt.key === \"End\") {\n evt.preventDefault()\n debouncedOnChange.cancel()\n reportChange(max)\n setInputValueNumber(max)\n }\n if (evt.key === \"ArrowUp\") {\n evt.preventDefault()\n const multiplier = evt.shiftKey ? 10 : 1\n const next = clamp(singleValue + step * multiplier, min, max)\n debouncedOnChange.cancel()\n reportChange(next)\n setInputValueNumber(next)\n }\n if (evt.key === \"ArrowDown\") {\n evt.preventDefault()\n const multiplier = evt.shiftKey ? 10 : 1\n const next = clamp(singleValue - step * multiplier, min, max)\n debouncedOnChange.cancel()\n reportChange(next)\n setInputValueNumber(next)\n }\n if (evt.key === \"Enter\" || evt.key === \"Escape\") {\n evt.preventDefault()\n ;(evt.currentTarget as HTMLInputElement).blur()\n }\n }\n\n const handleInputChange = (evt: Event) => {\n if (props.disabled || isRange()) return\n const target = evt.currentTarget as HTMLInputElement\n // Mobile decimal keyboards may use a comma. A minus is valid only below zero.\n const nextValue = target.value.trim().replace(/,/g, \".\").replace(props.min < 0 ? /(?!^-)[^\\d.]/g : /[^\\d.]/g, \"\")\n debouncedOnChange.cancel()\n let parsed = parseFloat(nextValue || \"0\")\n if (Number.isNaN(parsed)) {\n // A lone \"-\" or \".\" is a number still being typed: nothing to report yet\n inputValue.value = nextValue\n if (target.value !== nextValue) target.value = nextValue\n return\n }\n parsed = clamp(parsed, props.min, props.max)\n if (props.step >= 1) {\n parsed = Math.floor(parsed)\n }\n debouncedOnChange(parsed)\n inputValue.value = nextValue\n // A controlled React input shows its state again after the event\n if (target.value !== nextValue) target.value = nextValue\n }\n\n const handleInputBlur = (evt: FocusEvent) => {\n if (isRange()) return\n // Blur commits the typed text, so its pending debounced change is dropped\n debouncedOnChange.cancel()\n if (props.disabled) {\n setInputValueNumber(props.value as number)\n emit(\"blur\", evt)\n return\n }\n let parsed = parseFloat((evt.target as HTMLInputElement).value.trim().replace(/,/g, \".\")) || 0\n if (props.step >= 1) {\n parsed = Math.floor(parsed)\n } else {\n parsed = round(parsed, precision.value)\n }\n parsed = clamp(parsed, props.min, props.max)\n if (parsed !== (props.value as number)) {\n reportChange(parsed)\n }\n setInputValueNumber(parsed)\n emit(\"blur\", evt)\n }\n\n const handleInputFocus = (evt: FocusEvent) => {\n const target = evt.currentTarget as HTMLInputElement\n target.setSelectionRange(0, target.value.length)\n emit(\"focus\", evt)\n }\n\n // Radix value/onChange wiring\n const handleValueChange = (values: number[]) => {\n if (props.disabled) return\n debouncedOnChange.cancel()\n reportChange(isRange() ? values : values[0]!)\n }\n\n return () => {\n // Read every piece of state, as a React render depends on all of them\n const currentInputValue = inputValue.value\n const isPointerDown = pointerDown.value\n const mounted = isMounted.value\n\n const { min, max, unit, prefixUnit, trackColor, rangeColor, disabled, orientation, value } = props\n const range = isRange()\n const isVertical = orientation === \"vertical\"\n const singleValue = range ? 0 : (value as number)\n\n const inputWidth = getValueWidth(currentInputValue)\n\n const animationDurationMS =\n range || !mounted || isPointerDown ? 0 : Math.max(Math.abs(percent.value - getPreviousPercent()) * 300, 100)\n\n const marks = getMarks()\n\n // Radix value\n const radixValue = range ? (value as number[]) : [value as number]\n\n // Single-mode props\n const resetValue = !range ? props.resetValue : undefined\n const resetTooltip = !range ? (props.resetTooltip ?? \"Reset to default\") : undefined\n\n // Range-mode props\n const minStepsBetweenThumbs = range ? props.minStepsBetweenThumbs : undefined\n\n // Show marks only in horizontal orientation\n const showMarks = marks.length > 0 && !isVertical\n\n // Format range display text\n const rangeDisplayText = range\n ? (value as number[]).map((v) => `${prefixUnit ?? \"\"}${v.toFixed(precision.value)}${unit ?? \"\"}`).join(\" – \")\n : \"\"\n\n const labelSlot = slots.label?.()\n const labelContent = hasContent(labelSlot) ? labelSlot : props.label\n // What names the thumbs: an explicit labelledby, else the visible label\n const nameId = props.ariaLabelledby ?? (labelContent ? labelId : undefined)\n const { ariaLabel } = props\n\n // With a symbol at either end the container is the middle column of a grid (Slider.module.css), left to right\n // as the primitive slides, so the start symbol stays at the minimum\n const startAdornment = isVertical ? undefined : slots.startAdornment?.()\n const endAdornment = isVertical ? undefined : slots.endAdornment?.()\n // An empty string is no symbol either, as in React\n const hasStart = hasSlotContent(startAdornment)\n const hasEnd = hasSlotContent(endAdornment)\n const wrapAdorned = (container: VNode) =>\n hasStart || hasEnd\n ? h(\"div\", { \"class\": s.SliderAdorned, \"dir\": \"ltr\", \"data-disabled\": disabled ? \"\" : undefined }, [\n hasStart ? h(\"span\", { \"class\": s.Adornment, \"data-side\": \"start\", \"aria-hidden\": \"true\" }, startAdornment) : null,\n container,\n hasEnd ? h(\"span\", { \"class\": s.Adornment, \"data-side\": \"end\", \"aria-hidden\": \"true\" }, endAdornment) : null,\n ])\n : container\n\n return h(\"div\", { \"class\": [s.SliderWrap, attrs.class], \"data-orientation\": orientation }, [\n labelContent\n ? h(\"div\", { class: s.SliderLabel }, [\n // Range mode renders no value input, so the label only names the thumbs\n h(\"label\", { for: range ? undefined : id, id: labelId, class: \"flex-1\" }, labelContent),\n !range && resetValue !== undefined\n ? h(\n Tooltip,\n { content: resetTooltip!, compact: true },\n {\n default: () =>\n h(\n Button,\n {\n // A phone draws the reset as the small round gray button of the iOS 27 kit beside the\n // row's value: uniform and soft, touch.css makes it the 28px circle that takes touches\n // 44px around it. A desktop one is the bare glyph that shows on hover.\n \"size\": \"2xs\",\n \"variant\": tabletAndUp.value ? \"ghost\" : \"soft\",\n \"color\": \"secondary\",\n \"uniform\": !tabletAndUp.value,\n \"pill\": !tabletAndUp.value,\n \"class\": s.Reset,\n \"aria-label\": resetTooltip,\n \"disabled\": disabled,\n \"data-hide\": disabled || (resetValue === singleValue && !isPointerDown),\n \"onClick\": () => {\n if (disabled) return\n debouncedOnChange.cancel()\n reportChange(resetValue)\n resetPending.value = true\n },\n },\n { default: () => h(Reload) },\n ),\n },\n )\n : null,\n range\n ? h(\"span\", { class: s.RangeDisplay }, rangeDisplayText)\n : h(\"div\", { class: s.SliderValue, onClick: () => { if (!disabled) inputRef.value?.focus() } }, [\n prefixUnit ? h(\"span\", { class: s.ValueUnit }, prefixUnit) : null,\n h(\"input\", {\n \"id\": id,\n \"class\": s.ValueInput,\n \"ref\": inputRef,\n \"style\": { width: inputWidth },\n \"onKeydown\": handleKeyDown,\n // React keeps the `value` attribute in sync with a controlled input\n \"^value\": currentInputValue,\n \"value\": currentInputValue,\n \"type\": \"text\",\n \"inputmode\": min < 0 ? \"text\" : Number.isInteger(min) && Number.isInteger(max) && Number.isInteger(props.step) ? \"numeric\" : \"decimal\",\n \"onClick\": (e: MouseEvent) => e.stopPropagation(),\n \"onBlur\": handleInputBlur,\n \"onFocus\": handleInputFocus,\n \"onInput\": handleInputChange,\n \"disabled\": disabled,\n }),\n unit ? h(\"span\", { class: s.ValueUnit }, unit) : null,\n ]),\n ])\n : null,\n wrapAdorned(h(\"div\", { class: s.SliderContainer }, [\n h(\n SliderRoot,\n {\n \"elementRef\": setRoot,\n \"class\": s.Slider,\n \"onValueChange\": handleValueChange,\n \"min\": min,\n \"max\": max,\n \"step\": props.step,\n \"disabled\": disabled,\n \"values\": radixValue,\n \"orientation\": orientation,\n \"minStepsBetweenThumbs\": minStepsBetweenThumbs,\n // React's onFocus / onBlur bubble from the thumbs\n \"onFocusin\": (evt: FocusEvent) => emit(\"focus\", evt),\n \"onFocusout\": (evt: FocusEvent) => emit(\"blur\", evt),\n \"onPointerdown\": (event: PointerEvent) => {\n if (disabled) return\n pointerDown.value = true\n releasePress?.()\n const { pointerId } = event\n const end = (lift: PointerEvent) => {\n if (lift.pointerId === pointerId) endPress()\n }\n window.addEventListener(\"pointerup\", end, true)\n window.addEventListener(\"pointercancel\", end, true)\n releasePress = () => {\n window.removeEventListener(\"pointerup\", end, true)\n window.removeEventListener(\"pointercancel\", end, true)\n }\n if (range) focusThumbToMove(event, event.currentTarget as HTMLElement, radixValue, props.min, props.max, isVertical, false)\n },\n \"onPointerup\": endPress,\n \"onPointercancel\": endPress,\n \"onLostpointercapture\": endPress,\n \"data-pressed\": isPointerDown ? \"\" : undefined,\n \"data-range\": range ? \"\" : undefined,\n \"style\": toCssVariables({\n \"slider-duration\": `${animationDurationMS}ms`,\n \"slider-track-color\": trackColor,\n \"slider-range-color\": rangeColor,\n }),\n },\n {\n default: () => [\n h(SliderTrack, { class: s.Track }, { default: () => h(SliderRange, { class: s.Range }) }),\n ...(range\n ? (value as number[]).map((_, i) =>\n h(SliderThumb, {\n \"key\": i,\n \"id\": `${id}-thumb-${i}`,\n \"class\": s.Thumb,\n \"style\": thumbPercentStyle((value as number[])[i]!, props.min, props.max),\n // The marks measure the first thumb (all thumbs are the same size)\n \"elementRef\": i === 0 ? setThumb : undefined,\n // Name plus the thumb's own Radix name (\"Minimum\" / \"Maximum\"),\n // so the endpoints stay distinguishable\n \"aria-labelledby\": nameId ? `${nameId} ${id}-thumb-${i}` : undefined,\n // Only pass aria-label when set: it replaces the name Radix gives the thumb\n ...(!nameId && ariaLabel\n ? { \"aria-label\": `${ariaLabel} ${rangeThumbName(i, (value as number[]).length)}`.trim() }\n : {}),\n }),\n )\n : [\n h(SliderThumb, {\n \"class\": s.Thumb,\n \"style\": thumbPercentStyle(value as number, props.min, props.max),\n \"elementRef\": setThumb,\n \"aria-labelledby\": nameId,\n ...(!nameId && ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n }),\n ]),\n ],\n },\n ),\n showMarks ? h(SliderMarks, { marks, getThumb, min, max }) : null,\n ])),\n ])\n }\n },\n})\n\n// Matches the names Radix gives range thumbs on its own\nconst rangeThumbName = (index: number, count: number) =>\n count === 2 ? (index === 0 ? \"Minimum\" : \"Maximum\") : count > 2 ? `Value ${index + 1} of ${count}` : \"\"\n\ntype SliderOwnProps = InstanceType<typeof SliderComponent>[\"$props\"]\n\ntype SliderBaseProps = Omit<\n SliderOwnProps,\n \"range\" | \"value\" | \"resetValue\" | \"resetTooltip\" | \"minStepsBetweenThumbs\" | \"onUpdate:value\" | \"onChange\"\n> & { class?: unknown }\n\n// As in React, `range` decides the value's type and the props that apply\ntype SingleSliderProps = SliderBaseProps & {\n /** When false or omitted, the slider has a single thumb */\n range?: false\n /** The current value of the slider (`v-model:value`) */\n value: number\n /** Value offered as a \"reset to default\" option */\n resetValue?: number\n /** Text of the reset button's tooltip. @default \"Reset to default\" */\n resetTooltip?: string\n \"onUpdate:value\"?: (value: number) => void\n onChange?: (value: number) => void\n}\n\ntype RangeSliderProps = SliderBaseProps & {\n /** The slider has one thumb per value */\n range: true\n /** One value per thumb (`v-model:value`) */\n value: number[]\n /** Minimum number of steps between thumbs */\n minStepsBetweenThumbs?: number\n \"onUpdate:value\"?: (value: number[]) => void\n onChange?: (value: number[]) => void\n}\n\nexport type SliderProps = SingleSliderProps | RangeSliderProps\n\n// The component's own `$props` type the value and the callbacks for both\n// modes, so its instance type takes `SliderProps` in their place\ntype SliderInstance = Omit<InstanceType<typeof SliderComponent>, \"$props\"> & { $props: SliderProps }\n\nexport const Slider = SliderComponent as unknown as Omit<typeof SliderComponent, never> & {\n new (): SliderInstance\n}\n\n/**\n * The value field is as wide as its characters at any font size: tabular digits are one `ch` each, and a sign,\n * a decimal point or a separator about half of one, so a right-aligned value sits next to its prefix unit.\n */\nconst getValueWidth = (text: string): string => {\n const digits = text.replace(/[^0-9]/g, \"\").length\n return `calc(${Math.max(digits + (text.length - digits) / 2, 1)}ch + 1px)`\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../../src/components/Slider/Slider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,CAAC,EACD,eAAe,EACf,SAAS,EACT,GAAG,EACH,KAAK,EACL,KAAK,GAIN,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACxF,OAAO,CAAC,MAAM,oDAAoD,CAAA;AAoBlE,oCAAoC;AACpC,MAAM,KAAK,GAAG,CAAC,MAAc,EAAE,KAAa,EAAE,KAAa,EAAE,EAAE;IAC7D,IAAI,MAAM,GAAG,MAAM,CAAA;IACnB,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,GAAG,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;QACzC,MAAM,GAAG,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,MAA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\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n watch,\n type PropType,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { useBreakpoint } from \"../../composables/useBreakpoints.js\"\nimport { toCssVariables } from \"../../lib/helpers.js\"\nimport { hasContent as hasSlotContent } from \"../../lib/slotContent.js\"\nimport { Button } from \"../Button/index.js\"\nimport { Reload } from \"../Icon/index.js\"\nimport { Tooltip } from \"../Tooltip/index.js\"\nimport { SliderRange, SliderRoot, SliderThumb, SliderTrack } from \"./sliderPrimitive.js\"\nimport s from \"@plexui/styles/components/Slider/Slider.module.css\"\n\n// Vue port of packages/ui/src/components/Slider/Slider.tsx. Props, defaults,\n// rendered DOM and behaviour match React (checked by the parity tests).\n// - `value` + `update:value` (also `change`, as React calls it `onChange`)\n// support `v-model:value`; the value is a number, or an array with `range`.\n// - `label` is a prop or the `label` slot (rich content, e.g. a tooltip).\n// - React's `startAdornment` / `endAdornment` are the slots of those names.\n// - `aria-label` / `aria-labelledby` are the `ariaLabel` / `ariaLabelledby` props.\n// - React's `onFocus` / `onBlur` become the `focus` / `blur` emits: from the\n// value input, and from the thumbs (React's bubbling focus events, so\n// `focusin` / `focusout` on the slider root).\n// - React reads no other props, so other attributes are not passed on.\n// - The slider itself is Radix's, ported in ./sliderPrimitive.ts.\n\nexport type SliderMark = {\n value: number\n label: string\n}\n\n/** lodash `clamp`: NaN stays NaN */\nconst clamp = (number: number, lower: number, upper: number) => {\n let result = number\n if (result === result) {\n result = result <= upper ? result : upper\n result = result >= lower ? result : lower\n }\n return result\n}\n\n/** lodash `round(number, precision)` */\nconst round = (number: number, precision: number) => {\n const digits = Math.min(Math.trunc(precision), 292)\n if (!digits || !Number.isFinite(number)) return Math.round(number)\n let pair = `${number}e`.split(\"e\")\n const value = Math.round(Number(`${pair[0]}e${Number(pair[1]) + digits}`))\n pair = `${value}e`.split(\"e\")\n return Number(`${pair[0]}e${Number(pair[1]) - digits}`)\n}\n\n/** lodash `debounce(func, wait)` with its defaults: trailing call only */\nconst debounce = <T>(func: (value: T) => void, wait: number) => {\n let timer: ReturnType<typeof setTimeout> | undefined\n let lastValue: T\n const debounced = (value: T) => {\n lastValue = value\n if (timer !== undefined) clearTimeout(timer)\n timer = setTimeout(() => {\n timer = undefined\n func(lastValue)\n }, wait)\n }\n debounced.cancel = () => {\n if (timer !== undefined) clearTimeout(timer)\n timer = undefined\n }\n return debounced\n}\n\nconst hasContent = (nodes: VNodeArrayChildren | undefined): boolean =>\n !!nodes?.some((node) => {\n if (node == null || typeof node === \"boolean\") return false\n if (Array.isArray(node)) return hasContent(node)\n if (typeof node !== \"object\") return node !== \"\"\n const vnode = node as VNode\n if (vnode.type === Comment) return false\n if (vnode.type === Fragment) return hasContent(vnode.children as VNodeArrayChildren)\n return true\n })\n\ntype ResizeEntryBox = \"contentBoxSize\" | \"borderBoxSize\" | \"devicePixelContentBoxSize\"\n\n// Same reading as usehooks-ts' useResizeObserver (content-box)\nconst extractSize = (entry: ResizeObserverEntry, box: ResizeEntryBox, sizeType: \"inlineSize\" | \"blockSize\") => {\n const boxSize = entry[box] as ResizeObserverSize[] | ResizeObserverSize | undefined\n if (!boxSize) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"]\n }\n return undefined\n }\n return Array.isArray(boxSize) ? boxSize[0]![sizeType] : boxSize[sizeType]\n}\n\n// The minimum difference we enforce between marks, in pixels\nconst MINIMUM_MARK_SPACING_PX = 16\n\n/**\n * With ticks the knob's centre runs from half its width in from either end, where the ticks stand, but the primitive\n * maps a pointer across the whole root. A pointer event's x is moved, before the primitive reads it, to where its\n * mapping gives the value under the knob's centre: a press on a tick takes that tick's value, and the primitive keeps\n * doing the rest (the thumb it moves, its focus, the range's order). The knob's layout width is scaled as the root is\n * (a pressed knob grows into the lens; an ancestor may be scaled), so the two are measured alike.\n */\nconst onKnobTravel = (event: PointerEvent, root: HTMLElement, thumb: HTMLElement | null) => {\n const rect = root.getBoundingClientRect()\n const scale = root.offsetWidth > 0 ? rect.width / root.offsetWidth : 1\n const knob = (thumb?.offsetWidth ?? 0) * scale\n const travel = rect.width - knob\n if (travel <= 0) return\n const share = clamp((event.clientX - rect.left - knob / 2) / travel, 0, 1)\n Object.defineProperty(event, \"clientX\", { value: rect.left + share * rect.width, configurable: true })\n}\n\n/**\n * A press on the track of a range moves the thumb whose value lies nearest the press, which the slider primitive\n * (a port of Radix) focuses only once that value changes. Focusing it at once lets a phone draw the knob being\n * pressed as the lens of glass (Slider.module.css), even when the press leaves the value as it is. The thumb is\n * the one the primitive moves: the pointer mapped onto min to max across the root (from the right in a\n * right-to-left direction; the port maps left to right), the nearest value, the first on a tie. A press on a\n * thumb itself is left to the primitive, which focuses that thumb.\n */\nconst focusThumbToMove = (event: PointerEvent, root: HTMLElement, values: number[], min: number, max: number, vertical: boolean, rtl: boolean) => {\n const thumbs = Array.from(root.querySelectorAll<HTMLElement>('[role=\"slider\"]'))\n if (thumbs.includes(event.target as HTMLElement)) return\n const rect = root.getBoundingClientRect()\n const ratio = vertical ? (rect.bottom - event.clientY) / rect.height : (rtl ? rect.right - event.clientX : event.clientX - rect.left) / rect.width\n const pointerValue = min + ratio * (max - min)\n const distances = values.map((value) => Math.abs(value - pointerValue))\n const thumb = thumbs[distances.indexOf(Math.min(...distances))]\n if (thumb && thumb !== document.activeElement) thumb.focus({ preventScroll: true, focusVisible: false } as FocusOptions)\n}\n\n/** A knob's value from 0 to 1, by which a phone stands the knob on its value as iOS does (Slider.module.css). */\nconst thumbPercentStyle = (value: number, min: number, max: number) => ({\n \"--slider-thumb-percent\": String(max > min ? clamp((value - min) / (max - min), 0, 1) : 0),\n})\n\n/**\n * Where a knob's centre stands at a value (0 to 1), from the start of a track `width` wide. The primitive (Radix)\n * eases the knob over the whole track to keep it inside; on a phone it stands on the value and stops half its\n * width from each end, as iOS (`clamped`, Slider.module.css).\n */\nconst thumbCentre = (percent: number, width: number, thumbHalf: number, clamped: boolean) =>\n clamped ? clamp(percent * width, thumbHalf, width - thumbHalf) : percent * width + thumbHalf * (1 - 2 * percent)\n\nconst SliderMarks = defineComponent({\n name: \"SliderMarks\",\n props: {\n marks: { type: Array as PropType<SliderMark[]>, required: true },\n getThumb: { type: Function as PropType<() => HTMLElement | null>, required: true },\n min: { type: Number, required: true },\n max: { type: Number, required: true },\n /** With ticks a phone's knob travels as the primitive places it, not clamped (Slider.module.css): the marks move with it */\n ticks: { type: Boolean, default: false },\n },\n setup(props) {\n // We seperate the container and measure divs so that our resize observer\n // does not fire when we adjust the height of the marks container.\n const marksContainerRef = ref<HTMLDivElement | null>(null)\n const measureRef = ref<HTMLDivElement | null>(null)\n\n // We measure the width of the slider within this component so that sliders\n // without marks do not pay a performance penalty.\n const sliderWidth = ref<number | undefined>(undefined)\n // The knob's travel changes at the phone breakpoint (Slider.module.css), also where the width stays\n const tabletAndUp = useBreakpoint(\"md\")\n let observer: ResizeObserver | undefined\n\n // React's useLayoutEffect on [marks, thumbRef, min, max, sliderWidth]\n const layoutMarks = () => {\n const thumb = props.getThumb()\n const container = marksContainerRef.value\n\n // Impossible\n if (!thumb || !container) {\n return\n }\n\n const markElements = Array.from(container.querySelectorAll<HTMLDivElement>(\"[data-mark]\"))\n\n // Its layout width: a pressed knob is scaled into the lens\n const thumbHalfWidth = thumb.offsetWidth / 2\n const clamped = getComputedStyle(thumb).getPropertyValue(\"--slider-thumb-travel\").trim() === \"clamped\"\n\n // Over the track on an iOS phone the marks at the ends of the range stand this far in from the track's ends\n // (touch.css); elsewhere they are centred under their values like the rest\n const endInset = parseFloat(getComputedStyle(container).getPropertyValue(\"--slider-mark-end-inset\"))\n\n // Wipe all styles so we can accurately determine the positions of the marks\n markElements.forEach((markEl) => {\n markEl.style.width = \"\"\n markEl.style.display = \"\"\n })\n\n const width = sliderWidth.value\n const { marks, min, max } = props\n\n const positionMarks = () => {\n if (!width) {\n return\n }\n\n markElements.forEach((markEl, index) => {\n const markValue = marks[index]!.value\n const valuePercent = (markValue - min) / (max - min)\n const markWidth = markEl.getBoundingClientRect().width\n const markHalfWidth = markWidth / 2\n\n // Under the knob's centre at the mark's value, accounting for the width of the mark itself\n let left = thumbCentre(valuePercent, width, thumbHalfWidth, clamped) - markHalfWidth\n\n // Clamp to the left and right bounds of the container\n const inset = Number.isNaN(endInset) ? 0 : endInset\n left = Math.max(inset, Math.min(left, width - inset - markWidth))\n if (!Number.isNaN(endInset) && markValue === min) left = inset\n if (!Number.isNaN(endInset) && markValue === max) left = Math.max(inset, width - inset - markWidth)\n\n markEl.style.left = `${left}px`\n })\n }\n\n const marksHaveCollisions = () => {\n for (let i = 0; i < markElements.length - 1; i++) {\n const currentRect = markElements[i]!.getBoundingClientRect()\n const nextRect = markElements[i + 1]!.getBoundingClientRect()\n\n if (currentRect.right + MINIMUM_MARK_SPACING_PX > nextRect.left) {\n return true\n }\n }\n return false\n }\n\n positionMarks()\n\n // If we have collisions, try to wrap the content\n if (marksHaveCollisions()) {\n markElements.forEach((markEl) => {\n markEl.style.width = \"min-content\"\n })\n\n positionMarks()\n\n // Hide all marks if we still have collisions\n if (marksHaveCollisions()) {\n markElements.forEach((markEl) => {\n markEl.style.display = \"none\"\n })\n }\n }\n\n const tallestHeight = Math.max(...markElements.map((markEl) => markEl.getBoundingClientRect().height))\n\n // Give our container a height so that we allocate space on the page\n // for the marks and push down other content when we have to wrap\n container.style.height = tallestHeight > 0 ? `${tallestHeight}px` : \"\"\n // Placed against the slider's width: the marks show, at their own height (Slider.module.css)\n if (width) container.dataset.measured = \"\"\n }\n\n onMounted(() => {\n layoutMarks()\n\n // usehooks-ts useResizeObserver: only a changed content box updates the width\n const measure = measureRef.value\n if (!measure || typeof window === \"undefined\" || !(\"ResizeObserver\" in window)) {\n return\n }\n const previousSize: { width?: number; height?: number } = { width: undefined, height: undefined }\n observer = new ResizeObserver(([entry]) => {\n const width = extractSize(entry!, \"contentBoxSize\", \"inlineSize\")\n const height = extractSize(entry!, \"contentBoxSize\", \"blockSize\")\n if (previousSize.width === width && previousSize.height === height) {\n return\n }\n previousSize.width = width\n previousSize.height = height\n sliderWidth.value = width\n })\n observer.observe(measure, { box: \"content-box\" })\n })\n\n onBeforeUnmount(() => {\n observer?.disconnect()\n })\n\n watch([() => props.marks, () => props.min, () => props.max, sliderWidth, tabletAndUp, () => props.ticks], layoutMarks, { flush: \"post\" })\n\n return () =>\n h(\"div\", { class: s.MarksContainer, ref: marksContainerRef }, [\n h(\n \"div\",\n { ref: measureRef },\n props.marks.map((mark) =>\n h(\"div\", { \"key\": mark.value, \"class\": s.Mark, \"data-mark\": \"true\" }, [\n h(\"span\", { class: s.MarkLabel }, mark.label),\n ]),\n ),\n ),\n ])\n },\n})\n\n/** Where the steps are this many, the dots could not stand 9px apart on any screen: none are drawn */\nconst MAX_TICKS = 300\n// The least room between two dots: three dots' widths\nconst MINIMUM_TICK_SPACING_PX = 9\n\n/** The values `ticks` names, within the scale, each once and in order */\nconst tickValues = (values: number[], min: number, max: number) =>\n [...new Set(values.filter((value) => Number.isFinite(value) && value >= min && value <= max))].sort((a, b) => a - b)\n\n/**\n * The dots of `ticks`, at each step or at the values named, placed by CSS (Slider.module.css) from their share of the\n * knob's travel; they show once the track's width puts the closest two 9px apart or more.\n */\nconst SliderTicks = defineComponent({\n name: \"SliderTicks\",\n props: { shares: { type: Array as PropType<number[]>, required: true } },\n setup(props) {\n const el = ref<HTMLSpanElement | null>(null)\n const width = ref<number | undefined>(undefined)\n const shown = ref(false)\n // The knob widens at the phone breakpoint (14 to 38), also where the track's width stays\n const tabletAndUp = useBreakpoint(\"md\")\n let observer: ResizeObserver | undefined\n const measure = () => {\n if (!el.value || !width.value) return\n const thumb = parseFloat(getComputedStyle(el.value).getPropertyValue(\"--slider-thumb-width\")) || 14\n const shares = props.shares\n const closest = shares.reduce((least, share, i) => (i === 0 ? least : Math.min(least, share - shares[i - 1]!)), 1)\n shown.value = (width.value - thumb) * closest >= MINIMUM_TICK_SPACING_PX\n }\n onMounted(() => {\n const target = el.value\n if (!target || typeof window === \"undefined\" || !(\"ResizeObserver\" in window)) return\n observer = new ResizeObserver(([entry]) => {\n const next = extractSize(entry!, \"contentBoxSize\", \"inlineSize\")\n if (next !== width.value) width.value = next\n })\n observer.observe(target, { box: \"content-box\" })\n })\n onBeforeUnmount(() => observer?.disconnect())\n watch([width, () => props.shares.join(\",\"), tabletAndUp], measure, { flush: \"post\" })\n return () =>\n h(\n \"span\",\n { \"ref\": el, \"class\": s.Ticks, \"aria-hidden\": \"true\", \"data-shown\": shown.value ? \"\" : undefined },\n props.shares.map((share, index) =>\n h(\"span\", { \"key\": index, \"class\": s.Tick, \"data-tick\": \"\", \"style\": { \"--slider-tick-at\": String(share) } }),\n ),\n )\n },\n})\n\nconst SliderComponent = defineComponent({\n name: \"Slider\",\n inheritAttrs: false,\n props: {\n /** The minimum value the slider can have */\n min: { type: Number, required: true },\n /** The maximum value the slider can have */\n max: { type: Number, required: true },\n /** The step increment between slider values */\n step: { type: Number, required: true },\n /**\n * The current value: a number, or an array of values (one per thumb)\n * with `range`. Bind with `v-model:value`.\n */\n value: { type: [Number, Array] as PropType<number | number[]>, required: true },\n /** When true, the slider has one thumb per value of the `value` array. @default false */\n range: { type: Boolean, default: false },\n /** Unit to display next to the slider value (e.g., ms, px) */\n unit: String,\n /** Unit to display before the slider value (e.g., $) */\n prefixUnit: String,\n /** Label for the slider; the `label` slot takes rich content */\n label: String,\n /** Accessible name for the slider when there is no visible `label` */\n ariaLabel: String,\n /** Id of an element that names the slider; takes precedence over `label` */\n ariaLabelledby: String,\n /**\n * Labels of points of the scale, each at the knob's place at its value: under the track, or over it on an iOS\n * phone (touch.css), as Settings' Balance writes L, its value and R (15/20, the baseline 31px over the track's\n * middle, a mark at either end of the range 5px in from that end of the track). Horizontal only.\n */\n marks: Array as PropType<SliderMark[]>,\n /**\n * A dot at each step under the track, where the knob's centre stands on it, the knob covering its own: iOS\n * 27.2's ticks on a phone (3px, 8.5px under the track's middle, `--slider-tick-*`), drawn where the steps stand\n * 9px or more apart. Horizontal only; the Plex Android phone draws none. An array of values puts the dots at those\n * values only, as Settings' Balance marks its ends and its middle under a slider of fine steps. @default false\n */\n ticks: { type: [Boolean, Array] as PropType<boolean | number[]>, default: false },\n /** Color of the slider track */\n trackColor: String,\n /** Color of the slider progress along the track */\n rangeColor: String,\n /** Disables the slider and its value input. @default false */\n disabled: { type: Boolean, default: false },\n /** Orientation of the slider. @default \"horizontal\" */\n orientation: { type: String as PropType<\"horizontal\" | \"vertical\">, default: \"horizontal\" },\n /** Value offered as a \"reset to default\" option (single thumb only) */\n resetValue: Number,\n /** Text of the reset button's tooltip (single thumb only). @default \"Reset to default\" */\n resetTooltip: String,\n /** Minimum number of steps between thumbs (range only) */\n minStepsBetweenThumbs: Number,\n },\n emits: {\n /** The value changed (`v-model:value`): a number, or an array with `range` */\n \"update:value\": (_value: number | number[]) => { void _value; return true },\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (_value: number | number[]) => { void _value; return true },\n /** The value input or a thumb gained focus */\n \"focus\": (_event: FocusEvent) => { void _event; return true },\n /** The value input or a thumb lost focus */\n \"blur\": (_event: FocusEvent) => { void _event; return true },\n },\n setup(props, { attrs, slots, emit, expose }) {\n const id = useId()\n const labelId = `${id}-label`\n const isRange = () => props.range === true\n const precision = computed(() => String(props.step).split(\".\")[1]?.length ?? 0)\n\n const reportChange = (value: number | number[]) => {\n emit(\"update:value\", value)\n emit(\"change\", value)\n }\n\n // Single-mode state for editable input\n const inputValue = ref<string>(isRange() ? \"\" : String((props.value as number).toFixed(precision.value)))\n const setInputValueNumber = (nextValue: number) => {\n inputValue.value = nextValue.toFixed(precision.value)\n }\n\n // prevents input from jumping around while the user is typing; an\n // immediate change (a key, blur) cancels the pending typed one\n const debouncedOnChange = debounce((value: number) => {\n if (!props.disabled && !isRange()) reportChange(value)\n }, 250)\n // Cancel pending input when its owner unmounts.\n onBeforeUnmount(() => debouncedOnChange.cancel())\n\n const pointerDown = ref(false)\n // A phone's reset is a button of its own beside the value (below)\n const tabletAndUp = useBreakpoint(\"md\")\n // A press ends where the finger lifts, even when something else takes the pointer away (a sheet that a touch\n // drags, a scroll the browser takes over): the slider's own pointerup never comes then, so the window hears the\n // lift and a lost capture ends the press too.\n let releasePress: (() => void) | null = null\n // Whether the last render drew ticks\n let ticked = false\n const endPress = () => {\n releasePress?.()\n releasePress = null\n pointerDown.value = false\n }\n onBeforeUnmount(() => releasePress?.())\n const resetPending = ref(false)\n // Read the controlled owner after a reset request, including a refused request.\n watch([resetPending, () => props.value, isRange], () => {\n if (!resetPending.value) return\n resetPending.value = false\n if (!isRange()) setInputValueNumber(props.value as number)\n }, { flush: \"post\" })\n watch([() => props.disabled, isRange, () => props.value, precision], () => {\n if (!props.disabled) return\n debouncedOnChange.cancel()\n endPress()\n // A sync watcher runs at each prop as Vue sets them one by one: a disabled range switched to one thumb has\n // range off here while its value is still the array, and the number comes with the next prop\n if (!isRange() && typeof props.value === \"number\") setInputValueNumber(props.value)\n }, { flush: \"sync\" })\n const isMounted = ref(false)\n\n // Used to position the input over the thumb\n const inputRef = ref<HTMLInputElement | null>(null)\n const rootRef = ref<HTMLElement | null>(null)\n // We assume that the width of the thumb does not change from render to render\n let thumbElement: HTMLElement | null = null\n const setRoot = (element: HTMLElement | null) => {\n rootRef.value = element\n }\n const setThumb = (element: HTMLElement | null) => {\n thumbElement = element\n }\n const getThumb = () => thumbElement\n\n expose({ root: rootRef })\n\n // Calculate animation duration based on the distance the thumb needs to move\n // Skip custom animation for range mode: let Radix handle it\n const percent = computed(() => (isRange() ? 0 : ((props.value as number) - props.min) / (props.max - props.min)))\n // Plex's usePrevious: the percent before its latest change (recorded after\n // the render that changed it), the same across renders that keep it\n let lastPercent = percent.value\n let previousPercent = percent.value\n watch(\n percent,\n (next) => {\n previousPercent = lastPercent\n lastPercent = next\n },\n { flush: \"post\" },\n )\n const getPreviousPercent = () => (Object.is(lastPercent, percent.value) ? previousPercent : lastPercent)\n\n // Sort marks for collision detection (again only when a value or label changes, as in React)\n const marksKey = () => JSON.stringify((props.marks ?? []).map(({ value, label }) => [value, label]))\n let sortedMarks: SliderMark[] = []\n let sortedMarksKey: string | undefined\n const getMarks = () => {\n const key = marksKey()\n if (key !== sortedMarksKey) {\n sortedMarks = [...(props.marks ?? [])].sort((a, b) => a.value - b.value)\n sortedMarksKey = key\n }\n return sortedMarks\n }\n\n // Validate marks\n const validateMarks = () => {\n const markValues = new Set<number>()\n for (const mark of getMarks()) {\n if (mark.value < props.min || mark.value > props.max) {\n throw new Error(`Slider mark value ${mark.value} is out of bounds [${props.min}, ${props.max}]`)\n }\n if (markValues.has(mark.value)) {\n throw new Error(\"Slider marks must have unique values\")\n }\n markValues.add(mark.value)\n }\n }\n\n // Update value if out of bounds (single mode only)\n const clampOutOfBounds = () => {\n if (isRange()) return\n const v = props.value as number\n const clamped = clamp(v, props.min, props.max)\n if (clamped !== v) {\n reportChange(clamped)\n setInputValueNumber(clamped)\n }\n }\n\n const syncInputValue = () => {\n if (isRange()) return\n if (inputRef.value !== document.activeElement) {\n setInputValueNumber(props.value as number)\n }\n }\n\n // React's mount effects, in their order\n onMounted(() => {\n isMounted.value = true\n validateMarks()\n clampOutOfBounds()\n syncInputValue()\n })\n watch([marksKey, () => props.min, () => props.max], validateMarks, { flush: \"post\" })\n watch([() => props.min, () => props.max, precision, isRange], clampOutOfBounds, { flush: \"post\" })\n watch([() => props.value, precision, isRange], syncInputValue, { flush: \"post\" })\n\n // Single-mode keyboard handler: a key's change replaces a pending typed one\n const handleKeyDown = (evt: KeyboardEvent) => {\n if (props.disabled || isRange()) return\n const singleValue = props.value as number\n const { min, max, step } = props\n if (evt.key === \"Home\") {\n evt.preventDefault()\n debouncedOnChange.cancel()\n reportChange(min)\n setInputValueNumber(min)\n }\n if (evt.key === \"End\") {\n evt.preventDefault()\n debouncedOnChange.cancel()\n reportChange(max)\n setInputValueNumber(max)\n }\n if (evt.key === \"ArrowUp\") {\n evt.preventDefault()\n const multiplier = evt.shiftKey ? 10 : 1\n const next = clamp(singleValue + step * multiplier, min, max)\n debouncedOnChange.cancel()\n reportChange(next)\n setInputValueNumber(next)\n }\n if (evt.key === \"ArrowDown\") {\n evt.preventDefault()\n const multiplier = evt.shiftKey ? 10 : 1\n const next = clamp(singleValue - step * multiplier, min, max)\n debouncedOnChange.cancel()\n reportChange(next)\n setInputValueNumber(next)\n }\n if (evt.key === \"Enter\" || evt.key === \"Escape\") {\n evt.preventDefault()\n ;(evt.currentTarget as HTMLInputElement).blur()\n }\n }\n\n const handleInputChange = (evt: Event) => {\n if (props.disabled || isRange()) return\n const target = evt.currentTarget as HTMLInputElement\n // Mobile decimal keyboards may use a comma. A minus is valid only below zero.\n const nextValue = target.value.trim().replace(/,/g, \".\").replace(props.min < 0 ? /(?!^-)[^\\d.]/g : /[^\\d.]/g, \"\")\n debouncedOnChange.cancel()\n let parsed = parseFloat(nextValue || \"0\")\n if (Number.isNaN(parsed)) {\n // A lone \"-\" or \".\" is a number still being typed: nothing to report yet\n inputValue.value = nextValue\n if (target.value !== nextValue) target.value = nextValue\n return\n }\n parsed = clamp(parsed, props.min, props.max)\n if (props.step >= 1) {\n parsed = Math.floor(parsed)\n }\n debouncedOnChange(parsed)\n inputValue.value = nextValue\n // A controlled React input shows its state again after the event\n if (target.value !== nextValue) target.value = nextValue\n }\n\n const handleInputBlur = (evt: FocusEvent) => {\n if (isRange()) return\n // Blur commits the typed text, so its pending debounced change is dropped\n debouncedOnChange.cancel()\n if (props.disabled) {\n setInputValueNumber(props.value as number)\n emit(\"blur\", evt)\n return\n }\n let parsed = parseFloat((evt.target as HTMLInputElement).value.trim().replace(/,/g, \".\")) || 0\n if (props.step >= 1) {\n parsed = Math.floor(parsed)\n } else {\n parsed = round(parsed, precision.value)\n }\n parsed = clamp(parsed, props.min, props.max)\n if (parsed !== (props.value as number)) {\n reportChange(parsed)\n }\n setInputValueNumber(parsed)\n emit(\"blur\", evt)\n }\n\n const handleInputFocus = (evt: FocusEvent) => {\n const target = evt.currentTarget as HTMLInputElement\n target.setSelectionRange(0, target.value.length)\n emit(\"focus\", evt)\n }\n\n // Radix value/onChange wiring\n const handleValueChange = (primitiveValues: number[]) => {\n if (props.disabled) return\n debouncedOnChange.cancel()\n reportChange(isRange() ? primitiveValues : primitiveValues[0]!)\n }\n\n return () => {\n // Read every piece of state, as a React render depends on all of them\n const currentInputValue = inputValue.value\n const isPointerDown = pointerDown.value\n const mounted = isMounted.value\n\n const { min, max, unit, prefixUnit, trackColor, rangeColor, disabled, orientation, value } = props\n const range = isRange()\n const isVertical = orientation === \"vertical\"\n const singleValue = range ? 0 : (value as number)\n\n const inputWidth = getValueWidth(currentInputValue)\n\n const animationDurationMS =\n range || !mounted || isPointerDown ? 0 : Math.max(Math.abs(percent.value - getPreviousPercent()) * 300, 100)\n\n const marks = getMarks()\n\n // Radix value\n const radixValue = range ? (value as number[]) : [value as number]\n\n // Single-mode props\n const resetValue = !range ? props.resetValue : undefined\n const resetTooltip = !range ? (props.resetTooltip ?? \"Reset to default\") : undefined\n\n // Range-mode props\n const minStepsBetweenThumbs = range ? props.minStepsBetweenThumbs : undefined\n\n // Show marks only in horizontal orientation\n const showMarks = marks.length > 0 && !isVertical\n // A dot at each step: whole steps only, and no more than a wide track could hold 9px apart\n const stepCount = props.step > 0 ? (props.max - props.min) / props.step : 0\n const tickCount = Math.round(stepCount)\n // The dots' shares of the knob's travel: each step's, or those of the values `ticks` names\n const tickShares =\n isVertical || max <= min ? []\n : Array.isArray(props.ticks) ? tickValues(props.ticks, min, max).map((v) => (v - min) / (max - min))\n : props.ticks && tickCount >= 1 && tickCount <= MAX_TICKS && Math.abs(stepCount - tickCount) < 1e-6 ? Array.from({ length: tickCount + 1 }, (_, i) => i / tickCount)\n : []\n const showTicks = tickShares.length > 0\n ticked = showTicks\n\n // Format range display text\n const rangeDisplayText = range\n ? (value as number[]).map((v) => `${prefixUnit ?? \"\"}${v.toFixed(precision.value)}${unit ?? \"\"}`).join(\" – \")\n : \"\"\n\n const labelSlot = slots.label?.()\n const labelContent = hasContent(labelSlot) ? labelSlot : props.label\n // What names the thumbs: an explicit labelledby, else the visible label\n const nameId = props.ariaLabelledby ?? (labelContent ? labelId : undefined)\n const { ariaLabel } = props\n\n // With a symbol at either end the container is the middle column of a grid (Slider.module.css), left to right\n // as the primitive slides, so the start symbol stays at the minimum\n const startAdornment = isVertical ? undefined : slots.startAdornment?.()\n const endAdornment = isVertical ? undefined : slots.endAdornment?.()\n // An empty string is no symbol either, as in React\n const hasStart = hasSlotContent(startAdornment)\n const hasEnd = hasSlotContent(endAdornment)\n const wrapAdorned = (container: VNode) =>\n hasStart || hasEnd\n ? h(\"div\", { \"class\": s.SliderAdorned, \"dir\": \"ltr\", \"data-disabled\": disabled ? \"\" : undefined }, [\n hasStart ? h(\"span\", { \"class\": s.Adornment, \"data-side\": \"start\", \"aria-hidden\": \"true\" }, startAdornment) : null,\n container,\n hasEnd ? h(\"span\", { \"class\": s.Adornment, \"data-side\": \"end\", \"aria-hidden\": \"true\" }, endAdornment) : null,\n ])\n : container\n\n return h(\"div\", { \"class\": [s.SliderWrap, attrs.class], \"data-orientation\": orientation }, [\n labelContent\n ? h(\"div\", { class: s.SliderLabel }, [\n // Range mode renders no value input, so the label only names the thumbs\n h(\"label\", { for: range ? undefined : id, id: labelId, class: \"flex-1\" }, labelContent),\n !range && resetValue !== undefined\n ? h(\n Tooltip,\n { content: resetTooltip!, compact: true },\n {\n default: () =>\n h(\n Button,\n {\n // A phone draws the reset as the small round gray button of the iOS 27 kit beside the\n // row's value: uniform and soft, touch.css makes it the 28px circle that takes touches\n // 44px around it. A desktop one is the bare glyph that shows on hover.\n \"size\": \"2xs\",\n \"variant\": tabletAndUp.value ? \"ghost\" : \"soft\",\n \"color\": \"secondary\",\n \"uniform\": !tabletAndUp.value,\n \"pill\": !tabletAndUp.value,\n \"class\": s.Reset,\n \"aria-label\": resetTooltip,\n \"disabled\": disabled,\n \"data-hide\": disabled || (resetValue === singleValue && !isPointerDown),\n \"onClick\": () => {\n if (disabled) return\n debouncedOnChange.cancel()\n reportChange(resetValue)\n resetPending.value = true\n },\n },\n { default: () => h(Reload) },\n ),\n },\n )\n : null,\n range\n ? h(\"span\", { class: s.RangeDisplay }, rangeDisplayText)\n : h(\"div\", { class: s.SliderValue, onClick: () => { if (!disabled) inputRef.value?.focus() } }, [\n prefixUnit ? h(\"span\", { class: s.ValueUnit }, prefixUnit) : null,\n h(\"input\", {\n \"id\": id,\n \"class\": s.ValueInput,\n \"ref\": inputRef,\n \"style\": { width: inputWidth },\n \"onKeydown\": handleKeyDown,\n // React keeps the `value` attribute in sync with a controlled input\n \"^value\": currentInputValue,\n \"value\": currentInputValue,\n \"type\": \"text\",\n \"inputmode\": min < 0 ? \"text\" : Number.isInteger(min) && Number.isInteger(max) && Number.isInteger(props.step) ? \"numeric\" : \"decimal\",\n \"onClick\": (e: MouseEvent) => e.stopPropagation(),\n \"onBlur\": handleInputBlur,\n \"onFocus\": handleInputFocus,\n \"onInput\": handleInputChange,\n \"disabled\": disabled,\n }),\n unit ? h(\"span\", { class: s.ValueUnit }, unit) : null,\n ]),\n ])\n : null,\n wrapAdorned(h(\"div\", { class: s.SliderContainer }, [\n h(\n SliderRoot,\n {\n \"elementRef\": setRoot,\n \"class\": s.Slider,\n \"onValueChange\": handleValueChange,\n \"min\": min,\n \"max\": max,\n \"step\": props.step,\n \"disabled\": disabled,\n \"values\": radixValue,\n \"orientation\": orientation,\n \"minStepsBetweenThumbs\": minStepsBetweenThumbs,\n // React's onFocus / onBlur bubble from the thumbs\n \"onFocusin\": (evt: FocusEvent) => emit(\"focus\", evt),\n \"onFocusout\": (evt: FocusEvent) => emit(\"blur\", evt),\n \"onPointerdown\": (event: PointerEvent) => {\n if (disabled) return\n if (ticked) onKnobTravel(event, event.currentTarget as HTMLElement, thumbElement)\n pointerDown.value = true\n releasePress?.()\n const { pointerId } = event\n const end = (lift: PointerEvent) => {\n if (lift.pointerId === pointerId) endPress()\n }\n window.addEventListener(\"pointerup\", end, true)\n window.addEventListener(\"pointercancel\", end, true)\n releasePress = () => {\n window.removeEventListener(\"pointerup\", end, true)\n window.removeEventListener(\"pointercancel\", end, true)\n }\n if (range) focusThumbToMove(event, event.currentTarget as HTMLElement, radixValue, props.min, props.max, isVertical, false)\n },\n // The primitive takes the root's own pointermove: the capture phase hears it first\n \"onPointermoveCapture\": (event: PointerEvent) => {\n if (ticked) onKnobTravel(event, event.currentTarget as HTMLElement, thumbElement)\n },\n \"onPointerup\": endPress,\n \"onPointercancel\": endPress,\n \"onLostpointercapture\": endPress,\n \"data-pressed\": isPointerDown ? \"\" : undefined,\n \"data-range\": range ? \"\" : undefined,\n \"data-ticks\": showTicks ? \"\" : undefined,\n \"style\": toCssVariables({\n \"slider-duration\": `${animationDurationMS}ms`,\n \"slider-track-color\": trackColor,\n \"slider-range-color\": rangeColor,\n }),\n },\n {\n default: () => [\n h(SliderTrack, { class: s.Track }, { default: () => [h(SliderRange, { class: s.Range }), showTicks ? h(SliderTicks, { shares: tickShares }) : null] }),\n ...(range\n ? (value as number[]).map((_, i) =>\n h(SliderThumb, {\n \"key\": i,\n \"id\": `${id}-thumb-${i}`,\n \"class\": s.Thumb,\n \"style\": thumbPercentStyle((value as number[])[i]!, props.min, props.max),\n // The marks measure the first thumb (all thumbs are the same size)\n \"elementRef\": i === 0 ? setThumb : undefined,\n // Name plus the thumb's own Radix name (\"Minimum\" / \"Maximum\"),\n // so the endpoints stay distinguishable\n \"aria-labelledby\": nameId ? `${nameId} ${id}-thumb-${i}` : undefined,\n // Only pass aria-label when set: it replaces the name Radix gives the thumb\n ...(!nameId && ariaLabel\n ? { \"aria-label\": `${ariaLabel} ${rangeThumbName(i, (value as number[]).length)}`.trim() }\n : {}),\n }),\n )\n : [\n h(SliderThumb, {\n \"class\": s.Thumb,\n \"style\": thumbPercentStyle(value as number, props.min, props.max),\n \"elementRef\": setThumb,\n \"aria-labelledby\": nameId,\n ...(!nameId && ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n }),\n ]),\n ],\n },\n ),\n showMarks ? h(SliderMarks, { marks, getThumb, min, max, ticks: showTicks }) : null,\n ])),\n ])\n }\n },\n})\n\n// Matches the names Radix gives range thumbs on its own\nconst rangeThumbName = (index: number, count: number) =>\n count === 2 ? (index === 0 ? \"Minimum\" : \"Maximum\") : count > 2 ? `Value ${index + 1} of ${count}` : \"\"\n\ntype SliderOwnProps = InstanceType<typeof SliderComponent>[\"$props\"]\n\ntype SliderBaseProps = Omit<\n SliderOwnProps,\n \"range\" | \"value\" | \"resetValue\" | \"resetTooltip\" | \"minStepsBetweenThumbs\" | \"onUpdate:value\" | \"onChange\"\n> & { class?: unknown }\n\n// As in React, `range` decides the value's type and the props that apply\ntype SingleSliderProps = SliderBaseProps & {\n /** When false or omitted, the slider has a single thumb */\n range?: false\n /** The current value of the slider (`v-model:value`) */\n value: number\n /** Value offered as a \"reset to default\" option */\n resetValue?: number\n /** Text of the reset button's tooltip. @default \"Reset to default\" */\n resetTooltip?: string\n \"onUpdate:value\"?: (value: number) => void\n onChange?: (value: number) => void\n}\n\ntype RangeSliderProps = SliderBaseProps & {\n /** The slider has one thumb per value */\n range: true\n /** One value per thumb (`v-model:value`) */\n value: number[]\n /** Minimum number of steps between thumbs */\n minStepsBetweenThumbs?: number\n \"onUpdate:value\"?: (value: number[]) => void\n onChange?: (value: number[]) => void\n}\n\nexport type SliderProps = SingleSliderProps | RangeSliderProps\n\n// The component's own `$props` type the value and the callbacks for both\n// modes, so its instance type takes `SliderProps` in their place\ntype SliderInstance = Omit<InstanceType<typeof SliderComponent>, \"$props\"> & { $props: SliderProps }\n\nexport const Slider = SliderComponent as unknown as Omit<typeof SliderComponent, never> & {\n new (): SliderInstance\n}\n\n/**\n * The value field is as wide as its characters at any font size: tabular digits are one `ch` each, and a sign,\n * a decimal point or a separator about half of one, so a right-aligned value sits next to its prefix unit.\n */\nconst getValueWidth = (text: string): string => {\n const digits = text.replace(/[^0-9]/g, \"\").length\n return `calc(${Math.max(digits + (text.length - digits) / 2, 1)}ch + 1px)`\n}\n"]}
|
|
@@ -152,6 +152,13 @@ export const TipPopover = defineComponent({
|
|
|
152
152
|
sideOffset: { type: Number, default: 4 },
|
|
153
153
|
/** Shows the Close button. @default true */
|
|
154
154
|
closeButton: { type: Boolean, default: true },
|
|
155
|
+
/**
|
|
156
|
+
* The tip's surface on a phone: `glass`, TipKit's Liquid Glass, or `solid`, the opaque elevated surface iOS draws
|
|
157
|
+
* the tip on with Reduce Transparency (`--tip-popover-background`, the same shape, arrow and shadow), for a tip over
|
|
158
|
+
* a photo or anything busy, where a browser's glass cannot turn its words light or dark to the picture as iOS's does.
|
|
159
|
+
* @default "glass"
|
|
160
|
+
*/
|
|
161
|
+
material: { type: String, default: "glass" },
|
|
155
162
|
},
|
|
156
163
|
emits: {
|
|
157
164
|
/** Close, Escape or a press outside closes the tip. */
|
|
@@ -232,6 +239,7 @@ export const TipPopover = defineComponent({
|
|
|
232
239
|
"forceMount": true,
|
|
233
240
|
"as": TipPopoverElement,
|
|
234
241
|
"class": clsx(s.Popover, attrs.class),
|
|
242
|
+
"data-material": props.material,
|
|
235
243
|
"side": props.side,
|
|
236
244
|
"align": props.align,
|
|
237
245
|
"sideOffset": props.sideOffset,
|