jenosize-ui 0.2.2 → 0.3.1

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 (229) hide show
  1. package/README.md +183 -63
  2. package/THIRD-PARTY-NOTICES.md +95 -0
  3. package/dist/GradientPicker-Bv3V3vL_.d.ts +144 -0
  4. package/dist/{PaymentInput-Dn5WVQVy.d.ts → PaymentInput-s7_s3UDi.d.ts} +1 -1
  5. package/dist/{Select-Dt5ARIH8.d.ts → Select-r233iMaU.d.ts} +15 -1
  6. package/dist/{TagInput-BaBeve6L.d.ts → TagInput-w_l9Fp5i.d.ts} +1 -1
  7. package/dist/area-chart.d.ts +2 -2
  8. package/dist/area-chart.js +8 -6
  9. package/dist/at-least-one-BZ2dsck-.d.ts +18 -0
  10. package/dist/avatar.d.ts +1 -1
  11. package/dist/avatar.js +12 -10
  12. package/dist/badge.d.ts +1 -1
  13. package/dist/badge.js +7 -6
  14. package/dist/bar-chart.d.ts +2 -2
  15. package/dist/bar-chart.js +8 -6
  16. package/dist/breadcrumb.d.ts +1 -1
  17. package/dist/breadcrumb.js +5 -4
  18. package/dist/button.d.ts +1 -1
  19. package/dist/button.js +12 -10
  20. package/dist/calendar.d.ts +1 -1
  21. package/dist/calendar.js +16 -14
  22. package/dist/callout.d.ts +4 -2
  23. package/dist/callout.js +13 -11
  24. package/dist/card.d.ts +59 -3
  25. package/dist/card.js +4 -3
  26. package/dist/carousel.d.ts +169 -0
  27. package/dist/carousel.js +10 -0
  28. package/dist/catalog.json +11976 -0
  29. package/dist/checkbox.js +9 -7
  30. package/dist/{chunk-AIARANKE.js → chunk-2EUVBRKG.js} +4 -4
  31. package/dist/{chunk-5ZEUTSCV.js → chunk-2RRPWOKT.js} +6 -6
  32. package/dist/{chunk-DD5KJVFV.js → chunk-3JFSKCVU.js} +19 -19
  33. package/dist/{chunk-OACWA4TC.js → chunk-3ZZZPT5G.js} +6 -6
  34. package/dist/{chunk-LQURV7HQ.js → chunk-47EOHGXM.js} +4 -4
  35. package/dist/{chunk-CGHYXWTT.js → chunk-4KRCT3Q2.js} +4 -4
  36. package/dist/chunk-4P3JA653.js +1129 -0
  37. package/dist/{chunk-FWRHBMWT.js → chunk-4Y32RIC7.js} +5 -19
  38. package/dist/{chunk-BBKE4W3B.js → chunk-5Z26DU23.js} +7 -7
  39. package/dist/{chunk-7QXOGAN6.js → chunk-6CJYVYVN.js} +87 -538
  40. package/dist/{chunk-3HOHLQVP.js → chunk-6FGLABYH.js} +3 -3
  41. package/dist/{chunk-GQRSABRN.js → chunk-6Q4VVBFO.js} +4 -4
  42. package/dist/{chunk-MCQG4H6T.js → chunk-6T3QAO5K.js} +12 -4
  43. package/dist/chunk-7JOW3LEH.js +4852 -0
  44. package/dist/{chunk-AFYXSZGW.js → chunk-7LSUUEAF.js} +7 -5
  45. package/dist/{chunk-7VLYQR4D.js → chunk-7OFGPDYJ.js} +3 -3
  46. package/dist/{chunk-7GUPNTAH.js → chunk-7RD5RTHU.js} +7 -7
  47. package/dist/{chunk-X2VMIBK5.js → chunk-A36W77MQ.js} +4 -4
  48. package/dist/chunk-AZFHRLYF.js +67 -0
  49. package/dist/{chunk-CFFWYXDW.js → chunk-B6LYO33Y.js} +5 -5
  50. package/dist/{chunk-P6CON2R2.js → chunk-BH32X25C.js} +3 -3
  51. package/dist/{chunk-KHGW72BM.js → chunk-CH2XMCWX.js} +3 -3
  52. package/dist/{chunk-FNQJJO63.js → chunk-D46OKHTH.js} +4 -4
  53. package/dist/{chunk-LE44X5GS.js → chunk-D4YGYNNY.js} +9 -9
  54. package/dist/{chunk-T5574MXM.js → chunk-D7WD4SUC.js} +8 -8
  55. package/dist/{chunk-33TOK7ES.js → chunk-DCKVNHV5.js} +5 -5
  56. package/dist/chunk-EBZNUQ6E.js +525 -0
  57. package/dist/{chunk-22M75A3N.js → chunk-ED5UCYAV.js} +14 -11
  58. package/dist/{chunk-IQNVSQRK.js → chunk-EDVYLO2N.js} +5 -5
  59. package/dist/{chunk-N3RVMBPX.js → chunk-EJKQGUUM.js} +4 -4
  60. package/dist/{chunk-POQTE7JI.js → chunk-EKQLIUV5.js} +7 -7
  61. package/dist/{chunk-ULGCGKOE.js → chunk-EKV3CVTY.js} +4 -4
  62. package/dist/{chunk-LCG34A5T.js → chunk-EVINS473.js} +5 -3
  63. package/dist/{chunk-ZZSNTCCL.js → chunk-G7B2QUQP.js} +4 -4
  64. package/dist/{chunk-SB3DG572.js → chunk-GHRZC5LS.js} +6 -6
  65. package/dist/{chunk-5YWH2ANQ.js → chunk-GIC6T647.js} +11 -10
  66. package/dist/{chunk-7ZM7SNCZ.js → chunk-GPHGPY6T.js} +3 -3
  67. package/dist/chunk-GV2KTRRP.js +325 -0
  68. package/dist/{chunk-4RBIWI2Q.js → chunk-GYL4KOPT.js} +3 -3
  69. package/dist/{chunk-5KSD4WKN.js → chunk-HB6UA6EF.js} +5 -5
  70. package/dist/{chunk-CGZXQ7PA.js → chunk-HNNNJP3A.js} +3 -3
  71. package/dist/chunk-HTWGTTSF.js +1011 -0
  72. package/dist/chunk-IH2F5UNQ.js +109 -0
  73. package/dist/{chunk-QNIKRB62.js → chunk-INYUL4DX.js} +4 -4
  74. package/dist/{chunk-SKRR3ZMP.js → chunk-IUB5TSSH.js} +3 -3
  75. package/dist/chunk-JGGSRKHW.js +344 -0
  76. package/dist/{chunk-ZR6HNKSN.js → chunk-JHHJNIW2.js} +3 -3
  77. package/dist/chunk-KBI442IB.js +113 -0
  78. package/dist/chunk-KBQJIVUB.js +33 -0
  79. package/dist/{chunk-3QXLIZIX.js → chunk-KNGJ3CSB.js} +3 -3
  80. package/dist/chunk-KNKR5TUM.js +183 -0
  81. package/dist/{chunk-KZP6B6B3.js → chunk-KTWTYK5U.js} +16 -5
  82. package/dist/{chunk-5XPMY2LF.js → chunk-LKUAVDWP.js} +5 -5
  83. package/dist/{chunk-YHBI52P2.js → chunk-LPWSP523.js} +3 -3
  84. package/dist/{chunk-GLKFFA7N.js → chunk-LY7IJOUF.js} +5 -5
  85. package/dist/{chunk-R4Z7BINC.js → chunk-LYWQD5KL.js} +8 -8
  86. package/dist/{chunk-LLPWQDF7.js → chunk-MTOTPAYZ.js} +3 -3
  87. package/dist/{chunk-AZ7DKRBY.js → chunk-MVF7FA4D.js} +5 -5
  88. package/dist/{chunk-AIGYMTCU.js → chunk-MVUNB43J.js} +3 -3
  89. package/dist/{chunk-T4ZFZTY6.js → chunk-N7DLNDER.js} +4 -4
  90. package/dist/{chunk-E2YZ7IMT.js → chunk-NDRQETOQ.js} +15 -11
  91. package/dist/{chunk-ZD3MOLIB.js → chunk-O7CPRU67.js} +4 -4
  92. package/dist/{chunk-OLLD2BZN.js → chunk-OEYKTHG7.js} +3 -3
  93. package/dist/{chunk-TX57TNJS.js → chunk-OG3H3RP2.js} +9 -9
  94. package/dist/{chunk-UGBNYSBN.js → chunk-PFKPKE6O.js} +20 -34
  95. package/dist/chunk-PRWPFBA5.js +619 -0
  96. package/dist/{chunk-QDKETK7D.js → chunk-S55JKMG7.js} +5 -5
  97. package/dist/{chunk-QDYE5LVT.js → chunk-SF3HCW4G.js} +45 -4
  98. package/dist/{chunk-6MMBQVRO.js → chunk-TDKKZA63.js} +9 -9
  99. package/dist/{chunk-HHYEAFCL.js → chunk-TDXHBS2C.js} +11 -11
  100. package/dist/{chunk-74AIU53R.js → chunk-THGGU64E.js} +3 -3
  101. package/dist/chunk-UHSGD4CD.js +364 -0
  102. package/dist/{chunk-HV2W6HUR.js → chunk-URAURI6G.js} +10 -10
  103. package/dist/{chunk-D6XO4JVM.js → chunk-UU6KUS5O.js} +42 -20
  104. package/dist/{chunk-NKG4N6HA.js → chunk-V7KEEDSF.js} +5 -4
  105. package/dist/{chunk-IEAWNA3V.js → chunk-VDFWWWLL.js} +3 -3
  106. package/dist/chunk-VHAA22YE.js +11 -0
  107. package/dist/chunk-WJB5GWAZ.js +20 -0
  108. package/dist/{chunk-KJ5JUS53.js → chunk-WM6DGNIA.js} +9 -9
  109. package/dist/{chunk-MFFA5MXY.js → chunk-WUXMLJEC.js} +5 -5
  110. package/dist/{chunk-YPNL2NBD.js → chunk-XNXBO44X.js} +33 -11
  111. package/dist/chunk-XPY3XT7L.js +5671 -0
  112. package/dist/{chunk-54SIZR63.js → chunk-XVFRDKZJ.js} +7 -7
  113. package/dist/{chunk-LYXPJERB.js → chunk-YDD46AX2.js} +5 -5
  114. package/dist/{chunk-NC63TYNW.js → chunk-YHQJGNXD.js} +7 -7
  115. package/dist/{chunk-I6WMNXC7.js → chunk-YKRE5NIH.js} +6 -6
  116. package/dist/{chunk-RJTVCA62.js → chunk-ZIEGUI25.js} +3 -3
  117. package/dist/{chunk-5DP7W5HX.js → chunk-ZLDWYTDA.js} +3 -3
  118. package/dist/color-input.d.ts +93 -0
  119. package/dist/color-input.js +36 -0
  120. package/dist/color-picker.d.ts +268 -0
  121. package/dist/color-picker.js +29 -0
  122. package/dist/color-value-DYzChVOW.d.ts +129 -0
  123. package/dist/combobox.d.ts +1 -1
  124. package/dist/combobox.js +14 -12
  125. package/dist/data-map.d.ts +1673 -0
  126. package/dist/data-map.js +36 -0
  127. package/dist/date-calendar.d.ts +49 -0
  128. package/dist/date-calendar.js +13 -0
  129. package/dist/date-input.d.ts +1 -1
  130. package/dist/date-input.js +12 -10
  131. package/dist/date-picker.d.ts +15 -131
  132. package/dist/date-picker.js +26 -21
  133. package/dist/date-types-CLZek3W2.d.ts +100 -0
  134. package/dist/dialog.d.ts +1 -1
  135. package/dist/dialog.js +10 -9
  136. package/dist/drawer.d.ts +1 -1
  137. package/dist/drawer.js +9 -8
  138. package/dist/dropdown-menu.d.ts +1 -1
  139. package/dist/dropdown-menu.js +5 -4
  140. package/dist/dropzone.d.ts +3 -3
  141. package/dist/dropzone.js +18 -16
  142. package/dist/file-trigger.js +1 -0
  143. package/dist/form.d.ts +15 -5
  144. package/dist/form.js +75 -35
  145. package/dist/header-navigation.d.ts +2 -2
  146. package/dist/header-navigation.js +20 -18
  147. package/dist/helper.d.ts +1 -1
  148. package/dist/helper.js +1 -0
  149. package/dist/illustration.js +1 -0
  150. package/dist/index.d.ts +26 -11
  151. package/dist/index.js +92 -77
  152. package/dist/indicator.js +5 -4
  153. package/dist/inline-banner.d.ts +68 -0
  154. package/dist/inline-banner.js +21 -0
  155. package/dist/input.d.ts +1 -1
  156. package/dist/input.js +11 -9
  157. package/dist/kanban-board.d.ts +2 -2
  158. package/dist/kanban-board.js +15 -13
  159. package/dist/labels-CuSlirP_.d.ts +1381 -0
  160. package/dist/line-chart.d.ts +2 -2
  161. package/dist/line-chart.js +8 -6
  162. package/dist/mcp.js +231 -0
  163. package/dist/number-input.d.ts +1 -1
  164. package/dist/number-input.js +11 -9
  165. package/dist/pagination.d.ts +1 -1
  166. package/dist/pagination.js +15 -13
  167. package/dist/{card-D56VxyAe.d.ts → panel-CUGm_Mxy.d.ts} +9 -57
  168. package/dist/payment-input.d.ts +3 -3
  169. package/dist/payment-input.js +11 -9
  170. package/dist/picker-draft-BPV3MUPY.d.ts +9 -0
  171. package/dist/pie-chart.d.ts +2 -2
  172. package/dist/pie-chart.js +8 -6
  173. package/dist/popover.d.ts +65 -4
  174. package/dist/popover.js +9 -8
  175. package/dist/progress-steps.js +5 -4
  176. package/dist/progress.js +4 -3
  177. package/dist/provider.d.ts +1 -1
  178. package/dist/provider.js +4 -3
  179. package/dist/qr-code.d.ts +227 -0
  180. package/dist/qr-code.js +20 -0
  181. package/dist/radar-chart.d.ts +2 -2
  182. package/dist/radar-chart.js +8 -6
  183. package/dist/radial-chart.d.ts +2 -2
  184. package/dist/radial-chart.js +8 -6
  185. package/dist/radio.js +9 -7
  186. package/dist/rich-text-editor.d.ts +624 -0
  187. package/dist/rich-text-editor.js +52 -0
  188. package/dist/rich-text-highlight.d.ts +11 -0
  189. package/dist/rich-text-highlight.js +65 -0
  190. package/dist/rich-text-sanitize.d.ts +17 -0
  191. package/dist/rich-text-sanitize.js +176 -0
  192. package/dist/scroll-area.js +1 -0
  193. package/dist/select.d.ts +2 -2
  194. package/dist/select.js +17 -15
  195. package/dist/separator.js +3 -2
  196. package/dist/shared-CGf2D8ZX.d.ts +20 -0
  197. package/dist/sidebar-navigation.d.ts +73 -32
  198. package/dist/sidebar-navigation.js +15 -13
  199. package/dist/sidebar-state.d.ts +76 -0
  200. package/dist/sidebar-state.js +27 -0
  201. package/dist/skeleton.js +3 -2
  202. package/dist/slider.d.ts +321 -0
  203. package/dist/slider.js +14 -0
  204. package/dist/styles.css +1 -1
  205. package/dist/switch.d.ts +1 -1
  206. package/dist/switch.js +3 -2
  207. package/dist/table.d.ts +3 -19
  208. package/dist/table.js +34 -32
  209. package/dist/tabs.js +3 -2
  210. package/dist/tag-input.d.ts +3 -3
  211. package/dist/tag-input.js +14 -12
  212. package/dist/tag.d.ts +1 -1
  213. package/dist/tag.js +5 -4
  214. package/dist/textarea.js +9 -7
  215. package/dist/theme.css +965 -0
  216. package/dist/theme.js +13 -11
  217. package/dist/toast.d.ts +1 -1
  218. package/dist/toast.js +13 -11
  219. package/dist/tooltip.js +5 -3
  220. package/dist/tree.d.ts +1 -1
  221. package/dist/tree.js +7 -6
  222. package/dist/{types-DR9rAEy1.d.ts → types-BoZ6XeLB.d.ts} +1 -1
  223. package/dist/{use-uploads-KaPqDklo.d.ts → use-uploads-cHo2p7Gn.d.ts} +1 -1
  224. package/dist/verification-code-input.js +11 -9
  225. package/package.json +105 -8
  226. package/dist/chunk-BLIZ3CL3.js +0 -49
  227. package/dist/labels-DPrh0se9.d.ts +0 -627
  228. package/dist/panel-El4oI68p.d.ts +0 -9
  229. package/dist/shared-BYXJPnsN.d.ts +0 -11
