@seeqdev/qomponents 0.0.155-react-19-v9 → 0.0.155-react-19-v10

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 (247) hide show
  1. package/dist/Accordion/Accordion.js +9 -0
  2. package/dist/Accordion/Accordion.js.map +1 -0
  3. package/dist/Accordion/Accordion.stories.js +115 -0
  4. package/dist/Accordion/Accordion.stories.js.map +1 -0
  5. package/dist/Accordion/Accordion.test.js +55 -0
  6. package/dist/Accordion/Accordion.test.js.map +1 -0
  7. package/dist/Accordion/Accordion.types.js +2 -0
  8. package/dist/Accordion/Accordion.types.js.map +1 -0
  9. package/dist/Accordion/index.js +2 -0
  10. package/dist/Accordion/index.js.map +1 -0
  11. package/dist/Alert/Alert.js +34 -0
  12. package/dist/Alert/Alert.js.map +1 -0
  13. package/dist/Alert/Alert.stories.js +52 -0
  14. package/dist/Alert/Alert.stories.js.map +1 -0
  15. package/dist/Alert/Alert.test.js +51 -0
  16. package/dist/Alert/Alert.test.js.map +1 -0
  17. package/dist/Alert/Alert.types.js +2 -0
  18. package/dist/Alert/Alert.types.js.map +1 -0
  19. package/dist/Alert/index.js +2 -0
  20. package/dist/Alert/index.js.map +1 -0
  21. package/dist/Button/Button.js +92 -0
  22. package/dist/Button/Button.js.map +1 -0
  23. package/dist/Button/Button.stories.js +100 -0
  24. package/dist/Button/Button.stories.js.map +1 -0
  25. package/dist/Button/Button.test.js +49 -0
  26. package/dist/Button/Button.test.js.map +1 -0
  27. package/dist/Button/Button.types.js +5 -0
  28. package/dist/Button/Button.types.js.map +1 -0
  29. package/dist/Button/index.js +2 -0
  30. package/dist/Button/index.js.map +1 -0
  31. package/dist/ButtonGroup/ButtonGroup.js +35 -0
  32. package/dist/ButtonGroup/ButtonGroup.js.map +1 -0
  33. package/dist/ButtonGroup/ButtonGroup.stories.js +385 -0
  34. package/dist/ButtonGroup/ButtonGroup.stories.js.map +1 -0
  35. package/dist/ButtonGroup/ButtonGroup.test.js +67 -0
  36. package/dist/ButtonGroup/ButtonGroup.test.js.map +1 -0
  37. package/dist/ButtonGroup/ButtonGroup.types.js +2 -0
  38. package/dist/ButtonGroup/ButtonGroup.types.js.map +1 -0
  39. package/dist/ButtonGroup/index.js +2 -0
  40. package/dist/ButtonGroup/index.js.map +1 -0
  41. package/dist/ButtonWithDropdown/ButtonWithDropdown.js +60 -0
  42. package/dist/ButtonWithDropdown/ButtonWithDropdown.js.map +1 -0
  43. package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js +143 -0
  44. package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js.map +1 -0
  45. package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js +93 -0
  46. package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js.map +1 -0
  47. package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js +2 -0
  48. package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js.map +1 -0
  49. package/dist/ButtonWithDropdown/index.js +2 -0
  50. package/dist/ButtonWithDropdown/index.js.map +1 -0
  51. package/dist/ButtonWithPopover/ButtonWithPopover.js +62 -0
  52. package/dist/ButtonWithPopover/ButtonWithPopover.js.map +1 -0
  53. package/dist/ButtonWithPopover/ButtonWithPopover.stories.js +75 -0
  54. package/dist/ButtonWithPopover/ButtonWithPopover.stories.js.map +1 -0
  55. package/dist/ButtonWithPopover/ButtonWithPopover.test.js +82 -0
  56. package/dist/ButtonWithPopover/ButtonWithPopover.test.js.map +1 -0
  57. package/dist/ButtonWithPopover/ButtonWithPopover.types.js +2 -0
  58. package/dist/ButtonWithPopover/ButtonWithPopover.types.js.map +1 -0
  59. package/dist/ButtonWithPopover/index.js +2 -0
  60. package/dist/ButtonWithPopover/index.js.map +1 -0
  61. package/dist/Carousel/Carousel.js +70 -0
  62. package/dist/Carousel/Carousel.js.map +1 -0
  63. package/dist/Carousel/Carousel.stories.js +115 -0
  64. package/dist/Carousel/Carousel.stories.js.map +1 -0
  65. package/dist/Carousel/Carousel.test.js +48 -0
  66. package/dist/Carousel/Carousel.test.js.map +1 -0
  67. package/dist/Carousel/Carousel.types.js +2 -0
  68. package/dist/Carousel/Carousel.types.js.map +1 -0
  69. package/dist/Carousel/index.js +2 -0
  70. package/dist/Carousel/index.js.map +1 -0
  71. package/dist/Checkbox/Checkbox.js +26 -0
  72. package/dist/Checkbox/Checkbox.js.map +1 -0
  73. package/dist/Checkbox/Checkbox.stories.js +34 -0
  74. package/dist/Checkbox/Checkbox.stories.js.map +1 -0
  75. package/dist/Checkbox/Checkbox.test.js +94 -0
  76. package/dist/Checkbox/Checkbox.test.js.map +1 -0
  77. package/dist/Checkbox/Checkbox.types.js +2 -0
  78. package/dist/Checkbox/Checkbox.types.js.map +1 -0
  79. package/dist/Checkbox/index.js +2 -0
  80. package/dist/Checkbox/index.js.map +1 -0
  81. package/dist/Collapse/Collapse.js +15 -0
  82. package/dist/Collapse/Collapse.js.map +1 -0
  83. package/dist/Collapse/Collapse.stories.js +37 -0
  84. package/dist/Collapse/Collapse.stories.js.map +1 -0
  85. package/dist/Collapse/Collapse.test.js +19 -0
  86. package/dist/Collapse/Collapse.test.js.map +1 -0
  87. package/dist/Collapse/Collapse.types.js +2 -0
  88. package/dist/Collapse/Collapse.types.js.map +1 -0
  89. package/dist/Collapse/index.js +2 -0
  90. package/dist/Collapse/index.js.map +1 -0
  91. package/dist/Icon/Icon.js +55 -0
  92. package/dist/Icon/Icon.js.map +1 -0
  93. package/dist/Icon/Icon.stories.js +49 -0
  94. package/dist/Icon/Icon.stories.js.map +1 -0
  95. package/dist/Icon/Icon.test.js +55 -0
  96. package/dist/Icon/Icon.test.js.map +1 -0
  97. package/dist/Icon/Icon.types.js +16 -0
  98. package/dist/Icon/Icon.types.js.map +1 -0
  99. package/dist/Icon/index.js +2 -0
  100. package/dist/Icon/index.js.map +1 -0
  101. package/dist/InputGroup/InputGroup.js +35 -0
  102. package/dist/InputGroup/InputGroup.js.map +1 -0
  103. package/dist/InputGroup/InputGroup.stories.js +176 -0
  104. package/dist/InputGroup/InputGroup.stories.js.map +1 -0
  105. package/dist/InputGroup/InputGroup.test.js +43 -0
  106. package/dist/InputGroup/InputGroup.test.js.map +1 -0
  107. package/dist/InputGroup/InputGroup.types.js +2 -0
  108. package/dist/InputGroup/InputGroup.types.js.map +1 -0
  109. package/dist/InputGroup/index.js +2 -0
  110. package/dist/InputGroup/index.js.map +1 -0
  111. package/dist/Modal/Modal.js +102 -0
  112. package/dist/Modal/Modal.js.map +1 -0
  113. package/dist/Modal/Modal.stories.js +127 -0
  114. package/dist/Modal/Modal.stories.js.map +1 -0
  115. package/dist/Modal/Modal.test.js +108 -0
  116. package/dist/Modal/Modal.test.js.map +1 -0
  117. package/dist/Modal/Modal.types.js +2 -0
  118. package/dist/Modal/Modal.types.js.map +1 -0
  119. package/dist/Modal/index.js +2 -0
  120. package/dist/Modal/index.js.map +1 -0
  121. package/dist/ProgressBar/ProgressBar.js +70 -0
  122. package/dist/ProgressBar/ProgressBar.js.map +1 -0
  123. package/dist/ProgressBar/ProgressBar.stories.js +83 -0
  124. package/dist/ProgressBar/ProgressBar.stories.js.map +1 -0
  125. package/dist/ProgressBar/ProgressBar.test.js +44 -0
  126. package/dist/ProgressBar/ProgressBar.test.js.map +1 -0
  127. package/dist/ProgressBar/ProgressBar.types.js +2 -0
  128. package/dist/ProgressBar/ProgressBar.types.js.map +1 -0
  129. package/dist/ProgressBar/index.js +2 -0
  130. package/dist/ProgressBar/index.js.map +1 -0
  131. package/dist/SeeqActionDropdown/SeeqActionDropdown.js +48 -0
  132. package/dist/SeeqActionDropdown/SeeqActionDropdown.js.map +1 -0
  133. package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js +87 -0
  134. package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js.map +1 -0
  135. package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js +73 -0
  136. package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js.map +1 -0
  137. package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js +2 -0
  138. package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js.map +1 -0
  139. package/dist/SeeqActionDropdown/index.js +2 -0
  140. package/dist/SeeqActionDropdown/index.js.map +1 -0
  141. package/dist/SeeqActionDropdown/variants.js +38 -0
  142. package/dist/SeeqActionDropdown/variants.js.map +1 -0
  143. package/dist/Select/Select.js +177 -0
  144. package/dist/Select/Select.js.map +1 -0
  145. package/dist/Select/Select.stories.js +82 -0
  146. package/dist/Select/Select.stories.js.map +1 -0
  147. package/dist/Select/Select.test.js +182 -0
  148. package/dist/Select/Select.test.js.map +1 -0
  149. package/dist/Select/Select.types.js +2 -0
  150. package/dist/Select/Select.types.js.map +1 -0
  151. package/dist/Select/index.js +3 -0
  152. package/dist/Select/index.js.map +1 -0
  153. package/dist/Slider/Slider.js +13 -0
  154. package/dist/Slider/Slider.js.map +1 -0
  155. package/dist/Slider/Slider.stories.js +58 -0
  156. package/dist/Slider/Slider.stories.js.map +1 -0
  157. package/dist/Slider/Slider.test.js +33 -0
  158. package/dist/Slider/Slider.test.js.map +1 -0
  159. package/dist/Slider/Slider.types.js +2 -0
  160. package/dist/Slider/Slider.types.js.map +1 -0
  161. package/dist/Slider/index.js +2 -0
  162. package/dist/Slider/index.js.map +1 -0
  163. package/dist/SvgIcon/SvgIcon.js +30 -0
  164. package/dist/SvgIcon/SvgIcon.js.map +1 -0
  165. package/dist/SvgIcon/SvgIcon.stories.js +42 -0
  166. package/dist/SvgIcon/SvgIcon.stories.js.map +1 -0
  167. package/dist/SvgIcon/SvgIcon.test.js +41 -0
  168. package/dist/SvgIcon/SvgIcon.test.js.map +1 -0
  169. package/dist/SvgIcon/SvgIcon.types.js +6 -0
  170. package/dist/SvgIcon/SvgIcon.types.js.map +1 -0
  171. package/dist/SvgIcon/index.js +2 -0
  172. package/dist/SvgIcon/index.js.map +1 -0
  173. package/dist/Tabs/Tabs.js +22 -0
  174. package/dist/Tabs/Tabs.js.map +1 -0
  175. package/dist/Tabs/Tabs.stories.js +91 -0
  176. package/dist/Tabs/Tabs.stories.js.map +1 -0
  177. package/dist/Tabs/Tabs.test.js +91 -0
  178. package/dist/Tabs/Tabs.test.js.map +1 -0
  179. package/dist/Tabs/Tabs.types.js +2 -0
  180. package/dist/Tabs/Tabs.types.js.map +1 -0
  181. package/dist/Tabs/index.js +2 -0
  182. package/dist/Tabs/index.js.map +1 -0
  183. package/dist/TextArea/TextArea.js +25 -0
  184. package/dist/TextArea/TextArea.js.map +1 -0
  185. package/dist/TextArea/TextArea.stories.js +46 -0
  186. package/dist/TextArea/TextArea.stories.js.map +1 -0
  187. package/dist/TextArea/TextArea.test.js +68 -0
  188. package/dist/TextArea/TextArea.test.js.map +1 -0
  189. package/dist/TextArea/TextArea.types.js +2 -0
  190. package/dist/TextArea/TextArea.types.js.map +1 -0
  191. package/dist/TextArea/index.js +2 -0
  192. package/dist/TextArea/index.js.map +1 -0
  193. package/dist/TextField/TextField.js +86 -0
  194. package/dist/TextField/TextField.js.map +1 -0
  195. package/dist/TextField/TextField.stories.js +70 -0
  196. package/dist/TextField/TextField.stories.js.map +1 -0
  197. package/dist/TextField/TextField.test.js +41 -0
  198. package/dist/TextField/TextField.test.js.map +1 -0
  199. package/dist/TextField/TextField.types.js +2 -0
  200. package/dist/TextField/TextField.types.js.map +1 -0
  201. package/dist/TextField/index.js +2 -0
  202. package/dist/TextField/index.js.map +1 -0
  203. package/dist/ToolbarButton/ToolbarButton.js +69 -0
  204. package/dist/ToolbarButton/ToolbarButton.js.map +1 -0
  205. package/dist/ToolbarButton/ToolbarButton.stories.js +97 -0
  206. package/dist/ToolbarButton/ToolbarButton.stories.js.map +1 -0
  207. package/dist/ToolbarButton/ToolbarButton.test.js +93 -0
  208. package/dist/ToolbarButton/ToolbarButton.test.js.map +1 -0
  209. package/dist/ToolbarButton/ToolbarButton.types.js +2 -0
  210. package/dist/ToolbarButton/ToolbarButton.types.js.map +1 -0
  211. package/dist/ToolbarButton/index.js +2 -0
  212. package/dist/ToolbarButton/index.js.map +1 -0
  213. package/dist/Tooltip/QTip.stories.js +45 -0
  214. package/dist/Tooltip/QTip.stories.js.map +1 -0
  215. package/dist/Tooltip/QTip.types.js +2 -0
  216. package/dist/Tooltip/QTip.types.js.map +1 -0
  217. package/dist/Tooltip/QTipPerformance.stories.js +30 -0
  218. package/dist/Tooltip/QTipPerformance.stories.js.map +1 -0
  219. package/dist/Tooltip/Qtip.js +170 -0
  220. package/dist/Tooltip/Qtip.js.map +1 -0
  221. package/dist/Tooltip/Tooltip.js +36 -0
  222. package/dist/Tooltip/Tooltip.js.map +1 -0
  223. package/dist/Tooltip/Tooltip.stories.js +32 -0
  224. package/dist/Tooltip/Tooltip.stories.js.map +1 -0
  225. package/dist/Tooltip/Tooltip.types.js +3 -0
  226. package/dist/Tooltip/Tooltip.types.js.map +1 -0
  227. package/dist/Tooltip/TooltipPerformance.stories.js +30 -0
  228. package/dist/Tooltip/TooltipPerformance.stories.js.map +1 -0
  229. package/dist/Tooltip/index.js +3 -0
  230. package/dist/Tooltip/index.js.map +1 -0
  231. package/dist/Tooltip/qTip.utilities.js +11 -0
  232. package/dist/Tooltip/qTip.utilities.js.map +1 -0
  233. package/dist/index.esm.js +135 -198
  234. package/dist/index.esm.js.map +1 -1
  235. package/dist/index.js +123 -186
  236. package/dist/index.js.map +1 -1
  237. package/dist/types.js +2 -0
  238. package/dist/types.js.map +1 -0
  239. package/dist/utils/browserId.js +29 -0
  240. package/dist/utils/browserId.js.map +1 -0
  241. package/dist/utils/svg.js +20 -0
  242. package/dist/utils/svg.js.map +1 -0
  243. package/dist/utils/validateStyleDimension.js +14 -0
  244. package/dist/utils/validateStyleDimension.js.map +1 -0
  245. package/dist/utils/validateStyleDimension.test.js +20 -0
  246. package/dist/utils/validateStyleDimension.test.js.map +1 -0
  247. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -211,7 +211,7 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
