@plexui/vue 0.9.0 → 0.11.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.
Files changed (188) hide show
  1. package/dist/es/components/Alert/Alert.js +6 -2
  2. package/dist/es/components/Alert/Alert.js.map +1 -1
  3. package/dist/es/components/Avatar/Avatar.js +3 -1
  4. package/dist/es/components/Avatar/Avatar.js.map +1 -1
  5. package/dist/es/components/ButtonGroup/ButtonGroup.js +7 -0
  6. package/dist/es/components/ButtonGroup/ButtonGroup.js.map +1 -1
  7. package/dist/es/components/ButtonGroup/index.js.map +1 -1
  8. package/dist/es/components/Checkbox/Checkbox.js +5 -6
  9. package/dist/es/components/Checkbox/Checkbox.js.map +1 -1
  10. package/dist/es/components/ColorPicker/ColorPicker.js +476 -0
  11. package/dist/es/components/ColorPicker/ColorPicker.js.map +1 -0
  12. package/dist/es/components/ColorPicker/ColorWell.js +186 -0
  13. package/dist/es/components/ColorPicker/ColorWell.js.map +1 -0
  14. package/dist/es/components/ColorPicker/index.js +3 -0
  15. package/dist/es/components/ColorPicker/index.js.map +1 -0
  16. package/dist/es/components/ColorPicker/shared.js +132 -0
  17. package/dist/es/components/ColorPicker/shared.js.map +1 -0
  18. package/dist/es/components/ContextMenu/ContextMenu.js +223 -0
  19. package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -0
  20. package/dist/es/components/ContextMenu/index.js +2 -0
  21. package/dist/es/components/ContextMenu/index.js.map +1 -0
  22. package/dist/es/components/ContextMenu/shared.js +58 -0
  23. package/dist/es/components/ContextMenu/shared.js.map +1 -0
  24. package/dist/es/components/DatePicker/DatePicker.js +19 -3
  25. package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
  26. package/dist/es/components/DateRangePicker/DateRangePicker.js +1 -1
  27. package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
  28. package/dist/es/components/Dialog/Dialog.js +245 -25
  29. package/dist/es/components/Dialog/Dialog.js.map +1 -1
  30. package/dist/es/components/Dialog/dialogSteps.js +85 -0
  31. package/dist/es/components/Dialog/dialogSteps.js.map +1 -0
  32. package/dist/es/components/Dialog/dialogViewport.js +74 -0
  33. package/dist/es/components/Dialog/dialogViewport.js.map +1 -0
  34. package/dist/es/components/Dialog/index.js +1 -1
  35. package/dist/es/components/Dialog/index.js.map +1 -1
  36. package/dist/es/components/Dialog/sheetDrag.js +2 -1
  37. package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
  38. package/dist/es/components/Field/Field.js +11 -3
  39. package/dist/es/components/Field/Field.js.map +1 -1
  40. package/dist/es/components/FieldGroup/FieldGroup.js +12 -1
  41. package/dist/es/components/FieldGroup/FieldGroup.js.map +1 -1
  42. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js +2 -2
  43. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js.map +1 -1
  44. package/dist/es/components/Icon/index.js +1 -0
  45. package/dist/es/components/Icon/index.js.map +1 -1
  46. package/dist/es/components/Icon/svg/Eyedropper.js +10 -0
  47. package/dist/es/components/Icon/svg/Eyedropper.js.map +1 -0
  48. package/dist/es/components/IndexBar/IndexBar.js +215 -0
  49. package/dist/es/components/IndexBar/IndexBar.js.map +1 -0
  50. package/dist/es/components/IndexBar/index.js +2 -0
  51. package/dist/es/components/IndexBar/index.js.map +1 -0
  52. package/dist/es/components/Indicator/LoadingIndicator.js +1 -1
  53. package/dist/es/components/Indicator/LoadingIndicator.js.map +1 -1
  54. package/dist/es/components/Input/Input.js +3 -2
  55. package/dist/es/components/Input/Input.js.map +1 -1
  56. package/dist/es/components/MarkdownEditor/MarkdownEditor.js +149 -1
  57. package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
  58. package/dist/es/components/Menu/Menu.js +206 -33
  59. package/dist/es/components/Menu/Menu.js.map +1 -1
  60. package/dist/es/components/Menu/index.js +1 -1
  61. package/dist/es/components/Menu/index.js.map +1 -1
  62. package/dist/es/components/Page/Page.js +43 -11
  63. package/dist/es/components/Page/Page.js.map +1 -1
  64. package/dist/es/components/PageControl/PageControl.js +210 -0
  65. package/dist/es/components/PageControl/PageControl.js.map +1 -0
  66. package/dist/es/components/PageControl/index.js +2 -0
  67. package/dist/es/components/PageControl/index.js.map +1 -0
  68. package/dist/es/components/PhoneLayout/PhoneLayout.js +50 -0
  69. package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -0
  70. package/dist/es/components/PhoneLayout/index.js +2 -0
  71. package/dist/es/components/PhoneLayout/index.js.map +1 -0
  72. package/dist/es/components/Popover/Popover.js +5 -1
  73. package/dist/es/components/Popover/Popover.js.map +1 -1
  74. package/dist/es/components/Popover/deferredPointerDownOutside.js +59 -4
  75. package/dist/es/components/Popover/deferredPointerDownOutside.js.map +1 -1
  76. package/dist/es/components/Select/Select.js +18 -11
  77. package/dist/es/components/Select/Select.js.map +1 -1
  78. package/dist/es/components/SelectControl/SelectControl.js +1 -0
  79. package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
  80. package/dist/es/components/Sidebar/Sidebar.js +21 -6
  81. package/dist/es/components/Sidebar/Sidebar.js.map +1 -1
  82. package/dist/es/components/Slider/Slider.js +44 -9
  83. package/dist/es/components/Slider/Slider.js.map +1 -1
  84. package/dist/es/components/Stepper/Stepper.js +195 -0
  85. package/dist/es/components/Stepper/Stepper.js.map +1 -0
  86. package/dist/es/components/Stepper/index.js +2 -0
  87. package/dist/es/components/Stepper/index.js.map +1 -0
  88. package/dist/es/components/SwipeActions/SwipeActions.js +374 -0
  89. package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -0
  90. package/dist/es/components/SwipeActions/index.js +2 -0
  91. package/dist/es/components/SwipeActions/index.js.map +1 -0
  92. package/dist/es/components/Switch/Switch.js +3 -1
  93. package/dist/es/components/Switch/Switch.js.map +1 -1
  94. package/dist/es/components/TabBar/TabBar.js +205 -0
  95. package/dist/es/components/TabBar/TabBar.js.map +1 -0
  96. package/dist/es/components/TabBar/index.js +2 -0
  97. package/dist/es/components/TabBar/index.js.map +1 -0
  98. package/dist/es/components/Tabs/Tabs.js +10 -2
  99. package/dist/es/components/Tabs/Tabs.js.map +1 -1
  100. package/dist/es/components/TagInput/TagInput.js +3 -46
  101. package/dist/es/components/TagInput/TagInput.js.map +1 -1
  102. package/dist/es/components/Textarea/Textarea.js +2 -0
  103. package/dist/es/components/Textarea/Textarea.js.map +1 -1
  104. package/dist/es/components/Tip/Tip.js +276 -0
  105. package/dist/es/components/Tip/Tip.js.map +1 -0
  106. package/dist/es/components/Tip/index.js +2 -0
  107. package/dist/es/components/Tip/index.js.map +1 -0
  108. package/dist/es/components/Toast/ToastRenderer.js +30 -13
  109. package/dist/es/components/Toast/ToastRenderer.js.map +1 -1
  110. package/dist/es/components/Toast/Toaster.js +17 -6
  111. package/dist/es/components/Toast/Toaster.js.map +1 -1
  112. package/dist/es/components/Toast/toastLifecycle.js +113 -1
  113. package/dist/es/components/Toast/toastLifecycle.js.map +1 -1
  114. package/dist/es/components/Toolbar/Toolbar.js +37 -6
  115. package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
  116. package/dist/es/components/Toolbar/index.js.map +1 -1
  117. package/dist/es/components/Tooltip/slot.js +3 -3
  118. package/dist/es/components/Tooltip/slot.js.map +1 -1
  119. package/dist/es/composables/useEscCloseStack.js +8 -4
  120. package/dist/es/composables/useEscCloseStack.js.map +1 -1
  121. package/dist/es/lib/fieldRow.js +15 -2
  122. package/dist/es/lib/fieldRow.js.map +1 -1
  123. package/dist/es/lib/floatingBoundary.js +3 -1
  124. package/dist/es/lib/floatingBoundary.js.map +1 -1
  125. package/dist/es/lib/helpers.js +21 -0
  126. package/dist/es/lib/helpers.js.map +1 -1
  127. package/dist/es/lib/menuSubmenuPlacement.js +51 -6
  128. package/dist/es/lib/menuSubmenuPlacement.js.map +1 -1
  129. package/dist/es/lib/menuTriggerCover.js +70 -0
  130. package/dist/es/lib/menuTriggerCover.js.map +1 -0
  131. package/dist/es/lib/phoneLayout.js +16 -0
  132. package/dist/es/lib/phoneLayout.js.map +1 -0
  133. package/dist/es/lib/scrollEdges.js +34 -0
  134. package/dist/es/lib/scrollEdges.js.map +1 -0
  135. package/dist/es/lib/toastRegion.js +6 -0
  136. package/dist/es/lib/toastRegion.js.map +1 -0
  137. package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +13 -0
  138. package/dist/types/components/ButtonGroup/index.d.ts +1 -1
  139. package/dist/types/components/ColorPicker/ColorPicker.d.ts +244 -0
  140. package/dist/types/components/ColorPicker/ColorWell.d.ts +334 -0
  141. package/dist/types/components/ColorPicker/index.d.ts +3 -0
  142. package/dist/types/components/ColorPicker/shared.d.ts +69 -0
  143. package/dist/types/components/ContextMenu/ContextMenu.d.ts +128 -0
  144. package/dist/types/components/ContextMenu/index.d.ts +1 -0
  145. package/dist/types/components/ContextMenu/shared.d.ts +51 -0
  146. package/dist/types/components/DatePicker/DatePicker.d.ts +24 -4
  147. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +4 -4
  148. package/dist/types/components/Dialog/Dialog.d.ts +100 -4
  149. package/dist/types/components/Dialog/dialogSteps.d.ts +10 -0
  150. package/dist/types/components/Dialog/dialogViewport.d.ts +1 -0
  151. package/dist/types/components/Dialog/index.d.ts +1 -1
  152. package/dist/types/components/Field/Field.d.ts +21 -2
  153. package/dist/types/components/FieldGroup/FieldGroup.d.ts +18 -1
  154. package/dist/types/components/Icon/index.d.ts +1 -0
  155. package/dist/types/components/Icon/svg/Eyedropper.d.ts +3 -0
  156. package/dist/types/components/IndexBar/IndexBar.d.ts +112 -0
  157. package/dist/types/components/IndexBar/index.d.ts +1 -0
  158. package/dist/types/components/Indicator/LoadingIndicator.d.ts +2 -2
  159. package/dist/types/components/Menu/Menu.d.ts +153 -40
  160. package/dist/types/components/Menu/index.d.ts +1 -1
  161. package/dist/types/components/Page/Page.d.ts +13 -5
  162. package/dist/types/components/PageControl/PageControl.d.ts +216 -0
  163. package/dist/types/components/PageControl/index.d.ts +1 -0
  164. package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +21 -0
  165. package/dist/types/components/PhoneLayout/index.d.ts +1 -0
  166. package/dist/types/components/Popover/deferredPointerDownOutside.d.ts +1 -1
  167. package/dist/types/components/Select/Select.d.ts +6 -6
  168. package/dist/types/components/Stepper/Stepper.d.ts +338 -0
  169. package/dist/types/components/Stepper/index.d.ts +1 -0
  170. package/dist/types/components/SwipeActions/SwipeActions.d.ts +135 -0
  171. package/dist/types/components/SwipeActions/index.d.ts +1 -0
  172. package/dist/types/components/TabBar/TabBar.d.ts +405 -0
  173. package/dist/types/components/TabBar/index.d.ts +1 -0
  174. package/dist/types/components/Tip/Tip.d.ts +146 -0
  175. package/dist/types/components/Tip/index.d.ts +1 -0
  176. package/dist/types/components/Toast/toastLifecycle.d.ts +34 -0
  177. package/dist/types/components/Toolbar/Toolbar.d.ts +26 -9
  178. package/dist/types/components/Toolbar/index.d.ts +1 -1
  179. package/dist/types/components/Tooltip/CopyTooltip.d.ts +1 -1
  180. package/dist/types/composables/useEscCloseStack.d.ts +2 -2
  181. package/dist/types/lib/fieldRow.d.ts +5 -0
  182. package/dist/types/lib/helpers.d.ts +6 -0
  183. package/dist/types/lib/menuSubmenuPlacement.d.ts +14 -1
  184. package/dist/types/lib/menuTriggerCover.d.ts +23 -0
  185. package/dist/types/lib/phoneLayout.d.ts +11 -0
  186. package/dist/types/lib/scrollEdges.d.ts +16 -0
  187. package/dist/types/lib/toastRegion.d.ts +5 -0
  188. package/package.json +2 -2
