@plexui/vue 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/Alert/Alert.js +16 -4
- package/dist/es/components/Alert/Alert.js.map +1 -1
- package/dist/es/components/ColorPicker/ColorPicker.js +13 -9
- package/dist/es/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/es/components/ColorPicker/ColorWell.js +5 -3
- package/dist/es/components/ColorPicker/ColorWell.js.map +1 -1
- package/dist/es/components/ColorPicker/shared.js +5 -4
- package/dist/es/components/ColorPicker/shared.js.map +1 -1
- package/dist/es/components/ContextMenu/ContextMenu.js +9 -9
- package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -1
- package/dist/es/components/ContextMenu/shared.js +25 -5
- package/dist/es/components/ContextMenu/shared.js.map +1 -1
- package/dist/es/components/DatePicker/DatePicker.js +3 -3
- package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/es/components/DatePicker/useCalendarCollisionPadding.js +25 -0
- package/dist/es/components/DatePicker/useCalendarCollisionPadding.js.map +1 -0
- package/dist/es/components/DateRangePicker/DateRangePicker.js +3 -3
- package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/es/components/Dialog/Dialog.js +2 -2
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Input/Input.js +3 -0
- package/dist/es/components/Input/Input.js.map +1 -1
- package/dist/es/components/Menu/Menu.js +10 -1
- package/dist/es/components/Menu/Menu.js.map +1 -1
- package/dist/es/components/PhoneLayout/PhoneLayout.js +9 -1
- package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -1
- package/dist/es/components/Popover/Popover.js +2 -2
- package/dist/es/components/Popover/Popover.js.map +1 -1
- package/dist/es/components/ProgressSteps/ProgressSteps.js +7 -3
- package/dist/es/components/ProgressSteps/ProgressSteps.js.map +1 -1
- package/dist/es/components/ProgressSteps/index.js.map +1 -1
- package/dist/es/components/Select/Select.js +178 -32
- package/dist/es/components/Select/Select.js.map +1 -1
- package/dist/es/components/SelectControl/SelectControl.js +3 -1
- package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
- package/dist/es/components/Slider/Slider.js +24 -11
- package/dist/es/components/Slider/Slider.js.map +1 -1
- package/dist/es/components/Slider/sliderPrimitive.js +5 -2
- package/dist/es/components/Slider/sliderPrimitive.js.map +1 -1
- package/dist/es/components/Sortable/Sortable.js +1 -1
- package/dist/es/components/Sortable/Sortable.js.map +1 -1
- package/dist/es/components/StatCard/index.js +4 -1
- package/dist/es/components/StatCard/index.js.map +1 -1
- package/dist/es/components/{StatCard/StatCard.js → StatsCard/StatsCard.js} +32 -27
- package/dist/es/components/StatsCard/StatsCard.js.map +1 -0
- package/dist/es/components/StatsCard/index.js +2 -0
- package/dist/es/components/StatsCard/index.js.map +1 -0
- package/dist/es/components/SwipeActions/SwipeActions.js +32 -5
- package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -1
- package/dist/es/components/TabBar/TabBar.js +52 -21
- package/dist/es/components/TabBar/TabBar.js.map +1 -1
- package/dist/es/components/Tabs/Tabs.js +229 -6
- package/dist/es/components/Tabs/Tabs.js.map +1 -1
- package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/es/lib/menuTriggerCover.js +40 -3
- package/dist/es/lib/menuTriggerCover.js.map +1 -1
- package/dist/types/components/ColorPicker/ColorPicker.d.ts +3 -2
- package/dist/types/components/ColorPicker/shared.d.ts +5 -4
- package/dist/types/components/ContextMenu/shared.d.ts +28 -6
- package/dist/types/components/DatePicker/useCalendarCollisionPadding.d.ts +9 -0
- package/dist/types/components/Dialog/Dialog.d.ts +2 -2
- package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +5 -0
- package/dist/types/components/Popover/Popover.d.ts +5 -5
- package/dist/types/components/ProgressSteps/ProgressSteps.d.ts +17 -3
- package/dist/types/components/ProgressSteps/index.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +19 -8
- package/dist/types/components/StatCard/index.d.ts +9 -1
- package/dist/types/components/{StatCard/StatCard.d.ts → StatsCard/StatsCard.d.ts} +19 -19
- package/dist/types/components/StatsCard/index.d.ts +1 -0
- package/dist/types/components/SwipeActions/SwipeActions.d.ts +4 -4
- package/dist/types/components/TabBar/TabBar.d.ts +34 -0
- package/dist/types/components/Tabs/Tabs.d.ts +33 -2
- package/dist/types/components/Toolbar/Toolbar.d.ts +1 -1
- package/dist/types/lib/menuTriggerCover.d.ts +16 -2
- package/package.json +2 -2
- package/dist/es/components/DatePicker/useCalendarGutter.js +0 -14
- package/dist/es/components/DatePicker/useCalendarGutter.js.map +0 -1
- package/dist/es/components/StatCard/StatCard.js.map +0 -1
- package/dist/types/components/DatePicker/useCalendarGutter.d.ts +0 -2
|
@@ -161,9 +161,11 @@ const SelectControlComponent = defineComponent({
|
|
|
161
161
|
"data-selected": selected,
|
|
162
162
|
"data-loading": loading ? "" : undefined,
|
|
163
163
|
"data-invalid": props.invalid ? "" : undefined,
|
|
164
|
-
"data-disabled": disabled ? "" : undefined,
|
|
165
164
|
"aria-disabled": disabled,
|
|
166
165
|
...restAttrs,
|
|
166
|
+
// A wrapping trigger (MenuTrigger) passes its own data-disabled, undefined while it is enabled: the
|
|
167
|
+
// control's disabled state stays, and a disabled trigger still marks it
|
|
168
|
+
"data-disabled": disabled ? "" : restAttrs["data-disabled"],
|
|
167
169
|
"onClick": handleClick,
|
|
168
170
|
"onPointercancel": (evt) => {
|
|
169
171
|
mouseClickHandled = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectControl.js","sourceRoot":"","sources":["../../../../src/components/SelectControl/SelectControl.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAsD,MAAM,KAAK,CAAA;AAExG,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,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C,CAAC,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE;gBAC1D,CAAC,CAAC,QAAQ,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,EAAE,CAAC;gBAC/D,CAAC,CAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE;oBACvJ,CAAC,CAAC,MAAM,EAAE;wBACR,CAAC,EAAE,0nBAA0nB;wBAC7nB,IAAI,EAAE,cAAc;wBACpB,WAAW,EAAE,SAAS;wBACtB,WAAW,EAAE,SAAS;qBACvB,CAAC;iBACH,CAAC;aACH,CAAC,CAAA;IACV,CAAC;CACF,CAAC,CAAA","sourcesContent":["import clsx, { type ClassValue } from \"clsx\"\nimport { defineComponent, h, shallowRef, type Component, type HTMLAttributes, type PropType } from \"vue\"\nimport type { ControlSize, Variants } from \"@plexui/styles/types\"\nimport { handlePressableMouseEnter } from \"../../lib/helpers.js\"\nimport { isHoverPointer } from \"../../lib/inputMode.js\"\nimport { isNestedSelectControl } from \"../../lib/selectPress.js\"\nimport { Button } from \"../Button/index.js\"\nimport { ChevronDown, Dropdown, X } from \"../Icon/index.js\"\nimport { LoadingIndicator } from \"../Indicator/index.js\"\nimport s from \"@plexui/styles/components/SelectControl/SelectControl.module.css\"\n\n// Mouse press-drag-select and touch/assistive click activation mirror React.\n// Nested clear controls keep their own button semantics.\n\nexport type DropdownIconType = \"chevronDown\" | \"dropdown\" | \"none\"\n\ntype Listener = ((...args: never[]) => unknown) | Listener[] | null | undefined\n\n/** Calls a listener attribute, which Vue may hold as an array of handlers. */\nconst callListener = (listener: unknown, ...args: unknown[]) => {\n if (Array.isArray(listener)) {\n for (const handler of listener) callListener(handler, ...args)\n } else if (typeof listener === \"function\") {\n ;(listener as (...params: unknown[]) => unknown)(...args)\n }\n}\n\nconst SelectControlComponent = defineComponent({\n name: \"SelectControl\",\n inheritAttrs: false,\n props: {\n /** Style variant for the control. @default \"outline\" */\n variant: { type: String as PropType<Variants<\"soft\" | \"outline\" | \"ghost\">>, default: \"outline\" },\n /** Determines if the control should be a fully rounded pill shape. @default false */\n pill: { type: Boolean, default: false },\n /** Extends the control to 100% of available width. */\n block: { type: Boolean, default: undefined },\n /** Applies a negative margin using the current gutter to optically align the control with surrounding content. */\n opticallyAlign: String as PropType<\"start\" | \"end\">,\n /** Disables the control visually and from interactions. @default false */\n disabled: { type: Boolean, default: undefined },\n /** Visually indicates that the control is in an invalid state. @default false */\n invalid: { type: Boolean, default: undefined },\n /** Indicates that the control is selected. An unselected state will display placeholder styles. @default false */\n selected: { type: Boolean, default: false },\n /** Displays a clear action that allows the select to be unset; called when it is pressed (`@clear-click`). */\n onClearClick: Function as PropType<() => void>,\n /** Primary handler for when the control is selected with pointer or keyboard events (`@interact`). */\n onInteract: Function as PropType<() => void>,\n /** Enter interacts too, as on a combobox button. Off by default, as Enter may be an attempt to submit a form. @default false */\n interactOnEnter: { type: Boolean, default: false },\n /** Size and spacing of the control: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Displays a loading indicator in place of the dropdown icon and clear action. @default false */\n loading: { type: Boolean, default: undefined },\n /** Icon displayed in the far right of the control. @default \"dropdown\" */\n dropdownIconType: { type: String as PropType<DropdownIconType>, default: \"dropdown\" },\n /** Icon displayed at the start of the control */\n StartIcon: [Object, Function] as PropType<Component>,\n },\n setup(props, { slots, attrs }) {\n const controlRef = shallowRef<HTMLSpanElement | null>(null)\n let mouseClickHandled = false\n\n // Act like a <button> and fire the click handler on keyboard actions\n const handleKeyDown = (evt: KeyboardEvent) => {\n // Enter and Space on a nested control (the clear button) activate that\n // control: neither this handler nor a wrapping trigger's may take them\n if (evt.target !== evt.currentTarget && (evt.key === \" \" || evt.key === \"Enter\")) {\n return\n }\n callListener(attrs.onKeydown, evt)\n if (evt.defaultPrevented || evt.isComposing || evt.keyCode === 229) return\n switch (evt.key) {\n case \"Enter\":\n case \"ArrowDown\":\n case \"ArrowUp\":\n case \" \":\n // NOTE: \"Enter\" may be an attempt to submit a form\n if (evt.key === \"Enter\" && !props.interactOnEnter) {\n break\n }\n\n evt.stopPropagation()\n evt.preventDefault()\n\n controlRef.value?.click()\n break\n default:\n break\n }\n }\n\n const handlePointerDown = (evt: PointerEvent) => {\n mouseClickHandled = false\n if (isNestedSelectControl(evt)) return\n callListener(attrs.onPointerdown, evt)\n if (evt.defaultPrevented) {\n mouseClickHandled = true\n return\n }\n if (evt.button !== 0) return\n if (evt.pointerType === \"pen\" || !isHoverPointer(evt)) return\n evt.stopPropagation()\n mouseClickHandled = true\n if (props.onInteract) {\n evt.preventDefault()\n props.onInteract()\n } else {\n callListener(attrs.onClick, evt)\n }\n }\n\n const handleClick = (evt: MouseEvent) => {\n const handled = mouseClickHandled\n mouseClickHandled = false\n if (props.disabled || props.loading || evt.defaultPrevented || evt.button !== 0 || isNestedSelectControl(evt)) return\n if (handled && evt.detail !== 0) return\n evt.stopPropagation()\n if (props.onInteract) props.onInteract()\n else callListener(attrs.onClick, evt)\n }\n\n const handleClearClick = (evt: MouseEvent) => {\n evt.stopPropagation()\n evt.preventDefault()\n if (props.disabled || props.loading) return\n // The clear button disappears when the value becomes empty.\n controlRef.value?.focus({ preventScroll: true })\n props.onClearClick?.()\n }\n\n return () => {\n const {\n class: className,\n onPointerenter,\n ...restAttrs\n } = attrs as Record<string, unknown> & { onPointerenter?: Listener }\n delete restAttrs.onPointerdown\n delete restAttrs.onPointercancel\n delete restAttrs.onKeydown\n delete restAttrs.onClick\n const { disabled, loading, selected, pill, dropdownIconType, StartIcon } = props\n const clearable = !!props.onClearClick\n const showClearAction = clearable && selected && !loading && !disabled\n const hasDropdownIcon = dropdownIconType && dropdownIconType !== \"none\" && !loading\n const hasAnyTertiaryIndicator = showClearAction || loading || hasDropdownIcon\n const isInteractive = !loading && !disabled\n\n // Intentionally not using <button> and rebuilding the semantics\n return h(\n \"span\",\n {\n \"ref\": controlRef,\n \"class\": clsx(s.SelectControl, className as ClassValue),\n // Recreate <button> semantics\n \"role\": \"button\",\n \"data-slot\": \"select-control\",\n \"tabindex\": disabled ? -1 : 0,\n \"onPointerenter\": (evt: PointerEvent) => {\n handlePressableMouseEnter(evt)\n callListener(onPointerenter, evt)\n },\n \"onPointerdown\": isInteractive ? handlePointerDown : undefined,\n \"onKeydown\": isInteractive ? handleKeyDown : undefined,\n \"data-variant\": props.variant,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-pill\": pill ? \"\" : undefined,\n \"data-size\": props.size,\n \"data-optically-align\": props.opticallyAlign,\n \"aria-busy\": loading ? \"true\" : undefined,\n \"data-selected\": selected,\n \"data-loading\": loading ? \"\" : undefined,\n \"data-invalid\": props.invalid ? \"\" : undefined,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"aria-disabled\": disabled,\n ...restAttrs,\n \"onClick\": handleClick,\n \"onPointercancel\": (evt: PointerEvent) => {\n mouseClickHandled = false\n callListener(attrs.onPointercancel, evt)\n },\n },\n [\n StartIcon ? h(StartIcon, { class: s.StartIcon }) : null,\n h(\"span\", { class: s.TriggerText }, slots.default?.()),\n hasAnyTertiaryIndicator\n ? h(\"div\", { class: s.IndicatorWrapper }, [\n showClearAction\n ? h(\n Button,\n {\n \"aria-label\": \"Clear current value\",\n \"class\": s.Clear,\n // Prevent pointerdown on the trigger from being captured\n \"onPointerdown\": (evt: PointerEvent) => evt.stopPropagation(),\n \"onClick\": handleClearClick,\n \"color\": \"secondary\",\n \"variant\": hasDropdownIcon ? \"ghost\" : \"solid\",\n // Mostly custom sizing through variables\n \"size\": \"3xs\",\n \"uniform\": true,\n \"pill\": pill,\n \"data-only-child\": !hasDropdownIcon ? \"\" : undefined,\n },\n { default: () => [h(X)] },\n )\n : null,\n loading ? h(LoadingIndicator, { class: s.LoadingIndicator }) : null,\n // Using raw SVG canvases (opposed to fixed icon canvases) led to less pixelation.\n hasDropdownIcon ? h(DropdownIcon, { iconType: dropdownIconType }) : null,\n ])\n : null,\n ],\n )\n }\n },\n})\n\ntype SelectControlOwnProps = InstanceType<typeof SelectControlComponent>[\"$props\"]\n\n/** SelectControl props plus the <span> attributes that fall through to it, as in React. */\nexport type SelectControlProps = SelectControlOwnProps & Omit<HTMLAttributes, keyof SelectControlOwnProps>\n\n/**\n * The trigger of a select: placeholder styles, start icon, clear action,\n * loading and dropdown indicators. Pair it with any floating UI (MenuTrigger,\n * PopoverTrigger); the default slot is the control's content.\n */\nexport const SelectControl = SelectControlComponent as typeof SelectControlComponent & {\n new (): { $props: SelectControlProps }\n}\n\nexport const DropdownIcon = defineComponent({\n name: \"DropdownIcon\",\n props: {\n iconType: { type: String as PropType<Exclude<DropdownIconType, \"none\">>, required: true },\n },\n setup(props) {\n return () =>\n props.iconType === \"chevronDown\"\n ? h(ChevronDown, { \"data-no-autosize\": \"\", class: clsx(s.DropdownIcon, s.DropdownIconChevron) })\n : h(\"span\", { class: s.DropdownIcon, \"aria-hidden\": \"true\" }, [\n h(Dropdown, { \"data-no-autosize\": \"\", class: s.DropdownGlyph }),\n h(\"svg\", { \"data-no-autosize\": \"\", class: s.MobileDropdownGlyph, width: \"20\", height: \"20\", viewBox: \"0 0 20 20\", fill: \"none\", \"aria-hidden\": \"true\" }, [\n h(\"path\", {\n d: \"M9.41074 2.74408C9.73618 2.41864 10.2638 2.41864 10.5893 2.74408L14.7559 6.91074C15.0814 7.23618 15.0814 7.76382 14.7559 8.08926C14.4305 8.41469 13.9028 8.41469 13.5774 8.08926L10 4.51184L6.42259 8.08926C6.09715 8.41469 5.56951 8.41469 5.24408 8.08926C4.91864 7.76382 4.91864 7.23618 5.24408 6.91074L9.41074 2.74408ZM5.24408 11.9107C5.56951 11.5853 6.09715 11.5853 6.42259 11.9107L10 15.4882L13.5774 11.9107C13.9028 11.5853 14.4305 11.5853 14.7559 11.9107C15.0814 12.2362 15.0814 12.7638 14.7559 13.0893L10.5893 17.2559C10.2638 17.5814 9.73618 17.5814 9.41074 17.2559L5.24408 13.0893C4.91864 12.7638 4.91864 12.2362 5.24408 11.9107Z\",\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n \"clip-rule\": \"evenodd\",\n }),\n ]),\n ])\n },\n})\n"]}
|
|
1
|
+
{"version":3,"file":"SelectControl.js","sourceRoot":"","sources":["../../../../src/components/SelectControl/SelectControl.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAsD,MAAM,KAAK,CAAA;AAExG,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,CAAC,MAAM,kEAAkE,CAAA;AAShF,8EAA8E;AAC9E,MAAM,YAAY,GAAG,CAAC,QAAiB,EAAE,GAAG,IAAe,EAAE,EAAE;IAC7D,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,KAAK,MAAM,OAAO,IAAI,QAAQ;YAAE,YAAY,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAA;IAChE,CAAC;SAAM,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC1C,CAAC;QAAC,QAA8C,CAAC,GAAG,IAAI,CAAC,CA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\nimport { defineComponent, h, shallowRef, type Component, type HTMLAttributes, type PropType } from \"vue\"\nimport type { ControlSize, Variants } from \"@plexui/styles/types\"\nimport { handlePressableMouseEnter } from \"../../lib/helpers.js\"\nimport { isHoverPointer } from \"../../lib/inputMode.js\"\nimport { isNestedSelectControl } from \"../../lib/selectPress.js\"\nimport { Button } from \"../Button/index.js\"\nimport { ChevronDown, Dropdown, X } from \"../Icon/index.js\"\nimport { LoadingIndicator } from \"../Indicator/index.js\"\nimport s from \"@plexui/styles/components/SelectControl/SelectControl.module.css\"\n\n// Mouse press-drag-select and touch/assistive click activation mirror React.\n// Nested clear controls keep their own button semantics.\n\nexport type DropdownIconType = \"chevronDown\" | \"dropdown\" | \"none\"\n\ntype Listener = ((...args: never[]) => unknown) | Listener[] | null | undefined\n\n/** Calls a listener attribute, which Vue may hold as an array of handlers. */\nconst callListener = (listener: unknown, ...args: unknown[]) => {\n if (Array.isArray(listener)) {\n for (const handler of listener) callListener(handler, ...args)\n } else if (typeof listener === \"function\") {\n ;(listener as (...params: unknown[]) => unknown)(...args)\n }\n}\n\nconst SelectControlComponent = defineComponent({\n name: \"SelectControl\",\n inheritAttrs: false,\n props: {\n /** Style variant for the control. @default \"outline\" */\n variant: { type: String as PropType<Variants<\"soft\" | \"outline\" | \"ghost\">>, default: \"outline\" },\n /** Determines if the control should be a fully rounded pill shape. @default false */\n pill: { type: Boolean, default: false },\n /** Extends the control to 100% of available width. */\n block: { type: Boolean, default: undefined },\n /** Applies a negative margin using the current gutter to optically align the control with surrounding content. */\n opticallyAlign: String as PropType<\"start\" | \"end\">,\n /** Disables the control visually and from interactions. @default false */\n disabled: { type: Boolean, default: undefined },\n /** Visually indicates that the control is in an invalid state. @default false */\n invalid: { type: Boolean, default: undefined },\n /** Indicates that the control is selected. An unselected state will display placeholder styles. @default false */\n selected: { type: Boolean, default: false },\n /** Displays a clear action that allows the select to be unset; called when it is pressed (`@clear-click`). */\n onClearClick: Function as PropType<() => void>,\n /** Primary handler for when the control is selected with pointer or keyboard events (`@interact`). */\n onInteract: Function as PropType<() => void>,\n /** Enter interacts too, as on a combobox button. Off by default, as Enter may be an attempt to submit a form. @default false */\n interactOnEnter: { type: Boolean, default: false },\n /** Size and spacing of the control: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Displays a loading indicator in place of the dropdown icon and clear action. @default false */\n loading: { type: Boolean, default: undefined },\n /** Icon displayed in the far right of the control. @default \"dropdown\" */\n dropdownIconType: { type: String as PropType<DropdownIconType>, default: \"dropdown\" },\n /** Icon displayed at the start of the control */\n StartIcon: [Object, Function] as PropType<Component>,\n },\n setup(props, { slots, attrs }) {\n const controlRef = shallowRef<HTMLSpanElement | null>(null)\n let mouseClickHandled = false\n\n // Act like a <button> and fire the click handler on keyboard actions\n const handleKeyDown = (evt: KeyboardEvent) => {\n // Enter and Space on a nested control (the clear button) activate that\n // control: neither this handler nor a wrapping trigger's may take them\n if (evt.target !== evt.currentTarget && (evt.key === \" \" || evt.key === \"Enter\")) {\n return\n }\n callListener(attrs.onKeydown, evt)\n if (evt.defaultPrevented || evt.isComposing || evt.keyCode === 229) return\n switch (evt.key) {\n case \"Enter\":\n case \"ArrowDown\":\n case \"ArrowUp\":\n case \" \":\n // NOTE: \"Enter\" may be an attempt to submit a form\n if (evt.key === \"Enter\" && !props.interactOnEnter) {\n break\n }\n\n evt.stopPropagation()\n evt.preventDefault()\n\n controlRef.value?.click()\n break\n default:\n break\n }\n }\n\n const handlePointerDown = (evt: PointerEvent) => {\n mouseClickHandled = false\n if (isNestedSelectControl(evt)) return\n callListener(attrs.onPointerdown, evt)\n if (evt.defaultPrevented) {\n mouseClickHandled = true\n return\n }\n if (evt.button !== 0) return\n if (evt.pointerType === \"pen\" || !isHoverPointer(evt)) return\n evt.stopPropagation()\n mouseClickHandled = true\n if (props.onInteract) {\n evt.preventDefault()\n props.onInteract()\n } else {\n callListener(attrs.onClick, evt)\n }\n }\n\n const handleClick = (evt: MouseEvent) => {\n const handled = mouseClickHandled\n mouseClickHandled = false\n if (props.disabled || props.loading || evt.defaultPrevented || evt.button !== 0 || isNestedSelectControl(evt)) return\n if (handled && evt.detail !== 0) return\n evt.stopPropagation()\n if (props.onInteract) props.onInteract()\n else callListener(attrs.onClick, evt)\n }\n\n const handleClearClick = (evt: MouseEvent) => {\n evt.stopPropagation()\n evt.preventDefault()\n if (props.disabled || props.loading) return\n // The clear button disappears when the value becomes empty.\n controlRef.value?.focus({ preventScroll: true })\n props.onClearClick?.()\n }\n\n return () => {\n const {\n class: className,\n onPointerenter,\n ...restAttrs\n } = attrs as Record<string, unknown> & { onPointerenter?: Listener }\n delete restAttrs.onPointerdown\n delete restAttrs.onPointercancel\n delete restAttrs.onKeydown\n delete restAttrs.onClick\n const { disabled, loading, selected, pill, dropdownIconType, StartIcon } = props\n const clearable = !!props.onClearClick\n const showClearAction = clearable && selected && !loading && !disabled\n const hasDropdownIcon = dropdownIconType && dropdownIconType !== \"none\" && !loading\n const hasAnyTertiaryIndicator = showClearAction || loading || hasDropdownIcon\n const isInteractive = !loading && !disabled\n\n // Intentionally not using <button> and rebuilding the semantics\n return h(\n \"span\",\n {\n \"ref\": controlRef,\n \"class\": clsx(s.SelectControl, className as ClassValue),\n // Recreate <button> semantics\n \"role\": \"button\",\n \"data-slot\": \"select-control\",\n \"tabindex\": disabled ? -1 : 0,\n \"onPointerenter\": (evt: PointerEvent) => {\n handlePressableMouseEnter(evt)\n callListener(onPointerenter, evt)\n },\n \"onPointerdown\": isInteractive ? handlePointerDown : undefined,\n \"onKeydown\": isInteractive ? handleKeyDown : undefined,\n \"data-variant\": props.variant,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-pill\": pill ? \"\" : undefined,\n \"data-size\": props.size,\n \"data-optically-align\": props.opticallyAlign,\n \"aria-busy\": loading ? \"true\" : undefined,\n \"data-selected\": selected,\n \"data-loading\": loading ? \"\" : undefined,\n \"data-invalid\": props.invalid ? \"\" : undefined,\n \"aria-disabled\": disabled,\n ...restAttrs,\n // A wrapping trigger (MenuTrigger) passes its own data-disabled, undefined while it is enabled: the\n // control's disabled state stays, and a disabled trigger still marks it\n \"data-disabled\": disabled ? \"\" : restAttrs[\"data-disabled\"],\n \"onClick\": handleClick,\n \"onPointercancel\": (evt: PointerEvent) => {\n mouseClickHandled = false\n callListener(attrs.onPointercancel, evt)\n },\n },\n [\n StartIcon ? h(StartIcon, { class: s.StartIcon }) : null,\n h(\"span\", { class: s.TriggerText }, slots.default?.()),\n hasAnyTertiaryIndicator\n ? h(\"div\", { class: s.IndicatorWrapper }, [\n showClearAction\n ? h(\n Button,\n {\n \"aria-label\": \"Clear current value\",\n \"class\": s.Clear,\n // Prevent pointerdown on the trigger from being captured\n \"onPointerdown\": (evt: PointerEvent) => evt.stopPropagation(),\n \"onClick\": handleClearClick,\n \"color\": \"secondary\",\n \"variant\": hasDropdownIcon ? \"ghost\" : \"solid\",\n // Mostly custom sizing through variables\n \"size\": \"3xs\",\n \"uniform\": true,\n \"pill\": pill,\n \"data-only-child\": !hasDropdownIcon ? \"\" : undefined,\n },\n { default: () => [h(X)] },\n )\n : null,\n loading ? h(LoadingIndicator, { class: s.LoadingIndicator }) : null,\n // Using raw SVG canvases (opposed to fixed icon canvases) led to less pixelation.\n hasDropdownIcon ? h(DropdownIcon, { iconType: dropdownIconType }) : null,\n ])\n : null,\n ],\n )\n }\n },\n})\n\ntype SelectControlOwnProps = InstanceType<typeof SelectControlComponent>[\"$props\"]\n\n/** SelectControl props plus the <span> attributes that fall through to it, as in React. */\nexport type SelectControlProps = SelectControlOwnProps & Omit<HTMLAttributes, keyof SelectControlOwnProps>\n\n/**\n * The trigger of a select: placeholder styles, start icon, clear action,\n * loading and dropdown indicators. Pair it with any floating UI (MenuTrigger,\n * PopoverTrigger); the default slot is the control's content.\n */\nexport const SelectControl = SelectControlComponent as typeof SelectControlComponent & {\n new (): { $props: SelectControlProps }\n}\n\nexport const DropdownIcon = defineComponent({\n name: \"DropdownIcon\",\n props: {\n iconType: { type: String as PropType<Exclude<DropdownIconType, \"none\">>, required: true },\n },\n setup(props) {\n return () =>\n props.iconType === \"chevronDown\"\n ? h(ChevronDown, { \"data-no-autosize\": \"\", class: clsx(s.DropdownIcon, s.DropdownIconChevron) })\n : h(\"span\", { class: s.DropdownIcon, \"aria-hidden\": \"true\" }, [\n h(Dropdown, { \"data-no-autosize\": \"\", class: s.DropdownGlyph }),\n h(\"svg\", { \"data-no-autosize\": \"\", class: s.MobileDropdownGlyph, width: \"20\", height: \"20\", viewBox: \"0 0 20 20\", fill: \"none\", \"aria-hidden\": \"true\" }, [\n h(\"path\", {\n d: \"M9.41074 2.74408C9.73618 2.41864 10.2638 2.41864 10.5893 2.74408L14.7559 6.91074C15.0814 7.23618 15.0814 7.76382 14.7559 8.08926C14.4305 8.41469 13.9028 8.41469 13.5774 8.08926L10 4.51184L6.42259 8.08926C6.09715 8.41469 5.56951 8.41469 5.24408 8.08926C4.91864 7.76382 4.91864 7.23618 5.24408 6.91074L9.41074 2.74408ZM5.24408 11.9107C5.56951 11.5853 6.09715 11.5853 6.42259 11.9107L10 15.4882L13.5774 11.9107C13.9028 11.5853 14.4305 11.5853 14.7559 11.9107C15.0814 12.2362 15.0814 12.7638 14.7559 13.0893L10.5893 17.2559C10.2638 17.5814 9.73618 17.5814 9.41074 17.2559L5.24408 13.0893C4.91864 12.7638 4.91864 12.2362 5.24408 11.9107Z\",\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n \"clip-rule\": \"evenodd\",\n }),\n ]),\n ])\n },\n})\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Comment, Fragment, computed, defineComponent, h, onBeforeUnmount, onMounted, ref, useId, watch, } from "vue";
|
|
2
|
+
import { useBreakpoint } from "../../composables/useBreakpoints.js";
|
|
2
3
|
import { toCssVariables } from "../../lib/helpers.js";
|
|
3
4
|
import { Button } from "../Button/index.js";
|
|
4
5
|
import { Reload } from "../Icon/index.js";
|
|
@@ -91,6 +92,16 @@ const focusThumbToMove = (event, root, values, min, max, vertical, rtl) => {
|
|
|
91
92
|
if (thumb && thumb !== document.activeElement)
|
|
92
93
|
thumb.focus({ preventScroll: true, focusVisible: false });
|
|
93
94
|
};
|
|
95
|
+
/** A knob's value from 0 to 1, by which a phone stands the knob on its value as iOS does (Slider.module.css). */
|
|
96
|
+
const thumbPercentStyle = (value, min, max) => ({
|
|
97
|
+
"--slider-thumb-percent": String(max > min ? clamp((value - min) / (max - min), 0, 1) : 0),
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* Where a knob's centre stands at a value (0 to 1), from the start of a track `width` wide. The primitive (Radix)
|
|
101
|
+
* eases the knob over the whole track to keep it inside; on a phone it stands on the value and stops half its
|
|
102
|
+
* width from each end, as iOS (`clamped`, Slider.module.css).
|
|
103
|
+
*/
|
|
104
|
+
const thumbCentre = (percent, width, thumbHalf, clamped) => clamped ? clamp(percent * width, thumbHalf, width - thumbHalf) : percent * width + thumbHalf * (1 - 2 * percent);
|
|
94
105
|
const SliderMarks = defineComponent({
|
|
95
106
|
name: "SliderMarks",
|
|
96
107
|
props: {
|
|
@@ -107,6 +118,8 @@ const SliderMarks = defineComponent({
|
|
|
107
118
|
// We measure the width of the slider within this component so that sliders
|
|
108
119
|
// without marks do not pay a performance penalty.
|
|
109
120
|
const sliderWidth = ref(undefined);
|
|
121
|
+
// The knob's travel changes at the phone breakpoint (Slider.module.css), also where the width stays
|
|
122
|
+
const tabletAndUp = useBreakpoint("md");
|
|
110
123
|
let observer;
|
|
111
124
|
// React's useLayoutEffect on [marks, thumbRef, min, max, sliderWidth]
|
|
112
125
|
const layoutMarks = () => {
|
|
@@ -117,7 +130,9 @@ const SliderMarks = defineComponent({
|
|
|
117
130
|
return;
|
|
118
131
|
}
|
|
119
132
|
const markElements = Array.from(container.querySelectorAll("[data-mark]"));
|
|
120
|
-
|
|
133
|
+
// Its layout width: a pressed knob is scaled into the lens
|
|
134
|
+
const thumbHalfWidth = thumb.offsetWidth / 2;
|
|
135
|
+
const clamped = getComputedStyle(thumb).getPropertyValue("--slider-thumb-travel").trim() === "clamped";
|
|
121
136
|
// Wipe all styles so we can accurately determine the positions of the marks
|
|
122
137
|
markElements.forEach((markEl) => {
|
|
123
138
|
markEl.style.width = "";
|
|
@@ -134,14 +149,8 @@ const SliderMarks = defineComponent({
|
|
|
134
149
|
const valuePercent = (markValue - min) / (max - min);
|
|
135
150
|
const markWidth = markEl.getBoundingClientRect().width;
|
|
136
151
|
const markHalfWidth = markWidth / 2;
|
|
137
|
-
//
|
|
138
|
-
|
|
139
|
-
// this smoothing so that the marks match the observed breakpoints.
|
|
140
|
-
const smoothedThumb = thumbHalfWidth - valuePercent * (thumbHalfWidth / 0.5);
|
|
141
|
-
// Calculate where we would naively put the mark based on the value
|
|
142
|
-
const naiveLeftOffset = valuePercent * width;
|
|
143
|
-
// Add the thumb smoothing, and account for the width of the mark itself
|
|
144
|
-
let left = naiveLeftOffset + smoothedThumb - markHalfWidth;
|
|
152
|
+
// Under the knob's centre at the mark's value, accounting for the width of the mark itself
|
|
153
|
+
let left = thumbCentre(valuePercent, width, thumbHalfWidth, clamped) - markHalfWidth;
|
|
145
154
|
// Clamp to the left and right bounds of the container
|
|
146
155
|
left = Math.max(0, Math.min(left, width - markWidth));
|
|
147
156
|
markEl.style.left = `${left}px`;
|
|
@@ -202,7 +211,7 @@ const SliderMarks = defineComponent({
|
|
|
202
211
|
onBeforeUnmount(() => {
|
|
203
212
|
observer?.disconnect();
|
|
204
213
|
});
|
|
205
|
-
watch([() => props.marks, () => props.min, () => props.max, sliderWidth], layoutMarks, { flush: "post" });
|
|
214
|
+
watch([() => props.marks, () => props.min, () => props.max, sliderWidth, tabletAndUp], layoutMarks, { flush: "post" });
|
|
206
215
|
return () => h("div", { class: s.MarksContainer, ref: marksContainerRef }, [
|
|
207
216
|
h("div", { ref: measureRef }, props.marks.map((mark) => h("div", { "key": mark.value, "class": s.Mark, "data-mark": "true" }, [
|
|
208
217
|
h("span", { class: s.MarkLabel }, mark.label),
|
|
@@ -301,7 +310,9 @@ const SliderComponent = defineComponent({
|
|
|
301
310
|
return;
|
|
302
311
|
debouncedOnChange.cancel();
|
|
303
312
|
pointerDown.value = false;
|
|
304
|
-
|
|
313
|
+
// A sync watcher runs at each prop as Vue sets them one by one: a disabled range switched to one thumb has
|
|
314
|
+
// range off here while its value is still the array, and the number comes with the next prop
|
|
315
|
+
if (!isRange() && typeof props.value === "number")
|
|
305
316
|
setInputValueNumber(props.value);
|
|
306
317
|
}, { flush: "sync" });
|
|
307
318
|
const isMounted = ref(false);
|
|
@@ -607,6 +618,7 @@ const SliderComponent = defineComponent({
|
|
|
607
618
|
"key": i,
|
|
608
619
|
"id": `${id}-thumb-${i}`,
|
|
609
620
|
"class": s.Thumb,
|
|
621
|
+
"style": thumbPercentStyle(value[i], props.min, props.max),
|
|
610
622
|
// The marks measure the first thumb (all thumbs are the same size)
|
|
611
623
|
"elementRef": i === 0 ? setThumb : undefined,
|
|
612
624
|
// Name plus the thumb's own Radix name ("Minimum" / "Maximum"),
|
|
@@ -620,6 +632,7 @@ const SliderComponent = defineComponent({
|
|
|
620
632
|
: [
|
|
621
633
|
h(SliderThumb, {
|
|
622
634
|
"class": s.Thumb,
|
|
635
|
+
"style": thumbPercentStyle(value, props.min, props.max),
|
|
623
636
|
"elementRef": setThumb,
|
|
624
637
|
"aria-labelledby": nameId,
|
|
625
638
|
...(!nameId && ariaLabel ? { "aria-label": ariaLabel } : {}),
|
|
@@ -1 +1 @@
|
|
|
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,cAAc,EAAE,MAAM,sBAAs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QAAQ;wCACtB,iBAAiB,EAAE,MAAM;wCACzB,GAAG,CAAC,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;qCAC7D,CAAC;iCACH,CAAC;yBACP;qBACF,CACF;oBACD,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;iBACjE,CAAC;aACH,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 { toCssVariables } from \"../../lib/helpers.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// - `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\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 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 const thumbHalfWidth = thumb.getBoundingClientRect().width / 2\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 // Radix smoothes the width of the thumb over the entire track so\n // that the thumb is always within bounds. We need to duplicate\n // this smoothing so that the marks match the observed breakpoints.\n const smoothedThumb = thumbHalfWidth - valuePercent * (thumbHalfWidth / 0.5)\n\n // Calculate where we would naively put the mark based on the value\n const naiveLeftOffset = valuePercent * width\n\n // Add the thumb smoothing, and account for the width of the mark itself\n let left = naiveLeftOffset + smoothedThumb - 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], 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 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 pointerDown.value = false\n if (!isRange()) setInputValueNumber(props.value as number)\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 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 \"size\": \"2xs\",\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\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 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 if (range) focusThumbToMove(event, event.currentTarget as HTMLElement, radixValue, props.min, props.max, isVertical, false)\n },\n \"onPointerup\": () => {\n pointerDown.value = false\n },\n \"onPointercancel\": () => {\n pointerDown.value = false\n },\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 // 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 \"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"],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AAE,MAAM;wCACzB,GAAG,CAAC,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;qCAC7D,CAAC;iCACH,CAAC;yBACP;qBACF,CACF;oBACD,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;iBACjE,CAAC;aACH,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 { 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// - `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 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 pointerDown.value = false\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 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 \"size\": \"2xs\",\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\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 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 if (range) focusThumbToMove(event, event.currentTarget as HTMLElement, radixValue, props.min, props.max, isVertical, false)\n },\n \"onPointerup\": () => {\n pointerDown.value = false\n },\n \"onPointercancel\": () => {\n pointerDown.value = false\n },\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"]}
|
|
@@ -131,6 +131,7 @@ export const SliderRoot = defineComponent({
|
|
|
131
131
|
let isKeyboardInteraction = false;
|
|
132
132
|
let rect;
|
|
133
133
|
const isHorizontal = () => props.orientation === "horizontal";
|
|
134
|
+
const thumbsInOrder = () => Array.from(root.value?.querySelectorAll('[role="slider"]') ?? []);
|
|
134
135
|
const setRoot = (element) => {
|
|
135
136
|
root.value = element ?? null;
|
|
136
137
|
props.elementRef?.(root.value);
|
|
@@ -145,12 +146,14 @@ export const SliderRoot = defineComponent({
|
|
|
145
146
|
valueIndexToChange,
|
|
146
147
|
userRequestedValues,
|
|
147
148
|
thumbs,
|
|
148
|
-
thumbIndex: (thumb) =>
|
|
149
|
+
thumbIndex: (thumb) => thumbsInOrder().indexOf(thumb),
|
|
149
150
|
});
|
|
150
151
|
// Radix's controlled useControllableState: a new array is reported,
|
|
151
152
|
// focusing the thumb that changed first
|
|
152
153
|
const reportValues = (values) => {
|
|
153
|
-
|
|
154
|
+
// In the order of the page, not of the set: Vue mounts new keyed thumbs from the last (a slider turning into a
|
|
155
|
+
// range), so the set may hold them backwards
|
|
156
|
+
const thumbList = thumbsInOrder();
|
|
154
157
|
thumbList[valueIndexToChange.current]?.focus({
|
|
155
158
|
preventScroll: true,
|
|
156
159
|
focusVisible: isKeyboardInteraction,
|