tfy-web-components 0.0.43 → 0.0.45

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 (190) hide show
  1. package/dist/{Button-CPJYHldw.js → Button-HHEfL8b9.js} +5 -4
  2. package/dist/{Button-CPJYHldw.js.map → Button-HHEfL8b9.js.map} +1 -1
  3. package/dist/CSPContext-Cldo9QDp.js +13 -0
  4. package/dist/CSPContext-Cldo9QDp.js.map +1 -0
  5. package/dist/{CompositeItem-DJWNsIwE.js → CompositeItem-GNejxLcK.js} +3 -3
  6. package/dist/{CompositeItem-DJWNsIwE.js.map → CompositeItem-GNejxLcK.js.map} +1 -1
  7. package/dist/{CompositeRoot-BlljDWkR.js → CompositeRoot-7_u1HqDT.js} +9 -47
  8. package/dist/CompositeRoot-7_u1HqDT.js.map +1 -0
  9. package/dist/DropdownMenu-Crlf-J4E.js +3304 -0
  10. package/dist/DropdownMenu-Crlf-J4E.js.map +1 -0
  11. package/dist/{Input-Dcxu6SVO.js → Input-BS9fWUAf.js} +3 -3
  12. package/dist/{Input-Dcxu6SVO.js.map → Input-BS9fWUAf.js.map} +1 -1
  13. package/dist/{Modal-BUWlwJcN.js → Modal-DaHG8mjy.js} +10 -10
  14. package/dist/{Modal-BUWlwJcN.js.map → Modal-DaHG8mjy.js.map} +1 -1
  15. package/dist/Popover-A8IyEt2w.js +400 -0
  16. package/dist/Popover-A8IyEt2w.js.map +1 -0
  17. package/dist/{Popover-BqqXJnK1.js → PopoverPopup-teGm7D5T.js} +25 -498
  18. package/dist/PopoverPopup-teGm7D5T.js.map +1 -0
  19. package/dist/PrehydrationScript-B3u_PP2W.js +49 -0
  20. package/dist/PrehydrationScript-B3u_PP2W.js.map +1 -0
  21. package/dist/Select-BtX40h2K.js +2187 -0
  22. package/dist/Select-BtX40h2K.js.map +1 -0
  23. package/dist/{useValueAsRef-BfFRcMg6.js → addEventListener-D-i9O6BG.js} +8 -8
  24. package/dist/addEventListener-D-i9O6BG.js.map +1 -0
  25. package/dist/clamp-D7_nsB8C.js +30 -0
  26. package/dist/clamp-D7_nsB8C.js.map +1 -0
  27. package/dist/components/atoms/Accordion.es.js +9 -9
  28. package/dist/components/atoms/Avatar.es.js +9 -9
  29. package/dist/components/atoms/Avatar.es.js.map +1 -1
  30. package/dist/components/atoms/Badge.d.ts +5 -6
  31. package/dist/components/atoms/Badge.es.js +80 -43
  32. package/dist/components/atoms/Badge.es.js.map +1 -1
  33. package/dist/components/atoms/Button.d.ts +1 -1
  34. package/dist/components/atoms/Button.es.js +2 -2
  35. package/dist/components/atoms/ButtonGroup.es.js +1 -1
  36. package/dist/components/atoms/Combobox.d.ts +34 -0
  37. package/dist/components/atoms/Combobox.es.js +3252 -0
  38. package/dist/components/atoms/Combobox.es.js.map +1 -0
  39. package/dist/components/atoms/ContextMenu.d.ts +12 -0
  40. package/dist/components/atoms/ContextMenu.es.js +259 -0
  41. package/dist/components/atoms/ContextMenu.es.js.map +1 -0
  42. package/dist/components/atoms/DropdownMenu.d.ts +51 -0
  43. package/dist/components/atoms/DropdownMenu.es.js +31 -0
  44. package/dist/components/atoms/DropdownMenu.es.js.map +1 -0
  45. package/dist/components/atoms/IconButton.d.ts +1 -1
  46. package/dist/components/atoms/IconButton.es.js +3 -3
  47. package/dist/components/atoms/IconButton.es.js.map +1 -1
  48. package/dist/components/atoms/IconProvider.es.js +4 -1
  49. package/dist/components/atoms/IconProvider.es.js.map +1 -1
  50. package/dist/components/atoms/Modal.es.js +1 -1
  51. package/dist/components/atoms/OverflowButton.es.js +2 -2
  52. package/dist/components/atoms/PaginationDot.d.ts +14 -0
  53. package/dist/components/atoms/PaginationDot.es.js +58 -0
  54. package/dist/components/atoms/PaginationDot.es.js.map +1 -0
  55. package/dist/components/atoms/PaginationItem.d.ts +15 -0
  56. package/dist/components/atoms/PaginationItem.es.js +87 -0
  57. package/dist/components/atoms/PaginationItem.es.js.map +1 -0
  58. package/dist/components/atoms/Popover.d.ts +10 -0
  59. package/dist/components/atoms/Popover.es.js +50 -0
  60. package/dist/components/atoms/Popover.es.js.map +1 -0
  61. package/dist/components/atoms/Select.d.ts +63 -0
  62. package/dist/components/atoms/Select.es.js +23 -0
  63. package/dist/components/atoms/Select.es.js.map +1 -0
  64. package/dist/components/atoms/Switch.es.js +7 -6
  65. package/dist/components/atoms/Switch.es.js.map +1 -1
  66. package/dist/components/atoms/TabButton.d.ts +31 -6
  67. package/dist/components/atoms/TabButton.es.js +425 -55
  68. package/dist/components/atoms/TabButton.es.js.map +1 -1
  69. package/dist/components/atoms/Tag.d.ts +2 -2
  70. package/dist/components/atoms/Tag.es.js +66 -33
  71. package/dist/components/atoms/Tag.es.js.map +1 -1
  72. package/dist/components/atoms/Tooltip.es.js +1153 -19
  73. package/dist/components/atoms/Tooltip.es.js.map +1 -1
  74. package/dist/components/atoms/stories/OverlayThemePanels.d.ts +8 -0
  75. package/dist/components/molecules/Alert.es.js +3 -3
  76. package/dist/components/molecules/CopyField.es.js +2 -2
  77. package/dist/components/molecules/CustomDrawer.es.js +1 -1
  78. package/dist/components/molecules/Dialog.es.js +1 -1
  79. package/dist/components/molecules/ImagesPreview.es.js +2 -2
  80. package/dist/components/molecules/Input.es.js +2 -2
  81. package/dist/components/molecules/Markdown.es.js +1 -1
  82. package/dist/components/molecules/Pagination.d.ts +58 -0
  83. package/dist/components/molecules/Pagination.es.js +272 -0
  84. package/dist/components/molecules/Pagination.es.js.map +1 -0
  85. package/dist/components/molecules/SimpleCodeEditor.es.js +3 -3
  86. package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
  87. package/dist/components/molecules/TagGroup.d.ts +11 -0
  88. package/dist/components/molecules/TagGroup.es.js +59 -0
  89. package/dist/components/molecules/TagGroup.es.js.map +1 -0
  90. package/dist/components/molecules/ToggleButton.es.js +2 -2
  91. package/dist/components/molecules/TopBar.d.ts +47 -0
  92. package/dist/components/molecules/TopBar.es.js +164 -0
  93. package/dist/components/molecules/TopBar.es.js.map +1 -0
  94. package/dist/components/molecules/agent-chat/AssistantMessage.d.ts +3 -1
  95. package/dist/components/molecules/agent-chat.es.js +4 -3
  96. package/dist/components/molecules/agent-chat.es.js.map +1 -1
  97. package/dist/components/theme/colors.es.js +1 -0
  98. package/dist/components/theme/colors.es.js.map +1 -1
  99. package/dist/composite-DnShFmi7.js +551 -0
  100. package/dist/composite-DnShFmi7.js.map +1 -0
  101. package/dist/{composite-C22yiNy1.js → composite-IA--dSel.js} +2 -2
  102. package/dist/{composite-C22yiNy1.js.map → composite-IA--dSel.js.map} +1 -1
  103. package/dist/constants-BaUKmVF_.js +103 -0
  104. package/dist/constants-BaUKmVF_.js.map +1 -0
  105. package/dist/{index-C-2yrwZl.js → element-B1vbc-LG.js} +69 -111
  106. package/dist/element-B1vbc-LG.js.map +1 -0
  107. package/dist/error-nCTLdGUr.js +6 -0
  108. package/dist/{error-FX4R42W-.js.map → error-nCTLdGUr.js.map} +1 -1
  109. package/dist/index.d.ts +12 -2
  110. package/dist/index.es.js +65 -12
  111. package/dist/index.es.js.map +1 -1
  112. package/dist/{inertValue-IJM5NA30.js → inertValue-C1Ml1s55.js} +2 -2
  113. package/dist/{inertValue-IJM5NA30.js.map → inertValue-C1Ml1s55.js.map} +1 -1
  114. package/dist/isElementDisabled-lq1fKien.js +47 -0
  115. package/dist/isElementDisabled-lq1fKien.js.map +1 -0
  116. package/dist/new-components/atoms/Alert.d.ts +9 -1
  117. package/dist/new-components/atoms/Alert.es.js +38 -13
  118. package/dist/new-components/atoms/Alert.es.js.map +1 -1
  119. package/dist/new-components/atoms/Checkbox.es.js +8 -7
  120. package/dist/new-components/atoms/Checkbox.es.js.map +1 -1
  121. package/dist/new-components/atoms/EmptyState.d.ts +3 -0
  122. package/dist/new-components/atoms/EmptyState.es.js +9 -4
  123. package/dist/new-components/atoms/EmptyState.es.js.map +1 -1
  124. package/dist/new-components/atoms/Popover.es.js +3 -2
  125. package/dist/new-components/atoms/Popover.es.js.map +1 -1
  126. package/dist/new-components/atoms/Radio.es.js +13 -24
  127. package/dist/new-components/atoms/Radio.es.js.map +1 -1
  128. package/dist/new-components/atoms/SegmentedControl.es.js +7 -7
  129. package/dist/new-components/atoms/Slider.es.js +14 -88
  130. package/dist/new-components/atoms/Slider.es.js.map +1 -1
  131. package/dist/new-components/atoms/Toast.d.ts +8 -12
  132. package/dist/new-components/atoms/Toast.es.js +202 -145
  133. package/dist/new-components/atoms/Toast.es.js.map +1 -1
  134. package/dist/new-components/atoms/Toggletip.d.ts +1 -1
  135. package/dist/new-components/atoms/Toggletip.es.js +3 -2
  136. package/dist/new-components/atoms/Toggletip.es.js.map +1 -1
  137. package/dist/new-components/atoms/stories/ThemeComparison.d.ts +2 -1
  138. package/dist/serializeValue-BLvnTy3o.js +17 -0
  139. package/dist/serializeValue-BLvnTy3o.js.map +1 -0
  140. package/dist/stringifyLocale-DOx30wH1.js +13 -0
  141. package/dist/stringifyLocale-DOx30wH1.js.map +1 -0
  142. package/dist/style.css +1 -1
  143. package/dist/tokens.css +24 -6
  144. package/dist/{useAnimationFrame-DwhymJoW.js → useAnimationFrame-DqvuRtgK.js} +2 -2
  145. package/dist/{useAnimationFrame-DwhymJoW.js.map → useAnimationFrame-DqvuRtgK.js.map} +1 -1
  146. package/dist/{useAriaLabelledBy-Lyj6n_TU.js → useAriaLabelledBy-CP4wKTYs.js} +3 -3
  147. package/dist/{useAriaLabelledBy-Lyj6n_TU.js.map → useAriaLabelledBy-CP4wKTYs.js.map} +1 -1
  148. package/dist/{useBaseUiId-CmLtG9DS.js → useBaseUiId-CYT1vFMG.js} +64 -44
  149. package/dist/{useBaseUiId-CmLtG9DS.js.map → useBaseUiId-CYT1vFMG.js.map} +1 -1
  150. package/dist/{useButton-D2BMuSfC.js → useButton-BlHadUfM.js} +4 -4
  151. package/dist/{useButton-D2BMuSfC.js.map → useButton-BlHadUfM.js.map} +1 -1
  152. package/dist/{CompositeList-D4xmSZ5V.js → useCompositeListItem-DlAKWsHE.js} +59 -59
  153. package/dist/useCompositeListItem-DlAKWsHE.js.map +1 -0
  154. package/dist/{useControlled-BSyYkg5C.js → useControlled-DMDWXIzj.js} +2 -2
  155. package/dist/{useControlled-BSyYkg5C.js.map → useControlled-DMDWXIzj.js.map} +1 -1
  156. package/dist/useFocus-C__7iwl1.js +137 -0
  157. package/dist/useFocus-C__7iwl1.js.map +1 -0
  158. package/dist/{useIsoLayoutEffect-e9VA-ICd.js → useIsoLayoutEffect-D2lpsB9D.js} +8 -4
  159. package/dist/{useIsoLayoutEffect-e9VA-ICd.js.map → useIsoLayoutEffect-D2lpsB9D.js.map} +1 -1
  160. package/dist/{usePopupHandleStore-CkW2IoED.js → usePopupHandleStore-C_Vw7xcw.js} +1966 -2002
  161. package/dist/usePopupHandleStore-C_Vw7xcw.js.map +1 -0
  162. package/dist/{Tooltip-uQIVdskf.js → usePositioner-BmYVsMO_.js} +17 -1402
  163. package/dist/usePositioner-BmYVsMO_.js.map +1 -0
  164. package/dist/{useOpenInteractionType-CDFYOw2d.js → useScrollLock-By-42HSc.js} +74 -58
  165. package/dist/useScrollLock-By-42HSc.js.map +1 -0
  166. package/dist/{useLabelableId-CcIE3RU0.js → useSetFieldFocused-CcdG6FNp.js} +27 -35
  167. package/dist/useSetFieldFocused-CcdG6FNp.js.map +1 -0
  168. package/dist/{useTimeout-BXf1hDIL.js → useTimeout-D1vYJgq4.js} +3 -3
  169. package/dist/{useTimeout-BXf1hDIL.js.map → useTimeout-D1vYJgq4.js.map} +1 -1
  170. package/dist/{useTransitionStatus-C9gg_XJ-.js → useTransitionStatus-CHrs3i5F.js} +3 -3
  171. package/dist/{useTransitionStatus-C9gg_XJ-.js.map → useTransitionStatus-CHrs3i5F.js.map} +1 -1
  172. package/dist/useTriggerFocusGuards-CXAhW8P6.js +100 -0
  173. package/dist/useTriggerFocusGuards-CXAhW8P6.js.map +1 -0
  174. package/dist/useValueChanged-BnlOop8k.js +16 -0
  175. package/dist/useValueChanged-BnlOop8k.js.map +1 -0
  176. package/package.json +1 -1
  177. package/dist/CompositeList-D4xmSZ5V.js.map +0 -1
  178. package/dist/CompositeRoot-BlljDWkR.js.map +0 -1
  179. package/dist/Popover-BqqXJnK1.js.map +0 -1
  180. package/dist/Tooltip-uQIVdskf.js.map +0 -1
  181. package/dist/composite-BL4bbAWg.js +0 -66
  182. package/dist/composite-BL4bbAWg.js.map +0 -1
  183. package/dist/error-FX4R42W-.js +0 -6
  184. package/dist/index-C-2yrwZl.js.map +0 -1
  185. package/dist/shadowDom-BfewIqRj.js +0 -52
  186. package/dist/shadowDom-BfewIqRj.js.map +0 -1
  187. package/dist/useLabelableId-CcIE3RU0.js.map +0 -1
  188. package/dist/useOpenInteractionType-CDFYOw2d.js.map +0 -1
  189. package/dist/usePopupHandleStore-CkW2IoED.js.map +0 -1
  190. package/dist/useValueAsRef-BfFRcMg6.js.map +0 -1