@@ -0,0 +1,619 @@
1
+ import { INTRINSIC_STACK, INTRINSIC_CELL, IntrinsicWidth } from './chunk-7S2TBALK.js';
2
+ import { useFieldValidity, FieldFrame } from './chunk-HB6UA6EF.js';
3
+ import { cn } from './chunk-ZSNJ6UA3.js';
4
+ import { useLabels } from './chunk-ZIEGUI25.js';
5
+ import { warnPositiveNumber, devWarn, warnNeedsName, warnNonNegativeInt, warnStepFinerThanTrack } from './chunk-SF3HCW4G.js';
6
+ import { useDirection } from '@base-ui/react/direction-provider';
7
+ import { Slider as Slider$1 } from '@base-ui/react/slider';
8
+ import * as React from 'react';
9
+ import { jsx, jsxs } from 'react/jsx-runtime';
10
+
11
+ // src/components/slider/labels.ts
12
+ var SLIDER_LABELS = {
13
+ /** `getAriaLabel(0)` on a range — the lower thumb. */
14
+ minimum: "Minimum",
15
+ /** `getAriaLabel(1)` on a range — the upper thumb. */
16
+ maximum: "Maximum",
17
+ /** The `editable` bubble's text input. It is a SECOND focusable control inside the slider, so it
18
+ * owes its own name — the thumbs keep theirs. */
19
+ editValue: "Edit value"
20
+ };
21
+ var isDiscrete = (reason) => reason === "keyboard" || reason === "input-change";
22
+ var BAND = {
23
+ horizontal: "relative flex h-6 w-full touch-none items-center select-none data-disabled:cursor-not-allowed data-disabled:opacity-50",
24
+ vertical: "relative flex h-full w-6 touch-none justify-center select-none data-disabled:cursor-not-allowed data-disabled:opacity-50"
25
+ };
26
+ var ROOT = {
27
+ horizontal: "flex w-full flex-col",
28
+ vertical: "flex h-full min-h-48 flex-row items-stretch"
29
+ };
30
+ function readoutClearance(orientation, valuePosition, hasBand) {
31
+ if (valuePosition === "none") return false;
32
+ if (orientation === "vertical") return !hasBand && "pr-16";
33
+ if (valuePosition === "top-floating") return "pt-6";
34
+ return !hasBand && "pb-7";
35
+ }
36
+ var RAIL_BASE = "relative rounded-full bg-quaternary";
37
+ var RAIL = {
38
+ horizontal: { sm: "h-1 w-full", md: "h-1.5 w-full", lg: "h-2 w-full" },
39
+ vertical: { sm: "h-full w-1", md: "h-full w-1.5", lg: "h-full w-2" }
40
+ };
41
+ var FILL = "rounded-full bg-brand-solid";
42
+ var THUMB_BASE = cn(
43
+ "rounded-full bg-slider-handle-bg shadow-md ring-2 ring-slider-handle-border ring-inset",
44
+ "cursor-grab outline-focus-ring data-dragging:cursor-grabbing",
45
+ "has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2",
46
+ "data-disabled:cursor-not-allowed"
47
+ );
48
+ var THUMB = { sm: "size-3", md: "size-4.5", lg: "size-6" };
49
+ var BUBBLE = "absolute rounded-lg bg-primary_alt px-2 py-1 shadow-lg ring-1 ring-secondary_alt ring-inset";
50
+ var BUBBLE_TEXT = "text-xs font-semibold text-tertiary tabular-nums";
51
+ var PLAIN_TEXT = "absolute text-sm font-medium text-primary tabular-nums";
52
+ var READOUT_OFFSET = {
53
+ none: { horizontal: "", vertical: "" },
54
+ bottom: { horizontal: "top-full mt-1.5 -translate-x-1/2", vertical: "left-full ml-3 translate-y-1/2" },
55
+ "top-floating": { horizontal: "top-0 -translate-x-1/2 -translate-y-full", vertical: "left-full ml-3 translate-y-1/2" }
56
+ };
57
+ var MARK_BAND = {
58
+ horizontal: { flat: "relative h-5 w-full", stacked: "relative h-6.25 w-full" },
59
+ vertical: { flat: "relative ml-2 h-full w-max", stacked: "relative ml-2 h-full w-max" }
60
+ };
61
+ function markBandClear(orientation, valuePosition) {
62
+ if (orientation === "vertical") return valuePosition !== "none" && "ml-16";
63
+ return valuePosition === "bottom" && "mt-8";
64
+ }
65
+ var MARK_TEXT = "absolute text-xs whitespace-nowrap";
66
+ var MARK_TICK_PAINT = {
67
+ horizontal: "h-2 w-0.5 bg-quaternary",
68
+ vertical: "h-0.5 w-2 bg-quaternary"
69
+ };
70
+ var MARK_TICK_PULL = { horizontal: "-top-1.25", vertical: "-left-1.25" };
71
+ var MARK_TICK = {
72
+ horizontal: cn("absolute", MARK_TICK_PULL.horizontal, MARK_TICK_PAINT.horizontal),
73
+ vertical: cn("absolute", MARK_TICK_PULL.vertical, MARK_TICK_PAINT.vertical)
74
+ };
75
+ var MARK_TICK_INLINE = {
76
+ horizontal: cn("absolute left-1/2 -translate-x-1/2", MARK_TICK_PULL.horizontal, MARK_TICK_PAINT.horizontal),
77
+ vertical: cn("absolute top-1/2 -translate-y-1/2", MARK_TICK_PULL.vertical, MARK_TICK_PAINT.vertical)
78
+ };
79
+ var MARK_STACK = { horizontal: "pt-1.25", vertical: "pl-1.25" };
80
+ function toPercent(value, min, max) {
81
+ if (max <= min || !Number.isFinite(value)) return 0;
82
+ return Math.min(100, Math.max(0, (value - min) * 100 / (max - min)));
83
+ }
84
+ function markAlign(percent, orientation) {
85
+ if (orientation === "vertical") {
86
+ if (percent <= 0) return "translate-y-0";
87
+ return percent >= 100 ? "translate-y-full" : "translate-y-1/2";
88
+ }
89
+ if (percent <= 0) return "translate-x-0";
90
+ return percent >= 100 ? "-translate-x-full" : "-translate-x-1/2";
91
+ }
92
+ function snapToStep(value, min, step) {
93
+ if (!Number.isFinite(step) || step <= 0) return value;
94
+ const stepped = min + Math.round((value - min) / step) * step;
95
+ const decimals = (String(step).split(".", 2)[1] ?? "").length;
96
+ return decimals === 0 ? stepped : Number(stepped.toFixed(Math.min(decimals + 2, 20)));
97
+ }
98
+ function bandAt(scale, value) {
99
+ const last = scale.bands - 1;
100
+ for (let index = 0; index < last; index++) if (value < (scale.points[index + 1] ?? Infinity)) return index;
101
+ return Math.max(0, last);
102
+ }
103
+ function anchoredToTrack(scale, value) {
104
+ const index = bandAt(scale, value);
105
+ const lo = scale.points[index] ?? 0;
106
+ const hi = scale.points[index + 1] ?? lo;
107
+ if (hi <= lo) return index;
108
+ return index + (Math.min(hi, Math.max(lo, value)) - lo) / (hi - lo);
109
+ }
110
+ function anchoredToDomain(scale, track) {
111
+ const clamped = Math.min(scale.bands, Math.max(0, track));
112
+ const index = Math.min(scale.bands - 1, Math.floor(clamped));
113
+ const lo = scale.points[index] ?? 0;
114
+ const hi = scale.points[index + 1] ?? lo;
115
+ return lo + (clamped - index) * (hi - lo);
116
+ }
117
+ function anchoredSnap(scale, value) {
118
+ const index = bandAt(scale, value);
119
+ const lo = scale.points[index] ?? 0;
120
+ const hi = scale.points[index + 1] ?? lo;
121
+ const inside = Math.min(hi, Math.max(lo, value));
122
+ return Math.min(hi, Math.max(lo, snapToStep(inside, lo, scale.steps[index] ?? 1)));
123
+ }
124
+ function anchoredMove(scale, from, direction, distance) {
125
+ const here = bandAt(scale, from);
126
+ const index = direction === -1 && from <= (scale.points[here] ?? 0) ? Math.max(0, here - 1) : here;
127
+ const lo = scale.points[index] ?? 0;
128
+ const hi = scale.points[index + 1] ?? lo;
129
+ const step = scale.steps[index] ?? 1;
130
+ const moved = from + direction * Math.max(step, distance ?? step);
131
+ return anchoredSnap(scale, direction === 1 ? Math.min(hi, moved) : Math.max(lo, moved));
132
+ }
133
+ function restoreFocusVisible(input) {
134
+ if (input.matches(":focus-visible")) return;
135
+ input.blur();
136
+ input.focus({ preventScroll: true, focusVisible: true });
137
+ }
138
+ var ANCHORED_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End", "PageUp", "PageDown"]);
139
+ var ANCHORED_COMPOSITE_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"]);
140
+ function longest(candidates) {
141
+ let widest = 0;
142
+ for (const candidate of candidates) widest = Math.max(widest, candidate.length);
143
+ return widest;
144
+ }
145
+ function SliderReadout(props) {
146
+ const { text, editSeed, percent, position, orientation, widthFloor, candidates, editable, active, editLabel, onEditCommit } = props;
147
+ const [draft, setDraft] = React.useState(null);
148
+ const inputRef = React.useRef(null);
149
+ const editing = draft !== null;
150
+ React.useEffect(() => {
151
+ if (editing) inputRef.current?.select();
152
+ }, [editing]);
153
+ const raised = active || editing ? "z-10" : void 0;
154
+ const offset = READOUT_OFFSET[position][orientation];
155
+ const anchor = orientation === "vertical" ? { bottom: `${percent}%` } : { left: `${percent}%` };
156
+ const floor = candidates === null ? { minWidth: `${widthFloor}ch` } : void 0;
157
+ const body = candidates === null ? text : (
158
+ /* The exact half: every label stacked into one grid cell, so the cell resolves to the widest
159
+ member and the bubble stops resizing between stops. */
160
+ /* @__PURE__ */ jsxs("span", { className: INTRINSIC_STACK, children: [
161
+ /* @__PURE__ */ jsx("span", { className: cn(INTRINSIC_CELL, "text-center"), children: text }),
162
+ /* @__PURE__ */ jsx(IntrinsicWidth, { candidates, className: "font-semibold" })
163
+ ] })
164
+ );
165
+ if (position === "bottom") {
166
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn(PLAIN_TEXT, offset, raised, "pointer-events-none"), style: { ...anchor, ...floor }, children: body });
167
+ }
168
+ const bubbleBody = floor ? /* @__PURE__ */ jsx("span", { className: "block text-center", style: floor, children: body }) : body;
169
+ if (!editable) {
170
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn(BUBBLE, BUBBLE_TEXT, offset, raised, "pointer-events-none"), style: { ...anchor }, children: bubbleBody });
171
+ }
172
+ const stop = (event) => event.stopPropagation();
173
+ if (editing) {
174
+ return (
175
+ /* `BUBBLE_TEXT` and `flex` are both HEIGHT, not decoration. Without the text class the wrapper
176
+ keeps the inherited 16px/24px font, and its line-box STRUT — not the 18px input — sets the
177
+ height, so the bubble grew 26px → 32px the moment it took focus; without `flex` the input is
178
+ an inline-block on the baseline and the strut's descender adds the same kind of gap. As a
179
+ flex line there is no strut and no baseline: the box is exactly the input's 18px + `py-2`. */
180
+ /* @__PURE__ */ jsx("span", { className: cn(BUBBLE, BUBBLE_TEXT, offset, raised, "flex items-center"), style: { ...anchor }, onPointerDown: stop, children: /* @__PURE__ */ jsx(
181
+ "input",
182
+ {
183
+ ref: inputRef,
184
+ type: "text",
185
+ inputMode: "decimal",
186
+ "aria-label": editLabel,
187
+ value: draft,
188
+ onChange: (event) => setDraft(event.target.value),
189
+ onBlur: () => {
190
+ onEditCommit(draft);
191
+ setDraft(null);
192
+ },
193
+ onKeyDown: (event) => {
194
+ if (event.key === "Enter") {
195
+ event.preventDefault();
196
+ onEditCommit(draft);
197
+ setDraft(null);
198
+ } else if (event.key === "Escape") {
199
+ event.preventDefault();
200
+ setDraft(null);
201
+ }
202
+ },
203
+ className: cn(BUBBLE_TEXT, "block bg-transparent text-center outline-none"),
204
+ style: { width: `${Math.max(widthFloor, draft.length)}ch` }
205
+ }
206
+ ) })
207
+ );
208
+ }
209
+ return /* @__PURE__ */ jsx(
210
+ "button",
211
+ {
212
+ type: "button",
213
+ "aria-label": editLabel,
214
+ onPointerDown: stop,
215
+ onFocus: () => setDraft(String(editSeed)),
216
+ className: cn(BUBBLE, BUBBLE_TEXT, offset, raised, "cursor-text outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2"),
217
+ style: { ...anchor },
218
+ children: bubbleBody
219
+ }
220
+ );
221
+ }
222
+ function Slider(props) {
223
+ const {
224
+ size = "md",
225
+ orientation = "horizontal",
226
+ valuePosition = "none",
227
+ band: bandMode = "labels",
228
+ labels,
229
+ name,
230
+ form,
231
+ "aria-label": ariaLabel,
232
+ "aria-labelledby": ariaLabelledBy,
233
+ label,
234
+ tooltip,
235
+ tooltipDescription,
236
+ hint,
237
+ required = false,
238
+ hideRequiredIndicator = false,
239
+ invalid = false,
240
+ error,
241
+ disabled = false,
242
+ fullWidth = true,
243
+ className
244
+ } = props;
245
+ const t = useLabels("slider", SLIDER_LABELS, labels);
246
+ const { isInvalid, showError } = useFieldValidity(invalid, error);
247
+ const labelId = React.useId();
248
+ const direction = useDirection();
249
+ const stops = props.stops;
250
+ const isOrdinal = stops !== void 0;
251
+ const anchors = isOrdinal ? void 0 : props.anchors;
252
+ const hasAnchors = anchors !== void 0;
253
+ const declaredStep = isOrdinal ? 1 : props.step ?? 1;
254
+ const declaredLargeStep = isOrdinal ? 1 : props.largeStep ?? 10;
255
+ const scale = React.useMemo(() => {
256
+ if (anchors === void 0) return null;
257
+ const points = [];
258
+ const labels2 = [];
259
+ const steps = [];
260
+ for (const [index, anchor] of anchors.entries()) {
261
+ warnPositiveNumber("Slider", `anchors[${index}].step`, anchor.step);
262
+ if (!Number.isFinite(anchor.value)) {
263
+ devWarn(`<Slider> \`anchors[${index}].value\` is not a finite number and is not drawn.`);
264
+ continue;
265
+ }
266
+ const previous = points.at(-1);
267
+ if (previous !== void 0 && anchor.value <= previous) {
268
+ devWarn(
269
+ `<Slider> \`anchors[${index}]\` (${anchor.value}) is not above the anchor before it (${previous}) and is not drawn \u2014 a scale runs one way, and a band of zero or negative width has no position to give.`
270
+ );
271
+ continue;
272
+ }
273
+ points.push(anchor.value);
274
+ labels2.push(anchor.label);
275
+ steps.push(anchor.step ?? declaredStep);
276
+ }
277
+ if (points.length < 2) {
278
+ devWarn(`<Slider> \`anchors\` needs at least two usable boundaries \u2014 one point is not a scale.`);
279
+ return null;
280
+ }
281
+ const bands = points.length - 1;
282
+ if (anchors.at(-1)?.step !== void 0) {
283
+ devWarn(`<Slider> the LAST \`anchors\` entry's \`step\` is ignored \u2014 no band starts there. A band's step is declared on the anchor that OPENS it.`);
284
+ }
285
+ let finest = 1;
286
+ for (let index = 0; index < bands; index++) {
287
+ const width = (points[index + 1] ?? 0) - (points[index] ?? 0);
288
+ finest = Math.min(finest, 1, (steps[index] ?? 1) / width);
289
+ }
290
+ return { points, steps: steps.slice(0, bands), labels: labels2, bands, resolution: Math.max(finest / 4, 1e-6) };
291
+ }, [anchors, declaredStep]);
292
+ const min = isOrdinal || scale ? 0 : props.min ?? 0;
293
+ const max = isOrdinal ? Math.max(0, stops.length - 1) : scale ? scale.bands : props.max ?? 100;
294
+ const step = isOrdinal ? 1 : scale?.resolution ?? declaredStep;
295
+ const largeStep = isOrdinal ? 1 : scale?.resolution ?? declaredLargeStep;
296
+ const minStepsBetweenValues = isOrdinal || hasAnchors ? 0 : props.minStepsBetweenValues ?? 0;
297
+ const format = isOrdinal ? void 0 : props.format;
298
+ const marks = isOrdinal || hasAnchors ? void 0 : props.marks;
299
+ const editableProp = isOrdinal ? false : props.editable ?? false;
300
+ warnNeedsName("Slider", Boolean(label || ariaLabel || ariaLabelledBy));
301
+ warnPositiveNumber("Slider", "step", isOrdinal ? void 0 : props.step);
302
+ warnPositiveNumber("Slider", "largeStep", isOrdinal ? void 0 : props.largeStep);
303
+ warnNonNegativeInt("Slider", "minStepsBetweenValues", isOrdinal || hasAnchors ? void 0 : props.minStepsBetweenValues);
304
+ if (!isOrdinal && !hasAnchors && max <= min) devWarn(`<Slider> \`max\` (${max}) must be greater than \`min\` (${min}).`);
305
+ if (bandMode !== "labels" && !isOrdinal && !hasAnchors && marks === void 0) {
306
+ devWarn(`<Slider> \`band="${bandMode}"\` has no band to draw \u2014 a numeric scale needs \`marks\` to say where its positions are.`);
307
+ }
308
+ if (editableProp && valuePosition !== "top-floating") {
309
+ devWarn('<Slider> `editable` needs `valuePosition="top-floating"` \u2014 there is no bubble to type into. Rendering read-only.');
310
+ }
311
+ const editable = editableProp && valuePosition === "top-floating";
312
+ const controlRef = React.useRef(null);
313
+ React.useEffect(() => {
314
+ if (isOrdinal) return;
315
+ const axis = orientation === "vertical" ? "height" : "width";
316
+ if (!scale) {
317
+ warnStepFinerThanTrack("Slider", "step", controlRef.current, { min, max, step }, axis);
318
+ return;
319
+ }
320
+ let worst = -1;
321
+ let at = 0;
322
+ for (let index = 0; index < scale.bands; index++) {
323
+ const density = ((scale.points[index + 1] ?? 0) - (scale.points[index] ?? 0)) / (scale.steps[index] ?? 1);
324
+ if (density > worst) {
325
+ worst = density;
326
+ at = index;
327
+ }
328
+ }
329
+ const lo = scale.points[at] ?? 0;
330
+ const hi = scale.points[at + 1] ?? lo;
331
+ warnStepFinerThanTrack("Slider", "step", controlRef.current, { min: lo, max: hi, step: scale.steps[at] ?? 1 }, axis, {
332
+ portion: 1 / scale.bands,
333
+ band: `${lo}\u2026${hi}`
334
+ });
335
+ }, [isOrdinal, scale, min, max, step, orientation]);
336
+ const optionIndex = React.useCallback(
337
+ (value) => {
338
+ const at = stops?.findIndex((stop) => stop.value === value) ?? -1;
339
+ return at === -1 ? 0 : at;
340
+ },
341
+ [stops]
342
+ );
343
+ const toTrackValue = React.useCallback((value) => scale ? anchoredToTrack(scale, value) : value, [scale]);
344
+ const toDomainValue = React.useCallback((track) => scale ? anchoredSnap(scale, anchoredToDomain(scale, track)) : track, [scale]);
345
+ const toNumbers = React.useCallback(
346
+ (value) => {
347
+ if (value === void 0 || value === null) return void 0;
348
+ const list = Array.isArray(value) ? value : [value];
349
+ return isOrdinal ? list.map(optionIndex) : list.map((v) => typeof v === "number" ? toTrackValue(v) : min);
350
+ },
351
+ [isOrdinal, optionIndex, toTrackValue, min]
352
+ );
353
+ const controlledNumbers = toNumbers(props.value);
354
+ const isControlled = props.value !== void 0;
355
+ const [uncontrolled, setUncontrolled] = React.useState(() => toNumbers(props.defaultValue) ?? [min]);
356
+ const [activeIndex, setActiveIndex] = React.useState(null);
357
+ const values = controlledNumbers ?? uncontrolled;
358
+ const isRange = values.length > 1;
359
+ const emitsArray = Array.isArray(props.value) || Array.isArray(props.defaultValue) || isRange;
360
+ if (minStepsBetweenValues > 0 && isRange && max > min && (max - min) / step < minStepsBetweenValues * (values.length - 1)) {
361
+ devWarn(
362
+ `<Slider> \`minStepsBetweenValues\` (${minStepsBetweenValues}) needs more room than the scale has: ${values.length} thumbs cannot keep that gap across ${(max - min) / step} steps.`
363
+ );
364
+ }
365
+ const fromNumbers = React.useCallback(
366
+ (numbers) => {
367
+ const out = isOrdinal ? numbers.map((index) => stops[Math.min(stops.length - 1, Math.max(0, Math.round(index)))]?.value) : numbers.map((track) => toDomainValue(track));
368
+ return emitsArray ? out : out[0];
369
+ },
370
+ [isOrdinal, stops, toDomainValue, emitsArray]
371
+ );
372
+ const skipDisabled = React.useCallback(
373
+ (index, from, discrete) => {
374
+ if (!stops || !stops[index]?.disabled) return index;
375
+ if (!discrete) return from;
376
+ const forward = index >= from ? 1 : -1;
377
+ for (let distance = 1; distance < stops.length; distance++) {
378
+ const ahead = stops[index + forward * distance];
379
+ if (ahead && !ahead.disabled) return index + forward * distance;
380
+ const behind = stops[index - forward * distance];
381
+ if (behind && !behind.disabled) return index - forward * distance;
382
+ }
383
+ return from;
384
+ },
385
+ [stops]
386
+ );
387
+ const correct = React.useCallback(
388
+ (raw, discrete) => {
389
+ if (isOrdinal) return raw.map((index, at) => skipDisabled(index, values[at] ?? index, discrete));
390
+ if (scale) return raw.map((track) => anchoredToTrack(scale, anchoredSnap(scale, anchoredToDomain(scale, track))));
391
+ return [...raw];
392
+ },
393
+ [isOrdinal, scale, skipDisabled, values]
394
+ );
395
+ const onValueChange = props.onValueChange;
396
+ const onValueCommitted = props.onValueCommitted;
397
+ const apply = React.useCallback(
398
+ (next, details) => {
399
+ if (next.length === values.length && next.every((n, at) => n === values[at])) return;
400
+ if (!isControlled) setUncontrolled(next);
401
+ onValueChange?.(fromNumbers(next), details);
402
+ },
403
+ [isControlled, onValueChange, fromNumbers, values]
404
+ );
405
+ const readoutOf = React.useCallback(
406
+ (value) => {
407
+ if (isOrdinal) return stops[Math.min(stops.length - 1, Math.max(0, Math.round(value)))]?.label ?? "";
408
+ const domain = toDomainValue(value);
409
+ if (format) return format(domain);
410
+ return new Intl.NumberFormat().format(domain);
411
+ },
412
+ [isOrdinal, stops, toDomainValue, format]
413
+ );
414
+ const candidates = React.useMemo(() => isOrdinal ? stops.map((stop) => stop.label) : null, [isOrdinal, stops]);
415
+ const widthFloor = React.useMemo(() => isOrdinal ? 0 : longest([readoutOf(min), readoutOf(max)]), [isOrdinal, readoutOf, min, max]);
416
+ const slots = React.useMemo(() => {
417
+ if (isOrdinal) {
418
+ return stops.map((stop, index) => ({
419
+ key: `${String(stop.value)}-${index}`,
420
+ percent: toPercent(index, min, max),
421
+ label: stop.label,
422
+ disabled: stop.disabled ?? false
423
+ }));
424
+ }
425
+ if (scale) {
426
+ return scale.points.map((value, index) => ({
427
+ key: `${value}-${index}`,
428
+ percent: toPercent(index, 0, scale.bands),
429
+ label: scale.labels[index] ?? null,
430
+ disabled: false
431
+ }));
432
+ }
433
+ if (marks === void 0) return null;
434
+ const list = marks === "ends" ? [{ value: min }, { value: max }] : marks;
435
+ return list.filter((mark) => {
436
+ const inside = mark.value >= min && mark.value <= max;
437
+ if (!inside) devWarn(`<Slider> a mark at ${mark.value} falls outside \`min\`\u2026\`max\` (${min}\u2026${max}) and is not drawn.`);
438
+ return inside;
439
+ }).map((mark, index) => ({
440
+ key: `${mark.value}-${index}`,
441
+ percent: toPercent(mark.value, min, max),
442
+ // `marks="ends"` prints the bounds through the SAME formatter the readout uses, so a
443
+ // currency scale reads `$0 … $10,000` without a second format prop.
444
+ label: mark.label ?? (marks === "ends" ? readoutOf(mark.value) : null),
445
+ disabled: false
446
+ }));
447
+ }, [isOrdinal, stops, scale, marks, min, max, readoutOf]);
448
+ const numericValue = isRange ? values : values[0] ?? min;
449
+ return /* @__PURE__ */ jsx(
450
+ FieldFrame,
451
+ {
452
+ label,
453
+ labelId,
454
+ tooltip,
455
+ tooltipDescription,
456
+ hint,
457
+ error,
458
+ required,
459
+ hideRequiredIndicator,
460
+ isInvalid,
461
+ showError,
462
+ size,
463
+ disabled,
464
+ name,
465
+ fullWidth,
466
+ className,
467
+ children: /* @__PURE__ */ jsxs(
468
+ Slider$1.Root,
469
+ {
470
+ className: cn(ROOT[orientation], readoutClearance(orientation, valuePosition, slots !== null)),
471
+ value: numericValue,
472
+ min,
473
+ max,
474
+ step,
475
+ largeStep,
476
+ minStepsBetweenValues,
477
+ orientation,
478
+ disabled,
479
+ form,
480
+ role: isRange ? "group" : void 0,
481
+ "aria-labelledby": isRange ? ariaLabelledBy ?? (label ? labelId : void 0) : void 0,
482
+ onValueChange: (next, details) => {
483
+ const raw = Array.isArray(next) ? [...next] : [next];
484
+ apply(correct(raw, isDiscrete(details.reason)), { reason: details.reason, activeThumbIndex: details.activeThumbIndex });
485
+ },
486
+ onValueCommitted: (next, details) => {
487
+ const raw = Array.isArray(next) ? [...next] : [next];
488
+ const corrected = correct(raw, isDiscrete(details.reason));
489
+ onValueCommitted?.(fromNumbers(corrected), { reason: details.reason });
490
+ },
491
+ children: [
492
+ /* @__PURE__ */ jsxs(Slider$1.Control, { ref: controlRef, className: BAND[orientation], children: [
493
+ /* @__PURE__ */ jsx(Slider$1.Track, { className: cn(RAIL_BASE, RAIL[orientation][size]), children: /* @__PURE__ */ jsx(Slider$1.Indicator, { className: FILL }) }),
494
+ values.map((_, index) => /* @__PURE__ */ jsx(
495
+ Slider$1.Thumb,
496
+ {
497
+ index,
498
+ className: cn(THUMB_BASE, THUMB[size]),
499
+ onFocus: () => setActiveIndex(index),
500
+ onBlur: () => setActiveIndex((current) => current === index ? null : current),
501
+ onPointerDown: () => setActiveIndex(index),
502
+ getAriaLabel: isRange ? (at) => at === 0 ? t.minimum : t.maximum : null,
503
+ "aria-label": isRange ? void 0 : ariaLabel,
504
+ getAriaValueText: (_formatted, value) => readoutOf(value),
505
+ onKeyDown: scale === null ? void 0 : (event) => {
506
+ if (!ANCHORED_KEYS.has(event.key)) return;
507
+ event.preventDefault();
508
+ if (ANCHORED_COMPOSITE_KEYS.has(event.key)) event.stopPropagation();
509
+ restoreFocusVisible(event.currentTarget);
510
+ const first = scale.points[0] ?? 0;
511
+ const last = scale.points[scale.bands] ?? first;
512
+ const from = toDomainValue(values[index] ?? 0);
513
+ const rtl = direction === "rtl";
514
+ const key = event.key;
515
+ const far = event.shiftKey || key === "PageUp" || key === "PageDown" ? declaredLargeStep : null;
516
+ const horizontal = key === "ArrowRight" || key === "ArrowLeft";
517
+ const up = horizontal ? key === "ArrowRight" !== rtl : key === "ArrowUp" || key === "PageUp";
518
+ const target = key === "Home" ? first : key === "End" ? last : anchoredMove(scale, from, up ? 1 : -1, far);
519
+ const lower = index > 0 ? toDomainValue(values[index - 1] ?? 0) : first;
520
+ const upper = index < values.length - 1 ? toDomainValue(values[index + 1] ?? scale.bands) : last;
521
+ const next = [...values];
522
+ next[index] = anchoredToTrack(scale, Math.min(upper, Math.max(lower, target)));
523
+ if (next[index] === values[index]) return;
524
+ apply(next, { reason: "keyboard", activeThumbIndex: index });
525
+ onValueCommitted?.(fromNumbers(next), { reason: "keyboard" });
526
+ }
527
+ },
528
+ index
529
+ )),
530
+ valuePosition === "none" ? null : values.map((value, index) => /* @__PURE__ */ jsx(
531
+ SliderReadout,
532
+ {
533
+ text: readoutOf(value),
534
+ editSeed: toDomainValue(value),
535
+ percent: toPercent(value, min, max),
536
+ position: valuePosition,
537
+ orientation,
538
+ widthFloor,
539
+ candidates,
540
+ editable,
541
+ active: activeIndex === index,
542
+ editLabel: t.editValue,
543
+ onEditCommit: (raw) => {
544
+ const cleaned = raw.replaceAll(/[^\d.eE+-]/g, "");
545
+ const parsed = Number(cleaned);
546
+ if (cleaned === "" || !Number.isFinite(parsed)) return;
547
+ const floor = scale ? scale.points[0] ?? min : min;
548
+ const ceiling = scale ? scale.points[scale.bands] ?? max : max;
549
+ const lower = index > 0 ? toDomainValue(values[index - 1] ?? min) + minStepsBetweenValues * declaredStep : floor;
550
+ const upper = index < values.length - 1 ? toDomainValue(values[index + 1] ?? max) - minStepsBetweenValues * declaredStep : ceiling;
551
+ const snapped = scale ? anchoredSnap(scale, parsed) : snapToStep(parsed, min, declaredStep);
552
+ const next = [...values];
553
+ next[index] = toTrackValue(Math.min(upper, Math.max(lower, snapped)));
554
+ if (next[index] === values[index]) return;
555
+ apply(next, { reason: "input-change", activeThumbIndex: index });
556
+ onValueCommitted?.(fromNumbers(next), { reason: "input-change" });
557
+ }
558
+ },
559
+ index
560
+ ))
561
+ ] }),
562
+ slots === null ? null : (
563
+ /* The band reserves its height whether or not its marks carry text, so toggling `marks`
564
+ on a live control never jumps the form row around it. `both` is the one mode that
565
+ reserves MORE, because it is the one that genuinely stacks two occupants. */
566
+ /* @__PURE__ */ jsx(
567
+ "div",
568
+ {
569
+ "aria-hidden": "true",
570
+ className: cn(
571
+ MARK_BAND[orientation][bandMode === "both" ? "stacked" : "flat"],
572
+ // A notch is pulled back INTO the control's dead zone, and the band is a later
573
+ // sibling — so without this it would take a press meant for the track.
574
+ "pointer-events-none",
575
+ markBandClear(orientation, valuePosition)
576
+ ),
577
+ children: slots.map(
578
+ (mark) => (
579
+ /* No label to draw — either the slot never had one, or `ticks` suppressed it. Then
580
+ the tick IS the slot, and it takes the slot's own percentage. */
581
+ bandMode === "ticks" || mark.label === null || mark.label === void 0 ? /* @__PURE__ */ jsx(
582
+ "span",
583
+ {
584
+ className: cn(MARK_TICK[orientation], markAlign(mark.percent, orientation)),
585
+ style: orientation === "vertical" ? { bottom: `${mark.percent}%` } : { left: `${mark.percent}%` }
586
+ },
587
+ mark.key
588
+ ) : /* @__PURE__ */ jsxs(
589
+ "span",
590
+ {
591
+ className: cn(
592
+ MARK_TEXT,
593
+ markAlign(mark.percent, orientation),
594
+ bandMode === "both" && MARK_STACK[orientation],
595
+ mark.disabled ? "text-quaternary" : "text-tertiary"
596
+ ),
597
+ style: orientation === "vertical" ? { bottom: `${mark.percent}%` } : { left: `${mark.percent}%` },
598
+ children: [
599
+ bandMode === "both" ? /* @__PURE__ */ jsx("span", { className: MARK_TICK_INLINE[orientation] }) : null,
600
+ mark.label
601
+ ]
602
+ },
603
+ mark.key
604
+ )
605
+ )
606
+ )
607
+ }
608
+ )
609
+ )
610
+ ]
611
+ }
612
+ )
613
+ }
614
+ );
615
+ }
616
+
617
+ export { Slider };
618
+ //# sourceMappingURL=chunk-PRWPFBA5.js.map
619
+ //# sourceMappingURL=chunk-PRWPFBA5.js.map
@@ -1,6 +1,6 @@
1
1
  import { OptionRow } from './chunk-D7EE5GWU.js';
