@base-ui/react 1.7.0 → 1.8.0
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/CHANGELOG.md +143 -0
- package/accordion/header/AccordionHeaderDataAttributes.d.mts +13 -15
- package/accordion/header/AccordionHeaderDataAttributes.d.ts +13 -15
- package/accordion/header/AccordionHeaderDataAttributes.js +14 -17
- package/accordion/header/AccordionHeaderDataAttributes.mjs +13 -16
- package/accordion/item/AccordionItemDataAttributes.d.mts +13 -15
- package/accordion/item/AccordionItemDataAttributes.d.ts +13 -15
- package/accordion/item/AccordionItemDataAttributes.js +14 -17
- package/accordion/item/AccordionItemDataAttributes.mjs +13 -16
- package/accordion/item/stateAttributesMapping.js +3 -2
- package/accordion/item/stateAttributesMapping.mjs +1 -1
- package/accordion/panel/AccordionPanel.js +3 -3
- package/accordion/panel/AccordionPanel.mjs +1 -1
- package/accordion/panel/AccordionPanelCssVars.d.mts +10 -12
- package/accordion/panel/AccordionPanelCssVars.d.ts +10 -12
- package/accordion/panel/AccordionPanelCssVars.js +11 -14
- package/accordion/panel/AccordionPanelCssVars.mjs +10 -13
- package/accordion/panel/AccordionPanelDataAttributes.d.mts +25 -27
- package/accordion/panel/AccordionPanelDataAttributes.d.ts +25 -27
- package/accordion/panel/AccordionPanelDataAttributes.js +26 -29
- package/accordion/panel/AccordionPanelDataAttributes.mjs +26 -28
- package/accordion/root/AccordionRoot.d.mts +1 -0
- package/accordion/root/AccordionRoot.d.ts +1 -0
- package/accordion/root/AccordionRoot.js +2 -9
- package/accordion/root/AccordionRoot.mjs +2 -9
- package/accordion/root/AccordionRootDataAttributes.d.mts +8 -10
- package/accordion/root/AccordionRootDataAttributes.d.ts +8 -10
- package/accordion/root/AccordionRootDataAttributes.js +9 -12
- package/accordion/root/AccordionRootDataAttributes.mjs +8 -11
- package/accordion/trigger/AccordionTriggerDataAttributes.d.mts +8 -10
- package/accordion/trigger/AccordionTriggerDataAttributes.d.ts +8 -10
- package/accordion/trigger/AccordionTriggerDataAttributes.js +9 -12
- package/accordion/trigger/AccordionTriggerDataAttributes.mjs +8 -11
- package/alert-dialog/root/AlertDialogRoot.d.mts +1 -1
- package/alert-dialog/root/AlertDialogRoot.d.ts +1 -1
- package/alert-dialog/trigger/AlertDialogTriggerDataAttributes.d.mts +8 -10
- package/alert-dialog/trigger/AlertDialogTriggerDataAttributes.d.ts +8 -10
- package/alert-dialog/trigger/AlertDialogTriggerDataAttributes.js +9 -12
- package/alert-dialog/trigger/AlertDialogTriggerDataAttributes.mjs +9 -11
- package/autocomplete/clear/AutocompleteClearDataAttributes.d.mts +1 -1
- package/autocomplete/clear/AutocompleteClearDataAttributes.d.ts +1 -1
- package/autocomplete/clear/AutocompleteClearDataAttributes.js +11 -7
- package/autocomplete/clear/AutocompleteClearDataAttributes.mjs +1 -1
- package/autocomplete/input-group/AutocompleteInputGroupDataAttributes.d.mts +49 -51
- package/autocomplete/input-group/AutocompleteInputGroupDataAttributes.d.ts +49 -51
- package/autocomplete/input-group/AutocompleteInputGroupDataAttributes.js +50 -53
- package/autocomplete/input-group/AutocompleteInputGroupDataAttributes.mjs +49 -52
- package/autocomplete/item/AutocompleteItemDataAttributes.d.mts +8 -10
- package/autocomplete/item/AutocompleteItemDataAttributes.d.ts +8 -10
- package/autocomplete/item/AutocompleteItemDataAttributes.js +11 -13
- package/autocomplete/item/AutocompleteItemDataAttributes.mjs +10 -12
- package/autocomplete/root/AutocompleteRoot.d.mts +24 -2
- package/autocomplete/root/AutocompleteRoot.d.ts +24 -2
- package/autocomplete/root/AutocompleteRoot.js +10 -23
- package/autocomplete/root/AutocompleteRoot.mjs +10 -23
- package/autocomplete/trigger/AutocompleteTrigger.d.mts +4 -0
- package/autocomplete/trigger/AutocompleteTrigger.d.ts +4 -0
- package/autocomplete/trigger/AutocompleteTriggerDataAttributes.d.mts +53 -55
- package/autocomplete/trigger/AutocompleteTriggerDataAttributes.d.ts +53 -55
- package/autocomplete/trigger/AutocompleteTriggerDataAttributes.js +54 -57
- package/autocomplete/trigger/AutocompleteTriggerDataAttributes.mjs +54 -56
- package/avatar/image/AvatarImage.d.mts +6 -0
- package/avatar/image/AvatarImage.d.ts +6 -0
- package/avatar/image/AvatarImage.js +75 -9
- package/avatar/image/AvatarImage.mjs +75 -9
- package/avatar/image/AvatarImageDataAttributes.d.mts +16 -10
- package/avatar/image/AvatarImageDataAttributes.d.ts +16 -10
- package/avatar/image/AvatarImageDataAttributes.js +17 -12
- package/avatar/image/AvatarImageDataAttributes.mjs +17 -11
- package/avatar/image/useImageLoadingStatus.d.mts +1 -1
- package/avatar/image/useImageLoadingStatus.d.ts +1 -1
- package/avatar/image/useImageLoadingStatus.js +8 -4
- package/avatar/image/useImageLoadingStatus.mjs +8 -4
- package/button/ButtonDataAttributes.d.mts +4 -6
- package/button/ButtonDataAttributes.d.ts +4 -6
- package/button/ButtonDataAttributes.js +5 -8
- package/button/ButtonDataAttributes.mjs +4 -7
- package/checkbox/indicator/CheckboxIndicator.js +2 -0
- package/checkbox/indicator/CheckboxIndicator.mjs +2 -0
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.d.mts +56 -58
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.d.ts +56 -58
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.js +57 -60
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.mjs +57 -59
- package/checkbox/root/CheckboxRoot.js +32 -44
- package/checkbox/root/CheckboxRoot.mjs +32 -44
- package/checkbox/root/CheckboxRootDataAttributes.d.mts +48 -50
- package/checkbox/root/CheckboxRootDataAttributes.d.ts +48 -50
- package/checkbox/root/CheckboxRootDataAttributes.js +49 -52
- package/checkbox/root/CheckboxRootDataAttributes.mjs +48 -51
- package/checkbox/utils/getCheckboxStateAttributesMapping.js +4 -2
- package/checkbox/utils/getCheckboxStateAttributesMapping.mjs +3 -2
- package/checkbox-group/CheckboxGroup.js +17 -8
- package/checkbox-group/CheckboxGroup.mjs +17 -8
- package/checkbox-group/CheckboxGroupContext.d.mts +6 -0
- package/checkbox-group/CheckboxGroupContext.d.ts +6 -0
- package/checkbox-group/CheckboxGroupDataAttributes.d.mts +4 -6
- package/checkbox-group/CheckboxGroupDataAttributes.d.ts +4 -6
- package/checkbox-group/CheckboxGroupDataAttributes.js +5 -8
- package/checkbox-group/CheckboxGroupDataAttributes.mjs +4 -7
- package/checkbox-group/useCheckboxGroupParent.d.mts +5 -3
- package/checkbox-group/useCheckboxGroupParent.d.ts +5 -3
- package/checkbox-group/useCheckboxGroupParent.js +37 -9
- package/checkbox-group/useCheckboxGroupParent.mjs +37 -9
- package/collapsible/panel/CollapsiblePanel.js +3 -3
- package/collapsible/panel/CollapsiblePanel.mjs +1 -1
- package/collapsible/panel/CollapsiblePanelCssVars.d.mts +10 -12
- package/collapsible/panel/CollapsiblePanelCssVars.d.ts +10 -12
- package/collapsible/panel/CollapsiblePanelCssVars.js +11 -14
- package/collapsible/panel/CollapsiblePanelCssVars.mjs +10 -13
- package/collapsible/panel/CollapsiblePanelDataAttributes.d.mts +16 -18
- package/collapsible/panel/CollapsiblePanelDataAttributes.d.ts +16 -18
- package/collapsible/panel/CollapsiblePanelDataAttributes.js +17 -20
- package/collapsible/panel/CollapsiblePanelDataAttributes.mjs +17 -19
- package/collapsible/panel/useCollapsiblePanel.js +2 -2
- package/collapsible/panel/useCollapsiblePanel.mjs +1 -1
- package/collapsible/root/CollapsibleRootDataAttributes.d.mts +16 -18
- package/collapsible/root/CollapsibleRootDataAttributes.d.ts +16 -18
- package/collapsible/root/CollapsibleRootDataAttributes.js +17 -20
- package/collapsible/root/CollapsibleRootDataAttributes.mjs +17 -19
- package/collapsible/root/useCollapsibleRoot.js +1 -1
- package/collapsible/root/useCollapsibleRoot.mjs +1 -1
- package/collapsible/trigger/CollapsibleTriggerDataAttributes.d.mts +4 -6
- package/collapsible/trigger/CollapsibleTriggerDataAttributes.d.ts +4 -6
- package/collapsible/trigger/CollapsibleTriggerDataAttributes.js +5 -8
- package/collapsible/trigger/CollapsibleTriggerDataAttributes.mjs +4 -7
- package/combobox/arrow/ComboboxArrow.js +1 -3
- package/combobox/arrow/ComboboxArrow.mjs +1 -3
- package/combobox/arrow/ComboboxArrowDataAttributes.d.mts +22 -24
- package/combobox/arrow/ComboboxArrowDataAttributes.d.ts +22 -24
- package/combobox/arrow/ComboboxArrowDataAttributes.js +23 -26
- package/combobox/arrow/ComboboxArrowDataAttributes.mjs +23 -25
- package/combobox/backdrop/ComboboxBackdrop.js +3 -5
- package/combobox/backdrop/ComboboxBackdrop.mjs +3 -5
- package/combobox/backdrop/ComboboxBackdropDataAttributes.d.mts +16 -18
- package/combobox/backdrop/ComboboxBackdropDataAttributes.d.ts +16 -18
- package/combobox/backdrop/ComboboxBackdropDataAttributes.js +17 -20
- package/combobox/backdrop/ComboboxBackdropDataAttributes.mjs +17 -19
- package/combobox/chip/ComboboxChip.js +7 -9
- package/combobox/chip/ComboboxChip.mjs +7 -9
- package/combobox/chip-remove/ComboboxChipRemove.js +9 -11
- package/combobox/chip-remove/ComboboxChipRemove.mjs +9 -11
- package/combobox/chips/ComboboxChips.js +4 -6
- package/combobox/chips/ComboboxChips.mjs +4 -6
- package/combobox/clear/ComboboxClear.js +14 -16
- package/combobox/clear/ComboboxClear.mjs +14 -16
- package/combobox/clear/ComboboxClearDataAttributes.d.mts +20 -22
- package/combobox/clear/ComboboxClearDataAttributes.d.ts +20 -22
- package/combobox/clear/ComboboxClearDataAttributes.js +21 -24
- package/combobox/clear/ComboboxClearDataAttributes.mjs +21 -23
- package/combobox/collection/GroupCollectionContext.d.mts +1 -1
- package/combobox/collection/GroupCollectionContext.d.ts +1 -1
- package/combobox/empty/ComboboxEmpty.js +1 -1
- package/combobox/empty/ComboboxEmpty.mjs +1 -1
- package/combobox/group/ComboboxGroup.js +6 -1
- package/combobox/group/ComboboxGroup.mjs +6 -1
- package/combobox/group-label/ComboboxGroupLabel.js +2 -1
- package/combobox/group-label/ComboboxGroupLabel.mjs +2 -1
- package/combobox/index.d.mts +3 -1
- package/combobox/index.d.ts +3 -1
- package/combobox/index.parts.d.mts +2 -1
- package/combobox/index.parts.d.ts +2 -1
- package/combobox/index.parts.js +8 -1
- package/combobox/index.parts.mjs +2 -1
- package/combobox/input/ComboboxInput.js +44 -40
- package/combobox/input/ComboboxInput.mjs +44 -40
- package/combobox/input/ComboboxInputDataAttributes.d.mts +53 -55
- package/combobox/input/ComboboxInputDataAttributes.d.ts +53 -55
- package/combobox/input/ComboboxInputDataAttributes.js +54 -57
- package/combobox/input/ComboboxInputDataAttributes.mjs +54 -56
- package/combobox/input-group/ComboboxInputGroup.js +7 -9
- package/combobox/input-group/ComboboxInputGroup.mjs +7 -9
- package/combobox/input-group/ComboboxInputGroupDataAttributes.d.mts +53 -55
- package/combobox/input-group/ComboboxInputGroupDataAttributes.d.ts +53 -55
- package/combobox/input-group/ComboboxInputGroupDataAttributes.js +54 -57
- package/combobox/input-group/ComboboxInputGroupDataAttributes.mjs +53 -56
- package/combobox/item/ComboboxItem.js +28 -26
- package/combobox/item/ComboboxItem.mjs +29 -27
- package/combobox/item/ComboboxItemDataAttributes.d.mts +12 -14
- package/combobox/item/ComboboxItemDataAttributes.d.ts +12 -14
- package/combobox/item/ComboboxItemDataAttributes.js +13 -16
- package/combobox/item/ComboboxItemDataAttributes.mjs +12 -15
- package/combobox/item-indicator/ComboboxItemIndicator.js +2 -0
- package/combobox/item-indicator/ComboboxItemIndicator.mjs +2 -0
- package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.d.mts +8 -10
- package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.d.ts +8 -10
- package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.js +9 -12
- package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.mjs +9 -11
- package/combobox/items/createItems.d.mts +53 -0
- package/combobox/items/createItems.d.ts +53 -0
- package/combobox/items/createItems.js +93 -0
- package/combobox/items/createItems.mjs +88 -0
- package/combobox/items/itemCollection.d.mts +39 -0
- package/combobox/items/itemCollection.d.ts +39 -0
- package/combobox/items/itemCollection.js +33 -0
- package/combobox/items/itemCollection.mjs +27 -0
- package/combobox/label/ComboboxLabel.js +4 -6
- package/combobox/label/ComboboxLabel.mjs +4 -6
- package/combobox/list/ComboboxList.js +13 -11
- package/combobox/list/ComboboxList.mjs +13 -11
- package/combobox/popup/ComboboxPopup.js +17 -19
- package/combobox/popup/ComboboxPopup.mjs +17 -19
- package/combobox/popup/ComboboxPopupDataAttributes.d.mts +34 -37
- package/combobox/popup/ComboboxPopupDataAttributes.d.ts +34 -37
- package/combobox/popup/ComboboxPopupDataAttributes.js +35 -39
- package/combobox/popup/ComboboxPopupDataAttributes.mjs +35 -38
- package/combobox/portal/ComboboxPortal.js +2 -4
- package/combobox/portal/ComboboxPortal.mjs +2 -4
- package/combobox/positioner/ComboboxPositioner.js +10 -12
- package/combobox/positioner/ComboboxPositioner.mjs +10 -12
- package/combobox/positioner/ComboboxPositionerCssVars.d.mts +25 -27
- package/combobox/positioner/ComboboxPositionerCssVars.d.ts +25 -27
- package/combobox/positioner/ComboboxPositionerCssVars.js +26 -29
- package/combobox/positioner/ComboboxPositionerCssVars.mjs +25 -28
- package/combobox/positioner/ComboboxPositionerDataAttributes.d.mts +26 -28
- package/combobox/positioner/ComboboxPositionerDataAttributes.d.ts +26 -28
- package/combobox/positioner/ComboboxPositionerDataAttributes.js +27 -30
- package/combobox/positioner/ComboboxPositionerDataAttributes.mjs +27 -29
- package/combobox/root/AriaCombobox.d.mts +32 -11
- package/combobox/root/AriaCombobox.d.ts +32 -11
- package/combobox/root/AriaCombobox.js +308 -168
- package/combobox/root/AriaCombobox.mjs +310 -171
- package/combobox/root/ComboboxRoot.d.mts +7 -3
- package/combobox/root/ComboboxRoot.d.ts +7 -3
- package/combobox/root/ComboboxRootContext.d.mts +5 -1
- package/combobox/root/ComboboxRootContext.d.ts +5 -1
- package/combobox/root/utils/index.d.mts +5 -2
- package/combobox/root/utils/index.d.ts +5 -2
- package/combobox/root/utils/index.js +2 -1
- package/combobox/root/utils/index.mjs +2 -1
- package/combobox/root/utils/useFilter.d.mts +2 -1
- package/combobox/root/utils/useFilter.d.ts +2 -1
- package/combobox/root/utils/useFilteredItems.d.mts +1 -0
- package/combobox/root/utils/useFilteredItems.d.ts +1 -0
- package/combobox/root/utils/useFilteredItems.js +1 -0
- package/combobox/root/utils/useFilteredItems.mjs +1 -0
- package/combobox/store.d.mts +55 -28
- package/combobox/store.d.ts +55 -28
- package/combobox/store.js +5 -0
- package/combobox/store.mjs +6 -0
- package/combobox/trigger/ComboboxTrigger.d.mts +4 -0
- package/combobox/trigger/ComboboxTrigger.d.ts +4 -0
- package/combobox/trigger/ComboboxTrigger.js +34 -33
- package/combobox/trigger/ComboboxTrigger.mjs +34 -33
- package/combobox/trigger/ComboboxTriggerDataAttributes.d.mts +57 -59
- package/combobox/trigger/ComboboxTriggerDataAttributes.d.ts +57 -59
- package/combobox/trigger/ComboboxTriggerDataAttributes.js +58 -61
- package/combobox/trigger/ComboboxTriggerDataAttributes.mjs +58 -60
- package/combobox/utils/ComboboxInternalDismissButton.js +1 -1
- package/combobox/utils/ComboboxInternalDismissButton.mjs +1 -1
- package/combobox/utils/handleInputPress.d.mts +1 -1
- package/combobox/utils/handleInputPress.d.ts +1 -1
- package/combobox/utils/handleInputPress.js +4 -4
- package/combobox/utils/handleInputPress.mjs +4 -4
- package/combobox/utils/parts.d.mts +1 -1
- package/combobox/utils/parts.d.ts +1 -1
- package/combobox/utils/parts.js +6 -8
- package/combobox/utils/parts.mjs +6 -8
- package/combobox/utils/stateAttributesMapping.d.mts +4 -4
- package/combobox/utils/stateAttributesMapping.d.ts +4 -4
- package/combobox/utils/stateAttributesMapping.js +4 -2
- package/combobox/utils/stateAttributesMapping.mjs +3 -2
- package/combobox/value/ComboboxValue.d.mts +5 -0
- package/combobox/value/ComboboxValue.d.ts +5 -0
- package/combobox/value/ComboboxValue.js +6 -8
- package/combobox/value/ComboboxValue.mjs +6 -8
- package/context-menu/index.d.mts +1 -1
- package/context-menu/index.d.ts +1 -1
- package/context-menu/index.parts.d.mts +1 -1
- package/context-menu/index.parts.d.ts +1 -1
- package/context-menu/index.parts.js +2 -2
- package/context-menu/index.parts.mjs +1 -1
- package/context-menu/positioner/ContextMenuPositioner.d.mts +95 -0
- package/context-menu/positioner/ContextMenuPositioner.d.ts +95 -0
- package/context-menu/positioner/ContextMenuPositioner.js +15 -0
- package/context-menu/positioner/ContextMenuPositioner.mjs +10 -0
- package/context-menu/positioner/ContextMenuPositionerCssVars.d.mts +1 -0
- package/context-menu/positioner/ContextMenuPositionerCssVars.d.ts +1 -0
- package/context-menu/positioner/ContextMenuPositionerCssVars.js +16 -0
- package/context-menu/positioner/ContextMenuPositionerCssVars.mjs +1 -0
- package/context-menu/positioner/ContextMenuPositionerDataAttributes.d.mts +1 -0
- package/context-menu/positioner/ContextMenuPositionerDataAttributes.d.ts +1 -0
- package/context-menu/positioner/ContextMenuPositionerDataAttributes.js +16 -0
- package/context-menu/positioner/ContextMenuPositionerDataAttributes.mjs +1 -0
- package/context-menu/root/ContextMenuRoot.d.mts +7 -2
- package/context-menu/root/ContextMenuRoot.d.ts +7 -2
- package/context-menu/trigger/ContextMenuTriggerDataAttributes.d.mts +8 -10
- package/context-menu/trigger/ContextMenuTriggerDataAttributes.d.ts +8 -10
- package/context-menu/trigger/ContextMenuTriggerDataAttributes.js +9 -12
- package/context-menu/trigger/ContextMenuTriggerDataAttributes.mjs +9 -11
- package/csp-provider/CSPProvider.d.mts +1 -1
- package/csp-provider/CSPProvider.d.ts +1 -1
- package/dialog/backdrop/DialogBackdropDataAttributes.d.mts +16 -18
- package/dialog/backdrop/DialogBackdropDataAttributes.d.ts +16 -18
- package/dialog/backdrop/DialogBackdropDataAttributes.js +17 -20
- package/dialog/backdrop/DialogBackdropDataAttributes.mjs +17 -19
- package/dialog/close/DialogCloseDataAttributes.d.mts +4 -6
- package/dialog/close/DialogCloseDataAttributes.d.ts +4 -6
- package/dialog/close/DialogCloseDataAttributes.js +5 -8
- package/dialog/close/DialogCloseDataAttributes.mjs +4 -7
- package/dialog/popup/DialogPopup.js +2 -1
- package/dialog/popup/DialogPopup.mjs +2 -1
- package/dialog/popup/DialogPopupCssVars.d.mts +5 -7
- package/dialog/popup/DialogPopupCssVars.d.ts +5 -7
- package/dialog/popup/DialogPopupCssVars.js +6 -9
- package/dialog/popup/DialogPopupCssVars.mjs +5 -8
- package/dialog/popup/DialogPopupDataAttributes.d.mts +24 -26
- package/dialog/popup/DialogPopupDataAttributes.d.ts +24 -26
- package/dialog/popup/DialogPopupDataAttributes.js +25 -28
- package/dialog/popup/DialogPopupDataAttributes.mjs +25 -27
- package/dialog/root/DialogRoot.d.mts +1 -1
- package/dialog/root/DialogRoot.d.ts +1 -1
- package/dialog/root/DialogRoot.js +5 -3
- package/dialog/root/DialogRoot.mjs +4 -2
- package/dialog/root/useRenderDialogRoot.d.mts +2 -1
- package/dialog/root/useRenderDialogRoot.d.ts +2 -1
- package/dialog/store/DialogStore.js +2 -7
- package/dialog/store/DialogStore.mjs +3 -8
- package/dialog/trigger/DialogTrigger.js +2 -1
- package/dialog/trigger/DialogTrigger.mjs +2 -1
- package/dialog/trigger/DialogTriggerDataAttributes.d.mts +8 -10
- package/dialog/trigger/DialogTriggerDataAttributes.d.ts +8 -10
- package/dialog/trigger/DialogTriggerDataAttributes.js +9 -12
- package/dialog/trigger/DialogTriggerDataAttributes.mjs +9 -11
- package/dialog/utils/stateAttributesMapping.js +3 -1
- package/dialog/utils/stateAttributesMapping.mjs +3 -1
- package/dialog/viewport/DialogViewportDataAttributes.d.mts +24 -26
- package/dialog/viewport/DialogViewportDataAttributes.d.ts +24 -26
- package/dialog/viewport/DialogViewportDataAttributes.js +25 -28
- package/dialog/viewport/DialogViewportDataAttributes.mjs +25 -27
- package/docs/index.md +2 -1
- package/docs/react/components/accordion.md +326 -5
- package/docs/react/components/alert-dialog.md +376 -16
- package/docs/react/components/autocomplete.md +49 -43
- package/docs/react/components/avatar.md +49 -0
- package/docs/react/components/button.md +7 -3
- package/docs/react/components/collapsible.md +18 -0
- package/docs/react/components/combobox.md +990 -226
- package/docs/react/components/context-menu.md +47 -49
- package/docs/react/components/dialog.md +358 -14
- package/docs/react/components/field.md +14 -14
- package/docs/react/components/menu.md +29 -28
- package/docs/react/components/navigation-menu.md +4 -0
- package/docs/react/components/popover.md +1 -0
- package/docs/react/components/preview-card.md +5 -4
- package/docs/react/components/select.md +7 -7
- package/docs/react/components/slider.md +414 -49
- package/docs/react/components/tabs.md +1 -4
- package/docs/react/components/toast.md +19 -4
- package/docs/react/overview/community.md +2 -5
- package/docs/react/overview/releases/v1-8-0.md +148 -0
- package/docs/react/overview/releases.md +11 -1
- package/docs/react/utils/use-render.md +4 -362
- package/drawer/backdrop/DrawerBackdrop.js +4 -4
- package/drawer/backdrop/DrawerBackdrop.mjs +2 -2
- package/drawer/backdrop/DrawerBackdropCssVars.d.mts +5 -7
- package/drawer/backdrop/DrawerBackdropCssVars.d.ts +5 -7
- package/drawer/backdrop/DrawerBackdropCssVars.js +6 -9
- package/drawer/backdrop/DrawerBackdropCssVars.mjs +5 -8
- package/drawer/backdrop/DrawerBackdropDataAttributes.d.mts +16 -18
- package/drawer/backdrop/DrawerBackdropDataAttributes.d.ts +16 -18
- package/drawer/backdrop/DrawerBackdropDataAttributes.js +17 -20
- package/drawer/backdrop/DrawerBackdropDataAttributes.mjs +17 -19
- package/drawer/content/DrawerContent.js +2 -2
- package/drawer/content/DrawerContent.mjs +1 -1
- package/drawer/indent/DrawerIndent.js +9 -9
- package/drawer/indent/DrawerIndent.mjs +2 -2
- package/drawer/popup/DrawerPopup.js +22 -22
- package/drawer/popup/DrawerPopup.mjs +3 -3
- package/drawer/popup/DrawerPopupCssVars.d.mts +35 -37
- package/drawer/popup/DrawerPopupCssVars.d.ts +35 -37
- package/drawer/popup/DrawerPopupCssVars.js +36 -39
- package/drawer/popup/DrawerPopupCssVars.mjs +35 -38
- package/drawer/popup/DrawerPopupDataAttributes.d.mts +41 -43
- package/drawer/popup/DrawerPopupDataAttributes.d.ts +41 -43
- package/drawer/popup/DrawerPopupDataAttributes.js +42 -45
- package/drawer/popup/DrawerPopupDataAttributes.mjs +42 -44
- package/drawer/provider/DrawerProvider.d.mts +1 -1
- package/drawer/provider/DrawerProvider.d.ts +1 -1
- package/drawer/root/DrawerRoot.d.mts +1 -1
- package/drawer/root/DrawerRoot.d.ts +1 -1
- package/drawer/root/useDrawerSnapPoints.js +1 -1
- package/drawer/root/useDrawerSnapPoints.mjs +1 -1
- package/drawer/swipe-area/DrawerSwipeArea.js +34 -25
- package/drawer/swipe-area/DrawerSwipeArea.mjs +14 -5
- package/drawer/swipe-area/DrawerSwipeAreaDataAttributes.d.mts +21 -23
- package/drawer/swipe-area/DrawerSwipeAreaDataAttributes.d.ts +21 -23
- package/drawer/swipe-area/DrawerSwipeAreaDataAttributes.js +22 -25
- package/drawer/swipe-area/DrawerSwipeAreaDataAttributes.mjs +22 -24
- package/drawer/viewport/DrawerViewport.js +66 -35
- package/drawer/viewport/DrawerViewport.mjs +54 -23
- package/drawer/viewport/DrawerViewportCssVars.d.mts +6 -8
- package/drawer/viewport/DrawerViewportCssVars.d.ts +6 -8
- package/drawer/viewport/DrawerViewportCssVars.js +7 -10
- package/drawer/viewport/DrawerViewportCssVars.mjs +6 -9
- package/drawer/viewport/DrawerViewportDataAttributes.d.mts +20 -22
- package/drawer/viewport/DrawerViewportDataAttributes.d.ts +20 -22
- package/drawer/viewport/DrawerViewportDataAttributes.js +21 -24
- package/drawer/viewport/DrawerViewportDataAttributes.mjs +21 -23
- package/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardProvider.d.mts +1 -1
- package/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardProvider.d.ts +1 -1
- package/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardProvider.js +4 -4
- package/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardProvider.mjs +2 -2
- package/field/control/FieldControl.js +67 -20
- package/field/control/FieldControl.mjs +67 -20
- package/field/control/FieldControlDataAttributes.d.mts +28 -30
- package/field/control/FieldControlDataAttributes.d.ts +28 -30
- package/field/control/FieldControlDataAttributes.js +29 -32
- package/field/control/FieldControlDataAttributes.mjs +28 -31
- package/field/description/FieldDescriptionDataAttributes.d.mts +28 -30
- package/field/description/FieldDescriptionDataAttributes.d.ts +28 -30
- package/field/description/FieldDescriptionDataAttributes.js +29 -32
- package/field/description/FieldDescriptionDataAttributes.mjs +28 -31
- package/field/error/FieldErrorDataAttributes.d.mts +36 -38
- package/field/error/FieldErrorDataAttributes.d.ts +36 -38
- package/field/error/FieldErrorDataAttributes.js +37 -40
- package/field/error/FieldErrorDataAttributes.mjs +37 -39
- package/field/item/FieldItemDataAttributes.d.mts +28 -30
- package/field/item/FieldItemDataAttributes.d.ts +28 -30
- package/field/item/FieldItemDataAttributes.js +29 -32
- package/field/item/FieldItemDataAttributes.mjs +28 -31
- package/field/label/FieldLabelDataAttributes.d.mts +28 -30
- package/field/label/FieldLabelDataAttributes.d.ts +28 -30
- package/field/label/FieldLabelDataAttributes.js +29 -32
- package/field/label/FieldLabelDataAttributes.mjs +28 -31
- package/field/root/FieldRoot.d.mts +3 -2
- package/field/root/FieldRoot.d.ts +3 -2
- package/field/root/FieldRoot.js +4 -2
- package/field/root/FieldRoot.mjs +4 -2
- package/field/root/FieldRootDataAttributes.d.mts +28 -30
- package/field/root/FieldRootDataAttributes.d.ts +28 -30
- package/field/root/FieldRootDataAttributes.js +29 -32
- package/field/root/FieldRootDataAttributes.mjs +28 -31
- package/field/root/useFieldValidation.d.mts +3 -2
- package/field/root/useFieldValidation.d.ts +3 -2
- package/field/root/useFieldValidation.js +116 -91
- package/field/root/useFieldValidation.mjs +116 -91
- package/floating-ui-react/components/FloatingDelayGroup.js +2 -1
- package/floating-ui-react/components/FloatingDelayGroup.mjs +2 -1
- package/floating-ui-react/components/FloatingPortal.d.mts +5 -0
- package/floating-ui-react/components/FloatingPortal.d.ts +5 -0
- package/floating-ui-react/components/FloatingPortal.js +2 -0
- package/floating-ui-react/components/FloatingPortal.mjs +2 -0
- package/floating-ui-react/hooks/useDismiss.d.mts +1 -1
- package/floating-ui-react/hooks/useDismiss.d.ts +1 -1
- package/floating-ui-react/hooks/useDismiss.js +65 -10
- package/floating-ui-react/hooks/useDismiss.mjs +66 -11
- package/floating-ui-react/hooks/useFloatingRootContext.js +0 -2
- package/floating-ui-react/hooks/useFloatingRootContext.mjs +0 -2
- package/floating-ui-react/hooks/useFocus.js +1 -0
- package/floating-ui-react/hooks/useFocus.mjs +1 -0
- package/floating-ui-react/hooks/useHoverReferenceInteraction.js +1 -1
- package/floating-ui-react/hooks/useHoverReferenceInteraction.mjs +1 -1
- package/floating-ui-react/hooks/useListNavigation.js +1 -2
- package/floating-ui-react/hooks/useListNavigation.mjs +1 -2
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.d.mts +9 -4
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.d.ts +9 -4
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.js +5 -0
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs +6 -0
- package/floating-ui-react/middleware/arrow.js +11 -4
- package/floating-ui-react/middleware/arrow.mjs +11 -4
- package/floating-ui-react/utils/element.d.mts +1 -1
- package/floating-ui-react/utils/element.d.ts +1 -1
- package/floating-ui-react/utils/element.js +5 -3
- package/floating-ui-react/utils/element.mjs +4 -3
- package/form/Form.js +13 -7
- package/form/Form.mjs +13 -7
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/input/InputDataAttributes.d.mts +28 -30
- package/input/InputDataAttributes.d.ts +28 -30
- package/input/InputDataAttributes.js +29 -32
- package/input/InputDataAttributes.mjs +28 -31
- package/internals/PrehydrationScript.d.mts +2 -1
- package/internals/PrehydrationScript.d.ts +2 -1
- package/internals/TransitionStatusDataAttributes.d.mts +8 -0
- package/internals/TransitionStatusDataAttributes.d.ts +8 -0
- package/internals/TransitionStatusDataAttributes.js +15 -0
- package/internals/TransitionStatusDataAttributes.mjs +9 -0
- package/internals/composite/list/CompositeList.d.mts +1 -1
- package/internals/composite/list/CompositeList.d.ts +1 -1
- package/internals/composite/list/CompositeList.js +10 -2
- package/internals/composite/list/CompositeList.mjs +10 -2
- package/internals/composite/root/CompositeRoot.d.mts +1 -1
- package/internals/composite/root/CompositeRoot.d.ts +1 -1
- package/internals/composite/root/useCompositeRoot.js +45 -3
- package/internals/composite/root/useCompositeRoot.mjs +44 -2
- package/internals/field-constants/constants.js +4 -2
- package/internals/field-constants/constants.mjs +3 -2
- package/internals/field-register-control/useFieldControlRegistration.d.mts +1 -0
- package/internals/field-register-control/useFieldControlRegistration.d.ts +1 -0
- package/internals/field-register-control/useFieldControlRegistration.js +8 -0
- package/internals/field-register-control/useFieldControlRegistration.mjs +8 -0
- package/internals/filter.js +1 -1
- package/internals/filter.mjs +1 -1
- package/internals/form-context/FormContext.d.mts +1 -1
- package/internals/form-context/FormContext.d.ts +1 -1
- package/internals/form-context/FormContext.js +2 -2
- package/internals/form-context/FormContext.mjs +2 -2
- package/internals/itemEquality.d.mts +4 -1
- package/internals/itemEquality.d.ts +4 -1
- package/internals/itemEquality.js +40 -5
- package/internals/itemEquality.mjs +38 -5
- package/internals/labelable-provider/LabelableContext.d.mts +3 -1
- package/internals/labelable-provider/LabelableContext.d.ts +3 -1
- package/internals/labelable-provider/LabelableContext.js +1 -0
- package/internals/labelable-provider/LabelableContext.mjs +1 -0
- package/internals/labelable-provider/LabelableProvider.d.mts +0 -2
- package/internals/labelable-provider/LabelableProvider.d.ts +0 -2
- package/internals/labelable-provider/LabelableProvider.js +21 -12
- package/internals/labelable-provider/LabelableProvider.mjs +21 -12
- package/internals/labelable-provider/useLabel.d.mts +2 -2
- package/internals/labelable-provider/useLabel.d.ts +2 -2
- package/internals/labelable-provider/useLabel.js +1 -1
- package/internals/labelable-provider/useLabel.mjs +1 -1
- package/internals/labelable-provider/useLabelableId.d.mts +6 -7
- package/internals/labelable-provider/useLabelableId.d.ts +6 -7
- package/internals/labelable-provider/useLabelableId.js +27 -20
- package/internals/labelable-provider/useLabelableId.mjs +27 -20
- package/internals/resolveValueLabel.d.mts +1 -0
- package/internals/resolveValueLabel.d.ts +1 -0
- package/internals/resolveValueLabel.js +13 -3
- package/internals/resolveValueLabel.mjs +12 -3
- package/internals/stateAttributesMapping.d.mts +2 -10
- package/internals/stateAttributesMapping.d.ts +2 -10
- package/internals/stateAttributesMapping.js +5 -13
- package/internals/stateAttributesMapping.mjs +4 -13
- package/internals/temporal-adapter-luxon/TemporalAdapterLuxon.d.mts +1 -1
- package/internals/temporal-adapter-luxon/TemporalAdapterLuxon.d.ts +1 -1
- package/internals/useAnchorPositioning.js +34 -25
- package/internals/useAnchorPositioning.mjs +34 -25
- package/internals/useAnimationsFinished.d.mts +4 -1
- package/internals/useAnimationsFinished.d.ts +4 -1
- package/internals/useAnimationsFinished.js +45 -5
- package/internals/useAnimationsFinished.mjs +44 -5
- package/internals/useOpenChangeComplete.d.mts +6 -0
- package/internals/useOpenChangeComplete.d.ts +6 -0
- package/internals/useOpenChangeComplete.js +2 -1
- package/internals/useOpenChangeComplete.mjs +2 -1
- package/internals/usePressAndHold.js +8 -0
- package/internals/usePressAndHold.mjs +8 -0
- package/internals/useRenderElement.js +27 -15
- package/internals/useRenderElement.mjs +27 -15
- package/internals/useTransitionStatus.d.mts +5 -1
- package/internals/useTransitionStatus.d.ts +5 -1
- package/internals/useTransitionStatus.js +9 -2
- package/internals/useTransitionStatus.mjs +9 -2
- package/menu/arrow/MenuArrowDataAttributes.d.mts +22 -24
- package/menu/arrow/MenuArrowDataAttributes.d.ts +22 -24
- package/menu/arrow/MenuArrowDataAttributes.js +23 -26
- package/menu/arrow/MenuArrowDataAttributes.mjs +23 -25
- package/menu/backdrop/MenuBackdropDataAttributes.d.mts +16 -18
- package/menu/backdrop/MenuBackdropDataAttributes.d.ts +16 -18
- package/menu/backdrop/MenuBackdropDataAttributes.js +17 -20
- package/menu/backdrop/MenuBackdropDataAttributes.mjs +17 -19
- package/menu/checkbox-item/MenuCheckboxItemDataAttributes.d.mts +16 -18
- package/menu/checkbox-item/MenuCheckboxItemDataAttributes.d.ts +16 -18
- package/menu/checkbox-item/MenuCheckboxItemDataAttributes.js +17 -20
- package/menu/checkbox-item/MenuCheckboxItemDataAttributes.mjs +16 -19
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +2 -0
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.mjs +2 -0
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.d.mts +20 -22
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.d.ts +20 -22
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.js +21 -24
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.mjs +21 -23
- package/menu/group-label/MenuGroupLabel.js +1 -1
- package/menu/group-label/MenuGroupLabel.mjs +1 -1
- package/menu/item/MenuItemDataAttributes.d.mts +8 -10
- package/menu/item/MenuItemDataAttributes.d.ts +8 -10
- package/menu/item/MenuItemDataAttributes.js +9 -12
- package/menu/item/MenuItemDataAttributes.mjs +8 -11
- package/menu/link-item/MenuLinkItemDataAttributes.d.mts +4 -6
- package/menu/link-item/MenuLinkItemDataAttributes.d.ts +4 -6
- package/menu/link-item/MenuLinkItemDataAttributes.js +5 -8
- package/menu/link-item/MenuLinkItemDataAttributes.mjs +4 -7
- package/menu/popup/MenuPopupDataAttributes.d.mts +31 -33
- package/menu/popup/MenuPopupDataAttributes.d.ts +31 -33
- package/menu/popup/MenuPopupDataAttributes.js +32 -35
- package/menu/popup/MenuPopupDataAttributes.mjs +32 -34
- package/menu/portal/MenuPortal.js +9 -2
- package/menu/portal/MenuPortal.mjs +9 -2
- package/menu/positioner/MenuPositioner.d.mts +17 -1
- package/menu/positioner/MenuPositioner.d.ts +17 -1
- package/menu/positioner/MenuPositionerCssVars.d.mts +37 -39
- package/menu/positioner/MenuPositionerCssVars.d.ts +37 -39
- package/menu/positioner/MenuPositionerCssVars.js +38 -41
- package/menu/positioner/MenuPositionerCssVars.mjs +37 -40
- package/menu/positioner/MenuPositionerDataAttributes.d.mts +22 -24
- package/menu/positioner/MenuPositionerDataAttributes.d.ts +22 -24
- package/menu/positioner/MenuPositionerDataAttributes.js +23 -26
- package/menu/positioner/MenuPositionerDataAttributes.mjs +23 -25
- package/menu/radio-item/MenuRadioItemDataAttributes.d.mts +16 -18
- package/menu/radio-item/MenuRadioItemDataAttributes.d.ts +16 -18
- package/menu/radio-item/MenuRadioItemDataAttributes.js +17 -20
- package/menu/radio-item/MenuRadioItemDataAttributes.mjs +16 -19
- package/menu/radio-item-indicator/MenuRadioItemIndicator.js +2 -0
- package/menu/radio-item-indicator/MenuRadioItemIndicator.mjs +2 -0
- package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.d.mts +20 -22
- package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.d.ts +20 -22
- package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.js +21 -24
- package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.mjs +21 -23
- package/menu/root/MenuRoot.d.mts +1 -1
- package/menu/root/MenuRoot.d.ts +1 -1
- package/menu/root/MenuRoot.js +98 -19
- package/menu/root/MenuRoot.mjs +99 -20
- package/menu/store/MenuStore.d.mts +2 -2
- package/menu/store/MenuStore.d.ts +2 -2
- package/menu/store/MenuStore.js +12 -11
- package/menu/store/MenuStore.mjs +12 -11
- package/menu/submenu-root/MenuSubmenuRoot.d.mts +1 -1
- package/menu/submenu-root/MenuSubmenuRoot.d.ts +1 -1
- package/menu/submenu-trigger/MenuSubmenuTrigger.d.mts +1 -0
- package/menu/submenu-trigger/MenuSubmenuTrigger.d.ts +1 -0
- package/menu/submenu-trigger/MenuSubmenuTrigger.js +16 -5
- package/menu/submenu-trigger/MenuSubmenuTrigger.mjs +16 -5
- package/menu/submenu-trigger/MenuSubmenuTriggerDataAttributes.d.mts +12 -14
- package/menu/submenu-trigger/MenuSubmenuTriggerDataAttributes.d.ts +12 -14
- package/menu/submenu-trigger/MenuSubmenuTriggerDataAttributes.js +13 -16
- package/menu/submenu-trigger/MenuSubmenuTriggerDataAttributes.mjs +13 -15
- package/menu/trigger/MenuTriggerDataAttributes.d.mts +12 -10
- package/menu/trigger/MenuTriggerDataAttributes.d.ts +12 -10
- package/menu/trigger/MenuTriggerDataAttributes.js +13 -12
- package/menu/trigger/MenuTriggerDataAttributes.mjs +13 -11
- package/menu/utils/stateAttributesMapping.js +4 -3
- package/menu/utils/stateAttributesMapping.mjs +1 -1
- package/menu/viewport/MenuViewportCssVars.d.mts +12 -14
- package/menu/viewport/MenuViewportCssVars.d.ts +12 -14
- package/menu/viewport/MenuViewportCssVars.js +13 -16
- package/menu/viewport/MenuViewportCssVars.mjs +12 -15
- package/menu/viewport/MenuViewportDataAttributes.d.mts +24 -26
- package/menu/viewport/MenuViewportDataAttributes.d.ts +24 -26
- package/menu/viewport/MenuViewportDataAttributes.js +25 -28
- package/menu/viewport/MenuViewportDataAttributes.mjs +24 -27
- package/menubar/Menubar.js +2 -2
- package/menubar/Menubar.mjs +1 -1
- package/menubar/MenubarDataAttributes.d.mts +13 -15
- package/menubar/MenubarDataAttributes.d.ts +13 -15
- package/menubar/MenubarDataAttributes.js +14 -17
- package/menubar/MenubarDataAttributes.mjs +13 -16
- package/meter/root/MeterRoot.js +2 -2
- package/meter/root/MeterRoot.mjs +2 -2
- package/navigation-menu/arrow/NavigationMenuArrowDataAttributes.d.mts +22 -24
- package/navigation-menu/arrow/NavigationMenuArrowDataAttributes.d.ts +22 -24
- package/navigation-menu/arrow/NavigationMenuArrowDataAttributes.js +23 -26
- package/navigation-menu/arrow/NavigationMenuArrowDataAttributes.mjs +23 -25
- package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.d.mts +16 -18
- package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.d.ts +16 -18
- package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.js +17 -20
- package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.mjs +17 -19
- package/navigation-menu/content/NavigationMenuContent.js +2 -1
- package/navigation-menu/content/NavigationMenuContent.mjs +2 -1
- package/navigation-menu/content/NavigationMenuContentDataAttributes.d.mts +21 -23
- package/navigation-menu/content/NavigationMenuContentDataAttributes.d.ts +21 -23
- package/navigation-menu/content/NavigationMenuContentDataAttributes.js +22 -25
- package/navigation-menu/content/NavigationMenuContentDataAttributes.mjs +22 -24
- package/navigation-menu/icon/NavigationMenuIconDataAttributes.d.mts +4 -6
- package/navigation-menu/icon/NavigationMenuIconDataAttributes.d.ts +4 -6
- package/navigation-menu/icon/NavigationMenuIconDataAttributes.js +5 -8
- package/navigation-menu/icon/NavigationMenuIconDataAttributes.mjs +5 -7
- package/navigation-menu/link/NavigationMenuLinkDataAttributes.d.mts +4 -6
- package/navigation-menu/link/NavigationMenuLinkDataAttributes.d.ts +4 -6
- package/navigation-menu/link/NavigationMenuLinkDataAttributes.js +5 -8
- package/navigation-menu/link/NavigationMenuLinkDataAttributes.mjs +4 -7
- package/navigation-menu/popup/NavigationMenuPopupCssVars.d.mts +10 -12
- package/navigation-menu/popup/NavigationMenuPopupCssVars.d.ts +10 -12
- package/navigation-menu/popup/NavigationMenuPopupCssVars.js +11 -14
- package/navigation-menu/popup/NavigationMenuPopupCssVars.mjs +10 -13
- package/navigation-menu/popup/NavigationMenuPopupDataAttributes.d.mts +30 -32
- package/navigation-menu/popup/NavigationMenuPopupDataAttributes.d.ts +30 -32
- package/navigation-menu/popup/NavigationMenuPopupDataAttributes.js +31 -34
- package/navigation-menu/popup/NavigationMenuPopupDataAttributes.mjs +31 -33
- package/navigation-menu/positioner/NavigationMenuPositionerCssVars.d.mts +35 -37
- package/navigation-menu/positioner/NavigationMenuPositionerCssVars.d.ts +35 -37
- package/navigation-menu/positioner/NavigationMenuPositionerCssVars.js +36 -39
- package/navigation-menu/positioner/NavigationMenuPositionerCssVars.mjs +35 -38
- package/navigation-menu/positioner/NavigationMenuPositionerDataAttributes.d.mts +26 -28
- package/navigation-menu/positioner/NavigationMenuPositionerDataAttributes.d.ts +26 -28
- package/navigation-menu/positioner/NavigationMenuPositionerDataAttributes.js +27 -30
- package/navigation-menu/positioner/NavigationMenuPositionerDataAttributes.mjs +27 -29
- package/navigation-menu/root/NavigationMenuRoot.js +3 -3
- package/navigation-menu/root/NavigationMenuRoot.mjs +1 -1
- package/navigation-menu/trigger/NavigationMenuTrigger.d.mts +11 -1
- package/navigation-menu/trigger/NavigationMenuTrigger.d.ts +11 -1
- package/navigation-menu/trigger/NavigationMenuTrigger.js +25 -37
- package/navigation-menu/trigger/NavigationMenuTrigger.mjs +9 -21
- package/navigation-menu/trigger/NavigationMenuTriggerDataAttributes.d.mts +12 -10
- package/navigation-menu/trigger/NavigationMenuTriggerDataAttributes.d.ts +12 -10
- package/navigation-menu/trigger/NavigationMenuTriggerDataAttributes.js +13 -12
- package/navigation-menu/trigger/NavigationMenuTriggerDataAttributes.mjs +13 -11
- package/navigation-menu/utils/setSharedFixedSize.js +7 -6
- package/navigation-menu/utils/setSharedFixedSize.mjs +2 -2
- package/number-field/decrement/NumberFieldDecrementDataAttributes.d.mts +40 -42
- package/number-field/decrement/NumberFieldDecrementDataAttributes.d.ts +40 -42
- package/number-field/decrement/NumberFieldDecrementDataAttributes.js +41 -44
- package/number-field/decrement/NumberFieldDecrementDataAttributes.mjs +40 -43
- package/number-field/group/NumberFieldGroupDataAttributes.d.mts +40 -42
- package/number-field/group/NumberFieldGroupDataAttributes.d.ts +40 -42
- package/number-field/group/NumberFieldGroupDataAttributes.js +41 -44
- package/number-field/group/NumberFieldGroupDataAttributes.mjs +40 -43
- package/number-field/increment/NumberFieldIncrementDataAttributes.d.mts +40 -42
- package/number-field/increment/NumberFieldIncrementDataAttributes.d.ts +40 -42
- package/number-field/increment/NumberFieldIncrementDataAttributes.js +41 -44
- package/number-field/increment/NumberFieldIncrementDataAttributes.mjs +40 -43
- package/number-field/input/NumberFieldInput.js +1 -12
- package/number-field/input/NumberFieldInput.mjs +1 -12
- package/number-field/input/NumberFieldInputDataAttributes.d.mts +40 -42
- package/number-field/input/NumberFieldInputDataAttributes.d.ts +40 -42
- package/number-field/input/NumberFieldInputDataAttributes.js +41 -44
- package/number-field/input/NumberFieldInputDataAttributes.mjs +40 -43
- package/number-field/root/NumberFieldRoot.js +33 -7
- package/number-field/root/NumberFieldRoot.mjs +33 -7
- package/number-field/root/NumberFieldRootContext.d.mts +1 -0
- package/number-field/root/NumberFieldRootContext.d.ts +1 -0
- package/number-field/root/NumberFieldRootDataAttributes.d.mts +40 -42
- package/number-field/root/NumberFieldRootDataAttributes.d.ts +40 -42
- package/number-field/root/NumberFieldRootDataAttributes.js +41 -44
- package/number-field/root/NumberFieldRootDataAttributes.mjs +40 -43
- package/number-field/root/useNumberFieldStepperButton.js +2 -1
- package/number-field/root/useNumberFieldStepperButton.mjs +2 -1
- package/number-field/scrub-area/NumberFieldScrubArea.js +2 -1
- package/number-field/scrub-area/NumberFieldScrubArea.mjs +2 -1
- package/number-field/scrub-area/NumberFieldScrubAreaDataAttributes.d.mts +40 -42
- package/number-field/scrub-area/NumberFieldScrubAreaDataAttributes.d.ts +40 -42
- package/number-field/scrub-area/NumberFieldScrubAreaDataAttributes.js +41 -44
- package/number-field/scrub-area/NumberFieldScrubAreaDataAttributes.mjs +40 -43
- package/number-field/scrub-area-cursor/NumberFieldScrubAreaCursorDataAttributes.d.mts +40 -42
- package/number-field/scrub-area-cursor/NumberFieldScrubAreaCursorDataAttributes.d.ts +40 -42
- package/number-field/scrub-area-cursor/NumberFieldScrubAreaCursorDataAttributes.js +41 -44
- package/number-field/scrub-area-cursor/NumberFieldScrubAreaCursorDataAttributes.mjs +40 -43
- package/number-field/utils/parse.js +1 -1
- package/number-field/utils/parse.mjs +1 -1
- package/number-field/utils/validate.js +2 -2
- package/number-field/utils/validate.mjs +2 -2
- package/otp-field/input/OTPFieldInputDataAttributes.d.mts +40 -42
- package/otp-field/input/OTPFieldInputDataAttributes.d.ts +40 -42
- package/otp-field/input/OTPFieldInputDataAttributes.js +41 -44
- package/otp-field/input/OTPFieldInputDataAttributes.mjs +40 -43
- package/otp-field/root/OTPFieldRoot.js +1 -1
- package/otp-field/root/OTPFieldRoot.mjs +1 -1
- package/otp-field/root/OTPFieldRootDataAttributes.d.mts +40 -42
- package/otp-field/root/OTPFieldRootDataAttributes.d.ts +40 -42
- package/otp-field/root/OTPFieldRootDataAttributes.js +41 -44
- package/otp-field/root/OTPFieldRootDataAttributes.mjs +40 -43
- package/package.json +3 -45
- package/popover/arrow/PopoverArrowDataAttributes.d.mts +22 -24
- package/popover/arrow/PopoverArrowDataAttributes.d.ts +22 -24
- package/popover/arrow/PopoverArrowDataAttributes.js +23 -26
- package/popover/arrow/PopoverArrowDataAttributes.mjs +23 -25
- package/popover/backdrop/PopoverBackdropDataAttributes.d.mts +16 -18
- package/popover/backdrop/PopoverBackdropDataAttributes.d.ts +16 -18
- package/popover/backdrop/PopoverBackdropDataAttributes.js +17 -20
- package/popover/backdrop/PopoverBackdropDataAttributes.mjs +17 -19
- package/popover/popup/PopoverPopupCssVars.d.mts +8 -10
- package/popover/popup/PopoverPopupCssVars.d.ts +8 -10
- package/popover/popup/PopoverPopupCssVars.js +9 -12
- package/popover/popup/PopoverPopupCssVars.mjs +8 -11
- package/popover/popup/PopoverPopupDataAttributes.d.mts +31 -33
- package/popover/popup/PopoverPopupDataAttributes.d.ts +31 -33
- package/popover/popup/PopoverPopupDataAttributes.js +32 -35
- package/popover/popup/PopoverPopupDataAttributes.mjs +32 -34
- package/popover/positioner/PopoverPositionerCssVars.d.mts +37 -39
- package/popover/positioner/PopoverPositionerCssVars.d.ts +37 -39
- package/popover/positioner/PopoverPositionerCssVars.js +38 -41
- package/popover/positioner/PopoverPositionerCssVars.mjs +37 -40
- package/popover/positioner/PopoverPositionerDataAttributes.d.mts +22 -24
- package/popover/positioner/PopoverPositionerDataAttributes.d.ts +22 -24
- package/popover/positioner/PopoverPositionerDataAttributes.js +23 -26
- package/popover/positioner/PopoverPositionerDataAttributes.mjs +23 -25
- package/popover/root/PopoverRoot.d.mts +1 -1
- package/popover/root/PopoverRoot.d.ts +1 -1
- package/popover/root/PopoverRoot.js +4 -2
- package/popover/root/PopoverRoot.mjs +4 -2
- package/popover/store/PopoverStore.js +4 -8
- package/popover/store/PopoverStore.mjs +5 -9
- package/popover/trigger/PopoverTrigger.js +2 -1
- package/popover/trigger/PopoverTrigger.mjs +2 -1
- package/popover/trigger/PopoverTriggerDataAttributes.d.mts +12 -10
- package/popover/trigger/PopoverTriggerDataAttributes.d.ts +12 -10
- package/popover/trigger/PopoverTriggerDataAttributes.js +13 -12
- package/popover/trigger/PopoverTriggerDataAttributes.mjs +13 -11
- package/popover/viewport/PopoverViewportCssVars.d.mts +12 -14
- package/popover/viewport/PopoverViewportCssVars.d.ts +12 -14
- package/popover/viewport/PopoverViewportCssVars.js +13 -16
- package/popover/viewport/PopoverViewportCssVars.mjs +12 -15
- package/popover/viewport/PopoverViewportDataAttributes.d.mts +24 -26
- package/popover/viewport/PopoverViewportDataAttributes.d.ts +24 -26
- package/popover/viewport/PopoverViewportDataAttributes.js +25 -28
- package/popover/viewport/PopoverViewportDataAttributes.mjs +24 -27
- package/preview-card/arrow/PreviewCardArrowDataAttributes.d.mts +22 -24
- package/preview-card/arrow/PreviewCardArrowDataAttributes.d.ts +22 -24
- package/preview-card/arrow/PreviewCardArrowDataAttributes.js +23 -26
- package/preview-card/arrow/PreviewCardArrowDataAttributes.mjs +23 -25
- package/preview-card/backdrop/PreviewCardBackdropDataAttributes.d.mts +16 -18
- package/preview-card/backdrop/PreviewCardBackdropDataAttributes.d.ts +16 -18
- package/preview-card/backdrop/PreviewCardBackdropDataAttributes.js +17 -20
- package/preview-card/backdrop/PreviewCardBackdropDataAttributes.mjs +17 -19
- package/preview-card/popup/PreviewCardPopupDataAttributes.d.mts +26 -28
- package/preview-card/popup/PreviewCardPopupDataAttributes.d.ts +26 -28
- package/preview-card/popup/PreviewCardPopupDataAttributes.js +27 -30
- package/preview-card/popup/PreviewCardPopupDataAttributes.mjs +27 -29
- package/preview-card/positioner/PreviewCardPositionerCssVars.d.mts +37 -39
- package/preview-card/positioner/PreviewCardPositionerCssVars.d.ts +37 -39
- package/preview-card/positioner/PreviewCardPositionerCssVars.js +38 -41
- package/preview-card/positioner/PreviewCardPositionerCssVars.mjs +37 -40
- package/preview-card/positioner/PreviewCardPositionerDataAttributes.d.mts +22 -24
- package/preview-card/positioner/PreviewCardPositionerDataAttributes.d.ts +22 -24
- package/preview-card/positioner/PreviewCardPositionerDataAttributes.js +23 -26
- package/preview-card/positioner/PreviewCardPositionerDataAttributes.mjs +23 -25
- package/preview-card/root/PreviewCardRoot.d.mts +1 -1
- package/preview-card/root/PreviewCardRoot.d.ts +1 -1
- package/preview-card/store/PreviewCardStore.js +1 -2
- package/preview-card/store/PreviewCardStore.mjs +2 -3
- package/preview-card/trigger/PreviewCardTriggerDataAttributes.d.mts +4 -6
- package/preview-card/trigger/PreviewCardTriggerDataAttributes.d.ts +4 -6
- package/preview-card/trigger/PreviewCardTriggerDataAttributes.js +5 -8
- package/preview-card/trigger/PreviewCardTriggerDataAttributes.mjs +5 -7
- package/preview-card/viewport/PreviewCardViewportCssVars.d.mts +12 -14
- package/preview-card/viewport/PreviewCardViewportCssVars.d.ts +12 -14
- package/preview-card/viewport/PreviewCardViewportCssVars.js +13 -16
- package/preview-card/viewport/PreviewCardViewportCssVars.mjs +12 -15
- package/preview-card/viewport/PreviewCardViewportDataAttributes.d.mts +24 -26
- package/preview-card/viewport/PreviewCardViewportDataAttributes.d.ts +24 -26
- package/preview-card/viewport/PreviewCardViewportDataAttributes.js +25 -28
- package/preview-card/viewport/PreviewCardViewportDataAttributes.mjs +24 -27
- package/progress/indicator/ProgressIndicatorDataAttributes.d.mts +12 -14
- package/progress/indicator/ProgressIndicatorDataAttributes.d.ts +12 -14
- package/progress/indicator/ProgressIndicatorDataAttributes.js +13 -16
- package/progress/indicator/ProgressIndicatorDataAttributes.mjs +12 -15
- package/progress/label/ProgressLabelDataAttributes.d.mts +12 -14
- package/progress/label/ProgressLabelDataAttributes.d.ts +12 -14
- package/progress/label/ProgressLabelDataAttributes.js +13 -16
- package/progress/label/ProgressLabelDataAttributes.mjs +12 -15
- package/progress/root/ProgressRoot.js +2 -2
- package/progress/root/ProgressRoot.mjs +2 -2
- package/progress/root/ProgressRootDataAttributes.d.mts +12 -14
- package/progress/root/ProgressRootDataAttributes.d.ts +12 -14
- package/progress/root/ProgressRootDataAttributes.js +13 -16
- package/progress/root/ProgressRootDataAttributes.mjs +12 -15
- package/progress/root/stateAttributesMapping.js +18 -3
- package/progress/root/stateAttributesMapping.mjs +17 -3
- package/progress/track/ProgressTrackDataAttributes.d.mts +12 -14
- package/progress/track/ProgressTrackDataAttributes.d.ts +12 -14
- package/progress/track/ProgressTrackDataAttributes.js +13 -16
- package/progress/track/ProgressTrackDataAttributes.mjs +12 -15
- package/progress/value/ProgressValueDataAttributes.d.mts +12 -14
- package/progress/value/ProgressValueDataAttributes.d.ts +12 -14
- package/progress/value/ProgressValueDataAttributes.js +13 -16
- package/progress/value/ProgressValueDataAttributes.mjs +12 -15
- package/radio/indicator/RadioIndicator.js +2 -0
- package/radio/indicator/RadioIndicator.mjs +2 -0
- package/radio/indicator/RadioIndicatorDataAttributes.d.mts +52 -54
- package/radio/indicator/RadioIndicatorDataAttributes.d.ts +52 -54
- package/radio/indicator/RadioIndicatorDataAttributes.js +53 -56
- package/radio/indicator/RadioIndicatorDataAttributes.mjs +53 -55
- package/radio/root/RadioRoot.js +1 -3
- package/radio/root/RadioRoot.mjs +1 -3
- package/radio/root/RadioRootDataAttributes.d.mts +44 -46
- package/radio/root/RadioRootDataAttributes.d.ts +44 -46
- package/radio/root/RadioRootDataAttributes.js +45 -48
- package/radio/root/RadioRootDataAttributes.mjs +44 -47
- package/radio/utils/stateAttributesMapping.js +4 -2
- package/radio/utils/stateAttributesMapping.mjs +3 -2
- package/radio-group/RadioGroupDataAttributes.d.mts +4 -6
- package/radio-group/RadioGroupDataAttributes.d.ts +4 -6
- package/radio-group/RadioGroupDataAttributes.js +5 -8
- package/radio-group/RadioGroupDataAttributes.mjs +4 -7
- package/scroll-area/content/ScrollAreaContentDataAttributes.d.mts +28 -30
- package/scroll-area/content/ScrollAreaContentDataAttributes.d.ts +28 -30
- package/scroll-area/content/ScrollAreaContentDataAttributes.js +29 -32
- package/scroll-area/content/ScrollAreaContentDataAttributes.mjs +28 -31
- package/scroll-area/corner/ScrollAreaCorner.js +1 -0
- package/scroll-area/corner/ScrollAreaCorner.mjs +1 -0
- package/scroll-area/root/ScrollAreaRoot.js +5 -6
- package/scroll-area/root/ScrollAreaRoot.mjs +5 -6
- package/scroll-area/root/ScrollAreaRootCssVars.d.mts +10 -12
- package/scroll-area/root/ScrollAreaRootCssVars.d.ts +10 -12
- package/scroll-area/root/ScrollAreaRootCssVars.js +11 -14
- package/scroll-area/root/ScrollAreaRootCssVars.mjs +10 -13
- package/scroll-area/root/ScrollAreaRootDataAttributes.d.mts +28 -30
- package/scroll-area/root/ScrollAreaRootDataAttributes.d.ts +28 -30
- package/scroll-area/root/ScrollAreaRootDataAttributes.js +29 -32
- package/scroll-area/root/ScrollAreaRootDataAttributes.mjs +28 -31
- package/scroll-area/root/stateAttributes.js +8 -7
- package/scroll-area/root/stateAttributes.mjs +7 -7
- package/scroll-area/scrollbar/ScrollAreaScrollbar.js +12 -4
- package/scroll-area/scrollbar/ScrollAreaScrollbar.mjs +14 -5
- package/scroll-area/scrollbar/ScrollAreaScrollbarCssVars.d.mts +10 -12
- package/scroll-area/scrollbar/ScrollAreaScrollbarCssVars.d.ts +10 -12
- package/scroll-area/scrollbar/ScrollAreaScrollbarCssVars.js +11 -14
- package/scroll-area/scrollbar/ScrollAreaScrollbarCssVars.mjs +10 -13
- package/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.d.mts +37 -39
- package/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.d.ts +37 -39
- package/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.js +38 -41
- package/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.mjs +37 -40
- package/scroll-area/thumb/ScrollAreaThumbDataAttributes.d.mts +9 -11
- package/scroll-area/thumb/ScrollAreaThumbDataAttributes.d.ts +9 -11
- package/scroll-area/thumb/ScrollAreaThumbDataAttributes.js +10 -13
- package/scroll-area/thumb/ScrollAreaThumbDataAttributes.mjs +9 -12
- package/scroll-area/viewport/ScrollAreaViewport.js +6 -5
- package/scroll-area/viewport/ScrollAreaViewport.mjs +6 -6
- package/scroll-area/viewport/ScrollAreaViewportCssVars.d.mts +20 -22
- package/scroll-area/viewport/ScrollAreaViewportCssVars.d.ts +20 -22
- package/scroll-area/viewport/ScrollAreaViewportCssVars.js +21 -24
- package/scroll-area/viewport/ScrollAreaViewportCssVars.mjs +20 -23
- package/scroll-area/viewport/ScrollAreaViewportDataAttributes.d.mts +28 -30
- package/scroll-area/viewport/ScrollAreaViewportDataAttributes.d.ts +28 -30
- package/scroll-area/viewport/ScrollAreaViewportDataAttributes.js +29 -32
- package/scroll-area/viewport/ScrollAreaViewportDataAttributes.mjs +28 -31
- package/select/arrow/SelectArrow.js +2 -6
- package/select/arrow/SelectArrow.mjs +2 -6
- package/select/arrow/SelectArrowDataAttributes.d.mts +22 -24
- package/select/arrow/SelectArrowDataAttributes.d.ts +22 -24
- package/select/arrow/SelectArrowDataAttributes.js +23 -26
- package/select/arrow/SelectArrowDataAttributes.mjs +23 -25
- package/select/backdrop/SelectBackdrop.js +4 -8
- package/select/backdrop/SelectBackdrop.mjs +4 -8
- package/select/backdrop/SelectBackdropDataAttributes.d.mts +16 -18
- package/select/backdrop/SelectBackdropDataAttributes.d.ts +16 -18
- package/select/backdrop/SelectBackdropDataAttributes.js +17 -20
- package/select/backdrop/SelectBackdropDataAttributes.mjs +17 -19
- package/select/group-label/SelectGroupLabel.js +2 -1
- package/select/group-label/SelectGroupLabel.mjs +2 -1
- package/select/icon/SelectIcon.js +2 -6
- package/select/icon/SelectIcon.mjs +2 -6
- package/select/icon/SelectIconDataAttributes.d.mts +4 -6
- package/select/icon/SelectIconDataAttributes.d.ts +4 -6
- package/select/icon/SelectIconDataAttributes.js +5 -8
- package/select/icon/SelectIconDataAttributes.mjs +5 -7
- package/select/item/SelectItem.js +38 -37
- package/select/item/SelectItem.mjs +40 -39
- package/select/item/SelectItemDataAttributes.d.mts +12 -14
- package/select/item/SelectItemDataAttributes.d.ts +12 -14
- package/select/item/SelectItemDataAttributes.js +13 -16
- package/select/item/SelectItemDataAttributes.mjs +12 -15
- package/select/item-indicator/SelectItemIndicator.js +2 -0
- package/select/item-indicator/SelectItemIndicator.mjs +2 -0
- package/select/item-indicator/SelectItemIndicatorDataAttributes.d.mts +8 -10
- package/select/item-indicator/SelectItemIndicatorDataAttributes.d.ts +8 -10
- package/select/item-indicator/SelectItemIndicatorDataAttributes.js +9 -12
- package/select/item-indicator/SelectItemIndicatorDataAttributes.mjs +9 -11
- package/select/item-text/SelectItemText.js +4 -7
- package/select/item-text/SelectItemText.mjs +4 -7
- package/select/label/SelectLabel.js +3 -7
- package/select/label/SelectLabel.mjs +3 -7
- package/select/list/SelectList.js +9 -10
- package/select/list/SelectList.mjs +10 -11
- package/select/popup/SelectPopup.js +43 -52
- package/select/popup/SelectPopup.mjs +44 -53
- package/select/popup/SelectPopupDataAttributes.d.mts +26 -28
- package/select/popup/SelectPopupDataAttributes.d.ts +26 -28
- package/select/popup/SelectPopupDataAttributes.js +27 -30
- package/select/popup/SelectPopupDataAttributes.mjs +27 -29
- package/select/portal/SelectPortal.js +3 -7
- package/select/portal/SelectPortal.mjs +3 -7
- package/select/positioner/SelectPositioner.js +24 -39
- package/select/positioner/SelectPositioner.mjs +25 -40
- package/select/positioner/SelectPositionerCssVars.d.mts +25 -27
- package/select/positioner/SelectPositionerCssVars.d.ts +25 -27
- package/select/positioner/SelectPositionerCssVars.js +26 -29
- package/select/positioner/SelectPositionerCssVars.mjs +25 -28
- package/select/positioner/SelectPositionerDataAttributes.d.mts +22 -24
- package/select/positioner/SelectPositionerDataAttributes.d.ts +22 -24
- package/select/positioner/SelectPositionerDataAttributes.js +23 -26
- package/select/positioner/SelectPositionerDataAttributes.mjs +23 -25
- package/select/root/SelectRoot.js +60 -56
- package/select/root/SelectRoot.mjs +63 -59
- package/select/root/SelectRootContext.d.mts +11 -30
- package/select/root/SelectRootContext.d.ts +11 -30
- package/select/root/SelectRootContext.js +29 -4
- package/select/root/SelectRootContext.mjs +27 -3
- package/select/scroll-arrow/SelectScrollArrow.js +11 -19
- package/select/scroll-arrow/SelectScrollArrow.mjs +11 -19
- package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.d.mts +22 -24
- package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.d.ts +22 -24
- package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.js +23 -26
- package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.mjs +23 -25
- package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.d.mts +22 -24
- package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.d.ts +22 -24
- package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.js +23 -26
- package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.mjs +23 -25
- package/select/store.d.mts +30 -2
- package/select/store.d.ts +30 -2
- package/select/store.js +5 -0
- package/select/store.mjs +6 -0
- package/select/trigger/SelectTrigger.js +23 -27
- package/select/trigger/SelectTrigger.mjs +24 -28
- package/select/trigger/SelectTriggerDataAttributes.d.mts +53 -55
- package/select/trigger/SelectTriggerDataAttributes.d.ts +53 -55
- package/select/trigger/SelectTriggerDataAttributes.js +54 -57
- package/select/trigger/SelectTriggerDataAttributes.mjs +54 -56
- package/select/value/SelectValue.d.mts +2 -0
- package/select/value/SelectValue.d.ts +2 -0
- package/select/value/SelectValue.js +7 -12
- package/select/value/SelectValue.mjs +7 -12
- package/select/value/SelectValueDataAttributes.d.mts +4 -6
- package/select/value/SelectValueDataAttributes.d.ts +4 -6
- package/select/value/SelectValueDataAttributes.js +5 -8
- package/select/value/SelectValueDataAttributes.mjs +4 -7
- package/separator/SeparatorDataAttributes.d.mts +5 -7
- package/separator/SeparatorDataAttributes.d.ts +5 -7
- package/separator/SeparatorDataAttributes.js +6 -9
- package/separator/SeparatorDataAttributes.mjs +5 -8
- package/slider/control/SliderControl.js +1 -1
- package/slider/control/SliderControl.mjs +1 -1
- package/slider/control/SliderControlDataAttributes.d.mts +33 -35
- package/slider/control/SliderControlDataAttributes.d.ts +33 -35
- package/slider/control/SliderControlDataAttributes.js +34 -37
- package/slider/control/SliderControlDataAttributes.mjs +33 -36
- package/slider/indicator/SliderIndicatorDataAttributes.d.mts +33 -35
- package/slider/indicator/SliderIndicatorDataAttributes.d.ts +33 -35
- package/slider/indicator/SliderIndicatorDataAttributes.js +34 -37
- package/slider/indicator/SliderIndicatorDataAttributes.mjs +33 -36
- package/slider/root/SliderRoot.js +2 -2
- package/slider/root/SliderRoot.mjs +2 -2
- package/slider/root/SliderRootDataAttributes.d.mts +33 -35
- package/slider/root/SliderRootDataAttributes.d.ts +33 -35
- package/slider/root/SliderRootDataAttributes.js +34 -37
- package/slider/root/SliderRootDataAttributes.mjs +33 -36
- package/slider/thumb/SliderThumb.d.mts +1 -2
- package/slider/thumb/SliderThumb.d.ts +1 -2
- package/slider/thumb/SliderThumb.js +4 -3
- package/slider/thumb/SliderThumb.mjs +4 -3
- package/slider/thumb/SliderThumbDataAttributes.d.mts +37 -39
- package/slider/thumb/SliderThumbDataAttributes.d.ts +37 -39
- package/slider/thumb/SliderThumbDataAttributes.js +38 -41
- package/slider/thumb/SliderThumbDataAttributes.mjs +37 -40
- package/slider/track/SliderTrackDataAttributes.d.mts +33 -35
- package/slider/track/SliderTrackDataAttributes.d.ts +33 -35
- package/slider/track/SliderTrackDataAttributes.js +34 -37
- package/slider/track/SliderTrackDataAttributes.mjs +33 -36
- package/slider/utils/getPushedThumbValues.js +1 -1
- package/slider/utils/getPushedThumbValues.mjs +1 -1
- package/slider/utils/getSliderValue.js +1 -1
- package/slider/utils/getSliderValue.mjs +1 -1
- package/slider/utils/resolveThumbCollision.js +1 -1
- package/slider/utils/resolveThumbCollision.mjs +1 -1
- package/slider/value/SliderValue.js +1 -1
- package/slider/value/SliderValue.mjs +1 -1
- package/slider/value/SliderValueDataAttributes.d.mts +33 -35
- package/slider/value/SliderValueDataAttributes.d.ts +33 -35
- package/slider/value/SliderValueDataAttributes.js +34 -37
- package/slider/value/SliderValueDataAttributes.mjs +33 -36
- package/switch/root/SwitchRoot.js +3 -8
- package/switch/root/SwitchRoot.mjs +3 -8
- package/switch/root/SwitchRootDataAttributes.d.mts +44 -46
- package/switch/root/SwitchRootDataAttributes.d.ts +44 -46
- package/switch/root/SwitchRootDataAttributes.js +45 -48
- package/switch/root/SwitchRootDataAttributes.mjs +44 -47
- package/switch/stateAttributesMapping.js +4 -2
- package/switch/stateAttributesMapping.mjs +3 -2
- package/switch/thumb/SwitchThumbDataAttributes.d.mts +44 -46
- package/switch/thumb/SwitchThumbDataAttributes.d.ts +44 -46
- package/switch/thumb/SwitchThumbDataAttributes.js +45 -48
- package/switch/thumb/SwitchThumbDataAttributes.mjs +44 -47
- package/tabs/indicator/TabsIndicator.js +133 -17
- package/tabs/indicator/TabsIndicator.mjs +133 -17
- package/tabs/indicator/TabsIndicatorCssVars.d.mts +30 -32
- package/tabs/indicator/TabsIndicatorCssVars.d.ts +30 -32
- package/tabs/indicator/TabsIndicatorCssVars.js +31 -34
- package/tabs/indicator/TabsIndicatorCssVars.mjs +30 -33
- package/tabs/indicator/TabsIndicatorDataAttributes.d.mts +10 -12
- package/tabs/indicator/TabsIndicatorDataAttributes.d.ts +10 -12
- package/tabs/indicator/TabsIndicatorDataAttributes.js +11 -14
- package/tabs/indicator/TabsIndicatorDataAttributes.mjs +10 -13
- package/tabs/indicator/prehydrationScript.min.d.mts +1 -1
- package/tabs/indicator/prehydrationScript.min.d.ts +1 -1
- package/tabs/indicator/prehydrationScript.min.js +1 -1
- package/tabs/indicator/prehydrationScript.min.mjs +1 -1
- package/tabs/list/TabsListDataAttributes.d.mts +10 -12
- package/tabs/list/TabsListDataAttributes.d.ts +10 -12
- package/tabs/list/TabsListDataAttributes.js +11 -14
- package/tabs/list/TabsListDataAttributes.mjs +10 -13
- package/tabs/panel/TabsPanel.js +2 -1
- package/tabs/panel/TabsPanel.mjs +2 -1
- package/tabs/panel/TabsPanelDataAttributes.d.mts +26 -28
- package/tabs/panel/TabsPanelDataAttributes.d.ts +26 -28
- package/tabs/panel/TabsPanelDataAttributes.js +27 -30
- package/tabs/panel/TabsPanelDataAttributes.mjs +27 -29
- package/tabs/root/TabsRootDataAttributes.d.mts +10 -12
- package/tabs/root/TabsRootDataAttributes.d.ts +10 -12
- package/tabs/root/TabsRootDataAttributes.js +11 -14
- package/tabs/root/TabsRootDataAttributes.mjs +10 -13
- package/tabs/root/stateAttributesMapping.js +3 -1
- package/tabs/root/stateAttributesMapping.mjs +2 -1
- package/tabs/tab/TabsTabDataAttributes.d.mts +18 -20
- package/tabs/tab/TabsTabDataAttributes.d.ts +18 -20
- package/tabs/tab/TabsTabDataAttributes.js +19 -22
- package/tabs/tab/TabsTabDataAttributes.mjs +18 -21
- package/toast/action/ToastActionDataAttributes.d.mts +5 -7
- package/toast/action/ToastActionDataAttributes.d.ts +5 -7
- package/toast/action/ToastActionDataAttributes.js +6 -9
- package/toast/action/ToastActionDataAttributes.mjs +5 -8
- package/toast/arrow/ToastArrowDataAttributes.d.mts +14 -16
- package/toast/arrow/ToastArrowDataAttributes.d.ts +14 -16
- package/toast/arrow/ToastArrowDataAttributes.js +15 -18
- package/toast/arrow/ToastArrowDataAttributes.mjs +15 -17
- package/toast/close/ToastCloseDataAttributes.d.mts +5 -7
- package/toast/close/ToastCloseDataAttributes.d.ts +5 -7
- package/toast/close/ToastCloseDataAttributes.js +6 -9
- package/toast/close/ToastCloseDataAttributes.mjs +5 -8
- package/toast/content/ToastContentDataAttributes.d.mts +10 -12
- package/toast/content/ToastContentDataAttributes.d.ts +10 -12
- package/toast/content/ToastContentDataAttributes.js +11 -14
- package/toast/content/ToastContentDataAttributes.mjs +10 -13
- package/toast/createToastManager.d.mts +2 -2
- package/toast/createToastManager.d.ts +2 -2
- package/toast/createToastManager.js +2 -2
- package/toast/createToastManager.mjs +2 -2
- package/toast/description/ToastDescriptionDataAttributes.d.mts +5 -7
- package/toast/description/ToastDescriptionDataAttributes.d.ts +5 -7
- package/toast/description/ToastDescriptionDataAttributes.js +6 -9
- package/toast/description/ToastDescriptionDataAttributes.mjs +5 -8
- package/toast/positioner/ToastPositioner.js +2 -1
- package/toast/positioner/ToastPositioner.mjs +2 -1
- package/toast/positioner/ToastPositionerCssVars.d.mts +25 -27
- package/toast/positioner/ToastPositionerCssVars.d.ts +25 -27
- package/toast/positioner/ToastPositionerCssVars.js +26 -29
- package/toast/positioner/ToastPositionerCssVars.mjs +25 -28
- package/toast/positioner/ToastPositionerDataAttributes.d.mts +14 -16
- package/toast/positioner/ToastPositionerDataAttributes.d.ts +14 -16
- package/toast/positioner/ToastPositionerDataAttributes.js +15 -18
- package/toast/positioner/ToastPositionerDataAttributes.mjs +15 -17
- package/toast/provider/ToastProvider.js +1 -1
- package/toast/provider/ToastProvider.mjs +1 -1
- package/toast/root/ToastRoot.js +10 -7
- package/toast/root/ToastRoot.mjs +10 -7
- package/toast/root/ToastRootCssVars.d.mts +25 -27
- package/toast/root/ToastRootCssVars.d.ts +25 -27
- package/toast/root/ToastRootCssVars.js +26 -29
- package/toast/root/ToastRootCssVars.mjs +25 -28
- package/toast/root/ToastRootDataAttributes.d.mts +33 -35
- package/toast/root/ToastRootDataAttributes.d.ts +33 -35
- package/toast/root/ToastRootDataAttributes.js +34 -37
- package/toast/root/ToastRootDataAttributes.mjs +34 -36
- package/toast/store.d.mts +1 -1
- package/toast/store.d.ts +1 -1
- package/toast/store.js +9 -1
- package/toast/store.mjs +9 -1
- package/toast/title/ToastTitleDataAttributes.d.mts +5 -7
- package/toast/title/ToastTitleDataAttributes.d.ts +5 -7
- package/toast/title/ToastTitleDataAttributes.js +6 -9
- package/toast/title/ToastTitleDataAttributes.mjs +5 -8
- package/toast/useToastManager.d.mts +1 -1
- package/toast/useToastManager.d.ts +1 -1
- package/toast/viewport/ToastViewport.js +2 -1
- package/toast/viewport/ToastViewport.mjs +2 -1
- package/toast/viewport/ToastViewportCssVars.d.mts +5 -7
- package/toast/viewport/ToastViewportCssVars.d.ts +5 -7
- package/toast/viewport/ToastViewportCssVars.js +6 -9
- package/toast/viewport/ToastViewportCssVars.mjs +5 -8
- package/toast/viewport/ToastViewportDataAttributes.d.mts +5 -7
- package/toast/viewport/ToastViewportDataAttributes.d.ts +5 -7
- package/toast/viewport/ToastViewportDataAttributes.js +6 -9
- package/toast/viewport/ToastViewportDataAttributes.mjs +5 -8
- package/toggle/Toggle.js +1 -2
- package/toggle/Toggle.mjs +1 -2
- package/toggle/ToggleDataAttributes.d.mts +8 -10
- package/toggle/ToggleDataAttributes.d.ts +8 -10
- package/toggle/ToggleDataAttributes.js +9 -12
- package/toggle/ToggleDataAttributes.mjs +8 -11
- package/toggle-group/ToggleGroup.js +3 -1
- package/toggle-group/ToggleGroup.mjs +3 -1
- package/toggle-group/ToggleGroupDataAttributes.d.mts +13 -15
- package/toggle-group/ToggleGroupDataAttributes.d.ts +13 -15
- package/toggle-group/ToggleGroupDataAttributes.js +14 -17
- package/toggle-group/ToggleGroupDataAttributes.mjs +13 -16
- package/toolbar/button/ToolbarButtonDataAttributes.d.mts +13 -15
- package/toolbar/button/ToolbarButtonDataAttributes.d.ts +13 -15
- package/toolbar/button/ToolbarButtonDataAttributes.js +14 -17
- package/toolbar/button/ToolbarButtonDataAttributes.mjs +13 -16
- package/toolbar/group/ToolbarGroupDataAttributes.d.mts +9 -11
- package/toolbar/group/ToolbarGroupDataAttributes.d.ts +9 -11
- package/toolbar/group/ToolbarGroupDataAttributes.js +10 -13
- package/toolbar/group/ToolbarGroupDataAttributes.mjs +9 -12
- package/toolbar/input/ToolbarInputDataAttributes.d.mts +13 -15
- package/toolbar/input/ToolbarInputDataAttributes.d.ts +13 -15
- package/toolbar/input/ToolbarInputDataAttributes.js +14 -17
- package/toolbar/input/ToolbarInputDataAttributes.mjs +13 -16
- package/toolbar/link/ToolbarLinkDataAttributes.d.mts +5 -7
- package/toolbar/link/ToolbarLinkDataAttributes.d.ts +5 -7
- package/toolbar/link/ToolbarLinkDataAttributes.js +6 -9
- package/toolbar/link/ToolbarLinkDataAttributes.mjs +5 -8
- package/toolbar/root/ToolbarRootDataAttributes.d.mts +9 -11
- package/toolbar/root/ToolbarRootDataAttributes.d.ts +9 -11
- package/toolbar/root/ToolbarRootDataAttributes.js +10 -13
- package/toolbar/root/ToolbarRootDataAttributes.mjs +9 -12
- package/toolbar/separator/ToolbarSeparatorDataAttributes.d.mts +5 -7
- package/toolbar/separator/ToolbarSeparatorDataAttributes.d.ts +5 -7
- package/toolbar/separator/ToolbarSeparatorDataAttributes.js +6 -9
- package/toolbar/separator/ToolbarSeparatorDataAttributes.mjs +5 -8
- package/tooltip/arrow/TooltipArrowDataAttributes.d.mts +27 -29
- package/tooltip/arrow/TooltipArrowDataAttributes.d.ts +27 -29
- package/tooltip/arrow/TooltipArrowDataAttributes.js +28 -31
- package/tooltip/arrow/TooltipArrowDataAttributes.mjs +28 -30
- package/tooltip/popup/TooltipPopupDataAttributes.d.mts +31 -33
- package/tooltip/popup/TooltipPopupDataAttributes.d.ts +31 -33
- package/tooltip/popup/TooltipPopupDataAttributes.js +32 -35
- package/tooltip/popup/TooltipPopupDataAttributes.mjs +32 -34
- package/tooltip/positioner/TooltipPositionerCssVars.d.mts +37 -39
- package/tooltip/positioner/TooltipPositionerCssVars.d.ts +37 -39
- package/tooltip/positioner/TooltipPositionerCssVars.js +38 -41
- package/tooltip/positioner/TooltipPositionerCssVars.mjs +37 -40
- package/tooltip/positioner/TooltipPositionerDataAttributes.d.mts +22 -24
- package/tooltip/positioner/TooltipPositionerDataAttributes.d.ts +22 -24
- package/tooltip/positioner/TooltipPositionerDataAttributes.js +23 -26
- package/tooltip/positioner/TooltipPositionerDataAttributes.mjs +23 -25
- package/tooltip/root/TooltipRoot.d.mts +1 -1
- package/tooltip/root/TooltipRoot.d.ts +1 -1
- package/tooltip/store/TooltipStore.js +1 -2
- package/tooltip/store/TooltipStore.mjs +2 -3
- package/tooltip/trigger/TooltipTrigger.js +7 -5
- package/tooltip/trigger/TooltipTrigger.mjs +7 -5
- package/tooltip/trigger/TooltipTriggerDataAttributes.d.mts +8 -10
- package/tooltip/trigger/TooltipTriggerDataAttributes.d.ts +8 -10
- package/tooltip/trigger/TooltipTriggerDataAttributes.js +9 -12
- package/tooltip/trigger/TooltipTriggerDataAttributes.mjs +9 -11
- package/tooltip/viewport/TooltipViewportCssVars.d.mts +12 -14
- package/tooltip/viewport/TooltipViewportCssVars.d.ts +12 -14
- package/tooltip/viewport/TooltipViewportCssVars.js +13 -16
- package/tooltip/viewport/TooltipViewportCssVars.mjs +12 -15
- package/tooltip/viewport/TooltipViewportDataAttributes.d.mts +24 -26
- package/tooltip/viewport/TooltipViewportDataAttributes.d.ts +24 -26
- package/tooltip/viewport/TooltipViewportDataAttributes.js +25 -28
- package/tooltip/viewport/TooltipViewportDataAttributes.mjs +24 -27
- package/utils/CommonPopupCssVars.d.mts +12 -0
- package/utils/CommonPopupCssVars.d.ts +12 -0
- package/utils/CommonPopupCssVars.js +18 -0
- package/utils/CommonPopupCssVars.mjs +12 -0
- package/utils/CommonPopupDataAttributes.d.mts +30 -0
- package/utils/CommonPopupDataAttributes.d.ts +30 -0
- package/utils/CommonPopupDataAttributes.js +44 -0
- package/utils/CommonPopupDataAttributes.mjs +38 -0
- package/utils/CommonPositionerCssVars.d.mts +37 -0
- package/utils/CommonPositionerCssVars.d.ts +37 -0
- package/utils/CommonPositionerCssVars.js +43 -0
- package/utils/CommonPositionerCssVars.mjs +37 -0
- package/utils/CommonTriggerDataAttributes.d.mts +8 -0
- package/utils/CommonTriggerDataAttributes.d.ts +8 -0
- package/utils/CommonTriggerDataAttributes.js +15 -0
- package/utils/CommonTriggerDataAttributes.mjs +9 -0
- package/utils/CommonViewportDataAttributes.d.mts +7 -0
- package/utils/CommonViewportDataAttributes.d.ts +7 -0
- package/utils/CommonViewportDataAttributes.js +13 -0
- package/utils/CommonViewportDataAttributes.mjs +7 -0
- package/utils/NullStore.d.mts +2 -2
- package/utils/NullStore.d.ts +2 -2
- package/utils/collapsibleOpenStateMapping.js +6 -5
- package/utils/collapsibleOpenStateMapping.mjs +2 -2
- package/utils/getElementTransform.d.mts +12 -0
- package/utils/getElementTransform.d.ts +12 -0
- package/utils/getElementTransform.js +40 -0
- package/utils/getElementTransform.mjs +35 -0
- package/utils/popupStateMapping.d.mts +12 -51
- package/utils/popupStateMapping.d.ts +12 -51
- package/utils/popupStateMapping.js +11 -51
- package/utils/popupStateMapping.mjs +10 -54
- package/utils/popups/popupHandle.js +2 -2
- package/utils/popups/popupHandle.mjs +2 -2
- package/utils/popups/popupStoreUtils.d.mts +28 -11
- package/utils/popups/popupStoreUtils.d.ts +28 -11
- package/utils/popups/popupStoreUtils.js +82 -55
- package/utils/popups/popupStoreUtils.mjs +81 -54
- package/utils/popups/store.d.mts +7 -5
- package/utils/popups/store.d.ts +7 -5
- package/utils/popups/store.js +13 -18
- package/utils/popups/store.mjs +13 -17
- package/utils/scrollEdges.js +1 -1
- package/utils/scrollEdges.mjs +1 -1
- package/utils/styles.d.mts +1 -1
- package/utils/styles.d.ts +1 -1
- package/utils/usePopupAutoResize.js +10 -8
- package/utils/usePopupAutoResize.mjs +11 -8
- package/utils/usePopupViewport.js +5 -3
- package/utils/usePopupViewport.mjs +5 -3
- package/utils/useSwipeDismiss.d.mts +0 -5
- package/utils/useSwipeDismiss.d.ts +0 -5
- package/utils/useSwipeDismiss.js +14 -33
- package/utils/useSwipeDismiss.mjs +14 -32
- package/internals/areArraysEqual.d.mts +0 -3
- package/internals/areArraysEqual.d.ts +0 -3
- package/internals/areArraysEqual.js +0 -9
- package/internals/areArraysEqual.mjs +0 -3
- package/internals/clamp.d.mts +0 -1
- package/internals/clamp.d.ts +0 -1
- package/internals/clamp.js +0 -9
- package/internals/clamp.mjs +0 -3
- package/internals/shadowDom.d.mts +0 -3
- package/internals/shadowDom.d.ts +0 -3
- package/internals/shadowDom.js +0 -48
- package/internals/shadowDom.mjs +0 -40
- package/utils/formatNumber.d.mts +0 -3
- package/utils/formatNumber.d.ts +0 -3
- package/utils/formatNumber.js +0 -29
- package/utils/formatNumber.mjs +0 -21
- package/utils/stringifyLocale.d.mts +0 -1
- package/utils/stringifyLocale.d.ts +0 -1
- package/utils/stringifyLocale.js +0 -15
- package/utils/stringifyLocale.mjs +0 -9
- /package/drawer/content/{DrawerContentDataAttributes.d.mts → drawerContentAttribute.d.mts} +0 -0
- /package/drawer/content/{DrawerContentDataAttributes.d.ts → drawerContentAttribute.d.ts} +0 -0
- /package/drawer/content/{DrawerContentDataAttributes.js → drawerContentAttribute.js} +0 -0
- /package/drawer/content/{DrawerContentDataAttributes.mjs → drawerContentAttribute.mjs} +0 -0
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
6
|
Object.defineProperty(exports, "__esModule", {
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
8
9
|
exports.AriaCombobox = AriaCombobox;
|
|
10
|
+
var _formatErrorMessage2 = _interopRequireDefault(require("@base-ui/utils/formatErrorMessage"));
|
|
9
11
|
var React = _interopRequireWildcard(require("react"));
|
|
10
12
|
var _useControlled = require("@base-ui/utils/useControlled");
|
|
11
13
|
var _useIsoLayoutEffect = require("@base-ui/utils/useIsoLayoutEffect");
|
|
@@ -41,9 +43,9 @@ var _popups = require("../../utils/popups");
|
|
|
41
43
|
var _mergeProps = require("../../merge-props");
|
|
42
44
|
var _resolveValueLabel = require("../../internals/resolveValueLabel");
|
|
43
45
|
var _itemEquality = require("../../internals/itemEquality");
|
|
44
|
-
var _areArraysEqual = require("../../internals/areArraysEqual");
|
|
45
46
|
var _constants = require("./utils/constants");
|
|
46
47
|
var _DirectionContext = require("../../internals/direction-context/DirectionContext");
|
|
48
|
+
var _itemCollection = require("../items/itemCollection");
|
|
47
49
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
48
50
|
/**
|
|
49
51
|
* @internal
|
|
@@ -56,7 +58,7 @@ function AriaCombobox(props) {
|
|
|
56
58
|
defaultSelectedValue = null,
|
|
57
59
|
selectedValue: selectedValueProp,
|
|
58
60
|
onSelectedValueChange,
|
|
59
|
-
defaultInputValue
|
|
61
|
+
defaultInputValue,
|
|
60
62
|
inputValue: inputValueProp,
|
|
61
63
|
open: openProp,
|
|
62
64
|
defaultOpen = false,
|
|
@@ -69,15 +71,16 @@ function AriaCombobox(props) {
|
|
|
69
71
|
required = false,
|
|
70
72
|
inputRef: inputRefProp,
|
|
71
73
|
grid = false,
|
|
72
|
-
items,
|
|
74
|
+
items: itemsProp,
|
|
73
75
|
filteredItems: filteredItemsProp,
|
|
74
76
|
filter: filterProp,
|
|
77
|
+
filterQuery: filterQueryProp,
|
|
75
78
|
openOnInputClick = true,
|
|
76
79
|
autoHighlight = false,
|
|
77
80
|
keepHighlight = false,
|
|
78
81
|
highlightItemOnHover = true,
|
|
79
82
|
loopFocus = true,
|
|
80
|
-
itemToStringLabel,
|
|
83
|
+
itemToStringLabel: itemToStringLabelProp,
|
|
81
84
|
itemToStringValue,
|
|
82
85
|
isItemEqualToValue = _itemEquality.defaultItemEquality,
|
|
83
86
|
virtualized = false,
|
|
@@ -111,8 +114,76 @@ function AriaCombobox(props) {
|
|
|
111
114
|
const collatorFilter = (0, _useFilter.useCoreFilter)({
|
|
112
115
|
locale
|
|
113
116
|
});
|
|
117
|
+
|
|
118
|
+
// Plain items are arrays; normalized `createItems()` collections are objects.
|
|
119
|
+
const collection = Array.isArray(itemsProp) ? null : itemsProp;
|
|
120
|
+
if (collection && typeof collection.label !== 'function') {
|
|
121
|
+
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: the `items` prop received an object that is not a collection, ' + 'so its items cannot be read. Pass an array of items, an array of groups with items, ' + 'or the result of `createItems()`. ' + 'See https://base-ui.com/react/components/combobox#createitems' : (0, _formatErrorMessage2.default)(100));
|
|
122
|
+
}
|
|
123
|
+
const items = collection ? collection.data : itemsProp;
|
|
124
|
+
const itemToValue = collection?.value;
|
|
125
|
+
|
|
126
|
+
// A projected collection's items live in the source domain, not the selection-value domain the
|
|
127
|
+
// store matches against, so they are withheld from the store.
|
|
128
|
+
const storeItems = itemToValue ? undefined : items;
|
|
129
|
+
|
|
130
|
+
// The externally filtered items projected to their selection values, with a lookup back to the
|
|
131
|
+
// source items. Declared before `itemToStringLabel`, which resolves labels from it on the
|
|
132
|
+
// first render (initial input value).
|
|
133
|
+
const externalWindow = React.useMemo(() => {
|
|
134
|
+
if (!filteredItemsProp || !itemToValue) {
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
const flat = (0, _resolveValueLabel.flattenLeafItems)(filteredItemsProp);
|
|
138
|
+
const values = flat.map(itemToValue);
|
|
139
|
+
let valueToItem;
|
|
140
|
+
return {
|
|
141
|
+
values,
|
|
142
|
+
findItem(itemValue, isEqual) {
|
|
143
|
+
if (!valueToItem) {
|
|
144
|
+
valueToItem = new Map();
|
|
145
|
+
for (let i = 0; i < values.length; i += 1) {
|
|
146
|
+
if (!valueToItem.has(values[i])) {
|
|
147
|
+
valueToItem.set(values[i], flat[i]);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return (0, _itemCollection.findCollectionItem)(valueToItem, itemValue, isEqual);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
}, [filteredItemsProp, itemToValue]);
|
|
155
|
+
|
|
156
|
+
// Labels selection values from current props only: collection data first, then the current
|
|
157
|
+
// external window, then the prop. Nothing from a past window is remembered — keeping a value
|
|
158
|
+
// resolvable over time means keeping its item in the collection's data.
|
|
159
|
+
const itemToStringLabel = React.useMemo(() => {
|
|
160
|
+
if (!collection) {
|
|
161
|
+
return itemToStringLabelProp;
|
|
162
|
+
}
|
|
163
|
+
return itemValue => {
|
|
164
|
+
return collection.label(itemValue, isItemEqualToValue, unresolvedValue => {
|
|
165
|
+
const externalItem = externalWindow?.findItem(unresolvedValue, isItemEqualToValue);
|
|
166
|
+
if (externalItem != null) {
|
|
167
|
+
return collection.itemLabel(externalItem);
|
|
168
|
+
}
|
|
169
|
+
return (0, _resolveValueLabel.stringifyAsLabel)(unresolvedValue, itemToStringLabelProp);
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
}, [collection, itemToStringLabelProp, externalWindow, isItemEqualToValue]);
|
|
173
|
+
const filterItemToString = React.useMemo(() => {
|
|
174
|
+
if (!collection) {
|
|
175
|
+
return itemToStringLabelProp;
|
|
176
|
+
}
|
|
177
|
+
return Object.assign(item => collection.itemLabel(item), {
|
|
178
|
+
selected: value => (0, _resolveValueLabel.stringifyAsLabel)(value, itemToStringLabel)
|
|
179
|
+
});
|
|
180
|
+
}, [collection, itemToStringLabel, itemToStringLabelProp]);
|
|
181
|
+
function stringifyValueLabel(item) {
|
|
182
|
+
return (0, _resolveValueLabel.stringifyAsLabel)(item, itemToStringLabel);
|
|
183
|
+
}
|
|
114
184
|
const [queryChangedAfterOpen, setQueryChangedAfterOpen] = React.useState(false);
|
|
115
185
|
const [closeQuery, setCloseQuery] = React.useState(null);
|
|
186
|
+
const previousCloseQueryRef = React.useRef(closeQuery);
|
|
116
187
|
const listRef = React.useRef([]);
|
|
117
188
|
const labelsRef = React.useRef([]);
|
|
118
189
|
const popupRef = React.useRef(null);
|
|
@@ -141,7 +212,7 @@ function AriaCombobox(props) {
|
|
|
141
212
|
const name = fieldName ?? nameProp;
|
|
142
213
|
const multiple = selectionMode === 'multiple';
|
|
143
214
|
const single = selectionMode === 'single';
|
|
144
|
-
const hasInputValue = inputValueProp !== undefined ||
|
|
215
|
+
const hasInputValue = inputValueProp !== undefined || defaultInputValue !== undefined;
|
|
145
216
|
const hasItems = items !== undefined;
|
|
146
217
|
const hasFilteredItemsProp = filteredItemsProp !== undefined;
|
|
147
218
|
let autoHighlightMode;
|
|
@@ -165,17 +236,17 @@ function AriaCombobox(props) {
|
|
|
165
236
|
}
|
|
166
237
|
// `shouldBypassFiltering` already empties the query whenever a single selection's label
|
|
167
238
|
// matches it exactly, so the filter never needs a selection-aware variant here.
|
|
168
|
-
return (0, _utils2.createCollatorItemFilter)(collatorFilter,
|
|
169
|
-
}, [filterProp, collatorFilter,
|
|
239
|
+
return (0, _utils2.createCollatorItemFilter)(collatorFilter, filterItemToString);
|
|
240
|
+
}, [filterProp, collatorFilter, filterItemToString]);
|
|
170
241
|
|
|
171
242
|
// If neither inputValue nor defaultInputValue are provided, derive it from the
|
|
172
243
|
// selected value for single mode so the input reflects the selection on mount.
|
|
173
244
|
const initialDefaultInputValue = (0, _useRefWithInit.useRefWithInit)(() => {
|
|
174
245
|
if (hasInputValue) {
|
|
175
|
-
return
|
|
246
|
+
return defaultInputValue ?? '';
|
|
176
247
|
}
|
|
177
248
|
if (single) {
|
|
178
|
-
return (
|
|
249
|
+
return stringifyValueLabel(selectedValue);
|
|
179
250
|
}
|
|
180
251
|
return '';
|
|
181
252
|
}).current;
|
|
@@ -192,20 +263,12 @@ function AriaCombobox(props) {
|
|
|
192
263
|
state: 'open'
|
|
193
264
|
});
|
|
194
265
|
const isGrouped = (0, _resolveValueLabel.isGroupedItems)(items);
|
|
195
|
-
const query = closeQuery
|
|
196
|
-
const selectedLabelString = single ? (
|
|
266
|
+
const query = !open && closeQuery !== null ? closeQuery : String(inputValue).trim();
|
|
267
|
+
const selectedLabelString = single ? stringifyValueLabel(selectedValue) : '';
|
|
197
268
|
const shouldBypassFiltering = single && !queryChangedAfterOpen && query !== '' && selectedLabelString.length === query.length && collatorFilter.contains(selectedLabelString, query);
|
|
198
|
-
const filterQuery = shouldBypassFiltering ? '' : query;
|
|
199
|
-
const shouldIgnoreExternalFiltering = hasItems && hasFilteredItemsProp && shouldBypassFiltering;
|
|
200
|
-
const flatItems = React.useMemo(() =>
|
|
201
|
-
if (!items) {
|
|
202
|
-
return _empty.EMPTY_ARRAY;
|
|
203
|
-
}
|
|
204
|
-
if (isGrouped) {
|
|
205
|
-
return items.flatMap(group => group.items);
|
|
206
|
-
}
|
|
207
|
-
return items;
|
|
208
|
-
}, [items, isGrouped]);
|
|
269
|
+
const filterQuery = shouldBypassFiltering ? '' : filterQueryProp ?? query;
|
|
270
|
+
const shouldIgnoreExternalFiltering = hasItems && hasFilteredItemsProp && shouldBypassFiltering && (!collection || collection.hasValue(selectedValue, isItemEqualToValue));
|
|
271
|
+
const flatItems = React.useMemo(() => items ? (0, _resolveValueLabel.flattenLeafItems)(items) : _empty.EMPTY_ARRAY, [items]);
|
|
209
272
|
const filteredItems = React.useMemo(() => {
|
|
210
273
|
if (filteredItemsProp && !shouldIgnoreExternalFiltering) {
|
|
211
274
|
return filteredItemsProp;
|
|
@@ -228,7 +291,7 @@ function AriaCombobox(props) {
|
|
|
228
291
|
if (itemsToTake.length >= remainingLimit) {
|
|
229
292
|
break;
|
|
230
293
|
}
|
|
231
|
-
if (filter(item, filterQuery,
|
|
294
|
+
if (filter(item, filterQuery, filterItemToString)) {
|
|
232
295
|
itemsToTake.push(item);
|
|
233
296
|
}
|
|
234
297
|
}
|
|
@@ -247,7 +310,7 @@ function AriaCombobox(props) {
|
|
|
247
310
|
if (filterQuery === '') {
|
|
248
311
|
return limit > -1 ? flatItems.slice(0, limit) :
|
|
249
312
|
// The cast here is done as `flatItems` is readonly.
|
|
250
|
-
// valuesRef.current, a mutable ref, can be set to `
|
|
313
|
+
// valuesRef.current, a mutable ref, can be set to `flatFilteredValues`, which may
|
|
251
314
|
// reference this exact readonly value, creating a mutation risk.
|
|
252
315
|
// However, <Combobox.Item> can never mutate this value as the mutating effect
|
|
253
316
|
// bails early when `items` is provided, and this is only ever returned
|
|
@@ -259,19 +322,25 @@ function AriaCombobox(props) {
|
|
|
259
322
|
if (limit > -1 && limitedItems.length >= limit) {
|
|
260
323
|
break;
|
|
261
324
|
}
|
|
262
|
-
if (filter(item, filterQuery,
|
|
325
|
+
if (filter(item, filterQuery, filterItemToString)) {
|
|
263
326
|
limitedItems.push(item);
|
|
264
327
|
}
|
|
265
328
|
}
|
|
266
329
|
return limitedItems;
|
|
267
|
-
}, [filteredItemsProp, shouldIgnoreExternalFiltering, items, isGrouped, filterQuery, limit, filter,
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
330
|
+
}, [filteredItemsProp, shouldIgnoreExternalFiltering, items, isGrouped, filterQuery, limit, filter, filterItemToString, flatItems]);
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* The filtered items flattened across groups and projected to their selection values.
|
|
334
|
+
*/
|
|
335
|
+
const flatFilteredValues = React.useMemo(() => {
|
|
336
|
+
if (externalWindow && filteredItems === filteredItemsProp) {
|
|
337
|
+
return externalWindow.values;
|
|
272
338
|
}
|
|
273
|
-
|
|
274
|
-
|
|
339
|
+
// Explicit type argument: inferring it from a union of both shapes resolves `Item` to
|
|
340
|
+
// `Group<Item>`, which tsc rejects and tsgo does not.
|
|
341
|
+
const flat = (0, _resolveValueLabel.flattenLeafItems)(filteredItems);
|
|
342
|
+
return itemToValue ? flat.map(item => itemToValue(item)) : flat;
|
|
343
|
+
}, [filteredItems, filteredItemsProp, externalWindow, itemToValue]);
|
|
275
344
|
const store = (0, _useRefWithInit.useRefWithInit)(() => {
|
|
276
345
|
// An inline list open on the first render never gets a closed pass of the closed-state
|
|
277
346
|
// sync effect below, and `items`-prop lists don't self-register their index the way
|
|
@@ -281,28 +350,15 @@ function AriaCombobox(props) {
|
|
|
281
350
|
// doesn't move an existing highlight or scroll the list away.
|
|
282
351
|
let initialSelectedIndex = null;
|
|
283
352
|
if (inlineProp && open && hasItems && selectionMode !== 'none') {
|
|
284
|
-
initialSelectedIndex = (0, _itemEquality.findSelectionIndex)(
|
|
353
|
+
initialSelectedIndex = (0, _itemEquality.findSelectionIndex)(flatFilteredValues, selectedValue, isItemEqualToValue, multiple);
|
|
285
354
|
}
|
|
286
|
-
return new _store.
|
|
355
|
+
return new _store.ReactStore({
|
|
287
356
|
id,
|
|
288
357
|
labelId: undefined,
|
|
289
358
|
selectedValue,
|
|
290
359
|
open,
|
|
291
|
-
items,
|
|
360
|
+
items: storeItems,
|
|
292
361
|
selectionMode,
|
|
293
|
-
listRef,
|
|
294
|
-
labelsRef,
|
|
295
|
-
popupRef,
|
|
296
|
-
emptyRef,
|
|
297
|
-
inputRef,
|
|
298
|
-
startDismissRef,
|
|
299
|
-
endDismissRef,
|
|
300
|
-
keyboardActiveRef,
|
|
301
|
-
chipsContainerRef,
|
|
302
|
-
clearRef,
|
|
303
|
-
valuesRef,
|
|
304
|
-
pointerDownItemRef,
|
|
305
|
-
selectionEventRef,
|
|
306
362
|
name,
|
|
307
363
|
form,
|
|
308
364
|
disabled,
|
|
@@ -339,7 +395,8 @@ function AriaCombobox(props) {
|
|
|
339
395
|
inputInsidePopup: true,
|
|
340
396
|
// Avoid duplicate names in the server HTML. Popup inputs aren't rendered
|
|
341
397
|
// until after hydration, so the hidden input takes over then if needed.
|
|
342
|
-
inputOwnsFormValue: selectionMode === 'none'
|
|
398
|
+
inputOwnsFormValue: selectionMode === 'none'
|
|
399
|
+
}, {
|
|
343
400
|
// Placeholder callbacks replaced on first render
|
|
344
401
|
onOpenChangeComplete: _noop.NOOP,
|
|
345
402
|
setOpen: _noop.NOOP,
|
|
@@ -348,8 +405,21 @@ function AriaCombobox(props) {
|
|
|
348
405
|
setIndices: _noop.NOOP,
|
|
349
406
|
handleSelection: _noop.NOOP,
|
|
350
407
|
forceMount: _noop.NOOP,
|
|
351
|
-
requestSubmit: _noop.NOOP
|
|
352
|
-
|
|
408
|
+
requestSubmit: _noop.NOOP,
|
|
409
|
+
listRef,
|
|
410
|
+
labelsRef,
|
|
411
|
+
popupRef,
|
|
412
|
+
emptyRef,
|
|
413
|
+
inputRef,
|
|
414
|
+
startDismissRef,
|
|
415
|
+
endDismissRef,
|
|
416
|
+
keyboardActiveRef,
|
|
417
|
+
chipsContainerRef,
|
|
418
|
+
clearRef,
|
|
419
|
+
valuesRef,
|
|
420
|
+
pointerDownItemRef,
|
|
421
|
+
selectionEventRef
|
|
422
|
+
}, _store2.selectors);
|
|
353
423
|
}).current;
|
|
354
424
|
const fieldRawValue = selectionMode === 'none' ? inputValue : selectedValue;
|
|
355
425
|
const fieldStringValue = React.useMemo(() => {
|
|
@@ -363,16 +433,17 @@ function AriaCombobox(props) {
|
|
|
363
433
|
}, [fieldRawValue, itemToStringValue, selectionMode, selectedValue]);
|
|
364
434
|
const onItemHighlighted = (0, _useStableCallback.useStableCallback)(onItemHighlightedProp);
|
|
365
435
|
const onOpenChangeComplete = (0, _useStableCallback.useStableCallback)(onOpenChangeCompleteProp);
|
|
366
|
-
const activeIndex =
|
|
367
|
-
const selectedIndex =
|
|
368
|
-
const positionerElement =
|
|
369
|
-
const listElement =
|
|
370
|
-
const triggerElement =
|
|
371
|
-
const inputElement =
|
|
372
|
-
const inputGroupElement =
|
|
373
|
-
const inline =
|
|
374
|
-
const inputInsidePopup =
|
|
375
|
-
const inputOwnsFormValue =
|
|
436
|
+
const activeIndex = store.useState('activeIndex');
|
|
437
|
+
const selectedIndex = store.useState('selectedIndex');
|
|
438
|
+
const positionerElement = store.useState('positionerElement');
|
|
439
|
+
const listElement = store.useState('listElement');
|
|
440
|
+
const triggerElement = store.useState('triggerElement');
|
|
441
|
+
const inputElement = store.useState('inputElement');
|
|
442
|
+
const inputGroupElement = store.useState('inputGroupElement');
|
|
443
|
+
const inline = store.useState('inline');
|
|
444
|
+
const inputInsidePopup = store.useState('inputInsidePopup');
|
|
445
|
+
const inputOwnsFormValue = store.useState('inputOwnsFormValue');
|
|
446
|
+
const inputMatchesSelectedValue = single && !inputInsidePopup && inputValue === selectedLabelString;
|
|
376
447
|
const triggerRef = (0, _useValueAsRef.useValueAsRef)(triggerElement);
|
|
377
448
|
const {
|
|
378
449
|
mounted,
|
|
@@ -388,7 +459,7 @@ function AriaCombobox(props) {
|
|
|
388
459
|
const forceMount = (0, _useStableCallback.useStableCallback)(() => {
|
|
389
460
|
if (items) {
|
|
390
461
|
// Ensure typeahead works on a closed list.
|
|
391
|
-
labelsRef.current =
|
|
462
|
+
labelsRef.current = flatFilteredValues.map(stringifyValueLabel);
|
|
392
463
|
} else {
|
|
393
464
|
store.set('forceMounted', true);
|
|
394
465
|
}
|
|
@@ -415,7 +486,14 @@ function AriaCombobox(props) {
|
|
|
415
486
|
}));
|
|
416
487
|
});
|
|
417
488
|
const setIndices = (0, _useStableCallback.useStableCallback)(options => {
|
|
418
|
-
|
|
489
|
+
const update = {};
|
|
490
|
+
if (options.activeIndex !== undefined) {
|
|
491
|
+
update.activeIndex = options.activeIndex;
|
|
492
|
+
}
|
|
493
|
+
if (options.selectedIndex !== undefined) {
|
|
494
|
+
update.selectedIndex = options.selectedIndex;
|
|
495
|
+
}
|
|
496
|
+
store.update(update);
|
|
419
497
|
const activeIndexOption = options.activeIndex;
|
|
420
498
|
if (activeIndexOption === undefined) {
|
|
421
499
|
return;
|
|
@@ -428,12 +506,14 @@ function AriaCombobox(props) {
|
|
|
428
506
|
}
|
|
429
507
|
});
|
|
430
508
|
const setInputValue = (0, _useStableCallback.useStableCallback)((next, eventDetails) => {
|
|
431
|
-
hadInputClearRef.current = eventDetails.reason === _reasons.REASONS.inputClear;
|
|
432
509
|
props.onInputValueChange?.(next, eventDetails);
|
|
433
510
|
if (eventDetails.isCanceled) {
|
|
434
511
|
return;
|
|
435
512
|
}
|
|
436
513
|
|
|
514
|
+
// A canceled selection clear must not suppress close-completion cleanup.
|
|
515
|
+
hadInputClearRef.current = eventDetails.reason === _reasons.REASONS.inputClear;
|
|
516
|
+
|
|
437
517
|
// If user is typing, ensure we don't auto-highlight on open due to a race
|
|
438
518
|
// with the post-open effect that sets this flag.
|
|
439
519
|
if (eventDetails.reason === _reasons.REASONS.inputChange) {
|
|
@@ -488,6 +568,20 @@ function AriaCombobox(props) {
|
|
|
488
568
|
}
|
|
489
569
|
setInputValueUnwrapped(next);
|
|
490
570
|
});
|
|
571
|
+
const handleInterruptedReopen = (0, _useStableCallback.useStableCallback)(isInputChange => {
|
|
572
|
+
// Preserve values supplied with the reopen rather than owned by the interrupted close.
|
|
573
|
+
const clearsPendingInput = !isInputChange && inputInsidePopup && !inline && inputValue !== '' && (String(inputValue).trim() === closeQuery || inputValue === selectedLabelString);
|
|
574
|
+
|
|
575
|
+
// Keep the flag while a visible filter survives so the `items` sync cannot overwrite it.
|
|
576
|
+
if (!isInputChange && (clearsPendingInput || inputValue === '' || inputMatchesSelectedValue)) {
|
|
577
|
+
setQueryChangedAfterOpen(false);
|
|
578
|
+
}
|
|
579
|
+
setCloseQuery(null);
|
|
580
|
+
if (clearsPendingInput) {
|
|
581
|
+
// Cleanup clears omit the selection flag and reopening gesture.
|
|
582
|
+
setInputValue('', (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.inputClear));
|
|
583
|
+
}
|
|
584
|
+
});
|
|
491
585
|
const setOpen = (0, _useStableCallback.useStableCallback)((nextOpen, eventDetails) => {
|
|
492
586
|
if (open === nextOpen) {
|
|
493
587
|
return;
|
|
@@ -496,22 +590,17 @@ function AriaCombobox(props) {
|
|
|
496
590
|
// If the `Empty` component is not used, the positioner or popup should be hidden
|
|
497
591
|
// with CSS. In this case, allow the Escape key to bubble to close a parent popup
|
|
498
592
|
// if there are no items to show.
|
|
499
|
-
if (eventDetails.reason === _reasons.REASONS.escapeKey && hasItems &&
|
|
593
|
+
if (eventDetails.reason === _reasons.REASONS.escapeKey && hasItems && flatFilteredValues.length === 0 && !emptyRef.current) {
|
|
500
594
|
eventDetails.allowPropagation();
|
|
501
595
|
}
|
|
502
596
|
props.onOpenChange?.(nextOpen, eventDetails);
|
|
503
597
|
if (eventDetails.isCanceled) {
|
|
504
598
|
return;
|
|
505
599
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
setQueryChangedAfterOpen(false);
|
|
511
|
-
setCloseQuery(null);
|
|
512
|
-
if (inputValue !== '' && eventDetails.reason !== _reasons.REASONS.inputChange) {
|
|
513
|
-
setInputValue('', (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.inputClear, eventDetails.event));
|
|
514
|
-
}
|
|
600
|
+
if (nextOpen && closeQuery !== null) {
|
|
601
|
+
// `ComboboxInput` calls `setInputValue` before `setOpen`, so on an input-change reopen
|
|
602
|
+
// `inputValue` is still the pre-keystroke value and the typed filter always survives.
|
|
603
|
+
handleInterruptedReopen(eventDetails.reason === _reasons.REASONS.inputChange);
|
|
515
604
|
}
|
|
516
605
|
if (!nextOpen && queryChangedAfterOpen) {
|
|
517
606
|
if (single) {
|
|
@@ -537,7 +626,9 @@ function AriaCombobox(props) {
|
|
|
537
626
|
// if the input is outside the popup. When the input is inside the popup, defer the clear until
|
|
538
627
|
// unmount so the filtered list doesn't flash to unfiltered during the exit animation.
|
|
539
628
|
if (!inputInsidePopup || inline) {
|
|
540
|
-
setInputValue('', (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.inputClear, eventDetails.event
|
|
629
|
+
setInputValue('', (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.inputClear, eventDetails.event, undefined, {
|
|
630
|
+
isItemPress: eventDetails.reason === _reasons.REASONS.itemPress
|
|
631
|
+
}));
|
|
541
632
|
}
|
|
542
633
|
}
|
|
543
634
|
}
|
|
@@ -561,7 +652,7 @@ function AriaCombobox(props) {
|
|
|
561
652
|
setSelectedValueUnwrapped(nextValue);
|
|
562
653
|
const shouldFillInput = selectionMode === 'none' && popupRef.current && fillInputOnItemPress || single && !store.state.inputInsidePopup;
|
|
563
654
|
if (shouldFillInput) {
|
|
564
|
-
setInputValue((
|
|
655
|
+
setInputValue(stringifyValueLabel(nextValue), (0, _createBaseUIEventDetails.createChangeEventDetails)(eventDetails.reason, eventDetails.event));
|
|
565
656
|
}
|
|
566
657
|
});
|
|
567
658
|
const handleSelection = (0, _useStableCallback.useStableCallback)((event, itemValue) => {
|
|
@@ -591,7 +682,15 @@ function AriaCombobox(props) {
|
|
|
591
682
|
return;
|
|
592
683
|
}
|
|
593
684
|
if (store.state.inputInsidePopup) {
|
|
594
|
-
setInputValue('', (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.inputClear, eventDetails.event
|
|
685
|
+
setInputValue('', (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.inputClear, eventDetails.event, undefined, {
|
|
686
|
+
isItemPress: true
|
|
687
|
+
}));
|
|
688
|
+
// A newly selected item stays highlighted through the clear; a deselection
|
|
689
|
+
// falls back to the standard selection anchor.
|
|
690
|
+
const pendingHighlight = pendingQueryHighlightRef.current;
|
|
691
|
+
if (pendingHighlight && !isCurrentlySelected) {
|
|
692
|
+
pendingHighlight.toggledValue = itemValue;
|
|
693
|
+
}
|
|
595
694
|
} else {
|
|
596
695
|
setOpen(false, eventDetails);
|
|
597
696
|
}
|
|
@@ -641,7 +740,7 @@ function AriaCombobox(props) {
|
|
|
641
740
|
setInputValue('', (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.inputClear));
|
|
642
741
|
}
|
|
643
742
|
} else {
|
|
644
|
-
const stringVal = (
|
|
743
|
+
const stringVal = stringifyValueLabel(selectedValue);
|
|
645
744
|
if (inputRef.current && inputRef.current.value !== stringVal) {
|
|
646
745
|
// If no selection was made, treat this as clearing the typed filter.
|
|
647
746
|
const reason = stringVal === '' ? _reasons.REASONS.inputClear : _reasons.REASONS.none;
|
|
@@ -676,14 +775,21 @@ function AriaCombobox(props) {
|
|
|
676
775
|
React.useImperativeHandle(props.actionsRef, () => ({
|
|
677
776
|
unmount: handleUnmount
|
|
678
777
|
}), [handleUnmount]);
|
|
679
|
-
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(function
|
|
680
|
-
|
|
778
|
+
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(function syncSelectedIndex() {
|
|
779
|
+
const closeQueryReleased = previousCloseQueryRef.current !== null && closeQuery === null;
|
|
780
|
+
previousCloseQueryRef.current = closeQuery;
|
|
781
|
+
|
|
782
|
+
// Closing indexes against the frozen filtered list. Reopening releases that query, so its
|
|
783
|
+
// rendered coordinates must be synchronized again even though the popup is already open.
|
|
784
|
+
if (open && (!closeQueryReleased || !hasItems)) {
|
|
681
785
|
return;
|
|
682
786
|
}
|
|
683
787
|
|
|
684
788
|
// State-driven (not tied to the internal event path) so controlled closes
|
|
685
789
|
// also clear a pointerdown that never received a matching item mouseup.
|
|
686
|
-
|
|
790
|
+
if (!open) {
|
|
791
|
+
pointerDownItemRef.current = null;
|
|
792
|
+
}
|
|
687
793
|
if (selectionMode === 'none') {
|
|
688
794
|
return;
|
|
689
795
|
}
|
|
@@ -694,17 +800,18 @@ function AriaCombobox(props) {
|
|
|
694
800
|
// items re-assert the index themselves when their registration moves; when
|
|
695
801
|
// nothing is mounted the lookup resolves to `null` and each item re-registers
|
|
696
802
|
// the index on the next open.
|
|
697
|
-
|
|
803
|
+
// Keep the selected index in the coordinates of the list that is actually rendered.
|
|
804
|
+
const registry = hasItems ? flatFilteredValues : valuesRef.current;
|
|
698
805
|
setIndices({
|
|
699
806
|
selectedIndex: (0, _itemEquality.findSelectionIndex)(registry, selectedValue, isItemEqualToValue, multiple)
|
|
700
807
|
});
|
|
701
|
-
}, [open, selectedValue, selectionMode, multiple, hasItems,
|
|
808
|
+
}, [open, closeQuery, selectedValue, selectionMode, multiple, hasItems, flatFilteredValues, isItemEqualToValue, setIndices]);
|
|
702
809
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
703
810
|
if (items) {
|
|
704
|
-
valuesRef.current =
|
|
705
|
-
listRef.current.length =
|
|
811
|
+
valuesRef.current = flatFilteredValues;
|
|
812
|
+
listRef.current.length = flatFilteredValues.length;
|
|
706
813
|
}
|
|
707
|
-
}, [items,
|
|
814
|
+
}, [items, flatFilteredValues]);
|
|
708
815
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
709
816
|
const pendingHighlight = pendingQueryHighlightRef.current;
|
|
710
817
|
if (pendingHighlight) {
|
|
@@ -741,13 +848,18 @@ function AriaCombobox(props) {
|
|
|
741
848
|
// re-running this effect on every render.
|
|
742
849
|
const currentSelectedValue = store.state.selectedValue;
|
|
743
850
|
const isMultiple = store.state.selectionMode === 'multiple';
|
|
744
|
-
const
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
// A selection that is no longer in
|
|
749
|
-
// leaving it on whichever item
|
|
750
|
-
|
|
851
|
+
const hasSelection = isMultiple && Array.isArray(currentSelectedValue) ? currentSelectedValue.length > 0 : store.state.selectionMode !== 'none' && currentSelectedValue != null;
|
|
852
|
+
if (hasSelection) {
|
|
853
|
+
const registry = hasItems || hasFilteredItemsProp ? flatFilteredValues : valuesRef.current;
|
|
854
|
+
// A selection-driven clear keeps the just-selected item highlighted;
|
|
855
|
+
// otherwise return to the open anchor. A selection that is no longer in
|
|
856
|
+
// the list drops the highlight rather than leaving it on whichever item
|
|
857
|
+
// now occupies that index.
|
|
858
|
+
// `findItemIndex` resolves to -1 when no value was toggled.
|
|
859
|
+
const toggledIndex = (0, _itemEquality.findItemIndex)(registry, pendingHighlight.toggledValue, store.state.isItemEqualToValue);
|
|
860
|
+
store.set('activeIndex', toggledIndex !== -1 ? toggledIndex : (0, _itemEquality.findSelectionIndex)(registry, currentSelectedValue, store.state.isItemEqualToValue, isMultiple));
|
|
861
|
+
} else if (clearedBySelection) {
|
|
862
|
+
store.set('activeIndex', null);
|
|
751
863
|
} else if (autoHighlightMode === 'always') {
|
|
752
864
|
store.set('activeIndex', 0);
|
|
753
865
|
}
|
|
@@ -758,8 +870,8 @@ function AriaCombobox(props) {
|
|
|
758
870
|
if (!open && !inline) {
|
|
759
871
|
return;
|
|
760
872
|
}
|
|
761
|
-
const
|
|
762
|
-
const candidateItems =
|
|
873
|
+
const shouldUseFlatFilteredValues = hasItems || hasFilteredItemsProp;
|
|
874
|
+
const candidateItems = shouldUseFlatFilteredValues ? flatFilteredValues : valuesRef.current;
|
|
763
875
|
const storeActiveIndex = store.state.activeIndex;
|
|
764
876
|
if (storeActiveIndex == null) {
|
|
765
877
|
if (autoHighlightMode === 'always' && candidateItems.length > 0) {
|
|
@@ -780,7 +892,7 @@ function AriaCombobox(props) {
|
|
|
780
892
|
if (lastHighlightRef.current.index !== storeActiveIndex || !isSameItem) {
|
|
781
893
|
emitHighlight(itemValue, storeActiveIndex, _reasons.REASONS.none);
|
|
782
894
|
}
|
|
783
|
-
}, [activeIndex, autoHighlightMode, emitHighlight, hasFilteredItemsProp, hasItems,
|
|
895
|
+
}, [activeIndex, autoHighlightMode, emitHighlight, hasFilteredItemsProp, hasItems, flatFilteredValues, inline, open, store,
|
|
784
896
|
// Reruns the effect when the query changes without affecting the deps above, such as
|
|
785
897
|
// clearing the input when no items are filtered out (individually rendered items).
|
|
786
898
|
inputValue]);
|
|
@@ -795,56 +907,67 @@ function AriaCombobox(props) {
|
|
|
795
907
|
// Ensures that the active index is not set to 0 when the list is empty.
|
|
796
908
|
// This avoids needing to press ArrowDown twice under certain conditions.
|
|
797
909
|
React.useEffect(() => {
|
|
798
|
-
if (hasItems && autoHighlightMode &&
|
|
910
|
+
if (hasItems && autoHighlightMode && flatFilteredValues.length === 0) {
|
|
799
911
|
setIndices({
|
|
800
912
|
activeIndex: null
|
|
801
913
|
});
|
|
802
914
|
}
|
|
803
|
-
}, [hasItems, autoHighlightMode,
|
|
804
|
-
function
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
return !(0, _areArraysEqual.areArraysEqual)(value, initialValue, (itemValue, initialItemValue) => (0, _itemEquality.compareItemEquality)(itemValue, initialItemValue, isItemEqualToValue));
|
|
915
|
+
}, [hasItems, autoHighlightMode, flatFilteredValues.length, setIndices]);
|
|
916
|
+
function handleQueryChanged() {
|
|
917
|
+
if (open && query !== '' && query !== String(initialDefaultInputValue) && !inputMatchesSelectedValue) {
|
|
918
|
+
setQueryChangedAfterOpen(true);
|
|
808
919
|
}
|
|
809
|
-
return value !== initialValue;
|
|
810
920
|
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
921
|
+
function handleOpenChanged() {
|
|
922
|
+
// A controlled `open` prop can interrupt the close without calling `setOpen`.
|
|
923
|
+
if (open && closeQuery !== null) {
|
|
924
|
+
handleInterruptedReopen(false);
|
|
814
925
|
}
|
|
815
|
-
|
|
816
|
-
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
// These sync triggers can run in the same commit while still seeing the pre-commit `inputValue`.
|
|
929
|
+
// This render-scoped flag prevents duplicate callbacks and resets so canceled writes can retry.
|
|
930
|
+
let syncedSelectedLabel = false;
|
|
817
931
|
function syncInputToSelectedLabel() {
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
setInputValue(
|
|
932
|
+
if (!syncedSelectedLabel && inputValue !== selectedLabelString) {
|
|
933
|
+
syncedSelectedLabel = true;
|
|
934
|
+
setInputValue(selectedLabelString, (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.none));
|
|
821
935
|
}
|
|
822
936
|
}
|
|
823
|
-
|
|
937
|
+
function handleSelectedValueChanged() {
|
|
824
938
|
if (selectionMode === 'none') {
|
|
825
939
|
return;
|
|
826
940
|
}
|
|
827
941
|
clearErrors(name);
|
|
828
|
-
setDirty(isSelectedValueDirty(selectedValue));
|
|
942
|
+
setDirty((0, _itemEquality.isSelectedValueDirty)(selectedValue, validityData.initialValue, isItemEqualToValue));
|
|
829
943
|
validation.change(selectedValue);
|
|
830
944
|
if (single && !hasInputValue && !inputInsidePopup) {
|
|
831
945
|
syncInputToSelectedLabel();
|
|
832
946
|
}
|
|
833
|
-
}
|
|
834
|
-
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
// The label catches accessor changes while the items identity restores the selected label after
|
|
950
|
+
// a one-step input clear followed by a data reload. The shared sync prevents duplicate writes
|
|
951
|
+
// when both change in the same commit.
|
|
952
|
+
function syncInputAfterItemsOrLabelChange() {
|
|
953
|
+
if (single && !hasInputValue && !inputInsidePopup && !queryChangedAfterOpen) {
|
|
954
|
+
syncInputToSelectedLabel();
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
function handleInputValueChanged() {
|
|
835
958
|
if (selectionMode !== 'none') {
|
|
836
959
|
return;
|
|
837
960
|
}
|
|
838
961
|
clearErrors(name);
|
|
839
962
|
setDirty(inputValue !== validityData.initialValue);
|
|
840
963
|
validation.change(inputValue);
|
|
841
|
-
}
|
|
842
|
-
(0, _useValueChanged.useValueChanged)(
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
964
|
+
}
|
|
965
|
+
(0, _useValueChanged.useValueChanged)(query, handleQueryChanged);
|
|
966
|
+
(0, _useValueChanged.useValueChanged)(open, handleOpenChanged);
|
|
967
|
+
(0, _useValueChanged.useValueChanged)(selectedValue, handleSelectedValueChanged);
|
|
968
|
+
(0, _useValueChanged.useValueChanged)(selectedLabelString, syncInputAfterItemsOrLabelChange);
|
|
969
|
+
(0, _useValueChanged.useValueChanged)(items, syncInputAfterItemsOrLabelChange);
|
|
970
|
+
(0, _useValueChanged.useValueChanged)(inputValue, handleInputValueChanged);
|
|
848
971
|
const floatingRootContext = (0, _floatingUiReact.useFloatingRootContext)({
|
|
849
972
|
open: inline ? true : open,
|
|
850
973
|
onOpenChange: setOpen,
|
|
@@ -877,7 +1000,8 @@ function AriaCombobox(props) {
|
|
|
877
1000
|
reference['aria-expanded'] = ariaExpanded;
|
|
878
1001
|
reference['aria-haspopup'] = ariaHasPopup;
|
|
879
1002
|
reference['aria-controls'] = expanded ? listElement?.id : undefined;
|
|
880
|
-
|
|
1003
|
+
// `readOnly` accepts no input, so no completion of any kind is offered.
|
|
1004
|
+
reference['aria-autocomplete'] = readOnly ? 'none' : autoComplete;
|
|
881
1005
|
}
|
|
882
1006
|
return {
|
|
883
1007
|
reference,
|
|
@@ -885,9 +1009,13 @@ function AriaCombobox(props) {
|
|
|
885
1009
|
role: 'presentation'
|
|
886
1010
|
}
|
|
887
1011
|
};
|
|
888
|
-
}, [inputElement, expanded, ariaExpanded, ariaHasPopup, listElement?.id, autoComplete]);
|
|
1012
|
+
}, [inputElement, expanded, ariaExpanded, ariaHasPopup, listElement?.id, autoComplete, readOnly]);
|
|
1013
|
+
|
|
1014
|
+
// `readOnly` locks the value, not the interaction: the popup opens and can be browsed.
|
|
1015
|
+
// Value changes stay blocked in `ComboboxItem`, `ComboboxInput`'s keydown, `ComboboxTrigger`'s
|
|
1016
|
+
// typeahead, the clear/remove parts, and the hidden input's autofill handler.
|
|
889
1017
|
const click = (0, _floatingUiReact.useClick)(floatingRootContext, {
|
|
890
|
-
enabled: !
|
|
1018
|
+
enabled: !disabled && openOnInputClick,
|
|
891
1019
|
event: 'mousedown-only',
|
|
892
1020
|
toggle: false,
|
|
893
1021
|
// Apply a small delay for touch to let mobile viewport/keyboard positioning settle.
|
|
@@ -896,7 +1024,7 @@ function AriaCombobox(props) {
|
|
|
896
1024
|
reason: _reasons.REASONS.inputPress
|
|
897
1025
|
});
|
|
898
1026
|
const dismiss = (0, _floatingUiReact.useDismiss)(floatingRootContext, {
|
|
899
|
-
enabled: !
|
|
1027
|
+
enabled: !disabled && !inline,
|
|
900
1028
|
outsidePressEvent: {
|
|
901
1029
|
mouse: 'sloppy',
|
|
902
1030
|
// The visual viewport (affected by the mobile software keyboard) can be
|
|
@@ -912,7 +1040,7 @@ function AriaCombobox(props) {
|
|
|
912
1040
|
}
|
|
913
1041
|
});
|
|
914
1042
|
const listNavigation = (0, _floatingUiReact.useListNavigation)(floatingRootContext, {
|
|
915
|
-
enabled: !
|
|
1043
|
+
enabled: !disabled,
|
|
916
1044
|
id,
|
|
917
1045
|
listRef,
|
|
918
1046
|
activeIndex,
|
|
@@ -969,6 +1097,17 @@ function AriaCombobox(props) {
|
|
|
969
1097
|
onFocus: undefined
|
|
970
1098
|
};
|
|
971
1099
|
}, [listNavigation.item]);
|
|
1100
|
+
store.useContextCallback('setOpen', setOpen);
|
|
1101
|
+
store.useContextCallback('setInputValue', setInputValue);
|
|
1102
|
+
store.useContextCallback('setSelectedValue', setSelectedValue);
|
|
1103
|
+
store.useContextCallback('setIndices', setIndices);
|
|
1104
|
+
store.useContextCallback('handleSelection', handleSelection);
|
|
1105
|
+
store.useContextCallback('forceMount', forceMount);
|
|
1106
|
+
store.useContextCallback('requestSubmit', requestSubmit);
|
|
1107
|
+
store.useContextCallback('onOpenChangeComplete', onOpenChangeCompleteProp);
|
|
1108
|
+
|
|
1109
|
+
// The prop bags must be in the store before the parts render: they read them with `useStore`
|
|
1110
|
+
// during render, and a layout effect commits only after all children have rendered.
|
|
972
1111
|
(0, _useOnFirstRender.useOnFirstRender)(() => {
|
|
973
1112
|
store.update({
|
|
974
1113
|
inline: inlineProp,
|
|
@@ -976,57 +1115,58 @@ function AriaCombobox(props) {
|
|
|
976
1115
|
listProps,
|
|
977
1116
|
inputProps,
|
|
978
1117
|
triggerProps,
|
|
979
|
-
itemProps
|
|
980
|
-
setOpen,
|
|
981
|
-
setInputValue,
|
|
982
|
-
setSelectedValue,
|
|
983
|
-
setIndices,
|
|
984
|
-
handleSelection,
|
|
985
|
-
forceMount,
|
|
986
|
-
requestSubmit,
|
|
987
|
-
onOpenChangeComplete
|
|
1118
|
+
itemProps
|
|
988
1119
|
});
|
|
989
1120
|
});
|
|
1121
|
+
const syncedValues = {
|
|
1122
|
+
id,
|
|
1123
|
+
selectedValue,
|
|
1124
|
+
open,
|
|
1125
|
+
mounted,
|
|
1126
|
+
transitionStatus,
|
|
1127
|
+
items: storeItems,
|
|
1128
|
+
inline: inlineProp,
|
|
1129
|
+
popupProps,
|
|
1130
|
+
listProps,
|
|
1131
|
+
inputProps,
|
|
1132
|
+
triggerProps,
|
|
1133
|
+
itemProps,
|
|
1134
|
+
openMethod,
|
|
1135
|
+
selectionMode,
|
|
1136
|
+
name,
|
|
1137
|
+
form,
|
|
1138
|
+
disabled,
|
|
1139
|
+
readOnly,
|
|
1140
|
+
required,
|
|
1141
|
+
grid,
|
|
1142
|
+
virtualized,
|
|
1143
|
+
openOnInputClick,
|
|
1144
|
+
itemToStringLabel,
|
|
1145
|
+
modal,
|
|
1146
|
+
autoHighlight: autoHighlightMode,
|
|
1147
|
+
isItemEqualToValue,
|
|
1148
|
+
submitOnItemClick,
|
|
1149
|
+
hasInputValue
|
|
1150
|
+
};
|
|
990
1151
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
1152
|
+
// `inputOwnsFormValue` is derived here rather than during render because `ComboboxInput`
|
|
1153
|
+
// writes it from a ref callback earlier in the same commit, and it has to land in this same
|
|
1154
|
+
// `update` so subscribers never observe an intermediate snapshot. That is also why
|
|
1155
|
+
// `store.useSyncedValues` can't be used yet: it would need a second write. The dependencies
|
|
1156
|
+
// are derived from `syncedValues` so a newly synchronized field can't be forgotten here.
|
|
991
1157
|
store.update({
|
|
992
|
-
|
|
993
|
-
selectedValue,
|
|
994
|
-
open,
|
|
995
|
-
mounted,
|
|
996
|
-
transitionStatus,
|
|
997
|
-
items,
|
|
998
|
-
inline: inlineProp,
|
|
999
|
-
popupProps,
|
|
1000
|
-
listProps,
|
|
1001
|
-
inputProps,
|
|
1002
|
-
triggerProps,
|
|
1003
|
-
openMethod,
|
|
1004
|
-
itemProps,
|
|
1005
|
-
selectionMode,
|
|
1006
|
-
name,
|
|
1007
|
-
form,
|
|
1008
|
-
disabled,
|
|
1009
|
-
readOnly,
|
|
1010
|
-
required,
|
|
1011
|
-
grid,
|
|
1012
|
-
virtualized,
|
|
1013
|
-
openOnInputClick,
|
|
1014
|
-
itemToStringLabel,
|
|
1015
|
-
modal,
|
|
1016
|
-
autoHighlight: autoHighlightMode,
|
|
1017
|
-
isItemEqualToValue,
|
|
1018
|
-
submitOnItemClick,
|
|
1019
|
-
hasInputValue,
|
|
1158
|
+
...syncedValues,
|
|
1020
1159
|
inputOwnsFormValue: selectionMode === 'none' && (inlineProp || !store.state.inputInsidePopup)
|
|
1021
1160
|
});
|
|
1022
|
-
|
|
1161
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1162
|
+
}, [store, ...Object.values(syncedValues)]);
|
|
1023
1163
|
const hiddenInputRef = (0, _useMergedRefs.useMergedRefs)(inputRefProp, validation.inputRef);
|
|
1024
1164
|
const itemsContextValue = React.useMemo(() => ({
|
|
1025
1165
|
query,
|
|
1026
1166
|
hasItems,
|
|
1027
1167
|
filteredItems,
|
|
1028
|
-
|
|
1029
|
-
}), [query, hasItems, filteredItems,
|
|
1168
|
+
flatFilteredValues
|
|
1169
|
+
}), [query, hasItems, filteredItems, flatFilteredValues]);
|
|
1030
1170
|
const serializedValue = React.useMemo(() => {
|
|
1031
1171
|
if (Array.isArray(fieldRawValue)) {
|
|
1032
1172
|
return '';
|
|
@@ -1070,7 +1210,7 @@ function AriaCombobox(props) {
|
|
|
1070
1210
|
const nextValue = event.currentTarget.value;
|
|
1071
1211
|
const nextValueLower = nextValue.toLowerCase();
|
|
1072
1212
|
const details = (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.none, event.nativeEvent);
|
|
1073
|
-
const findSerializedMatchIndex = () => valuesRef.current.findIndex(candidate => (0, _resolveValueLabel.stringifyAsValue)(candidate, itemToStringValue).toLowerCase() === nextValueLower || (
|
|
1213
|
+
const findSerializedMatchIndex = () => valuesRef.current.findIndex(candidate => (0, _resolveValueLabel.stringifyAsValue)(candidate, itemToStringValue).toLowerCase() === nextValueLower || stringifyValueLabel(candidate).toLowerCase() === nextValueLower);
|
|
1074
1214
|
function handleChange() {
|
|
1075
1215
|
// Browser autofill only writes a single scalar value.
|
|
1076
1216
|
if (multiple) {
|