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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select-BtX40h2K.js","sources":["../node_modules/@base-ui/utils/useOnFirstRender.mjs","../node_modules/@base-ui/react/floating-ui-react/hooks/useFloatingRootContext.mjs","../node_modules/@base-ui/react/internals/itemEquality.mjs","../node_modules/@base-ui/react/internals/resolveValueLabel.mjs","../node_modules/@base-ui/react/utils/ItemIndicator.mjs","../node_modules/@base-ui/react/utils/listbox-separator/ListboxSeparator.mjs","../node_modules/@base-ui/utils/usePreviousValue.mjs","../node_modules/@base-ui/react/select/root/SelectRootContext.mjs","../node_modules/@base-ui/react/select/store.mjs","../node_modules/@base-ui/react/utils/scrollEdges.mjs","../node_modules/@base-ui/react/select/root/SelectRoot.mjs","../node_modules/@base-ui/react/select/trigger/SelectTriggerDataAttributes.mjs","../node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs","../node_modules/@base-ui/react/select/value/SelectValue.mjs","../node_modules/@base-ui/react/select/portal/SelectPortal.mjs","../node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs","../node_modules/@base-ui/react/select/popup/utils.mjs","../node_modules/@base-ui/react/select/positioner/SelectPositioner.mjs","../node_modules/@base-ui/react/utils/styles.mjs","../node_modules/@base-ui/react/select/positioner/SelectPositionerCssVars.mjs","../node_modules/@base-ui/react/select/popup/SelectPopup.mjs","../node_modules/@base-ui/react/select/list/SelectList.mjs","../node_modules/@base-ui/react/select/item/SelectItemContext.mjs","../node_modules/@base-ui/react/select/item/SelectItem.mjs","../node_modules/@base-ui/react/select/item-indicator/SelectItemIndicator.mjs","../node_modules/@base-ui/react/select/item-text/SelectItemText.mjs","../node_modules/@base-ui/react/select/group/SelectGroupContext.mjs","../node_modules/@base-ui/react/select/group/SelectGroup.mjs","../node_modules/@base-ui/react/select/group-label/SelectGroupLabel.mjs","../node_modules/@base-ui/react/select/separator/SelectSeparator.mjs","../src/components/atoms/Select.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nexport function useOnFirstRender(fn) {\n const ref = React.useRef(true);\n if (ref.current) {\n ref.current = false;\n fn();\n }\n}","'use client';\n\nimport { isElement } from '@floating-ui/utils/dom';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { PopupTriggerMap } from \"../../utils/popups/index.mjs\";\nimport { useFloatingParentNodeId } from \"../components/FloatingTree.mjs\";\nimport { FloatingRootStore } from \"../components/FloatingRootStore.mjs\";\nexport function useFloatingRootContext(options) {\n const {\n open = false,\n onOpenChange,\n elements = {}\n } = options;\n const floatingId = useId();\n const nested = useFloatingParentNodeId() != null;\n if (process.env.NODE_ENV !== 'production') {\n const optionDomReference = elements.reference;\n if (optionDomReference && !isElement(optionDomReference)) {\n console.error('Cannot pass a virtual element to the `elements.reference` option,', 'as it must be a real DOM element. Use `context.setPositionReference()`', 'instead.');\n }\n }\n const store = useRefWithInit(() => new FloatingRootStore({\n open,\n transitionStatus: undefined,\n onOpenChange,\n referenceElement: elements.reference ?? null,\n floatingElement: elements.floating ?? null,\n triggerElements: new PopupTriggerMap(),\n floatingId,\n syncOnly: false,\n nested\n })).current;\n useIsoLayoutEffect(() => {\n const valuesToSync = {\n open,\n floatingId\n };\n if (elements.reference !== undefined) {\n valuesToSync.referenceElement = elements.reference;\n valuesToSync.domReferenceElement = isElement(elements.reference) ? elements.reference : null;\n }\n if (elements.floating !== undefined) {\n valuesToSync.floatingElement = elements.floating;\n }\n store.update(valuesToSync);\n }, [open, floatingId, elements.reference, elements.floating, store]);\n store.context.onOpenChange = onOpenChange;\n store.context.nested = nested;\n return store;\n}","import { areArraysEqual } from '@base-ui/utils/areArraysEqual';\n// Compared by identity in `findSelectionIndex`; don't wrap it.\nexport const defaultItemEquality = (itemValue, selectedValue) => Object.is(itemValue, selectedValue);\nexport function compareItemEquality(itemValue, selectedValue, comparer) {\n if (itemValue == null || selectedValue == null) {\n return Object.is(itemValue, selectedValue);\n }\n return comparer(itemValue, selectedValue);\n}\nexport function isSelectedValueDirty(currentValue, initialValue, comparer) {\n if (Array.isArray(currentValue) && Array.isArray(initialValue)) {\n return !areArraysEqual(currentValue, initialValue, (itemValue, initialItemValue) => compareItemEquality(itemValue, initialItemValue, comparer));\n }\n return currentValue !== initialValue;\n}\nexport function selectedValueIncludes(selectedValues, itemValue, comparer) {\n if (!selectedValues) {\n return false;\n }\n return selectedValues.some(selectedValue => {\n if (selectedValue === undefined) {\n return false;\n }\n return compareItemEquality(itemValue, selectedValue, comparer);\n });\n}\nexport function findItemIndex(itemValues, selectedValue, comparer) {\n if (!itemValues) {\n return -1;\n }\n return itemValues.findIndex(itemValue => {\n if (itemValue === undefined) {\n return false;\n }\n return compareItemEquality(itemValue, selectedValue, comparer);\n });\n}\n\n// The default comparer is `Object.is`, so the values can be indexed instead of rescanned\n// for every item. A custom comparer may match values that don't hash alike.\nfunction createSelectionMatcher(selectedValues, comparer) {\n if (comparer !== defaultItemEquality) {\n return itemValue => selectedValueIncludes(selectedValues, itemValue, comparer);\n }\n const index = new Set(selectedValues);\n index.delete(undefined);\n // `Set` treats +0 and -0 as equal; `Object.is` does not.\n return itemValue => index.has(itemValue) && (itemValue !== 0 || selectedValues.some(v => Object.is(itemValue, v)));\n}\nexport function findSelectionIndex(itemValues, selectedValue, comparer, multiple) {\n // Only treat the value as a list in multiple mode: an array can itself be a valid\n // single-select value.\n const index = multiple && Array.isArray(selectedValue) ?\n // Anchor to the first selected item in rendered order so the index does not depend\n // on the order in which the values were added to the array.\n itemValues.findIndex(createSelectionMatcher(selectedValue, comparer)) : findItemIndex(itemValues, selectedValue, comparer);\n return index === -1 ? null : index;\n}\n\n/** Resolves the first selected index as items register or change. */\nexport function resolveSelectedIndex(index, itemValue, registry, selectedValues, comparer, currentIndex) {\n if (selectedValueIncludes(selectedValues, itemValue, comparer)) {\n // A later item only takes over once the current anchor stops being selected.\n return currentIndex != null && index > currentIndex && selectedValueIncludes(selectedValues, registry[currentIndex], comparer) ? currentIndex : index;\n }\n // The holder re-elects the anchor once it stops being selected.\n return index === currentIndex ? findSelectionIndex(registry, selectedValues, comparer, true) : currentIndex;\n}\nexport function removeItem(selectedValues, itemValue, comparer) {\n return selectedValues.filter(selectedValue => !compareItemEquality(itemValue, selectedValue, comparer));\n}","'use client';\n\nimport * as React from 'react';\nimport { serializeValue } from \"./serializeValue.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction isGroup(item) {\n return typeof item === 'object' && item != null && Array.isArray(item.items);\n}\nexport function isGroupedItems(items) {\n // A group must carry an actual `items` array: key presence alone would misclassify an item\n // with an unrelated or optional `items` field.\n return isGroup(items?.[0]);\n}\nexport function flattenLeafItems(items) {\n return isGroupedItems(items) ? items.flatMap(group => group.items) : items;\n}\n\n/**\n * Checks if the items array contains an item with a null value that has a non-null label.\n */\nexport function hasNullItemLabel(items) {\n if (!Array.isArray(items)) {\n return items != null && 'null' in items;\n }\n const arrayItems = items;\n if (isGroupedItems(arrayItems)) {\n for (const group of arrayItems) {\n for (const item of group.items) {\n if (item && item.value == null && item.label != null) {\n return true;\n }\n }\n }\n return false;\n }\n for (const item of arrayItems) {\n if (item && item.value == null && item.label != null) {\n return true;\n }\n }\n return false;\n}\nexport function stringifyAsLabel(item, itemToStringLabel) {\n if (itemToStringLabel && item != null) {\n return itemToStringLabel(item) ?? '';\n }\n if (item && typeof item === 'object') {\n if ('label' in item && item.label != null) {\n return String(item.label);\n }\n if ('value' in item) {\n return String(item.value);\n }\n }\n return serializeValue(item);\n}\nexport function stringifyAsValue(item, itemToStringValue) {\n if (itemToStringValue && item != null) {\n return itemToStringValue(item) ?? '';\n }\n if (item && typeof item === 'object' && 'value' in item && 'label' in item) {\n return serializeValue(item.value);\n }\n return serializeValue(item);\n}\nexport function resolveSelectedLabel(value, items, itemToStringLabel) {\n function fallback() {\n return stringifyAsLabel(value, itemToStringLabel);\n }\n if (itemToStringLabel && value != null) {\n return itemToStringLabel(value);\n }\n\n // Custom object with explicit label takes precedence\n if (value && typeof value === 'object' && 'label' in value && value.label != null) {\n return value.label;\n }\n\n // Items provided as plain record map\n if (items && !Array.isArray(items)) {\n const label = Object.hasOwn(items, value) ? items[value] : undefined;\n return label ?? fallback();\n }\n\n // Items provided as array (flat or grouped)\n if (Array.isArray(items)) {\n const arrayItems = items;\n const flatItems = flattenLeafItems(arrayItems);\n if (value == null || typeof value !== 'object') {\n const match = flatItems.find(item => item.value === value);\n if (match && match.label != null) {\n return match.label;\n }\n return fallback();\n }\n\n // Object without explicit label: try matching by its `value` property\n if ('value' in value) {\n const match = flatItems.find(item => item && item.value === value.value);\n if (match && match.label != null) {\n return match.label;\n }\n }\n }\n return fallback();\n}\nexport function resolveMultipleLabels(values, items, itemToStringLabel) {\n return values.reduce((acc, value, index) => {\n if (index > 0) {\n acc.push(', ');\n }\n acc.push(/*#__PURE__*/_jsx(React.Fragment, {\n children: resolveSelectedLabel(value, items, itemToStringLabel)\n }, index));\n return acc;\n }, []);\n}","'use client';\n\nimport * as React from 'react';\nimport { useTransitionStatus } from \"../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\nimport { transitionStatusMapping } from \"../internals/stateAttributesMapping.mjs\";\n\n// The public wrappers mount this component only when selected or kept mounted, avoiding the\n// hook costs for unselected items. Pass selection as a prop so memoization observes changes.\nexport const ItemIndicator = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function ItemIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n keepMounted,\n selected,\n ...elementProps\n } = componentProps;\n const indicatorRef = React.useRef(null);\n const {\n transitionStatus,\n setMounted\n } = useTransitionStatus(selected);\n const state = {\n selected,\n transitionStatus\n };\n const element = useRenderElement('span', componentProps, {\n ref: [forwardedRef, indicatorRef],\n state,\n props: [{\n 'aria-hidden': true,\n children: '✔️'\n }, elementProps],\n stateAttributesMapping: transitionStatusMapping\n });\n useOpenChangeComplete({\n batch: true,\n enabled: !selected,\n open: selected,\n ref: indicatorRef,\n onComplete() {\n if (!selected) {\n setMounted(false);\n }\n }\n });\n return element;\n}));\nif (process.env.NODE_ENV !== \"production\") ItemIndicator.displayName = \"ItemIndicator\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * A visual separator between items.\n * Renders a `<div>` element.\n *\n * @internal\n */\nexport const ListboxSeparator = /*#__PURE__*/React.forwardRef(function ListboxSeparator(componentProps, forwardedRef) {\n const {\n className,\n render,\n orientation = 'horizontal',\n style,\n ...elementProps\n } = componentProps;\n const state = {\n orientation\n };\n return useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n role: 'presentation'\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") ListboxSeparator.displayName = \"ListboxSeparator\";","'use client';\n\nimport * as React from 'react';\n\n/**\n * Returns a previous value of its argument.\n * @param value Current value.\n * @returns Previous value, or null if there is no previous value.\n */\nexport function usePreviousValue(value) {\n const [state, setState] = React.useState({\n current: value,\n previous: null\n });\n if (!Object.is(value, state.current)) {\n setState({\n current: value,\n previous: state.current\n });\n }\n return state.previous;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectRootContext.displayName = \"SelectRootContext\";\nexport const SelectFloatingContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectFloatingContext.displayName = \"SelectFloatingContext\";\nexport function useSelectRootContext() {\n const store = React.useContext(SelectRootContext);\n if (store === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(60));\n }\n return store;\n}\nexport function useSelectFloatingContext() {\n const context = React.useContext(SelectFloatingContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(61));\n }\n return context;\n}","import { compareItemEquality } from \"../internals/itemEquality.mjs\";\nimport { hasNullItemLabel, stringifyAsValue } from \"../internals/resolveValueLabel.mjs\";\n\n/**\n * Non-reactive values shared with the select parts. Nothing here is observable through\n * `selectors`, so writing to a ref never notifies subscribers.\n */\n\nexport const selectors = {\n id: state => state.id,\n labelId: state => state.labelId,\n modal: state => state.modal,\n multiple: state => state.multiple,\n disabled: state => state.disabled,\n readOnly: state => state.readOnly,\n required: state => state.required,\n highlightItemOnHover: state => state.highlightItemOnHover,\n items: state => state.items,\n itemToStringLabel: state => state.itemToStringLabel,\n isItemEqualToValue: state => state.isItemEqualToValue,\n value: state => state.value,\n hasSelectedValue: state => {\n const {\n value,\n multiple,\n itemToStringValue\n } = state;\n if (value == null) {\n return false;\n }\n if (multiple && Array.isArray(value)) {\n return value.length > 0;\n }\n return stringifyAsValue(value, itemToStringValue) !== '';\n },\n hasNullItemLabel: (state, enabled) => {\n return enabled ? hasNullItemLabel(state.items) : false;\n },\n open: state => state.open,\n mounted: state => state.mounted,\n forceMount: state => state.forceMount,\n transitionStatus: state => state.transitionStatus,\n openMethod: state => state.openMethod,\n activeIndex: state => state.activeIndex,\n selectedIndex: state => state.selectedIndex,\n isActive: (state, index) => state.activeIndex === index,\n isSelected: (state, itemValue) => {\n const comparer = state.isItemEqualToValue;\n const storeValue = state.value;\n if (state.multiple) {\n return Array.isArray(storeValue) && storeValue.some(selectedItem => compareItemEquality(itemValue, selectedItem, comparer));\n }\n\n // The value is the source of truth: a stale `selectedIndex` (e.g. the controlled\n // value changes while the popup is open, where the index sync is deferred) must not\n // keep a previously selected item marked as selected.\n return compareItemEquality(itemValue, storeValue, comparer);\n },\n isSelectedByFocus: (state, index) => {\n return state.selectedIndex === index;\n },\n popupProps: state => state.popupProps,\n triggerProps: state => state.triggerProps,\n itemRoot: state => state.itemRoot,\n triggerElement: state => state.triggerElement,\n positionerElement: state => state.positionerElement,\n listElement: state => state.listElement,\n popupSide: state => state.popupSide,\n scrollUpArrowVisible: state => state.scrollUpArrowVisible,\n scrollDownArrowVisible: state => state.scrollDownArrowVisible,\n hasScrollArrows: state => state.hasScrollArrows\n};","import { clamp } from '@base-ui/utils/clamp';\nexport const SCROLL_EDGE_TOLERANCE_PX = 1;\nexport function getMaxScrollOffset(scrollSize, clientSize) {\n return Math.max(0, scrollSize - clientSize);\n}\nexport function normalizeScrollOffset(value, max) {\n if (max <= 0) {\n return 0;\n }\n const clamped = clamp(value, 0, max);\n const startDistance = clamped;\n const endDistance = max - clamped;\n const withinStartTolerance = startDistance <= SCROLL_EDGE_TOLERANCE_PX;\n const withinEndTolerance = endDistance <= SCROLL_EDGE_TOLERANCE_PX;\n if (withinStartTolerance && withinEndTolerance) {\n return startDistance <= endDistance ? 0 : max;\n }\n if (withinStartTolerance) {\n return 0;\n }\n if (withinEndTolerance) {\n return max;\n }\n return clamped;\n}","'use client';\n\nimport * as React from 'react';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';\nimport { usePreviousValue } from '@base-ui/utils/usePreviousValue';\nimport { isElementDisabled } from '@base-ui/utils/isElementDisabled';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { ReactStore } from '@base-ui/utils/store';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useClick, useDismiss, useFloatingRootContext, useListNavigation, useTypeahead } from \"../../floating-ui-react/index.mjs\";\nimport { SelectFloatingContext, SelectRootContext } from \"./SelectRootContext.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useRegisterFieldControl } from \"../../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { useUnmountAfterClose } from \"../../internals/useUnmountAfterClose.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { attachPreventUnmountOnClose } from \"../../utils/popups/popupStoreUtils.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { stringifyAsLabel, stringifyAsValue } from \"../../internals/resolveValueLabel.mjs\";\nimport { defaultItemEquality, findSelectionIndex, isSelectedValueDirty } from \"../../internals/itemEquality.mjs\";\nimport { useValueChanged } from \"../../internals/useValueChanged.mjs\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.mjs\";\nimport { getMaxScrollOffset, normalizeScrollOffset } from \"../../utils/scrollEdges.mjs\";\nimport { FOCUSABLE_POPUP_PROPS } from \"../../utils/popups/index.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { NOOP } from \"../../internals/noop.mjs\";\n\n/**\n * Groups all parts of the select.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function SelectRoot(props) {\n const {\n id,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n name: nameProp,\n form,\n autoComplete,\n disabled: disabledProp = false,\n readOnly = false,\n required = false,\n modal = true,\n actionsRef,\n inputRef,\n onOpenChangeComplete,\n items,\n multiple = false,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue = defaultItemEquality,\n highlightItemOnHover = true,\n children\n } = props;\n const {\n clearErrors\n } = useFormContext();\n const {\n setDirty,\n setTouched,\n setFocused,\n validityData,\n setFilled,\n name: fieldName,\n disabled: fieldDisabled,\n validation,\n validationMode\n } = useFieldRootContext();\n const generatedId = useLabelableId({\n id\n });\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const [value, setValueUnwrapped] = useControlled({\n controlled: valueProp,\n default: multiple ? defaultValue ?? EMPTY_ARRAY : defaultValue,\n name: 'Select',\n state: 'value'\n });\n const [open, setOpenUnwrapped] = useControlled({\n controlled: openProp,\n default: defaultOpen,\n name: 'Select',\n state: 'open'\n });\n const listRef = React.useRef([]);\n const labelsRef = React.useRef([]);\n const popupRef = React.useRef(null);\n const scrollHandlerRef = React.useRef(null);\n const scrollArrowsMountedCountRef = React.useRef(0);\n const valueRef = React.useRef(null);\n const valuesRef = React.useRef([]);\n const typingRef = React.useRef(false);\n const firstItemTextRef = React.useRef(null);\n const selectedItemTextRef = React.useRef(null);\n const selectionRef = React.useRef({\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false,\n dragY: 0\n });\n const alignItemWithTriggerActiveRef = React.useRef(false);\n const initialValueRef = React.useRef(value);\n const {\n openMethod,\n triggerProps: interactionTypeProps\n } = useOpenInteractionType(open);\n const store = useRefWithInit(() => new ReactStore({\n id: generatedId,\n labelId: undefined,\n modal,\n multiple,\n disabled,\n readOnly,\n required,\n highlightItemOnHover,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n value,\n open,\n // Seeded with the initial values of `useUnmountAfterClose`, which is called after the\n // store because its unmount cleanup writes to it. `useSyncedValues` keeps them in sync.\n mounted: open,\n transitionStatus: undefined,\n items,\n forceMount: false,\n openMethod: null,\n activeIndex: null,\n selectedIndex: null,\n popupProps: EMPTY_OBJECT,\n triggerProps: EMPTY_OBJECT,\n itemRoot: {\n props: EMPTY_OBJECT,\n multiple,\n disabled,\n readOnly,\n isItemEqualToValue\n },\n triggerElement: null,\n positionerElement: null,\n listElement: null,\n popupSide: null,\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false,\n hasScrollArrows: false\n }, {\n setValue: NOOP,\n setOpen: NOOP,\n handleScrollArrowVisibility: NOOP,\n onOpenChangeComplete: NOOP,\n listRef,\n popupRef,\n scrollHandlerRef,\n scrollArrowsMountedCountRef,\n valueRef,\n valuesRef,\n labelsRef,\n typingRef,\n selectionRef,\n firstItemTextRef,\n selectedItemTextRef,\n alignItemWithTriggerActiveRef,\n initialValueRef\n }, selectors)).current;\n const [preventUnmountOnClose, setPreventUnmountOnClose] = React.useState(false);\n const {\n mounted,\n transitionStatus,\n forceUnmount: handleUnmount\n } = useUnmountAfterClose({\n open,\n ref: popupRef,\n preventUnmountOnClose,\n setPreventUnmountOnClose,\n onUnmount() {\n store.update({\n activeIndex: null,\n openMethod: null,\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false\n });\n onOpenChangeComplete?.(false);\n }\n });\n const activeIndex = store.useState('activeIndex');\n const selectedIndex = store.useState('selectedIndex');\n const triggerElement = store.useState('triggerElement');\n const positionerElement = store.useState('positionerElement');\n const previousOpenMethod = usePreviousValue(openMethod);\n const renderedOpenMethod = openMethod ?? previousOpenMethod;\n const serializedValue = React.useMemo(() => {\n // In multiple mode the shared input is nameless; per-value entries are submitted via\n // `hiddenInputs`. Its value is therefore irrelevant, and passing the whole array to\n // `stringifyAsValue` would invoke a user `itemToStringValue` with an array it doesn't expect.\n if (multiple) {\n return '';\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const fieldStringValue = React.useMemo(() => {\n if (multiple && Array.isArray(value)) {\n return value.map(currentValue => stringifyAsValue(currentValue, itemToStringValue));\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const controlRef = useValueAsRef(triggerElement);\n const getStringifiedValueForForm = useStableCallback(() => fieldStringValue);\n useRegisterFieldControl(controlRef, generatedId, value, getStringifiedValueForForm, !disabled, nameProp);\n\n // Mirror the `hasSelectedValue` store selector so the Field's filled state agrees with the\n // trigger/value placeholder semantics (a value serializing to `''` counts as empty).\n const hasSelectedValue = multiple ? Array.isArray(value) && value.length > 0 : value != null && serializedValue !== '';\n useIsoLayoutEffect(() => {\n setFilled(hasSelectedValue);\n }, [hasSelectedValue, setFilled]);\n useIsoLayoutEffect(function syncSelectedIndex() {\n const nextIndex = findSelectionIndex(valuesRef.current, value, isItemEqualToValue, multiple);\n if (nextIndex === null) {\n selectedItemTextRef.current = null;\n }\n if (open) {\n return;\n }\n store.set('selectedIndex', nextIndex);\n }, [multiple, open, value, isItemEqualToValue, store]);\n useValueChanged(value, () => {\n clearErrors(name);\n setDirty(isSelectedValueDirty(value, validityData.initialValue, isItemEqualToValue));\n validation.change(value);\n });\n const setOpen = useStableCallback((nextOpen, eventDetails) => {\n const openEventDetails = eventDetails;\n const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(openEventDetails);\n onOpenChange?.(nextOpen, openEventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n if (!nextOpen) {\n setPreventUnmountOnClose(shouldPreventUnmountOnClose());\n }\n setOpenUnwrapped(nextOpen);\n if (!nextOpen && (eventDetails.reason === REASONS.focusOut || eventDetails.reason === REASONS.outsidePress)) {\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n }\n });\n React.useImperativeHandle(actionsRef, () => ({\n unmount: handleUnmount,\n close: () => {\n if (store.state.open) {\n setOpen(false, createChangeEventDetails(REASONS.imperativeAction));\n }\n }\n }), [handleUnmount, setOpen, store]);\n const setValue = useStableCallback((nextValue, eventDetails) => {\n onValueChange?.(nextValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValueUnwrapped(nextValue);\n });\n const handleScrollArrowVisibility = useStableCallback(scroller => {\n const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop);\n const shouldShowUp = scrollTop > 0;\n const shouldShowDown = scrollTop < maxScrollTop;\n store.set('scrollUpArrowVisible', shouldShowUp);\n store.set('scrollDownArrowVisible', shouldShowDown);\n });\n const floatingContext = useFloatingRootContext({\n open,\n onOpenChange: setOpen,\n elements: {\n reference: triggerElement,\n floating: positionerElement\n }\n });\n\n // `readOnly` locks the value, not the interaction: the popup can be opened and browsed so the\n // user can see the available options and which one is selected. Committing a value is blocked\n // separately in `SelectItem` and in the hidden input's autofill handler.\n const click = useClick(floatingContext, {\n enabled: !disabled,\n event: 'mousedown'\n });\n const dismiss = useDismiss(floatingContext);\n const listNavigation = useListNavigation(floatingContext, {\n enabled: !disabled,\n listRef,\n activeIndex,\n selectedIndex,\n disabledIndices: EMPTY_ARRAY,\n onNavigate(nextActiveIndex) {\n // Retain the highlight while transitioning out.\n if (nextActiveIndex === null && !open) {\n return;\n }\n store.set('activeIndex', nextActiveIndex);\n },\n focusItemOnHover: highlightItemOnHover\n });\n const typeahead = useTypeahead(floatingContext, {\n // Typeahead on an open popup only moves the highlight, so it remains available while\n // `readOnly`. The closed-trigger variant commits a value instead, so it doesn't.\n enabled: !disabled && (open || !readOnly && !multiple),\n listRef: labelsRef,\n activeIndex,\n selectedIndex,\n // Skip disabled items while matching so typeahead advances to the next selectable item\n // (a click can never select a disabled item and native `<select>` skips them too). Resolve\n // the disabled state from the element via the attribute-only `isElementDisabled` so the\n // hidden, force-mounted items used for closed-trigger typeahead aren't dropped by the\n // `elementsRef`/visibility filter that `disabledIndices` deliberately sidesteps.\n disabledIndices: index => isElementDisabled(listRef.current[index]),\n onMatch(index) {\n if (open) {\n store.set('activeIndex', index);\n } else {\n setValue(valuesRef.current[index], createChangeEventDetails(REASONS.none));\n }\n },\n onTyping(typing) {\n typingRef.current = typing;\n }\n });\n\n // `Select.Trigger` applies the id itself from the store, so it's deliberately not merged here.\n const mergedTriggerProps = React.useMemo(() => mergeProps(typeahead.reference, listNavigation.reference, dismiss.reference, click.reference, interactionTypeProps), [click.reference, typeahead.reference, listNavigation.reference, dismiss.reference, interactionTypeProps]);\n const popupProps = React.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, typeahead.floating, listNavigation.floating, dismiss.floating), [typeahead.floating, listNavigation.floating, dismiss.floating]);\n const itemProps = listNavigation.item ?? EMPTY_OBJECT;\n const itemRoot = React.useMemo(() => ({\n props: itemProps,\n multiple,\n disabled,\n readOnly,\n isItemEqualToValue\n }), [itemProps, multiple, disabled, readOnly, isItemEqualToValue]);\n store.useContextCallback('setValue', setValue);\n store.useContextCallback('setOpen', setOpen);\n store.useContextCallback('handleScrollArrowVisibility', handleScrollArrowVisibility);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n\n // The prop bags must be in the store before the parts render. `useSyncedValues` writes in a\n // layout effect, after all descendants have rendered.\n useOnFirstRender(() => {\n store.update({\n popupProps,\n triggerProps: mergedTriggerProps,\n itemRoot\n });\n });\n store.useSyncedValues({\n id: generatedId,\n modal,\n multiple,\n disabled,\n readOnly,\n required,\n highlightItemOnHover,\n value,\n open,\n mounted,\n transitionStatus,\n popupProps,\n triggerProps: mergedTriggerProps,\n itemRoot,\n items,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n openMethod: renderedOpenMethod\n });\n const ref = useMergedRefs(inputRef, validation.inputRef);\n const hiddenInputName = multiple ? undefined : name;\n const hiddenInputs = React.useMemo(() => {\n if (!multiple || !Array.isArray(value) || !name) {\n return null;\n }\n return value.map(v => {\n const currentSerializedValue = stringifyAsValue(v, itemToStringValue);\n return /*#__PURE__*/_jsx(\"input\", {\n type: \"hidden\",\n form: form,\n name: name,\n value: currentSerializedValue,\n disabled: disabled\n }, currentSerializedValue);\n });\n }, [multiple, value, form, name, itemToStringValue, disabled]);\n return /*#__PURE__*/_jsxs(SelectRootContext.Provider, {\n value: store,\n children: [/*#__PURE__*/_jsx(SelectFloatingContext.Provider, {\n value: floatingContext,\n children: children\n }), /*#__PURE__*/_jsx(\"input\", {\n ...validation.getValidationProps(disabled, {\n onFocus() {\n // Move focus to the trigger element when the hidden input is focused.\n store.state.triggerElement?.focus({\n // Supported in Chrome from 144 (January 2026)\n focusVisible: true\n });\n },\n // Handle browser autofill.\n onChange(event) {\n // Workaround for https://github.com/react/react/issues/9023\n if (event.nativeEvent.defaultPrevented || disabled || readOnly) {\n return;\n }\n const nextValue = event.currentTarget.value;\n const details = createChangeEventDetails(REASONS.none, event.nativeEvent);\n function handleChange() {\n if (multiple) {\n // Browser autofill only writes a single scalar value.\n return;\n }\n\n // Preserve the original serialized matching, then fall back to rendered text,\n // which browsers can autofill for primitive values like\n // `value=\"US\">United States`.\n const nextValueLower = nextValue.toLowerCase();\n let matchingIndex = valuesRef.current.findIndex(candidate => stringifyAsValue(candidate, itemToStringValue).toLowerCase() === nextValueLower || stringifyAsLabel(candidate, itemToStringLabel).toLowerCase() === nextValueLower);\n if (matchingIndex === -1) {\n matchingIndex = valuesRef.current.findIndex((_, index) => {\n const renderedLabel = labelsRef.current[index];\n return renderedLabel != null && renderedLabel.toLowerCase() === nextValueLower;\n });\n }\n const matchingValue = valuesRef.current[matchingIndex];\n if (matchingValue != null) {\n // `setValue` may be canceled by `onValueChange`; rely on `useValueChanged` to\n // mark the field dirty and run validation only when the value actually changes.\n setValue(matchingValue, details);\n }\n }\n store.set('forceMount', true);\n queueMicrotask(handleChange);\n }\n }),\n id: generatedId && hiddenInputName == null ? `${generatedId}-hidden-input` : undefined,\n form: form,\n name: hiddenInputName,\n autoComplete: autoComplete,\n value: serializedValue,\n disabled: disabled,\n required: required && !(multiple && hasSelectedValue),\n readOnly: readOnly,\n ref: ref,\n style: name ? visuallyHiddenInput : visuallyHidden,\n tabIndex: -1,\n \"aria-hidden\": true,\n suppressHydrationWarning: true\n }), hiddenInputs]\n });\n}","import { CommonTriggerDataAttributes } from \"../../utils/popupStateMapping.mjs\";\n\n/**\n * Present when the corresponding select is open.\n */\nexport const popupOpen = CommonTriggerDataAttributes.popupOpen;\n/**\n * Present when the trigger is pressed.\n */\nexport const pressed = CommonTriggerDataAttributes.pressed;\n/**\n * Present when the select is disabled.\n */\nexport const disabled = 'data-disabled';\n/**\n * Present when the select is readonly.\n */\nexport const readonly = 'data-readonly';\n/**\n * Indicates which side the corresponding popup is positioned relative to its anchor.\n * @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start' | null}\n */\nexport const popupSide = 'data-popup-side';\n/**\n * Present when the select is required.\n */\nexport const required = 'data-required';\n/**\n * Present when the select is in a valid state (when wrapped in Field.Root).\n */\nexport const valid = 'data-valid';\n/**\n * Present when the select is in an invalid state (when wrapped in Field.Root).\n */\nexport const invalid = 'data-invalid';\n/**\n * Present when the select has been touched (when wrapped in Field.Root).\n */\nexport const touched = 'data-touched';\n/**\n * Present when the select's value has changed (when wrapped in Field.Root).\n */\nexport const dirty = 'data-dirty';\n/**\n * Present when the select has a value (when wrapped in Field.Root).\n */\nexport const filled = 'data-filled';\n/**\n * Present when the select trigger is focused (when wrapped in Field.Root).\n */\nexport const focused = 'data-focused';\n/**\n * Present when the select doesn't have a value.\n */\nexport const placeholder = 'data-placeholder';","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useSetFieldFocused } from \"../../internals/field-root-context/useSetFieldFocused.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { fieldValidityMapping } from \"../../internals/field-constants/constants.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { isMouseWithinBounds } from \"../../utils/getPseudoElementBounds.mjs\";\nimport { contains, getFloatingFocusElement } from \"../../floating-ui-react/utils.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { resolveAriaLabelledBy } from \"../../utils/resolveAriaLabelledBy.mjs\";\nimport * as SelectTriggerDataAttributes from \"./SelectTriggerDataAttributes.mjs\";\nconst SELECTED_DELAY = 400;\nconst stateAttributesMapping = {\n ...pressableTriggerOpenStateMapping,\n ...fieldValidityMapping,\n popupSide: side => side ? {\n [SelectTriggerDataAttributes.popupSide]: side\n } : null,\n value: () => null\n};\n\n/**\n * A button that opens the select popup.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectTrigger = /*#__PURE__*/React.forwardRef(function SelectTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n disabled: disabledProp = false,\n nativeButton = true,\n style,\n ...elementProps\n } = componentProps;\n const {\n setTouched,\n validationMode,\n validation,\n state: fieldState,\n disabled: fieldDisabled\n } = useFieldRootContext();\n const {\n labelId: fieldLabelId\n } = useLabelableContext();\n const store = useSelectRootContext();\n const readOnly = store.useState('readOnly');\n const required = store.useState('required');\n const selectDisabled = store.useState('disabled');\n const disabled = fieldDisabled || selectDisabled || disabledProp;\n const open = store.useState('open');\n const mounted = store.useState('mounted');\n const value = store.useState('value');\n const triggerProps = store.useState('triggerProps');\n const positionerElement = store.useState('positionerElement');\n const listElement = store.useState('listElement');\n const popupSideValue = store.useState('popupSide');\n const rootId = store.useState('id');\n const selectLabelId = store.useState('labelId');\n const hasSelectedValue = store.useState('hasSelectedValue');\n const popupSide = mounted && positionerElement ? popupSideValue : null;\n const id = idProp ?? rootId;\n const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, selectLabelId);\n useLabelableId({\n id: idProp\n });\n const positionerRef = useValueAsRef(positionerElement);\n const triggerRef = React.useRef(null);\n const setFocused = useSetFieldFocused(disabled, triggerRef);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const setTriggerElement = store.useStateSetter('triggerElement');\n const timeoutFocus = useTimeout();\n const timeoutMouseDown = useTimeout();\n const selectedDelayTimeout = useTimeout();\n React.useEffect(() => {\n if (open) {\n // A mousedown on the trigger can open the popup under the cursor. Keep mouseup selection\n // disabled briefly so releasing over either the selected item or a neighboring item doesn't\n // commit an accidental selection. SelectItem can still opt into unselected mouseup sooner\n // after a real drag over the item.\n selectedDelayTimeout.start(SELECTED_DELAY, () => {\n store.context.selectionRef.current.allowUnselectedMouseUp = true;\n store.context.selectionRef.current.allowSelectedMouseUp = true;\n });\n return () => {\n selectedDelayTimeout.clear();\n };\n }\n store.context.selectionRef.current = {\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false,\n dragY: 0\n };\n timeoutMouseDown.clear();\n return undefined;\n }, [open, store, timeoutMouseDown, selectedDelayTimeout]);\n const mergedProps = mergeProps(triggerProps, {\n id,\n role: 'combobox',\n 'aria-expanded': open,\n 'aria-haspopup': 'listbox',\n 'aria-controls': open ? listElement?.id ?? getFloatingFocusElement(positionerElement)?.id : undefined,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-readonly': readOnly || undefined,\n 'aria-required': required || undefined,\n tabIndex: disabled ? -1 : 0,\n onFocus(event) {\n setFocused(true);\n\n // The popup element shouldn't obscure the focused trigger.\n if (open && store.context.alignItemWithTriggerActiveRef.current) {\n store.context.setOpen(false, createChangeEventDetails(REASONS.none, event.nativeEvent));\n }\n\n // Saves a re-render on initial click: `forceMount === true` mounts\n // the items before `open === true`. We could sync those cycles better\n // without a timeout, but this is enough for now.\n timeoutFocus.start(0, () => {\n store.set('forceMount', true);\n });\n },\n onBlur(event) {\n // If focus is moving into the popup, don't count it as a blur.\n if (contains(positionerElement, event.relatedTarget)) {\n return;\n }\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n },\n onMouseDown(event) {\n if (open) {\n return;\n }\n const doc = ownerDocument(event.currentTarget);\n function handleMouseUp(mouseEvent) {\n if (!triggerRef.current) {\n return;\n }\n const mouseUpTarget = mouseEvent.target;\n\n // Don't treat the release as an outside press when it lands on the trigger or inside\n // the popup positioner (or their children).\n if (contains(triggerRef.current, mouseUpTarget) || contains(positionerRef.current, mouseUpTarget)) {\n return;\n }\n if (isMouseWithinBounds(mouseEvent, triggerRef.current)) {\n return;\n }\n store.context.setOpen(false, createChangeEventDetails(REASONS.cancelOpen, mouseEvent));\n }\n\n // Firefox can fire this upon mousedown\n timeoutMouseDown.start(0, () => {\n doc.addEventListener('mouseup', handleMouseUp, {\n once: true\n });\n });\n }\n }, elementProps, getButtonProps);\n const props = validation.getValidationProps(disabled, mergedProps);\n\n // ensure nested useButton does not overwrite the combobox role:\n // <Toolbar.Button render={<Select.Trigger />} />\n props.role = 'combobox';\n const state = {\n ...fieldState,\n open,\n disabled,\n value,\n readOnly,\n popupSide,\n placeholder: !hasSelectedValue\n };\n return useRenderElement('button', componentProps, {\n ref: [forwardedRef, triggerRef, buttonRef, setTriggerElement],\n state,\n stateAttributesMapping,\n props\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectTrigger.displayName = \"SelectTrigger\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { resolveMultipleLabels, resolveSelectedLabel } from \"../../internals/resolveValueLabel.mjs\";\nconst stateAttributesMapping = {\n value: () => null\n};\n\n/**\n * A text label of the currently selected item.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectValue = /*#__PURE__*/React.forwardRef(function SelectValue(componentProps, forwardedRef) {\n const {\n className,\n render,\n children: childrenProp,\n placeholder,\n style,\n ...elementProps\n } = componentProps;\n const store = useSelectRootContext();\n const value = store.useState('value');\n const items = store.useState('items');\n const itemToStringLabel = store.useState('itemToStringLabel');\n const hasSelectedValue = store.useState('hasSelectedValue');\n const shouldCheckNullItemLabel = !hasSelectedValue && placeholder != null && childrenProp == null;\n const hasNullLabel = store.useState('hasNullItemLabel', shouldCheckNullItemLabel);\n const state = {\n value,\n placeholder: !hasSelectedValue\n };\n let children = null;\n if (typeof childrenProp === 'function') {\n children = childrenProp(value);\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (shouldCheckNullItemLabel && !hasNullLabel) {\n children = placeholder;\n } else if (Array.isArray(value)) {\n children = resolveMultipleLabels(value, items, itemToStringLabel);\n } else {\n children = resolveSelectedLabel(value, items, itemToStringLabel);\n }\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, store.context.valueRef],\n props: [{\n children\n }, elementProps],\n stateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectValue.displayName = \"SelectValue\";","'use client';\n\nimport * as React from 'react';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectPortal = /*#__PURE__*/React.forwardRef(function SelectPortal(portalProps, forwardedRef) {\n const store = useSelectRootContext();\n const mounted = store.useState('mounted');\n const forceMount = store.useState('forceMount');\n const shouldRender = mounted || forceMount;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPortal.displayName = \"SelectPortal\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectPositionerContext.displayName = \"SelectPositionerContext\";\nexport function useSelectPositionerContext() {\n const context = React.useContext(SelectPositionerContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.' : _formatErrorMessage(59));\n }\n return context;\n}","export function clearStyles(element, originalStyles) {\n if (element) {\n Object.assign(element.style, originalStyles);\n }\n}\nexport const LIST_FUNCTIONAL_STYLES = {\n position: 'relative',\n maxHeight: '100%',\n overflowX: 'hidden',\n overflowY: 'auto'\n};","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useSelectFloatingContext, useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { CompositeList } from \"../../internals/composite/list/CompositeList.mjs\";\nimport { useAnchorPositioning } from \"../../internals/useAnchorPositioning.mjs\";\nimport { SelectPositionerContext } from \"./SelectPositionerContext.mjs\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.mjs\";\nimport { DROPDOWN_COLLISION_AVOIDANCE } from \"../../internals/constants.mjs\";\nimport { clearStyles } from \"../popup/utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { findItemIndex } from \"../../internals/itemEquality.mjs\";\nimport { usePositioner } from \"../../utils/usePositioner.mjs\";\nimport { useAnchoredPopupScrollLock } from \"../../utils/useAnchoredPopupScrollLock.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst FIXED = {\n position: 'fixed'\n};\n\n/**\n * Positions the select popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectPositioner = /*#__PURE__*/React.forwardRef(function SelectPositioner(componentProps, forwardedRef) {\n const {\n anchor,\n className,\n render,\n // `useAnchorPositioning` applies the same defaults to the undefined values; the names\n // remain destructured to exclude the props from `elementProps`.\n positionMethod,\n side,\n align,\n sideOffset,\n alignOffset,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding,\n arrowPadding,\n sticky,\n disableAnchorTracking,\n alignItemWithTrigger = true,\n collisionAvoidance = DROPDOWN_COLLISION_AVOIDANCE,\n style,\n ...elementProps\n } = componentProps;\n const store = useSelectRootContext();\n const floatingRootContext = useSelectFloatingContext();\n const open = store.useState('open');\n const mounted = store.useState('mounted');\n const modal = store.useState('modal');\n const value = store.useState('value');\n const openMethod = store.useState('openMethod');\n const positionerElement = store.useState('positionerElement');\n const triggerElement = store.useState('triggerElement');\n const isItemEqualToValue = store.useState('isItemEqualToValue');\n const transitionStatus = store.useState('transitionStatus');\n const scrollUpArrowRef = React.useRef(null);\n const scrollDownArrowRef = React.useRef(null);\n const [controlledAlignItemWithTrigger, setControlledAlignItemWithTrigger] = React.useState(alignItemWithTrigger);\n const alignItemWithTriggerActive = mounted && controlledAlignItemWithTrigger && openMethod !== 'touch';\n if (!mounted && controlledAlignItemWithTrigger !== alignItemWithTrigger) {\n setControlledAlignItemWithTrigger(alignItemWithTrigger);\n }\n React.useImperativeHandle(store.context.alignItemWithTriggerActiveRef, () => alignItemWithTriggerActive);\n useAnchoredPopupScrollLock((alignItemWithTriggerActive || modal) && open, openMethod === 'touch', positionerElement, triggerElement);\n const positioning = useAnchorPositioning({\n anchor,\n floatingRootContext,\n positionMethod,\n mounted,\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n disableAnchorTracking: disableAnchorTracking ?? alignItemWithTriggerActive,\n collisionAvoidance,\n keepMounted: true\n });\n const renderedSide = alignItemWithTriggerActive ? 'none' : positioning.side;\n const positionerStyles = alignItemWithTriggerActive ? FIXED : positioning.positionerStyles;\n const state = {\n open,\n side: renderedSide,\n align: positioning.align,\n anchorHidden: positioning.anchorHidden\n };\n useIsoLayoutEffect(() => {\n store.set('popupSide', positioning.side);\n }, [store, positioning.side]);\n const setPositionerElement = store.useStateSetter('positionerElement');\n const element = usePositioner(componentProps, state, {\n styles: positionerStyles,\n transitionStatus,\n props: elementProps,\n refs: [forwardedRef, setPositionerElement],\n hidden: !mounted,\n inert: !open\n });\n const prevMapSizeRef = React.useRef(0);\n const onMapChange = useStableCallback(map => {\n if (store.context.valuesRef.current.length === 0) {\n return;\n }\n const prevSize = prevMapSizeRef.current;\n prevMapSizeRef.current = map.size;\n const eventDetails = createChangeEventDetails(REASONS.none);\n if (prevSize !== 0 && !store.state.multiple && value !== null) {\n const selectedValueIndex = findItemIndex(store.context.valuesRef.current, value, isItemEqualToValue);\n if (selectedValueIndex === -1) {\n const initialSelectedValue = store.context.initialValueRef.current;\n const hasInitial = initialSelectedValue != null && findItemIndex(store.context.valuesRef.current, initialSelectedValue, isItemEqualToValue) !== -1;\n const nextValue = hasInitial ? initialSelectedValue : null;\n store.context.setValue(nextValue, eventDetails);\n if (nextValue === null) {\n store.set('selectedIndex', null);\n store.context.selectedItemTextRef.current = null;\n }\n }\n }\n if (prevSize !== 0 && store.state.multiple && Array.isArray(value)) {\n const nextValue = value.filter(selectedItemValue => findItemIndex(store.context.valuesRef.current, selectedItemValue, isItemEqualToValue) !== -1);\n if (nextValue.length !== value.length) {\n store.context.setValue(nextValue, eventDetails);\n if (nextValue.length === 0) {\n store.set('selectedIndex', null);\n store.context.selectedItemTextRef.current = null;\n }\n }\n }\n if (open && alignItemWithTriggerActive) {\n store.update({\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false\n });\n const stylesToClear = {\n height: ''\n };\n clearStyles(positionerElement, stylesToClear);\n clearStyles(store.context.popupRef.current, stylesToClear);\n }\n });\n const contextValue = React.useMemo(() => ({\n ...positioning,\n side: renderedSide,\n alignItemWithTriggerActive,\n setControlledAlignItemWithTrigger,\n scrollUpArrowRef,\n scrollDownArrowRef\n }), [positioning, renderedSide, alignItemWithTriggerActive, setControlledAlignItemWithTrigger]);\n return /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: store.context.listRef,\n labelsRef: store.context.labelsRef,\n onMapChange: onMapChange,\n children: /*#__PURE__*/_jsxs(SelectPositionerContext.Provider, {\n value: contextValue,\n children: [mounted && modal && /*#__PURE__*/_jsx(InternalBackdrop, {\n inert: inertValue(!open),\n cutout: triggerElement\n }), element]\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPositioner.displayName = \"SelectPositioner\";","import { jsx as _jsx } from \"react/jsx-runtime\";\nconst DISABLE_SCROLLBAR_CLASS_NAME = 'base-ui-disable-scrollbar';\nexport const styleDisableScrollbar = {\n className: DISABLE_SCROLLBAR_CLASS_NAME,\n getElement(nonce) {\n return /*#__PURE__*/_jsx(\"style\", {\n nonce: nonce,\n href: DISABLE_SCROLLBAR_CLASS_NAME,\n precedence: \"base-ui:low\",\n children: `.${DISABLE_SCROLLBAR_CLASS_NAME}{scrollbar-width:none}.${DISABLE_SCROLLBAR_CLASS_NAME}::-webkit-scrollbar{display:none}`\n });\n }\n};\nif (process.env.NODE_ENV !== \"production\") styleDisableScrollbar.getElement.displayName = \"styleDisableScrollbar.getElement\";","/**\n * The available width between the trigger and the edge of the viewport.\n * @type {number}\n */\nexport const availableWidth = '--available-width';\n/**\n * The available height between the trigger and the edge of the viewport.\n * @type {number}\n */\nexport const availableHeight = '--available-height';\n/**\n * The anchor's width.\n * @type {number}\n */\nexport const anchorWidth = '--anchor-width';\n/**\n * The anchor's height.\n * @type {number}\n */\nexport const anchorHeight = '--anchor-height';\n/**\n * The coordinates that this element is anchored to. Used for animations and transitions.\n * @type {string}\n */\nexport const transformOrigin = '--transform-origin';","'use client';\n\nimport * as React from 'react';\nimport { rectToClientRect } from '@floating-ui/utils';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { platform } from '@base-ui/utils/platform';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { clamp } from '@base-ui/utils/clamp';\nimport { FloatingFocusManager, platform as floatingPlatform } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectFloatingContext, useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { clearStyles, LIST_FUNCTIONAL_STYLES } from \"./utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../internals/getDisabledMountTransitionStyles.mjs\";\nimport { getMaxScrollOffset, SCROLL_EDGE_TOLERANCE_PX } from \"../../utils/scrollEdges.mjs\";\nimport { useCSPContext } from \"../../internals/csp-context/CSPContext.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport * as SelectPositionerCssVars from \"../positioner/SelectPositionerCssVars.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...popupStateMapping,\n ...transitionStatusMapping\n};\n\n/**\n * A container for the select list.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectPopup = /*#__PURE__*/React.forwardRef(function SelectPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n ...elementProps\n } = componentProps;\n const store = useSelectRootContext();\n const multiple = store.useState('multiple');\n const readOnly = store.useState('readOnly');\n const highlightItemOnHover = store.useState('highlightItemOnHover');\n const floatingRootContext = useSelectFloatingContext();\n const {\n side,\n align,\n alignItemWithTriggerActive,\n isPositioned,\n setControlledAlignItemWithTrigger\n } = useSelectPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const direction = useDirection();\n const {\n nonce,\n disableStyleElements\n } = useCSPContext();\n const id = store.useState('id');\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const mounted = store.useState('mounted');\n const popupProps = store.useState('popupProps');\n const transitionStatus = store.useState('transitionStatus');\n const triggerElement = store.useState('triggerElement');\n const positionerElement = store.useState('positionerElement');\n const listElement = store.useState('listElement');\n const reachedMaxHeightRef = React.useRef(false);\n const initialPlacedRef = React.useRef(false);\n const originalPositionerStylesRef = React.useRef({});\n const scrollArrowFrame = useAnimationFrame();\n const handleScroll = useStableCallback(scroller => {\n if (!positionerElement || !store.context.popupRef.current || !initialPlacedRef.current) {\n return;\n }\n const isTopPositioned = positionerElement.style.top === '0px';\n const isBottomPositioned = positionerElement.style.bottom === '0px';\n if (reachedMaxHeightRef.current || !alignItemWithTriggerActive || !isTopPositioned && !isBottomPositioned) {\n store.context.handleScrollArrowVisibility(scroller);\n return;\n }\n const scale = getScale(positionerElement);\n const currentHeight = normalizeSize(positionerElement.getBoundingClientRect().height, 'y', scale);\n const doc = ownerDocument(positionerElement);\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const marginTop = parseFloat(positionerStyles.marginTop);\n const marginBottom = parseFloat(positionerStyles.marginBottom);\n const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(store.context.popupRef.current));\n const maxAvailableHeight = Math.min(doc.documentElement.clientHeight - marginTop - marginBottom, maxPopupHeight);\n const scrollTop = scroller.scrollTop;\n const maxScrollTop = getMaxScrollTop(scroller);\n\n // `Infinity` requests a scroll to the recomputed maximum offset.\n let nextScrollTop = null;\n const setHeight = height => {\n positionerElement.style.height = `${height}px`;\n };\n const diff = isTopPositioned ? maxScrollTop - scrollTop : scrollTop;\n const nextHeight = Math.min(currentHeight + diff, maxAvailableHeight);\n if (diff <= SCROLL_EDGE_TOLERANCE_PX) {\n const heightDelta = clamp(diff, 0, maxAvailableHeight - currentHeight);\n if (heightDelta > 0) {\n // Consume the remaining scroll in height.\n setHeight(currentHeight + heightDelta);\n }\n scroller.scrollTop = isTopPositioned ? maxScrollTop : 0;\n if (maxAvailableHeight - (currentHeight + heightDelta) <= SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n store.context.handleScrollArrowVisibility(scroller);\n return;\n }\n if (maxAvailableHeight - nextHeight > SCROLL_EDGE_TOLERANCE_PX) {\n nextScrollTop = isTopPositioned ? Infinity : 0;\n } else if (isBottomPositioned && scrollTop < maxScrollTop) {\n const overshoot = currentHeight + diff - maxAvailableHeight;\n nextScrollTop = scrollTop - (diff - overshoot);\n }\n const nextPositionerHeight = Math.ceil(nextHeight);\n if (nextPositionerHeight !== 0) {\n setHeight(nextPositionerHeight);\n }\n if (nextScrollTop != null) {\n // Recompute bounds after resizing (clientHeight likely changed).\n const target = clamp(nextScrollTop, 0, getMaxScrollTop(scroller));\n\n // Avoid adjustments that re-trigger scroll events forever.\n if (Math.abs(scroller.scrollTop - target) > SCROLL_EDGE_TOLERANCE_PX) {\n scroller.scrollTop = target;\n }\n }\n if (nextPositionerHeight >= maxAvailableHeight - SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n store.context.handleScrollArrowVisibility(scroller);\n });\n React.useImperativeHandle(store.context.scrollHandlerRef, () => handleScroll, [handleScroll]);\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete(true);\n }\n }\n });\n const state = {\n open,\n transitionStatus,\n side,\n align\n };\n useIsoLayoutEffect(() => {\n if (!positionerElement || !store.context.popupRef.current || Object.keys(originalPositionerStylesRef.current).length) {\n return;\n }\n originalPositionerStylesRef.current = {\n top: positionerElement.style.top || '0',\n left: positionerElement.style.left || '0',\n right: positionerElement.style.right,\n height: positionerElement.style.height,\n bottom: positionerElement.style.bottom,\n minHeight: positionerElement.style.minHeight,\n maxHeight: positionerElement.style.maxHeight,\n marginTop: positionerElement.style.marginTop,\n marginBottom: positionerElement.style.marginBottom\n };\n }, [store, positionerElement]);\n useIsoLayoutEffect(() => {\n if (open || alignItemWithTriggerActive) {\n return;\n }\n initialPlacedRef.current = false;\n reachedMaxHeightRef.current = false;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n }, [open, alignItemWithTriggerActive, positionerElement]);\n useIsoLayoutEffect(() => {\n const popupElement = store.context.popupRef.current;\n\n // Wait for Floating UI's first positioning pass before reading DOM geometry.\n // We replace the final coordinates for aligned selects, but still need middleware\n // like `size()` to set CSS variables such as `--anchor-width`.\n if (!open || !triggerElement || !positionerElement || !popupElement || alignItemWithTriggerActive && !isPositioned || store.state.transitionStatus === 'ending') {\n return;\n }\n initialPlacedRef.current = true;\n popupElement.style.removeProperty(SelectPositionerCssVars.transformOrigin);\n if (!alignItemWithTriggerActive) {\n // The wrapper supplies the scroller: the list owns scrolling once it has mounted, and\n // this effect re-runs (cancelling the stale frame) when that happens.\n scrollArrowFrame.request(() => store.context.handleScrollArrowVisibility(listElement || popupElement));\n return;\n }\n\n // Ensure we remove any transforms that can affect the location of the popup\n // and therefore the calculations.\n const restoreTransformStyles = unsetTransformStyles(popupElement);\n try {\n let textElement = store.context.selectedItemTextRef.current;\n if (!textElement?.isConnected) {\n const hasSelectedValue = store.select('hasSelectedValue');\n textElement = !hasSelectedValue && store.context.firstItemTextRef.current?.isConnected ? store.context.firstItemTextRef.current : null;\n }\n const valueElement = store.context.valueRef.current;\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const popupStyles = win.getComputedStyle(popupElement);\n const doc = ownerDocument(triggerElement);\n const scale = getScale(triggerElement);\n const triggerRect = normalizeRect(triggerElement.getBoundingClientRect(), scale);\n const positionerRect = normalizeRect(positionerElement.getBoundingClientRect(), scale);\n const triggerHeight = triggerRect.height;\n const scroller = listElement || popupElement;\n const scrollHeight = scroller.scrollHeight;\n const borderBottom = parseFloat(popupStyles.borderBottomWidth);\n // The `|| N` fallbacks cover an unset/`auto` value (parses to `NaN`). Note a literal `0`\n // also resolves to the fallback, so an explicit `margin: 0` or `min-height: 0` still takes\n // the default below.\n const marginTop = parseFloat(positionerStyles.marginTop) || 10;\n const marginBottom = parseFloat(positionerStyles.marginBottom) || 10;\n const minHeight = parseFloat(positionerStyles.minHeight) || 100;\n const maxPopupHeight = getMaxPopupHeight(popupStyles);\n const paddingLeft = 5;\n const paddingRight = 5;\n const triggerCollisionThreshold = 20;\n const viewportHeight = doc.documentElement.clientHeight - marginTop - marginBottom;\n const viewportWidth = doc.documentElement.clientWidth;\n const availableSpaceBeneathTrigger = viewportHeight - triggerRect.bottom + triggerHeight;\n let textRect;\n let alignedLeft = direction === 'rtl' ? triggerRect.right - positionerRect.width : triggerRect.left;\n let offsetY = 0;\n if (textElement && valueElement) {\n const valueRect = normalizeRect(valueElement.getBoundingClientRect(), scale);\n textRect = normalizeRect(textElement.getBoundingClientRect(), scale);\n alignedLeft = positionerRect.left + (direction === 'rtl' ? valueRect.right - textRect.right : valueRect.left - textRect.left);\n const valueCenterFromTriggerTop = valueRect.top - triggerRect.top + valueRect.height / 2;\n const textCenterFromPositionerTop = textRect.top - positionerRect.top + textRect.height / 2;\n offsetY = textCenterFromPositionerTop - valueCenterFromTriggerTop;\n }\n const idealHeight = availableSpaceBeneathTrigger + offsetY + marginBottom + borderBottom;\n let height = Math.min(viewportHeight, idealHeight);\n const maxHeight = viewportHeight - marginTop - marginBottom;\n const scrollTop = idealHeight - height;\n const maxRight = viewportWidth - paddingRight;\n positionerElement.style.left = `${clamp(alignedLeft, paddingLeft, maxRight - positionerRect.width)}px`;\n positionerElement.style.height = `${height}px`;\n // `none` (not the invalid `auto`) so the explicit height governs in align mode and isn't\n // clamped by a `max-height` from user CSS.\n positionerElement.style.maxHeight = 'none';\n positionerElement.style.marginTop = `${marginTop}px`;\n positionerElement.style.marginBottom = `${marginBottom}px`;\n popupElement.style.height = '100%';\n const maxScrollTop = getMaxScrollTop(scroller);\n const isTopPositioned = scrollTop >= maxScrollTop - SCROLL_EDGE_TOLERANCE_PX;\n if (isTopPositioned) {\n height = Math.min(viewportHeight, positionerRect.height) - (scrollTop - maxScrollTop);\n }\n\n // When the trigger is too close to the top or bottom of the viewport, or the minHeight is\n // reached, we fallback to aligning the popup to the trigger as the UX is poor otherwise.\n const fallbackToAlignPopupToTrigger = triggerRect.top < triggerCollisionThreshold || triggerRect.bottom > viewportHeight - triggerCollisionThreshold || Math.ceil(height) + SCROLL_EDGE_TOLERANCE_PX < Math.min(scrollHeight, minHeight);\n\n // Safari doesn't position the popup correctly when pinch-zoomed.\n const isPinchZoomed = (win.visualViewport?.scale ?? 1) !== 1 && platform.engine.webkit;\n if (fallbackToAlignPopupToTrigger || isPinchZoomed) {\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n setControlledAlignItemWithTrigger(false);\n return;\n }\n const initialHeight = Math.max(minHeight, height);\n if (isTopPositioned) {\n const topOffset = Math.max(0, viewportHeight - idealHeight);\n positionerElement.style.top = positionerRect.height >= maxHeight ? '0' : `${topOffset}px`;\n positionerElement.style.height = `${height}px`;\n scroller.scrollTop = getMaxScrollTop(scroller);\n } else {\n positionerElement.style.bottom = '0';\n scroller.scrollTop = scrollTop;\n }\n if (textRect) {\n const popupTop = positionerRect.top;\n const popupHeight = positionerRect.height;\n const textCenterY = textRect.top + textRect.height / 2;\n const clampedY = clamp(popupHeight > 0 ? (textCenterY - popupTop) / popupHeight * 100 : 50, 0, 100);\n popupElement.style.setProperty(SelectPositionerCssVars.transformOrigin, `50% ${clampedY}%`);\n }\n if (initialHeight === viewportHeight || height >= maxPopupHeight) {\n reachedMaxHeightRef.current = true;\n }\n store.context.handleScrollArrowVisibility(scroller);\n if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && store.context.listRef.current[0] != null) {\n store.set('activeIndex', 0);\n }\n } finally {\n restoreTransformStyles();\n }\n }, [store, open, positionerElement, triggerElement, alignItemWithTriggerActive, setControlledAlignItemWithTrigger, scrollArrowFrame, listElement, highlightItemOnHover, direction, isPositioned]);\n React.useEffect(() => {\n if (!alignItemWithTriggerActive || !positionerElement || !open) {\n return undefined;\n }\n const win = ownerWindow(positionerElement);\n function handleResize(event) {\n store.context.setOpen(false, createChangeEventDetails(REASONS.windowResize, event));\n }\n return addEventListener(win, 'resize', handleResize);\n }, [store, alignItemWithTriggerActive, positionerElement, open]);\n const defaultProps = {\n ...(listElement ? {\n role: 'presentation'\n } : {\n role: 'listbox',\n 'aria-multiselectable': multiple || undefined,\n 'aria-readonly': readOnly || undefined,\n id: `${id}-list`\n }),\n onKeyDown(event) {\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onScroll(event) {\n if (listElement) {\n return;\n }\n handleScroll(event.currentTarget);\n },\n ...(alignItemWithTriggerActive && {\n style: listElement ? {\n height: '100%'\n } : LIST_FUNCTIONAL_STYLES\n }),\n className: !listElement && alignItemWithTriggerActive ? styleDisableScrollbar.className : undefined\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, store.context.popupRef],\n state,\n stateAttributesMapping,\n props: [popupProps, defaultProps, getDisabledMountTransitionStyles(transitionStatus), elementProps]\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!disableStyleElements && styleDisableScrollbar.getElement(nonce), /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n modal: false,\n disabled: !mounted,\n openInteractionType: openMethod,\n returnFocus: finalFocus,\n restoreFocus: true,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPopup.displayName = \"SelectPopup\";\nfunction getMaxPopupHeight(popupStyles) {\n const maxHeightStyle = popupStyles.maxHeight;\n return maxHeightStyle.endsWith('px') ? parseFloat(maxHeightStyle) || Infinity : Infinity;\n}\nfunction getMaxScrollTop(scroller) {\n return getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n}\nfunction getScale(element) {\n // The platform API is async-capable, but the DOM platform returns a plain scale object.\n return floatingPlatform.getScale(element);\n}\nfunction normalizeSize(size, axis, scale) {\n return size / scale[axis];\n}\nfunction normalizeRect(rect, scale) {\n return rectToClientRect({\n x: normalizeSize(rect.x, 'x', scale),\n y: normalizeSize(rect.y, 'y', scale),\n width: normalizeSize(rect.width, 'x', scale),\n height: normalizeSize(rect.height, 'y', scale)\n });\n}\nconst TRANSFORM_STYLE_RESETS = [['transform', 'none'], ['scale', '1'], ['translate', '0 0']];\nfunction unsetTransformStyles(popupElement) {\n const {\n style\n } = popupElement;\n const originalStyles = {};\n for (const [property, value] of TRANSFORM_STYLE_RESETS) {\n originalStyles[property] = style.getPropertyValue(property);\n style.setProperty(property, value, 'important');\n }\n return () => {\n for (const [property] of TRANSFORM_STYLE_RESETS) {\n const originalValue = originalStyles[property];\n if (originalValue) {\n style.setProperty(property, originalValue);\n } else {\n style.removeProperty(property);\n }\n }\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { LIST_FUNCTIONAL_STYLES } from \"../popup/utils.mjs\";\n\n/**\n * A container for the select items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectList = /*#__PURE__*/React.forwardRef(function SelectList(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const store = useSelectRootContext();\n const multiple = store.useState('multiple');\n const readOnly = store.useState('readOnly');\n const {\n alignItemWithTriggerActive\n } = useSelectPositionerContext();\n const hasScrollArrows = store.useState('hasScrollArrows');\n const openMethod = store.useState('openMethod');\n const id = store.useState('id');\n const defaultProps = {\n id: `${id}-list`,\n role: 'listbox',\n 'aria-multiselectable': multiple || undefined,\n 'aria-readonly': readOnly || undefined,\n onScroll(event) {\n store.context.scrollHandlerRef.current?.(event.currentTarget);\n },\n ...(alignItemWithTriggerActive && {\n style: LIST_FUNCTIONAL_STYLES\n }),\n className: hasScrollArrows && openMethod !== 'touch' ? styleDisableScrollbar.className : undefined\n };\n const setListElement = store.useStateSetter('listElement');\n return useRenderElement('div', componentProps, {\n ref: [forwardedRef, setListElement],\n props: [defaultProps, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectList.displayName = \"SelectList\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectItemContext.displayName = \"SelectItemContext\";\nexport function useSelectItemContext() {\n const context = React.useContext(SelectItemContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.' : _formatErrorMessage(57));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { SelectItemContext } from \"./SelectItemContext.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { compareItemEquality, removeItem, resolveSelectedIndex } from \"../../internals/itemEquality.mjs\";\nimport { isVirtualClick } from \"../../floating-ui-react/utils/event.mjs\";\n\n/**\n * An individual option in the select popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectItem = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItem(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n value: itemValue = null,\n label,\n disabled: disabledProp = false,\n nativeButton = false,\n ...elementProps\n } = componentProps;\n const textRef = React.useRef(null);\n const listItem = useCompositeListItem({\n guess: true,\n label,\n textRef\n });\n const store = useSelectRootContext();\n const {\n props: itemProps,\n multiple,\n disabled: selectDisabled,\n readOnly,\n isItemEqualToValue\n } = store.useState('itemRoot');\n const disabled = selectDisabled || disabledProp;\n const highlighted = store.useState('isActive', listItem.index);\n const open = store.useState('open');\n const selected = store.useState('isSelected', itemValue);\n const selectedByFocus = store.useState('isSelectedByFocus', listItem.index);\n const index = listItem.index;\n const itemRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n const values = store.context.valuesRef.current;\n values[index] = itemValue;\n return () => {\n delete values[index];\n };\n }, [index, itemValue, store]);\n useIsoLayoutEffect(() => {\n const selectedValue = store.state.value;\n const currentIndex = store.state.selectedIndex;\n let nextIndex = currentIndex;\n let claims;\n if (multiple && Array.isArray(selectedValue)) {\n // The claiming item also owns the text ref that aligns the popup.\n nextIndex = resolveSelectedIndex(index, itemValue, store.context.valuesRef.current, selectedValue, isItemEqualToValue, currentIndex);\n claims = nextIndex === index;\n if (index === currentIndex && !claims) {\n store.context.selectedItemTextRef.current = null;\n }\n } else {\n claims = selectedValue !== undefined && compareItemEquality(itemValue, selectedValue, isItemEqualToValue);\n if (claims) {\n nextIndex = index;\n }\n }\n store.set('selectedIndex', nextIndex);\n\n // Make sure SelectPopup can measure the selected item on first open.\n // SelectItemText can still update this ref later when focus moves.\n if (claims && textRef.current) {\n store.context.selectedItemTextRef.current = textRef.current;\n }\n }, [index, multiple, isItemEqualToValue, store, itemValue]);\n const pointerTypeRef = React.useRef('mouse');\n const allowMouseSelectionRef = React.useRef(false);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const state = {\n disabled,\n selected,\n highlighted\n };\n function commitSelection(event) {\n // A forced-open select (`open`/`defaultOpen`) can still receive item activations even\n // when the root is disabled or read-only, so guard the commit here too.\n if (selectDisabled || readOnly) {\n return;\n }\n const selectedValue = store.state.value;\n if (multiple) {\n const currentValue = Array.isArray(selectedValue) ? selectedValue : [];\n const nextValue = selected ? removeItem(currentValue, itemValue, isItemEqualToValue) : [...currentValue, itemValue];\n store.context.setValue(nextValue, createChangeEventDetails(REASONS.itemPress, event));\n } else {\n store.context.setValue(itemValue, createChangeEventDetails(REASONS.itemPress, event));\n store.context.setOpen(false, createChangeEventDetails(REASONS.itemPress, event));\n }\n }\n function resetDragMovement() {\n store.context.selectionRef.current.dragY = 0;\n }\n const defaultProps = {\n role: 'option',\n 'aria-selected': selected,\n tabIndex: open && highlighted ? 0 : -1,\n onKeyDown(event) {\n store.set('activeIndex', index);\n if (event.key === ' ' && store.context.typingRef.current) {\n // `useButton` skips Space activation for `role=\"option\"` items when the keydown\n // is `defaultPrevented`, keeping typeahead spaces from committing a selection.\n event.preventDefault();\n }\n },\n onClick(event) {\n const isMouseClick = pointerTypeRef.current !== 'touch';\n const clickPointerType = event.nativeEvent.pointerType;\n const isVirtualMouseClick = isMouseClick && isVirtualClick(event.nativeEvent) && (\n // Generic no-pointer `detail === 0` clicks stay tied to highlight state. Virtual\n // clicks that carry browser pointer data, including an empty string from assistive\n // technology, can activate unhighlighted items.\n clickPointerType !== undefined || highlighted);\n // With alignItemWithTrigger, opening can place an item under the cursor. Real mouse\n // clicks must start on the item, while virtual clicks represent explicit keyboard or\n // assistive technology activation.\n const isInvalidMouseClick = isMouseClick && !isVirtualMouseClick && !allowMouseSelectionRef.current;\n allowMouseSelectionRef.current = false;\n if (disabled || isInvalidMouseClick) {\n return;\n }\n commitSelection(event.nativeEvent);\n },\n onPointerEnter(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onPointerMove(event) {\n if (event.pointerType === 'mouse' && event.buttons === 1) {\n const selection = store.context.selectionRef.current;\n selection.dragY += event.movementY;\n if (selection.dragY ** 2 >= 64) {\n selection.allowUnselectedMouseUp = true;\n }\n }\n },\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n allowMouseSelectionRef.current = true;\n resetDragMovement();\n },\n onMouseUp() {\n resetDragMovement();\n if (disabled || pointerTypeRef.current === 'touch') {\n return;\n }\n\n // Regular clicks are committed by the click event.\n if (allowMouseSelectionRef.current) {\n return;\n }\n const disallowSelectedMouseUp = !store.context.selectionRef.current.allowSelectedMouseUp && selected;\n const disallowUnselectedMouseUp = !store.context.selectionRef.current.allowUnselectedMouseUp && !selected;\n if (disallowSelectedMouseUp || disallowUnselectedMouseUp) {\n return;\n }\n allowMouseSelectionRef.current = true;\n itemRef.current?.click();\n allowMouseSelectionRef.current = false;\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [buttonRef, forwardedRef, listItem.ref, itemRef],\n state,\n props: [itemProps, defaultProps, elementProps, getButtonProps]\n });\n const contextValue = React.useMemo(() => ({\n selected,\n index,\n textRef,\n selectedByFocus\n }), [selected, index, textRef, selectedByFocus]);\n return /*#__PURE__*/_jsx(SelectItemContext.Provider, {\n value: contextValue,\n children: element\n });\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItem.displayName = \"SelectItem\";","'use client';\n\nimport * as React from 'react';\nimport { useSelectItemContext } from \"../item/SelectItemContext.mjs\";\nimport { ItemIndicator } from \"../../utils/ItemIndicator.mjs\";\n\n/**\n * Indicates whether the select item is selected.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectItemIndicator = /*#__PURE__*/React.forwardRef(function SelectItemIndicator(componentProps, forwardedRef) {\n const {\n selected\n } = useSelectItemContext();\n const shouldRender = componentProps.keepMounted || selected;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(ItemIndicator, {\n ...componentProps,\n selected: selected,\n ref: forwardedRef\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectItemIndicator.displayName = \"SelectItemIndicator\";","'use client';\n\nimport * as React from 'react';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useSelectItemContext } from \"../item/SelectItemContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * A text label of the select item.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectItemText = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItemText(componentProps, forwardedRef) {\n const {\n index,\n textRef,\n selectedByFocus\n } = useSelectItemContext();\n const store = useSelectRootContext();\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const localRef = React.useCallback(node => {\n if (!node) {\n return;\n }\n if (index === 0) {\n store.context.firstItemTextRef.current = node;\n }\n if (selectedByFocus) {\n store.context.selectedItemTextRef.current = node;\n }\n }, [store, index, selectedByFocus]);\n const element = useRenderElement('div', componentProps, {\n ref: [localRef, forwardedRef, textRef],\n props: elementProps\n });\n return element;\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItemText.displayName = \"SelectItemText\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectGroupContext.displayName = \"SelectGroupContext\";\nexport function useSelectGroupContext() {\n const context = React.useContext(SelectGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.' : _formatErrorMessage(56));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { SelectGroupContext } from \"./SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * Groups related select items with the corresponding label.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectGroup = /*#__PURE__*/React.forwardRef(function SelectGroup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState();\n const contextValue = React.useMemo(() => ({\n labelId,\n setLabelId\n }), [labelId, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n role: 'group',\n 'aria-labelledby': labelId\n }, elementProps]\n });\n return /*#__PURE__*/_jsx(SelectGroupContext.Provider, {\n value: contextValue,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectGroup.displayName = \"SelectGroup\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useSelectGroupContext } from \"../group/SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * An accessible label that is automatically associated with its parent group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectGroupLabel = /*#__PURE__*/React.forwardRef(function SelectGroupLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n setLabelId\n } = useSelectGroupContext();\n const id = useBaseUiId(idProp);\n useIsoLayoutEffect(() => {\n setLabelId(id);\n return () => {\n setLabelId(currentId => currentId === id ? undefined : currentId);\n };\n }, [id, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n id,\n 'aria-hidden': true\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectGroupLabel.displayName = \"SelectGroupLabel\";","'use client';\n\nimport { ListboxSeparator } from \"../../utils/listbox-separator/ListboxSeparator.mjs\";\n/**\n * A visual separator between items or groups.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectSeparator = ListboxSeparator;","import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Select as SelectPrimitive } from '@base-ui/react/select'\n\nimport {\n dropdownItemVariants,\n dropdownLabelVariants,\n dropdownListVariants,\n dropdownPanelVariants,\n dropdownSeparatorVariants,\n} from '@/components/atoms/DropdownMenu'\nimport IconProvider from '@/components/atoms/IconProvider'\nimport { cn } from '@/lib/utils'\n\nconst selectTriggerVariants = cva(\n 'flex h-8 w-full min-w-0 items-center gap-space-8 rounded-md border bg-background-input px-space-10 text-left font-lab text-body-md text-text-primary',\n {\n variants: {\n invalid: {\n true: 'border-status-border-error-bold',\n false: 'border-border-default',\n },\n // borderless: for a trigger that sits inside another surface (table cell, joined field) and owns no chrome.\n variant: {\n default: '',\n borderless: 'border-transparent bg-transparent hover:bg-background-ghost-hover',\n },\n },\n defaultVariants: {\n invalid: false,\n variant: 'default',\n },\n },\n)\n\ntype SelectAttachedEdge = 'start' | 'end' | 'top' | 'bottom'\n\nconst selectAttachedClasses: Record<SelectAttachedEdge, string> = {\n start: 'rounded-l-none border-l-0',\n end: 'rounded-r-none border-r-0',\n top: 'rounded-t-none border-t-0',\n bottom: 'rounded-b-none border-b-0',\n}\n\n// Squares the corners and drops the border on the edges where the control joins a neighbour.\nfunction selectAttachedClass(attached?: SelectAttachedEdge | SelectAttachedEdge[]) {\n if (!attached) return undefined\n return (Array.isArray(attached) ? attached : [attached]).map((edge) => selectAttachedClasses[edge])\n}\n\n// TODO: local chip look until the design-system Chip component exists. Then replace\n// selectChipVariants and SelectChipRemove with that Chip (and its remove affordance).\nconst selectChipVariants = cva(\n 'inline-flex h-5 shrink-0 items-center gap-space-4 rounded-sm border border-border-secondary px-space-8 font-lab text-label-sm whitespace-nowrap text-text-secondary',\n {\n variants: {\n tone: {\n default: 'bg-background-raised hover:border-border-default hover:bg-background-ghost-hover',\n more: 'bg-background-item-selected',\n },\n },\n defaultVariants: {\n tone: 'default',\n },\n },\n)\n\n// Trailing controls sit outside the trigger, so they read the root's disabled state from here.\nconst SelectDisabledContext = React.createContext(false)\n\nfunction Select<Value, Multiple extends boolean | undefined = false>({\n disabled,\n ...props\n}: SelectPrimitive.Root.Props<Value, Multiple>) {\n return (\n <SelectDisabledContext value={disabled ?? false}>\n <SelectPrimitive.Root disabled={disabled} {...props} />\n </SelectDisabledContext>\n )\n}\n\ntype SelectTrailingProps = {\n clearLabel: string\n disabled: boolean\n invalid: boolean\n onClear?: () => void\n showClear: boolean\n}\n\n/** Status, clear, divider and chevron in the Figma order; only the clear button takes pointer input. */\nfunction SelectTrailing({ clearLabel, disabled, invalid, onClear, showClear }: SelectTrailingProps) {\n return (\n <span className=\"pointer-events-none absolute inset-y-0 right-space-10 flex items-center gap-space-8\">\n {invalid ? <IconProvider icon=\"triangle-exclamation\" size=\"16\" className=\"text-status-text-error\" /> : null}\n {showClear ? (\n <>\n <button\n type=\"button\"\n aria-label={clearLabel}\n disabled={disabled}\n onClick={onClear}\n className=\"pointer-events-auto flex size-4 items-center justify-center rounded-sm text-icon-primary focus-ring disabled:pointer-events-none\"\n >\n <IconProvider icon=\"xmark\" size=\"12\" />\n </button>\n <span aria-hidden=\"true\" className=\"h-4 w-px bg-border-subtle\" />\n </>\n ) : null}\n <IconProvider\n icon=\"chevron-down\"\n size=\"16\"\n className=\"text-icon-secondary transition-transform group-has-[[data-popup-open]]/select:rotate-180\"\n />\n </span>\n )\n}\n\n// Side padding + chevron + gap, plus 24 for the status glyph and 33 for clear + divider.\nconst trailingPadding = { plain: 'pr-8.5', invalid: 'pr-14.5', clear: 'pr-16.75', invalidClear: 'pr-22.75' }\n\ntype SelectTriggerProps = SelectPrimitive.Trigger.Props &\n VariantProps<typeof selectTriggerVariants> & {\n clearLabel?: string\n onClear?: () => void\n showClear?: boolean\n wrapperClassName?: string\n attached?: SelectAttachedEdge | SelectAttachedEdge[]\n }\n\nfunction SelectTrigger({\n attached,\n className,\n clearLabel = 'Clear selection',\n invalid,\n onClear,\n showClear = false,\n variant,\n wrapperClassName,\n ...props\n}: SelectTriggerProps) {\n const isInvalid = invalid ?? false\n const disabled = React.useContext(SelectDisabledContext)\n const padding = isInvalid\n ? showClear\n ? trailingPadding.invalidClear\n : trailingPadding.invalid\n : showClear\n ? trailingPadding.clear\n : trailingPadding.plain\n\n return (\n <div\n data-slot=\"select-trigger-wrapper\"\n className={cn('group/select relative w-80 max-w-full has-[[data-disabled]]:opacity-50', wrapperClassName)}\n >\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n aria-invalid={isInvalid || undefined}\n className={cn(\n selectTriggerVariants({ invalid: isInvalid, variant }),\n padding,\n selectAttachedClass(attached),\n 'cursor-pointer focus-ring data-disabled:cursor-not-allowed data-popup-open:outline-2 data-popup-open:outline-offset-2 data-popup-open:outline-border-focus',\n className,\n )}\n {...props}\n />\n <SelectTrailing\n clearLabel={clearLabel}\n disabled={disabled}\n invalid={isInvalid}\n onClear={onClear}\n showClear={showClear}\n />\n </div>\n )\n}\n\ntype SelectValueDisplay = 'text' | 'count' | 'chips'\n\n// TODO: see selectChipVariants. Pointer-only because the trigger is itself the interactive element;\n// keyboard users deselect through the list, so the × stays out of the tab order.\nfunction SelectChipRemove({ label, onRemove }: { label: string; onRemove: () => void }) {\n const disabled = React.useContext(SelectDisabledContext)\n const stop = (event: React.SyntheticEvent) => {\n event.stopPropagation()\n }\n return (\n <span\n role=\"button\"\n aria-label={label}\n aria-disabled={disabled || undefined}\n tabIndex={-1}\n onPointerDown={stop}\n onMouseDown={stop}\n onClick={(event) => {\n event.stopPropagation()\n if (!disabled) onRemove()\n }}\n className=\"flex size-2.25 shrink-0 cursor-pointer items-center justify-center rounded-sm text-icon-secondary hover:text-icon-primary aria-disabled:pointer-events-none\"\n >\n <IconProvider icon=\"xmark\" size={0.75} />\n </span>\n )\n}\n\ntype SelectValueProps = SelectPrimitive.Value.Props & {\n countLabel?: React.ReactNode\n display?: SelectValueDisplay\n formatValue?: (value: unknown) => React.ReactNode\n maxChips?: number\n /** Shows a × on each chip when provided. */\n onRemoveValue?: (value: unknown) => void\n /** Shows a × on the count chip when provided. */\n onRemoveAll?: () => void\n removeLabel?: string\n}\n\nfunction SelectValue({\n children,\n className,\n countLabel = 'Selected',\n display = 'text',\n formatValue = String,\n maxChips = 2,\n onRemoveAll,\n onRemoveValue,\n placeholder,\n removeLabel = 'Remove',\n ...props\n}: SelectValueProps) {\n const renderValue = (value: unknown) => {\n const values = Array.isArray(value) ? value : value == null ? [] : [value]\n if (values.length === 0) return <span className=\"text-text-placeholder\">{placeholder}</span>\n if (display === 'count') {\n return (\n <span className=\"flex min-w-0 items-center gap-space-8\">\n <span className={selectChipVariants()}>\n {values.length}\n {onRemoveAll ? <SelectChipRemove label={removeLabel} onRemove={onRemoveAll} /> : null}\n </span>\n <span className=\"truncate\">{countLabel}</span>\n </span>\n )\n }\n const visible = values.slice(0, maxChips)\n const overflow = values.length - visible.length\n return (\n <span className=\"flex min-w-0 items-center gap-space-4 overflow-hidden\">\n {visible.map((item, index) => (\n <span key={index} className={selectChipVariants()}>\n {formatValue(item)}\n {onRemoveValue ? <SelectChipRemove label={removeLabel} onRemove={() => onRemoveValue(item)} /> : null}\n </span>\n ))}\n {overflow > 0 ? <span className={selectChipVariants({ tone: 'more' })}>+{overflow}</span> : null}\n </span>\n )\n }\n\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n placeholder={placeholder}\n className={cn('min-w-0 flex-1 truncate data-placeholder:text-text-placeholder', className)}\n {...props}\n >\n {children ?? (display === 'text' ? undefined : renderValue)}\n </SelectPrimitive.Value>\n )\n}\n\ntype SelectContentProps = SelectPrimitive.Popup.Props &\n Pick<SelectPrimitive.Positioner.Props, 'align' | 'collisionAvoidance' | 'side' | 'sideOffset'> & {\n container?: SelectPrimitive.Portal.Props['container']\n positionerClassName?: string\n }\n\nfunction SelectContent({\n align = 'start',\n children,\n className,\n collisionAvoidance,\n container,\n positionerClassName,\n side = 'bottom',\n sideOffset = 8,\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Positioner\n data-slot=\"select-positioner\"\n align={align}\n alignItemWithTrigger={false}\n collisionAvoidance={collisionAvoidance}\n side={side}\n sideOffset={sideOffset}\n className={cn('isolate z-[1600] outline-none', positionerClassName)}\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n className={cn(dropdownPanelVariants({ motion: 'select', width: 'trigger' }), className)}\n {...props}\n >\n <SelectPrimitive.List className={dropdownListVariants()}>{children}</SelectPrimitive.List>\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\ntype SelectItemProps = SelectPrimitive.Item.Props\n\nfunction SelectItem({ children, className, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item data-slot=\"select-item\" className={cn(dropdownItemVariants(), className)} {...props}>\n <SelectPrimitive.ItemText className=\"flex min-w-0 flex-1 items-center gap-space-8 truncate\">\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator className=\"flex shrink-0 text-icon-brand\">\n <IconProvider icon=\"check\" size=\"16\" />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n <SelectPrimitive.Group data-slot=\"select-group\" className={cn('flex flex-col gap-space-2', className)} {...props} />\n )\n}\n\ntype SelectLabelProps = SelectPrimitive.GroupLabel.Props & VariantProps<typeof dropdownLabelVariants>\n\nfunction SelectLabel({ caps, className, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn(dropdownLabelVariants({ caps }), className)}\n {...props}\n />\n )\n}\n\nfunction SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(dropdownSeparatorVariants(), className)}\n {...props}\n />\n )\n}\n\nexport {\n Select,\n selectAttachedClass,\n selectChipVariants,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrailing,\n SelectTrigger,\n selectTriggerVariants,\n SelectValue,\n trailingPadding,\n}\nexport type {\n SelectAttachedEdge,\n SelectContentProps,\n SelectItemProps,\n SelectLabelProps,\n SelectTriggerProps,\n SelectValueDisplay,\n SelectValueProps,\n}\n"],"names":["_jsx","ItemIndicator","ListboxSeparator","_formatErrorMessage","REASONS.focusOut","REASONS.outsidePress","REASONS.imperativeAction","REASONS.none","_jsxs","stateAttributesMapping","SelectTriggerDataAttributes.popupSide","SelectTrigger","popupSide","REASONS.cancelOpen","SelectValue","SelectPortal","SelectPositioner","SelectPopup","ownerWindow","SelectPositionerCssVars.transformOrigin","platform.engine.webkit","REASONS.windowResize","floatingPlatform","SelectList","SelectItem","REASONS.itemPress","SelectItemIndicator","SelectItemText","SelectGroup","SelectGroupLabel","SelectSeparator","SelectPrimitive.Root","cn","SelectPrimitive.Trigger","SelectPrimitive.Value","SelectPrimitive.Portal","SelectPrimitive.Positioner","SelectPrimitive.Popup","SelectPrimitive.List","SelectPrimitive.Item","SelectPrimitive.ItemText","SelectPrimitive.ItemIndicator","SelectPrimitive.Group","SelectPrimitive.GroupLabel","SelectPrimitive.Separator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,iBAAiB,IAAI;AACnC,QAAM,MAAM,MAAM,OAAO,IAAI;AAC7B,MAAI,IAAI,SAAS;AACf,QAAI,UAAU;AACd,OAAE;AAAA,EACJ;AACF;ACAO,SAAS,uBAAuB,SAAS;A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A;AAAA,MACC,aAAU;AAAA,MACV,WAAWX,WAAG,sBAAsB,EAAE,KAAA,CAAM,GAAG,SAAS;AAAA,MACvD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAA0C;AACjF,SACE;AAAA,IAACY;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWZ,WAAG,0BAAA,GAA6B,SAAS;AAAA,MACnD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import { e as useRefWithInit, u as useIsoLayoutEffect } from "./useIsoLayoutEffect-
|
|
2
|
-
function addEventListener(target, type, listener, options) {
|
|
3
|
-
target.addEventListener(type, listener, options);
|
|
4
|
-
return () => {
|
|
5
|
-
target.removeEventListener(type, listener, options);
|
|
6
|
-
};
|
|
7
|
-
}
|
|
1
|
+
import { e as useRefWithInit, u as useIsoLayoutEffect } from "./useIsoLayoutEffect-D2lpsB9D.js";
|
|
8
2
|
function useValueAsRef(value) {
|
|
9
3
|
const latest = useRefWithInit(createLatestRef, value).current;
|
|
10
4
|
latest.next = value;
|
|
@@ -21,8 +15,14 @@ function createLatestRef(value) {
|
|
|
21
15
|
};
|
|
22
16
|
return latest;
|
|
23
17
|
}
|
|
18
|
+
function addEventListener(target, type, listener, options) {
|
|
19
|
+
target.addEventListener(type, listener, options);
|
|
20
|
+
return () => {
|
|
21
|
+
target.removeEventListener(type, listener, options);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
24
|
export {
|
|
25
25
|
addEventListener as a,
|
|
26
26
|
useValueAsRef as u
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=
|
|
28
|
+
//# sourceMappingURL=addEventListener-D-i9O6BG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addEventListener-D-i9O6BG.js","sources":["../node_modules/@base-ui/utils/useValueAsRef.mjs","../node_modules/@base-ui/utils/addEventListener.mjs"],"sourcesContent":["'use client';\n\nimport { useIsoLayoutEffect } from \"./useIsoLayoutEffect.mjs\";\nimport { useRefWithInit } from \"./useRefWithInit.mjs\";\n\n/**\n * Untracks the provided value by turning it into a ref to remove its reactivity.\n *\n * Used to access the passed value inside `React.useEffect` without causing the effect to re-run when the value changes.\n */\nexport function useValueAsRef(value) {\n const latest = useRefWithInit(createLatestRef, value).current;\n latest.next = value;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useIsoLayoutEffect(latest.effect);\n return latest;\n}\nfunction createLatestRef(value) {\n const latest = {\n current: value,\n next: value,\n effect: () => {\n latest.current = latest.next;\n }\n };\n return latest;\n}","/**\n * Adds an event listener and returns a cleanup function to remove it.\n */\n\nexport function addEventListener(target, type, listener, options) {\n target.addEventListener(type, listener, options);\n return () => {\n target.removeEventListener(type, listener, options);\n };\n}"],"names":[],"mappings":";AAUO,SAAS,cAAc,OAAO;AACnC,QAAM,SAAS,eAAe,iBAAiB,KAAK,EAAE;AACtD,SAAO,OAAO;AAGd,qBAAmB,OAAO,MAAM;AAChC,SAAO;AACT;AACA,SAAS,gBAAgB,OAAO;AAC9B,QAAM,SAAS;AAAA,IACb,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ,MAAM;AACZ,aAAO,UAAU,OAAO;AAAA,IAC1B;AAAA,EACJ;AACE,SAAO;AACT;ACvBO,SAAS,iBAAiB,QAAQ,MAAM,UAAU,SAAS;AAChE,SAAO,iBAAiB,MAAM,UAAU,OAAO;AAC/C,SAAO,MAAM;AACX,WAAO,oBAAoB,MAAM,UAAU,OAAO;AAAA,EACpD;AACF;","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function areArraysEqual(array1, array2, itemComparer = Object.is) {
|
|
2
|
+
const {
|
|
3
|
+
length
|
|
4
|
+
} = array1;
|
|
5
|
+
if (length !== array2.length) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
for (let i = 0; i < length; i += 1) {
|
|
9
|
+
if (!itemComparer(array1[i], array2[i])) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
function getDefaultLabelId(id) {
|
|
16
|
+
return id == null ? void 0 : `${id}-label`;
|
|
17
|
+
}
|
|
18
|
+
function resolveAriaLabelledBy(fieldLabelId, localLabelId) {
|
|
19
|
+
return fieldLabelId ?? localLabelId;
|
|
20
|
+
}
|
|
21
|
+
function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
|
|
22
|
+
return Math.max(min, Math.min(val, max));
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
areArraysEqual as a,
|
|
26
|
+
clamp as c,
|
|
27
|
+
getDefaultLabelId as g,
|
|
28
|
+
resolveAriaLabelledBy as r
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=clamp-D7_nsB8C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clamp-D7_nsB8C.js","sources":["../node_modules/@base-ui/utils/areArraysEqual.mjs","../node_modules/@base-ui/react/utils/resolveAriaLabelledBy.mjs","../node_modules/@base-ui/utils/clamp.mjs"],"sourcesContent":["// https://github.com/mui/mui-x/blob/master/packages/x-internals/src/fastArrayCompare/fastArrayCompare.ts\n\n/**\n * Compares two arrays element-wise.\n *\n * The default comparison is `Object.is`, so `NaN` equals `NaN` and `0` does not equal `-0`.\n */\nexport function areArraysEqual(array1, array2, itemComparer = Object.is) {\n const {\n length\n } = array1;\n if (length !== array2.length) {\n return false;\n }\n for (let i = 0; i < length; i += 1) {\n if (!itemComparer(array1[i], array2[i])) {\n return false;\n }\n }\n return true;\n}","'use client';\n\nexport function getDefaultLabelId(id) {\n return id == null ? undefined : `${id}-label`;\n}\nexport function resolveAriaLabelledBy(fieldLabelId, localLabelId) {\n return fieldLabelId ?? localLabelId;\n}","export function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}"],"names":[],"mappings":"AAOO,SAAS,eAAe,QAAQ,QAAQ,eAAe,OAAO,IAAI;AACvE,QAAM;AAAA,IACJ;AAAA,EACJ,IAAM;AACJ,MAAI,WAAW,OAAO,QAAQ;AAC5B,WAAO;AAAA,EACT;AACA,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK,GAAG;AAClC,QAAI,CAAC,aAAa,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG;AACvC,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AClBO,SAAS,kBAAkB,IAAI;AACpC,SAAO,MAAM,OAAO,SAAY,GAAG,EAAE;AACvC;AACO,SAAS,sBAAsB,cAAc,cAAc;AAChE,SAAO,gBAAgB;AACzB;ACPO,SAAS,MAAM,KAAK,MAAM,OAAO,kBAAkB,MAAM,OAAO,kBAAkB;AACvF,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,GAAG,CAAC;AACzC;","x_google_ignoreList":[0,1,2]}
|
|
@@ -4,15 +4,15 @@ import { useState } from "react";
|
|
|
4
4
|
import { c as cva } from "../../index-DSVg79g-.js";
|
|
5
5
|
import IconProvider from "./IconProvider.es.js";
|
|
6
6
|
import { c as classNames } from "../../classNames-B1XpQHle.js";
|
|
7
|
-
import { u as useControlled } from "../../useControlled-
|
|
8
|
-
import { f as formatErrorMessage, w as warn, a as useStableCallback, b as useRenderElement, E as EMPTY_ARRAY, u as useIsoLayoutEffect, c as useMergedRefs, r as resolveStyle } from "../../useIsoLayoutEffect-
|
|
9
|
-
import { C as CompositeList, u as useCompositeListItem } from "../../
|
|
10
|
-
import { u as useValueAsRef, a as addEventListener } from "../../
|
|
11
|
-
import { A as AnimationFrame } from "../../useAnimationFrame-
|
|
12
|
-
import { T as Timeout } from "../../useTimeout-
|
|
13
|
-
import { u as useBaseUiId, c as createChangeEventDetails,
|
|
14
|
-
import { u as useTransitionStatus, s as startingStyle$1, t as transitionStatusMapping, b as useAnimationsFinished, a as useOpenChangeComplete } from "../../useTransitionStatus-
|
|
15
|
-
import { a as useButton } from "../../useButton-
|
|
7
|
+
import { u as useControlled } from "../../useControlled-DMDWXIzj.js";
|
|
8
|
+
import { f as formatErrorMessage, w as warn, a as useStableCallback, b as useRenderElement, E as EMPTY_ARRAY, u as useIsoLayoutEffect, c as useMergedRefs, r as resolveStyle } from "../../useIsoLayoutEffect-D2lpsB9D.js";
|
|
9
|
+
import { C as CompositeList, u as useCompositeListItem } from "../../useCompositeListItem-DlAKWsHE.js";
|
|
10
|
+
import { u as useValueAsRef, a as addEventListener } from "../../addEventListener-D-i9O6BG.js";
|
|
11
|
+
import { A as AnimationFrame } from "../../useAnimationFrame-DqvuRtgK.js";
|
|
12
|
+
import { T as Timeout } from "../../useTimeout-D1vYJgq4.js";
|
|
13
|
+
import { u as useBaseUiId, c as createChangeEventDetails, t as triggerPress, b as getWindow, n as none } from "../../useBaseUiId-CYT1vFMG.js";
|
|
14
|
+
import { u as useTransitionStatus, s as startingStyle$1, t as transitionStatusMapping, b as useAnimationsFinished, a as useOpenChangeComplete } from "../../useTransitionStatus-CHrs3i5F.js";
|
|
15
|
+
import { a as useButton } from "../../useButton-BlHadUfM.js";
|
|
16
16
|
const AccordionRootContext = /* @__PURE__ */ React.createContext(void 0);
|
|
17
17
|
if (process.env.NODE_ENV !== "production") AccordionRootContext.displayName = "AccordionRootContext";
|
|
18
18
|
function useAccordionRootContext() {
|
|
@@ -2,9 +2,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import IconProvider from "./IconProvider.es.js";
|
|
4
4
|
import { c as classNames } from "../../classNames-B1XpQHle.js";
|
|
5
|
-
import { f as formatErrorMessage, b as useRenderElement, u as useIsoLayoutEffect, N as NOOP, a as useStableCallback } from "../../useIsoLayoutEffect-
|
|
6
|
-
import { u as useTimeout } from "../../useTimeout-
|
|
7
|
-
import { u as useTransitionStatus, a as useOpenChangeComplete, t as transitionStatusMapping } from "../../useTransitionStatus-
|
|
5
|
+
import { f as formatErrorMessage, b as useRenderElement, u as useIsoLayoutEffect, N as NOOP, a as useStableCallback } from "../../useIsoLayoutEffect-D2lpsB9D.js";
|
|
6
|
+
import { u as useTimeout } from "../../useTimeout-D1vYJgq4.js";
|
|
7
|
+
import { u as useTransitionStatus, a as useOpenChangeComplete, t as transitionStatusMapping } from "../../useTransitionStatus-CHrs3i5F.js";
|
|
8
8
|
const AvatarRootContext = /* @__PURE__ */ React.createContext(void 0);
|
|
9
9
|
if (process.env.NODE_ENV !== "production") AvatarRootContext.displayName = "AvatarRootContext";
|
|
10
10
|
function useAvatarRootContext() {
|
|
@@ -268,9 +268,9 @@ const SQUARE_RADIUS = {
|
|
|
268
268
|
const LETTER_CLASS = {
|
|
269
269
|
sm: "",
|
|
270
270
|
md: "text-label-sm",
|
|
271
|
-
default: "text-label-
|
|
272
|
-
lg: "text-label-
|
|
273
|
-
xl: "text-
|
|
271
|
+
default: "text-label-sm",
|
|
272
|
+
lg: "text-label-sm",
|
|
273
|
+
xl: "text-label-md"
|
|
274
274
|
};
|
|
275
275
|
const GLYPH_REM = {
|
|
276
276
|
sm: 0.5,
|
|
@@ -351,7 +351,7 @@ function AvatarBadge({ type, className }) {
|
|
|
351
351
|
"data-badge": "edit",
|
|
352
352
|
"aria-hidden": true,
|
|
353
353
|
className: classNames(
|
|
354
|
-
"absolute end-0 bottom-0 flex items-center justify-center rounded-full
|
|
354
|
+
"absolute end-0 bottom-0 flex items-center justify-center rounded-full bg-background-raised text-icon-primary",
|
|
355
355
|
EDIT_SIZE[size],
|
|
356
356
|
className
|
|
357
357
|
),
|
|
@@ -399,7 +399,7 @@ function Avatar({
|
|
|
399
399
|
"relative inline-flex shrink-0 align-middle bg-background-sunken",
|
|
400
400
|
SIZE_CLASS[size],
|
|
401
401
|
shape === "circle" ? "rounded-full" : SQUARE_RADIUS[size],
|
|
402
|
-
ctx.layout === "stack" && "border-2 border-
|
|
402
|
+
ctx.layout === "stack" && "border-2 border-avatar-border-ring",
|
|
403
403
|
interactive && "focus-ring",
|
|
404
404
|
className
|
|
405
405
|
),
|
|
@@ -455,7 +455,7 @@ function AvatarFallback2({
|
|
|
455
455
|
letter && fill === "plain" && "bg-avatar-background-initials",
|
|
456
456
|
!letter && identity === "deactivated" && "bg-avatar-background-deactivated text-avatar-icon-deactivated",
|
|
457
457
|
!letter && identity === "virtual-account" && "bg-avatar-background-virtual text-avatar-icon-virtual",
|
|
458
|
-
!letter && identity === "add" && "
|
|
458
|
+
!letter && identity === "add" && "bg-background-page text-icon-primary",
|
|
459
459
|
!letter && identity !== "deactivated" && identity !== "virtual-account" && identity !== "add" && "bg-avatar-background-fallback text-avatar-text-initials",
|
|
460
460
|
className
|
|
461
461
|
),
|