@@ -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,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,s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AC,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","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\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 }\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 isTabletAndUp = useBreakpoint(\"md\")\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 const tabletAndUp = isTabletAndUp.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 // The input width is based on the number of characters in the input / font size\n const inputWidth = Math.max(currentInputValue.length, 1) * (tabletAndUp ? 7.8 : 9.5)\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: `${Math.ceil(inputWidth)}px` },\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\": () => {\n if (!disabled) pointerDown.value = true\n },\n \"onPointerup\": () => {\n pointerDown.value = false\n },\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"]}
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,sBAAsB,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA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C,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"]}
@@ -0,0 +1,195 @@
1
+ import { computed, defineComponent, h, onBeforeUnmount, ref } from "vue";
2
+ import s from "@plexui/styles/components/Stepper/Stepper.module.css";
3
+ import { Minus, Plus } from "../Icon/index.js";
4
+ // Vue port of packages/ui/src/components/Stepper/Stepper.tsx: the same DOM (a spin button with two
5
+ // unfocusable segments and an optional hidden input), keys, hold-to-repeat and clamped or wrapped steps.
6
+ // React's `value` + `onChange` become `value` + `update:value` (`v-model:value`) and `change`.
7
+ /** Delay before a held segment starts repeating, and the time between repeats, in ms. */
8
+ const REPEAT_DELAY = 400;
9
+ const REPEAT_INTERVAL = 100;
10
+ const decimals = (n) => {
11
+ const [, fraction = ""] = String(n).split(".");
12
+ return fraction.length;
13
+ };
14
+ /** The value one step away, clamped to the range or wrapped, without floating point drift. */
15
+ export const stepValue = (current, direction, { min, max, step, wrap }) => {
16
+ const precision = Math.max(decimals(step), decimals(min), decimals(current));
17
+ const next = Number((current + direction * step).toFixed(precision));
18
+ if (next > max)
19
+ return wrap ? min : max;
20
+ if (next < min)
21
+ return wrap ? max : min;
22
+ return next;
23
+ };
24
+ const StepperComponent = defineComponent({
25
+ name: "Stepper",
26
+ inheritAttrs: false,
27
+ props: {
28
+ /** The `id` of the stepper. */
29
+ id: String,
30
+ /** The controlled value. Bind with `v-model:value`. */
31
+ value: { type: Number, default: undefined },
32
+ /** The value when it is initially rendered. Use when you do not need to control the value. @default min */
33
+ defaultValue: { type: Number, default: undefined },
34
+ /** The lowest value. @default 0 */
35
+ min: { type: Number, default: 0 },
36
+ /** The highest value. @default 100 */
37
+ max: { type: Number, default: 100 },
38
+ /** The amount each step adds or removes. @default 1 */
39
+ step: { type: Number, default: 1 },
40
+ /** A step past `max` continues from `min`, and one below `min` from `max`. @default false */
41
+ wrap: { type: Boolean, default: false },
42
+ /** Holding a segment keeps stepping, as a native stepper does. @default true */
43
+ autoRepeat: { type: Boolean, default: true },
44
+ /** When `true`, prevents the user from interacting with the stepper. */
45
+ disabled: { type: Boolean, default: false },
46
+ /** Fully rounded ends. @default true */
47
+ pill: { type: Boolean, default: true },
48
+ /** Accessible name of the decrement segment. @default "Decrease" */
49
+ decrementLabel: { type: String, default: "Decrease" },
50
+ /** Accessible name of the increment segment. @default "Increase" */
51
+ incrementLabel: { type: String, default: "Increase" },
52
+ /** The name of the stepper. Submits its value with the owning form. */
53
+ name: String,
54
+ /** Accessible name of the value the stepper changes, when no visible label names it. */
55
+ ariaLabel: String,
56
+ /** The `id` of the visible label of the value the stepper changes. */
57
+ ariaLabelledby: String,
58
+ /** The `id` of an element that describes the stepper, such as the text that shows its value. */
59
+ ariaDescribedby: String,
60
+ },
61
+ emits: {
62
+ /** The value changed */
63
+ "update:value": (value) => typeof value === "number",
64
+ /** The value changed (React `onChange`) */
65
+ change: (value) => typeof value === "number",
66
+ /** The stepper gained focus */
67
+ focus: (event) => event.type === "focus",
68
+ /** The stepper lost focus */
69
+ blur: (event) => event.type === "blur",
70
+ },
71
+ setup(props, { attrs, emit }) {
72
+ const internalValue = ref(props.defaultValue ?? props.min);
73
+ const value = computed(() => props.value ?? internalValue.value);
74
+ const pressed = ref(null);
75
+ let timer;
76
+ const commit = (next) => {
77
+ if (next === value.value)
78
+ return false;
79
+ if (props.value === undefined)
80
+ internalValue.value = next;
81
+ emit("update:value", next);
82
+ emit("change", next);
83
+ return true;
84
+ };
85
+ const stepBy = (direction, times = 1) => {
86
+ let next = value.value;
87
+ for (let i = 0; i < times; i++)
88
+ next = stepValue(next, direction, props);
89
+ return commit(next);
90
+ };
91
+ const stopRepeat = () => {
92
+ clearTimeout(timer);
93
+ timer = undefined;
94
+ pressed.value = null;
95
+ };
96
+ onBeforeUnmount(stopRepeat);
97
+ const atMin = computed(() => !props.wrap && value.value <= props.min);
98
+ const atMax = computed(() => !props.wrap && value.value >= props.max);
99
+ const startPress = (segment, event) => {
100
+ if (event.button !== 0 || props.disabled)
101
+ return;
102
+ if (segment === "decrement" ? atMin.value : atMax.value)
103
+ return;
104
+ const target = event.currentTarget;
105
+ if (target instanceof HTMLElement)
106
+ target.setPointerCapture?.(event.pointerId);
107
+ pressed.value = segment;
108
+ const direction = segment === "decrement" ? -1 : 1;
109
+ stepBy(direction);
110
+ if (!props.autoRepeat)
111
+ return;
112
+ const repeat = () => {
113
+ if (props.disabled || !stepBy(direction))
114
+ return stopRepeat();
115
+ timer = setTimeout(repeat, REPEAT_INTERVAL);
116
+ };
117
+ timer = setTimeout(repeat, REPEAT_DELAY);
118
+ };
119
+ // A pointer steps on press, so only a click without one (assistive technology, `element.click()`) steps here.
120
+ const handleClick = (segment, event) => {
121
+ if (event.detail !== 0 || props.disabled)
122
+ return;
123
+ stepBy(segment === "decrement" ? -1 : 1);
124
+ };
125
+ const handleKeyDown = (event) => {
126
+ if (props.disabled || event.altKey || event.ctrlKey || event.metaKey)
127
+ return;
128
+ const keys = {
129
+ ArrowUp: () => stepBy(1),
130
+ ArrowDown: () => stepBy(-1),
131
+ PageUp: () => stepBy(1, 10),
132
+ PageDown: () => stepBy(-1, 10),
133
+ Home: () => commit(props.min),
134
+ End: () => commit(props.max),
135
+ };
136
+ const action = keys[event.key];
137
+ if (!action)
138
+ return;
139
+ event.preventDefault();
140
+ action();
141
+ };
142
+ const segment = (kind) => {
143
+ const atEnd = kind === "decrement" ? atMin.value : atMax.value;
144
+ return h("button", {
145
+ "type": "button",
146
+ "tabindex": -1,
147
+ "aria-label": kind === "decrement" ? props.decrementLabel : props.incrementLabel,
148
+ "aria-disabled": atEnd || undefined,
149
+ "disabled": props.disabled,
150
+ "class": s.Segment,
151
+ "data-segment": kind,
152
+ "data-disabled": atEnd || props.disabled ? "" : undefined,
153
+ "data-pressed": pressed.value === kind && !props.disabled ? "" : undefined,
154
+ // Keeps the focus where it is, as a native stepper takes none.
155
+ "onMousedown": (event) => event.preventDefault(),
156
+ "onPointerdown": (event) => startPress(kind, event),
157
+ "onPointerup": stopRepeat,
158
+ "onPointercancel": stopRepeat,
159
+ "onLostpointercapture": stopRepeat,
160
+ "onClick": (event) => handleClick(kind, event),
161
+ }, [h(kind === "decrement" ? Minus : Plus, { class: s.Icon })]);
162
+ };
163
+ return () => h("div", {
164
+ ...attrs,
165
+ "id": props.id,
166
+ "role": "spinbutton",
167
+ "tabindex": props.disabled ? -1 : 0,
168
+ "aria-valuenow": value.value,
169
+ "aria-valuemin": props.min,
170
+ "aria-valuemax": props.max,
171
+ "aria-label": props.ariaLabel,
172
+ "aria-labelledby": props.ariaLabelledby,
173
+ "aria-describedby": props.ariaDescribedby,
174
+ "aria-disabled": props.disabled || undefined,
175
+ "class": [s.Stepper, attrs.class],
176
+ "data-disabled": props.disabled ? "" : undefined,
177
+ "data-pill": props.pill ? "" : undefined,
178
+ "onKeydown": handleKeyDown,
179
+ "onFocus": (event) => emit("focus", event),
180
+ "onBlur": (event) => emit("blur", event),
181
+ }, [
182
+ segment("decrement"),
183
+ h("span", { "class": s.Separator, "aria-hidden": "true" }),
184
+ segment("increment"),
185
+ props.name !== undefined ? h("input", { type: "hidden", name: props.name, value: value.value, disabled: props.disabled }) : null,
186
+ ]);
187
+ },
188
+ });
189
+ /**
190
+ * Two segments that decrease and increase a number, as the iOS 26 stepper does. It shows no value of its own:
191
+ * name it with `aria-label` or `aria-labelledby` and show the value beside it. Keyboard focus lands on the
192
+ * stepper, a spin button: Up and Down step, Page Up and Page Down step ten times, Home and End go to the range ends.
193
+ */
194
+ export const Stepper = StepperComponent;
195
+ //# sourceMappingURL=Stepper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stepper.js","sourceRoot":"","sources":["../../../../src/components/Stepper/Stepper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACxE,OAAO,CAAC,MAAM,sDAAsD,CAAA;AACpE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAE9C,mGAAmG;AACnG,yGAAyG;AACzG,+FAA+F;AAE/F,yFAAyF;AACzF,MAAM,YAAY,GAAG,GAAG,CAAA;AACxB,MAAM,eAAe,GAAG,GAAG,CAAA;AAE3B,MAAM,QAAQ,GAAG,CAAC,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,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;SACjI,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAA;AAOF;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAA","sourcesContent":["import { computed, defineComponent, h, onBeforeUnmount, ref } from \"vue\"\nimport s from \"@plexui/styles/components/Stepper/Stepper.module.css\"\nimport { Minus, Plus } from \"../Icon/index.js\"\n\n// Vue port of packages/ui/src/components/Stepper/Stepper.tsx: the same DOM (a spin button with two\n// unfocusable segments and an optional hidden input), keys, hold-to-repeat and clamped or wrapped steps.\n// React's `value` + `onChange` become `value` + `update:value` (`v-model:value`) and `change`.\n\n/** Delay before a held segment starts repeating, and the time between repeats, in ms. */\nconst REPEAT_DELAY = 400\nconst REPEAT_INTERVAL = 100\n\nconst decimals = (n: number) => {\n const [, fraction = \"\"] = String(n).split(\".\")\n return fraction.length\n}\n\n/** The value one step away, clamped to the range or wrapped, without floating point drift. */\nexport const stepValue = (current: number, direction: 1 | -1, { min, max, step, wrap }: { min: number; max: number; step: number; wrap: boolean }) => {\n const precision = Math.max(decimals(step), decimals(min), decimals(current))\n const next = Number((current + direction * step).toFixed(precision))\n if (next > max) return wrap ? min : max\n if (next < min) return wrap ? max : min\n return next\n}\n\ntype Segment = \"decrement\" | \"increment\"\n\nconst StepperComponent = defineComponent({\n name: \"Stepper\",\n inheritAttrs: false,\n props: {\n /** The `id` of the stepper. */\n id: String,\n /** The controlled value. Bind with `v-model:value`. */\n value: { type: Number, default: undefined },\n /** The value when it is initially rendered. Use when you do not need to control the value. @default min */\n defaultValue: { type: Number, default: undefined },\n /** The lowest value. @default 0 */\n min: { type: Number, default: 0 },\n /** The highest value. @default 100 */\n max: { type: Number, default: 100 },\n /** The amount each step adds or removes. @default 1 */\n step: { type: Number, default: 1 },\n /** A step past `max` continues from `min`, and one below `min` from `max`. @default false */\n wrap: { type: Boolean, default: false },\n /** Holding a segment keeps stepping, as a native stepper does. @default true */\n autoRepeat: { type: Boolean, default: true },\n /** When `true`, prevents the user from interacting with the stepper. */\n disabled: { type: Boolean, default: false },\n /** Fully rounded ends. @default true */\n pill: { type: Boolean, default: true },\n /** Accessible name of the decrement segment. @default \"Decrease\" */\n decrementLabel: { type: String, default: \"Decrease\" },\n /** Accessible name of the increment segment. @default \"Increase\" */\n incrementLabel: { type: String, default: \"Increase\" },\n /** The name of the stepper. Submits its value with the owning form. */\n name: String,\n /** Accessible name of the value the stepper changes, when no visible label names it. */\n ariaLabel: String,\n /** The `id` of the visible label of the value the stepper changes. */\n ariaLabelledby: String,\n /** The `id` of an element that describes the stepper, such as the text that shows its value. */\n ariaDescribedby: String,\n },\n emits: {\n /** The value changed */\n \"update:value\": (value: number) => typeof value === \"number\",\n /** The value changed (React `onChange`) */\n change: (value: number) => typeof value === \"number\",\n /** The stepper gained focus */\n focus: (event: FocusEvent) => event.type === \"focus\",\n /** The stepper lost focus */\n blur: (event: FocusEvent) => event.type === \"blur\",\n },\n setup(props, { attrs, emit }) {\n const internalValue = ref(props.defaultValue ?? props.min)\n const value = computed(() => props.value ?? internalValue.value)\n const pressed = ref<Segment | null>(null)\n let timer: ReturnType<typeof setTimeout> | undefined\n\n const commit = (next: number) => {\n if (next === value.value) return false\n if (props.value === undefined) internalValue.value = next\n emit(\"update:value\", next)\n emit(\"change\", next)\n return true\n }\n\n const stepBy = (direction: 1 | -1, times = 1) => {\n let next = value.value\n for (let i = 0; i < times; i++) next = stepValue(next, direction, props)\n return commit(next)\n }\n\n const stopRepeat = () => {\n clearTimeout(timer)\n timer = undefined\n pressed.value = null\n }\n onBeforeUnmount(stopRepeat)\n\n const atMin = computed(() => !props.wrap && value.value <= props.min)\n const atMax = computed(() => !props.wrap && value.value >= props.max)\n\n const startPress = (segment: Segment, event: PointerEvent) => {\n if (event.button !== 0 || props.disabled) return\n if (segment === \"decrement\" ? atMin.value : atMax.value) return\n const target = event.currentTarget\n if (target instanceof HTMLElement) target.setPointerCapture?.(event.pointerId)\n pressed.value = segment\n const direction = segment === \"decrement\" ? -1 : 1\n stepBy(direction)\n if (!props.autoRepeat) return\n const repeat = () => {\n if (props.disabled || !stepBy(direction)) return stopRepeat()\n timer = setTimeout(repeat, REPEAT_INTERVAL)\n }\n timer = setTimeout(repeat, REPEAT_DELAY)\n }\n\n // A pointer steps on press, so only a click without one (assistive technology, `element.click()`) steps here.\n const handleClick = (segment: Segment, event: MouseEvent) => {\n if (event.detail !== 0 || props.disabled) return\n stepBy(segment === \"decrement\" ? -1 : 1)\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (props.disabled || event.altKey || event.ctrlKey || event.metaKey) return\n const keys: Record<string, () => void> = {\n ArrowUp: () => stepBy(1),\n ArrowDown: () => stepBy(-1),\n PageUp: () => stepBy(1, 10),\n PageDown: () => stepBy(-1, 10),\n Home: () => commit(props.min),\n End: () => commit(props.max),\n }\n const action = keys[event.key]\n if (!action) return\n event.preventDefault()\n action()\n }\n\n const segment = (kind: Segment) => {\n const atEnd = kind === \"decrement\" ? atMin.value : atMax.value\n return h(\"button\", {\n \"type\": \"button\",\n \"tabindex\": -1,\n \"aria-label\": kind === \"decrement\" ? props.decrementLabel : props.incrementLabel,\n \"aria-disabled\": atEnd || undefined,\n \"disabled\": props.disabled,\n \"class\": s.Segment,\n \"data-segment\": kind,\n \"data-disabled\": atEnd || props.disabled ? \"\" : undefined,\n \"data-pressed\": pressed.value === kind && !props.disabled ? \"\" : undefined,\n // Keeps the focus where it is, as a native stepper takes none.\n \"onMousedown\": (event: MouseEvent) => event.preventDefault(),\n \"onPointerdown\": (event: PointerEvent) => startPress(kind, event),\n \"onPointerup\": stopRepeat,\n \"onPointercancel\": stopRepeat,\n \"onLostpointercapture\": stopRepeat,\n \"onClick\": (event: MouseEvent) => handleClick(kind, event),\n }, [h(kind === \"decrement\" ? Minus : Plus, { class: s.Icon })])\n }\n\n return () => h(\"div\", {\n ...attrs,\n \"id\": props.id,\n \"role\": \"spinbutton\",\n \"tabindex\": props.disabled ? -1 : 0,\n \"aria-valuenow\": value.value,\n \"aria-valuemin\": props.min,\n \"aria-valuemax\": props.max,\n \"aria-label\": props.ariaLabel,\n \"aria-labelledby\": props.ariaLabelledby,\n \"aria-describedby\": props.ariaDescribedby,\n \"aria-disabled\": props.disabled || undefined,\n \"class\": [s.Stepper, attrs.class],\n \"data-disabled\": props.disabled ? \"\" : undefined,\n \"data-pill\": props.pill ? \"\" : undefined,\n \"onKeydown\": handleKeyDown,\n \"onFocus\": (event: FocusEvent) => emit(\"focus\", event),\n \"onBlur\": (event: FocusEvent) => emit(\"blur\", event),\n }, [\n segment(\"decrement\"),\n h(\"span\", { \"class\": s.Separator, \"aria-hidden\": \"true\" }),\n segment(\"increment\"),\n props.name !== undefined ? h(\"input\", { type: \"hidden\", name: props.name, value: value.value, disabled: props.disabled }) : null,\n ])\n },\n})\n\ntype StepperOwnProps = InstanceType<typeof StepperComponent>[\"$props\"]\n\n/** Stepper props. */\nexport type StepperProps = StepperOwnProps\n\n/**\n * Two segments that decrease and increase a number, as the iOS 26 stepper does. It shows no value of its own:\n * name it with `aria-label` or `aria-labelledby` and show the value beside it. Keyboard focus lands on the\n * stepper, a spin button: Up and Down step, Page Up and Page Down step ten times, Home and End go to the range ends.\n */\nexport const Stepper = StepperComponent\n"]}
@@ -0,0 +1,2 @@
1
+ export { Stepper } from "./Stepper.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Stepper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAA","sourcesContent":["export { Stepper, type StepperProps } from \"./Stepper.js\"\n"]}