package/dist/tokens.css CHANGED
@@ -47,11 +47,16 @@
47
47
  --status-background-pending-bold: #f59e0b;
48
48
  --status-background-neutral-bold: #3e5680;
49
49
  --status-background-success: #ecfdf5;
50
+ --status-background-success-subtle: #ecfdf5;
50
51
  --status-background-error: #fef2f2;
52
+ --status-background-error-subtle: #fef2f2;
51
53
  --status-background-info: #eff6ff;
54
+ --status-background-info-subtle: #eff6ff;
52
55
  --status-background-warning: #fefce8;
56
+ --status-background-warning-subtle: #fefce8;
53
57
  --status-background-pending: #fef3c7;
54
58
  --status-background-neutral: #f0f7ff;
59
+ --status-background-neutral-subtle: #f0f7ff;
55
60
  --skeleton-background-base: #f0f7ff;
56
61
  --avatar-background-fallback: #e8f2fe;
57
62
  --avatar-background-virtual: #52525b;
@@ -62,6 +67,7 @@
62
67
  --avatar-background-initials: #e0e7ff;
63
68
  --avatar-background-presence-away: #d97706;
64
69
  --avatar-background-presence-offline: #71717a;
70
+ --avatar-border-ring: #ffffff;
65
71
  --tree-background-leaf: #a5b4fc;
66
72
  --code-background-base: #f0f7ff;
67
73
  --code-background-header: #eef2ff;
@@ -123,7 +129,7 @@
123
129
  --status-icon-success: #10b981;
124
130
  --status-icon-error: #ef4444;
125
131
  --status-icon-warning: #eab308;
126
- --status-icon-warning-bold: #a16207;
132
+ --status-icon-warning-bold: #eab308;
127
133
  --status-icon-info: #3b82f6;
128
134
  --status-icon-pending: #f59e0b;
129
135
  --status-icon-neutral: #5e7baa;
@@ -394,11 +400,16 @@
394
400
  --status-background-pending-bold: #fbbf24;
395
401
  --status-background-neutral-bold: #a1a1aa;
396
402
  --status-background-success: #022c22;
403
+ --status-background-success-subtle: #10b9810d;
397
404
  --status-background-error: #450a0a;
405
+ --status-background-error-subtle: #ef44440d;
398
406
  --status-background-info: #172554;
399
- --status-background-warning: #713f12;
407
+ --status-background-info-subtle: #3b82f60d;
408
+ --status-background-warning: #422006;
409
+ --status-background-warning-subtle: #f59e0b0d;
400
410
  --status-background-pending: #78350f;
401
411
  --status-background-neutral: #27272a;
412
+ --status-background-neutral-subtle: #a1a1aa0d;
402
413
  --skeleton-background-base: #27272a;
403
414
  --avatar-background-fallback: #3f3f46;
404
415
  --avatar-background-virtual: #71717a;
@@ -409,6 +420,7 @@
409
420
  --avatar-background-initials: #312e81;
410
421
  --avatar-background-presence-away: #fbbf24;
411
422
  --avatar-background-presence-offline: #a1a1aa;
423
+ --avatar-border-ring: #3f3f46;
412
424
  --tree-background-leaf: #4338ca;
413
425
  --code-background-base: #1f1f22;
414
426
  --code-background-header: #27272a;
@@ -470,7 +482,7 @@
470
482
  --status-icon-success: #34d399;
471
483
  --status-icon-error: #f87171;
472
484
  --status-icon-warning: #facc15;
473
- --status-icon-warning-bold: #a16207;
485
+ --status-icon-warning-bold: #facc15;
474
486
  --status-icon-info: #60a5fa;
475
487
  --status-icon-pending: #fbbf24;
476
488
  --status-icon-neutral: #a1a1aa;
@@ -497,13 +509,13 @@
497
509
  --border-brand: #494950;
498
510
  --border-brand-bold: #fdfdfd;
499
511
  --tree-border-connector: #3f3f46;
500
- --status-border-success: #065f46;
512
+ --status-border-success: #047857;
501
513
  --status-border-success-bold: #6ee7b7;
502
514
  --status-border-error: #991b1b;
503
515
  --status-border-error-bold: #fca5a5;
504
- --status-border-info: #1e3a8a;
516
+ --status-border-info: #1e40af;
505
517
  --status-border-info-bold: #93c5fd;
506
- --status-border-warning: #854d0e;
518
+ --status-border-warning: #a16207;
507
519
  --status-border-warning-bold: #fde047;
508
520
  --status-border-pending: #92400e;
509
521
  --status-border-pending-bold: #fcd34d;
@@ -651,11 +663,16 @@
651
663
  --color-status-background-pending-bold: var(--status-background-pending-bold);
652
664
  --color-status-background-neutral-bold: var(--status-background-neutral-bold);
653
665
  --color-status-background-success: var(--status-background-success);
666
+ --color-status-background-success-subtle: var(--status-background-success-subtle);
654
667
  --color-status-background-error: var(--status-background-error);
668
+ --color-status-background-error-subtle: var(--status-background-error-subtle);
655
669
  --color-status-background-info: var(--status-background-info);
670
+ --color-status-background-info-subtle: var(--status-background-info-subtle);
656
671
  --color-status-background-warning: var(--status-background-warning);
672
+ --color-status-background-warning-subtle: var(--status-background-warning-subtle);
657
673
  --color-status-background-pending: var(--status-background-pending);
658
674
  --color-status-background-neutral: var(--status-background-neutral);
