@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.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import React__default, { useLayoutEffect, useState, useRef, useEffect, useCallback, forwardRef, useContext, useMemo, createContext, Component, Fragment, useId as useId$1, useInsertionEffect as useInsertionEffect$2, Children, isValidElement, createElement } from 'react';
3
- import { jsx as jsx$1, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
+ import React__default, { useLayoutEffect, useState, useRef, useEffect, useCallback, forwardRef, useContext, useMemo, createContext, Component, Fragment as Fragment$1, useId as useId$1, useInsertionEffect as useInsertionEffect$1, Children, isValidElement, createElement } from 'react';
3
+ import { jsx as jsx$1, Fragment, jsxs } from 'react/jsx-runtime';
4
4
  import * as ReactDOM from 'react-dom';
5
5
  import ReactDOM__default, { createPortal } from 'react-dom';
6
6
 
@@ -191,7 +191,7 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
191
191
  };
192
192
  }
193
193
 
194
- // packages/react/compose-refs/src/compose-refs.tsx
194
+ // packages/react/compose-refs/src/composeRefs.tsx
195
195
  function setRef(ref, value) {
196
196
  if (typeof ref === "function") {
197
197
  return ref(value);
@@ -227,7 +227,7 @@ function useComposedRefs(...refs) {
227
227
  return React.useCallback(composeRefs(...refs), refs);
228
228
  }
229
229
 
230
- // packages/react/context/src/create-context.tsx
230
+ // packages/react/context/src/createContext.tsx
231
231
  function createContext2(rootComponentName, defaultContext) {
232
232
  const Context = React.createContext(defaultContext);
233
233
  const Provider = (props) => {
@@ -302,51 +302,44 @@ function composeContextScopes(...scopes) {
302
302
  return createScope;
303
303
  }
304
304
 
305
- // src/slot.tsx
306
- // @__NO_SIDE_EFFECTS__
307
- function createSlot(ownerName) {
308
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
309
- const Slot2 = React.forwardRef((props, forwardedRef) => {
310
- const { children, ...slotProps } = props;
311
- const childrenArray = React.Children.toArray(children);
312
- const slottable = childrenArray.find(isSlottable);
313
- if (slottable) {
314
- const newElement = slottable.props.children;
315
- const newChildren = childrenArray.map((child) => {
316
- if (child === slottable) {
317
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
318
- return React.isValidElement(newElement) ? newElement.props.children : null;
319
- } else {
320
- return child;
321
- }
322
- });
323
- return /* @__PURE__ */ jsx$1(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
324
- }
325
- return /* @__PURE__ */ jsx$1(SlotClone, { ...slotProps, ref: forwardedRef, children });
326
- });
327
- Slot2.displayName = `${ownerName}.Slot`;
328
- return Slot2;
329
- }
330
- // @__NO_SIDE_EFFECTS__
331
- function createSlotClone(ownerName) {
332
- const SlotClone = React.forwardRef((props, forwardedRef) => {
333
- const { children, ...slotProps } = props;
334
- if (React.isValidElement(children)) {
335
- const childrenRef = getElementRef$1(children);
336
- const props2 = mergeProps(slotProps, children.props);
337
- if (children.type !== React.Fragment) {
338
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
305
+ // packages/react/slot/src/slot.tsx
306
+ var Slot = React.forwardRef((props, forwardedRef) => {
307
+ const { children, ...slotProps } = props;
308
+ const childrenArray = React.Children.toArray(children);
309
+ const slottable = childrenArray.find(isSlottable);
310
+ if (slottable) {
311
+ const newElement = slottable.props.children;
312
+ const newChildren = childrenArray.map((child) => {
313
+ if (child === slottable) {
314
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
315
+ return React.isValidElement(newElement) ? newElement.props.children : null;
316
+ } else {
317
+ return child;
339
318
  }
340
- return React.cloneElement(children, props2);
341
- }
342
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
343
- });
344
- SlotClone.displayName = `${ownerName}.SlotClone`;
345
- return SlotClone;
346
- }
347
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
319
+ });
320
+ return /* @__PURE__ */ jsx$1(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
321
+ }
322
+ return /* @__PURE__ */ jsx$1(SlotClone, { ...slotProps, ref: forwardedRef, children });
323
+ });
324
+ Slot.displayName = "Slot";
325
+ var SlotClone = React.forwardRef((props, forwardedRef) => {
326
+ const { children, ...slotProps } = props;
327
+ if (React.isValidElement(children)) {
328
+ const childrenRef = getElementRef$1(children);
329
+ const props2 = mergeProps(slotProps, children.props);
330
+ if (children.type !== React.Fragment) {
331
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
332
+ }
333
+ return React.cloneElement(children, props2);
334
+ }
335
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
336
+ });
337
+ SlotClone.displayName = "SlotClone";
338
+ var Slottable = ({ children }) => {
339
+ return /* @__PURE__ */ jsx$1(Fragment, { children });
340
+ };
348
341
  function isSlottable(child) {
349
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
342
+ return React.isValidElement(child) && child.type === Slottable;
350
343
  }
351
344
  function mergeProps(slotProps, childProps) {
352
345
  const overrideProps = { ...childProps };
@@ -357,9 +350,8 @@ function mergeProps(slotProps, childProps) {
357
350
  if (isHandler) {
358
351
  if (slotPropValue && childPropValue) {
359
352
  overrideProps[propName] = (...args) => {
360
- const result = childPropValue(...args);
353
+ childPropValue(...args);
361
354
  slotPropValue(...args);
362
- return result;
363
355
  };
364
356
  } else if (slotPropValue) {
365
357
  overrideProps[propName] = slotPropValue;
@@ -386,7 +378,7 @@ function getElementRef$1(element) {
386
378
  return element.props.ref || element.ref;
387
379
  }
388
380
 
389
- // src/primitive.tsx
381
+ // packages/react/primitive/src/primitive.tsx
390
382
  var NODES = [
391
383
  "a",
392
384
  "button",
@@ -401,13 +393,11 @@ var NODES = [
401
393
  "nav",
402
394
  "ol",
403
395
  "p",
404
- "select",
405
396
  "span",
406
397
  "svg",
407
398
  "ul"
408
399
  ];
409
400
  var Primitive = NODES.reduce((primitive, node) => {
410
- const Slot = createSlot(`Primitive.${node}`);
411
401
  const Node = React.forwardRef((props, forwardedRef) => {
412
402
  const { asChild, ...primitiveProps } = props;
413
403
  const Comp = asChild ? Slot : node;
@@ -423,7 +413,7 @@ function dispatchDiscreteCustomEvent(target, event) {
423
413
  if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
424
414
  }
425
415
 
426
- // packages/react/use-callback-ref/src/use-callback-ref.tsx
416
+ // packages/react/use-callback-ref/src/useCallbackRef.tsx
427
417
  function useCallbackRef$1(callback) {
428
418
  const callbackRef = React.useRef(callback);
429
419
  React.useEffect(() => {
@@ -432,7 +422,7 @@ function useCallbackRef$1(callback) {
432
422
  return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);
433
423
  }
434
424
 
435
- // packages/react/use-escape-keydown/src/use-escape-keydown.tsx
425
+ // packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
436
426
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
437
427
  const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
438
428
  React.useEffect(() => {
@@ -874,12 +864,12 @@ function removeLinks(items) {
874
864
  return items.filter((item) => item.tagName !== "A");
875
865
  }
876
866
 
877
- // packages/react/use-layout-effect/src/use-layout-effect.tsx
878
- var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {
867
+ // packages/react/use-layout-effect/src/useLayoutEffect.tsx
868
+ var useLayoutEffect2 = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {
879
869
  };
880
870
 
881
871
  // packages/react/id/src/id.tsx
882
- var useReactId = React[" useId ".trim().toString()] || (() => void 0);
872
+ var useReactId = React["useId".toString()] || (() => void 0);
883
873
  var count = 0;
884
874
  function useId(deterministicId) {
885
875
  const [id, setId] = React.useState(useReactId());
@@ -2867,7 +2857,7 @@ const arrow = (options, deps) => ({
2867
2857
  options: [options, deps]
2868
2858
  });
2869
2859
 
2870
- // src/arrow.tsx
2860
+ // packages/react/arrow/src/arrow.tsx
2871
2861
  var NAME = "Arrow";
2872
2862
  var Arrow$1 = React.forwardRef((props, forwardedRef) => {
2873
2863
  const { children, width = 10, height = 5, ...arrowProps } = props;
@@ -2887,7 +2877,7 @@ var Arrow$1 = React.forwardRef((props, forwardedRef) => {
2887
2877
  Arrow$1.displayName = NAME;
2888
2878
  var Root$5 = Arrow$1;
2889
2879
 
2890
- // packages/react/use-size/src/use-size.tsx
2880
+ // packages/react/use-size/src/useSize.tsx
2891
2881
  function useSize(element) {
2892
2882
  const [size, setSize] = React.useState(void 0);
2893
2883
  useLayoutEffect2(() => {
@@ -3205,7 +3195,7 @@ function useStateMachine(initialState, machine) {
3205
3195
  }, initialState);
3206
3196
  }
3207
3197
 
3208
- // src/presence.tsx
3198
+ // packages/react/presence/src/Presence.tsx
3209
3199
  var Presence = (props) => {
3210
3200
  const { present, children } = props;
3211
3201
  const presence = usePresence$1(present);
@@ -3217,7 +3207,7 @@ var Presence = (props) => {
3217
3207
  Presence.displayName = "Presence";
3218
3208
  function usePresence$1(present) {
3219
3209
  const [node, setNode] = React.useState();
3220
- const stylesRef = React.useRef(null);
3210
+ const stylesRef = React.useRef({});
3221
3211
  const prevPresentRef = React.useRef(present);
3222
3212
  const prevAnimationNameRef = React.useRef("none");
3223
3213
  const initialState = present ? "mounted" : "unmounted";
@@ -3301,7 +3291,7 @@ function usePresence$1(present) {
3301
3291
  return {
3302
3292
  isPresent: ["mounted", "unmountSuspended"].includes(state),
3303
3293
  ref: React.useCallback((node2) => {
3304
- stylesRef.current = node2 ? getComputedStyle(node2) : null;
3294
+ if (node2) stylesRef.current = getComputedStyle(node2);
3305
3295
  setNode(node2);
3306
3296
  }, [])
3307
3297
  };
@@ -3323,47 +3313,28 @@ function getElementRef(element) {
3323
3313
  return element.props.ref || element.ref;
3324
3314
  }
3325
3315
 
3326
- // src/use-controllable-state.tsx
3327
- var useInsertionEffect$1 = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
3316
+ // packages/react/use-controllable-state/src/useControllableState.tsx
3328
3317
  function useControllableState({
3329
3318
  prop,
3330
3319
  defaultProp,
3331
3320
  onChange = () => {
3332
- },
3333
- caller
3321
+ }
3334
3322
  }) {
3335
- const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
3336
- defaultProp,
3337
- onChange
3338
- });
3323
+ const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
3339
3324
  const isControlled = prop !== void 0;
3340
3325
  const value = isControlled ? prop : uncontrolledProp;
3341
- {
3342
- const isControlledRef = React.useRef(prop !== void 0);
3343
- React.useEffect(() => {
3344
- const wasControlled = isControlledRef.current;
3345
- if (wasControlled !== isControlled) {
3346
- const from = wasControlled ? "controlled" : "uncontrolled";
3347
- const to = isControlled ? "controlled" : "uncontrolled";
3348
- console.warn(
3349
- `${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.`
3350
- );
3351
- }
3352
- isControlledRef.current = isControlled;
3353
- }, [isControlled, caller]);
3354
- }
3326
+ const handleChange = useCallbackRef$1(onChange);
3355
3327
  const setValue = React.useCallback(
3356
3328
  (nextValue) => {
3357
3329
  if (isControlled) {
3358
- const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
3359
- if (value2 !== prop) {
3360
- onChangeRef.current?.(value2);
3361
- }
3330
+ const setter = nextValue;
3331
+ const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
3332
+ if (value2 !== prop) handleChange(value2);
3362
3333
  } else {
3363
3334
  setUncontrolledProp(nextValue);
3364
3335
  }
3365
3336
  },
3366
- [isControlled, prop, setUncontrolledProp, onChangeRef]
3337
+ [isControlled, prop, setUncontrolledProp, handleChange]
3367
3338
  );
3368
3339
  return [value, setValue];
3369
3340
  }
@@ -3371,22 +3342,17 @@ function useUncontrolledState({
3371
3342
  defaultProp,
3372
3343
  onChange
3373
3344
  }) {
3374
- const [value, setValue] = React.useState(defaultProp);
3345
+ const uncontrolledState = React.useState(defaultProp);
3346
+ const [value] = uncontrolledState;
3375
3347
  const prevValueRef = React.useRef(value);
3376
- const onChangeRef = React.useRef(onChange);
3377
- useInsertionEffect$1(() => {
3378
- onChangeRef.current = onChange;
3379
- }, [onChange]);
3348
+ const handleChange = useCallbackRef$1(onChange);
3380
3349
  React.useEffect(() => {
3381
3350
  if (prevValueRef.current !== value) {
3382
- onChangeRef.current?.(value);
3351
+ handleChange(value);
3383
3352
  prevValueRef.current = value;
3384
3353
  }
3385
- }, [value, prevValueRef]);
3386
- return [value, setValue, onChangeRef];
3387
- }
3388
- function isFunction(value) {
3389
- return typeof value === "function";
3354
+ }, [value, prevValueRef, handleChange]);
3355
+ return uncontrolledState;
3390
3356
  }
3391
3357
 
3392
3358
  var getDefaultParent = function (originalTarget) {
@@ -4290,11 +4256,10 @@ var Popover = (props) => {
4290
4256
  const popperScope = usePopperScope$1(__scopePopover);
4291
4257
  const triggerRef = React.useRef(null);
4292
4258
  const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
4293
- const [open, setOpen] = useControllableState({
4259
+ const [open = false, setOpen] = useControllableState({
4294
4260
  prop: openProp,
4295
- defaultProp: defaultOpen ?? false,
4296
- onChange: onOpenChange,
4297
- caller: POPOVER_NAME
4261
+ defaultProp: defaultOpen,
4262
+ onChange: onOpenChange
4298
4263
  });
4299
4264
  return /* @__PURE__ */ jsx$1(Root2$4, { ...popperScope, children: /* @__PURE__ */ jsx$1(
4300
4265
  PopoverProvider,
@@ -4373,7 +4338,6 @@ var PopoverContent$1 = React.forwardRef(
4373
4338
  }
4374
4339
  );
4375
4340
  PopoverContent$1.displayName = CONTENT_NAME$6;
4376
- var Slot$2 = createSlot("PopoverContent.RemoveScroll");
4377
4341
  var PopoverContentModal = React.forwardRef(
4378
4342
  (props, forwardedRef) => {
4379
4343
  const context = usePopoverContext(CONTENT_NAME$6, props.__scopePopover);
@@ -4384,7 +4348,7 @@ var PopoverContentModal = React.forwardRef(
4384
4348
  const content = contentRef.current;
4385
4349
  if (content) return hideOthers(content);
4386
4350
  }, []);
4387
- return /* @__PURE__ */ jsx$1(RemoveScroll, { as: Slot$2, allowPinchZoom: true, children: /* @__PURE__ */ jsx$1(
4351
+ return /* @__PURE__ */ jsx$1(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx$1(
4388
4352
  PopoverContentImpl,
4389
4353
  {
4390
4354
  ...props,
@@ -11267,7 +11231,7 @@ var LiveRegion = function LiveRegion(props) {
11267
11231
  }
11268
11232
  return guidanceMsg;
11269
11233
  }, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
11270
- var ScreenReaderText = jsx(Fragment, null, jsx("span", {
11234
+ var ScreenReaderText = jsx(Fragment$1, null, jsx("span", {
11271
11235
  id: "aria-selection"
11272
11236
  }, ariaSelected), jsx("span", {
11273
11237
  id: "aria-focused"
@@ -11276,7 +11240,7 @@ var LiveRegion = function LiveRegion(props) {
11276
11240
  }, ariaResults), jsx("span", {
11277
11241
  id: "aria-guidance"
11278
11242
  }, ariaGuidance));
11279
- return jsx(Fragment, null, jsx(A11yText$1, {
11243
+ return jsx(Fragment$1, null, jsx(A11yText$1, {
11280
11244
  id: id
11281
11245
  }, isInitialFocus && ScreenReaderText), jsx(A11yText$1, {
11282
11246
  "aria-live": ariaLive,
@@ -11888,7 +11852,7 @@ function ScrollManager(_ref) {
11888
11852
  setScrollCaptureTarget(element);
11889
11853
  setScrollLockTarget(element);
11890
11854
  };
11891
- return jsx(Fragment, null, lockEnabled && jsx("div", {
11855
+ return jsx(Fragment$1, null, lockEnabled && jsx("div", {
11892
11856
  onClick: blurSelectInput,
11893
11857
  css: _ref2$1
11894
11858
  }), children(targetRef));
@@ -13989,11 +13953,10 @@ var Dialog$1 = (props) => {
13989
13953
  } = props;
13990
13954
  const triggerRef = React.useRef(null);
13991
13955
  const contentRef = React.useRef(null);
13992
- const [open, setOpen] = useControllableState({
13956
+ const [open = false, setOpen] = useControllableState({
13993
13957
  prop: openProp,
13994
- defaultProp: defaultOpen ?? false,
13995
- onChange: onOpenChange,
13996
- caller: DIALOG_NAME
13958
+ defaultProp: defaultOpen,
13959
+ onChange: onOpenChange
13997
13960
  });
13998
13961
  return /* @__PURE__ */ jsx$1(
13999
13962
  DialogProvider,
@@ -14055,7 +14018,6 @@ var DialogOverlay = React.forwardRef(
14055
14018
  }
14056
14019
  );
14057
14020
  DialogOverlay.displayName = OVERLAY_NAME;
14058
- var Slot$1 = createSlot("DialogOverlay.RemoveScroll");
14059
14021
  var DialogOverlayImpl = React.forwardRef(
14060
14022
  (props, forwardedRef) => {
14061
14023
  const { __scopeDialog, ...overlayProps } = props;
@@ -14063,7 +14025,7 @@ var DialogOverlayImpl = React.forwardRef(
14063
14025
  return (
14064
14026
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
14065
14027
  // ie. when `Overlay` and `Content` are siblings
14066
- /* @__PURE__ */ jsx$1(RemoveScroll, { as: Slot$1, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx$1(
14028
+ /* @__PURE__ */ jsx$1(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx$1(
14067
14029
  Primitive.div,
14068
14030
  {
14069
14031
  "data-state": getState$2(context.open),
@@ -14166,7 +14128,7 @@ var DialogContentImpl = React.forwardRef(
14166
14128
  const contentRef = React.useRef(null);
14167
14129
  const composedRefs = useComposedRefs(forwardedRef, contentRef);
14168
14130
  useFocusGuards();
14169
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
14131
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
14170
14132
  /* @__PURE__ */ jsx$1(
14171
14133
  FocusScope,
14172
14134
  {
@@ -14190,7 +14152,7 @@ var DialogContentImpl = React.forwardRef(
14190
14152
  )
14191
14153
  }
14192
14154
  ),
14193
- /* @__PURE__ */ jsxs(Fragment$1, { children: [
14155
+ /* @__PURE__ */ jsxs(Fragment, { children: [
14194
14156
  /* @__PURE__ */ jsx$1(TitleWarning, { titleId: context.titleId }),
14195
14157
  /* @__PURE__ */ jsx$1(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
14196
14158
  ] })
@@ -14450,19 +14412,17 @@ function createCollection(name) {
14450
14412
  };
14451
14413
  CollectionProvider.displayName = PROVIDER_NAME;
14452
14414
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
14453
- const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
14454
14415
  const CollectionSlot = React__default.forwardRef(
14455
14416
  (props, forwardedRef) => {
14456
14417
  const { scope, children } = props;
14457
14418
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
14458
14419
  const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
14459
- return /* @__PURE__ */ jsx$1(CollectionSlotImpl, { ref: composedRefs, children });
14420
+ return /* @__PURE__ */ jsx$1(Slot, { ref: composedRefs, children });
14460
14421
  }
14461
14422
  );
14462
14423
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
14463
14424
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
14464
14425
  const ITEM_DATA_ATTR = "data-radix-collection-item";
14465
- const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
14466
14426
  const CollectionItemSlot = React__default.forwardRef(
14467
14427
  (props, forwardedRef) => {
14468
14428
  const { scope, children, ...itemData } = props;
@@ -14473,7 +14433,7 @@ function createCollection(name) {
14473
14433
  context.itemMap.set(ref, { ref, ...itemData });
14474
14434
  return () => void context.itemMap.delete(ref);
14475
14435
  });
14476
- return /* @__PURE__ */ jsx$1(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
14436
+ return /* @__PURE__ */ jsx$1(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
14477
14437
  }
14478
14438
  );
14479
14439
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
@@ -14498,7 +14458,7 @@ function createCollection(name) {
14498
14458
  ];
14499
14459
  }
14500
14460
 
14501
- // packages/react/direction/src/direction.tsx
14461
+ // packages/react/direction/src/Direction.tsx
14502
14462
  var DirectionContext = React.createContext(void 0);
14503
14463
  function useDirection(localDir) {
14504
14464
  const globalDir = React.useContext(DirectionContext);
@@ -14536,11 +14496,10 @@ var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
14536
14496
  const ref = React.useRef(null);
14537
14497
  const composedRefs = useComposedRefs(forwardedRef, ref);
14538
14498
  const direction = useDirection(dir);
14539
- const [currentTabStopId, setCurrentTabStopId] = useControllableState({
14499
+ const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
14540
14500
  prop: currentTabStopIdProp,
14541
- defaultProp: defaultCurrentTabStopId ?? null,
14542
- onChange: onCurrentTabStopIdChange,
14543
- caller: GROUP_NAME$2
14501
+ defaultProp: defaultCurrentTabStopId,
14502
+ onChange: onCurrentTabStopIdChange
14544
14503
  });
14545
14504
  const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);
14546
14505
  const handleEntryFocus = useCallbackRef$1(onEntryFocus);
@@ -14618,7 +14577,6 @@ var RovingFocusGroupItem = React.forwardRef(
14618
14577
  focusable = true,
14619
14578
  active = false,
14620
14579
  tabStopId,
14621
- children,
14622
14580
  ...itemProps
14623
14581
  } = props;
14624
14582
  const autoId = useId();
@@ -14626,7 +14584,7 @@ var RovingFocusGroupItem = React.forwardRef(
14626
14584
  const context = useRovingFocusContext(ITEM_NAME$3, __scopeRovingFocusGroup);
14627
14585
  const isCurrentTabStop = context.currentTabStopId === id;
14628
14586
  const getItems = useCollection$3(__scopeRovingFocusGroup);
14629
- const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
14587
+ const { onFocusableItemAdd, onFocusableItemRemove } = context;
14630
14588
  React.useEffect(() => {
14631
14589
  if (focusable) {
14632
14590
  onFocusableItemAdd();
@@ -14672,8 +14630,7 @@ var RovingFocusGroupItem = React.forwardRef(
14672
14630
  }
14673
14631
  setTimeout(() => focusFirst$1(candidateNodes));
14674
14632
  }
14675
- }),
14676
- children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children
14633
+ })
14677
14634
  }
14678
14635
  )
14679
14636
  }
@@ -14737,8 +14694,7 @@ var Tabs$1 = React.forwardRef(
14737
14694
  const [value, setValue] = useControllableState({
14738
14695
  prop: valueProp,
14739
14696
  onChange: onValueChange,
14740
- defaultProp: defaultValue ?? "",
14741
- caller: TABS_NAME
14697
+ defaultProp: defaultValue
14742
14698
  });
14743
14699
  return /* @__PURE__ */ jsx$1(
14744
14700
  TabsProvider,
@@ -14921,11 +14877,10 @@ var Collapsible = React.forwardRef(
14921
14877
  onOpenChange,
14922
14878
  ...collapsibleProps
14923
14879
  } = props;
14924
- const [open, setOpen] = useControllableState({
14880
+ const [open = false, setOpen] = useControllableState({
14925
14881
  prop: openProp,
14926
- defaultProp: defaultOpen ?? false,
14927
- onChange: onOpenChange,
14928
- caller: COLLAPSIBLE_NAME
14882
+ defaultProp: defaultOpen,
14883
+ onChange: onOpenChange
14929
14884
  });
14930
14885
  return /* @__PURE__ */ jsx$1(
14931
14886
  CollapsibleProvider,
@@ -15075,15 +15030,14 @@ var AccordionImplSingle = React__default.forwardRef(
15075
15030
  } = props;
15076
15031
  const [value, setValue] = useControllableState({
15077
15032
  prop: valueProp,
15078
- defaultProp: defaultValue ?? "",
15079
- onChange: onValueChange,
15080
- caller: ACCORDION_NAME
15033
+ defaultProp: defaultValue,
15034
+ onChange: onValueChange
15081
15035
  });
15082
15036
  return /* @__PURE__ */ jsx$1(
15083
15037
  AccordionValueProvider,
15084
15038
  {
15085
15039
  scope: props.__scopeAccordion,
15086
- value: React__default.useMemo(() => value ? [value] : [], [value]),
15040
+ value: value ? [value] : [],
15087
15041
  onItemOpen: setValue,
15088
15042
  onItemClose: React__default.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
15089
15043
  children: /* @__PURE__ */ jsx$1(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsx$1(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
@@ -15099,11 +15053,10 @@ var AccordionImplMultiple = React__default.forwardRef((props, forwardedRef) => {
15099
15053
  },
15100
15054
  ...accordionMultipleProps
15101
15055
  } = props;
15102
- const [value, setValue] = useControllableState({
15056
+ const [value = [], setValue] = useControllableState({
15103
15057
  prop: valueProp,
15104
- defaultProp: defaultValue ?? [],
15105
- onChange: onValueChange,
15106
- caller: ACCORDION_NAME
15058
+ defaultProp: defaultValue,
15059
+ onChange: onValueChange
15107
15060
  });
15108
15061
  const handleItemOpen = React__default.useCallback(
15109
15062
  (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
@@ -15533,7 +15486,6 @@ var MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {
15533
15486
  }
15534
15487
  );
15535
15488
  });
15536
- var Slot = createSlot("MenuContent.ScrollLock");
15537
15489
  var MenuContentImpl = React.forwardRef(
15538
15490
  (props, forwardedRef) => {
15539
15491
  const {
@@ -16171,12 +16123,10 @@ function isPointInPolygon(point, polygon) {
16171
16123
  const { x, y } = point;
16172
16124
  let inside = false;
16173
16125
  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
16174
- const ii = polygon[i];
16175
- const jj = polygon[j];
16176
- const xi = ii.x;
16177
- const yi = ii.y;
16178
- const xj = jj.x;
16179
- const yj = jj.y;
16126
+ const xi = polygon[i].x;
16127
+ const yi = polygon[i].y;
16128
+ const xj = polygon[j].x;
16129
+ const yj = polygon[j].y;
16180
16130
  const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
16181
16131
  if (intersect) inside = !inside;
16182
16132
  }
@@ -16226,11 +16176,10 @@ var DropdownMenu = (props) => {
16226
16176
  } = props;
16227
16177
  const menuScope = useMenuScope(__scopeDropdownMenu);
16228
16178
  const triggerRef = React.useRef(null);
16229
- const [open, setOpen] = useControllableState({
16179
+ const [open = false, setOpen] = useControllableState({
16230
16180
  prop: openProp,
16231
- defaultProp: defaultOpen ?? false,
16232
- onChange: onOpenChange,
16233
- caller: DROPDOWN_MENU_NAME
16181
+ defaultProp: defaultOpen,
16182
+ onChange: onOpenChange
16234
16183
  });
16235
16184
  return /* @__PURE__ */ jsx$1(
16236
16185
  DropdownMenuProvider,
@@ -16407,11 +16356,10 @@ DropdownMenuArrow.displayName = ARROW_NAME;
16407
16356
  var DropdownMenuSub = (props) => {
16408
16357
  const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
16409
16358
  const menuScope = useMenuScope(__scopeDropdownMenu);
16410
- const [open, setOpen] = useControllableState({
16359
+ const [open = false, setOpen] = useControllableState({
16411
16360
  prop: openProp,
16412
- defaultProp: defaultOpen ?? false,
16413
- onChange: onOpenChange,
16414
- caller: "DropdownMenuSub"
16361
+ defaultProp: defaultOpen,
16362
+ onChange: onOpenChange
16415
16363
  });
16416
16364
  return /* @__PURE__ */ jsx$1(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
16417
16365
  };
@@ -20486,7 +20434,7 @@ function PopChild({ children, isPresent, anchorX }) {
20486
20434
  * styles directly on the DOM node, we might be overwriting
20487
20435
  * styles set via the style prop.
20488
20436
  */
20489
- useInsertionEffect$2(() => {
20437
+ useInsertionEffect$1(() => {
20490
20438
  const { width, height, top, left, right } = size.current;
20491
20439
  if (isPresent || !ref.current || !width || !height)
20492
20440
  return;
@@ -20746,7 +20694,7 @@ const AnimatePresence = ({ children, custom, initial = true, onExitComplete, pre
20746
20694
  * all components have finished animating out.
20747
20695
  */
20748
20696
  const { forceRender } = useContext(LayoutGroupContext);
20749
- return (jsx$1(Fragment$1, { children: renderedChildren.map((child) => {
20697
+ return (jsx$1(Fragment, { children: renderedChildren.map((child) => {
20750
20698
  const key = getChildKey(child);
20751
20699
  const isPresent = propagate && !isParentPresent
20752
20700
  ? false
@@ -21107,7 +21055,7 @@ function useVisualElement(Component, visualState, props, createVisualElement, Pr
21107
21055
  createProjectionNode$1(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);
21108
21056
  }
21109
21057
  const isMounted = useRef(false);
21110
- useInsertionEffect$2(() => {
21058
+ useInsertionEffect$1(() => {
21111
21059
  /**
21112
21060
  * Check the component has already mounted before calling
21113
21061
  * `update` unnecessarily. This ensures we skip the initial update.
@@ -21638,7 +21586,7 @@ function createUseRender(forwardMotionProps = false) {
21638
21586
  : useHTMLProps;
21639
21587
  const visualProps = useVisualProps(props, latestValues, isStatic, Component);
21640
21588
  const filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps);
21641
- const elementProps = Component !== Fragment
21589
+ const elementProps = Component !== Fragment$1
21642
21590
  ? { ...filteredProps, ...visualProps, ref }
21643
21591
  : {};
21644
21592
  /**
@@ -26804,7 +26752,7 @@ const createDomVisualElement = (Component, options) => {
26804
26752
  return isSVGComponent(Component)
26805
26753
  ? new SVGVisualElement(options)
26806
26754
  : new HTMLVisualElement(options, {
26807
- allowProjection: Component !== Fragment,
26755
+ allowProjection: Component !== Fragment$1,
26808
26756
  });
26809
26757
  };
26810
26758
 
@@ -26822,10 +26770,12 @@ const Collapse = ({ isVisible, children }) => {
26822
26770
  const [contentHeight, setContentHeight] = useState(0);
26823
26771
  useEffect(() => {
26824
26772
  if (contentRef.current) {
26825
- setContentHeight(contentRef.current.scrollHeight);
26773
+ setTimeout(() => {
26774
+ setContentHeight((contentRef.current?.scrollHeight ?? 0) + 5);
26775
+ }, 0);
26826
26776
  }
26827
26777
  }, [children]);
26828
- return (React__default.createElement(AnimatePresence, { initial: false }, isVisible && (React__default.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' } },
26778
+ return (React__default.createElement(AnimatePresence, { initial: false }, isVisible && (React__default.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 } },
26829
26779
  React__default.createElement("div", { ref: contentRef }, children)))));
26830
26780
  };
26831
26781
 
@@ -26834,7 +26784,7 @@ function clamp(value, [min, max]) {
26834
26784
  return Math.min(max, Math.max(min, value));
26835
26785
  }
26836
26786
 
26837
- // packages/react/use-previous/src/use-previous.tsx
26787
+ // packages/react/use-previous/src/usePrevious.tsx
26838
26788
  function usePrevious(value) {
26839
26789
  const ref = React.useRef({ value, previous: value });
26840
26790
  return React.useMemo(() => {
@@ -27280,7 +27230,7 @@ var SliderThumbImpl = React.forwardRef(
27280
27230
  }
27281
27231
  ) }),
27282
27232
  isFormControl && /* @__PURE__ */ jsx$1(
27283
- SliderBubbleInput,
27233
+ BubbleInput,
27284
27234
  {
27285
27235
  name: name ?? (context.name ? context.name + (context.values.length > 1 ? "[]" : "") : void 0),
27286
27236
  form: context.form,
@@ -27294,36 +27244,23 @@ var SliderThumbImpl = React.forwardRef(
27294
27244
  }
27295
27245
  );
27296
27246
  SliderThumb.displayName = THUMB_NAME;
27297
- var BUBBLE_INPUT_NAME = "RadioBubbleInput";
27298
- var SliderBubbleInput = React.forwardRef(
27299
- ({ __scopeSlider, value, ...props }, forwardedRef) => {
27300
- const ref = React.useRef(null);
27301
- const composedRefs = useComposedRefs(ref, forwardedRef);
27302
- const prevValue = usePrevious(value);
27303
- React.useEffect(() => {
27304
- const input = ref.current;
27305
- if (!input) return;
27306
- const inputProto = window.HTMLInputElement.prototype;
27307
- const descriptor = Object.getOwnPropertyDescriptor(inputProto, "value");
27308
- const setValue = descriptor.set;
27309
- if (prevValue !== value && setValue) {
27310
- const event = new Event("input", { bubbles: true });
27311
- setValue.call(input, value);
27312
- input.dispatchEvent(event);
27313
- }
27314
- }, [prevValue, value]);
27315
- return /* @__PURE__ */ jsx$1(
27316
- Primitive.input,
27317
- {
27318
- style: { display: "none" },
27319
- ...props,
27320
- ref: composedRefs,
27321
- defaultValue: value
27322
- }
27323
- );
27324
- }
27325
- );
27326
- SliderBubbleInput.displayName = BUBBLE_INPUT_NAME;
27247
+ var BubbleInput = (props) => {
27248
+ const { value, ...inputProps } = props;
27249
+ const ref = React.useRef(null);
27250
+ const prevValue = usePrevious(value);
27251
+ React.useEffect(() => {
27252
+ const input = ref.current;
27253
+ const inputProto = window.HTMLInputElement.prototype;
27254
+ const descriptor = Object.getOwnPropertyDescriptor(inputProto, "value");
27255
+ const setValue = descriptor.set;
27256
+ if (prevValue !== value && setValue) {
27257
+ const event = new Event("input", { bubbles: true });
27258
+ setValue.call(input, value);
27259
+ input.dispatchEvent(event);
27260
+ }
27261
+ }, [prevValue, value]);
27262
+ return /* @__PURE__ */ jsx$1("input", { style: { display: "none" }, ...inputProps, ref, defaultValue: value });
27263
+ };
27327
27264
  function getNextSortedValues(prevValues = [], nextValue, atIndex) {
27328
27265
  const nextValues = [...prevValues];
27329
27266
  nextValues[atIndex] = nextValue;