tfy-web-components 0.0.34 → 0.0.36

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 (230) hide show
  1. package/README.md +49 -58
  2. package/dist/Button-C77b7jpW.js +284 -0
  3. package/dist/Button-C77b7jpW.js.map +1 -0
  4. package/dist/CompositeItem-BGwD51jI.js +33 -0
  5. package/dist/CompositeItem-BGwD51jI.js.map +1 -0
  6. package/dist/CompositeList-D4xmSZ5V.js +291 -0
  7. package/dist/CompositeList-D4xmSZ5V.js.map +1 -0
  8. package/dist/CompositeRoot-BxrPc7F6.js +351 -0
  9. package/dist/CompositeRoot-BxrPc7F6.js.map +1 -0
  10. package/dist/DirectionContext-Pb9yafF5.js +11 -0
  11. package/dist/DirectionContext-Pb9yafF5.js.map +1 -0
  12. package/dist/FieldItemContext-DRVgx-D1.js +13 -0
  13. package/dist/FieldItemContext-DRVgx-D1.js.map +1 -0
  14. package/dist/{Input-BvwIpntS.js → Input-Dhmo6L2n.js} +100 -78
  15. package/dist/Input-Dhmo6L2n.js.map +1 -0
  16. package/dist/Modal-C4MUy9GD.js +696 -0
  17. package/dist/Modal-C4MUy9GD.js.map +1 -0
  18. package/dist/{MonacoEditorCore-xfpJ6z-E.js → MonacoEditorCore-n-df5f7I.js} +2 -2
  19. package/dist/{MonacoEditorCore-xfpJ6z-E.js.map → MonacoEditorCore-n-df5f7I.js.map} +1 -1
  20. package/dist/Popover-eC_vX5By.js +1074 -0
  21. package/dist/Popover-eC_vX5By.js.map +1 -0
  22. package/dist/ToolbarRootContext-B_HxjkNI.js +11 -0
  23. package/dist/ToolbarRootContext-B_HxjkNI.js.map +1 -0
  24. package/dist/Tooltip-BuGLP-PU.js +4096 -0
  25. package/dist/Tooltip-BuGLP-PU.js.map +1 -0
  26. package/dist/classNames-B1XpQHle.js +44 -0
  27. package/dist/classNames-B1XpQHle.js.map +1 -0
  28. package/dist/components/atoms/Accordion.d.ts +19 -37
  29. package/dist/components/atoms/Accordion.es.js +847 -78
  30. package/dist/components/atoms/Accordion.es.js.map +1 -1
  31. package/dist/components/atoms/AudioPlayer.es.js +9 -9
  32. package/dist/components/atoms/AudioPlayer.es.js.map +1 -1
  33. package/dist/components/atoms/Avatar.d.ts +42 -9
  34. package/dist/components/atoms/Avatar.es.js +491 -36
  35. package/dist/components/atoms/Avatar.es.js.map +1 -1
  36. package/dist/components/atoms/Badge.d.ts +40 -35
  37. package/dist/components/atoms/Badge.es.js +163 -53
  38. package/dist/components/atoms/Badge.es.js.map +1 -1
  39. package/dist/components/atoms/Button.d.ts +37 -16
  40. package/dist/components/atoms/Button.es.js +16 -221
  41. package/dist/components/atoms/Button.es.js.map +1 -1
  42. package/dist/components/atoms/ButtonGroup.d.ts +53 -0
  43. package/dist/components/atoms/ButtonGroup.es.js +349 -0
  44. package/dist/components/atoms/ButtonGroup.es.js.map +1 -0
  45. package/dist/components/atoms/IconButton.d.ts +23 -9
  46. package/dist/components/atoms/IconButton.es.js +82 -16
  47. package/dist/components/atoms/IconButton.es.js.map +1 -1
  48. package/dist/components/atoms/IconProvider.d.ts +5 -2
  49. package/dist/components/atoms/IconProvider.es.js +69 -10
  50. package/dist/components/atoms/IconProvider.es.js.map +1 -1
  51. package/dist/components/atoms/Logo.d.ts +18 -0
  52. package/dist/components/atoms/Logo.es.js +79 -0
  53. package/dist/components/atoms/Logo.es.js.map +1 -0
  54. package/dist/components/atoms/Modal.d.ts +27 -3
  55. package/dist/components/atoms/Modal.es.js +15 -16
  56. package/dist/components/atoms/Modal.es.js.map +1 -1
  57. package/dist/components/atoms/Notification.d.ts +1 -1
  58. package/dist/components/atoms/Notification.es.js +26 -3
  59. package/dist/components/atoms/Notification.es.js.map +1 -1
  60. package/dist/components/atoms/OutlinedRadio.d.ts +6 -2
  61. package/dist/components/atoms/OutlinedRadio.es.js +12 -25
  62. package/dist/components/atoms/OutlinedRadio.es.js.map +1 -1
  63. package/dist/components/atoms/Progress.d.ts +48 -0
  64. package/dist/components/atoms/Progress.es.js +279 -0
  65. package/dist/components/atoms/Progress.es.js.map +1 -0
  66. package/dist/components/atoms/Skeleton.d.ts +9 -3
  67. package/dist/components/atoms/Skeleton.es.js +33 -3
  68. package/dist/components/atoms/Skeleton.es.js.map +1 -1
  69. package/dist/components/atoms/Spinner.d.ts +15 -4
  70. package/dist/components/atoms/Spinner.es.js +86 -22
  71. package/dist/components/atoms/Spinner.es.js.map +1 -1
  72. package/dist/components/atoms/Switch.d.ts +19 -7
  73. package/dist/components/atoms/Switch.es.js +288 -50
  74. package/dist/components/atoms/Switch.es.js.map +1 -1
  75. package/dist/components/atoms/TabButton.d.ts +17 -3
  76. package/dist/components/atoms/TabButton.es.js +647 -25
  77. package/dist/components/atoms/TabButton.es.js.map +1 -1
  78. package/dist/components/atoms/TabPanel.es.js +1 -1
  79. package/dist/components/atoms/Tag.d.ts +43 -0
  80. package/dist/components/atoms/Tag.es.js +219 -0
  81. package/dist/components/atoms/Tag.es.js.map +1 -0
  82. package/dist/components/atoms/Tooltip.d.ts +36 -14
  83. package/dist/components/atoms/Tooltip.es.js +7 -114
  84. package/dist/components/atoms/Tooltip.es.js.map +1 -1
  85. package/dist/components/molecules/Alert.d.ts +1 -1
  86. package/dist/components/molecules/Alert.es.js +13 -9
  87. package/dist/components/molecules/Alert.es.js.map +1 -1
  88. package/dist/components/molecules/CopyField.d.ts +2 -2
  89. package/dist/components/molecules/CopyField.es.js +3 -4
  90. package/dist/components/molecules/CopyField.es.js.map +1 -1
  91. package/dist/components/molecules/CustomDrawer.d.ts +5 -4
  92. package/dist/components/molecules/CustomDrawer.es.js +141 -82
  93. package/dist/components/molecules/CustomDrawer.es.js.map +1 -1
  94. package/dist/components/molecules/Dialog.d.ts +16 -8
  95. package/dist/components/molecules/Dialog.es.js +33 -31
  96. package/dist/components/molecules/Dialog.es.js.map +1 -1
  97. package/dist/components/molecules/ImagesPreview.es.js +15 -11
  98. package/dist/components/molecules/ImagesPreview.es.js.map +1 -1
  99. package/dist/components/molecules/Input.d.ts +1 -1
  100. package/dist/components/molecules/Input.es.js +3 -5
  101. package/dist/components/molecules/Input.es.js.map +1 -1
  102. package/dist/components/molecules/Markdown/ExpandableMarkdown.d.ts +8 -8
  103. package/dist/components/molecules/Markdown/components.d.ts +12 -11
  104. package/dist/components/molecules/Markdown.es.js +26 -49
  105. package/dist/components/molecules/Markdown.es.js.map +1 -1
  106. package/dist/components/molecules/Notify.d.ts +30 -1
  107. package/dist/components/molecules/Notify.es.js +91 -36
  108. package/dist/components/molecules/Notify.es.js.map +1 -1
  109. package/dist/components/molecules/SimpleCodeEditor.es.js +32 -19
  110. package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
  111. package/dist/components/molecules/ToggleButton.d.ts +3 -2
  112. package/dist/components/molecules/ToggleButton.es.js +155 -57
  113. package/dist/components/molecules/ToggleButton.es.js.map +1 -1
  114. package/dist/components/molecules/agent-chat/UserMessage.es.js +2 -2
  115. package/dist/components/molecules/agent-chat/UserMessage.es.js.map +1 -1
  116. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js +5 -5
  117. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js.map +1 -1
  118. package/dist/components/molecules/agent-chat/index.d.ts +0 -6
  119. package/dist/components/molecules/agent-chat.es.js +76 -407
  120. package/dist/components/molecules/agent-chat.es.js.map +1 -1
  121. package/dist/components/molecules/monacoEditorCore/MonacoEditorCore.d.ts +0 -1
  122. package/dist/components/theme/colors.d.ts +17 -53
  123. package/dist/components/theme/colors.es.js +384 -180
  124. package/dist/components/theme/colors.es.js.map +1 -1
  125. package/dist/components/theme/theme.d.ts +14 -11
  126. package/dist/components/theme/theme.es.js +3 -64
  127. package/dist/components/theme/theme.es.js.map +1 -1
  128. package/dist/components/theme/useTheme.es.js +1 -4
  129. package/dist/components/theme/useTheme.es.js.map +1 -1
  130. package/dist/composite-CrCQWAKA.js +108 -0
  131. package/dist/composite-CrCQWAKA.js.map +1 -0
  132. package/dist/composite-DCpXNxz9.js +66 -0
  133. package/dist/composite-DCpXNxz9.js.map +1 -0
  134. package/dist/conversions-CbWPvHRE.js +14 -0
  135. package/dist/conversions-CbWPvHRE.js.map +1 -0
  136. package/dist/error-FX4R42W-.js +6 -0
  137. package/dist/error-FX4R42W-.js.map +1 -0
  138. package/dist/fonts.css +7 -0
  139. package/dist/hooks/useContainerDimensions.d.ts +1 -1
  140. package/dist/index-B806bfA-.js +257 -0
  141. package/dist/index-B806bfA-.js.map +1 -0
  142. package/dist/index-DSVg79g-.js +45 -0
  143. package/dist/index-DSVg79g-.js.map +1 -0
  144. package/dist/index.d.ts +21 -4
  145. package/dist/index.es.js +58 -9
  146. package/dist/index.es.js.map +1 -1
  147. package/dist/inertValue-IJM5NA30.js +11 -0
  148. package/dist/inertValue-IJM5NA30.js.map +1 -0
  149. package/dist/lib/utils.d.ts +1 -0
  150. package/dist/markdown.css +13 -14
  151. package/dist/new-components/atoms/Checkbox.d.ts +6 -0
  152. package/dist/new-components/atoms/Checkbox.es.js +423 -0
  153. package/dist/new-components/atoms/Checkbox.es.js.map +1 -0
  154. package/dist/new-components/atoms/Chip.d.ts +38 -0
  155. package/dist/new-components/atoms/Chip.es.js +269 -0
  156. package/dist/new-components/atoms/Chip.es.js.map +1 -0
  157. package/dist/new-components/atoms/Popover.d.ts +87 -0
  158. package/dist/new-components/atoms/Popover.es.js +21 -0
  159. package/dist/new-components/atoms/Popover.es.js.map +1 -0
  160. package/dist/new-components/atoms/Radio.d.ts +14 -0
  161. package/dist/new-components/atoms/Radio.es.js +536 -0
  162. package/dist/new-components/atoms/Radio.es.js.map +1 -0
  163. package/dist/new-components/atoms/SegmentedControl.d.ts +28 -0
  164. package/dist/new-components/atoms/SegmentedControl.es.js +326 -0
  165. package/dist/new-components/atoms/SegmentedControl.es.js.map +1 -0
  166. package/dist/new-components/atoms/Slider.d.ts +8 -0
  167. package/dist/new-components/atoms/Slider.es.js +1415 -0
  168. package/dist/new-components/atoms/Slider.es.js.map +1 -0
  169. package/dist/new-components/atoms/Toggletip.d.ts +43 -0
  170. package/dist/new-components/atoms/Toggletip.es.js +216 -0
  171. package/dist/new-components/atoms/Toggletip.es.js.map +1 -0
  172. package/dist/new-components/atoms/stories/ThemeComparison.d.ts +8 -0
  173. package/dist/shadowDom-Bq4g0Qeu.js +52 -0
  174. package/dist/shadowDom-Bq4g0Qeu.js.map +1 -0
  175. package/dist/style.css +1 -1
  176. package/dist/tfy-YZ5zY9Jw.js +6 -0
  177. package/dist/tfy-YZ5zY9Jw.js.map +1 -0
  178. package/dist/theme.css +9 -154
  179. package/dist/tokens.css +1124 -0
  180. package/dist/useAnimationFrame-DwhymJoW.js +108 -0
  181. package/dist/useAnimationFrame-DwhymJoW.js.map +1 -0
  182. package/dist/useAriaLabelledBy-B6n92QBS.js +49 -0
  183. package/dist/useAriaLabelledBy-B6n92QBS.js.map +1 -0
  184. package/dist/useBaseUiId-Ch7ujXpo.js +281 -0
  185. package/dist/useBaseUiId-Ch7ujXpo.js.map +1 -0
  186. package/dist/useButton-PUBhT4Vo.js +235 -0
  187. package/dist/useButton-PUBhT4Vo.js.map +1 -0
  188. package/dist/useControlled-BSyYkg5C.js +65 -0
  189. package/dist/useControlled-BSyYkg5C.js.map +1 -0
  190. package/dist/useIsoLayoutEffect-e9VA-ICd.js +499 -0
  191. package/dist/useIsoLayoutEffect-e9VA-ICd.js.map +1 -0
  192. package/dist/useLabelableId-DCLzrdD-.js +241 -0
  193. package/dist/useLabelableId-DCLzrdD-.js.map +1 -0
  194. package/dist/useOpenInteractionType-DGWLoAqp.js +1086 -0
  195. package/dist/useOpenInteractionType-DGWLoAqp.js.map +1 -0
  196. package/dist/usePopupHandleStore-BdS-xYID.js +2372 -0
  197. package/dist/usePopupHandleStore-BdS-xYID.js.map +1 -0
  198. package/dist/useTimeout-BXf1hDIL.js +46 -0
  199. package/dist/useTimeout-BXf1hDIL.js.map +1 -0
  200. package/dist/useTransitionStatus-C9gg_XJ-.js +202 -0
  201. package/dist/useTransitionStatus-C9gg_XJ-.js.map +1 -0
  202. package/dist/useValueAsRef-BfFRcMg6.js +28 -0
  203. package/dist/useValueAsRef-BfFRcMg6.js.map +1 -0
  204. package/dist/utils/classNames.d.ts +3 -2
  205. package/dist/visuallyHidden-B6H2X3_Y.js +26 -0
  206. package/dist/visuallyHidden-B6H2X3_Y.js.map +1 -0
  207. package/dist/vite-env.d.ts +18 -0
  208. package/package.json +30 -22
  209. package/dist/Input-BvwIpntS.js.map +0 -1
  210. package/dist/Notification-BT4CZ69U.js +0 -39
  211. package/dist/Notification-BT4CZ69U.js.map +0 -1
  212. package/dist/RootFontSizeContext-7vgn7Y_k.js +0 -22
  213. package/dist/RootFontSizeContext-7vgn7Y_k.js.map +0 -1
  214. package/dist/classNames-Dy-RXSjS.js +0 -9
  215. package/dist/classNames-Dy-RXSjS.js.map +0 -1
  216. package/dist/components/molecules/DropdownMenu.d.ts +0 -18
  217. package/dist/components/molecules/DropdownMenu.es.js +0 -104
  218. package/dist/components/molecules/DropdownMenu.es.js.map +0 -1
  219. package/dist/components/molecules/ThumbsFeedback.d.ts +0 -13
  220. package/dist/components/molecules/ThumbsFeedback.es.js +0 -98
  221. package/dist/components/molecules/ThumbsFeedback.es.js.map +0 -1
  222. package/dist/components/molecules/agent-chat/SandboxToolCall.d.ts +0 -15
  223. package/dist/components/molecules/agent-chat/ToolCallCard.d.ts +0 -26
  224. package/dist/components/molecules/agent-chat/ToolCallContentBlock.d.ts +0 -17
  225. package/dist/components/theme/lightColorPlugin.d.ts +0 -1
  226. package/dist/components/theme/lightColorPlugin.es.js +0 -92
  227. package/dist/components/theme/lightColorPlugin.es.js.map +0 -1
  228. package/dist/tailwindPreset.d.ts +0 -144
  229. package/dist/tailwindPreset.es.js +0 -100
  230. package/dist/tailwindPreset.es.js.map +0 -1