211
211
  };
212
212
  }
213
213
 
214
- // packages/react/compose-refs/src/compose-refs.tsx
214
+ // packages/react/compose-refs/src/composeRefs.tsx
215
215
  function setRef(ref, value) {
216
216
  if (typeof ref === "function") {
217
217
  return ref(value);
@@ -247,7 +247,7 @@ function useComposedRefs(...refs) {
247
247
  return React__namespace.useCallback(composeRefs(...refs), refs);
248
248
  }
249
249
 
250
- // packages/react/context/src/create-context.tsx
250
+ // packages/react/context/src/createContext.tsx
251
251
  function createContext2(rootComponentName, defaultContext) {
252
252
  const Context = React__namespace.createContext(defaultContext);
253
253
  const Provider = (props) => {
@@ -322,51 +322,44 @@ function composeContextScopes(...scopes) {
322
322
  return createScope;
323
323
  }
324
324
 
325
- // src/slot.tsx
326
- // @__NO_SIDE_EFFECTS__
327
- function createSlot(ownerName) {
328
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
329
- const Slot2 = React__namespace.forwardRef((props, forwardedRef) => {
330
- const { children, ...slotProps } = props;
331
- const childrenArray = React__namespace.Children.toArray(children);
332
- const slottable = childrenArray.find(isSlottable);
333
- if (slottable) {
334
- const newElement = slottable.props.children;
335
- const newChildren = childrenArray.map((child) => {
336
- if (child === slottable) {
337
- if (React__namespace.Children.count(newElement) > 1) return React__namespace.Children.only(null);
338
- return React__namespace.isValidElement(newElement) ? newElement.props.children : null;
339
- } else {
340
- return child;
341
- }
342
- });
343
- return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React__namespace.isValidElement(newElement) ? React__namespace.cloneElement(newElement, void 0, newChildren) : null });
344
- }
345
- return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
346
- });
347
- Slot2.displayName = `${ownerName}.Slot`;
348
- return Slot2;
349
- }
350
- // @__NO_SIDE_EFFECTS__
351
- function createSlotClone(ownerName) {
352
- const SlotClone = React__namespace.forwardRef((props, forwardedRef) => {
353
- const { children, ...slotProps } = props;
354
- if (React__namespace.isValidElement(children)) {
355
- const childrenRef = getElementRef$1(children);
356
- const props2 = mergeProps(slotProps, children.props);
357
- if (children.type !== React__namespace.Fragment) {
358
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
325
+ // packages/react/slot/src/slot.tsx
326
+ var Slot = React__namespace.forwardRef((props, forwardedRef) => {
327
+ const { children, ...slotProps } = props;
328
+ const childrenArray = React__namespace.Children.toArray(children);
329
+ const slottable = childrenArray.find(isSlottable);
330
+ if (slottable) {
331
+ const newElement = slottable.props.children;
332
+ const newChildren = childrenArray.map((child) => {
333
+ if (child === slottable) {
334
+ if (React__namespace.Children.count(newElement) > 1) return React__namespace.Children.only(null);
335
+ return React__namespace.isValidElement(newElement) ? newElement.props.children : null;
336
+ } else {
337
+ return child;
359
338
  }
360
- return React__namespace.cloneElement(children, props2);
361
- }
362
- return React__namespace.Children.count(children) > 1 ? React__namespace.Children.only(null) : null;
363
- });
364
- SlotClone.displayName = `${ownerName}.SlotClone`;
365
- return SlotClone;
366
- }
367
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
339
+ });
340
+ return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React__namespace.isValidElement(newElement) ? React__namespace.cloneElement(newElement, void 0, newChildren) : null });
341
+ }
342
+ return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
343
+ });
344
+ Slot.displayName = "Slot";
345
+ var SlotClone = React__namespace.forwardRef((props, forwardedRef) => {
346
+ const { children, ...slotProps } = props;
347
+ if (React__namespace.isValidElement(children)) {
348
+ const childrenRef = getElementRef$1(children);
349
+ const props2 = mergeProps(slotProps, children.props);
350
+ if (children.type !== React__namespace.Fragment) {
351
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
352
+ }
353
+ return React__namespace.cloneElement(children, props2);
354
+ }
355
+ return React__namespace.Children.count(children) > 1 ? React__namespace.Children.only(null) : null;
356
+ });
357
+ SlotClone.displayName = "SlotClone";
358
+ var Slottable = ({ children }) => {
359
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
360
+ };
368
361
  function isSlottable(child) {
369
- return React__namespace.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
362
+ return React__namespace.isValidElement(child) && child.type === Slottable;
370
363
  }
371
364
  function mergeProps(slotProps, childProps) {
372
365
  const overrideProps = { ...childProps };
@@ -377,9 +370,8 @@ function mergeProps(slotProps, childProps) {
377
370
  if (isHandler) {
378
371
  if (slotPropValue && childPropValue) {
379
372
  overrideProps[propName] = (...args) => {
380
- const result = childPropValue(...args);
373
+ childPropValue(...args);
381
374
  slotPropValue(...args);
382
- return result;
383
375
  };
384
376
  } else if (slotPropValue) {
385
377
  overrideProps[propName] = slotPropValue;
@@ -406,7 +398,7 @@ function getElementRef$1(element) {
406
398
  return element.props.ref || element.ref;
407
399
  }
408
400
 
409
- // src/primitive.tsx
401
+ // packages/react/primitive/src/primitive.tsx
410
402
  var NODES = [
411
403
  "a",
412
404
  "button",
@@ -421,13 +413,11 @@ var NODES = [
421
413
  "nav",
422
414
  "ol",
423
415
  "p",
424
- "select",
425
416
  "span",
426
417
  "svg",
427
418
  "ul"
428
419
  ];
429
420
  var Primitive = NODES.reduce((primitive, node) => {
430
- const Slot = createSlot(`Primitive.${node}`);
431
421
  const Node = React__namespace.forwardRef((props, forwardedRef) => {
432
422
  const { asChild, ...primitiveProps } = props;
433
423
  const Comp = asChild ? Slot : node;
@@ -443,7 +433,7 @@ function dispatchDiscreteCustomEvent(target, event) {
443
433
  if (target) ReactDOM__namespace.flushSync(() => target.dispatchEvent(event));
444
434
  }
445
435
 
446
- // packages/react/use-callback-ref/src/use-callback-ref.tsx
436
+ // packages/react/use-callback-ref/src/useCallbackRef.tsx
447
437
  function useCallbackRef$1(callback) {
448
438
  const callbackRef = React__namespace.useRef(callback);
449
439
  React__namespace.useEffect(() => {
@@ -452,7 +442,7 @@ function useCallbackRef$1(callback) {
452
442
  return React__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
453
443
  }
454
444
 
455
- // packages/react/use-escape-keydown/src/use-escape-keydown.tsx
445
+ // packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
456
446
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
457
447
  const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
458
448
  React__namespace.useEffect(() => {
@@ -894,12 +884,12 @@ function removeLinks(items) {
894
884
  return items.filter((item) => item.tagName !== "A");
895
885
  }
896
886
 
897
- // packages/react/use-layout-effect/src/use-layout-effect.tsx
898
- var useLayoutEffect2 = globalThis?.document ? React__namespace.useLayoutEffect : () => {
887
+ // packages/react/use-layout-effect/src/useLayoutEffect.tsx
888
+ var useLayoutEffect2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
899
889
  };
900
890
 
901
891
  // packages/react/id/src/id.tsx
902
- var useReactId = React__namespace[" useId ".trim().toString()] || (() => void 0);
892
+ var useReactId = React__namespace["useId".toString()] || (() => void 0);
903
893
  var count = 0;
904
894
  function useId(deterministicId) {
905
895
  const [id, setId] = React__namespace.useState(useReactId());
@@ -2887,7 +2877,7 @@ const arrow = (options, deps) => ({
2887
2877
  options: [options, deps]
2888
2878
  });
2889
2879
 
2890
- // src/arrow.tsx
2880
+ // packages/react/arrow/src/arrow.tsx
2891
2881
  var NAME = "Arrow";
2892
2882
  var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
2893
2883
  const { children, width = 10, height = 5, ...arrowProps } = props;
@@ -2907,7 +2897,7 @@ var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
2907
2897
  Arrow$1.displayName = NAME;
2908
2898
  var Root$5 = Arrow$1;
2909
2899
 
2910
- // packages/react/use-size/src/use-size.tsx
2900
+ // packages/react/use-size/src/useSize.tsx
2911
2901
  function useSize(element) {
2912
2902
  const [size, setSize] = React__namespace.useState(void 0);
2913
2903
  useLayoutEffect2(() => {
@@ -3225,7 +3215,7 @@ function useStateMachine(initialState, machine) {
3225
3215
  }, initialState);
3226
3216
  }
3227
3217
 
3228
- // src/presence.tsx
3218
+ // packages/react/presence/src/Presence.tsx
3229
3219
  var Presence = (props) => {
3230
3220
  const { present, children } = props;
3231
3221
  const presence = usePresence$1(present);
@@ -3237,7 +3227,7 @@ var Presence = (props) => {
3237
3227
  Presence.displayName = "Presence";
3238
3228
  function usePresence$1(present) {
3239
3229
  const [node, setNode] = React__namespace.useState();
3240
- const stylesRef = React__namespace.useRef(null);
3230
+ const stylesRef = React__namespace.useRef({});
3241
3231
  const prevPresentRef = React__namespace.useRef(present);
3242
3232
  const prevAnimationNameRef = React__namespace.useRef("none");
3243
3233
  const initialState = present ? "mounted" : "unmounted";
@@ -3321,7 +3311,7 @@ function usePresence$1(present) {
3321
3311
  return {
3322
3312
  isPresent: ["mounted", "unmountSuspended"].includes(state),
3323
3313
  ref: React__namespace.useCallback((node2) => {
3324
- stylesRef.current = node2 ? getComputedStyle(node2) : null;
3314
+ if (node2) stylesRef.current = getComputedStyle(node2);
3325
3315
  setNode(node2);
3326
3316
  }, [])
3327
3317
  };
@@ -3343,47 +3333,28 @@ function getElementRef(element) {
3343
3333
  return element.props.ref || element.ref;
3344
3334
  }
3345
3335
 
3346
- // src/use-controllable-state.tsx
3347
- var useInsertionEffect$1 = React__namespace[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
3336
+ // packages/react/use-controllable-state/src/useControllableState.tsx
3348
3337
  function useControllableState({
3349
3338
  prop,
3350
3339
  defaultProp,
3351
3340
  onChange = () => {
3352
- },
3353
- caller
3341
+ }
3354
3342
  }) {
3355
- const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
3356
- defaultProp,
3357
- onChange
3358
- });
3343
+ const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
3359
3344
  const isControlled = prop !== void 0;
3360
3345
  const value = isControlled ? prop : uncontrolledProp;
3361
- {
3362
- const isControlledRef = React__namespace.useRef(prop !== void 0);
3363
- React__namespace.useEffect(() => {
3364
- const wasControlled = isControlledRef.current;
3365
- if (wasControlled !== isControlled) {
3366
- const from = wasControlled ? "controlled" : "uncontrolled";
3367
- const to = isControlled ? "controlled" : "uncontrolled";
3368
- console.warn(
3369
- `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
3370
- );
3371
- }
3372
- isControlledRef.current = isControlled;
3373
- }, [isControlled, caller]);
3374
- }
3346
+ const handleChange = useCallbackRef$1(onChange);
3375
3347
  const setValue = React__namespace.useCallback(
3376
3348
  (nextValue) => {
3377
3349
  if (isControlled) {
3378
- const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
3379
- if (value2 !== prop) {
3380
- onChangeRef.current?.(value2);
3381
- }
3350
+ const setter = nextValue;
3351
+ const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
3352
+ if (value2 !== prop) handleChange(value2);
3382
3353
  } else {
3383
3354
  setUncontrolledProp(nextValue);
3384
3355
  }
3385
3356
  },
3386
- [isControlled, prop, setUncontrolledProp, onChangeRef]
3357
+ [isControlled, prop, setUncontrolledProp, handleChange]
3387
3358
  );
3388
3359
  return [value, setValue];
3389
3360
  }
@@ -3391,22 +3362,17 @@ function useUncontrolledState({
3391
3362
  defaultProp,
3392
3363
  onChange
3393
3364
  }) {
3394
- const [value, setValue] = React__namespace.useState(defaultProp);
3365
+ const uncontrolledState = React__namespace.useState(defaultProp);
3366
+ const [value] = uncontrolledState;
3395
3367
  const prevValueRef = React__namespace.useRef(value);
3396
- const onChangeRef = React__namespace.useRef(onChange);
3397
- useInsertionEffect$1(() => {
3398
- onChangeRef.current = onChange;
3399
- }, [onChange]);
3368
+ const handleChange = useCallbackRef$1(onChange);
3400
3369
  React__namespace.useEffect(() => {
3401
3370
  if (prevValueRef.current !== value) {
3402
- onChangeRef.current?.(value);
3371
+ handleChange(value);
3403
3372
  prevValueRef.current = value;
3404
3373
  }
3405
- }, [value, prevValueRef]);
3406
- return [value, setValue, onChangeRef];
3407
- }
3408
- function isFunction(value) {
3409
- return typeof value === "function";
3374
+ }, [value, prevValueRef, handleChange]);
3375
+ return uncontrolledState;
3410
3376
  }
3411
3377
 
3412
3378
  var getDefaultParent = function (originalTarget) {
@@ -4310,11 +4276,10 @@ var Popover = (props) => {
4310
4276
  const popperScope = usePopperScope$1(__scopePopover);
4311
4277
  const triggerRef = React__namespace.useRef(null);
4312
4278
  const [hasCustomAnchor, setHasCustomAnchor] = React__namespace.useState(false);
4313
- const [open, setOpen] = useControllableState({
4279
+ const [open = false, setOpen] = useControllableState({
4314
4280
  prop: openProp,
4315
- defaultProp: defaultOpen ?? false,
4316
- onChange: onOpenChange,
4317
- caller: POPOVER_NAME
4281
+ defaultProp: defaultOpen,
4282
+ onChange: onOpenChange
4318
4283
  });
4319
4284
  return /* @__PURE__ */ jsxRuntime.jsx(Root2$4, { ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
4320
4285
  PopoverProvider,
@@ -4393,7 +4358,6 @@ var PopoverContent$1 = React__namespace.forwardRef(
4393
4358
  }
4394
4359
  );
4395
4360
  PopoverContent$1.displayName = CONTENT_NAME$6;
4396
- var Slot$2 = createSlot("PopoverContent.RemoveScroll");
4397
4361
  var PopoverContentModal = React__namespace.forwardRef(
4398
4362
  (props, forwardedRef) => {
4399
4363
  const context = usePopoverContext(CONTENT_NAME$6, props.__scopePopover);
@@ -4404,7 +4368,7 @@ var PopoverContentModal = React__namespace.forwardRef(
4404
4368
  const content = contentRef.current;
4405
4369
  if (content) return hideOthers(content);
4406
4370
  }, []);
4407
- return /* @__PURE__ */ jsxRuntime.jsx(RemoveScroll, { as: Slot$2, allowPinchZoom: true, children: /* @__PURE__ */ jsxRuntime.jsx(
4371
+ return /* @__PURE__ */ jsxRuntime.jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsxRuntime.jsx(
4408
4372
  PopoverContentImpl,
4409
4373
  {
4410
4374
  ...props,
@@ -14009,11 +13973,10 @@ var Dialog$1 = (props) => {
14009
13973
  } = props;
14010
13974
  const triggerRef = React__namespace.useRef(null);
14011
13975
  const contentRef = React__namespace.useRef(null);
14012
- const [open, setOpen] = useControllableState({
13976
+ const [open = false, setOpen] = useControllableState({
14013
13977
  prop: openProp,
14014
- defaultProp: defaultOpen ?? false,
14015
- onChange: onOpenChange,
14016
- caller: DIALOG_NAME
13978
+ defaultProp: defaultOpen,
13979
+ onChange: onOpenChange
14017
13980
  });
14018
13981
  return /* @__PURE__ */ jsxRuntime.jsx(
14019
13982
  DialogProvider,
@@ -14075,7 +14038,6 @@ var DialogOverlay = React__namespace.forwardRef(
14075
14038
  }
14076
14039
  );
14077
14040
  DialogOverlay.displayName = OVERLAY_NAME;
14078
- var Slot$1 = createSlot("DialogOverlay.RemoveScroll");
14079
14041
  var DialogOverlayImpl = React__namespace.forwardRef(
14080
14042
  (props, forwardedRef) => {
14081
14043
  const { __scopeDialog, ...overlayProps } = props;
@@ -14083,7 +14045,7 @@ var DialogOverlayImpl = React__namespace.forwardRef(
14083
14045
  return (
14084
14046
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
14085
14047
  // ie. when `Overlay` and `Content` are siblings
14086
- /* @__PURE__ */ jsxRuntime.jsx(RemoveScroll, { as: Slot$1, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsxRuntime.jsx(
14048
+ /* @__PURE__ */ jsxRuntime.jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsxRuntime.jsx(
14087
14049
  Primitive.div,
14088
14050
  {
14089
14051
  "data-state": getState$2(context.open),
@@ -14470,19 +14432,17 @@ function createCollection(name) {
14470
14432
  };
14471
14433
  CollectionProvider.displayName = PROVIDER_NAME;
14472
14434
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
14473
- const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
14474
14435
  const CollectionSlot = React.forwardRef(
14475
14436
  (props, forwardedRef) => {
14476
14437
  const { scope, children } = props;
14477
14438
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
14478
14439
  const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
14479
- return /* @__PURE__ */ jsxRuntime.jsx(CollectionSlotImpl, { ref: composedRefs, children });
14440
+ return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ref: composedRefs, children });
14480
14441
  }
14481
14442
  );
14482
14443
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
14483
14444
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
14484
14445
  const ITEM_DATA_ATTR = "data-radix-collection-item";
14485
- const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
14486
14446
  const CollectionItemSlot = React.forwardRef(
14487
14447
  (props, forwardedRef) => {
14488
14448
  const { scope, children, ...itemData } = props;
@@ -14493,7 +14453,7 @@ function createCollection(name) {
14493
14453
  context.itemMap.set(ref, { ref, ...itemData });
14494
14454
  return () => void context.itemMap.delete(ref);
14495
14455
  });
14496
- return /* @__PURE__ */ jsxRuntime.jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
14456
+ return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
14497
14457
  }
14498
14458
  );
14499
14459
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
@@ -14518,7 +14478,7 @@ function createCollection(name) {
14518
14478
  ];
14519
14479
  }
14520
14480
 
14521
- // packages/react/direction/src/direction.tsx
14481
+ // packages/react/direction/src/Direction.tsx
14522
14482
  var DirectionContext = React__namespace.createContext(void 0);
14523
14483
  function useDirection(localDir) {
14524
14484
  const globalDir = React__namespace.useContext(DirectionContext);
@@ -14556,11 +14516,10 @@ var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) =>
14556
14516
  const ref = React__namespace.useRef(null);
14557
14517
  const composedRefs = useComposedRefs(forwardedRef, ref);
14558
14518
  const direction = useDirection(dir);
14559
- const [currentTabStopId, setCurrentTabStopId] = useControllableState({
14519
+ const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
14560
14520
  prop: currentTabStopIdProp,
14561
- defaultProp: defaultCurrentTabStopId ?? null,
14562
- onChange: onCurrentTabStopIdChange,
14563
- caller: GROUP_NAME$2
14521
+ defaultProp: defaultCurrentTabStopId,
14522
+ onChange: onCurrentTabStopIdChange
14564
14523
  });
14565
14524
  const [isTabbingBackOut, setIsTabbingBackOut] = React__namespace.useState(false);
14566
14525
  const handleEntryFocus = useCallbackRef$1(onEntryFocus);
@@ -14638,7 +14597,6 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
14638
14597
  focusable = true,
14639
14598
  active = false,
14640
14599
  tabStopId,
14641
- children,
14642
14600
  ...itemProps
14643
14601
  } = props;
14644
14602
  const autoId = useId();
@@ -14646,7 +14604,7 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
14646
14604
  const context = useRovingFocusContext(ITEM_NAME$3, __scopeRovingFocusGroup);
14647
14605
  const isCurrentTabStop = context.currentTabStopId === id;
14648
14606
  const getItems = useCollection$3(__scopeRovingFocusGroup);
14649
- const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
14607
+ const { onFocusableItemAdd, onFocusableItemRemove } = context;
14650
14608
  React__namespace.useEffect(() => {
14651
14609
  if (focusable) {
14652
14610
  onFocusableItemAdd();
@@ -14692,8 +14650,7 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
14692
14650
  }
14693
14651
  setTimeout(() => focusFirst$1(candidateNodes));
14694
14652
  }
14695
- }),
14696
- children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children
14653
+ })
14697
14654
  }
14698
14655
  )
14699
14656
  }
@@ -14757,8 +14714,7 @@ var Tabs$1 = React__namespace.forwardRef(
14757
14714
  const [value, setValue] = useControllableState({
14758
14715
  prop: valueProp,
14759
14716
  onChange: onValueChange,
14760
- defaultProp: defaultValue ?? "",
14761
- caller: TABS_NAME
14717
+ defaultProp: defaultValue
14762
14718
  });
14763
14719
  return /* @__PURE__ */ jsxRuntime.jsx(
14764
14720
  TabsProvider,
@@ -14941,11 +14897,10 @@ var Collapsible = React__namespace.forwardRef(
14941
14897
  onOpenChange,
14942
14898
  ...collapsibleProps
14943
14899
  } = props;
14944
- const [open, setOpen] = useControllableState({
14900
+ const [open = false, setOpen] = useControllableState({
14945
14901
  prop: openProp,
14946
- defaultProp: defaultOpen ?? false,
14947
- onChange: onOpenChange,
14948
- caller: COLLAPSIBLE_NAME
14902
+ defaultProp: defaultOpen,
14903
+ onChange: onOpenChange
14949
14904
  });
14950
14905
  return /* @__PURE__ */ jsxRuntime.jsx(
14951
14906
  CollapsibleProvider,
@@ -15095,15 +15050,14 @@ var AccordionImplSingle = React.forwardRef(
15095
15050
  } = props;
15096
15051
  const [value, setValue] = useControllableState({
15097
15052
  prop: valueProp,
15098
- defaultProp: defaultValue ?? "",
15099
- onChange: onValueChange,
15100
- caller: ACCORDION_NAME
15053
+ defaultProp: defaultValue,
15054
+ onChange: onValueChange
15101
15055
  });
15102
15056
  return /* @__PURE__ */ jsxRuntime.jsx(
15103
15057
  AccordionValueProvider,
15104
15058
  {
15105
15059
  scope: props.__scopeAccordion,
15106
- value: React.useMemo(() => value ? [value] : [], [value]),
15060
+ value: value ? [value] : [],
15107
15061
  onItemOpen: setValue,
15108
15062
  onItemClose: React.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
15109
15063
  children: /* @__PURE__ */ jsxRuntime.jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsxRuntime.jsx(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
@@ -15119,11 +15073,10 @@ var AccordionImplMultiple = React.forwardRef((props, forwardedRef) => {
15119
15073
  },
15120
15074
  ...accordionMultipleProps
15121
15075
  } = props;
15122
- const [value, setValue] = useControllableState({
15076
+ const [value = [], setValue] = useControllableState({
15123
15077
  prop: valueProp,
15124
- defaultProp: defaultValue ?? [],
15125
- onChange: onValueChange,
15126
- caller: ACCORDION_NAME
15078
+ defaultProp: defaultValue,
15079
+ onChange: onValueChange
15127
15080
  });
15128
15081
  const handleItemOpen = React.useCallback(
15129
15082
  (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
@@ -15553,7 +15506,6 @@ var MenuRootContentNonModal = React__namespace.forwardRef((props, forwardedRef)
15553
15506
  }
15554
15507
  );
15555
15508
  });
15556
- var Slot = createSlot("MenuContent.ScrollLock");
15557
15509
  var MenuContentImpl = React__namespace.forwardRef(
15558
15510
  (props, forwardedRef) => {
15559
15511
  const {
@@ -16191,12 +16143,10 @@ function isPointInPolygon(point, polygon) {
16191
16143
  const { x, y } = point;
16192
16144
  let inside = false;
16193
16145
  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
16194
- const ii = polygon[i];
16195
- const jj = polygon[j];
16196
- const xi = ii.x;
16197
- const yi = ii.y;
16198
- const xj = jj.x;
16199
- const yj = jj.y;
16146
+ const xi = polygon[i].x;
16147
+ const yi = polygon[i].y;
16148
+ const xj = polygon[j].x;
16149
+ const yj = polygon[j].y;
16200
16150
  const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
16201
16151
  if (intersect) inside = !inside;
16202
16152
  }
@@ -16246,11 +16196,10 @@ var DropdownMenu = (props) => {
16246
16196
  } = props;
16247
16197
  const menuScope = useMenuScope(__scopeDropdownMenu);
16248
16198
  const triggerRef = React__namespace.useRef(null);
16249
- const [open, setOpen] = useControllableState({
16199
+ const [open = false, setOpen] = useControllableState({
16250
16200
  prop: openProp,
16251
- defaultProp: defaultOpen ?? false,
16252
- onChange: onOpenChange,
16253
- caller: DROPDOWN_MENU_NAME
16201
+ defaultProp: defaultOpen,
16202
+ onChange: onOpenChange
16254
16203
  });
16255
16204
  return /* @__PURE__ */ jsxRuntime.jsx(
16256
16205
  DropdownMenuProvider,
@@ -16427,11 +16376,10 @@ DropdownMenuArrow.displayName = ARROW_NAME;
16427
16376
  var DropdownMenuSub = (props) => {
16428
16377
  const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
16429
16378
  const menuScope = useMenuScope(__scopeDropdownMenu);
16430
- const [open, setOpen] = useControllableState({
16379
+ const [open = false, setOpen] = useControllableState({
16431
16380
  prop: openProp,
16432
- defaultProp: defaultOpen ?? false,
16433
- onChange: onOpenChange,
16434
- caller: "DropdownMenuSub"
16381
+ defaultProp: defaultOpen,
16382
+ onChange: onOpenChange
16435
16383
  });
16436
16384
  return /* @__PURE__ */ jsxRuntime.jsx(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
16437
16385
  };
@@ -26842,10 +26790,12 @@ const Collapse = ({ isVisible, children }) => {
26842
26790
  const [contentHeight, setContentHeight] = React.useState(0);
26843
26791
  React.useEffect(() => {
26844
26792
  if (contentRef.current) {
26845
- setContentHeight(contentRef.current.scrollHeight);
26793
+ setTimeout(() => {
26794
+ setContentHeight((contentRef.current?.scrollHeight ?? 0) + 5);
26795
+ }, 0);
26846
26796
  }
26847
26797
  }, [children]);
26848
- return (React.createElement(AnimatePresence, { initial: false }, isVisible && (React.createElement(motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: contentHeight, opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { type: 'spring', damping: 20, stiffness: 100 }, style: { overflow: 'hidden' } },
26798
+ return (React.createElement(AnimatePresence, { initial: false }, isVisible && (React.createElement(motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: contentHeight, opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { type: 'spring', damping: 20, stiffness: 100 } },
26849
26799
  React.createElement("div", { ref: contentRef }, children)))));
26850
26800
  };
26851
26801
 
@@ -26854,7 +26804,7 @@ function clamp(value, [min, max]) {
26854
26804
  return Math.min(max, Math.max(min, value));
26855
26805
  }
26856
26806
 
26857
- // packages/react/use-previous/src/use-previous.tsx
26807
+ // packages/react/use-previous/src/usePrevious.tsx
26858
26808
  function usePrevious(value) {
26859
26809
  const ref = React__namespace.useRef({ value, previous: value });
26860
26810
  return React__namespace.useMemo(() => {
@@ -27300,7 +27250,7 @@ var SliderThumbImpl = React__namespace.forwardRef(
27300
27250
  }
27301
27251
  ) }),
27302
27252
  isFormControl && /* @__PURE__ */ jsxRuntime.jsx(
27303
- SliderBubbleInput,
27253
+ BubbleInput,
27304
27254
  {
27305
27255
  name: name ?? (context.name ? context.name + (context.values.length > 1 ? "[]" : "") : void 0),
27306
27256
  form: context.form,
@@ -27314,36 +27264,23 @@ var SliderThumbImpl = React__namespace.forwardRef(
27314
27264
  }
27315
27265
  );
27316
27266
  SliderThumb.displayName = THUMB_NAME;
27317
- var BUBBLE_INPUT_NAME = "RadioBubbleInput";
27318
- var SliderBubbleInput = React__namespace.forwardRef(
27319
- ({ __scopeSlider, value, ...props }, forwardedRef) => {
27320
- const ref = React__namespace.useRef(null);
27321
- const composedRefs = useComposedRefs(ref, forwardedRef);
27322
- const prevValue = usePrevious(value);
27323
- React__namespace.useEffect(() => {
27324
- const input = ref.current;
27325
- if (!input) return;
27326
- const inputProto = window.HTMLInputElement.prototype;
27327
- const descriptor = Object.getOwnPropertyDescriptor(inputProto, "value");
27328
- const setValue = descriptor.set;
27329
- if (prevValue !== value && setValue) {
27330
- const event = new Event("input", { bubbles: true });
27331
- setValue.call(input, value);
27332
- input.dispatchEvent(event);
27333
- }
27334
- }, [prevValue, value]);
27335
- return /* @__PURE__ */ jsxRuntime.jsx(
27336
- Primitive.input,
27337
- {
27338
- style: { display: "none" },
27339
- ...props,
27340
- ref: composedRefs,
27341
- defaultValue: value
27342
- }
27343
- );
27344
- }
27345
- );
27346
- SliderBubbleInput.displayName = BUBBLE_INPUT_NAME;
27267
+ var BubbleInput = (props) => {
27268
+ const { value, ...inputProps } = props;
27269
+ const ref = React__namespace.useRef(null);
27270
+ const prevValue = usePrevious(value);
27271
+ React__namespace.useEffect(() => {
27272
+ const input = ref.current;
27273
+ const inputProto = window.HTMLInputElement.prototype;
27274
+ const descriptor = Object.getOwnPropertyDescriptor(inputProto, "value");
27275
+ const setValue = descriptor.set;
27276
+ if (prevValue !== value && setValue) {
27277
+ const event = new Event("input", { bubbles: true });
27278
+ setValue.call(input, value);
27279
+ input.dispatchEvent(event);
27280
+ }
27281
+ }, [prevValue, value]);
27282
+ return /* @__PURE__ */ jsxRuntime.jsx("input", { style: { display: "none" }, ...inputProps, ref, defaultValue: value });
27283
+ };
27347
27284
  function getNextSortedValues(prevValues = [], nextValue, atIndex) {
27348
27285
  const nextValues = [...prevValues];
27349
27286
  nextValues[atIndex] = nextValue;