2
2
  import { cn } from './chunk-ZSNJ6UA3.js';
3
- import { warnNeedsName } from './chunk-QDYE5LVT.js';
3
+ import { warnNeedsName } from './chunk-SF3HCW4G.js';
4
4
  import { Switch as Switch$1 } from '@base-ui/react/switch';
5
5
  import * as React from 'react';
6
6
  import { jsx } from 'react/jsx-runtime';
@@ -51,8 +51,8 @@ function Switch(props) {
51
51
  ...rest,
52
52
  id: resolvedId,
53
53
  disabled,
54
- "aria-labelledby": hasLabel ? labelId : void 0,
55
- "aria-describedby": hasHint ? hintId : void 0,
54
+ "aria-labelledby": hasLabel ? labelId : rest["aria-labelledby"],
55
+ "aria-describedby": hasHint ? hintId : rest["aria-describedby"],
56
56
  onCheckedChange: onCheckedChange ? (checked, details) => onCheckedChange(checked, details.event) : void 0,
57
57
  className: track,
58
58
  children: /* @__PURE__ */ jsx(Switch$1.Thumb, { className: thumb })
@@ -63,5 +63,5 @@ function Switch(props) {
63
63
  }
64
64
 
65
65
  export { Switch };
66
- //# sourceMappingURL=chunk-QDKETK7D.js.map
67
- //# sourceMappingURL=chunk-QDKETK7D.js.map
66
+ //# sourceMappingURL=chunk-S55JKMG7.js.map
67
+ //# sourceMappingURL=chunk-S55JKMG7.js.map