@@ -0,0 +1,499 @@
1
+ import * as React from "react";
2
+ import { createElement } from "react";
3
+ const UNINITIALIZED = {};
4
+ function useRefWithInit(init, initArg) {
5
+ const ref = React.useRef(UNINITIALIZED);
6
+ if (ref.current === UNINITIALIZED) {
7
+ ref.current = init(initArg);
8
+ }
9
+ return ref;
10
+ }
11
+ function useMergedRefs(a, b, c, d) {
12
+ const forkRef = useRefWithInit(createForkRef).current;
13
+ if (didChange(forkRef, a, b, c, d)) {
14
+ update(forkRef, [a, b, c, d]);
15
+ }
16
+ return forkRef.callback;
17
+ }
18
+ function useMergedRefsN(refs) {
19
+ const forkRef = useRefWithInit(createForkRef).current;
20
+ if (didChangeN(forkRef, refs)) {
21
+ update(forkRef, refs);
22
+ }
23
+ return forkRef.callback;
24
+ }
25
+ function createForkRef() {
26
+ return {
27
+ callback: null,
28
+ cleanup: null,
29
+ refs: []
30
+ };
31
+ }
32
+ function didChange(forkRef, a, b, c, d) {
33
+ return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
34
+ }
35
+ function didChangeN(forkRef, newRefs) {
36
+ return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
37
+ }
38
+ function update(forkRef, refs) {
39
+ forkRef.refs = refs;
40
+ if (refs.every((ref) => ref == null)) {
41
+ forkRef.callback = null;
42
+ return;
43
+ }
44
+ forkRef.callback = (instance) => {
45
+ if (forkRef.cleanup) {
46
+ forkRef.cleanup();
47
+ forkRef.cleanup = null;
48
+ }
49
+ if (instance != null) {
50
+ const cleanupCallbacks = Array(refs.length).fill(null);
51
+ for (let i = 0; i < refs.length; i += 1) {
52
+ const ref = refs[i];
53
+ if (ref == null) {
54
+ continue;
55
+ }
56
+ switch (typeof ref) {
57
+ case "function": {
58
+ const refCleanup = ref(instance);
59
+ if (typeof refCleanup === "function") {
60
+ cleanupCallbacks[i] = refCleanup;
61
+ }
62
+ break;
63
+ }
64
+ case "object": {
65
+ ref.current = instance;
66
+ break;
67
+ }
68
+ }
69
+ }
70
+ forkRef.cleanup = () => {
71
+ for (let i = 0; i < refs.length; i += 1) {
72
+ const ref = refs[i];
73
+ if (ref == null) {
74
+ continue;
75
+ }
76
+ switch (typeof ref) {
77
+ case "function": {
78
+ const cleanupCallback = cleanupCallbacks[i];
79
+ if (typeof cleanupCallback === "function") {
80
+ cleanupCallback();
81
+ } else {
82
+ void ref(null);
83
+ }
84
+ break;
85
+ }
86
+ case "object": {
87
+ ref.current = null;
88
+ break;
89
+ }
90
+ }
91
+ }
92
+ };
93
+ }
94
+ };
95
+ }
96
+ const majorVersion = parseInt(React.version, 10);
97
+ function isReactVersionAtLeast(reactVersionToCheck) {
98
+ return majorVersion >= reactVersionToCheck;
99
+ }
100
+ function getReactElementRef(element) {
101
+ if (!/* @__PURE__ */ React.isValidElement(element)) {
102
+ return null;
103
+ }
104
+ const reactElement = element;
105
+ const propsWithRef = reactElement.props;
106
+ return (isReactVersionAtLeast(19) ? propsWithRef == null ? void 0 : propsWithRef.ref : reactElement.ref) ?? null;
107
+ }
108
+ function mergeObjects(a, b) {
109
+ if (a && !b) {
110
+ return a;
111
+ }
112
+ if (!a && b) {
113
+ return b;
114
+ }
115
+ if (a || b) {
116
+ return {
117
+ ...a,
118
+ ...b
119
+ };
120
+ }
121
+ return void 0;
122
+ }
123
+ let loggedMessages;
124
+ if (process.env.NODE_ENV !== "production") {
125
+ loggedMessages = /* @__PURE__ */ new Set();
126
+ }
127
+ function createLogOnce(severity, prefix) {
128
+ return function logOnce(...messages) {
129
+ if (process.env.NODE_ENV !== "production") {
130
+ const message = messages.join(" ");
131
+ const output = `${prefix}: ${message}`;
132
+ const key = `${severity}:${output}`;
133
+ if (!loggedMessages.has(key)) {
134
+ loggedMessages.add(key);
135
+ if (severity === "warn") {
136
+ console.warn(output);
137
+ } else {
138
+ console.error(output);
139
+ }
140
+ }
141
+ }
142
+ };
143
+ }
144
+ const warn = createLogOnce("warn", "Base UI");
145
+ function NOOP() {
146
+ }
147
+ const EMPTY_ARRAY = Object.freeze([]);
148
+ const EMPTY_OBJECT = Object.freeze({});
149
+ function getStateAttributesProps(state, customMapping) {
150
+ const props = {};
151
+ for (const key in state) {
152
+ const value = state[key];
153
+ if (customMapping == null ? void 0 : customMapping.hasOwnProperty(key)) {
154
+ const customProps = customMapping[key](value);
155
+ if (customProps != null) {
156
+ Object.assign(props, customProps);
157
+ }
158
+ continue;
159
+ }
160
+ if (value === true) {
161
+ props[`data-${key.toLowerCase()}`] = "";
162
+ } else if (value) {
163
+ props[`data-${key.toLowerCase()}`] = value.toString();
164
+ }
165
+ }
166
+ return props;
167
+ }
168
+ function resolveClassName(className, state) {
169
+ return typeof className === "function" ? className(state) : className;
170
+ }
171
+ function resolveStyle(style, state) {
172
+ return typeof style === "function" ? style(state) : style;
173
+ }
174
+ const EMPTY_PROPS = {};
175
+ function mergeProps(a, b, c, d, e) {
176
+ if (!c && !d && true && !a) {
177
+ return createInitialMergedProps(b);
178
+ }
179
+ let merged = createInitialMergedProps(a);
180
+ if (b) {
181
+ merged = mergeInto(merged, b);
182
+ }
183
+ if (c) {
184
+ merged = mergeInto(merged, c);
185
+ }
186
+ if (d) {
187
+ merged = mergeInto(merged, d);
188
+ }
189
+ return merged;
190
+ }
191
+ function mergePropsN(props) {
192
+ if (props.length === 0) {
193
+ return EMPTY_PROPS;
194
+ }
195
+ if (props.length === 1) {
196
+ return createInitialMergedProps(props[0]);
197
+ }
198
+ let merged = createInitialMergedProps(props[0]);
199
+ for (let i = 1; i < props.length; i += 1) {
200
+ merged = mergeInto(merged, props[i]);
201
+ }
202
+ return merged;
203
+ }
204
+ function createInitialMergedProps(inputProps) {
205
+ if (isPropsGetter(inputProps)) {
206
+ return {
207
+ ...inputProps(EMPTY_PROPS)
208
+ };
209
+ }
210
+ return copyInitialProps(inputProps);
211
+ }
212
+ function mergeInto(merged, inputProps) {
213
+ if (isPropsGetter(inputProps)) {
214
+ return inputProps(merged);
215
+ }
216
+ return mutablyMergeInto(merged, inputProps);
217
+ }
218
+ function copyInitialProps(inputProps) {
219
+ const copiedProps = {
220
+ ...inputProps
221
+ };
222
+ for (const propName in copiedProps) {
223
+ const propValue = copiedProps[propName];
224
+ if (isEventHandler(propName, propValue)) {
225
+ copiedProps[propName] = wrapEventHandler(propValue);
226
+ }
227
+ }
228
+ return copiedProps;
229
+ }
230
+ function mutablyMergeInto(mergedProps, externalProps) {
231
+ if (!externalProps) {
232
+ return mergedProps;
233
+ }
234
+ for (const propName in externalProps) {
235
+ const externalPropValue = externalProps[propName];
236
+ switch (propName) {
237
+ case "style": {
238
+ mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
239
+ break;
240
+ }
241
+ case "className": {
242
+ mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
243
+ break;
244
+ }
245
+ default: {
246
+ if (isEventHandler(propName, externalPropValue)) {
247
+ mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
248
+ } else {
249
+ mergedProps[propName] = externalPropValue;
250
+ }
251
+ }
252
+ }
253
+ }
254
+ return mergedProps;
255
+ }
256
+ function isEventHandler(key, value) {
257
+ const code0 = key.charCodeAt(0);
258
+ const code1 = key.charCodeAt(1);
259
+ const code2 = key.charCodeAt(2);
260
+ return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
261
+ }
262
+ function isPropsGetter(inputProps) {
263
+ return typeof inputProps === "function";
264
+ }
265
+ function mergeEventHandlers(ourHandler, theirHandler) {
266
+ if (!theirHandler) {
267
+ return ourHandler;
268
+ }
269
+ if (!ourHandler) {
270
+ return wrapEventHandler(theirHandler);
271
+ }
272
+ return (...args) => {
273
+ const event = args[0];
274
+ if (isSyntheticEvent(event)) {
275
+ const baseUIEvent = event;
276
+ makeEventPreventable(baseUIEvent);
277
+ const result2 = theirHandler(...args);
278
+ if (!baseUIEvent.baseUIHandlerPrevented) {
279
+ ourHandler == null ? void 0 : ourHandler(...args);
280
+ }
281
+ return result2;
282
+ }
283
+ const result = theirHandler(...args);
284
+ ourHandler == null ? void 0 : ourHandler(...args);
285
+ return result;
286
+ };
287
+ }
288
+ function wrapEventHandler(handler) {
289
+ if (!handler) {
290
+ return handler;
291
+ }
292
+ return (...args) => {
293
+ const event = args[0];
294
+ if (isSyntheticEvent(event)) {
295
+ makeEventPreventable(event);
296
+ }
297
+ return handler(...args);
298
+ };
299
+ }
300
+ function makeEventPreventable(event) {
301
+ event.preventBaseUIHandler = () => {
302
+ event.baseUIHandlerPrevented = true;
303
+ };
304
+ return event;
305
+ }
306
+ function mergeClassNames(ourClassName, theirClassName) {
307
+ if (theirClassName) {
308
+ if (ourClassName) {
309
+ return theirClassName + " " + ourClassName;
310
+ }
311
+ return theirClassName;
312
+ }
313
+ return ourClassName;
314
+ }
315
+ function isSyntheticEvent(event) {
316
+ return event != null && typeof event === "object" && "nativeEvent" in event;
317
+ }
318
+ function useRenderElement(element, componentProps, params = {}) {
319
+ let renderProp = componentProps.render;
320
+ if (params.enabled !== false) {
321
+ renderProp = unwrapLazyRenderProp(renderProp);
322
+ }
323
+ const outProps = useRenderElementProps(componentProps, params, renderProp);
324
+ if (params.enabled === false) {
325
+ return null;
326
+ }
327
+ const state = params.state ?? EMPTY_OBJECT;
328
+ return evaluateRenderProp(element, renderProp, outProps, state);
329
+ }
330
+ function useRenderElementProps(componentProps, params, renderProp) {
331
+ const {
332
+ className: classNameProp,
333
+ style: styleProp
334
+ } = componentProps;
335
+ const {
336
+ state = EMPTY_OBJECT,
337
+ ref,
338
+ props,
339
+ stateAttributesMapping,
340
+ enabled = true
341
+ } = params;
342
+ const className = enabled ? resolveClassName(classNameProp, state) : void 0;
343
+ const style = enabled ? resolveStyle(styleProp, state) : void 0;
344
+ const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
345
+ const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
346
+ const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
347
+ if (typeof document !== "undefined") {
348
+ if (!enabled) {
349
+ void useMergedRefs(null, null);
350
+ } else if (Array.isArray(ref)) {
351
+ outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
352
+ } else {
353
+ outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
354
+ }
355
+ }
356
+ if (!enabled) {
357
+ return EMPTY_OBJECT;
358
+ }
359
+ if (className !== void 0) {
360
+ outProps.className = mergeClassNames(outProps.className, className);
361
+ }
362
+ if (style !== void 0) {
363
+ outProps.style = mergeObjects(outProps.style, style);
364
+ }
365
+ return outProps;
366
+ }
367
+ function resolveRenderFunctionProps(props) {
368
+ if (Array.isArray(props)) {
369
+ return mergePropsN(props);
370
+ }
371
+ return mergeProps(void 0, props);
372
+ }
373
+ const REACT_LAZY_TYPE = Symbol.for("react.lazy");
374
+ const COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
375
+ const LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
376
+ function unwrapLazyRenderProp(render) {
377
+ if ((render == null ? void 0 : render.$$typeof) !== REACT_LAZY_TYPE) {
378
+ return render;
379
+ }
380
+ const unwrapped = React.Children.toArray(render)[0];
381
+ return /* @__PURE__ */ React.isValidElement(unwrapped) ? unwrapped : render;
382
+ }
383
+ function evaluateRenderProp(element, render, props, state) {
384
+ if (render) {
385
+ if (typeof render === "function") {
386
+ if (process.env.NODE_ENV !== "production") {
387
+ warnIfRenderPropLooksLikeComponent(render);
388
+ }
389
+ return render(props, state);
390
+ }
391
+ const mergedProps = mergeProps(props, render.props);
392
+ mergedProps.ref = props.ref;
393
+ if (process.env.NODE_ENV !== "production") {
394
+ if (!/* @__PURE__ */ React.isValidElement(render)) {
395
+ throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
396
+ }
397
+ }
398
+ return /* @__PURE__ */ React.cloneElement(render, mergedProps);
399
+ }
400
+ return renderTag(element, props);
401
+ }
402
+ function warnIfRenderPropLooksLikeComponent(renderFn) {
403
+ const functionName = renderFn.name;
404
+ if (functionName.length === 0) {
405
+ return;
406
+ }
407
+ if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
408
+ return;
409
+ }
410
+ if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
411
+ return;
412
+ }
413
+ warn(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
414
+ }
415
+ function renderTag(Tag, props) {
416
+ if (Tag === "button") {
417
+ return /* @__PURE__ */ createElement("button", {
418
+ type: "button",
419
+ ...props,
420
+ key: props.key
421
+ });
422
+ }
423
+ if (Tag === "img") {
424
+ return /* @__PURE__ */ createElement("img", {
425
+ alt: "",
426
+ ...props,
427
+ key: props.key
428
+ });
429
+ }
430
+ return /* @__PURE__ */ React.createElement(Tag, props);
431
+ }
432
+ function createFormatErrorMessage(baseUrl, prefix) {
433
+ return function formatErrorMessage2(code, ...args) {
434
+ const url = new URL(baseUrl);
435
+ url.searchParams.set("code", code.toString());
436
+ args.forEach((arg) => url.searchParams.append("args[]", arg));
437
+ return `${prefix} error #${code}; visit ${url} for the full message.`;
438
+ };
439
+ }
440
+ const formatErrorMessage = createFormatErrorMessage("https://base-ui.com/production-error", "Base UI");
441
+ const SafeReact = {
442
+ ...React
443
+ };
444
+ const useInsertionEffect = SafeReact.useInsertionEffect;
445
+ const useSafeInsertionEffect = (
446
+ // React 17 doesn't have useInsertionEffect.
447
+ useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
448
+ useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
449
+ );
450
+ function useStableCallback(callback) {
451
+ const stable = useRefWithInit(createStableCallback).current;
452
+ stable.next = callback;
453
+ useSafeInsertionEffect(stable.effect);
454
+ return stable.trampoline;
455
+ }
456
+ function createStableCallback() {
457
+ const stable = {
458
+ next: void 0,
459
+ callback: assertNotCalled,
460
+ trampoline: (...args) => {
461
+ var _a;
462
+ return (_a = stable.callback) == null ? void 0 : _a.call(stable, ...args);
463
+ },
464
+ effect: () => {
465
+ stable.callback = stable.next;
466
+ }
467
+ };
468
+ return stable;
469
+ }
470
+ function assertNotCalled() {
471
+ if (process.env.NODE_ENV !== "production") {
472
+ throw (
473
+ /* minify-error-disabled */
474
+ new Error("Base UI: Cannot call an event handler while rendering.")
475
+ );
476
+ }
477
+ }
478
+ const noop = () => {
479
+ };
480
+ const useIsoLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : noop;
481
+ export {
482
+ EMPTY_ARRAY as E,
483
+ NOOP as N,
484
+ SafeReact as S,
485
+ useStableCallback as a,
486
+ useRenderElement as b,
487
+ useMergedRefs as c,
488
+ EMPTY_OBJECT as d,
489
+ useRefWithInit as e,
490
+ formatErrorMessage as f,
491
+ makeEventPreventable as g,
492
+ createLogOnce as h,
493
+ isReactVersionAtLeast as i,
494
+ mergeProps as m,
495
+ resolveStyle as r,
496
+ useIsoLayoutEffect as u,
497
+ warn as w
498
+ };
499
+ //# sourceMappingURL=useIsoLayoutEffect-e9VA-ICd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsoLayoutEffect-e9VA-ICd.js","sources":["../node_modules/@base-ui/utils/useRefWithInit.mjs","../node_modules/@base-ui/utils/useMergedRefs.mjs","../node_modules/@base-ui/utils/reactVersion.mjs","../node_modules/@base-ui/utils/getReactElementRef.mjs","../node_modules/@base-ui/utils/mergeObjects.mjs","../node_modules/@base-ui/utils/createLogOnce.mjs","../node_modules/@base-ui/utils/warn.mjs","../node_modules/@base-ui/utils/empty.mjs","../node_modules/@base-ui/react/internals/getStateAttributesProps.mjs","../node_modules/@base-ui/react/utils/resolveClassName.mjs","../node_modules/@base-ui/react/utils/resolveStyle.mjs","../node_modules/@base-ui/react/merge-props/mergeProps.mjs","../node_modules/@base-ui/react/internals/useRenderElement.mjs","../node_modules/@base-ui/utils/formatErrorMessage.mjs","../node_modules/@base-ui/utils/safeReact.mjs","../node_modules/@base-ui/utils/useStableCallback.mjs","../node_modules/@base-ui/utils/useIsoLayoutEffect.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useRefWithInit(sortColumns, columns)\n */\n\nexport function useRefWithInit(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","import { useRefWithInit } from \"./useRefWithInit.mjs\";\n\n/**\n * Merges refs into a single memoized callback ref or `null`.\n * This makes sure multiple refs are updated together and have the same value.\n *\n * This function accepts up to four refs. If you need to merge more, or have an unspecified number of refs to merge,\n * use `useMergedRefsN` instead.\n */\n\nexport function useMergedRefs(a, b, c, d) {\n const forkRef = useRefWithInit(createForkRef).current;\n if (didChange(forkRef, a, b, c, d)) {\n update(forkRef, [a, b, c, d]);\n }\n return forkRef.callback;\n}\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n *\n * If you need to merge a fixed number (up to four) of refs, use `useMergedRefs` instead for better performance.\n */\nexport function useMergedRefsN(refs) {\n const forkRef = useRefWithInit(createForkRef).current;\n if (didChangeN(forkRef, refs)) {\n update(forkRef, refs);\n }\n return forkRef.callback;\n}\nfunction createForkRef() {\n return {\n callback: null,\n cleanup: null,\n refs: []\n };\n}\nfunction didChange(forkRef, a, b, c, d) {\n // prettier-ignore\n return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;\n}\nfunction didChangeN(forkRef, newRefs) {\n return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);\n}\nfunction update(forkRef, refs) {\n forkRef.refs = refs;\n if (refs.every(ref => ref == null)) {\n forkRef.callback = null;\n return;\n }\n forkRef.callback = instance => {\n if (forkRef.cleanup) {\n forkRef.cleanup();\n forkRef.cleanup = null;\n }\n if (instance != null) {\n const cleanupCallbacks = Array(refs.length).fill(null);\n for (let i = 0; i < refs.length; i += 1) {\n const ref = refs[i];\n if (ref == null) {\n continue;\n }\n switch (typeof ref) {\n case 'function':\n {\n const refCleanup = ref(instance);\n if (typeof refCleanup === 'function') {\n cleanupCallbacks[i] = refCleanup;\n }\n break;\n }\n case 'object':\n {\n ref.current = instance;\n break;\n }\n default:\n }\n }\n forkRef.cleanup = () => {\n for (let i = 0; i < refs.length; i += 1) {\n const ref = refs[i];\n if (ref == null) {\n continue;\n }\n switch (typeof ref) {\n case 'function':\n {\n const cleanupCallback = cleanupCallbacks[i];\n if (typeof cleanupCallback === 'function') {\n cleanupCallback();\n } else {\n // Legacy ref with no attach-time cleanup: detach by calling it with `null`.\n // It returns nothing; React 19 cleanups are handled in the branch above.\n void ref(null);\n }\n break;\n }\n case 'object':\n {\n ref.current = null;\n break;\n }\n default:\n }\n }\n };\n }\n };\n}","import * as React from 'react';\nconst majorVersion = parseInt(React.version, 10);\nexport function isReactVersionAtLeast(reactVersionToCheck) {\n return majorVersion >= reactVersionToCheck;\n}","import * as React from 'react';\nimport { isReactVersionAtLeast } from \"./reactVersion.mjs\";\n\n/**\n * Extracts the `ref` from a React element, handling different React versions.\n */\nexport function getReactElementRef(element) {\n if (! /*#__PURE__*/React.isValidElement(element)) {\n return null;\n }\n const reactElement = element;\n const propsWithRef = reactElement.props;\n return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;\n}","export function mergeObjects(a, b) {\n if (a && !b) {\n return a;\n }\n if (!a && b) {\n return b;\n }\n if (a || b) {\n return {\n ...a,\n ...b\n };\n }\n return undefined;\n}","let loggedMessages;\nif (process.env.NODE_ENV !== 'production') {\n loggedMessages = new Set();\n}\n\n/** Creates a dev-only logger that writes each unique message to `console[severity]` once. */\nexport function createLogOnce(severity, prefix) {\n return function logOnce(...messages) {\n if (process.env.NODE_ENV !== 'production') {\n const message = messages.join(' ');\n const output = prefix ? `${prefix}: ${message}` : message;\n const key = `${severity}:${output}`;\n if (!loggedMessages.has(key)) {\n loggedMessages.add(key);\n if (severity === 'warn') {\n console.warn(output);\n } else {\n console.error(output);\n }\n }\n }\n };\n}\nexport function reset() {\n loggedMessages?.clear();\n}","import { createLogOnce } from \"./createLogOnce.mjs\";\nexport const warn = createLogOnce('warn', 'Base UI');\nexport { reset } from \"./createLogOnce.mjs\";","export function NOOP() {}\n\n// Typed as mutable `never[]` so it is assignable to any `T[]` fallback (for example\n// `defaultValue ?? EMPTY_ARRAY` in `useControlled` callers) without widening `T`.\n// Frozen so a write through a widened alias throws instead of mutating the shared singleton.\nexport const EMPTY_ARRAY = Object.freeze([]);\nexport const EMPTY_OBJECT = Object.freeze({});","export function getStateAttributesProps(state, customMapping) {\n const props = {};\n\n /* eslint-disable-next-line guard-for-in */\n for (const key in state) {\n const value = state[key];\n if (customMapping?.hasOwnProperty(key)) {\n const customProps = customMapping[key](value);\n if (customProps != null) {\n Object.assign(props, customProps);\n }\n continue;\n }\n if (value === true) {\n props[`data-${key.toLowerCase()}`] = '';\n } else if (value) {\n props[`data-${key.toLowerCase()}`] = value.toString();\n }\n }\n return props;\n}","/**\n * If the provided className is a string, it will be returned as is.\n * Otherwise, the function will call the className function with the state as the first argument.\n *\n * @param className\n * @param state\n */\nexport function resolveClassName(className, state) {\n return typeof className === 'function' ? className(state) : className;\n}","/**\n * If the provided style is an object, it will be returned as is.\n * Otherwise, the function will call the style function with the state as the first argument.\n *\n * @param style\n * @param state\n */\nexport function resolveStyle(style, state) {\n return typeof style === 'function' ? style(state) : style;\n}","import { mergeObjects } from '@base-ui/utils/mergeObjects';\nconst EMPTY_PROPS = {};\n\n/* eslint-disable id-denylist */\n/**\n * Merges multiple sets of React props. It follows the Object.assign pattern where the rightmost object's fields overwrite\n * the conflicting ones from others. This doesn't apply to event handlers, `className` and `style` props.\n *\n * Event handlers are merged and called in right-to-left order (rightmost handler executes first, leftmost last).\n * For React synthetic events, the rightmost handler can prevent prior (left-positioned) handlers from executing\n * by calling `event.preventBaseUIHandler()`. For non-synthetic events (custom events with primitive/object values),\n * all handlers always execute without prevention capability.\n *\n * The `className` prop is merged by concatenating classes in right-to-left order (rightmost class appears first in the string).\n * The `style` prop is merged with rightmost styles overwriting the prior ones.\n *\n * Props can either be provided as objects or as functions that take the previous props as an argument.\n * The function will receive the merged props up to that point (going from left to right):\n * so in the case of `(obj1, obj2, fn, obj3)`, `fn` will receive the merged props of `obj1` and `obj2`.\n * The function is responsible for chaining event handlers if needed (that is, we don't run the merge logic).\n *\n * Event handlers returned by the functions are not automatically prevented when `preventBaseUIHandler` is called.\n * They must check `event.baseUIHandlerPrevented` themselves and bail out if it's true.\n *\n * @important **`ref` is not merged.**\n * @param a Props object to merge.\n * @param b Props object to merge. The function will overwrite conflicting props from `a`.\n * @param c Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @param d Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @param e Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @returns The merged props.\n * @public\n */\n\nexport function mergeProps(a, b, c, d, e) {\n if (!c && !d && !e && !a) {\n return createInitialMergedProps(b);\n }\n\n // We need to mutably own `merged`.\n let merged = createInitialMergedProps(a);\n if (b) {\n merged = mergeInto(merged, b);\n }\n if (c) {\n merged = mergeInto(merged, c);\n }\n if (d) {\n merged = mergeInto(merged, d);\n }\n if (e) {\n merged = mergeInto(merged, e);\n }\n return merged;\n}\n/* eslint-enable id-denylist */\n\n/**\n * Merges an arbitrary number of React props using the same logic as {@link mergeProps}.\n * This function accepts an array of props instead of individual arguments.\n *\n * This has slightly lower performance than {@link mergeProps} due to accepting an array\n * instead of a fixed number of arguments. Prefer {@link mergeProps} when merging 5 or\n * fewer prop sets for better performance.\n *\n * @param props Array of props to merge.\n * @returns The merged props.\n * @see mergeProps\n * @public\n */\nexport function mergePropsN(props) {\n if (props.length === 0) {\n return EMPTY_PROPS;\n }\n if (props.length === 1) {\n return createInitialMergedProps(props[0]);\n }\n\n // We need to mutably own `merged`.\n let merged = createInitialMergedProps(props[0]);\n for (let i = 1; i < props.length; i += 1) {\n merged = mergeInto(merged, props[i]);\n }\n return merged;\n}\nfunction createInitialMergedProps(inputProps) {\n if (isPropsGetter(inputProps)) {\n // Getter-returned handlers intentionally keep their existing semantics.\n return {\n ...inputProps(EMPTY_PROPS)\n };\n }\n return copyInitialProps(inputProps);\n}\nfunction mergeInto(merged, inputProps) {\n if (isPropsGetter(inputProps)) {\n return inputProps(merged);\n }\n return mutablyMergeInto(merged, inputProps);\n}\nfunction copyInitialProps(inputProps) {\n const copiedProps = {\n ...inputProps\n };\n\n // `copiedProps` is our fresh own-object copy, so iterating with `for...in` is safe here.\n // eslint-disable-next-line guard-for-in\n for (const propName in copiedProps) {\n const propValue = copiedProps[propName];\n if (isEventHandler(propName, propValue)) {\n copiedProps[propName] = wrapEventHandler(propValue);\n }\n }\n return copiedProps;\n}\n\n/**\n * Merges two sets of props. In case of conflicts, the external props take precedence.\n */\nfunction mutablyMergeInto(mergedProps, externalProps) {\n if (!externalProps) {\n return mergedProps;\n }\n\n // eslint-disable-next-line guard-for-in\n for (const propName in externalProps) {\n const externalPropValue = externalProps[propName];\n switch (propName) {\n case 'style':\n {\n mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);\n break;\n }\n case 'className':\n {\n mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);\n break;\n }\n default:\n {\n if (isEventHandler(propName, externalPropValue)) {\n mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);\n } else {\n mergedProps[propName] = externalPropValue;\n }\n }\n }\n }\n return mergedProps;\n}\nfunction isEventHandler(key, value) {\n // This approach is more efficient than using a regex.\n const code0 = key.charCodeAt(0);\n const code1 = key.charCodeAt(1);\n const code2 = key.charCodeAt(2);\n return code0 === 111 /* o */ && code1 === 110 /* n */ && code2 >= 65 /* A */ && code2 <= 90 /* Z */ && (typeof value === 'function' || typeof value === 'undefined');\n}\nfunction isPropsGetter(inputProps) {\n return typeof inputProps === 'function';\n}\nfunction mergeEventHandlers(ourHandler, theirHandler) {\n if (!theirHandler) {\n return ourHandler;\n }\n if (!ourHandler) {\n return wrapEventHandler(theirHandler);\n }\n return (...args) => {\n const event = args[0];\n if (isSyntheticEvent(event)) {\n const baseUIEvent = event;\n makeEventPreventable(baseUIEvent);\n const result = theirHandler(...args);\n if (!baseUIEvent.baseUIHandlerPrevented) {\n ourHandler?.(...args);\n }\n return result;\n }\n const result = theirHandler(...args);\n ourHandler?.(...args);\n return result;\n };\n}\nfunction wrapEventHandler(handler) {\n if (!handler) {\n return handler;\n }\n return (...args) => {\n const event = args[0];\n if (isSyntheticEvent(event)) {\n makeEventPreventable(event);\n }\n return handler(...args);\n };\n}\nexport function makeEventPreventable(event) {\n event.preventBaseUIHandler = () => {\n event.baseUIHandlerPrevented = true;\n };\n return event;\n}\nexport function mergeClassNames(ourClassName, theirClassName) {\n if (theirClassName) {\n if (ourClassName) {\n // eslint-disable-next-line prefer-template\n return theirClassName + ' ' + ourClassName;\n }\n return theirClassName;\n }\n return ourClassName;\n}\nfunction isSyntheticEvent(event) {\n return event != null && typeof event === 'object' && 'nativeEvent' in event;\n}","import * as React from 'react';\nimport { useMergedRefs, useMergedRefsN } from '@base-ui/utils/useMergedRefs';\nimport { getReactElementRef } from '@base-ui/utils/getReactElementRef';\nimport { mergeObjects } from '@base-ui/utils/mergeObjects';\nimport { warn } from '@base-ui/utils/warn';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { getStateAttributesProps } from \"./getStateAttributesProps.mjs\";\nimport { resolveClassName } from \"../utils/resolveClassName.mjs\";\nimport { resolveStyle } from \"../utils/resolveStyle.mjs\";\nimport { mergeProps, mergePropsN, mergeClassNames } from \"../merge-props/index.mjs\";\nimport { createElement as _createElement } from \"react\";\n/**\n * Renders a Base UI element.\n *\n * @param element The default HTML element to render. Can be overridden by the `render` prop.\n * @param componentProps An object containing the `render` and `className` props to be used for element customization. Other props are ignored.\n * @param params Additional parameters for rendering the element.\n */\nexport function useRenderElement(element, componentProps, params = {}) {\n let renderProp = componentProps.render;\n if (params.enabled !== false) {\n // A pending lazy element suspends when unwrapped, so leave it wrapped while disabled.\n renderProp = unwrapLazyRenderProp(renderProp);\n }\n const outProps = useRenderElementProps(componentProps, params, renderProp);\n if (params.enabled === false) {\n return null;\n }\n const state = params.state ?? EMPTY_OBJECT;\n return evaluateRenderProp(element, renderProp, outProps, state);\n}\n\n/**\n * Computes render element final props.\n */\nfunction useRenderElementProps(componentProps, params, renderProp) {\n const {\n className: classNameProp,\n style: styleProp\n } = componentProps;\n const {\n state = EMPTY_OBJECT,\n ref,\n props,\n stateAttributesMapping,\n enabled = true\n } = params;\n const className = enabled ? resolveClassName(classNameProp, state) : undefined;\n const style = enabled ? resolveStyle(styleProp, state) : undefined;\n const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;\n const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : undefined;\n\n // Ensure outProps is always a new mutable object when enabled, never EMPTY_OBJECT.\n // This prevents potential TypeError when setting ref, className, or style properties,\n // since EMPTY_OBJECT is frozen and mutations would fail in strict mode.\n const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;\n\n // SAFETY: The `useMergedRefs` functions use a single hook to store the same value,\n // switching between them at runtime is safe. If this assertion fails, React will\n // throw at runtime anyway.\n // This also skips the `useMergedRefs` call on the server, which is fine because\n // refs are not used on the server side.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (typeof document !== 'undefined') {\n if (!enabled) {\n // Called only to keep the hook order stable when disabled; the merged ref is unused.\n void useMergedRefs(null, null);\n } else if (Array.isArray(ref)) {\n outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);\n } else {\n outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);\n }\n }\n if (!enabled) {\n return EMPTY_OBJECT;\n }\n if (className !== undefined) {\n outProps.className = mergeClassNames(outProps.className, className);\n }\n if (style !== undefined) {\n outProps.style = mergeObjects(outProps.style, style);\n }\n return outProps;\n}\nfunction resolveRenderFunctionProps(props) {\n if (Array.isArray(props)) {\n return mergePropsN(props);\n }\n return mergeProps(undefined, props);\n}\n\n// The symbol React uses internally for lazy components\n// https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31\n//\n// TODO delete once https://github.com/react/react/issues/32392 is fixed\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\nconst COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;\nconst LOWERCASE_CHARACTER_PATTERN = /[a-z]/;\n\n// Workaround for https://github.com/react/react/issues/32392\n// The Flight client hands over a lazy wrapper in place of a render element created in a\n// Server Component. The wrapper exposes no `.props` or `.ref`, so it must be unwrapped\n// before those are read. This works because the toArray() logic unwraps the lazy\n// element type in\n// https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/react/src/ReactChildren.js#L186\nexport function unwrapLazyRenderProp(render) {\n // `$$typeof` is a React internal, absent from the public element types.\n if (render?.$$typeof !== REACT_LAZY_TYPE) {\n return render;\n }\n // Keep the wrapper unless it unwraps to an element, so an invalid render prop is still\n // reported as one instead of silently falling back to the default element.\n const unwrapped = React.Children.toArray(render)[0];\n return /*#__PURE__*/React.isValidElement(unwrapped) ? unwrapped : render;\n}\nfunction evaluateRenderProp(element, render, props, state) {\n if (render) {\n if (typeof render === 'function') {\n if (process.env.NODE_ENV !== 'production') {\n warnIfRenderPropLooksLikeComponent(render);\n }\n return render(props, state);\n }\n const mergedProps = mergeProps(props, render.props);\n mergedProps.ref = props.ref;\n\n // There is a high number of indirections, the error message thrown by React.cloneElement() is\n // hard to use for developers, this logic provides a better context.\n //\n // Our general guideline is to never change the control flow depending on the environment.\n // However, React.cloneElement() throws if React.isValidElement() is false,\n // so we can throw before with custom message.\n if (process.env.NODE_ENV !== 'production') {\n if (! /*#__PURE__*/React.isValidElement(render)) {\n // TODO: fix mui/no-guarded-throw\n // eslint-disable-next-line mui/no-guarded-throw\n throw new Error(['Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.', 'A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.', 'https://base-ui.com/r/invalid-render-prop'].join('\\n'));\n }\n }\n return /*#__PURE__*/React.cloneElement(render, mergedProps);\n }\n // `element` is always provided when there is no `render` prop.\n return renderTag(element, props);\n}\nfunction warnIfRenderPropLooksLikeComponent(renderFn) {\n const functionName = renderFn.name;\n if (functionName.length === 0) {\n return;\n }\n if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {\n return;\n }\n if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {\n return;\n }\n warn(`The \\`render\\` prop received a function named \\`${functionName}\\` that starts with an uppercase letter.`, 'This usually means a React component was passed directly as `render={Component}`.', 'Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.', 'If this is an intentional render callback, rename it to start with a lowercase letter.', 'Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.', 'https://base-ui.com/r/invalid-render-prop');\n}\nfunction renderTag(Tag, props) {\n if (Tag === 'button') {\n return /*#__PURE__*/_createElement(\"button\", {\n type: \"button\",\n ...props,\n key: props.key\n });\n }\n if (Tag === 'img') {\n return /*#__PURE__*/_createElement(\"img\", {\n alt: \"\",\n ...props,\n key: props.key\n });\n }\n return /*#__PURE__*/React.createElement(Tag, props);\n}","/**\n * Creates a formatErrorMessage function with a custom URL and prefix.\n * @param baseUrl - The base URL for the error page (e.g., 'https://base-ui.com/production-error')\n * @param prefix - The prefix for the error message (e.g., 'Base UI')\n * @returns A function that formats error messages with the given URL and prefix\n */\nexport function createFormatErrorMessage(baseUrl, prefix) {\n return function formatErrorMessage(code, ...args) {\n const url = new URL(baseUrl);\n url.searchParams.set('code', code.toString());\n args.forEach(arg => url.searchParams.append('args[]', arg));\n return `${prefix} error #${code}; visit ${url} for the full message.`;\n };\n}\n\n/**\n * WARNING: Don't import this directly. It's imported by the code generated by\n * `@mui/internal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`\n * constructors to ensure the plugin works as expected. Supported patterns include:\n * throw new Error('My message');\n * throw new Error(`My message: ${foo}`);\n * throw new Error(`My message: ${foo}` + 'another string');\n * ...\n */\nconst formatErrorMessage = createFormatErrorMessage('https://base-ui.com/production-error', 'Base UI');\nexport default formatErrorMessage;","import * as React from 'react';\n\n/**\n * A clone of the React namespace for reading APIs that may be missing in older\n * supported React versions. Bundlers can rewrite direct `React.someNewApi`\n * reads into named imports, which breaks React 17. Reading from this cloned\n * object keeps those lookups optional.\n *\n * @see https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\n */\nexport const SafeReact = {\n ...React\n};","'use client';\n\nimport { SafeReact } from \"./safeReact.mjs\";\nimport { useRefWithInit } from \"./useRefWithInit.mjs\";\nconst useInsertionEffect = SafeReact.useInsertionEffect;\nconst useSafeInsertionEffect =\n// React 17 doesn't have useInsertionEffect.\nuseInsertionEffect &&\n// Preact replaces useInsertionEffect with useLayoutEffect and fires too late.\nuseInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : fn => fn();\n/**\n * Stabilizes the function passed so it's always the same between renders.\n *\n * The function becomes non-reactive to any values it captures.\n * It can safely be passed as a dependency of `React.useMemo` and `React.useEffect` without re-triggering them if its captured values change.\n *\n * The function must only be called inside effects and event handlers, never during render (which throws an error).\n *\n * This hook is a more permissive version of React 19.2's `React.useEffectEvent` in that it can be passed through contexts and called in event handler props, not just effects.\n */\nexport function useStableCallback(callback) {\n const stable = useRefWithInit(createStableCallback).current;\n stable.next = callback;\n useSafeInsertionEffect(stable.effect);\n return stable.trampoline;\n}\nfunction createStableCallback() {\n const stable = {\n next: undefined,\n callback: assertNotCalled,\n trampoline: (...args) => stable.callback?.(...args),\n effect: () => {\n stable.callback = stable.next;\n }\n };\n return stable;\n}\nfunction assertNotCalled() {\n if (process.env.NODE_ENV !== 'production') {\n // TODO: fix mui/no-guarded-throw\n // eslint-disable-next-line mui/no-guarded-throw\n throw /* minify-error-disabled */new Error('Base UI: Cannot call an event handler while rendering.');\n }\n}","'use client';\n\nimport * as React from 'react';\nconst noop = () => {};\nexport const useIsoLayoutEffect = typeof document !== 'undefined' ? React.useLayoutEffect : noop;"],"names":["result","_createElement","formatErrorMessage"],"mappings":";;AAGA,MAAM,gBAAgB,CAAA;AAUf,SAAS,eAAe,MAAM,SAAS;AAC5C,QAAM,MAAM,MAAM,OAAO,aAAa;AACtC,MAAI,IAAI,YAAY,eAAe;AACjC,QAAI,UAAU,KAAK,OAAO;AAAA,EAC5B;AACA,SAAO;AACT;ACTO,SAAS,cAAc,GAAG,GAAG,GAAG,GAAG;AACxC,QAAM,UAAU,eAAe,aAAa,EAAE;AAC9C,MAAI,UAAU,SAAS,GAAG,GAAG,GAAG,CAAC,GAAG;AAClC,WAAO,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;AAAA,EAC9B;AACA,SAAO,QAAQ;AACjB;AAOO,SAAS,eAAe,MAAM;AACnC,QAAM,UAAU,eAAe,aAAa,EAAE;AAC9C,MAAI,WAAW,SAAS,IAAI,GAAG;AAC7B,WAAO,SAAS,IAAI;AAAA,EACtB;AACA,SAAO,QAAQ;AACjB;AACA,SAAS,gBAAgB;AACvB,SAAO;AAAA,IACL,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM,CAAA;AAAA,EACV;AACA;AACA,SAAS,UAAU,SAAS,GAAG,GAAG,GAAG,GAAG;AAEtC,SAAO,QAAQ,KAAK,CAAC,MAAM,KAAK,QAAQ,KAAK,CAAC,MAAM,KAAK,QAAQ,KAAK,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