@justanarthur/modo-ui 2.0.0 → 2.2.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 (221) hide show
  1. package/blocks/desktop-shell/index.tsx +2 -1
  2. package/components/data-display/sparkline/examples.mdx +79 -0
  3. package/components/data-display/sparkline/index.tsx +158 -0
  4. package/components/data-display/sparkline/live-demo.tsx +36 -0
  5. package/components/feedback/meter/examples.mdx +25 -0
  6. package/components/feedback/meter/index.tsx +23 -7
  7. package/components/feedback/meter/timer-demo.tsx +37 -0
  8. package/components/inputs/checkbox/index.tsx +5 -0
  9. package/components/inputs/combobox/index.tsx +9 -4
  10. package/components/inputs/radio/index.tsx +5 -0
  11. package/components/inputs/select/index.tsx +23 -3
  12. package/components/inputs/slider/comfortable.tsx +10 -4
  13. package/components/inputs/slider/compact.tsx +153 -71
  14. package/components/inputs/slider/examples.mdx +24 -0
  15. package/components/inputs/slider/geometry.ts +18 -6
  16. package/components/inputs/slider/index.tsx +30 -8
  17. package/components/inputs/slider/value-display.tsx +16 -9
  18. package/components/inputs/switch/index.tsx +7 -2
  19. package/components/inputs/textarea/examples.mdx +19 -0
  20. package/components/inputs/textarea/index.tsx +42 -5
  21. package/components/navigation/sidebar/sidebar-group.tsx +2 -1
  22. package/components/navigation/sidebar/sidebar-menu-sub.tsx +2 -1
  23. package/components/navigation/sidebar/sidebar-shell.tsx +2 -1
  24. package/components/navigation/tree/index.tsx +2 -1
  25. package/components/overlays/dropdown/index.tsx +50 -8
  26. package/components/overlays/dropdown/submenu.tsx +41 -10
  27. package/components/overlays/tooltip/examples.mdx +13 -0
  28. package/components/overlays/tooltip/index.tsx +58 -16
  29. package/dist/base.css +4 -0
  30. package/dist/blocks/desktop-shell/index.js +28 -27
  31. package/dist/blocks/sidebar-app/index.js +38 -37
  32. package/dist/components/actions/button/index.js +4 -4
  33. package/dist/components/actions/copy/index.js +12 -12
  34. package/dist/components/containers/accordion/index.d.ts +1 -1
  35. package/dist/components/containers/accordion/index.js +16 -16
  36. package/dist/components/containers/card/index.js +14 -14
  37. package/dist/components/data-display/avatar/index.js +3 -3
  38. package/dist/components/data-display/badge/index.js +2 -2
  39. package/dist/components/data-display/diff/index.js +4 -4
  40. package/dist/components/data-display/list/index.js +3 -3
  41. package/dist/components/data-display/log-view/index.js +8 -8
  42. package/dist/components/data-display/markdown/index.js +15 -15
  43. package/dist/components/data-display/sparkline/index.d.ts +44 -0
  44. package/dist/components/data-display/sparkline/index.js +11 -0
  45. package/dist/components/data-display/table/index.js +9 -9
  46. package/dist/components/feedback/empty-state/index.js +3 -3
  47. package/dist/components/feedback/meter/index.d.ts +9 -1
  48. package/dist/components/feedback/meter/index.js +2 -2
  49. package/dist/components/feedback/progress/index.js +2 -2
  50. package/dist/components/inputs/checkbox/index.d.ts +2 -0
  51. package/dist/components/inputs/checkbox/index.js +13 -13
  52. package/dist/components/inputs/choice-list/index.js +10 -10
  53. package/dist/components/inputs/color-picker/index.js +22 -22
  54. package/dist/components/inputs/combobox/index.d.ts +1 -1
  55. package/dist/components/inputs/combobox/index.js +21 -21
  56. package/dist/components/inputs/date-time/calendar/index.js +9 -9
  57. package/dist/components/inputs/date-time/date-picker/index.js +28 -28
  58. package/dist/components/inputs/date-time/date-range-picker/index.js +28 -28
  59. package/dist/components/inputs/date-time/duration-picker/index.js +27 -27
  60. package/dist/components/inputs/date-time/month-picker/index.js +26 -26
  61. package/dist/components/inputs/date-time/time-picker/index.js +27 -27
  62. package/dist/components/inputs/editable-text/index.js +2 -2
  63. package/dist/components/inputs/field/index.js +5 -5
  64. package/dist/components/inputs/file-dropzone/index.js +8 -8
  65. package/dist/components/inputs/input/index.js +6 -6
  66. package/dist/components/inputs/key-value/index.js +12 -12
  67. package/dist/components/inputs/number-input/index.js +7 -7
  68. package/dist/components/inputs/radio/index.d.ts +2 -0
  69. package/dist/components/inputs/radio/index.js +12 -12
  70. package/dist/components/inputs/search/index.js +23 -23
  71. package/dist/components/inputs/select/index.d.ts +22 -4
  72. package/dist/components/inputs/select/index.js +22 -22
  73. package/dist/components/inputs/slider/index.d.ts +12 -3
  74. package/dist/components/inputs/slider/index.js +4 -4
  75. package/dist/components/inputs/switch/index.d.ts +2 -0
  76. package/dist/components/inputs/switch/index.js +9 -9
  77. package/dist/components/inputs/textarea/index.d.ts +8 -1
  78. package/dist/components/inputs/textarea/index.js +4 -4
  79. package/dist/components/navigation/breadcrumb/index.js +25 -25
  80. package/dist/components/navigation/navigation-menu/index.js +17 -17
  81. package/dist/components/navigation/pagination/index.js +16 -16
  82. package/dist/components/navigation/sidebar/index.js +26 -25
  83. package/dist/components/navigation/tabs/index.js +13 -13
  84. package/dist/components/navigation/tree/index.js +10 -9
  85. package/dist/components/overlays/alert-dialog/index.d.ts +3 -3
  86. package/dist/components/overlays/alert-dialog/index.js +15 -15
  87. package/dist/components/overlays/command/index.d.ts +1 -1
  88. package/dist/components/overlays/command/index.js +21 -21
  89. package/dist/components/overlays/context-menu/index.d.ts +20 -1
  90. package/dist/components/overlays/context-menu/index.js +25 -25
  91. package/dist/components/overlays/dialog/index.d.ts +3 -3
  92. package/dist/components/overlays/dialog/index.js +14 -14
  93. package/dist/components/overlays/dropdown/index.d.ts +30 -8
  94. package/dist/components/overlays/dropdown/index.js +24 -24
  95. package/dist/components/overlays/lightbox/index.js +12 -12
  96. package/dist/components/overlays/popover/index.d.ts +6 -6
  97. package/dist/components/overlays/popover/index.js +11 -11
  98. package/dist/components/overlays/preview-card/index.js +10 -10
  99. package/dist/components/overlays/sheet/index.d.ts +3 -3
  100. package/dist/components/overlays/sheet/index.js +15 -15
  101. package/dist/components/overlays/toast/index.d.ts +1 -1
  102. package/dist/components/overlays/toast/index.js +11 -11
  103. package/dist/components/overlays/tooltip/index.d.ts +35 -10
  104. package/dist/components/overlays/tooltip/index.js +8 -8
  105. package/dist/docs/index.js +18 -17
  106. package/dist/index.d.ts +330 -228
  107. package/dist/index.js +82 -77
  108. package/dist/lib/fluid-hover-highlight.js +4 -4
  109. package/dist/lib/focus-ring.js +2 -2
  110. package/dist/lib/goo-indicator.js +3 -3
  111. package/dist/lib/inert.d.ts +7 -0
  112. package/dist/lib/inert.js +6 -0
  113. package/dist/lib/morph-layers.js +4 -4
  114. package/dist/lib/morph-part.js +2 -2
  115. package/dist/lib/overlay.d.ts +20 -13
  116. package/dist/lib/overlay.js +5 -4
  117. package/dist/lib/popup-rows.js +2 -2
  118. package/dist/lib/popup-surface.js +7 -7
  119. package/dist/lib/scroll-column.js +6 -6
  120. package/dist/lib/slot.d.ts +5 -2
  121. package/dist/lib/slot.js +1 -1
  122. package/dist/lib/use-merge-split.js +4 -4
  123. package/dist/lib/use-morph.js +2 -2
  124. package/dist/preset.d.ts +1 -0
  125. package/dist/preset.js +1 -0
  126. package/dist/primitives/content/code/index.js +3 -3
  127. package/dist/primitives/layout/resizable/index.js +2 -2
  128. package/dist/primitives/layout/sortable/index.js +5 -5
  129. package/dist/primitives/systems/craft/index.js +3 -3
  130. package/dist/primitives/systems/fluid-hover/index.js +6 -6
  131. package/dist/primitives/systems/morph/index.js +14 -14
  132. package/dist/primitives/systems/motion/index.js +7 -7
  133. package/dist/primitives/systems/sizes/index.js +2 -2
  134. package/dist/shared/{components-280grw6q.js → components-09n5hgmx.js} +2 -2
  135. package/dist/shared/{components-1f3a7gmg.js → components-151vndgm.js} +3 -3
  136. package/dist/shared/{components-14wzcym0.js → components-16wx5av1.js} +6 -6
  137. package/dist/shared/{components-yf2gtq68.js → components-19e2wpxc.js} +9 -6
  138. package/dist/shared/{components-rzy6h7s4.js → components-1nqp7wqr.js} +1 -1
  139. package/dist/shared/components-2myjk2zf.js +8 -0
  140. package/dist/shared/{components-9rebr89j.js → components-2q0m4mxf.js} +2 -2
  141. package/dist/shared/{components-1asw2ph0.js → components-2zr49v82.js} +3 -3
  142. package/dist/shared/{components-wq9hrera.js → components-313rmbxy.js} +2 -2
  143. package/dist/shared/{components-0h2mng6m.js → components-31pkxwfz.js} +1 -1
  144. package/dist/shared/{components-w2at9ntm.js → components-3cvwrzc1.js} +3 -3
  145. package/dist/shared/{components-n0gbyp5a.js → components-4xd21p2p.js} +6 -6
  146. package/dist/shared/{components-t0c1rw40.js → components-7v6869ga.js} +1 -1
  147. package/dist/shared/{components-kwxye0an.js → components-7wjkag2j.js} +4 -2
  148. package/dist/shared/{components-fqsgd07c.js → components-85dz3xx3.js} +4 -4
  149. package/dist/shared/{components-3rvrdsa9.js → components-8qkd3659.js} +1 -1
  150. package/dist/shared/{components-me742146.js → components-8qwbwtv9.js} +5 -5
  151. package/dist/shared/{components-nxqrw789.js → components-90sfqz5t.js} +1 -1
  152. package/dist/shared/{components-b9bj65j3.js → components-90y8qwxv.js} +9 -9
  153. package/dist/shared/{components-g35n8tzm.js → components-95kp19zn.js} +1 -1
  154. package/dist/shared/{components-nhmgr5xc.js → components-9e5fpy3v.js} +14 -11
  155. package/dist/shared/{components-a1ms36qq.js → components-9hysh6d3.js} +1 -1
  156. package/dist/shared/{components-hcftn5r8.js → components-9s9vb2w0.js} +7 -4
  157. package/dist/shared/{components-vfreweq3.js → components-a3edrqpb.js} +3 -3
  158. package/dist/shared/{components-ee09xmkh.js → components-afj2ajea.js} +8 -5
  159. package/dist/shared/{components-ev0ytbqb.js → components-ajgwbabq.js} +4 -4
  160. package/dist/shared/{components-62510420.js → components-dr5c27yd.js} +6 -6
  161. package/dist/shared/{components-s90v3jpr.js → components-fqdh9ysk.js} +68 -19
  162. package/dist/shared/{components-2m2hg11x.js → components-gfw4zk8b.js} +8 -8
  163. package/dist/shared/{components-z0kz9rxj.js → components-gvwxswpr.js} +1 -1
  164. package/dist/shared/{components-p32aqk3q.js → components-h9se5cz5.js} +110 -73
  165. package/dist/shared/{components-464zs8v6.js → components-hbqyf35a.js} +41 -34
  166. package/dist/shared/{components-77gxngmc.js → components-jd21f3mb.js} +8 -8
  167. package/dist/shared/{components-xnkc892z.js → components-mamtvenk.js} +2 -2
  168. package/dist/shared/{components-1hga6pkn.js → components-mcnyaaep.js} +3 -3
  169. package/dist/shared/{components-h0x2pj2y.js → components-mpx3yq5c.js} +24 -10
  170. package/dist/shared/{components-j79a6jqa.js → components-nc8wggew.js} +3 -3
  171. package/dist/shared/{components-r5q9gdh4.js → components-nd3f803g.js} +7 -7
  172. package/dist/shared/{components-9ca0c92a.js → components-nehs80xd.js} +1 -1
  173. package/dist/shared/components-nw2k1pg9.js +98 -0
  174. package/dist/shared/{components-4t2cjav8.js → components-pgs3p035.js} +1 -1
  175. package/dist/shared/{components-91mmbrw3.js → components-ppc2dmxs.js} +2 -2
  176. package/dist/shared/{components-b2kjsn1s.js → components-qc1fae2s.js} +6 -6
  177. package/dist/shared/{components-fmyvz4r2.js → components-qd27dvgj.js} +6 -6
  178. package/dist/shared/{components-9z7bq8gn.js → components-qe8yp3vf.js} +3 -3
  179. package/dist/shared/{components-wx1dcp2n.js → components-qhk2m7fj.js} +2 -2
  180. package/dist/shared/{components-a1mwqxsv.js → components-qkt4h7x4.js} +8 -8
  181. package/dist/shared/{components-6rtawx8y.js → components-qs0cwe8p.js} +10 -10
  182. package/dist/shared/{components-y8m64zdw.js → components-r6ejdtpr.js} +3 -3
  183. package/dist/shared/{components-1bnf96sr.js → components-rj4nnqkz.js} +39 -11
  184. package/dist/shared/{components-gd8gmr6w.js → components-rmhdr4g1.js} +1 -1
  185. package/dist/shared/{components-e7zxwja1.js → components-rts2mggt.js} +1 -1
  186. package/dist/shared/{components-ta4e10mx.js → components-s25rehbv.js} +1 -1
  187. package/dist/shared/{components-chda6b23.js → components-sxstx1x7.js} +33 -4
  188. package/dist/shared/{components-b7p1pjcm.js → components-t4eb37vd.js} +2 -2
  189. package/dist/shared/{components-7xc2dne4.js → components-v3c3madd.js} +2 -2
  190. package/dist/shared/{components-22h8dvt1.js → components-v81eejq6.js} +3 -3
  191. package/dist/shared/{components-w1ysefg1.js → components-veaxns17.js} +2 -2
  192. package/dist/shared/{components-czvraaw9.js → components-vkrp4nb9.js} +4 -4
  193. package/dist/shared/{components-gsstwhtv.js → components-vv420geb.js} +6 -3
  194. package/dist/shared/{components-5xs8pkkj.js → components-w5p7mfb4.js} +1 -1
  195. package/dist/shared/{components-rgng034x.js → components-xvf8jcza.js} +25 -4
  196. package/dist/shared/{components-q7zk70tx.js → components-y07de1qv.js} +1 -1
  197. package/dist/shared/{components-0cpte6s1.js → components-yn8bw8tv.js} +11 -10
  198. package/dist/shared/{components-xa9fvd5b.js → components-z9gc2weg.js} +3 -3
  199. package/dist/shared/{components-twyj2y8c.js → components-zk1tj5za.js} +3 -3
  200. package/dist/shared/{components-hz6armxa.js → components-zktkxnzq.js} +7 -4
  201. package/dist/styles.css +10 -1
  202. package/dist/tailwind.css +1 -0
  203. package/dist/tokens.css +4 -0
  204. package/index.ts +1 -0
  205. package/lib/inert.ts +15 -0
  206. package/lib/overlay.tsx +49 -5
  207. package/lib/slot.tsx +9 -3
  208. package/package.json +7 -2
  209. package/tokens/colors.css +4 -0
  210. /package/dist/shared/{components-jw45ck66.js → components-02683eqd.js} +0 -0
  211. /package/dist/shared/{components-q0hs5rqn.js → components-6c52v58g.js} +0 -0
  212. /package/dist/shared/{components-y4gsk1jt.js → components-fa61vwag.js} +0 -0
  213. /package/dist/shared/{components-nz14rwtd.js → components-ffng9rpa.js} +0 -0
  214. /package/dist/shared/{components-7mj5wsv3.js → components-k9qbcmaa.js} +0 -0
  215. /package/dist/shared/{components-8pnvkrbw.js → components-mp7en54n.js} +0 -0
  216. /package/dist/shared/{components-h8v9nh5r.js → components-pbx77hzb.js} +0 -0
  217. /package/dist/shared/{components-c515d6xr.js → components-v1m0xjbw.js} +0 -0
  218. /package/dist/shared/{components-pa43g2r2.js → components-wddr0r6a.js} +0 -0
  219. /package/dist/shared/{components-ymq8tbq9.js → components-wqac4434.js} +0 -0
  220. /package/dist/shared/{components-m3vxpz2z.js → components-yy0a9b02.js} +0 -0
  221. /package/dist/shared/{components-92mvpt9h.js → components-zwgxvktt.js} +0 -0