675
+ --color-status-background-neutral-subtle: var(--status-background-neutral-subtle);
659
676
  --color-skeleton-background-base: var(--skeleton-background-base);
660
677
  --color-avatar-background-fallback: var(--avatar-background-fallback);
661
678
  --color-avatar-background-virtual: var(--avatar-background-virtual);
@@ -666,6 +683,7 @@
666
683
  --color-avatar-background-initials: var(--avatar-background-initials);
667
684
  --color-avatar-background-presence-away: var(--avatar-background-presence-away);
668
685
  --color-avatar-background-presence-offline: var(--avatar-background-presence-offline);
686
+ --color-avatar-border-ring: var(--avatar-border-ring);
669
687
  --color-tree-background-leaf: var(--tree-background-leaf);
670
688
  --color-code-background-base: var(--code-background-base);
671
689
  --color-code-background-header: var(--code-background-header);
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { E as EMPTY_ARRAY, e as useRefWithInit } from "./useIsoLayoutEffect-e9VA-ICd.js";
4
+ import { E as EMPTY_ARRAY, e as useRefWithInit } from "./useIsoLayoutEffect-D2lpsB9D.js";
5
5
  import * as React from "react";
6
6
  function useOnMount(fn) {
7
7
  React.useEffect(fn, EMPTY_ARRAY);
@@ -105,4 +105,4 @@ export {
105
105
  useOnMount as a,
106
106
  useAnimationFrame as u
107
107
  };
108
- //# sourceMappingURL=useAnimationFrame-DwhymJoW.js.map
108
+ //# sourceMappingURL=useAnimationFrame-DqvuRtgK.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAnimationFrame-DwhymJoW.js","sources":["../node_modules/@base-ui/utils/useOnMount.mjs","../node_modules/@base-ui/utils/useAnimationFrame.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { EMPTY_ARRAY } from \"./empty.mjs\";\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY_ARRAY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.mjs\";\nimport { useOnMount } from \"./useOnMount.mjs\";\n/** Unlike `setTimeout`, rAF doesn't guarantee a positive integer return value, so we can't have\n * a monomorphic `uint` type with `0` meaning empty.\n * See warning note at:\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame#return_value */\nconst EMPTY = null;\nlet LAST_RAF = globalThis.requestAnimationFrame;\nclass Scheduler {\n /* This implementation uses an array as a backing data-structure for frame callbacks.\n * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it\n * never calls the native `cancelAnimationFrame` if there are no frames left. This can\n * be much more efficient if there is a call pattern that alterns as\n * \"request-cancel-request-cancel-…\".\n * But in the case of \"request-request-…-cancel-cancel-…\", it leaves the final animation\n * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */\n\n callbacks = [];\n callbacksCount = 0;\n nextId = 1;\n startId = 1;\n isScheduled = false;\n tick = timestamp => {\n this.isScheduled = false;\n const currentCallbacks = this.callbacks;\n const currentCallbacksCount = this.callbacksCount;\n\n // Update these before iterating, callbacks could call `requestAnimationFrame` again.\n this.callbacks = [];\n this.callbacksCount = 0;\n this.startId = this.nextId;\n if (currentCallbacksCount > 0) {\n for (let i = 0; i < currentCallbacks.length; i += 1) {\n currentCallbacks[i]?.(timestamp);\n }\n }\n };\n request(fn) {\n const id = this.nextId;\n this.nextId += 1;\n this.callbacks.push(fn);\n this.callbacksCount += 1;\n\n /* In a test environment with fake timers, a fake `requestAnimationFrame` can be called\n * but there's no guarantee that the animation frame will actually run before the fake\n * timers are teared, which leaves `isScheduled` set, but won't run our `tick()`. */\n const didRAFChange = process.env.NODE_ENV !== 'production' && LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);\n if (!this.isScheduled || didRAFChange) {\n requestAnimationFrame(this.tick);\n this.isScheduled = true;\n }\n return id;\n }\n cancel(id) {\n const index = id - this.startId;\n if (index < 0 || index >= this.callbacks.length) {\n return;\n }\n if (this.callbacks[index] === null) {\n return;\n }\n this.callbacks[index] = null;\n this.callbacksCount -= 1;\n }\n}\nlet scheduler = new Scheduler();\n\n/**\n * Replaces the shared scheduler and drops all pending animation frame callbacks.\n *\n * For test environments only. The scheduler is process-global, so a callback scheduled in one test\n * but never run (e.g. requested under fake timers that were torn down before the frame fired) would\n * otherwise survive into a later test and run there against stale state. Call between tests to drop\n * such leftovers.\n */\nexport function resetAnimationFrameScheduler() {\n const previous = scheduler;\n scheduler = new Scheduler();\n // Continue the id sequence so `cancel()` calls from `AnimationFrame` instances created before the\n // reset cannot cancel callbacks scheduled after it.\n scheduler.nextId = previous.nextId;\n scheduler.startId = previous.nextId;\n // A frame requested before the reset may still be pending and holds the previous scheduler's\n // `tick`; empty its queue in place so that frame runs nothing when it eventually fires.\n previous.callbacks = [];\n previous.callbacksCount = 0;\n}\nexport class AnimationFrame {\n static create() {\n return new AnimationFrame();\n }\n static request(fn) {\n return scheduler.request(fn);\n }\n static cancel(id) {\n return scheduler.cancel(id);\n }\n currentId = EMPTY;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n request(fn) {\n this.cancel();\n this.currentId = scheduler.request(() => {\n this.currentId = EMPTY;\n fn();\n });\n }\n cancel = () => {\n if (this.currentId !== EMPTY) {\n scheduler.cancel(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.cancel;\n };\n}\n\n/**\n * A `requestAnimationFrame` with automatic cleanup and guard.\n */\nexport function useAnimationFrame() {\n const timeout = useRefWithInit(AnimationFrame.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}"],"names":[],"mappings":";;;;;AAQO,SAAS,WAAW,IAAI;AAG7B,QAAM,UAAU,IAAI,WAAW;AAEjC;ACLA,MAAM,QAAQ;AACd,IAAI,WAAW,WAAW;AAC1B,MAAM,UAAU;AAAA,EAAhB;AASE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qCAAY,CAAA;AACZ,0CAAiB;AACjB,kCAAS;AACT,mCAAU;AACV,uCAAc;AACd,gCAAO,eAAa;;AAClB,WAAK,cAAc;AACnB,YAAM,mBAAmB,KAAK;AAC9B,YAAM,wBAAwB,KAAK;AAGnC,WAAK,YAAY,CAAA;AACjB,WAAK,iBAAiB;AACtB,WAAK,UAAU,KAAK;AACpB,UAAI,wBAAwB,GAAG;AAC7B,iBAAS,IAAI,GAAG,IAAI,iBAAiB,QAAQ,KAAK,GAAG;AACnD,iCAAiB,OAAjB,0CAAsB;AAAA,QACxB;AAAA,MACF;AAAA,IACF;AAAA;AAAA,EACA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aAAW,QAAQ,aAAa;AAChC,SAAO;AACT;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"useAnimationFrame-DqvuRtgK.js","sources":["../node_modules/@base-ui/utils/useOnMount.mjs","../node_modules/@base-ui/utils/useAnimationFrame.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { EMPTY_ARRAY } from \"./empty.mjs\";\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY_ARRAY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.mjs\";\nimport { useOnMount } from \"./useOnMount.mjs\";\n/** Unlike `setTimeout`, rAF doesn't guarantee a positive integer return value, so we can't have\n * a monomorphic `uint` type with `0` meaning empty.\n * See warning note at:\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame#return_value */\nconst EMPTY = null;\nlet LAST_RAF = globalThis.requestAnimationFrame;\nclass Scheduler {\n /* This implementation uses an array as a backing data-structure for frame callbacks.\n * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it\n * never calls the native `cancelAnimationFrame` if there are no frames left. This can\n * be much more efficient if there is a call pattern that alterns as\n * \"request-cancel-request-cancel-…\".\n * But in the case of \"request-request-…-cancel-cancel-…\", it leaves the final animation\n * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */\n\n callbacks = [];\n callbacksCount = 0;\n nextId = 1;\n startId = 1;\n isScheduled = false;\n tick = timestamp => {\n this.isScheduled = false;\n const currentCallbacks = this.callbacks;\n const currentCallbacksCount = this.callbacksCount;\n\n // Update these before iterating, callbacks could call `requestAnimationFrame` again.\n this.callbacks = [];\n this.callbacksCount = 0;\n this.startId = this.nextId;\n if (currentCallbacksCount > 0) {\n for (let i = 0; i < currentCallbacks.length; i += 1) {\n currentCallbacks[i]?.(timestamp);\n }\n }\n };\n request(fn) {\n const id = this.nextId;\n this.nextId += 1;\n this.callbacks.push(fn);\n this.callbacksCount += 1;\n\n /* In a test environment with fake timers, a fake `requestAnimationFrame` can be called\n * but there's no guarantee that the animation frame will actually run before the fake\n * timers are teared, which leaves `isScheduled` set, but won't run our `tick()`. */\n const didRAFChange = process.env.NODE_ENV !== 'production' && LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);\n if (!this.isScheduled || didRAFChange) {\n requestAnimationFrame(this.tick);\n this.isScheduled = true;\n }\n return id;\n }\n cancel(id) {\n const index = id - this.startId;\n if (index < 0 || index >= this.callbacks.length) {\n return;\n }\n if (this.callbacks[index] === null) {\n return;\n }\n this.callbacks[index] = null;\n this.callbacksCount -= 1;\n }\n}\nlet scheduler = new Scheduler();\n\n/**\n * Replaces the shared scheduler and drops all pending animation frame callbacks.\n *\n * For test environments only. The scheduler is process-global, so a callback scheduled in one test\n * but never run (e.g. requested under fake timers that were torn down before the frame fired) would\n * otherwise survive into a later test and run there against stale state. Call between tests to drop\n * such leftovers.\n */\nexport function resetAnimationFrameScheduler() {\n const previous = scheduler;\n scheduler = new Scheduler();\n // Continue the id sequence so `cancel()` calls from `AnimationFrame` instances created before the\n // reset cannot cancel callbacks scheduled after it.\n scheduler.nextId = previous.nextId;\n scheduler.startId = previous.nextId;\n // A frame requested before the reset may still be pending and holds the previous scheduler's\n // `tick`; empty its queue in place so that frame runs nothing when it eventually fires.\n previous.callbacks = [];\n previous.callbacksCount = 0;\n}\nexport class AnimationFrame {\n static create() {\n return new AnimationFrame();\n }\n static request(fn) {\n return scheduler.request(fn);\n }\n static cancel(id) {\n return scheduler.cancel(id);\n }\n currentId = EMPTY;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n request(fn) {\n this.cancel();\n this.currentId = scheduler.request(() => {\n this.currentId = EMPTY;\n fn();\n });\n }\n cancel = () => {\n if (this.currentId !== EMPTY) {\n scheduler.cancel(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.cancel;\n };\n}\n\n/**\n * A `requestAnimationFrame` with automatic cleanup and guard.\n */\nexport function useAnimationFrame() {\n const timeout = useRefWithInit(AnimationFrame.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}"],"names":[],"mappings":";;;;;AAQO,SAAS,WAAW,IAAI;AAG7B,QAAM,UAAU,IAAI,WAAW;AAEjC;ACLA,MAAM,QAAQ;AACd,IAAI,WAAW,WAAW;AAC1B,MAAM,UAAU;AAAA,EAAhB;AASE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qCAAY,CAAA;AACZ,0CAAiB;AACjB,kCAAS;AACT,mCAAU;AACV,uCAAc;AACd,gCAAO,eAAa;;AAClB,WAAK,cAAc;AACnB,YAAM,mBAAmB,KAAK;AAC9B,YAAM,wBAAwB,KAAK;AAGnC,WAAK,YAAY,CAAA;AACjB,WAAK,iBAAiB;AACtB,WAAK,UAAU,KAAK;AACpB,UAAI,wBAAwB,GAAG;AAC7B,iBAAS,IAAI,GAAG,IAAI,iBAAiB,QAAQ,KAAK,GAAG;AACnD,iCAAiB,OAAjB,0CAAsB;AAAA,QACxB;AAAA,MACF;AAAA,IACF;AAAA;AAAA,EACA,QAAQ,IAAI;AACV,UAAM,KAAK,KAAK;AAChB,SAAK,UAAU;AACf,SAAK,UAAU,KAAK,EAAE;AACtB,SAAK,kBAAkB;AAKvB,UAAM,eAAe,QAAQ,IAAI,aAAa,gBAAgB,aAAa,0BAA0B,WAAW,uBAAuB;AACvI,QAAI,CAAC,KAAK,eAAe,cAAc;AACrC,4BAAsB,KAAK,IAAI;AAC/B,WAAK,cAAc;AAAA,IACrB;AACA,WAAO;AAAA,EACT;AAAA,EACA,OAAO,IAAI;AACT,UAAM,QAAQ,KAAK,KAAK;AACxB,QAAI,QAAQ,KAAK,SAAS,KAAK,UAAU,QAAQ;AAC/C;AAAA,IACF;AACA,QAAI,KAAK,UAAU,KAAK,MAAM,MAAM;AAClC;AAAA,IACF;AACA,SAAK,UAAU,KAAK,IAAI;AACxB,SAAK,kBAAkB;AAAA,EACzB;AACF;AACA,IAAI,YAAY,IAAI,UAAS;AAsBtB,MAAM,eAAe;AAAA,EAArB;AAUL,qCAAY;AAYZ,kCAAS,MAAM;AACb,UAAI,KAAK,cAAc,OAAO;AAC5B,kBAAU,OAAO,KAAK,SAAS;AAC/B,aAAK,YAAY;AAAA,MACnB;AAAA,IACF;AACA,yCAAgB,MAAM;AACpB,aAAO,KAAK;AAAA,IACd;AAAA;AAAA,EA7BA,OAAO,SAAS;AACd,WAAO,IAAI,eAAc;AAAA,EAC3B;AAAA,EACA,OAAO,QAAQ,IAAI;AACjB,WAAO,UAAU,QAAQ,EAAE;AAAA,EAC7B;AAAA,EACA,OAAO,OAAO,IAAI;AAChB,WAAO,UAAU,OAAO,EAAE;AAAA,EAC5B;AAAA;AAAA;AAAA;AAAA,EAMA,QAAQ,IAAI;AACV,SAAK,OAAM;AACX,SAAK,YAAY,UAAU,QAAQ,MAAM;AACvC,WAAK,YAAY;AACjB,SAAE;AAAA,IACJ,CAAC;AAAA,EACH;AAUF;AAKO,SAAS,oBAAoB;AAClC,QAAM,UAAU,eAAe,eAAe,MAAM,EAAE;AACtD,aAAW,QAAQ,aAAa;AAChC,SAAO;AACT;","x_google_ignoreList":[0,1]}
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import { u as useIsoLayoutEffect } from "./useIsoLayoutEffect-e9VA-ICd.js";
3
- import { u as useBaseUiId } from "./useBaseUiId-CmLtG9DS.js";
2
+ import { u as useIsoLayoutEffect } from "./useIsoLayoutEffect-D2lpsB9D.js";
3
+ import { u as useBaseUiId } from "./useBaseUiId-CYT1vFMG.js";
4
4
  function useAriaLabelledBy(explicitAriaLabelledBy, labelId, labelSourceRef, enableFallback = true, labelSourceId, ariaLabel) {
5
5
  const [fallbackAriaLabelledBy, setFallbackAriaLabelledBy] = React.useState();
6
6
  const generatedLabelId = useBaseUiId(labelSourceId ? `${labelSourceId}-label` : void 0);
@@ -46,4 +46,4 @@ function findAssociatedLabel(labelSource) {
46
46
  export {
47
47
  useAriaLabelledBy as u
48
48
  };
49
- //# sourceMappingURL=useAriaLabelledBy-Lyj6n_TU.js.map
49
+ //# sourceMappingURL=useAriaLabelledBy-CP4wKTYs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAriaLabelledBy-Lyj6n_TU.js","sources":["../node_modules/@base-ui/react/internals/labelable-provider/useAriaLabelledBy.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../useBaseUiId.mjs\";\nexport function useAriaLabelledBy(explicitAriaLabelledBy, labelId, labelSourceRef, enableFallback = true, labelSourceId, ariaLabel) {\n const [fallbackAriaLabelledBy, setFallbackAriaLabelledBy] = React.useState();\n const generatedLabelId = useBaseUiId(labelSourceId ? `${labelSourceId}-label` : undefined);\n // A non-blank `aria-label` wins over any associated label, as it does on native inputs.\n const hasAriaLabel = Boolean(ariaLabel?.trim());\n const implicitLabelId = hasAriaLabel ? undefined : labelId;\n const ariaLabelledBy = explicitAriaLabelledBy ?? implicitLabelId ?? fallbackAriaLabelledBy;\n\n // Fallback for <span> controls labelled by wrapping/sibling native <label>.\n // Run after every commit so DOM association changes (e.g. label mount/unmount)\n // are reflected even when props/state deps are unchanged.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useIsoLayoutEffect(() => {\n const nextAriaLabelledBy = explicitAriaLabelledBy || labelId || hasAriaLabel || !enableFallback ? undefined : getAriaLabelledBy(labelSourceRef.current, generatedLabelId);\n if (fallbackAriaLabelledBy !== nextAriaLabelledBy) {\n setFallbackAriaLabelledBy(nextAriaLabelledBy);\n }\n });\n return ariaLabelledBy;\n}\nfunction getAriaLabelledBy(labelSource, generatedLabelId) {\n const label = findAssociatedLabel(labelSource);\n if (!label) {\n return undefined;\n }\n if (!label.id && generatedLabelId) {\n label.id = generatedLabelId;\n }\n return label.id || undefined;\n}\nfunction findAssociatedLabel(labelSource) {\n if (!labelSource) {\n return undefined;\n }\n\n // Fast path before the expensive `.labels` read.\n const parent = labelSource.parentElement;\n if (parent && parent.tagName === 'LABEL') {\n return parent;\n }\n const controlId = labelSource.id;\n if (controlId) {\n const nextSibling = labelSource.nextElementSibling;\n if (nextSibling && nextSibling.htmlFor === controlId) {\n return nextSibling;\n }\n }\n const labels = labelSource.labels;\n return labels && labels[0];\n}"],"names":[],"mappings":";;;AAKO,SAAS,kBAAkB,wBAAwB,SAAS,gBAAgB,iBAAiB,MAAM,eAAe,WAAW;AAClI,QAAM,CAAC,wBAAwB,yBAAyB,IAAI,MAAM,SAAQ;AAC1E,QAAM,mBAAmB,YAAY,gBAAgB,GAAG,aAAa,WAAW,MAAS;AAEzF,QAAM,eAAe,QAAQ,uCAAW,MAAM;AAC9C,QAAM,kBAAkB,eAAe,SAAY;AACnD,QAAM,iBAAiB,0BAA0B,mBAAmB;AAMpE,qBAAmB,MAAM;AACvB,UAAM,qBAAqB,0BAA0B,WAAW,gBAAgB,CAAC,iBAAiB,SAAY,kBAAkB,eAAe,SAAS,gBAAgB;AACxK,QAAI,2BAA2B,oBAAoB;AACjD,gCAA0B,kBAAkB;AAAA,IAC9C;AAAA,EACF,CAAC;AACD,SAAO;AACT;AACA,SAAS,kBAAkB,aAAa,kBAAkB;AACxD,QAAM,QAAQ,oBAAoB,WAAW;AAC7C,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AACA,MAAI,CAAC,MAAM,MAAM,kBAAkB;AACjC,UAAM,KAAK;AAAA,EACb;AACA,SAAO,MAAM,MAAM;AACrB;AACA,SAAS,oBAAoB,aAAa;AACxC,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AAGA,QAAM,SAAS,YAAY;AAC3B,MAAI,UAAU,OAAO,YAAY,SAAS;AACxC,WAAO;AAAA,EACT;AACA,QAAM,YAAY,YAAY;AAC9B,MAAI,WAAW;AACb,UAAM,cAAc,YAAY;AAChC,QAAI,eAAe,YAAY,YAAY,WAAW;AACpD,aAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,SAAS,YAAY;AAC3B,SAAO,UAAU,OAAO,CAAC;AAC3B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useAriaLabelledBy-CP4wKTYs.js","sources":["../node_modules/@base-ui/react/internals/labelable-provider/useAriaLabelledBy.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../useBaseUiId.mjs\";\nexport function useAriaLabelledBy(explicitAriaLabelledBy, labelId, labelSourceRef, enableFallback = true, labelSourceId, ariaLabel) {\n const [fallbackAriaLabelledBy, setFallbackAriaLabelledBy] = React.useState();\n const generatedLabelId = useBaseUiId(labelSourceId ? `${labelSourceId}-label` : undefined);\n // A non-blank `aria-label` wins over any associated label, as it does on native inputs.\n const hasAriaLabel = Boolean(ariaLabel?.trim());\n const implicitLabelId = hasAriaLabel ? undefined : labelId;\n const ariaLabelledBy = explicitAriaLabelledBy ?? implicitLabelId ?? fallbackAriaLabelledBy;\n\n // Fallback for <span> controls labelled by wrapping/sibling native <label>.\n // Run after every commit so DOM association changes (e.g. label mount/unmount)\n // are reflected even when props/state deps are unchanged.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useIsoLayoutEffect(() => {\n const nextAriaLabelledBy = explicitAriaLabelledBy || labelId || hasAriaLabel || !enableFallback ? undefined : getAriaLabelledBy(labelSourceRef.current, generatedLabelId);\n if (fallbackAriaLabelledBy !== nextAriaLabelledBy) {\n setFallbackAriaLabelledBy(nextAriaLabelledBy);\n }\n });\n return ariaLabelledBy;\n}\nfunction getAriaLabelledBy(labelSource, generatedLabelId) {\n const label = findAssociatedLabel(labelSource);\n if (!label) {\n return undefined;\n }\n if (!label.id && generatedLabelId) {\n label.id = generatedLabelId;\n }\n return label.id || undefined;\n}\nfunction findAssociatedLabel(labelSource) {\n if (!labelSource) {\n return undefined;\n }\n\n // Fast path before the expensive `.labels` read.\n const parent = labelSource.parentElement;\n if (parent && parent.tagName === 'LABEL') {\n return parent;\n }\n const controlId = labelSource.id;\n if (controlId) {\n const nextSibling = labelSource.nextElementSibling;\n if (nextSibling && nextSibling.htmlFor === controlId) {\n return nextSibling;\n }\n }\n const labels = labelSource.labels;\n return labels && labels[0];\n}"],"names":[],"mappings":";;;AAKO,SAAS,kBAAkB,wBAAwB,SAAS,gBAAgB,iBAAiB,MAAM,eAAe,WAAW;AAClI,QAAM,CAAC,wBAAwB,yBAAyB,IAAI,MAAM,SAAQ;AAC1E,QAAM,mBAAmB,YAAY,gBAAgB,GAAG,aAAa,WAAW,MAAS;AAEzF,QAAM,eAAe,QAAQ,uCAAW,MAAM;AAC9C,QAAM,kBAAkB,eAAe,SAAY;AACnD,QAAM,iBAAiB,0BAA0B,mBAAmB;AAMpE,qBAAmB,MAAM;AACvB,UAAM,qBAAqB,0BAA0B,WAAW,gBAAgB,CAAC,iBAAiB,SAAY,kBAAkB,eAAe,SAAS,gBAAgB;AACxK,QAAI,2BAA2B,oBAAoB;AACjD,gCAA0B,kBAAkB;AAAA,IAC9C;AAAA,EACF,CAAC;AACD,SAAO;AACT;AACA,SAAS,kBAAkB,aAAa,kBAAkB;AACxD,QAAM,QAAQ,oBAAoB,WAAW;AAC7C,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AACA,MAAI,CAAC,MAAM,MAAM,kBAAkB;AACjC,UAAM,KAAK;AAAA,EACb;AACA,SAAO,MAAM,MAAM;AACrB;AACA,SAAS,oBAAoB,aAAa;AACxC,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AAGA,QAAM,SAAS,YAAY;AAC3B,MAAI,UAAU,OAAO,YAAY,SAAS;AACxC,WAAO;AAAA,EACT;AACA,QAAM,YAAY,YAAY;AAC9B,MAAI,WAAW;AACb,UAAM,cAAc,YAAY;AAChC,QAAI,eAAe,YAAY,YAAY,WAAW;AACpD,aAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,SAAS,YAAY;AAC3B,SAAO,UAAU,OAAO,CAAC;AAC3B;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { d as EMPTY_OBJECT, S as SafeReact } from "./useIsoLayoutEffect-e9VA-ICd.js";
1
+ import { d as EMPTY_OBJECT, S as SafeReact } from "./useIsoLayoutEffect-D2lpsB9D.js";
2
2
  import * as React from "react";
3
3
  function hasWindow() {
4
4
  return typeof window !== "undefined";
@@ -154,6 +154,12 @@ function getOverflowAncestors(node, list, traverseIframes) {
154
154
  function getFrameElement(win) {
155
155
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
156
156
  }
157
+ function useForcedRerendering() {
158
+ const [, setState] = React.useState({});
159
+ return React.useCallback(() => {
160
+ setState({});
161
+ }, []);
162
+ }
157
163
  function createChangeEventDetails(reason, event, trigger, customProperties) {
158
164
  let canceled = false;
159
165
  let allowPropagation = false;
@@ -179,7 +185,7 @@ function createChangeEventDetails(reason, event, trigger, customProperties) {
179
185
  return details;
180
186
  }
181
187
  function createGenericEventDetails(reason, event, customProperties) {
182
- const custom = EMPTY_OBJECT;
188
+ const custom = customProperties ?? EMPTY_OBJECT;
183
189
  const details = {
184
190
  reason,
185
191
  event: event ?? new Event("base-ui"),
@@ -192,23 +198,27 @@ const triggerPress = "trigger-press";
192
198
  const triggerHover = "trigger-hover";
193
199
  const triggerFocus = "trigger-focus";
194
200
  const outsidePress = "outside-press";
201
+ const itemPress = "item-press";
195
202
  const closePress = "close-press";
203
+ const clearPress = "clear-press";
204
+ const chipRemovePress = "chip-remove-press";
196
205
  const trackPress = "track-press";
197
206
  const inputChange = "input-change";
207
+ const inputClear = "input-clear";
208
+ const inputPress = "input-press";
198
209
  const focusOut = "focus-out";
199
210
  const escapeKey = "escape-key";
211
+ const listNavigation = "list-navigation";
200
212
  const keyboard = "keyboard";
213
+ const pointer = "pointer";
201
214
  const drag = "drag";
215
+ const cancelOpen = "cancel-open";
216
+ const siblingOpen = "sibling-open";
202
217
  const disabled = "disabled";
203
218
  const missing = "missing";
204
219
  const initial = "initial";
205
220
  const imperativeAction = "imperative-action";
206
- function useForcedRerendering() {
207
- const [, setState] = React.useState({});
208
- return React.useCallback(() => {
209
- setState({});
210
- }, []);
211
- }
221
+ const windowResize = "window-resize";
212
222
  let globalId = 0;
213
223
  function useGlobalId(idOverride, prefix = "mui") {
214
224
  const defaultId = React.useRef(void 0);
@@ -237,45 +247,55 @@ function useBaseUiId(idOverride) {
237
247
  return useId(idOverride, "base-ui");
238
248
  }
239
249
  export {
240
- getParentNode as A,
241
- outsidePress as B,
242
- useForcedRerendering as C,
243
- triggerFocus as D,
244
- isOverflowElement as E,
245
- getOverflowAncestors as F,
246
- getDocumentElement as G,
247
- isTopLayer as H,
248
- isTableElement as I,
249
- isContainingBlock as J,
250
- getContainingBlock as K,
251
- getNodeScroll as L,
252
- isWebKit as M,
253
- getFrameElement as N,
254
- closePress as a,
255
- triggerPress as b,
250
+ isElement as A,
251
+ listNavigation as B,
252
+ keyboard as C,
253
+ chipRemovePress as D,
254
+ clearPress as E,
255
+ windowResize as F,
256
+ pointer as G,
257
+ siblingOpen as H,
258
+ triggerHover as I,
259
+ triggerFocus as J,
260
+ drag as K,
261
+ trackPress as L,
262
+ getNodeName as M,
263
+ isShadowRoot as N,
264
+ isNode as O,
265
+ getDocumentElement as P,
266
+ isTopLayer as Q,
267
+ isTableElement as R,
268
+ isContainingBlock as S,
269
+ getContainingBlock as T,
270
+ isOverflowElement as U,
271
+ getNodeScroll as V,
272
+ isWebKit as W,
273
+ getFrameElement as X,
274
+ initial as a,
275
+ getWindow as b,
256
276
  createChangeEventDetails as c,
257
277
  disabled as d,
258
- escapeKey as e,
259
- focusOut as f,
260
- getWindow as g,
261
- imperativeAction as h,
262
- initial as i,
263
- isHTMLElement as j,
264
- createGenericEventDetails as k,
265
- keyboard as l,
278
+ useForcedRerendering as e,
279
+ getParentNode as f,
280
+ getComputedStyle as g,
281
+ isLastTraversableNode as h,
282
+ isHTMLElement as i,
283
+ useId as j,
284
+ cancelOpen as k,
285
+ createGenericEventDetails as l,
266
286
  missing as m,
267
287
  none as n,
268
- inputChange as o,
269
- isElement as p,
270
- drag as q,
271
- trackPress as r,
272
- getNodeName as s,
273
- triggerHover as t,
288
+ inputClear as o,
289
+ inputChange as p,
290
+ getOverflowAncestors as q,
291
+ escapeKey as r,
292
+ focusOut as s,
293
+ triggerPress as t,
274
294
  useBaseUiId as u,
275
- isShadowRoot as v,
276
- getComputedStyle as w,
277
- useId as x,
278
- isNode as y,
279
- isLastTraversableNode as z
295
+ outsidePress as v,
296
+ itemPress as w,
297
+ inputPress as x,
298
+ imperativeAction as y,
299
+ closePress as z
280
300
  };
281
- //# sourceMappingURL=useBaseUiId-CmLtG9DS.js.map
301
+ //# sourceMappingURL=useBaseUiId-CYT1vFMG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useBaseUiId-CmLtG9DS.js","sources":["../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs","../node_modules/@base-ui/react/internals/reason-parts.mjs","../node_modules/@base-ui/utils/useForcedRerendering.mjs","../node_modules/@base-ui/utils/useId.mjs","../node_modules/@base-ui/react/internals/useBaseUiId.mjs"],"sourcesContent":["function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return (node.ownerDocument || node).body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { EMPTY_OBJECT } from '@base-ui/utils/empty';\n\n/**\n * Maps a change `reason` string to the corresponding native event type.\n */\n\n/**\n * Details of custom change events emitted by Base UI components.\n */\n\n/**\n * Details of custom generic events emitted by Base UI components.\n */\n\n/** Highlight navigation uses mouse events for hover and pointer events for leaving an item. */\n\n/**\n * Creates a Base UI event details object with the given reason and utilities\n * for preventing Base UI's internal event handling.\n */\nexport function createChangeEventDetails(reason, event, trigger, customProperties) {\n let canceled = false;\n let allowPropagation = false;\n const custom = customProperties ?? EMPTY_OBJECT;\n const details = {\n reason,\n event: event ?? new Event('base-ui'),\n cancel() {\n canceled = true;\n },\n allowPropagation() {\n allowPropagation = true;\n },\n get isCanceled() {\n return canceled;\n },\n get isPropagationAllowed() {\n return allowPropagation;\n },\n trigger,\n ...custom\n };\n return details;\n}\nexport function createGenericEventDetails(reason, event, customProperties) {\n const custom = customProperties ?? EMPTY_OBJECT;\n const details = {\n reason,\n event: event ?? new Event('base-ui'),\n ...custom\n };\n return details;\n}","export const none = 'none';\nexport const triggerPress = 'trigger-press';\nexport const triggerHover = 'trigger-hover';\nexport const triggerFocus = 'trigger-focus';\nexport const outsidePress = 'outside-press';\nexport const itemPress = 'item-press';\nexport const closePress = 'close-press';\nexport const linkPress = 'link-press';\nexport const clearPress = 'clear-press';\nexport const chipRemovePress = 'chip-remove-press';\nexport const trackPress = 'track-press';\nexport const incrementPress = 'increment-press';\nexport const decrementPress = 'decrement-press';\nexport const inputChange = 'input-change';\nexport const inputClear = 'input-clear';\nexport const inputBlur = 'input-blur';\nexport const inputPaste = 'input-paste';\nexport const inputPress = 'input-press';\nexport const focusOut = 'focus-out';\nexport const escapeKey = 'escape-key';\nexport const closeWatcher = 'close-watcher';\nexport const listNavigation = 'list-navigation';\nexport const keyboard = 'keyboard';\nexport const pointer = 'pointer';\nexport const drag = 'drag';\nexport const wheel = 'wheel';\nexport const scrub = 'scrub';\nexport const popupClose = 'popup-close';\nexport const cancelOpen = 'cancel-open';\nexport const siblingOpen = 'sibling-open';\nexport const disabled = 'disabled';\nexport const missing = 'missing';\nexport const initial = 'initial';\nexport const imperativeAction = 'imperative-action';\nexport const swipe = 'swipe';\nexport const windowResize = 'window-resize';","'use client';\n\nimport * as React from 'react';\n\n/**\n * Returns a function that forces a rerender.\n */\nexport function useForcedRerendering() {\n const [, setState] = React.useState({});\n return React.useCallback(() => {\n setState({});\n }, []);\n}","'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from \"./safeReact.mjs\";\nimport { useForcedRerendering } from \"./useForcedRerendering.mjs\";\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride, prefix = 'mui') {\n const defaultId = React.useRef(undefined);\n const forceRerender = useForcedRerendering();\n const id = idOverride ?? defaultId.current;\n React.useEffect(() => {\n if (defaultId.current == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n defaultId.current = `${prefix}-${globalId}`;\n // Generate the fallback even while `idOverride` is set.\n // Removing the override then swaps in the existing id within the same commit.\n // Deferring generation would leave one commit with no id, breaking `htmlFor` and `aria-labelledby` links.\n // Only rerender when the fallback is the value being rendered.\n if (idOverride == null) {\n forceRerender();\n }\n }\n }, [idOverride, prefix, forceRerender]);\n return id;\n}\nconst maybeReactUseId = SafeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param {string | undefined} idOverride overrides the generated id when provided\n * @param {string | undefined} prefix prefixes the generated id when provided\n * @returns {string | undefined}\n */\nexport function useId(idOverride, prefix) {\n // React.useId() is only available from React 18.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride, prefix);\n}","'use client';\n\nimport { useId } from '@base-ui/utils/useId';\n\n/**\n * Wraps `useId` and prefixes generated `id`s with `base-ui-`\n * @param {string | undefined} idOverride overrides the generated id when provided\n * @returns {string | undefined}\n */\nexport function useBaseUiId(idOverride) {\n return useId(idOverride, 'base-ui');\n}"],"names":[],"mappings":";;AAAA,SAAS,YAAY;AACnB,SAAO,OAAO,WAAW;AAC3B;AACA,SAAS,YAAY,MAAM;AACzB,MAAI,OAAO,IAAI,GAAG;AAChB,YAAQ,KAAK,YAAY,IAAI,YAAW;AAAA,EAC1C;AAIA,SAAO;AACT;AACA,SAAS,UAAU,MAAM;AACvB,MAAI;AACJ,UAAQ,QAAQ,SAAS,sBAAsB,KAAK,kBAAkB,OAAO,SAAS,oBAAoB,gBAAgB;AAC5H;AACA,SAAS,mBAAmB,MAAM;AAChC,MAAI;AACJ,UAAQ,QAAQ,OAAO,IAAI,IAAI,KAAK,gBAAgB,KAAK,aAAa,OAAO,aAAa,OAAO,SAAS,KAAK;AACjH;AACA,SAAS,OAAO,OAAO;AACrB,MAAI,CAAC,UAAS,GAAI;AAChB,WAAO;AAAA,EACT;AACA,SAAO,iBAAiB,QAAQ,iBAAiB,UAAU,KAAK,EAAE;AACpE;AACA,SAAS,UAAU,OAAO;AACxB,MAAI,CAAC,UAAS,GAAI;AAChB,WAAO;AAAA,EACT;AACA,SAAO,iBAAiB,WA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,SAAO,MAAM,YAAY,SAAS;AACpC;","x_google_ignoreList":[0,1,2,3,4,5]}
1
+ {"version":3,"file":"useBaseUiId-CYT1vFMG.js","sources":["../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/@base-ui/utils/useForcedRerendering.mjs","../node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs","../node_modules/@base-ui/react/internals/reason-parts.mjs","../node_modules/@base-ui/utils/useId.mjs","../node_modules/@base-ui/react/internals/useBaseUiId.mjs"],"sourcesContent":["function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return (node.ownerDocument || node).body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","'use client';\n\nimport * as React from 'react';\n\n/**\n * Returns a function that forces a rerender.\n */\nexport function useForcedRerendering() {\n const [, setState] = React.useState({});\n return React.useCallback(() => {\n setState({});\n }, []);\n}","import { EMPTY_OBJECT } from '@base-ui/utils/empty';\n\n/**\n * Maps a change `reason` string to the corresponding native event type.\n */\n\n/**\n * Details of custom change events emitted by Base UI components.\n */\n\n/**\n * Details of custom generic events emitted by Base UI components.\n */\n\n/** Highlight navigation uses mouse events for hover and pointer events for leaving an item. */\n\n/**\n * Creates a Base UI event details object with the given reason and utilities\n * for preventing Base UI's internal event handling.\n */\nexport function createChangeEventDetails(reason, event, trigger, customProperties) {\n let canceled = false;\n let allowPropagation = false;\n const custom = customProperties ?? EMPTY_OBJECT;\n const details = {\n reason,\n event: event ?? new Event('base-ui'),\n cancel() {\n canceled = true;\n },\n allowPropagation() {\n allowPropagation = true;\n },\n get isCanceled() {\n return canceled;\n },\n get isPropagationAllowed() {\n return allowPropagation;\n },\n trigger,\n ...custom\n };\n return details;\n}\nexport function createGenericEventDetails(reason, event, customProperties) {\n const custom = customProperties ?? EMPTY_OBJECT;\n const details = {\n reason,\n event: event ?? new Event('base-ui'),\n ...custom\n };\n return details;\n}","export const none = 'none';\nexport const triggerPress = 'trigger-press';\nexport const triggerHover = 'trigger-hover';\nexport const triggerFocus = 'trigger-focus';\nexport const outsidePress = 'outside-press';\nexport const itemPress = 'item-press';\nexport const closePress = 'close-press';\nexport const linkPress = 'link-press';\nexport const clearPress = 'clear-press';\nexport const chipRemovePress = 'chip-remove-press';\nexport const trackPress = 'track-press';\nexport const incrementPress = 'increment-press';\nexport const decrementPress = 'decrement-press';\nexport const inputChange = 'input-change';\nexport const inputClear = 'input-clear';\nexport const inputBlur = 'input-blur';\nexport const inputPaste = 'input-paste';\nexport const inputPress = 'input-press';\nexport const focusOut = 'focus-out';\nexport const escapeKey = 'escape-key';\nexport const closeWatcher = 'close-watcher';\nexport const listNavigation = 'list-navigation';\nexport const keyboard = 'keyboard';\nexport const pointer = 'pointer';\nexport const drag = 'drag';\nexport const wheel = 'wheel';\nexport const scrub = 'scrub';\nexport const popupClose = 'popup-close';\nexport const cancelOpen = 'cancel-open';\nexport const siblingOpen = 'sibling-open';\nexport const disabled = 'disabled';\nexport const missing = 'missing';\nexport const initial = 'initial';\nexport const imperativeAction = 'imperative-action';\nexport const swipe = 'swipe';\nexport const windowResize = 'window-resize';","'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from \"./safeReact.mjs\";\nimport { useForcedRerendering } from \"./useForcedRerendering.mjs\";\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride, prefix = 'mui') {\n const defaultId = React.useRef(undefined);\n const forceRerender = useForcedRerendering();\n const id = idOverride ?? defaultId.current;\n React.useEffect(() => {\n if (defaultId.current == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n defaultId.current = `${prefix}-${globalId}`;\n // Generate the fallback even while `idOverride` is set.\n // Removing the override then swaps in the existing id within the same commit.\n // Deferring generation would leave one commit with no id, breaking `htmlFor` and `aria-labelledby` links.\n // Only rerender when the fallback is the value being rendered.\n if (idOverride == null) {\n forceRerender();\n }\n }\n }, [idOverride, prefix, forceRerender]);\n return id;\n}\nconst maybeReactUseId = SafeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param {string | undefined} idOverride overrides the generated id when provided\n * @param {string | undefined} prefix prefixes the generated id when provided\n * @returns {string | undefined}\n */\nexport function useId(idOverride, prefix) {\n // React.useId() is only available from React 18.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride, prefix);\n}","'use client';\n\nimport { useId } from '@base-ui/utils/useId';\n\n/**\n * Wraps `useId` and prefixes generated `id`s with `base-ui-`\n * @param {string | undefined} idOverride overrides the generated id when provided\n * @returns {string | undefined}\n */\nexport function useBaseUiId(idOverride) {\n return useId(idOverride, 'base-ui');\n}"],"names":[],"mappings":";;AAAA,SAAS,YAAY;AACnB,SAA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B;AAClB,MAAC,WAAW;AACZ,MAAC,UAAU;AACX,MAAC,OAAO;AAIR,MAAC,aAAa;AACd,MAAC,cAAc;AACf,MAAC,WAAW;AACZ,MAAC,UAAU;AACX,MAAC,UAAU;AACX,MAAC,mBAAmB;AAEpB,MAAC,eAAe;AC9B5B,IAAI,WAAW;AAGf,SAAS,YAAY,YAAY,SAAS,OAAO;AAC/C,QAAM,YAAY,MAAM,OAAO,MAAS;AACxC,QAAM,gBAAgB,qBAAoB;AAC1C,QAAM,KAAK,cAAc,UAAU;AACnC,QAAM,UAAU,MAAM;AACpB,QAAI,UAAU,WAAW,MAAM;AAK7B,kBAAY;AACZ,gBAAU,UAAU,GAAG,MAAM,IAAI,QAAQ;AAKzC,UAAI,cAAc,MAAM;AACtB,sBAAa;AAAA,MACf;AAAA,IACF;AAAA,EACF,GAAG,CAAC,YAAY,QAAQ,aAAa,CAAC;AACtC,SAAO;AACT;AACA,MAAM,kBAAkB,UAAU;AAS3B,SAAS,MAAM,YAAY,QAAQ;AAExC,MAAI,oBAAoB,QAAW;AACjC,UAAM,UAAU,gBAAe;AAC/B,WAAO,eAAe,SAAS,GAAG,MAAM,IAAI,OAAO,KAAK;AAAA,EAC1D;AAIA,SAAO,YAAY,YAAY,MAAM;AACvC;ACzCO,SAAS,YAAY,YAAY;AACtC,SAAO,MAAM,YAAY,SAAS;AACpC;","x_google_ignoreList":[0,1,2,3,4,5]}
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
- import { g as getWindow, j as isHTMLElement } from "./useBaseUiId-CmLtG9DS.js";
3
- import { f as formatErrorMessage, S as SafeReact, u as useIsoLayoutEffect, m as mergeProps, g as makeEventPreventable, a as useStableCallback } from "./useIsoLayoutEffect-e9VA-ICd.js";
4
- import { e as error } from "./error-FX4R42W-.js";
2
+ import { b as getWindow, i as isHTMLElement } from "./useBaseUiId-CYT1vFMG.js";
3
+ import { f as formatErrorMessage, S as SafeReact, u as useIsoLayoutEffect, m as mergeProps, h as makeEventPreventable, a as useStableCallback } from "./useIsoLayoutEffect-D2lpsB9D.js";
4
+ import { e as error } from "./error-nCTLdGUr.js";
5
5
  const CompositeRootContext = /* @__PURE__ */ React.createContext(void 0);
6
6
  if (process.env.NODE_ENV !== "production") CompositeRootContext.displayName = "CompositeRootContext";
7
7
  function useCompositeRootContext(optional = false) {
@@ -232,4 +232,4 @@ export {
232
232
  dispatchClickWithModifiers as d,
233
233
  useCompositeRootContext as u
234
234
  };
235
- //# sourceMappingURL=useButton-D2BMuSfC.js.map
235
+ //# sourceMappingURL=useButton-BlHadUfM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useButton-D2BMuSfC.js","sources":["../node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs","../node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs","../node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs","../node_modules/@base-ui/react/internals/use-button/useButton.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const CompositeRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") CompositeRootContext.displayName = \"CompositeRootContext\";\nexport function useCompositeRootContext(optional = false) {\n const context = React.useContext(CompositeRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.' : _formatErrorMessage(16));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nexport function useFocusableWhenDisabled(parameters) {\n const {\n focusableWhenDisabled,\n disabled,\n composite = false,\n tabIndex: tabIndexProp = 0,\n isNativeButton\n } = parameters;\n const isFocusableComposite = composite && focusableWhenDisabled !== false;\n const isNonFocusableComposite = composite && focusableWhenDisabled === false;\n\n // we can't explicitly assign `undefined` to any of these props because it\n // would otherwise prevent subsequently merged props from setting them\n const props = React.useMemo(() => {\n const additionalProps = {\n // allow Tabbing away from focusableWhenDisabled elements\n onKeyDown(event) {\n if (disabled && focusableWhenDisabled && event.key !== 'Tab') {\n event.preventDefault();\n }\n }\n };\n if (!composite) {\n additionalProps.tabIndex = tabIndexProp;\n if (!isNativeButton && disabled) {\n additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;\n }\n }\n if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled) {\n additionalProps['aria-disabled'] = disabled;\n }\n if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {\n additionalProps.disabled = disabled;\n }\n return additionalProps;\n }, [composite, disabled, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);\n return {\n props\n };\n}","import { ownerWindow } from '@base-ui/utils/owner';\n/**\n * Dispatches a constructed click on the target so it carries the source event's\n * modifier state, which `click()` always reports as unpressed. Like `click()`,\n * the untrusted click still runs native activation behavior (form submission,\n * link navigation).\n * `detail` defaults to 0 and `pointerType` to `''` (the native convention for\n * keyboard-generated clicks). When the click represents a mouse gesture, pass\n * `detail: 1` and `pointerType: 'mouse'` so consumers don't classify it as a\n * keyboard activation.\n */\nexport function dispatchClickWithModifiers(target, sourceEvent, {\n detail = 0,\n pointerType = ''\n} = {}) {\n target.dispatchEvent(new (ownerWindow(target).PointerEvent)('click', {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail,\n pointerType,\n shiftKey: sourceEvent.shiftKey,\n ctrlKey: sourceEvent.ctrlKey,\n altKey: sourceEvent.altKey,\n metaKey: sourceEvent.metaKey\n }));\n}","'use client';\n\nimport * as React from 'react';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { error } from '@base-ui/utils/error';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { makeEventPreventable, mergeProps } from \"../../merge-props/index.mjs\";\nimport { useCompositeRootContext } from \"../composite/root/CompositeRootContext.mjs\";\nimport { useFocusableWhenDisabled } from \"../../utils/useFocusableWhenDisabled.mjs\";\nimport { dispatchClickWithModifiers } from \"../../utils/dispatchClickWithModifiers.mjs\";\nexport function useButton(parameters = {}) {\n const {\n disabled = false,\n focusableWhenDisabled,\n tabIndex = 0,\n native: isNativeButton = true,\n composite: compositeProp\n } = parameters;\n const elementRef = React.useRef(null);\n const compositeRootContext = useCompositeRootContext(true);\n const isCompositeItem = compositeProp ?? compositeRootContext !== undefined;\n const {\n props: focusableWhenDisabledProps\n } = useFocusableWhenDisabled({\n focusableWhenDisabled,\n disabled,\n composite: isCompositeItem,\n tabIndex,\n isNativeButton\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (!elementRef.current) {\n return;\n }\n const isButtonTag = isButtonElement(elementRef.current);\n if (isNativeButton) {\n if (!isButtonTag) {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = 'A component that acts as a button expected a native <button> because the ' + '`nativeButton` prop is true. Rendering a non-<button> removes native button ' + 'semantics, which can impact forms and accessibility. Use a real <button> in the ' + '`render` prop, or set `nativeButton` to `false`.';\n error(`${message}${ownerStackMessage}`);\n }\n } else if (isButtonTag) {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = 'A component that acts as a button expected a non-<button> because the `nativeButton` ' + 'prop is false. Rendering a <button> keeps native behavior while Base UI applies ' + 'non-native attributes and handlers, which can add unintended extra attributes (such ' + 'as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set ' + '`nativeButton` to `true`.';\n error(`${message}${ownerStackMessage}`);\n }\n }, [isNativeButton]);\n }\n\n // handles a disabled composite button rendering another button, e.g.\n // <Toolbar.Button disabled render={<Menu.Trigger />} />\n // the `disabled` prop needs to pass through 2 `useButton`s then finally\n // delete the `disabled` attribute from DOM\n const updateDisabled = React.useCallback(() => {\n const element = elementRef.current;\n if (!isButtonElement(element)) {\n return;\n }\n if (isCompositeItem && disabled && focusableWhenDisabledProps.disabled === undefined && element.disabled) {\n element.disabled = false;\n }\n }, [disabled, focusableWhenDisabledProps.disabled, isCompositeItem]);\n useIsoLayoutEffect(updateDisabled, [updateDisabled]);\n const getButtonProps = React.useCallback((externalProps = {}) => {\n const {\n onClick: externalOnClick,\n onMouseDown: externalOnMouseDown,\n onKeyUp: externalOnKeyUp,\n onKeyDown: externalOnKeyDown,\n onPointerDown: externalOnPointerDown,\n ...otherExternalProps\n } = externalProps;\n return mergeProps({\n onClick(event) {\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnClick?.(event);\n },\n onMouseDown(event) {\n if (!disabled) {\n externalOnMouseDown?.(event);\n }\n },\n onKeyDown(event) {\n if (disabled) {\n return;\n }\n makeEventPreventable(event);\n externalOnKeyDown?.(event);\n if (event.baseUIHandlerPrevented) {\n return;\n }\n const isCurrentTarget = event.target === event.currentTarget;\n const currentTarget = event.currentTarget;\n const isButton = isButtonElement(currentTarget);\n const isLink = !isNativeButton && isValidLinkElement(currentTarget);\n const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);\n const isEnterKey = event.key === 'Enter';\n const isSpaceKey = event.key === ' ';\n const role = currentTarget.getAttribute('role');\n const isTextNavigationRole = role?.startsWith('menuitem') || role === 'option' || role === 'gridcell';\n if (isCurrentTarget && isCompositeItem && isSpaceKey) {\n if (event.defaultPrevented && isTextNavigationRole) {\n return;\n }\n event.preventDefault();\n\n // Only a native-mode item that isn't a real <button> is excluded.\n if (!isNativeButton || isButton) {\n event.preventBaseUIHandler();\n dispatchClickWithModifiers(currentTarget, event);\n }\n return;\n }\n\n // Keyboard accessibility for native and non-native elements.\n if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) {\n // Space activates links on keyup (`role=\"button\"` semantics, matching the\n // composite path); prevent the page scroll Space would otherwise trigger.\n // Enter is left to the browser's native link activation.\n if (isCurrentTarget && isLink && isSpaceKey) {\n event.preventDefault();\n }\n return;\n }\n\n // Match native buttons: preventing the keydown's default cancels activation.\n if (event.defaultPrevented) {\n return;\n }\n event.preventDefault();\n if (isEnterKey) {\n event.preventBaseUIHandler();\n dispatchClickWithModifiers(currentTarget, event);\n }\n },\n onKeyUp(event) {\n if (disabled) {\n return;\n }\n\n // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n // https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0\n makeEventPreventable(event);\n externalOnKeyUp?.(event);\n if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === ' ') {\n event.preventDefault();\n return;\n }\n if (event.baseUIHandlerPrevented) {\n return;\n }\n\n // Keyboard accessibility for non interactive elements.\n // Match native buttons: preventing the keyup's default cancels Space activation.\n // Limitation: unlike a native <button>, a prevented *keydown* cannot cancel the\n // activation — no state is kept between keydown and keyup, so we can't tell\n // whether the keydown was prevented or even happened on this element.\n if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === ' ') {\n event.preventBaseUIHandler();\n dispatchClickWithModifiers(event.currentTarget, event);\n }\n },\n onPointerDown(event) {\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnPointerDown?.(event);\n }\n }, isNativeButton ? {\n type: 'button'\n } : {\n role: 'button'\n }, focusableWhenDisabledProps, otherExternalProps);\n }, [disabled, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);\n const buttonRef = useStableCallback(element => {\n elementRef.current = element;\n updateDisabled();\n });\n return {\n getButtonProps,\n buttonRef\n };\n}\nfunction isButtonElement(elem) {\n return isHTMLElement(elem) && elem.tagName === 'BUTTON';\n}\nfunction isValidLinkElement(elem) {\n return isHTMLElement(elem) && elem.tagName === 'A' && Boolean(elem.href);\n}"],"names":["_formatErrorMessage","ownerWindow"],"mappings":";;;;AAIY,MAAC,uBAAoC,sBAAM,cAAc,MAAS;AAC9E,IAAI,QAAQ,IAAI,aAAa,aAAc,sBAAqB,cAAc;AACvE,SAAS,wBAAw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B,MAAM;AAChC,SAAO,cAAc,IAAI,KAAK,KAAK,YAAY,OAAO,QAAQ,KAAK,IAAI;AACzE;","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"useButton-BlHadUfM.js","sources":["../node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs","../node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs","../node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs","../node_modules/@base-ui/react/internals/use-button/useButton.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const CompositeRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") CompositeRootContext.displayName = \"CompositeRootContext\";\nexport function useCompositeRootContext(optional = false) {\n const context = React.useContext(CompositeRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.' : _formatErrorMessage(16));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nexport function useFocusableWhenDisabled(parameters) {\n const {\n focusableWhenDisabled,\n disabled,\n composite = false,\n tabIndex: tabIndexProp = 0,\n isNativeButton\n } = parameters;\n const isFocusableComposite = composite && focusableWhenDisabled !== false;\n const isNonFocusableComposite = composite && focusableWhenDisabled === false;\n\n // we can't explicitly assign `undefined` to any of these props because it\n // would otherwise prevent subsequently merged props from setting them\n const props = React.useMemo(() => {\n const additionalProps = {\n // allow Tabbing away from focusableWhenDisabled elements\n onKeyDown(event) {\n if (disabled && focusableWhenDisabled && event.key !== 'Tab') {\n event.preventDefault();\n }\n }\n };\n if (!composite) {\n additionalProps.tabIndex = tabIndexProp;\n if (!isNativeButton && disabled) {\n additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;\n }\n }\n if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled) {\n additionalProps['aria-disabled'] = disabled;\n }\n if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {\n additionalProps.disabled = disabled;\n }\n return additionalProps;\n }, [composite, disabled, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);\n return {\n props\n };\n}","import { ownerWindow } from '@base-ui/utils/owner';\n/**\n * Dispatches a constructed click on the target so it carries the source event's\n * modifier state, which `click()` always reports as unpressed. Like `click()`,\n * the untrusted click still runs native activation behavior (form submission,\n * link navigation).\n * `detail` defaults to 0 and `pointerType` to `''` (the native convention for\n * keyboard-generated clicks). When the click represents a mouse gesture, pass\n * `detail: 1` and `pointerType: 'mouse'` so consumers don't classify it as a\n * keyboard activation.\n */\nexport function dispatchClickWithModifiers(target, sourceEvent, {\n detail = 0,\n pointerType = ''\n} = {}) {\n target.dispatchEvent(new (ownerWindow(target).PointerEvent)('click', {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail,\n pointerType,\n shiftKey: sourceEvent.shiftKey,\n ctrlKey: sourceEvent.ctrlKey,\n altKey: sourceEvent.altKey,\n metaKey: sourceEvent.metaKey\n }));\n}","'use client';\n\nimport * as React from 'react';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { error } from '@base-ui/utils/error';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { makeEventPreventable, mergeProps } from \"../../merge-props/index.mjs\";\nimport { useCompositeRootContext } from \"../composite/root/CompositeRootContext.mjs\";\nimport { useFocusableWhenDisabled } from \"../../utils/useFocusableWhenDisabled.mjs\";\nimport { dispatchClickWithModifiers } from \"../../utils/dispatchClickWithModifiers.mjs\";\nexport function useButton(parameters = {}) {\n const {\n disabled = false,\n focusableWhenDisabled,\n tabIndex = 0,\n native: isNativeButton = true,\n composite: compositeProp\n } = parameters;\n const elementRef = React.useRef(null);\n const compositeRootContext = useCompositeRootContext(true);\n const isCompositeItem = compositeProp ?? compositeRootContext !== undefined;\n const {\n props: focusableWhenDisabledProps\n } = useFocusableWhenDisabled({\n focusableWhenDisabled,\n disabled,\n composite: isCompositeItem,\n tabIndex,\n isNativeButton\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (!elementRef.current) {\n return;\n }\n const isButtonTag = isButtonElement(elementRef.current);\n if (isNativeButton) {\n if (!isButtonTag) {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = 'A component that acts as a button expected a native <button> because the ' + '`nativeButton` prop is true. Rendering a non-<button> removes native button ' + 'semantics, which can impact forms and accessibility. Use a real <button> in the ' + '`render` prop, or set `nativeButton` to `false`.';\n error(`${message}${ownerStackMessage}`);\n }\n } else if (isButtonTag) {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = 'A component that acts as a button expected a non-<button> because the `nativeButton` ' + 'prop is false. Rendering a <button> keeps native behavior while Base UI applies ' + 'non-native attributes and handlers, which can add unintended extra attributes (such ' + 'as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set ' + '`nativeButton` to `true`.';\n error(`${message}${ownerStackMessage}`);\n }\n }, [isNativeButton]);\n }\n\n // handles a disabled composite button rendering another button, e.g.\n // <Toolbar.Button disabled render={<Menu.Trigger />} />\n // the `disabled` prop needs to pass through 2 `useButton`s then finally\n // delete the `disabled` attribute from DOM\n const updateDisabled = React.useCallback(() => {\n const element = elementRef.current;\n if (!isButtonElement(element)) {\n return;\n }\n if (isCompositeItem && disabled && focusableWhenDisabledProps.disabled === undefined && element.disabled) {\n element.disabled = false;\n }\n }, [disabled, focusableWhenDisabledProps.disabled, isCompositeItem]);\n useIsoLayoutEffect(updateDisabled, [updateDisabled]);\n const getButtonProps = React.useCallback((externalProps = {}) => {\n const {\n onClick: externalOnClick,\n onMouseDown: externalOnMouseDown,\n onKeyUp: externalOnKeyUp,\n onKeyDown: externalOnKeyDown,\n onPointerDown: externalOnPointerDown,\n ...otherExternalProps\n } = externalProps;\n return mergeProps({\n onClick(event) {\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnClick?.(event);\n },\n onMouseDown(event) {\n if (!disabled) {\n externalOnMouseDown?.(event);\n }\n },\n onKeyDown(event) {\n if (disabled) {\n return;\n }\n makeEventPreventable(event);\n externalOnKeyDown?.(event);\n if (event.baseUIHandlerPrevented) {\n return;\n }\n const isCurrentTarget = event.target === event.currentTarget;\n const currentTarget = event.currentTarget;\n const isButton = isButtonElement(currentTarget);\n const isLink = !isNativeButton && isValidLinkElement(currentTarget);\n const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);\n const isEnterKey = event.key === 'Enter';\n const isSpaceKey = event.key === ' ';\n const role = currentTarget.getAttribute('role');\n const isTextNavigationRole = role?.startsWith('menuitem') || role === 'option' || role === 'gridcell';\n if (isCurrentTarget && isCompositeItem && isSpaceKey) {\n if (event.defaultPrevented && isTextNavigationRole) {\n return;\n }\n event.preventDefault();\n\n // Only a native-mode item that isn't a real <button> is excluded.\n if (!isNativeButton || isButton) {\n event.preventBaseUIHandler();\n dispatchClickWithModifiers(currentTarget, event);\n }\n return;\n }\n\n // Keyboard accessibility for native and non-native elements.\n if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) {\n // Space activates links on keyup (`role=\"button\"` semantics, matching the\n // composite path); prevent the page scroll Space would otherwise trigger.\n // Enter is left to the browser's native link activation.\n if (isCurrentTarget && isLink && isSpaceKey) {\n event.preventDefault();\n }\n return;\n }\n\n // Match native buttons: preventing the keydown's default cancels activation.\n if (event.defaultPrevented) {\n return;\n }\n event.preventDefault();\n if (isEnterKey) {\n event.preventBaseUIHandler();\n dispatchClickWithModifiers(currentTarget, event);\n }\n },\n onKeyUp(event) {\n if (disabled) {\n return;\n }\n\n // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n // https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0\n makeEventPreventable(event);\n externalOnKeyUp?.(event);\n if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === ' ') {\n event.preventDefault();\n return;\n }\n if (event.baseUIHandlerPrevented) {\n return;\n }\n\n // Keyboard accessibility for non interactive elements.\n // Match native buttons: preventing the keyup's default cancels Space activation.\n // Limitation: unlike a native <button>, a prevented *keydown* cannot cancel the\n // activation — no state is kept between keydown and keyup, so we can't tell\n // whether the keydown was prevented or even happened on this element.\n if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === ' ') {\n event.preventBaseUIHandler();\n dispatchClickWithModifiers(event.currentTarget, event);\n }\n },\n onPointerDown(event) {\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnPointerDown?.(event);\n }\n }, isNativeButton ? {\n type: 'button'\n } : {\n role: 'button'\n }, focusableWhenDisabledProps, otherExternalProps);\n }, [disabled, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);\n const buttonRef = useStableCallback(element => {\n elementRef.current = element;\n updateDisabled();\n });\n return {\n getButtonProps,\n buttonRef\n };\n}\nfunction isButtonElement(elem) {\n return isHTMLElement(elem) && elem.tagName === 'BUTTON';\n}\nfunction isValidLinkElement(elem) {\n return isHTMLElement(elem) && elem.tagName === 'A' && Boolean(elem.href);\n}"],"names":["_formatErrorMessage","ownerWindow"],"mappings":";;;;AAIY,MAAC,uBAAoC,sBAAM,cAAc,MAAS;AAC9E,IAAI,QAAQ,IAAI,aAAa,aAAc,sBAAqB,cAAc;AACvE,SAAS,wBAAwB,WAAW,OAAO;AACxD,QAAM,UAAU,MAAM,WAAW,oBAAoB;AACrD,MAAI,YAAY,UAAa,CAAC,UAAU;AACtC,UAAM,IAAI,MAAM,QAAQ,IAAI,aAAa,eAAe,sGAAsGA,mBAAoB,EAAE,CAAC;AAAA,EACvL;AACA,SAAO;AACT;ACTO,SAAS,yBAAyB,YAAY;AACnD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA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