tfy-web-components 0.0.44 → 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.
- package/dist/{Button-BdNaawKV.js → Button-HHEfL8b9.js} +5 -4
- package/dist/{Button-BdNaawKV.js.map → Button-HHEfL8b9.js.map} +1 -1
- package/dist/CSPContext-Cldo9QDp.js +13 -0
- package/dist/CSPContext-Cldo9QDp.js.map +1 -0
- package/dist/{CompositeItem-EOSJycCk.js → CompositeItem-GNejxLcK.js} +3 -3
- package/dist/{CompositeItem-EOSJycCk.js.map → CompositeItem-GNejxLcK.js.map} +1 -1
- package/dist/{CompositeRoot-DnijP7Jm.js → CompositeRoot-7_u1HqDT.js} +9 -47
- package/dist/CompositeRoot-7_u1HqDT.js.map +1 -0
- package/dist/DropdownMenu-Crlf-J4E.js +3304 -0
- package/dist/DropdownMenu-Crlf-J4E.js.map +1 -0
- package/dist/{Input-D0UuCXLs.js → Input-BS9fWUAf.js} +3 -3
- package/dist/{Input-D0UuCXLs.js.map → Input-BS9fWUAf.js.map} +1 -1
- package/dist/{Modal-BFnf68oS.js → Modal-DaHG8mjy.js} +10 -10
- package/dist/{Modal-BFnf68oS.js.map → Modal-DaHG8mjy.js.map} +1 -1
- package/dist/Popover-A8IyEt2w.js +400 -0
- package/dist/Popover-A8IyEt2w.js.map +1 -0
- package/dist/{Popover-B6z7exNd.js → PopoverPopup-teGm7D5T.js} +25 -498
- package/dist/PopoverPopup-teGm7D5T.js.map +1 -0
- package/dist/{PrehydrationScript--08s8Mfl.js → PrehydrationScript-B3u_PP2W.js} +5 -12
- package/dist/PrehydrationScript-B3u_PP2W.js.map +1 -0
- package/dist/Select-BtX40h2K.js +2187 -0
- package/dist/Select-BtX40h2K.js.map +1 -0
- package/dist/{useValueAsRef-BfFRcMg6.js → addEventListener-D-i9O6BG.js} +8 -8
- package/dist/addEventListener-D-i9O6BG.js.map +1 -0
- package/dist/clamp-D7_nsB8C.js +30 -0
- package/dist/clamp-D7_nsB8C.js.map +1 -0
- package/dist/components/atoms/Accordion.es.js +9 -9
- package/dist/components/atoms/Avatar.es.js +9 -9
- package/dist/components/atoms/Avatar.es.js.map +1 -1
- package/dist/components/atoms/Badge.d.ts +5 -6
- package/dist/components/atoms/Badge.es.js +80 -43
- package/dist/components/atoms/Badge.es.js.map +1 -1
- package/dist/components/atoms/Button.d.ts +1 -1
- package/dist/components/atoms/Button.es.js +2 -2
- package/dist/components/atoms/ButtonGroup.es.js +1 -1
- package/dist/components/atoms/Combobox.d.ts +34 -0
- package/dist/components/atoms/Combobox.es.js +3252 -0
- package/dist/components/atoms/Combobox.es.js.map +1 -0
- package/dist/components/atoms/ContextMenu.d.ts +12 -0
- package/dist/components/atoms/ContextMenu.es.js +259 -0
- package/dist/components/atoms/ContextMenu.es.js.map +1 -0
- package/dist/components/atoms/DropdownMenu.d.ts +51 -0
- package/dist/components/atoms/DropdownMenu.es.js +31 -0
- package/dist/components/atoms/DropdownMenu.es.js.map +1 -0
- package/dist/components/atoms/IconButton.d.ts +1 -1
- package/dist/components/atoms/IconButton.es.js +3 -3
- package/dist/components/atoms/IconButton.es.js.map +1 -1
- package/dist/components/atoms/IconProvider.es.js +3 -1
- package/dist/components/atoms/IconProvider.es.js.map +1 -1
- package/dist/components/atoms/Modal.es.js +1 -1
- package/dist/components/atoms/OverflowButton.es.js +2 -2
- package/dist/components/atoms/PaginationDot.d.ts +14 -0
- package/dist/components/atoms/PaginationDot.es.js +58 -0
- package/dist/components/atoms/PaginationDot.es.js.map +1 -0
- package/dist/components/atoms/PaginationItem.d.ts +15 -0
- package/dist/components/atoms/PaginationItem.es.js +87 -0
- package/dist/components/atoms/PaginationItem.es.js.map +1 -0
- package/dist/components/atoms/Popover.d.ts +10 -0
- package/dist/components/atoms/Popover.es.js +50 -0
- package/dist/components/atoms/Popover.es.js.map +1 -0
- package/dist/components/atoms/Select.d.ts +63 -0
- package/dist/components/atoms/Select.es.js +23 -0
- package/dist/components/atoms/Select.es.js.map +1 -0
- package/dist/components/atoms/Switch.es.js +7 -6
- package/dist/components/atoms/Switch.es.js.map +1 -1
- package/dist/components/atoms/TabButton.es.js +14 -12
- package/dist/components/atoms/TabButton.es.js.map +1 -1
- package/dist/components/atoms/Tag.d.ts +2 -2
- package/dist/components/atoms/Tag.es.js +66 -33
- package/dist/components/atoms/Tag.es.js.map +1 -1
- package/dist/components/atoms/Tooltip.es.js +1153 -19
- package/dist/components/atoms/Tooltip.es.js.map +1 -1
- package/dist/components/atoms/stories/OverlayThemePanels.d.ts +8 -0
- package/dist/components/molecules/Alert.es.js +3 -3
- package/dist/components/molecules/CopyField.es.js +2 -2
- package/dist/components/molecules/CustomDrawer.es.js +1 -1
- package/dist/components/molecules/Dialog.es.js +1 -1
- package/dist/components/molecules/ImagesPreview.es.js +2 -2
- package/dist/components/molecules/Input.es.js +2 -2
- package/dist/components/molecules/Markdown.es.js +1 -1
- package/dist/components/molecules/Pagination.d.ts +58 -0
- package/dist/components/molecules/Pagination.es.js +272 -0
- package/dist/components/molecules/Pagination.es.js.map +1 -0
- package/dist/components/molecules/SimpleCodeEditor.es.js +3 -3
- package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
- package/dist/components/molecules/TagGroup.d.ts +11 -0
- package/dist/components/molecules/TagGroup.es.js +59 -0
- package/dist/components/molecules/TagGroup.es.js.map +1 -0
- package/dist/components/molecules/ToggleButton.es.js +2 -2
- package/dist/components/molecules/agent-chat/AssistantMessage.d.ts +3 -1
- package/dist/components/molecules/agent-chat.es.js +4 -3
- package/dist/components/molecules/agent-chat.es.js.map +1 -1
- package/dist/composite-DnShFmi7.js +551 -0
- package/dist/composite-DnShFmi7.js.map +1 -0
- package/dist/{composite-BDBV1Jsx.js → composite-IA--dSel.js} +2 -2
- package/dist/{composite-BDBV1Jsx.js.map → composite-IA--dSel.js.map} +1 -1
- package/dist/constants-BaUKmVF_.js +103 -0
- package/dist/constants-BaUKmVF_.js.map +1 -0
- package/dist/{index-B6xFUIBK.js → element-B1vbc-LG.js} +69 -111
- package/dist/element-B1vbc-LG.js.map +1 -0
- package/dist/error-nCTLdGUr.js +6 -0
- package/dist/{error-FX4R42W-.js.map → error-nCTLdGUr.js.map} +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.es.js +61 -11
- package/dist/index.es.js.map +1 -1
- package/dist/{inertValue-IJM5NA30.js → inertValue-C1Ml1s55.js} +2 -2
- package/dist/{inertValue-IJM5NA30.js.map → inertValue-C1Ml1s55.js.map} +1 -1
- package/dist/isElementDisabled-lq1fKien.js +47 -0
- package/dist/isElementDisabled-lq1fKien.js.map +1 -0
- package/dist/new-components/atoms/Alert.d.ts +7 -1
- package/dist/new-components/atoms/Alert.es.js +23 -4
- package/dist/new-components/atoms/Alert.es.js.map +1 -1
- package/dist/new-components/atoms/Checkbox.es.js +8 -7
- package/dist/new-components/atoms/Checkbox.es.js.map +1 -1
- package/dist/new-components/atoms/EmptyState.d.ts +3 -0
- package/dist/new-components/atoms/EmptyState.es.js +9 -4
- package/dist/new-components/atoms/EmptyState.es.js.map +1 -1
- package/dist/new-components/atoms/Popover.es.js +3 -2
- package/dist/new-components/atoms/Popover.es.js.map +1 -1
- package/dist/new-components/atoms/Radio.es.js +13 -24
- package/dist/new-components/atoms/Radio.es.js.map +1 -1
- package/dist/new-components/atoms/SegmentedControl.es.js +7 -7
- package/dist/new-components/atoms/Slider.es.js +14 -43
- package/dist/new-components/atoms/Slider.es.js.map +1 -1
- package/dist/new-components/atoms/Toast.d.ts +8 -12
- package/dist/new-components/atoms/Toast.es.js +202 -145
- package/dist/new-components/atoms/Toast.es.js.map +1 -1
- package/dist/new-components/atoms/Toggletip.es.js +3 -2
- package/dist/new-components/atoms/Toggletip.es.js.map +1 -1
- package/dist/new-components/atoms/stories/ThemeComparison.d.ts +2 -1
- package/dist/serializeValue-BLvnTy3o.js +17 -0
- package/dist/serializeValue-BLvnTy3o.js.map +1 -0
- package/dist/stringifyLocale-DOx30wH1.js +13 -0
- package/dist/stringifyLocale-DOx30wH1.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tokens.css +3 -0
- package/dist/{useAnimationFrame-DwhymJoW.js → useAnimationFrame-DqvuRtgK.js} +2 -2
- package/dist/{useAnimationFrame-DwhymJoW.js.map → useAnimationFrame-DqvuRtgK.js.map} +1 -1
- package/dist/{useAriaLabelledBy-C9SDiruE.js → useAriaLabelledBy-CP4wKTYs.js} +3 -3
- package/dist/{useAriaLabelledBy-C9SDiruE.js.map → useAriaLabelledBy-CP4wKTYs.js.map} +1 -1
- package/dist/{useBaseUiId-jtgiQp--.js → useBaseUiId-CYT1vFMG.js} +57 -37
- package/dist/{useBaseUiId-jtgiQp--.js.map → useBaseUiId-CYT1vFMG.js.map} +1 -1
- package/dist/{useButton-BalOc_EL.js → useButton-BlHadUfM.js} +4 -4
- package/dist/{useButton-BalOc_EL.js.map → useButton-BlHadUfM.js.map} +1 -1
- package/dist/{CompositeList-D4xmSZ5V.js → useCompositeListItem-DlAKWsHE.js} +59 -59
- package/dist/useCompositeListItem-DlAKWsHE.js.map +1 -0
- package/dist/{useControlled-BSyYkg5C.js → useControlled-DMDWXIzj.js} +2 -2
- package/dist/{useControlled-BSyYkg5C.js.map → useControlled-DMDWXIzj.js.map} +1 -1
- package/dist/useFocus-C__7iwl1.js +137 -0
- package/dist/useFocus-C__7iwl1.js.map +1 -0
- package/dist/{useIsoLayoutEffect-e9VA-ICd.js → useIsoLayoutEffect-D2lpsB9D.js} +8 -4
- package/dist/{useIsoLayoutEffect-e9VA-ICd.js.map → useIsoLayoutEffect-D2lpsB9D.js.map} +1 -1
- package/dist/{usePopupHandleStore-DYUo-Fyk.js → usePopupHandleStore-C_Vw7xcw.js} +1966 -2002
- package/dist/usePopupHandleStore-C_Vw7xcw.js.map +1 -0
- package/dist/{Tooltip-6R-t7wt1.js → usePositioner-BmYVsMO_.js} +17 -1403
- package/dist/usePositioner-BmYVsMO_.js.map +1 -0
- package/dist/{useOpenInteractionType-BnUZ2Eio.js → useScrollLock-By-42HSc.js} +74 -58
- package/dist/useScrollLock-By-42HSc.js.map +1 -0
- package/dist/{useLabelableId-CQqNbBk1.js → useSetFieldFocused-CcdG6FNp.js} +27 -35
- package/dist/useSetFieldFocused-CcdG6FNp.js.map +1 -0
- package/dist/{useTimeout-BXf1hDIL.js → useTimeout-D1vYJgq4.js} +3 -3
- package/dist/{useTimeout-BXf1hDIL.js.map → useTimeout-D1vYJgq4.js.map} +1 -1
- package/dist/{useTransitionStatus-C9gg_XJ-.js → useTransitionStatus-CHrs3i5F.js} +3 -3
- package/dist/{useTransitionStatus-C9gg_XJ-.js.map → useTransitionStatus-CHrs3i5F.js.map} +1 -1
- package/dist/useTriggerFocusGuards-CXAhW8P6.js +100 -0
- package/dist/useTriggerFocusGuards-CXAhW8P6.js.map +1 -0
- package/dist/useValueChanged-BnlOop8k.js +16 -0
- package/dist/useValueChanged-BnlOop8k.js.map +1 -0
- package/package.json +1 -1
- package/dist/CompositeList-D4xmSZ5V.js.map +0 -1
- package/dist/CompositeRoot-DnijP7Jm.js.map +0 -1
- package/dist/Popover-B6z7exNd.js.map +0 -1
- package/dist/PrehydrationScript--08s8Mfl.js.map +0 -1
- package/dist/Tooltip-6R-t7wt1.js.map +0 -1
- package/dist/composite-rAI4IlWK.js +0 -66
- package/dist/composite-rAI4IlWK.js.map +0 -1
- package/dist/error-FX4R42W-.js +0 -6
- package/dist/index-B6xFUIBK.js.map +0 -1
- package/dist/shadowDom-CRvvf3qf.js +0 -52
- package/dist/shadowDom-CRvvf3qf.js.map +0 -1
- package/dist/useLabelableId-CQqNbBk1.js.map +0 -1
- package/dist/useOpenInteractionType-BnUZ2Eio.js.map +0 -1
- package/dist/usePopupHandleStore-DYUo-Fyk.js.map +0 -1
- package/dist/useValueAsRef-BfFRcMg6.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { e as error } from "./error-
|
|
2
|
+
import { e as error } from "./error-nCTLdGUr.js";
|
|
3
3
|
function useControlled({
|
|
4
4
|
controlled,
|
|
5
5
|
default: defaultProp,
|
|
@@ -62,4 +62,4 @@ function serializeToDevModeString(input) {
|
|
|
62
62
|
export {
|
|
63
63
|
useControlled as u
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=useControlled-
|
|
65
|
+
//# sourceMappingURL=useControlled-DMDWXIzj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useControlled-
|
|
1
|
+
{"version":3,"file":"useControlled-DMDWXIzj.js","sources":["../node_modules/@base-ui/utils/useControlled.mjs"],"sourcesContent":["'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nimport { error } from \"./error.mjs\";\n\n// A defined default guarantees a defined value. Otherwise, preserve `undefined`,\n// including when callers pass an explicit generic argument.\n\nexport function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n // Wrap the default so a function value is stored as-is instead of being called as an initializer.\n const [valueState, setValue] = React.useState(() => defaultProp);\n // Keep the initial mode, but use the initial default if a controlled value disappears.\n // This preserves the defined-default overload while the mode-switch warning is emitted below.\n const value = isControlled && controlled !== undefined ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n error([`A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) {\n error([`A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [defaultProp]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}\nfunction serializeToDevModeString(input) {\n let nextId = 0;\n const seen = new WeakMap();\n try {\n const result = JSON.stringify(input, function replacer(key, value) {\n if (key === '_owner' && this != null && typeof this === 'object' && '$$typeof' in this) {\n return undefined;\n }\n if (typeof value === 'bigint') {\n return `__bigint__:${value}`;\n }\n if (value !== null && typeof value === 'object') {\n const id = seen.get(value);\n if (id !== undefined) {\n return `__object__:${id}`;\n }\n seen.set(value, nextId);\n nextId += 1;\n }\n return value;\n });\n return result ?? `__top__:${typeof input}`;\n } catch {\n return '__unserializable__';\n }\n}"],"names":[],"mappings":";;AAUO,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,QAAQ;AACV,GAAG;AAED,QAAM;AAAA,IACJ,SAAS;AAAA,EACb,IAAM,MAAM,OAAO,eAAe,MAAS;AAEzC,QAAM,CAAC,YAAY,QAAQ,IAAI,MAAM,SAAS,MAAM,WAAW;AAG/D,QAAM,QAAQ,gBAAgB,eAAe,SAAY,aAAa;AACtE,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,UAAM,UAAU,MAAM;AACpB,UAAI,kBAAkB,eAAe,SAAY;AAC/C,cAAM,CAAC,+BAA+B,eAAe,KAAK,IAAI,cAAc,KAAK,aAAa,IAAI,UAAU,eAAe,OAAO,EAAE,eAAe,+EAA+E,qDAAqD,IAAI,+CAAoD,8HAA8H,sDAAsD,EAAE,KAAK,IAAI,CAAC;AAAA,MACjhB;AAAA,IACF,GAAG,CAAC,OAAO,MAAM,UAAU,CAAC;AAC5B,UAAM;AAAA,MACJ,SAAS;AAAA,IACf,IAAQ,MAAM,OAAO,WAAW;AAC5B,UAAM,UAAU,MAAM;AACpB,UAAI,CAAC,gBAAgB,yBAAyB,YAAY,MAAM,yBAAyB,WAAW,GAAG;AACrG,cAAM,CAAC,uCAAuC,KAAK,6BAA6B,IAAI,8EAAmF,IAAI,GAAG,EAAE,KAAK,IAAI,CAAC;AAAA,MAC5L;AAAA,IACF,GAAG,CAAC,WAAW,CAAC;AAAA,EAClB;AACA,QAAM,yBAAyB,MAAM,YAAY,cAAY;AAC3D,QAAI,CAAC,cAAc;AACjB,eAAS,QAAQ;AAAA,IACnB;AAAA,EACF,GAAG,CAAA,CAAE;AACL,SAAO,CAAC,OAAO,sBAAsB;AACvC;AACA,SAAS,yBAAyB,OAAO;AACvC,MAAI,SAAS;AACb,QAAM,OAAO,oBAAI,QAAO;AACxB,MAAI;AACF,UAAM,SAAS,KAAK,UAAU,OAAO,SAAS,SAAS,KAAK,OAAO;AACjE,UAAI,QAAQ,YAAY,QAAQ,QAAQ,OAAO,SAAS,YAAY,cAAc,MAAM;AACtF,eAAO;AAAA,MACT;AACA,UAAI,OAAO,UAAU,UAAU;AAC7B,eAAO,cAAc,KAAK;AAAA,MAC5B;AACA,UAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;AAC/C,cAAM,KAAK,KAAK,IAAI,KAAK;AACzB,YAAI,OAAO,QAAW;AACpB,iBAAO,cAAc,EAAE;AAAA,QACzB;AACA,aAAK,IAAI,OAAO,MAAM;AACtB,kBAAU;AAAA,MACZ;AACA,aAAO;AAAA,IACT,CAAC;AACD,WAAO,UAAU,WAAW,OAAO,KAAK;AAAA,EAC1C,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { a as addEventListener } from "./addEventListener-D-i9O6BG.js";
|
|
3
|
+
import { O as mergeCleanups, w as webkit, W as createAttribute } from "./usePopupHandleStore-C_Vw7xcw.js";
|
|
4
|
+
import { o as ownerDocument, e as isTargetInsideEnabledTrigger, b as isTypeableElement, m as matchesFocusVisible } from "./element-B1vbc-LG.js";
|
|
5
|
+
import { u as useTimeout } from "./useTimeout-D1vYJgq4.js";
|
|
6
|
+
import { b as getWindow, A as isElement, c as createChangeEventDetails, J as triggerFocus, i as isHTMLElement, t as triggerPress, r as escapeKey } from "./useBaseUiId-CYT1vFMG.js";
|
|
7
|
+
import { a as activeElement, c as contains, g as getTarget } from "./constants-BaUKmVF_.js";
|
|
8
|
+
import { m as mac } from "./composite-DnShFmi7.js";
|
|
9
|
+
const isMacSafari = mac && webkit;
|
|
10
|
+
function useFocus(store, props = {}) {
|
|
11
|
+
const {
|
|
12
|
+
enabled = true,
|
|
13
|
+
delay
|
|
14
|
+
} = props;
|
|
15
|
+
const {
|
|
16
|
+
events,
|
|
17
|
+
dataRef
|
|
18
|
+
} = store.context;
|
|
19
|
+
const blockFocusRef = React.useRef(false);
|
|
20
|
+
const blockedReferenceRef = React.useRef(null);
|
|
21
|
+
const keyboardModalityRef = React.useRef(true);
|
|
22
|
+
const timeout = useTimeout();
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
const domReference = store.select("domReferenceElement");
|
|
25
|
+
if (!enabled) {
|
|
26
|
+
return void 0;
|
|
27
|
+
}
|
|
28
|
+
const win = getWindow(domReference);
|
|
29
|
+
function onBlur() {
|
|
30
|
+
const currentDomReference = store.select("domReferenceElement");
|
|
31
|
+
if (!store.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
|
|
32
|
+
blockFocusRef.current = true;
|
|
33
|
+
blockedReferenceRef.current = currentDomReference;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function onKeyDown() {
|
|
37
|
+
keyboardModalityRef.current = true;
|
|
38
|
+
}
|
|
39
|
+
function onPointerDown() {
|
|
40
|
+
keyboardModalityRef.current = false;
|
|
41
|
+
}
|
|
42
|
+
return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
|
|
43
|
+
}, [store, enabled]);
|
|
44
|
+
React.useEffect(() => {
|
|
45
|
+
if (!enabled) {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
function onOpenChangeLocal(details) {
|
|
49
|
+
if (details.reason === triggerPress || details.reason === escapeKey) {
|
|
50
|
+
const referenceElement = store.select("domReferenceElement");
|
|
51
|
+
if (isElement(referenceElement)) {
|
|
52
|
+
blockedReferenceRef.current = referenceElement;
|
|
53
|
+
blockFocusRef.current = true;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
events.on("openchange", onOpenChangeLocal);
|
|
58
|
+
return () => {
|
|
59
|
+
events.off("openchange", onOpenChangeLocal);
|
|
60
|
+
};
|
|
61
|
+
}, [events, enabled, store]);
|
|
62
|
+
const reference = React.useMemo(() => {
|
|
63
|
+
function resetBlockedFocus() {
|
|
64
|
+
blockFocusRef.current = false;
|
|
65
|
+
blockedReferenceRef.current = null;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
onMouseLeave() {
|
|
69
|
+
resetBlockedFocus();
|
|
70
|
+
},
|
|
71
|
+
onFocus(event) {
|
|
72
|
+
const focusTarget = event.currentTarget;
|
|
73
|
+
if (blockFocusRef.current) {
|
|
74
|
+
if (blockedReferenceRef.current === focusTarget) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
resetBlockedFocus();
|
|
78
|
+
}
|
|
79
|
+
const target = getTarget(event.nativeEvent);
|
|
80
|
+
if (isElement(target)) {
|
|
81
|
+
if (isMacSafari && !event.relatedTarget) {
|
|
82
|
+
if (!keyboardModalityRef.current && !isTypeableElement(target)) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
} else if (!matchesFocusVisible(target)) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements);
|
|
90
|
+
const {
|
|
91
|
+
nativeEvent,
|
|
92
|
+
currentTarget
|
|
93
|
+
} = event;
|
|
94
|
+
if (store.select("open") && movedFromOtherEnabledTrigger || !delay) {
|
|
95
|
+
store.setOpen(true, createChangeEventDetails(triggerFocus, nativeEvent, currentTarget));
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
timeout.start(delay, () => {
|
|
99
|
+
if (blockFocusRef.current) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
store.setOpen(true, createChangeEventDetails(triggerFocus, nativeEvent, currentTarget));
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
onBlur(event) {
|
|
106
|
+
resetBlockedFocus();
|
|
107
|
+
const relatedTarget = event.relatedTarget;
|
|
108
|
+
const nativeEvent = event.nativeEvent;
|
|
109
|
+
const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
|
|
110
|
+
timeout.start(0, () => {
|
|
111
|
+
var _a;
|
|
112
|
+
const domReference = store.select("domReferenceElement");
|
|
113
|
+
const activeEl = activeElement(ownerDocument(domReference));
|
|
114
|
+
if (!relatedTarget && activeEl === domReference) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (contains((_a = dataRef.current.floatingContext) == null ? void 0 : _a.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const nextFocusedElement = relatedTarget ?? activeEl;
|
|
121
|
+
if (isTargetInsideEnabledTrigger(nextFocusedElement, store.context.triggerElements)) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
store.setOpen(false, createChangeEventDetails(triggerFocus, nativeEvent));
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}, [dataRef, delay, store, timeout]);
|
|
129
|
+
return React.useMemo(() => enabled ? {
|
|
130
|
+
reference,
|
|
131
|
+
trigger: reference
|
|
132
|
+
} : {}, [enabled, reference]);
|
|
133
|
+
}
|
|
134
|
+
export {
|
|
135
|
+
useFocus as u
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=useFocus-C__7iwl1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocus-C__7iwl1.js","sources":["../node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { platform } from '@base-ui/utils/platform';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { getWindow, isElement, isHTMLElement } from '@floating-ui/utils/dom';\nimport { createAttribute } from \"../utils/createAttribute.mjs\";\nimport { activeElement, contains, getTarget, isTargetInsideEnabledTrigger, isTypeableElement, matchesFocusVisible } from \"../utils/element.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nconst isMacSafari = platform.os.mac && platform.engine.webkit;\n/**\n * Opens the floating element while the reference element has focus, like CSS\n * `:focus`.\n * @see https://floating-ui.com/docs/useFocus\n */\nexport function useFocus(store, props = {}) {\n const {\n enabled = true,\n delay\n } = props;\n const {\n events,\n dataRef\n } = store.context;\n const blockFocusRef = React.useRef(false);\n // Track which reference should be blocked from re-opening after Escape/press dismissal.\n const blockedReferenceRef = React.useRef(null);\n const keyboardModalityRef = React.useRef(true);\n const timeout = useTimeout();\n React.useEffect(() => {\n const domReference = store.select('domReferenceElement');\n if (!enabled) {\n return undefined;\n }\n const win = getWindow(domReference);\n\n // If the reference was focused and the user left the tab/window, and the\n // floating element was not open, the focus should be blocked when they\n // return to the tab/window.\n function onBlur() {\n const currentDomReference = store.select('domReferenceElement');\n if (!store.select('open') && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {\n blockFocusRef.current = true;\n blockedReferenceRef.current = currentDomReference;\n }\n }\n function onKeyDown() {\n keyboardModalityRef.current = true;\n }\n function onPointerDown() {\n keyboardModalityRef.current = false;\n }\n return mergeCleanups(addEventListener(win, 'blur', onBlur), isMacSafari && addEventListener(win, 'keydown', onKeyDown, true), isMacSafari && addEventListener(win, 'pointerdown', onPointerDown, true));\n }, [store, enabled]);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function onOpenChangeLocal(details) {\n if (details.reason === REASONS.triggerPress || details.reason === REASONS.escapeKey) {\n const referenceElement = store.select('domReferenceElement');\n if (isElement(referenceElement)) {\n blockedReferenceRef.current = referenceElement;\n blockFocusRef.current = true;\n }\n }\n }\n events.on('openchange', onOpenChangeLocal);\n return () => {\n events.off('openchange', onOpenChangeLocal);\n };\n }, [events, enabled, store]);\n const reference = React.useMemo(() => {\n function resetBlockedFocus() {\n blockFocusRef.current = false;\n blockedReferenceRef.current = null;\n }\n return {\n onMouseLeave() {\n resetBlockedFocus();\n },\n onFocus(event) {\n const focusTarget = event.currentTarget;\n if (blockFocusRef.current) {\n if (blockedReferenceRef.current === focusTarget) {\n return;\n }\n resetBlockedFocus();\n }\n const target = getTarget(event.nativeEvent);\n if (isElement(target)) {\n // Safari fails to match `:focus-visible` if focus was initially\n // outside the document.\n if (isMacSafari && !event.relatedTarget) {\n if (!keyboardModalityRef.current && !isTypeableElement(target)) {\n return;\n }\n } else if (!matchesFocusVisible(target)) {\n return;\n }\n }\n const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements);\n const {\n nativeEvent,\n currentTarget\n } = event;\n if (store.select('open') && movedFromOtherEnabledTrigger || !delay) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerFocus, nativeEvent, currentTarget));\n return;\n }\n timeout.start(delay, () => {\n if (blockFocusRef.current) {\n return;\n }\n store.setOpen(true, createChangeEventDetails(REASONS.triggerFocus, nativeEvent, currentTarget));\n });\n },\n onBlur(event) {\n resetBlockedFocus();\n const relatedTarget = event.relatedTarget;\n const nativeEvent = event.nativeEvent;\n\n // Hit the non-modal focus management portal guard. Focus will be\n // moved into the floating element immediately after.\n const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute('focus-guard')) && relatedTarget.getAttribute('data-type') === 'outside';\n\n // Wait for the window blur listener to fire.\n timeout.start(0, () => {\n const domReference = store.select('domReferenceElement');\n const activeEl = activeElement(ownerDocument(domReference));\n\n // Focus left the page, keep it open.\n if (!relatedTarget && activeEl === domReference) {\n return;\n }\n\n // When focusing the reference element (e.g. regular click), then\n // clicking into the floating element, prevent it from hiding.\n // Note: it must be focusable, e.g. `tabindex=\"-1\"`.\n // We can not rely on relatedTarget to point to the correct element\n // as it will only point to the shadow host of the newly focused element\n // and not the element that actually has received focus if it is located\n // inside a shadow root.\n if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {\n return;\n }\n\n // If the next focused element is one of the triggers, do not close\n // the floating element. The focus handler of that trigger will\n // handle the open state.\n const nextFocusedElement = relatedTarget ?? activeEl;\n if (isTargetInsideEnabledTrigger(nextFocusedElement, store.context.triggerElements)) {\n return;\n }\n store.setOpen(false, createChangeEventDetails(REASONS.triggerFocus, nativeEvent));\n });\n }\n };\n }, [dataRef, delay, store, timeout]);\n return React.useMemo(() => enabled ? {\n reference,\n trigger: reference\n } : {}, [enabled, reference]);\n}"],"names":["platform.os.mac","platform.engine.webkit","REASONS.triggerPress","REASONS.escapeKey","REASONS.triggerFocus"],"mappings":";;;;;;;;AAaA,MAAM,cAAcA,OAAmBC;AAMhC,SAAS,SAAS,OAAO,QAAQ,IA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AAc,aAAa,gBAAgB,aAAa,CAAC,KAAK,cAAc,aAAa,WAAW,MAAM;AAGhK,gBAAQ,MAAM,GAAG,MAAM;;AACrB,gBAAM,eAAe,MAAM,OAAO,qBAAqB;AACvD,gBAAM,WAAW,cAAc,cAAc,YAAY,CAAC;AAG1D,cAAI,CAAC,iBAAiB,aAAa,cAAc;AAC/C;AAAA,UACF;AASA,cAAI,UAAS,aAAQ,QAAQ,oBAAhB,mBAAiC,KAAK,SAAS,SAAS,QAAQ,KAAK,SAAS,cAAc,QAAQ,KAAK,mBAAmB;AACvI;AAAA,UACF;AAKA,gBAAM,qBAAqB,iBAAiB;AAC5C,cAAI,6BAA6B,oBAAoB,MAAM,QAAQ,eAAe,GAAG;AACnF;AAAA,UACF;AACA,gBAAM,QAAQ,OAAO,yBAAyBA,cAAsB,WAAW,CAAC;AAAA,QAClF,CAAC;AAAA,MACH;AAAA,IACN;AAAA,EACE,GAAG,CAAC,SAAS,OAAO,OAAO,OAAO,CAAC;AACnC,SAAO,MAAM,QAAQ,MAAM,UAAU;AAAA,IACnC;AAAA,IACA,SAAS;AAAA,EACb,IAAM,IAAI,CAAC,SAAS,SAAS,CAAC;AAC9B;","x_google_ignoreList":[0]}
|
|
@@ -173,7 +173,7 @@ function resolveStyle(style, state) {
|
|
|
173
173
|
}
|
|
174
174
|
const EMPTY_PROPS = {};
|
|
175
175
|
function mergeProps(a, b, c, d, e) {
|
|
176
|
-
if (!c && !d &&
|
|
176
|
+
if (!c && !d && !e && !a) {
|
|
177
177
|
return createInitialMergedProps(b);
|
|
178
178
|
}
|
|
179
179
|
let merged = createInitialMergedProps(a);
|
|
@@ -186,6 +186,9 @@ function mergeProps(a, b, c, d, e) {
|
|
|
186
186
|
if (d) {
|
|
187
187
|
merged = mergeInto(merged, d);
|
|
188
188
|
}
|
|
189
|
+
if (e) {
|
|
190
|
+
merged = mergeInto(merged, e);
|
|
191
|
+
}
|
|
189
192
|
return merged;
|
|
190
193
|
}
|
|
191
194
|
function mergePropsN(props) {
|
|
@@ -488,12 +491,13 @@ export {
|
|
|
488
491
|
EMPTY_OBJECT as d,
|
|
489
492
|
useRefWithInit as e,
|
|
490
493
|
formatErrorMessage as f,
|
|
491
|
-
|
|
492
|
-
|
|
494
|
+
unwrapLazyRenderProp as g,
|
|
495
|
+
makeEventPreventable as h,
|
|
493
496
|
isReactVersionAtLeast as i,
|
|
497
|
+
createLogOnce as j,
|
|
494
498
|
mergeProps as m,
|
|
495
499
|
resolveStyle as r,
|
|
496
500
|
useIsoLayoutEffect as u,
|
|
497
501
|
warn as w
|
|
498
502
|
};
|
|
499
|
-
//# sourceMappingURL=useIsoLayoutEffect-
|
|
503
|
+
//# sourceMappingURL=useIsoLayoutEffect-D2lpsB9D.js.map
|
|
@@ -1 +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 !== 'undef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AAa,cAAc;AAGzC;AAAA;AAAA,MAAiC,IAAI,MAAM,wDAAwD;AAAA;AAAA,EACrG;AACF;ACxCA,MAAM,OAAO,MAAM;AAAC;AACR,MAAC,qBAAqB,OAAO,aAAa,cAAc,MAAM,kBAAkB;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]}
|
|
1
|
+
{"version":3,"file":"useIsoLayoutEffect-D2lpsB9D.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,GA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