tfy-web-components 0.0.45 → 0.0.46
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/{CompositeItem-GNejxLcK.js → CompositeItem-ClTKQQ4f.js} +2 -2
- package/dist/{CompositeItem-GNejxLcK.js.map → CompositeItem-ClTKQQ4f.js.map} +1 -1
- package/dist/{CompositeRoot-7_u1HqDT.js → CompositeRoot-CR4V84Em.js} +6 -6
- package/dist/{CompositeRoot-7_u1HqDT.js.map → CompositeRoot-CR4V84Em.js.map} +1 -1
- package/dist/{DropdownMenu-Crlf-J4E.js → DropdownMenu-B_tIHJUl.js} +14 -14
- package/dist/{DropdownMenu-Crlf-J4E.js.map → DropdownMenu-B_tIHJUl.js.map} +1 -1
- package/dist/{Modal-DaHG8mjy.js → Modal-CJj8wP0E.js} +7 -7
- package/dist/{Modal-DaHG8mjy.js.map → Modal-CJj8wP0E.js.map} +1 -1
- package/dist/{Popover-A8IyEt2w.js → Popover-DOpJ7QW-.js} +5 -5
- package/dist/{Popover-A8IyEt2w.js.map → Popover-DOpJ7QW-.js.map} +1 -1
- package/dist/{PopoverPopup-teGm7D5T.js → PopoverPopup-Dd6Z5rv7.js} +8 -8
- package/dist/{PopoverPopup-teGm7D5T.js.map → PopoverPopup-Dd6Z5rv7.js.map} +1 -1
- package/dist/{PrehydrationScript-B3u_PP2W.js → PrehydrationScript-BfRb7l5u.js} +2 -2
- package/dist/{PrehydrationScript-B3u_PP2W.js.map → PrehydrationScript-BfRb7l5u.js.map} +1 -1
- package/dist/{Select-BtX40h2K.js → Select-OlnvlAXg.js} +14 -14
- package/dist/{Select-BtX40h2K.js.map → Select-OlnvlAXg.js.map} +1 -1
- package/dist/components/atoms/Accordion.d.ts +11 -4
- package/dist/components/atoms/Accordion.es.js +108 -52
- package/dist/components/atoms/Accordion.es.js.map +1 -1
- package/dist/components/atoms/Combobox.es.js +12 -12
- package/dist/components/atoms/ContextMenu.es.js +6 -6
- package/dist/components/atoms/DropdownMenu.es.js +1 -1
- package/dist/components/atoms/Modal.es.js +1 -1
- package/dist/components/atoms/Popover.es.js +1 -1
- package/dist/components/atoms/Select.es.js +2 -2
- package/dist/components/atoms/Switch.es.js +4 -4
- package/dist/components/atoms/TabButton.es.js +8 -8
- package/dist/components/atoms/Tooltip.es.js +7 -7
- package/dist/components/molecules/Alert.es.js +1 -1
- 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 +1 -1
- package/dist/components/molecules/Pagination.es.js +18 -23
- package/dist/components/molecules/Pagination.es.js.map +1 -1
- package/dist/{composite-IA--dSel.js → composite-CH__oBQH.js} +2 -2
- package/dist/{composite-IA--dSel.js.map → composite-CH__oBQH.js.map} +1 -1
- package/dist/{composite-DnShFmi7.js → composite-Dzn8P1fl.js} +11 -11
- package/dist/{composite-DnShFmi7.js.map → composite-Dzn8P1fl.js.map} +1 -1
- package/dist/{constants-BaUKmVF_.js → constants-BzjgA7aT.js} +2 -2
- package/dist/{constants-BaUKmVF_.js.map → constants-BzjgA7aT.js.map} +1 -1
- package/dist/{element-B1vbc-LG.js → element-BI1c88Lp.js} +3 -3
- package/dist/{element-B1vbc-LG.js.map → element-BI1c88Lp.js.map} +1 -1
- package/dist/index.es.js +3 -3
- package/dist/{isElementDisabled-lq1fKien.js → isElementDisabled-CcmHYLra.js} +2 -2
- package/dist/{isElementDisabled-lq1fKien.js.map → isElementDisabled-CcmHYLra.js.map} +1 -1
- package/dist/new-components/atoms/Checkbox.es.js +4 -4
- package/dist/new-components/atoms/Popover.es.js +2 -2
- package/dist/new-components/atoms/Radio.es.js +8 -8
- package/dist/new-components/atoms/SegmentedControl.es.js +4 -4
- package/dist/new-components/atoms/Slider.es.js +6 -6
- package/dist/new-components/atoms/Toast.d.ts +1 -2
- package/dist/new-components/atoms/Toast.es.js +70 -98
- package/dist/new-components/atoms/Toast.es.js.map +1 -1
- package/dist/new-components/atoms/Toggletip.es.js +2 -2
- package/dist/style.css +1 -1
- package/dist/theme.css +1 -2
- package/dist/{useAriaLabelledBy-CP4wKTYs.js → useAriaLabelledBy-C_Zzl94S.js} +2 -2
- package/dist/{useAriaLabelledBy-CP4wKTYs.js.map → useAriaLabelledBy-C_Zzl94S.js.map} +1 -1
- package/dist/{useBaseUiId-CYT1vFMG.js → useBaseUiId-DCE1GVlg.js} +6 -6
- package/dist/{useBaseUiId-CYT1vFMG.js.map → useBaseUiId-DCE1GVlg.js.map} +1 -1
- package/dist/{useButton-BlHadUfM.js → useButton-CtXDdeoI.js} +2 -2
- package/dist/{useButton-BlHadUfM.js.map → useButton-CtXDdeoI.js.map} +1 -1
- package/dist/{useFocus-C__7iwl1.js → useFocus-BGyXJhul.js} +6 -6
- package/dist/{useFocus-C__7iwl1.js.map → useFocus-BGyXJhul.js.map} +1 -1
- package/dist/{usePopupHandleStore-C_Vw7xcw.js → usePopupHandleStore-9hGUXtn5.js} +30 -30
- package/dist/{usePopupHandleStore-C_Vw7xcw.js.map → usePopupHandleStore-9hGUXtn5.js.map} +1 -1
- package/dist/{usePositioner-BmYVsMO_.js → usePositioner-CAWMEP8L.js} +6 -6
- package/dist/{usePositioner-BmYVsMO_.js.map → usePositioner-CAWMEP8L.js.map} +1 -1
- package/dist/{useScrollLock-By-42HSc.js → useScrollLock-QpeWQmdB.js} +6 -6
- package/dist/{useScrollLock-By-42HSc.js.map → useScrollLock-QpeWQmdB.js.map} +1 -1
- package/dist/{useSetFieldFocused-CcdG6FNp.js → useSetFieldFocused-BO2Y66f_.js} +2 -2
- package/dist/{useSetFieldFocused-CcdG6FNp.js.map → useSetFieldFocused-BO2Y66f_.js.map} +1 -1
- package/dist/{useTriggerFocusGuards-CXAhW8P6.js → useTriggerFocusGuards-Ss68N7Fe.js} +5 -5
- package/dist/{useTriggerFocusGuards-CXAhW8P6.js.map → useTriggerFocusGuards-Ss68N7Fe.js.map} +1 -1
- package/dist/utilities.css +38 -0
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as useRenderElement, E as EMPTY_ARRAY, d as EMPTY_OBJECT } from "./useIsoLayoutEffect-D2lpsB9D.js";
|
|
2
|
-
import { u as useCompositeItem } from "./isElementDisabled-
|
|
2
|
+
import { u as useCompositeItem } from "./isElementDisabled-CcmHYLra.js";
|
|
3
3
|
function CompositeItem(componentProps) {
|
|
4
4
|
const {
|
|
5
5
|
render,
|
|
@@ -30,4 +30,4 @@ function CompositeItem(componentProps) {
|
|
|
30
30
|
export {
|
|
31
31
|
CompositeItem as C
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=CompositeItem-
|
|
33
|
+
//# sourceMappingURL=CompositeItem-ClTKQQ4f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositeItem-
|
|
1
|
+
{"version":3,"file":"CompositeItem-ClTKQQ4f.js","sources":["../node_modules/@base-ui/react/internals/composite/item/CompositeItem.mjs"],"sourcesContent":["'use client';\n\nimport { EMPTY_OBJECT, EMPTY_ARRAY } from '@base-ui/utils/empty';\nimport { useRenderElement } from \"../../useRenderElement.mjs\";\nimport { useCompositeItem } from \"./useCompositeItem.mjs\";\nexport function CompositeItem(componentProps) {\n const {\n render,\n className,\n style,\n state = EMPTY_OBJECT,\n props = EMPTY_ARRAY,\n refs = EMPTY_ARRAY,\n metadata,\n stateAttributesMapping,\n tag = 'div',\n ...elementProps\n } = componentProps;\n const {\n compositeProps,\n compositeRef\n } = useCompositeItem({\n metadata\n });\n return useRenderElement(tag, componentProps, {\n state,\n // The composite ref attaches first so an outer item wins when nested items share a DOM node.\n ref: [compositeRef, ...refs],\n props: [compositeProps, ...props, elementProps],\n stateAttributesMapping\n });\n}"],"names":[],"mappings":";;AAKO,SAAS,cAAc,gBAAgB;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN,GAAG;AAAA,EACP,IAAM;AACJ,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACJ,IAAM,iBAAiB;AAAA,IACnB;AAAA,EACJ,CAAG;AACD,SAAO,iBAAiB,KAAK,gBAAgB;AAAA,IAC3C;AAAA;AAAA,IAEA,KAAK,CAAC,cAAc,GAAG,IAAI;AAAA,IAC3B,OAAO,CAAC,gBAAgB,GAAG,OAAO,YAAY;AAAA,IAC9C;AAAA,EACJ,CAAG;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { c as useMergedRefs, a as useStableCallback, u as useIsoLayoutEffect, E as EMPTY_ARRAY, b as useRenderElement, d as EMPTY_OBJECT } from "./useIsoLayoutEffect-D2lpsB9D.js";
|
|
3
3
|
import { C as CompositeList } from "./useCompositeListItem-DlAKWsHE.js";
|
|
4
|
-
import { i as isElementDisabled } from "./isElementDisabled-
|
|
5
|
-
import { s as scrollIntoViewIfNeeded, C as COMPOSITE_KEYS, i as isNativeInput, H as HOME, E as END, b as ARROW_DOWN, d as ARROW_UP, M as MODIFIER_KEYS, A as ARROW_LEFT, c as ARROW_RIGHT } from "./composite-
|
|
6
|
-
import {
|
|
7
|
-
import { g as getTarget } from "./constants-
|
|
8
|
-
import { C as CompositeRootContext } from "./useButton-
|
|
4
|
+
import { i as isElementDisabled } from "./isElementDisabled-CcmHYLra.js";
|
|
5
|
+
import { s as scrollIntoViewIfNeeded, C as COMPOSITE_KEYS, i as isNativeInput, H as HOME, E as END, b as ARROW_DOWN, d as ARROW_UP, M as MODIFIER_KEYS, A as ARROW_LEFT, c as ARROW_RIGHT } from "./composite-CH__oBQH.js";
|
|
6
|
+
import { k as isListIndexDisabled, K as findNonDisabledListIndex, i as isIndexOutOfListBounds, c as getMinListIndex, d as getMaxListIndex } from "./composite-Dzn8P1fl.js";
|
|
7
|
+
import { g as getTarget } from "./constants-BzjgA7aT.js";
|
|
8
|
+
import { C as CompositeRootContext } from "./useButton-CtXDdeoI.js";
|
|
9
9
|
import { u as useDirection } from "./DirectionContext-Pb9yafF5.js";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
const ACTIVE_COMPOSITE_ITEM = "data-composite-item-active";
|
|
@@ -310,4 +310,4 @@ export {
|
|
|
310
310
|
ACTIVE_COMPOSITE_ITEM as A,
|
|
311
311
|
CompositeRoot as C
|
|
312
312
|
};
|
|
313
|
-
//# sourceMappingURL=CompositeRoot-
|
|
313
|
+
//# sourceMappingURL=CompositeRoot-CR4V84Em.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositeRoot-7_u1HqDT.js","sources":["../node_modules/@base-ui/react/internals/composite/constants.mjs","../node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs","../node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs"],"sourcesContent":["export const ACTIVE_COMPOSITE_ITEM = 'data-composite-item-active';","'use client';\n\nimport * as React from 'react';\nimport { isElementDisabled } from '@base-ui/utils/isElementDisabled';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { EMPTY_ARRAY } from '@base-ui/utils/empty';\nimport { COMPOSITE_KEYS, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, END, HOME, MODIFIER_KEYS, findNonDisabledListIndex, getMaxListIndex, getMinListIndex, isListIndexDisabled, isIndexOutOfListBounds, isNativeInput, scrollIntoViewIfNeeded } from \"../composite.mjs\";\nimport { ACTIVE_COMPOSITE_ITEM } from \"../constants.mjs\";\nimport { getTarget } from \"../../../floating-ui-react/utils.mjs\";\nexport function useCompositeRoot(params) {\n const {\n loopFocus = true,\n orientation = 'both',\n grid,\n onLoop,\n direction,\n highlightedIndex: externalHighlightedIndex,\n onHighlightedIndexChange: externalSetHighlightedIndex,\n rootRef: externalRef,\n enableHomeAndEndKeys = false,\n stopEventPropagation,\n disabledIndices,\n modifierKeys = EMPTY_ARRAY\n } = params;\n const [internalHighlightedIndex, internalSetHighlightedIndex] = React.useState(0);\n const isGrid = grid != null;\n const rootRef = React.useRef(null);\n const mergedRef = useMergedRefs(rootRef, externalRef);\n const elementsRef = React.useRef([]);\n const hasSetDefaultIndexRef = React.useRef(false);\n const highlightedElementRef = React.useRef(null);\n const highlightedIndex = externalHighlightedIndex ?? internalHighlightedIndex;\n const onHighlightedIndexChange = useStableCallback((index, shouldScrollIntoView = false) => {\n highlightedElementRef.current = elementsRef.current[index] ?? null;\n (externalSetHighlightedIndex ?? internalSetHighlightedIndex)(index);\n if (shouldScrollIntoView) {\n const newActiveItem = elementsRef.current[index];\n scrollIntoViewIfNeeded(rootRef.current, newActiveItem, direction, orientation);\n }\n });\n const onMapChange = useStableCallback(map => {\n if (map.size === 0) {\n return;\n }\n if (hasSetDefaultIndexRef.current) {\n const elements = elementsRef.current;\n // Items added or removed around the highlighted one shift its index, so the tab stop would\n // otherwise move to a different item and navigation would resume from the wrong position.\n const nextIndex = elements.indexOf(highlightedElementRef.current);\n if (nextIndex === -1) {\n // A replacement at the same index can keep the tab stop. Otherwise move it to an\n // eligible item so a missing, hidden, or disabled replacement does not take the\n // composite out of the tab order.\n const replacement = elements[highlightedIndex];\n if (!replacement || isListIndexDisabled(elements, highlightedIndex, disabledIndices)) {\n onHighlightedIndexChange(getFallbackIndex(elements, disabledIndices));\n } else {\n highlightedElementRef.current = replacement;\n }\n } else if (nextIndex !== highlightedIndex) {\n onHighlightedIndexChange(nextIndex);\n }\n return;\n }\n hasSetDefaultIndexRef.current = true;\n const sortedElements = Array.from(map.keys());\n const activeItem = sortedElements.find(compositeElement => compositeElement?.hasAttribute(ACTIVE_COMPOSITE_ITEM)) ?? null;\n // Set the default highlighted index of an arbitrary composite item. The map value carries\n // the item's own index, which is not its position among the keys once a list mixes explicit\n // and automatic indexes and leaves gaps.\n const activeIndex = activeItem ? map.get(activeItem)?.index ?? -1 : -1;\n if (activeIndex !== -1) {\n onHighlightedIndexChange(activeIndex);\n } else if (isListIndexDisabled(sortedElements, highlightedIndex, disabledIndices)) {\n // The default highlighted item is disabled, so it should not hold the single\n // roving tab stop: a natively disabled element is removed from the tab order,\n // and an aria-disabled one should not be the entry point. Move the tab stop\n // to the first enabled item. If every item is disabled, keep the current\n // highlighted index.\n const firstEnabledIndex = findNonDisabledListIndex(sortedElements, {\n disabledIndices\n });\n if (!isIndexOutOfListBounds(sortedElements, firstEnabledIndex)) {\n onHighlightedIndexChange(firstEnabledIndex);\n }\n }\n scrollIntoViewIfNeeded(rootRef.current, activeItem, direction, orientation);\n });\n useIsoLayoutEffect(() => {\n // `disabledIndices` can resolve a render after the initial map population\n // (e.g. Toolbar derives it from item metadata through a state update), so the\n // default tab stop at index 0 may now point at a disabled item, leaving the\n // composite without a reachable tab stop. Re-validate and move it to the first\n // enabled item. Gated on `disabledIndices` being provided so composites that\n // rely on the DOM disabled fallback keep their existing behavior.\n if (disabledIndices == null || externalHighlightedIndex != null || !hasSetDefaultIndexRef.current) {\n return;\n }\n const elements = elementsRef.current;\n if (isListIndexDisabled(elements, highlightedIndex, disabledIndices)) {\n const firstEnabledIndex = findNonDisabledListIndex(elements, {\n disabledIndices\n });\n if (!isIndexOutOfListBounds(elements, firstEnabledIndex)) {\n onHighlightedIndexChange(firstEnabledIndex);\n }\n }\n }, [disabledIndices, externalHighlightedIndex, highlightedIndex, elementsRef, onHighlightedIndexChange]);\n const wrappedOnLoop = useStableCallback((event, prevIndex, nextIndex) => {\n if (!onLoop) {\n return nextIndex;\n }\n return onLoop(event, prevIndex, nextIndex, elementsRef);\n });\n\n // Stable so that `relayKeyboardEvent` does not invalidate identity-sensitive\n // consumers (the `CompositeRootContext` value and trigger data forwarding).\n const onKeyDown = useStableCallback(event => {\n const isHomeOrEnd = event.key === HOME || event.key === END;\n if (!COMPOSITE_KEYS.has(event.key) || !enableHomeAndEndKeys && isHomeOrEnd) {\n return;\n }\n if (isModifierKeySet(event, modifierKeys)) {\n return;\n }\n const element = rootRef.current;\n if (!element) {\n return;\n }\n const isRtl = direction === 'rtl';\n const horizontalForwardKey = isRtl ? ARROW_LEFT : ARROW_RIGHT;\n const horizontalBackwardKey = isRtl ? ARROW_RIGHT : ARROW_LEFT;\n const forwardKey = orientation === 'vertical' ? ARROW_DOWN : horizontalForwardKey;\n const backwardKey = orientation === 'vertical' ? ARROW_UP : horizontalBackwardKey;\n const target = getTarget(event.nativeEvent);\n if (target != null && isNativeInput(target) && !isElementDisabled(target)) {\n const selectionStart = target.selectionStart;\n const selectionEnd = target.selectionEnd;\n const textContent = target.value;\n // return to native textbox behavior when\n // 1 - Shift is held to make a text selection, or if there already is a text selection\n if (selectionStart == null || event.shiftKey || selectionStart !== selectionEnd) {\n return;\n }\n // 2 - arrow-ing forward and not in the last position of the text\n if (event.key !== backwardKey && selectionStart < textContent.length) {\n return;\n }\n // 3 -arrow-ing backward and not in the first position of the text\n if (event.key !== forwardKey && selectionStart > 0) {\n return;\n }\n }\n let nextIndex = highlightedIndex;\n const minIndex = getMinListIndex(elementsRef, disabledIndices);\n const maxIndex = getMaxListIndex(elementsRef, disabledIndices);\n if (grid != null) {\n nextIndex = grid({\n disabledIndices,\n elementsRef,\n event,\n highlightedIndex,\n loopFocus,\n maxIndex,\n minIndex,\n onLoop: wrappedOnLoop,\n orientation,\n rtl: isRtl\n });\n }\n const isForwardKey = orientation !== 'vertical' && event.key === horizontalForwardKey || orientation !== 'horizontal' && event.key === ARROW_DOWN;\n const isBackwardKey = orientation !== 'vertical' && event.key === horizontalBackwardKey || orientation !== 'horizontal' && event.key === ARROW_UP;\n if (enableHomeAndEndKeys) {\n if (event.key === HOME) {\n nextIndex = minIndex;\n } else if (event.key === END) {\n nextIndex = maxIndex;\n }\n }\n if (nextIndex === highlightedIndex && (isForwardKey || isBackwardKey)) {\n if (loopFocus && nextIndex === maxIndex && isForwardKey) {\n nextIndex = minIndex;\n if (onLoop) {\n nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef);\n }\n } else if (loopFocus && nextIndex === minIndex && isBackwardKey) {\n nextIndex = maxIndex;\n if (onLoop) {\n nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef);\n }\n } else {\n nextIndex = findNonDisabledListIndex(elementsRef.current, {\n startingIndex: nextIndex,\n decrement: isBackwardKey,\n disabledIndices\n });\n }\n }\n if (nextIndex !== highlightedIndex && !isIndexOutOfListBounds(elementsRef.current, nextIndex)) {\n if (stopEventPropagation) {\n event.stopPropagation();\n }\n if (isGrid || isHomeOrEnd || isForwardKey || isBackwardKey) {\n event.preventDefault();\n }\n onHighlightedIndexChange(nextIndex, true);\n\n // Wait for FocusManager `returnFocus` to execute.\n queueMicrotask(() => {\n elementsRef.current[nextIndex]?.focus();\n });\n }\n });\n const props = {\n ref: mergedRef,\n onFocus(event) {\n const element = rootRef.current;\n const target = getTarget(event.nativeEvent);\n if (!element || target == null || !isNativeInput(target)) {\n return;\n }\n target.setSelectionRange(0, target.value.length);\n },\n onKeyDown\n };\n return {\n props,\n highlightedIndex,\n onHighlightedIndexChange,\n elementsRef,\n onMapChange,\n relayKeyboardEvent: onKeyDown\n };\n}\n\n// Resolves the item that should hold the tab stop: the active item when it can take focus,\n// otherwise the first item that can. Falls back to index 0 so an all-disabled composite keeps the\n// index in range and regains a tab stop as soon as one of its items becomes focusable.\nfunction getFallbackIndex(elements, disabledIndices) {\n let fallbackIndex = -1;\n for (let index = 0; index < elements.length; index += 1) {\n const element = elements[index];\n if (!element || isListIndexDisabled(elements, index, disabledIndices)) {\n continue;\n }\n if (element.hasAttribute(ACTIVE_COMPOSITE_ITEM)) {\n return index;\n }\n if (fallbackIndex === -1) {\n fallbackIndex = index;\n }\n }\n return Math.max(fallbackIndex, 0);\n}\nfunction isModifierKeySet(event, ignoredModifierKeys) {\n for (const key of MODIFIER_KEYS) {\n if (ignoredModifierKeys.includes(key)) {\n continue;\n }\n if (event.getModifierState(key)) {\n return true;\n }\n }\n return false;\n}","'use client';\n\nimport * as React from 'react';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { CompositeList } from \"../list/CompositeList.mjs\";\nimport { useCompositeRoot } from \"./useCompositeRoot.mjs\";\nimport { CompositeRootContext } from \"./CompositeRootContext.mjs\";\nimport { useRenderElement } from \"../../useRenderElement.mjs\";\nimport { useDirection } from \"../../direction-context/DirectionContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function CompositeRoot(componentProps) {\n const {\n render,\n className,\n style,\n refs = EMPTY_ARRAY,\n props = EMPTY_ARRAY,\n state = EMPTY_OBJECT,\n stateAttributesMapping,\n highlightedIndex: highlightedIndexProp,\n onHighlightedIndexChange: onHighlightedIndexChangeProp,\n orientation,\n grid,\n loopFocus,\n onLoop,\n enableHomeAndEndKeys,\n onMapChange: onMapChangeProp,\n stopEventPropagation = true,\n rootRef,\n disabledIndices,\n modifierKeys,\n highlightItemOnHover = false,\n tag = 'div',\n ...elementProps\n } = componentProps;\n const direction = useDirection();\n const {\n props: defaultProps,\n highlightedIndex,\n onHighlightedIndexChange,\n elementsRef,\n onMapChange: onMapChangeUnwrapped,\n relayKeyboardEvent\n } = useCompositeRoot({\n grid,\n loopFocus,\n onLoop,\n orientation,\n highlightedIndex: highlightedIndexProp,\n onHighlightedIndexChange: onHighlightedIndexChangeProp,\n rootRef,\n stopEventPropagation,\n enableHomeAndEndKeys,\n direction,\n disabledIndices,\n modifierKeys\n });\n const element = useRenderElement(tag, componentProps, {\n state,\n ref: refs,\n props: [defaultProps, ...props, elementProps],\n stateAttributesMapping\n });\n const contextValue = React.useMemo(() => ({\n highlightedIndex,\n onHighlightedIndexChange,\n highlightItemOnHover,\n relayKeyboardEvent\n }), [highlightedIndex, onHighlightedIndexChange, highlightItemOnHover, relayKeyboardEvent]);\n return /*#__PURE__*/_jsx(CompositeRootContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: elementsRef,\n onMapChange: newMap => {\n onMapChangeProp?.(newMap);\n onMapChangeUnwrapped(newMap);\n },\n children: element\n })\n });\n}"],"names":["_jsx"],"mappings":";;;;;;;;;;AAAY,MAAC,wBAAwB;ACW9B,SAAS,iBAAiB,QAAQ;AACvC,QAAM;AAAA,IACJ,YAAY;AAAA,IACZ,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB,0BAA0B;AAAA,IAC1B,SAAS;AAAA,IACT,uBAAuB;AAAA,IACvB;AAAA,IACA;AAAA,IACA,eAAe;AAAA,EACnB,IAAM;AACJ,QAAM,CAAC,0BAA0B,2BAA2B,IAAI,MAAM,SAAS,CAAC;AAChF,QAAM,SAAS,QAAQ;AACvB,QAAM,UAAU,MAAM,OAAO,IAAI;AACjC,QAAM,YAAY,cAAc,SAAS,WAAW;AACpD,QAAM,cAAc,MAAM,OAAO,EAAE;AACnC,QAAM,wBAAwB,MAAM,OAAO,KAAK;AAChD,QAAM,wBAAwB,MAAM,OAAO,IAAI;AAC/C,QAAM,mBAAmB,4BAA4B;AACrD,QAAM,2BAA2B,kBAAkB,CAAC,OAAO,uBAAuB,UAAU;AAC1F,0BAAsB,UAAU,YAAY,QAAQ,KAAK,KAAK;AAC9D,KAAC,+BAA+B,6BAA6B,KAAK;AAClE,QAAI,sBAAsB;AACxB,YAAM,gBAAgB,YAAY,QAAQ,KAAK;AAC/C,6BAAuB,QAAQ,SAAS,eAAe,WAAW,WAAW;AAAA,IAC/E;AAAA,EACF,CAAC;AACD,QAAM,cAAc,kBAAkB,SAAO;;AAC3C,QAAI,IAAI,SAAS,GAAG;AAClB;AAAA,IACF;AACA,QAAI,sBAAsB,SAAS;AACjC,YAAM,WAAW,YAAY;AAG7B,YAAM,YAAY,SAAS,QAAQ,sBAAsB,OAAO;AAChE,UAAI,cAAc,IAAI;AA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AY;AAC9B,QAAM;AAAA,IACJ,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa;AAAA,IACb;AAAA,EACJ,IAAM,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB,0BAA0B;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,CAAG;AACD,QAAM,UAAU,iBAAiB,KAAK,gBAAgB;AAAA,IACpD;AAAA,IACA,KAAK;AAAA,IACL,OAAO,CAAC,cAAc,GAAG,OAAO,YAAY;AAAA,IAC5C;AAAA,EACJ,CAAG;AACD,QAAM,eAAe,MAAM,QAAQ,OAAO;AAAA,IACxC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,IAAM,CAAC,kBAAkB,0BAA0B,sBAAsB,kBAAkB,CAAC;AAC1F,SAAoBA,oBAAK,qBAAqB,UAAU;AAAA,IACtD,OAAO;AAAA,IACP,UAAuBA,oBAAK,eAAe;AAAA,MACzC;AAAA,MACA,aAAa,YAAU;AACrB,2DAAkB;AAClB,6BAAqB,MAAM;AAAA,MAC7B;AAAA,MACA,UAAU;AAAA,IAChB,CAAK;AAAA,EACL,CAAG;AACH;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"CompositeRoot-CR4V84Em.js","sources":["../node_modules/@base-ui/react/internals/composite/constants.mjs","../node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs","../node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs"],"sourcesContent":["export const ACTIVE_COMPOSITE_ITEM = 'data-composite-item-active';","'use client';\n\nimport * as React from 'react';\nimport { isElementDisabled } from '@base-ui/utils/isElementDisabled';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { EMPTY_ARRAY } from '@base-ui/utils/empty';\nimport { COMPOSITE_KEYS, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, END, HOME, MODIFIER_KEYS, findNonDisabledListIndex, getMaxListIndex, getMinListIndex, isListIndexDisabled, isIndexOutOfListBounds, isNativeInput, scrollIntoViewIfNeeded } from \"../composite.mjs\";\nimport { ACTIVE_COMPOSITE_ITEM } from \"../constants.mjs\";\nimport { getTarget } from \"../../../floating-ui-react/utils.mjs\";\nexport function useCompositeRoot(params) {\n const {\n loopFocus = true,\n orientation = 'both',\n grid,\n onLoop,\n direction,\n highlightedIndex: externalHighlightedIndex,\n onHighlightedIndexChange: externalSetHighlightedIndex,\n rootRef: externalRef,\n enableHomeAndEndKeys = false,\n stopEventPropagation,\n disabledIndices,\n modifierKeys = EMPTY_ARRAY\n } = params;\n const [internalHighlightedIndex, internalSetHighlightedIndex] = React.useState(0);\n const isGrid = grid != null;\n const rootRef = React.useRef(null);\n const mergedRef = useMergedRefs(rootRef, externalRef);\n const elementsRef = React.useRef([]);\n const hasSetDefaultIndexRef = React.useRef(false);\n const highlightedElementRef = React.useRef(null);\n const highlightedIndex = externalHighlightedIndex ?? internalHighlightedIndex;\n const onHighlightedIndexChange = useStableCallback((index, shouldScrollIntoView = false) => {\n highlightedElementRef.current = elementsRef.current[index] ?? null;\n (externalSetHighlightedIndex ?? internalSetHighlightedIndex)(index);\n if (shouldScrollIntoView) {\n const newActiveItem = elementsRef.current[index];\n scrollIntoViewIfNeeded(rootRef.current, newActiveItem, direction, orientation);\n }\n });\n const onMapChange = useStableCallback(map => {\n if (map.size === 0) {\n return;\n }\n if (hasSetDefaultIndexRef.current) {\n const elements = elementsRef.current;\n // Items added or removed around the highlighted one shift its index, so the tab stop would\n // otherwise move to a different item and navigation would resume from the wrong position.\n const nextIndex = elements.indexOf(highlightedElementRef.current);\n if (nextIndex === -1) {\n // A replacement at the same index can keep the tab stop. Otherwise move it to an\n // eligible item so a missing, hidden, or disabled replacement does not take the\n // composite out of the tab order.\n const replacement = elements[highlightedIndex];\n if (!replacement || isListIndexDisabled(elements, highlightedIndex, disabledIndices)) {\n onHighlightedIndexChange(getFallbackIndex(elements, disabledIndices));\n } else {\n highlightedElementRef.current = replacement;\n }\n } else if (nextIndex !== highlightedIndex) {\n onHighlightedIndexChange(nextIndex);\n }\n return;\n }\n hasSetDefaultIndexRef.current = true;\n const sortedElements = Array.from(map.keys());\n const activeItem = sortedElements.find(compositeElement => compositeElement?.hasAttribute(ACTIVE_COMPOSITE_ITEM)) ?? null;\n // Set the default highlighted index of an arbitrary composite item. The map value carries\n // the item's own index, which is not its position among the keys once a list mixes explicit\n // and automatic indexes and leaves gaps.\n const activeIndex = activeItem ? map.get(activeItem)?.index ?? -1 : -1;\n if (activeIndex !== -1) {\n onHighlightedIndexChange(activeIndex);\n } else if (isListIndexDisabled(sortedElements, highlightedIndex, disabledIndices)) {\n // The default highlighted item is disabled, so it should not hold the single\n // roving tab stop: a natively disabled element is removed from the tab order,\n // and an aria-disabled one should not be the entry point. Move the tab stop\n // to the first enabled item. If every item is disabled, keep the current\n // highlighted index.\n const firstEnabledIndex = findNonDisabledListIndex(sortedElements, {\n disabledIndices\n });\n if (!isIndexOutOfListBounds(sortedElements, firstEnabledIndex)) {\n onHighlightedIndexChange(firstEnabledIndex);\n }\n }\n scrollIntoViewIfNeeded(rootRef.current, activeItem, direction, orientation);\n });\n useIsoLayoutEffect(() => {\n // `disabledIndices` can resolve a render after the initial map population\n // (e.g. Toolbar derives it from item metadata through a state update), so the\n // default tab stop at index 0 may now point at a disabled item, leaving the\n // composite without a reachable tab stop. Re-validate and move it to the first\n // enabled item. Gated on `disabledIndices` being provided so composites that\n // rely on the DOM disabled fallback keep their existing behavior.\n if (disabledIndices == null || externalHighlightedIndex != null || !hasSetDefaultIndexRef.current) {\n return;\n }\n const elements = elementsRef.current;\n if (isListIndexDisabled(elements, highlightedIndex, disabledIndices)) {\n const firstEnabledIndex = findNonDisabledListIndex(elements, {\n disabledIndices\n });\n if (!isIndexOutOfListBounds(elements, firstEnabledIndex)) {\n onHighlightedIndexChange(firstEnabledIndex);\n }\n }\n }, [disabledIndices, externalHighlightedIndex, highlightedIndex, elementsRef, onHighlightedIndexChange]);\n const wrappedOnLoop = useStableCallback((event, prevIndex, nextIndex) => {\n if (!onLoop) {\n return nextIndex;\n }\n return onLoop(event, prevIndex, nextIndex, elementsRef);\n });\n\n // Stable so that `relayKeyboardEvent` does not invalidate identity-sensitive\n // consumers (the `CompositeRootContext` value and trigger data forwarding).\n const onKeyDown = useStableCallback(event => {\n const isHomeOrEnd = event.key === HOME || event.key === END;\n if (!COMPOSITE_KEYS.has(event.key) || !enableHomeAndEndKeys && isHomeOrEnd) {\n return;\n }\n if (isModifierKeySet(event, modifierKeys)) {\n return;\n }\n const element = rootRef.current;\n if (!element) {\n return;\n }\n const isRtl = direction === 'rtl';\n const horizontalForwardKey = isRtl ? ARROW_LEFT : ARROW_RIGHT;\n const horizontalBackwardKey = isRtl ? ARROW_RIGHT : ARROW_LEFT;\n const forwardKey = orientation === 'vertical' ? ARROW_DOWN : horizontalForwardKey;\n const backwardKey = orientation === 'vertical' ? ARROW_UP : horizontalBackwardKey;\n const target = getTarget(event.nativeEvent);\n if (target != null && isNativeInput(target) && !isElementDisabled(target)) {\n const selectionStart = target.selectionStart;\n const selectionEnd = target.selectionEnd;\n const textContent = target.value;\n // return to native textbox behavior when\n // 1 - Shift is held to make a text selection, or if there already is a text selection\n if (selectionStart == null || event.shiftKey || selectionStart !== selectionEnd) {\n return;\n }\n // 2 - arrow-ing forward and not in the last position of the text\n if (event.key !== backwardKey && selectionStart < textContent.length) {\n return;\n }\n // 3 -arrow-ing backward and not in the first position of the text\n if (event.key !== forwardKey && selectionStart > 0) {\n return;\n }\n }\n let nextIndex = highlightedIndex;\n const minIndex = getMinListIndex(elementsRef, disabledIndices);\n const maxIndex = getMaxListIndex(elementsRef, disabledIndices);\n if (grid != null) {\n nextIndex = grid({\n disabledIndices,\n elementsRef,\n event,\n highlightedIndex,\n loopFocus,\n maxIndex,\n minIndex,\n onLoop: wrappedOnLoop,\n orientation,\n rtl: isRtl\n });\n }\n const isForwardKey = orientation !== 'vertical' && event.key === horizontalForwardKey || orientation !== 'horizontal' && event.key === ARROW_DOWN;\n const isBackwardKey = orientation !== 'vertical' && event.key === horizontalBackwardKey || orientation !== 'horizontal' && event.key === ARROW_UP;\n if (enableHomeAndEndKeys) {\n if (event.key === HOME) {\n nextIndex = minIndex;\n } else if (event.key === END) {\n nextIndex = maxIndex;\n }\n }\n if (nextIndex === highlightedIndex && (isForwardKey || isBackwardKey)) {\n if (loopFocus && nextIndex === maxIndex && isForwardKey) {\n nextIndex = minIndex;\n if (onLoop) {\n nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef);\n }\n } else if (loopFocus && nextIndex === minIndex && isBackwardKey) {\n nextIndex = maxIndex;\n if (onLoop) {\n nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef);\n }\n } else {\n nextIndex = findNonDisabledListIndex(elementsRef.current, {\n startingIndex: nextIndex,\n decrement: isBackwardKey,\n disabledIndices\n });\n }\n }\n if (nextIndex !== highlightedIndex && !isIndexOutOfListBounds(elementsRef.current, nextIndex)) {\n if (stopEventPropagation) {\n event.stopPropagation();\n }\n if (isGrid || isHomeOrEnd || isForwardKey || isBackwardKey) {\n event.preventDefault();\n }\n onHighlightedIndexChange(nextIndex, true);\n\n // Wait for FocusManager `returnFocus` to execute.\n queueMicrotask(() => {\n elementsRef.current[nextIndex]?.focus();\n });\n }\n });\n const props = {\n ref: mergedRef,\n onFocus(event) {\n const element = rootRef.current;\n const target = getTarget(event.nativeEvent);\n if (!element || target == null || !isNativeInput(target)) {\n return;\n }\n target.setSelectionRange(0, target.value.length);\n },\n onKeyDown\n };\n return {\n props,\n highlightedIndex,\n onHighlightedIndexChange,\n elementsRef,\n onMapChange,\n relayKeyboardEvent: onKeyDown\n };\n}\n\n// Resolves the item that should hold the tab stop: the active item when it can take focus,\n// otherwise the first item that can. Falls back to index 0 so an all-disabled composite keeps the\n// index in range and regains a tab stop as soon as one of its items becomes focusable.\nfunction getFallbackIndex(elements, disabledIndices) {\n let fallbackIndex = -1;\n for (let index = 0; index < elements.length; index += 1) {\n const element = elements[index];\n if (!element || isListIndexDisabled(elements, index, disabledIndices)) {\n continue;\n }\n if (element.hasAttribute(ACTIVE_COMPOSITE_ITEM)) {\n return index;\n }\n if (fallbackIndex === -1) {\n fallbackIndex = index;\n }\n }\n return Math.max(fallbackIndex, 0);\n}\nfunction isModifierKeySet(event, ignoredModifierKeys) {\n for (const key of MODIFIER_KEYS) {\n if (ignoredModifierKeys.includes(key)) {\n continue;\n }\n if (event.getModifierState(key)) {\n return true;\n }\n }\n return false;\n}","'use client';\n\nimport * as React from 'react';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { CompositeList } from \"../list/CompositeList.mjs\";\nimport { useCompositeRoot } from \"./useCompositeRoot.mjs\";\nimport { CompositeRootContext } from \"./CompositeRootContext.mjs\";\nimport { useRenderElement } from \"../../useRenderElement.mjs\";\nimport { useDirection } from \"../../direction-context/DirectionContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function CompositeRoot(componentProps) {\n const {\n render,\n className,\n style,\n refs = EMPTY_ARRAY,\n props = EMPTY_ARRAY,\n state = EMPTY_OBJECT,\n stateAttributesMapping,\n highlightedIndex: highlightedIndexProp,\n onHighlightedIndexChange: onHighlightedIndexChangeProp,\n orientation,\n grid,\n loopFocus,\n onLoop,\n enableHomeAndEndKeys,\n onMapChange: onMapChangeProp,\n stopEventPropagation = true,\n rootRef,\n disabledIndices,\n modifierKeys,\n highlightItemOnHover = false,\n tag = 'div',\n ...elementProps\n } = componentProps;\n const direction = useDirection();\n const {\n props: defaultProps,\n highlightedIndex,\n onHighlightedIndexChange,\n elementsRef,\n onMapChange: onMapChangeUnwrapped,\n relayKeyboardEvent\n } = useCompositeRoot({\n grid,\n loopFocus,\n onLoop,\n orientation,\n highlightedIndex: highlightedIndexProp,\n onHighlightedIndexChange: onHighlightedIndexChangeProp,\n rootRef,\n stopEventPropagation,\n enableHomeAndEndKeys,\n direction,\n disabledIndices,\n modifierKeys\n });\n const element = useRenderElement(tag, componentProps, {\n state,\n ref: refs,\n props: [defaultProps, ...props, elementProps],\n stateAttributesMapping\n });\n const contextValue = React.useMemo(() => ({\n highlightedIndex,\n onHighlightedIndexChange,\n highlightItemOnHover,\n relayKeyboardEvent\n }), [highlightedIndex, onHighlightedIndexChange, highlightItemOnHover, relayKeyboardEvent]);\n return /*#__PURE__*/_jsx(CompositeRootContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: elementsRef,\n onMapChange: newMap => {\n onMapChangeProp?.(newMap);\n onMapChangeUnwrapped(newMap);\n },\n children: element\n })\n });\n}"],"names":["_jsx"],"mappings":";;;;;;;;;;AAAY,MAAC,wBAAwB;ACW9B,SAAS,iBAAiB,QAAQ;AACvC,QAAM;AAAA,IACJ,YAAY;AAAA,IACZ,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB,0BAA0B;AAAA,IAC1B,SAAS;AAAA,IACT,uBAAuB;AAAA,IACvB;AAAA,IACA;AAAA,IACA,eAAe;AAAA,EACnB,IAAM;AACJ,QAAM,CAAC,0BAA0B,2BAA2B,IAAI,MAAM,SAAS,CAAC;AAChF,QAAM,SAAS,QAAQ;AACvB,QAAM,UAAU,MAAM,OAAO,IAAI;AACjC,QAAM,YAAY,cAAc,SAAS,WAAW;AACpD,QAAM,cAAc,MAAM,OAAO,EAAE;AACnC,QAAM,wBAAwB,MAAM,OAAO,KAAK;AAChD,QAAM,wBAAwB,MAAM,OAAO,IAAI;AAC/C,QAAM,mBAAmB,4BAA4B;AACrD,QAAM,2BAA2B,kBAAkB,CAAC,OAAO,uBAAuB,UAAU;AAC1F,0BAAsB,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0,1,2]}
|
|
@@ -5,27 +5,27 @@ import IconProvider from "./components/atoms/IconProvider.es.js";
|
|
|
5
5
|
import { c as classNames } from "./classNames-B1XpQHle.js";
|
|
6
6
|
import { u as useTimeout } from "./useTimeout-D1vYJgq4.js";
|
|
7
7
|
import { a as useStableCallback, u as useIsoLayoutEffect, E as EMPTY_ARRAY, f as formatErrorMessage, c as useMergedRefs, m as mergeProps, b as useRenderElement, N as NOOP, g as unwrapLazyRenderProp, d as EMPTY_OBJECT, e as useRefWithInit, S as SafeReact, w as warn } from "./useIsoLayoutEffect-D2lpsB9D.js";
|
|
8
|
-
import { e as useFloatingParentNodeId,
|
|
8
|
+
import { e as useFloatingParentNodeId, f as useFloatingTree, w as webkit, h as popupTransitionStateMapping, c as FloatingPortal, i as FloatingNode, D as DROPDOWN_COLLISION_AVOIDANCE, P as POPUP_COLLISION_AVOIDANCE, R as ReactStore, j as popupStoreSelectors, k as FloatingTreeStore, l as createInitialPopupStoreState, m as PopupTriggerMap, n as fastComponent, o as useFloatingNodeId, q as useImplicitActiveTrigger, r as useOpenStateTransitions, a as attachPreventUnmountOnClose, s as createPopupOpenState, v as useSyncedFloatingRootContext, b as useDismiss, F as FOCUSABLE_POPUP_PROPS, x as usePopupInteractionProps, y as PopupHandleAttachment, z as FloatingTree, T as TYPEAHEAD_RESET_MS, A as fastComponentRef, B as usePopupHandleStore, C as useTriggerDataForwarding, p as pressableTriggerOpenStateMapping, E as FocusGuard, G as PATIENT_CLICK_THRESHOLD, H as useTriggerRegistration, t as triggerOpenStateMapping, I as voiceOver } from "./usePopupHandleStore-9hGUXtn5.js";
|
|
9
9
|
import { u as useDirection } from "./DirectionContext-Pb9yafF5.js";
|
|
10
|
-
import { e as enqueueFocus, F as FloatingFocusManager, I as InternalBackdrop, u as useOpenInteractionType, a as useClick } from "./useScrollLock-
|
|
11
|
-
import { c as createChangeEventDetails, B as listNavigation, i as isHTMLElement, s as focusOut, n as none, C as keyboard,
|
|
10
|
+
import { e as enqueueFocus, F as FloatingFocusManager, I as InternalBackdrop, u as useOpenInteractionType, a as useClick } from "./useScrollLock-QpeWQmdB.js";
|
|
11
|
+
import { c as createChangeEventDetails, B as listNavigation, i as isHTMLElement, s as focusOut, n as none, C as keyboard, F as pointer, b as getWindow, w as itemPress, u as useBaseUiId, v as outsidePress, G as siblingOpen, H as triggerHover, t as triggerPress, I as triggerFocus, l as createGenericEventDetails, r as escapeKey, y as imperativeAction, h as isLastTraversableNode, f as getParentNode, k as cancelOpen } from "./useBaseUiId-DCE1GVlg.js";
|
|
12
12
|
import { t as transitionStatusMapping, u as useTransitionStatus, a as useOpenChangeComplete, b as useAnimationsFinished } from "./useTransitionStatus-CHrs3i5F.js";
|
|
13
13
|
import { u as useAnimationFrame } from "./useAnimationFrame-DqvuRtgK.js";
|
|
14
|
-
import { g as getFloatingFocusElement, a as isTypeableCombobox, o as ownerDocument, b as isTypeableElement } from "./element-
|
|
14
|
+
import { g as getFloatingFocusElement, a as isTypeableCombobox, o as ownerDocument, b as isTypeableElement } from "./element-BI1c88Lp.js";
|
|
15
15
|
import { u as useValueAsRef } from "./addEventListener-D-i9O6BG.js";
|
|
16
|
-
import { i as isIndexOutOfListBounds,
|
|
17
|
-
import { a as activeElement, c as contains, g as getTarget, A as ARROW_LEFT, d as ARROW_RIGHT, e as ARROW_UP, f as ARROW_DOWN, j as jsdom } from "./constants-
|
|
16
|
+
import { i as isIndexOutOfListBounds, c as getMinListIndex, d as getMaxListIndex, s as stopEvent, e as getNextListIndex, f as isVirtualClick, h as isVirtualPointerEvent, j as isElementVisible, k as isListIndexDisabled, m as mac } from "./composite-Dzn8P1fl.js";
|
|
17
|
+
import { a as activeElement, c as contains, g as getTarget, A as ARROW_LEFT, d as ARROW_RIGHT, e as ARROW_UP, f as ARROW_DOWN, j as jsdom } from "./constants-BzjgA7aT.js";
|
|
18
18
|
import { u as useControlled } from "./useControlled-DMDWXIzj.js";
|
|
19
|
-
import { d as dispatchClickWithModifiers, a as useButton, u as useCompositeRootContext } from "./useButton-
|
|
19
|
+
import { d as dispatchClickWithModifiers, a as useButton, u as useCompositeRootContext } from "./useButton-CtXDdeoI.js";
|
|
20
20
|
import { u as useCompositeListItem, C as CompositeList } from "./useCompositeListItem-DlAKWsHE.js";
|
|
21
21
|
import { i as inertValue } from "./inertValue-C1Ml1s55.js";
|
|
22
|
-
import { b as useHoverFloatingInteraction, g as getDisabledMountTransitionStyles, u as useAnchorPositioning, a as usePositioner, c as useHoverReferenceInteraction, s as safePolygon } from "./usePositioner-
|
|
23
|
-
import { a as useTriggerSwitchTransition, u as useAnchoredPopupScrollLock, b as useTriggerFocusGuards } from "./useTriggerFocusGuards-
|
|
22
|
+
import { b as useHoverFloatingInteraction, g as getDisabledMountTransitionStyles, u as useAnchorPositioning, a as usePositioner, c as useHoverReferenceInteraction, s as safePolygon } from "./usePositioner-CAWMEP8L.js";
|
|
23
|
+
import { a as useTriggerSwitchTransition, u as useAnchoredPopupScrollLock, b as useTriggerFocusGuards } from "./useTriggerFocusGuards-Ss68N7Fe.js";
|
|
24
24
|
import { u as useToolbarRootContext } from "./ToolbarRootContext-B_HxjkNI.js";
|
|
25
|
-
import { C as COMPOSITE_KEYS } from "./composite-
|
|
26
|
-
import { i as isElementDisabled } from "./isElementDisabled-
|
|
27
|
-
import { C as CompositeItem } from "./CompositeItem-
|
|
28
|
-
import { u as useFocus } from "./useFocus-
|
|
25
|
+
import { C as COMPOSITE_KEYS } from "./composite-CH__oBQH.js";
|
|
26
|
+
import { i as isElementDisabled } from "./isElementDisabled-CcmHYLra.js";
|
|
27
|
+
import { C as CompositeItem } from "./CompositeItem-ClTKQQ4f.js";
|
|
28
|
+
import { u as useFocus } from "./useFocus-BGyXJhul.js";
|
|
29
29
|
function isStationaryWebKitPointer(event) {
|
|
30
30
|
return webkit && event.movementX === 0 && event.movementY === 0;
|
|
31
31
|
}
|
|
@@ -3301,4 +3301,4 @@ export {
|
|
|
3301
3301
|
findRootOwnerId as y,
|
|
3302
3302
|
MenuPositioner as z
|
|
3303
3303
|
};
|
|
3304
|
-
//# sourceMappingURL=DropdownMenu-
|
|
3304
|
+
//# sourceMappingURL=DropdownMenu-B_tIHJUl.js.map
|