@@ -20,7 +20,7 @@ import {
20
20
  } from "./components-xnp09586.js";
21
21
 
22
22
  // components/inputs/slider/index.tsx
23
- import { forwardRef as forwardRef3 } from "react";
23
+ import { forwardRef as forwardRef3, useRef as useRef4 } from "react";
24
24
 
25
25
  // components/inputs/slider/comfortable.tsx
26
26
  import { Slider as SliderPrimitive } from "@base-ui/react/slider";
@@ -67,11 +67,16 @@ function pixelToValue(px, min, max, step, trackWidth, stepValues = null) {
67
67
  function toRadixValue(value) {
68
68
  return Array.isArray(value) ? value : [value];
69
69
  }
70
- function layoutX(clientX, el) {
70
+ function axisLength(el, vertical = false) {
71
+ return vertical ? el.offsetHeight : el.offsetWidth;
72
+ }
73
+ function layoutPos({ clientX, clientY }, el, vertical = false) {
71
74
  const rect = el.getBoundingClientRect();
72
- if (el.offsetWidth <= 0 || rect.width <= 0)
75
+ const length = axisLength(el, vertical);
76
+ const visual = vertical ? rect.height : rect.width;
77
+ if (length <= 0 || visual <= 0)
73
78
  return null;
74
- return (clientX - rect.left) * (el.offsetWidth / rect.width);
79
+ return (vertical ? rect.bottom - clientY : clientX - rect.left) * (length / visual);
75
80
  }
76
81
  function useDelayedFlag(flag, delay) {
77
82
  const [delayed, setDelayed] = useState(false);
@@ -219,17 +224,15 @@ function ValueDisplay({
219
224
  ]
220
225
  });
221
226
  }
222
- function TooltipValue({ value, formatValue, motionX }) {
227
+ function TooltipValue({ value, formatValue, motionX, vertical = false }) {
223
228
  const tooltipX = useTransform(motionX, (x) => x + THUMB_SIZE / 2);
229
+ const tooltipY = useTransform(motionX, (x) => -x);
224
230
  return /* @__PURE__ */ jsx(motion.div, {
225
- className: "absolute -translate-x-1/2 pointer-events-none z-20",
226
- style: {
227
- x: tooltipX,
228
- top: -16
229
- },
230
- initial: { opacity: 0, y: 4 },
231
- animate: { opacity: 1, y: 0 },
232
- exit: { opacity: 0, y: 4, transition: spring2.fast.exit },
231
+ className: cn2("absolute pointer-events-none z-20", vertical ? "translate-y-1/2" : "-translate-x-1/2"),
232
+ style: vertical ? { y: tooltipY, bottom: THUMB_SIZE / 2, left: `calc(50% + ${THUMB_SIZE}px)` } : { x: tooltipX, top: -16 },
233
+ initial: vertical ? { opacity: 0, x: -4 } : { opacity: 0, y: 4 },
234
+ animate: vertical ? { opacity: 1, x: 0 } : { opacity: 1, y: 0 },
235
+ exit: vertical ? { opacity: 0, x: -4, transition: spring2.fast.exit } : { opacity: 0, y: 4, transition: spring2.fast.exit },
233
236
  transition: spring2.fast,
234
237
  children: /* @__PURE__ */ jsx(ValueBubble, {
235
238
  children: formatValue(value)
@@ -254,6 +257,7 @@ var ComfortableSlider = forwardRef(({
254
257
  formatValue = String,
255
258
  disabled = false,
256
259
  name,
260
+ onCommit,
257
261
  className,
258
262
  ...props
259
263
  }, ref) => {
@@ -285,7 +289,7 @@ var ComfortableSlider = forwardRef(({
285
289
  if (!el)
286
290
  return;
287
291
  const w = el.clientWidth;
288
- const x = layoutX(clientX, el);
292
+ const x = layoutPos({ clientX, clientY: 0 }, el);
289
293
  if (w <= 0 || x === null)
290
294
  return;
291
295
  const borderLeft = (el.offsetWidth - w) / 2;
@@ -364,10 +368,12 @@ var ComfortableSlider = forwardRef(({
364
368
  animate(zeroOffset, newVal === min ? zeroTarget : 0, spring2.fast);
365
369
  }, [getValueFromX, onValueChange, variant, fillPercent, zeroOffset, zeroTarget, min, max]);
366
370
  const handlePointerUp = useCallback2(() => {
371
+ if (dragging.current)
372
+ onCommit?.();
367
373
  dragging.current = false;
368
374
  setIsPressed(false);
369
375
  setHoverPreview(null);
370
- }, []);
376
+ }, [onCommit]);
371
377
  const handleResizePointerDown = useCallback2((e) => {
372
378
  if (disabled)
373
379
  return;
@@ -392,10 +398,12 @@ var ComfortableSlider = forwardRef(({
392
398
  animate(zeroOffset, newVal === min ? zeroTarget : 0, spring2.fast);
393
399
  }, [getValueFromX, onValueChange, fillPercent, zeroOffset, zeroTarget, min, max]);
394
400
  const handleResizePointerUp = useCallback2(() => {
401
+ if (handleDragging.current)
402
+ onCommit?.();
395
403
  handleDragging.current = false;
396
404
  setIsPressed(false);
397
405
  setHoverPreview(null);
398
- }, []);
406
+ }, [onCommit]);
399
407
  const handleRadixChange = useCallback2((newValues) => {
400
408
  onValueChange(newValues[0]);
401
409
  }, [onValueChange]);
@@ -459,6 +467,7 @@ var ComfortableSlider = forwardRef(({
459
467
  /* @__PURE__ */ jsx2(SliderPrimitive.Root, {
460
468
  value: [value],
461
469
  onValueChange: (v) => handleRadixChange(v),
470
+ onValueCommitted: () => onCommit?.(),
462
471
  name,
463
472
  min,
464
473
  max,
@@ -656,7 +665,7 @@ var CompactSlider = forwardRef2(({
656
665
  steps,
657
666
  showSteps = false,
658
667
  showValue = true,
659
- valuePosition = "left",
668
+ valuePosition: valuePositionProp,
660
669
  formatValue = String,
661
670
  label,
662
671
  disabled = false,
@@ -668,9 +677,13 @@ var CompactSlider = forwardRef2(({
668
677
  hideFill = false,
669
678
  thumbColor,
670
679
  thumbBorderColor,
680
+ orientation = "horizontal",
681
+ onCommit,
671
682
  className,
672
683
  ...props
673
684
  }, ref) => {
685
+ const vertical = orientation === "vertical";
686
+ const valuePosition = valuePositionProp ?? (vertical ? "top" : "left");
674
687
  const isRange = Array.isArray(value);
675
688
  const values = toRadixValue(value);
676
689
  const stepsKey = steps ? steps.join(",") : "";
@@ -704,14 +717,17 @@ var CompactSlider = forwardRef2(({
704
717
  const fillWidthSingle = useTransform3(motionX0, (x) => x + THUMB_SIZE / 2 - TRACK_INSET);
705
718
  const fillWidthRange = useTransform3([motionX0, motionX1], ([x0, x1]) => x1 - x0);
706
719
  const fillWidth = isRange ? fillWidthRange : fillWidthSingle;
720
+ const thumbY0 = useTransform3(motionX0, (x) => -x);
721
+ const thumbY1 = useTransform3(motionX1, (x) => -x);
722
+ const maskDir = vertical ? "to top" : "to right";
707
723
  const stepDotsMaskSingle = useTransform3(motionX0, (x) => {
708
724
  const edge = x + THUMB_SIZE / 2;
709
- return `linear-gradient(to right, transparent ${edge}px, black ${edge + 2}px)`;
725
+ return `linear-gradient(${maskDir}, transparent ${edge}px, black ${edge + 2}px)`;
710
726
  });
711
727
  const stepDotsMaskRange = useTransform3([motionX0, motionX1], ([x0, x1]) => {
712
728
  const left = x0 + THUMB_SIZE / 2;
713
729
  const right = x1 + THUMB_SIZE / 2;
714
- return `linear-gradient(to right, black ${left - 2}px, transparent ${left}px, transparent ${right}px, black ${right + 2}px)`;
730
+ return `linear-gradient(${maskDir}, black ${left - 2}px, transparent ${left}px, transparent ${right}px, black ${right + 2}px)`;
715
731
  });
716
732
  const stepDotsMask = isRange ? stepDotsMaskRange : stepDotsMaskSingle;
717
733
  const computeHoverPreview = useCallback3((cursorX, trackWidth) => {
@@ -737,7 +753,7 @@ var CompactSlider = forwardRef2(({
737
753
  const el = trackRef.current;
738
754
  if (!el || initialSyncDone.current)
739
755
  return;
740
- const w = el.offsetWidth;
756
+ const w = axisLength(el, vertical);
741
757
  trackWidthRef.current = w;
742
758
  const px0 = valueToPixel(values[0], min, max, w);
743
759
  motionX0.set(px0);
@@ -753,7 +769,7 @@ var CompactSlider = forwardRef2(({
753
769
  if (!el)
754
770
  return;
755
771
  const ro = new ResizeObserver(([entry]) => {
756
- const w = entry.contentRect.width;
772
+ const w = vertical ? entry.contentRect.height : entry.contentRect.width;
757
773
  trackWidthRef.current = w;
758
774
  if (!dragging.current && initialSyncDone.current) {
759
775
  const v = valuesRef.current;
@@ -769,7 +785,7 @@ var CompactSlider = forwardRef2(({
769
785
  });
770
786
  ro.observe(el);
771
787
  return () => ro.disconnect();
772
- }, [isRange, motionX0, motionX1]);
788
+ }, [isRange, vertical, motionX0, motionX1]);
773
789
  const valuesKey = values.join(",");
774
790
  useEffect4(() => {
775
791
  if (!initialSyncDone.current)
@@ -814,10 +830,10 @@ var CompactSlider = forwardRef2(({
814
830
  const trackEl = trackRef.current;
815
831
  if (!trackEl)
816
832
  return;
817
- const x = layoutX(e.clientX, trackEl);
833
+ const x = layoutPos(e, trackEl, vertical);
818
834
  if (x === null)
819
835
  return;
820
- const layoutWidth = trackEl.offsetWidth;
836
+ const layoutWidth = axisLength(trackEl, vertical);
821
837
  const clamped = Math.max(0, Math.min(layoutWidth - THUMB_SIZE, x - THUMB_SIZE / 2));
822
838
  if (isRange) {
823
839
  const dist0 = Math.abs(clamped - motionX0.get());
@@ -836,7 +852,7 @@ var CompactSlider = forwardRef2(({
836
852
  const finalValue = pixelToValue(finalPx, min, max, step, layoutWidth, stepValues);
837
853
  emitChange(activeDragThumb.current, finalValue);
838
854
  e.currentTarget.setPointerCapture(e.pointerId);
839
- }, [disabled, isRange, min, max, step, stepValues, motionX0, motionX1, clampForRange, emitChange]);
855
+ }, [disabled, vertical, isRange, min, max, step, stepValues, motionX0, motionX1, clampForRange, emitChange]);
840
856
  const handlePointerMove = useCallback3((e) => {
841
857
  if (!dragging.current)
842
858
  return;
@@ -844,10 +860,10 @@ var CompactSlider = forwardRef2(({
844
860
  const trackEl = trackRef.current;
845
861
  if (!trackEl)
846
862
  return;
847
- const x = layoutX(e.clientX, trackEl);
863
+ const x = layoutPos(e, trackEl, vertical);
848
864
  if (x === null)
849
865
  return;
850
- const layoutWidth = trackEl.offsetWidth;
866
+ const layoutWidth = axisLength(trackEl, vertical);
851
867
  const clamped = Math.max(0, Math.min(layoutWidth - THUMB_SIZE, x - THUMB_SIZE / 2));
852
868
  const motionX = activeDragThumb.current === 0 ? motionX0 : motionX1;
853
869
  const snappedValue = pixelToValue(clamped, min, max, step, layoutWidth, stepValues);
@@ -856,11 +872,12 @@ var CompactSlider = forwardRef2(({
856
872
  motionX.set(finalPx);
857
873
  const finalValue = pixelToValue(finalPx, min, max, step, layoutWidth, stepValues);
858
874
  emitChange(activeDragThumb.current, finalValue);
859
- }, [min, max, step, stepValues, motionX0, motionX1, clampForRange, emitChange]);
875
+ }, [vertical, min, max, step, stepValues, motionX0, motionX1, clampForRange, emitChange]);
860
876
  const handlePointerUp = useCallback3(() => {
861
877
  if (!dragging.current)
862
878
  return;
863
879
  dragging.current = false;
880
+ onCommit?.();
864
881
  setIsPressed(false);
865
882
  setHoverPreview(null);
866
883
  const tw = trackWidthRef.current;
@@ -869,7 +886,7 @@ var CompactSlider = forwardRef2(({
869
886
  const snapped = pixelToValue(currentPx, min, max, step, tw, stepValues);
870
887
  const snappedPx = valueToPixel(snapped, min, max, tw);
871
888
  animate2(motionX, snappedPx, spring2.moderate);
872
- }, [min, max, step, stepValues, motionX0, motionX1]);
889
+ }, [min, max, step, stepValues, motionX0, motionX1, onCommit]);
873
890
  const handleRadixChange = useCallback3((newValues) => {
874
891
  if (dragging.current)
875
892
  return;
@@ -885,8 +902,9 @@ var CompactSlider = forwardRef2(({
885
902
  }, []);
886
903
  const handleCommitEdit = useCallback3((index, v) => {
887
904
  emitChange(index, v);
905
+ onCommit?.();
888
906
  setEditingIndex(null);
889
- }, [emitChange]);
907
+ }, [emitChange, onCommit]);
890
908
  const handleCancelEdit = useCallback3(() => {
891
909
  setEditingIndex(null);
892
910
  }, []);
@@ -925,7 +943,16 @@ var CompactSlider = forwardRef2(({
925
943
  const motionX = index === 0 ? motionX0 : motionX1;
926
944
  return /* @__PURE__ */ jsxs3(motion3.span, {
927
945
  className: "flex items-center justify-center pointer-events-none",
928
- style: {
946
+ style: vertical ? {
947
+ width: THUMB_SIZE,
948
+ height: THUMB_SIZE,
949
+ marginLeft: -THUMB_SIZE / 2,
950
+ y: index === 0 ? thumbY0 : thumbY1,
951
+ position: "absolute",
952
+ left: "50%",
953
+ bottom: 0,
954
+ zIndex: 10
955
+ } : {
929
956
  width: THUMB_SIZE,
930
957
  height: THUMB_SIZE,
931
958
  marginTop: -THUMB_SIZE / 2,
@@ -965,13 +992,13 @@ var CompactSlider = forwardRef2(({
965
992
  };
966
993
  return /* @__PURE__ */ jsxs3("div", {
967
994
  ref,
968
- className: cn2("flex flex-col gap-0 w-full select-none touch-none overflow-visible", valuePosition === "left" || valuePosition === "right" ? "flex-row items-center gap-2 mb-2" : "flex-col", disabled && "opacity-50 pointer-events-none", className),
995
+ className: cn2("flex gap-0 select-none touch-none overflow-visible", vertical ? "h-40 w-fit items-center" : "flex-col w-full", valuePosition === "left" || valuePosition === "right" ? vertical ? "flex-row gap-2" : "flex-row items-center gap-2 mb-2" : "flex-col", vertical && (valuePosition === "top" || valuePosition === "bottom" || valuePosition === "tooltip") && "gap-2", disabled && "opacity-50 pointer-events-none", className),
969
996
  ...props,
970
997
  children: [
971
998
  (valuePosition === "top" || valuePosition === "left") && valueDisplay,
972
999
  /* @__PURE__ */ jsxs3("div", {
973
- className: "relative flex-1 overflow-visible",
974
- style: {
1000
+ className: cn2("relative overflow-visible", vertical ? "min-h-0 min-w-0" : "flex-1", vertical && (valuePosition === "left" || valuePosition === "right" ? "h-full" : "flex-1")),
1001
+ style: vertical ? { width: THUMB_SIZE + 16 } : {
975
1002
  height: valuePosition === "left" || valuePosition === "right" ? THUMB_SIZE + 16 : THUMB_SIZE + (valuePosition === "tooltip" ? 16 : 0),
976
1003
  paddingTop: valuePosition === "tooltip" ? 16 : 0
977
1004
  },
@@ -986,10 +1013,11 @@ var CompactSlider = forwardRef2(({
986
1013
  const trackEl = trackRef.current;
987
1014
  if (!trackEl)
988
1015
  return;
989
- const x = layoutX(e.clientX, trackEl);
1016
+ const x = layoutPos(e, trackEl, vertical);
990
1017
  if (x === null)
991
1018
  return;
992
- computeHoverPreview(Math.max(0, Math.min(trackEl.offsetWidth, x)), trackEl.offsetWidth);
1019
+ const length = axisLength(trackEl, vertical);
1020
+ computeHoverPreview(Math.max(0, Math.min(length, x)), length);
993
1021
  },
994
1022
  children: [
995
1023
  showValue && valuePosition === "tooltip" && /* @__PURE__ */ jsxs3(AnimatePresence2, {
@@ -997,25 +1025,29 @@ var CompactSlider = forwardRef2(({
997
1025
  isInteracting && /* @__PURE__ */ jsx3(TooltipValue, {
998
1026
  value: values[0],
999
1027
  formatValue,
1000
- motionX: motionX0
1028
+ motionX: motionX0,
1029
+ vertical
1001
1030
  }, "tooltip-0"),
1002
1031
  isInteracting && isRange && values[1] !== undefined && /* @__PURE__ */ jsx3(TooltipValue, {
1003
1032
  value: values[1],
1004
1033
  formatValue,
1005
- motionX: motionX1
1034
+ motionX: motionX1,
1035
+ vertical
1006
1036
  }, "tooltip-1")
1007
1037
  ]
1008
1038
  }),
1009
1039
  /* @__PURE__ */ jsx3(SliderPrimitive2.Root, {
1010
1040
  value: stepValues ? values.map((v) => nearestStepIndex(v, stepValues)) : values,
1011
1041
  onValueChange: (v) => handleRadixChange(v),
1042
+ onValueCommitted: () => onCommit?.(),
1012
1043
  name,
1013
1044
  min: stepValues ? 0 : min,
1014
1045
  max: stepValues ? stepValues.length - 1 : max,
1015
1046
  step: stepValues ? 1 : step,
1047
+ orientation,
1016
1048
  disabled,
1017
1049
  className: "absolute inset-0 opacity-0 pointer-events-none",
1018
- style: { height: THUMB_SIZE },
1050
+ style: vertical ? { width: THUMB_SIZE } : { height: THUMB_SIZE },
1019
1051
  children: /* @__PURE__ */ jsxs3(SliderPrimitive2.Control, {
1020
1052
  className: "w-full h-full",
1021
1053
  children: [
@@ -1052,16 +1084,16 @@ var CompactSlider = forwardRef2(({
1052
1084
  }),
1053
1085
  /* @__PURE__ */ jsxs3("div", {
1054
1086
  ref: trackRef,
1055
- className: "relative w-full cursor-ew-resize py-2",
1056
- style: { height: THUMB_SIZE + 16, opacity: ready ? 1 : 0 },
1087
+ className: cn2("relative", vertical ? "h-full cursor-ns-resize px-2" : "w-full cursor-ew-resize py-2"),
1088
+ style: vertical ? { width: THUMB_SIZE + 16, opacity: ready ? 1 : 0 } : { height: THUMB_SIZE + 16, opacity: ready ? 1 : 0 },
1057
1089
  onPointerDown: handlePointerDown,
1058
1090
  onPointerMove: handlePointerMove,
1059
1091
  onPointerUp: handlePointerUp,
1060
1092
  onPointerCancel: handlePointerUp,
1061
1093
  children: [
1062
1094
  /* @__PURE__ */ jsx3("div", {
1063
- className: "absolute cursor-ew-resize",
1064
- style: { left: -8, right: -8, top: 0, bottom: 0 },
1095
+ className: cn2("absolute", vertical ? "cursor-ns-resize" : "cursor-ew-resize"),
1096
+ style: vertical ? { left: 0, right: 0, top: -8, bottom: -8 } : { left: -8, right: -8, top: 0, bottom: 0 },
1065
1097
  onPointerDown: handlePointerDown,
1066
1098
  onPointerMove: handlePointerMove,
1067
1099
  onPointerUp: handlePointerUp,
@@ -1069,15 +1101,12 @@ var CompactSlider = forwardRef2(({
1069
1101
  }),
1070
1102
  /* @__PURE__ */ jsx3(AnimatePresence2, {
1071
1103
  children: hoverPreview && showHoverTooltip && !isPressed && valuePosition !== "tooltip" && /* @__PURE__ */ jsx3(motion3.div, {
1072
- className: "absolute -translate-x-1/2 pointer-events-none z-20",
1073
- initial: { opacity: 0, y: 4 },
1074
- animate: { opacity: 1, y: 0 },
1075
- exit: { opacity: 0, y: 4, transition: spring2.fast.exit },
1104
+ className: cn2("absolute pointer-events-none z-20", vertical ? "translate-y-1/2" : "-translate-x-1/2"),
1105
+ initial: vertical ? { opacity: 0, x: -4 } : { opacity: 0, y: 4 },
1106
+ animate: vertical ? { opacity: 1, x: 0 } : { opacity: 1, y: 0 },
1107
+ exit: vertical ? { opacity: 0, x: -4, transition: spring2.fast.exit } : { opacity: 0, y: 4, transition: spring2.fast.exit },
1076
1108
  transition: spring2.fast,
1077
- style: {
1078
- left: hoverPreview.cursorX,
1079
- top: -20
1080
- },
1109
+ style: vertical ? { bottom: hoverPreview.cursorX, left: "calc(100% + 4px)" } : { left: hoverPreview.cursorX, top: -20 },
1081
1110
  children: /* @__PURE__ */ jsx3(ValueBubble, {
1082
1111
  children: formatValue(hoverPreview.snappedValue)
1083
1112
  })
@@ -1086,27 +1115,22 @@ var CompactSlider = forwardRef2(({
1086
1115
  /* @__PURE__ */ jsxs3(motion3.div, {
1087
1116
  className: cn2("absolute bg-transparent border border-border overflow-hidden rounded-full", trackClassName),
1088
1117
  initial: false,
1089
- animate: {
1090
- height: TRACK_BG_HEIGHT,
1091
- top: 8 + (THUMB_SIZE - TRACK_BG_HEIGHT) / 2
1092
- },
1118
+ animate: vertical ? { width: TRACK_BG_HEIGHT, left: 8 + (THUMB_SIZE - TRACK_BG_HEIGHT) / 2 } : { height: TRACK_BG_HEIGHT, top: 8 + (THUMB_SIZE - TRACK_BG_HEIGHT) / 2 },
1093
1119
  transition: spring2.fast,
1094
1120
  style: {
1095
- left: TRACK_INSET,
1096
- right: TRACK_INSET,
1121
+ ...vertical ? { top: TRACK_INSET, bottom: TRACK_INSET } : { left: TRACK_INSET, right: TRACK_INSET },
1097
1122
  ...trackStyle
1098
1123
  },
1099
1124
  children: [
1100
1125
  !hideFill && /* @__PURE__ */ jsx3(motion3.div, {
1101
- className: cn2("absolute h-full bg-selected/50 dark:bg-accent/40", fillClassName),
1126
+ className: cn2("absolute bg-selected/50 dark:bg-accent/40", vertical ? "w-full" : "h-full", fillClassName),
1102
1127
  style: {
1103
- left: fillLeft,
1104
- width: fillWidth,
1128
+ ...vertical ? { bottom: fillLeft, height: fillWidth } : { left: fillLeft, width: fillWidth },
1105
1129
  ...fillStyle
1106
1130
  }
1107
1131
  }),
1108
1132
  /* @__PURE__ */ jsx3(motion3.div, {
1109
- className: "absolute h-full bg-accent/40 pointer-events-none z-[2]",
1133
+ className: cn2("absolute bg-accent/40 pointer-events-none z-[2]", vertical ? "w-full" : "h-full"),
1110
1134
  initial: false,
1111
1135
  animate: {
1112
1136
  opacity: hoverPreview && !isPressed ? 1 : 0
@@ -1115,26 +1139,29 @@ var CompactSlider = forwardRef2(({
1115
1139
  opacity: { duration: 0.15 }
1116
1140
  },
1117
1141
  style: {
1118
- left: hoverPreview ? hoverPreview.left - TRACK_INSET : 0,
1119
- width: hoverPreview ? hoverPreview.width : 0,
1120
- borderRadius: hoverPreview && hoverPreview.cursorX > hoverPreview.left ? "0 9999px 9999px 0" : "9999px 0 0 9999px"
1142
+ ...vertical ? {
1143
+ bottom: hoverPreview ? hoverPreview.left - TRACK_INSET : 0,
1144
+ height: hoverPreview ? hoverPreview.width : 0
1145
+ } : {
1146
+ left: hoverPreview ? hoverPreview.left - TRACK_INSET : 0,
1147
+ width: hoverPreview ? hoverPreview.width : 0
1148
+ },
1149
+ borderRadius: hoverPreview && hoverPreview.cursorX > hoverPreview.left ? vertical ? "9999px 9999px 0 0" : "0 9999px 9999px 0" : vertical ? "0 0 9999px 9999px" : "9999px 0 0 9999px"
1121
1150
  }
1122
1151
  })
1123
1152
  ]
1124
1153
  }),
1125
1154
  stepDots.length > 0 && /* @__PURE__ */ jsx3(motion3.div, {
1126
- className: "absolute left-0 right-0 pointer-events-none",
1155
+ className: cn2("absolute pointer-events-none", vertical ? "top-0 bottom-0" : "left-0 right-0"),
1127
1156
  style: {
1128
- top: 8 + (THUMB_SIZE - TRACK_BG_HEIGHT) / 2,
1129
- height: TRACK_BG_HEIGHT,
1157
+ ...vertical ? { left: 8 + (THUMB_SIZE - TRACK_BG_HEIGHT) / 2, width: TRACK_BG_HEIGHT } : { top: 8 + (THUMB_SIZE - TRACK_BG_HEIGHT) / 2, height: TRACK_BG_HEIGHT },
1130
1158
  WebkitMaskImage: stepDotsMask,
1131
1159
  maskImage: stepDotsMask
1132
1160
  },
1133
1161
  children: stepDots.map(({ value: v, percent }) => /* @__PURE__ */ jsx3("div", {
1134
1162
  className: "absolute pointer-events-none flex items-center justify-center",
1135
1163
  style: {
1136
- left: `calc(${THUMB_SIZE / 2}px + ${percent} * (100% - ${THUMB_SIZE}px))`,
1137
- top: "50%",
1164
+ ...vertical ? { bottom: `calc(${THUMB_SIZE / 2}px + ${percent} * (100% - ${THUMB_SIZE}px))`, left: "50%" } : { left: `calc(${THUMB_SIZE / 2}px + ${percent} * (100% - ${THUMB_SIZE}px))`, top: "50%" },
1138
1165
  width: 0,
1139
1166
  height: 0
1140
1167
  },
@@ -1182,15 +1209,23 @@ var COMPACT_ONLY = [
1182
1209
  "thumbColor",
1183
1210
  "thumbBorderColor"
1184
1211
  ];
1185
- var Slider2 = forwardRef3(({ size, variant = "pips", value: valueProp, defaultValue, onValueChange, ...rest }, ref) => {
1212
+ var Slider2 = forwardRef3(({ size, variant = "pips", value: valueProp, defaultValue, onValueChange, onValueCommit, ...rest }, ref) => {
1186
1213
  const [value, setValue] = useControllableState2(valueProp, defaultValue ?? (rest.steps && rest.steps.length > 0 ? Math.min(...rest.steps) : rest.min ?? 0), onValueChange);
1187
1214
  const resolved = useSizeVariant2(size);
1188
- if (resolved === "compact" || Array.isArray(value) || COMPACT_ONLY.some((key) => rest[key] !== undefined)) {
1215
+ const latest = useRef4(value);
1216
+ latest.current = value;
1217
+ const change = (next) => {
1218
+ latest.current = next;
1219
+ setValue(next);
1220
+ };
1221
+ const onCommit = onValueCommit && (() => onValueCommit(latest.current));
1222
+ if (resolved === "compact" || Array.isArray(value) || rest.orientation === "vertical" || COMPACT_ONLY.some((key) => rest[key] !== undefined)) {
1189
1223
  return /* @__PURE__ */ jsx4(CompactSlider, {
1190
1224
  ref,
1191
1225
  ...rest,
1192
1226
  value,
1193
- onValueChange: setValue
1227
+ onValueChange: change,
1228
+ onCommit
1194
1229
  });
1195
1230
  }
1196
1231
  const {
@@ -1205,13 +1240,15 @@ var Slider2 = forwardRef3(({ size, variant = "pips", value: valueProp, defaultVa
1205
1240
  hideFill,
1206
1241
  thumbColor,
1207
1242
  thumbBorderColor,
1243
+ orientation,
1208
1244
  ...comfortable
1209
1245
  } = rest;
1210
1246
  return /* @__PURE__ */ jsx4(ComfortableSlider, {
1211
1247
  ref,
1212
1248
  ...comfortable,
1213
1249
  value,
1214
- onValueChange: setValue,
1250
+ onValueChange: change,
1251
+ onCommit,
1215
1252
  variant
1216
1253
  });
1217
1254
  });
@@ -29,7 +29,7 @@ var RING_FILL = {
29
29
  warning: "text-status-warning",
30
30
  error: "text-status-error"
31
31
  };
32
- var RING_SIZE = { default: 16, compact: 14 };
32
+ var RING_SIZE = { default: "size-4", compact: "size-3.5" };
33
33
  var CAPTION = { default: "text-caption", compact: "text-caption-compact" };
34
34
  var enter = springEnter2(spring2.moderate);
35
35
  function toneOf(share, warnAt, errorAt) {
@@ -49,6 +49,8 @@ var Meter2 = forwardRef(({
49
49
  errorAt = 0.9,
50
50
  tone: toneProp,
51
51
  marker,
52
+ animate = true,
53
+ children,
52
54
  size: sizeProp,
53
55
  className
54
56
  }, ref) => {
@@ -56,42 +58,47 @@ var Meter2 = forwardRef(({
56
58
  const reduceMotion = useReduceMotion2();
57
59
  const share = Math.min(Math.max(value / max, 0), 1);
58
60
  const tone = toneProp ?? toneOf(share, warnAt, errorAt);
59
- const transition = reduceMotion ? { duration: 0 } : enter;
61
+ const transition = reduceMotion || !animate ? { duration: 0 } : enter;
60
62
  const root = { ref, value, max, "aria-label": label };
61
63
  if (variant === "ring") {
62
- const px = RING_SIZE[size.variant];
63
- return /* @__PURE__ */ jsx(MeterPrimitive.Root, {
64
+ const valueText = typeof children === "string" ? children : undefined;
65
+ return /* @__PURE__ */ jsxs(MeterPrimitive.Root, {
64
66
  ...root,
65
- className: cn2("inline-flex shrink-0", className),
66
- children: /* @__PURE__ */ jsxs("svg", {
67
- width: px,
68
- height: px,
69
- viewBox: "0 0 20 20",
70
- "aria-hidden": "true",
71
- className: "-rotate-90",
72
- children: [
73
- /* @__PURE__ */ jsx("circle", {
74
- cx: "10",
75
- cy: "10",
76
- r: "7",
77
- fill: "none",
78
- strokeWidth: "2.5",
79
- className: "stroke-current text-border"
80
- }),
81
- /* @__PURE__ */ jsx(motion.circle, {
82
- cx: "10",
83
- cy: "10",
84
- r: "7",
85
- fill: "none",
86
- strokeWidth: "2.5",
87
- strokeLinecap: "round",
88
- className: cn2("stroke-current transition-[color] duration-fast", RING_FILL[tone]),
89
- initial: false,
90
- animate: { pathLength: share },
91
- transition
92
- })
93
- ]
94
- })
67
+ getAriaValueText: valueText === undefined ? undefined : () => valueText,
68
+ className: cn2("relative inline-grid shrink-0 place-items-center", RING_SIZE[size.variant], className),
69
+ children: [
70
+ /* @__PURE__ */ jsxs("svg", {
71
+ viewBox: "0 0 20 20",
72
+ "aria-hidden": "true",
73
+ className: "absolute inset-0 size-full -rotate-90",
74
+ children: [
75
+ /* @__PURE__ */ jsx("circle", {
76
+ cx: "10",
77
+ cy: "10",
78
+ r: "7",
79
+ fill: "none",
80
+ strokeWidth: "2.5",
81
+ className: "stroke-current text-border"
82
+ }),
83
+ /* @__PURE__ */ jsx(motion.circle, {
84
+ cx: "10",
85
+ cy: "10",
86
+ r: "7",
87
+ fill: "none",
88
+ strokeWidth: "2.5",
89
+ strokeLinecap: "round",
90
+ className: cn2("stroke-current transition-[color] duration-fast", RING_FILL[tone]),
91
+ initial: false,
92
+ animate: { pathLength: share },
93
+ transition
94
+ })
95
+ ]
96
+ }),
97
+ children !== undefined && /* @__PURE__ */ jsx("span", {
98
+ className: "relative tabular-nums",
99
+ children
100
+ })
101
+ ]
95
102
  });
96
103
  }
97
104
  const track = /* @__PURE__ */ jsxs("div", {
@@ -14,17 +14,17 @@ import {
14
14
  } from "./components-45r18egt.js";
15
15
  import {
16
16
  useMorph2
17
- } from "./components-8pnvkrbw.js";
17
+ } from "./components-mp7en54n.js";
18
+ import {
19
+ cn2
20
+ } from "./components-xnp09586.js";
18
21
  import {
19
22
  positionerProps2,
20
23
  usePortalContainer2
21
- } from "./components-rgng034x.js";
24
+ } from "./components-xvf8jcza.js";
22
25
  import {
23
26
  POPUP_SHAPE2
24
27
  } from "./components-mse06t0x.js";
25
- import {
26
- cn2
27
- } from "./components-xnp09586.js";
28
28
  import {
29
29
  useShape2
30
30
  } from "./components-kxpcj2ry.js";
@@ -37,18 +37,18 @@ import {
37
37
  } from "./components-nwa2a9tq.js";
38
38
  import {
39
39
  PopupSurface2
40
- } from "./components-nxqrw789.js";
40
+ } from "./components-90sfqz5t.js";
41
41
  import {
42
42
  useSize2
43
43
  } from "./components-znspksk0.js";
44
44
  import {
45
45
  SizeScope2
46
- } from "./components-nz14rwtd.js";
46
+ } from "./components-ffng9rpa.js";
47
47
  import {
48
48
  CommandListRoot2,
49
49
  CommandShortcut2,
50
50
  CommandList2
51
- } from "./components-j79a6jqa.js";
51
+ } from "./components-nc8wggew.js";
52
52
 
53
53
  // components/inputs/search/index.tsx
54
54
  import { Autocomplete } from "@base-ui/react/autocomplete";
@@ -26,11 +26,11 @@ import {
26
26
  } from "./components-45r18egt.js";
27
27
  import {
28
28
  button_default
29
- } from "./components-0h2mng6m.js";
29
+ } from "./components-31pkxwfz.js";
30
30
  import {
31
31
  Spinner2,
32
32
  progress_default
33
- } from "./components-ymq8tbq9.js";
33
+ } from "./components-wqac4434.js";
34
34
  import {
35
35
  formatFileSize2,
36
36
  dragVerdict2,
@@ -11,7 +11,7 @@ import {
11
11
  } from "./components-znspksk0.js";
12
12
  import {
13
13
  SizeScope2
14
- } from "./components-nz14rwtd.js";
14
+ } from "./components-ffng9rpa.js";
15
15
  import {
16
16
  useMergeRefs2
17
17
  } from "./components-bkwjvvkh.js";
@@ -30,10 +30,10 @@ import {
30
30
  } from "./components-y09nr7fe.js";
31
31
  import {
32
32
  FocusRing2
33
- } from "./components-c515d6xr.js";
33
+ } from "./components-v1m0xjbw.js";
34
34
  import {
35
35
  GooIndicator2
36
- } from "./components-z0kz9rxj.js";
36
+ } from "./components-gvwxswpr.js";
37
37
  import {
38
38
  useRowFocus2
39
39
  } from "./components-vcte8p75.js";