@iress-oss/ids-components 5.17.0 → 6.0.0-alpha.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/dist/Button-BXzmntRi.js +355 -0
- package/dist/Filter-Bwk7SIlJ.js +1103 -0
- package/dist/InputPopover-BWWuoQZ2.js +132 -0
- package/dist/TableProvider-D8SQKIG8.js +91 -0
- package/dist/ToasterProvider-XqpAGfRs.js +112 -0
- package/dist/components/Alert/Alert.js +108 -9
- package/dist/components/Alert/Alert.styles.js +211 -0
- package/dist/components/Alert/index.js +4 -3
- package/dist/components/Autocomplete/Autocomplete.js +88 -22
- package/dist/components/Autocomplete/Autocomplete.styles.js +25 -0
- package/dist/components/Autocomplete/components/AutocompleteInstructions.js +6 -6
- package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +63 -67
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/Badge/Badge.js +34 -40
- package/dist/components/Badge/Badge.styles.js +105 -0
- package/dist/components/Badge/index.js +4 -5
- package/dist/components/Button/Button.js +11 -5
- package/dist/components/Button/CloseButton/CloseButton.js +25 -5
- package/dist/components/Button/index.js +5 -9
- package/dist/components/ButtonGroup/ButtonGroup.js +40 -56
- package/dist/components/ButtonGroup/ButtonGroup.styles.js +34 -0
- package/dist/components/ButtonGroup/ButtonGroupProvider.js +33 -26
- package/dist/components/ButtonGroup/hooks/useButtonGroupItem.js +22 -0
- package/dist/components/ButtonGroup/index.js +4 -2
- package/dist/components/Card/Card.js +96 -44
- package/dist/components/Card/Card.styles.js +209 -0
- package/dist/components/Card/index.js +6 -13
- package/dist/components/Checkbox/Checkbox.js +125 -13
- package/dist/components/Checkbox/Checkbox.styles.js +117 -0
- package/dist/components/Checkbox/index.js +4 -2
- package/dist/components/CheckboxGroup/CheckboxGroup.js +90 -98
- package/dist/components/CheckboxGroup/CheckboxGroup.styles.js +87 -0
- package/dist/components/CheckboxGroup/index.js +6 -5
- package/dist/components/CheckboxMark/CheckboxMark.js +48 -36
- package/dist/components/CheckboxMark/CheckboxMark.styles.js +82 -0
- package/dist/components/CheckboxMark/index.js +4 -4
- package/dist/components/Col/Col.js +6 -30
- package/dist/components/Col/Col.styles.js +28 -0
- package/dist/components/Col/index.js +4 -10
- package/dist/components/Container/Container.js +13 -16
- package/dist/components/Container/Container.styles.js +45 -0
- package/dist/components/Container/index.js +4 -4
- package/dist/components/Divider/Divider.js +27 -18
- package/dist/components/Divider/Divider.styles.js +33 -0
- package/dist/components/Divider/index.js +4 -4
- package/dist/components/Expander/Expander.js +47 -61
- package/dist/components/Expander/Expander.styles.js +99 -0
- package/dist/components/Expander/index.js +4 -5
- package/dist/components/Field/Field.js +89 -58
- package/dist/components/Field/Field.styles.js +124 -0
- package/dist/components/Field/FieldGroup/FieldGroup.js +66 -63
- package/dist/components/Field/FieldGroup/FieldGroup.styles.js +123 -0
- package/dist/components/Field/components/FieldFooter.js +54 -0
- package/dist/components/Field/components/FieldHint.js +53 -0
- package/dist/components/Field/index.js +6 -2
- package/dist/components/Filter/Filter.js +91 -23
- package/dist/components/Filter/Filter.styles.js +65 -0
- package/dist/components/Filter/components/FilterResetButton.js +26 -36
- package/dist/components/Filter/components/FilterResultsDescriptor.js +18 -0
- package/dist/components/Filter/components/FilterSearch.js +31 -36
- package/dist/components/Filter/index.js +1 -1
- package/dist/components/Hide/Hide.js +21 -5
- package/dist/components/Hide/helpers/normaliseHideValues.js +8 -0
- package/dist/components/Hide/index.js +2 -5
- package/dist/components/Icon/Icon.js +40 -37
- package/dist/components/Icon/Icon.styles.js +44 -0
- package/dist/components/Icon/index.js +4 -13
- package/dist/components/Image/Image.js +27 -0
- package/dist/components/Image/Image.styles.js +13 -0
- package/dist/components/Image/index.js +6 -0
- package/dist/components/Inline/Inline.js +7 -38
- package/dist/components/Inline/Inline.styles.js +60 -0
- package/dist/components/Inline/index.js +4 -4
- package/dist/components/Input/Input.js +148 -12
- package/dist/components/Input/Input.styles.js +208 -0
- package/dist/components/Input/InputBase/InputBase.js +34 -7
- package/dist/components/Input/index.js +4 -5
- package/dist/components/InputCurrency/InputCurrency.js +40 -6
- package/dist/components/InputCurrency/index.js +1 -1
- package/dist/components/Label/Label.js +4 -4
- package/dist/components/Label/Label.styles.js +34 -0
- package/dist/components/Label/LabelBase/LabelBase.js +39 -55
- package/dist/components/Label/index.js +3 -1
- package/dist/components/Link/Link.js +89 -0
- package/dist/components/Link/Link.styles.js +65 -0
- package/dist/components/Link/index.js +6 -0
- package/dist/components/Menu/Menu.js +89 -58
- package/dist/components/Menu/Menu.styles.js +231 -0
- package/dist/components/Menu/MenuDivider/MenuDivider.js +23 -36
- package/dist/components/Menu/MenuItem/MenuItem.js +187 -9
- package/dist/components/Menu/MenuItem/hooks/useMenuItemRole.js +7 -6
- package/dist/components/Menu/MenuText/MenuText.js +79 -37
- package/dist/components/Menu/index.js +8 -24
- package/dist/components/Modal/Modal.js +161 -14
- package/dist/components/Modal/Modal.styles.js +123 -0
- package/dist/components/Modal/ModalProvider.js +5 -3
- package/dist/components/Modal/hooks/useModal.js +4 -4
- package/dist/components/Modal/hooks/{useIDSProvidedModal.js → useProviderModal.js} +2 -2
- package/dist/components/Modal/index.js +8 -9
- package/dist/components/Panel/Panel.js +8 -34
- package/dist/components/Panel/Panel.styles.js +23 -0
- package/dist/components/Panel/index.js +4 -6
- package/dist/components/Placeholder/Placeholder.js +26 -29
- package/dist/components/Placeholder/Placeholder.styles.js +32 -0
- package/dist/components/Placeholder/index.js +3 -1
- package/dist/components/Popover/InputPopover/InputPopover.js +14 -85
- package/dist/components/Popover/InputPopover/InputPopoverActivator.js +37 -51
- package/dist/components/Popover/Popover.js +84 -93
- package/dist/components/Popover/Popover.styles.js +49 -0
- package/dist/components/Popover/components/NestedPopoverActivator.js +3 -3
- package/dist/components/Popover/components/PopoverActivator.js +33 -38
- package/dist/components/Popover/components/PopoverContent.js +48 -33
- package/dist/components/Popover/helpers/composeFloatingProps.js +24 -24
- package/dist/components/Popover/helpers/handlePopoverTabKey.js +23 -21
- package/dist/components/Popover/hooks/usePopover.js +137 -4
- package/dist/components/Popover/hooks/usePopoverImperativeHandle.js +17 -17
- package/dist/components/Popover/hooks/usePopoverItem.js +14 -11
- package/dist/components/Popover/hooks/usePopoverNavigation.js +3 -3
- package/dist/components/Popover/index.js +8 -11
- package/dist/components/Progress/Progress.js +52 -42
- package/dist/components/Progress/Progress.styles.js +36 -0
- package/dist/components/Progress/index.js +4 -2
- package/dist/components/Provider/Provider.js +30 -25
- package/dist/components/Radio/Radio.js +112 -9
- package/dist/components/Radio/Radio.styles.js +201 -0
- package/dist/components/Radio/index.js +4 -2
- package/dist/components/RadioGroup/RadioGroup.js +91 -82
- package/dist/components/RadioGroup/RadioGroup.styles.js +60 -0
- package/dist/components/RadioGroup/index.js +6 -5
- package/dist/components/Readonly/Readonly.js +67 -40
- package/dist/components/Readonly/Readonly.styles.js +188 -0
- package/dist/components/Readonly/index.js +4 -2
- package/dist/components/RichSelect/RichSelect.js +88 -24
- package/dist/components/RichSelect/RichSelect.styles.js +96 -0
- package/dist/components/RichSelect/SelectBody/SelectBody.js +109 -37
- package/dist/components/RichSelect/SelectBody/SelectBody.styles.js +21 -0
- package/dist/components/RichSelect/SelectCreate/SelectCreate.js +98 -34
- package/dist/components/RichSelect/SelectHeading/SelectHeading.js +88 -23
- package/dist/components/RichSelect/SelectLabel/SelectLabel.js +48 -10
- package/dist/components/RichSelect/SelectLabel/SelectLabel.styles.js +91 -0
- package/dist/components/RichSelect/SelectMenu/SelectMenu.js +113 -41
- package/dist/components/RichSelect/SelectMenu/SelectMenu.styles.js +14 -0
- package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +54 -34
- package/dist/components/RichSelect/SelectSearch/SelectSearch.js +84 -20
- package/dist/components/RichSelect/SelectSearch/SelectSearch.styles.js +28 -0
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +45 -6
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.styles.js +32 -0
- package/dist/components/RichSelect/SelectTags/SelectTags.js +90 -25
- package/dist/components/RichSelect/SelectTags/SelectTags.styles.js +86 -0
- package/dist/components/RichSelect/components/SelectActivator.js +3 -2
- package/dist/components/RichSelect/components/SelectHiddenInput.js +24 -24
- package/dist/components/RichSelect/components/SelectOptions.js +84 -21
- package/dist/components/RichSelect/index.js +17 -14
- package/dist/components/Row/Row.js +7 -38
- package/dist/components/Row/Row.styles.js +52 -0
- package/dist/components/Row/index.js +4 -4
- package/dist/components/Select/Select.js +94 -12
- package/dist/components/Select/Select.styles.js +123 -0
- package/dist/components/Select/SelectOption/SelectOption.js +5 -4
- package/dist/components/Select/components/SelectControl.js +39 -7
- package/dist/components/Select/components/SelectReadonly.js +40 -37
- package/dist/components/Select/helpers/nodesToSelectOptions.js +40 -7
- package/dist/components/Select/index.js +6 -7
- package/dist/components/Skeleton/Skeleton.js +26 -35
- package/dist/components/Skeleton/Skeleton.styles.js +36 -0
- package/dist/components/Skeleton/index.js +4 -5
- package/dist/components/SkipLink/SkipLink.js +21 -28
- package/dist/components/SkipLink/SkipLink.styles.js +17 -0
- package/dist/components/SkipLink/index.js +4 -2
- package/dist/components/Slideout/Slideout.js +242 -16
- package/dist/components/Slideout/Slideout.styles.js +169 -0
- package/dist/components/Slideout/SlideoutProvider.js +37 -6
- package/dist/components/Slideout/components/SlideoutInner.js +85 -6
- package/dist/components/Slideout/hooks/useProviderSlideout.js +13 -0
- package/dist/components/Slideout/hooks/usePushElement.js +50 -0
- package/dist/components/Slideout/hooks/useSlideout.js +6 -6
- package/dist/components/Slideout/index.js +8 -14
- package/dist/components/Slider/Slider.js +110 -10
- package/dist/components/Slider/Slider.styles.js +110 -0
- package/dist/components/Slider/components/SliderTicks.js +58 -8
- package/dist/components/Slider/index.js +4 -2
- package/dist/components/Spinner/Spinner.js +20 -4
- package/dist/components/Spinner/Spinner.styles.js +11 -0
- package/dist/components/Spinner/index.js +4 -2
- package/dist/components/Stack/Stack.js +24 -24
- package/dist/components/Stack/Stack.styles.js +27 -0
- package/dist/components/Stack/index.js +4 -4
- package/dist/components/TabSet/Tab/Tab.js +119 -73
- package/dist/components/TabSet/Tab/Tab.styles.js +49 -0
- package/dist/components/TabSet/TabSet.js +77 -45
- package/dist/components/TabSet/TabSet.styles.js +84 -0
- package/dist/components/TabSet/TabSetProvider.js +76 -41
- package/dist/components/TabSet/index.js +8 -9
- package/dist/components/Table/Table.js +73 -14
- package/dist/components/Table/Table.styles.js +101 -0
- package/dist/components/Table/TableBody/TableBody.js +98 -112
- package/dist/components/Table/TableFormattedValue/TableFormattedValue.js +22 -12
- package/dist/components/Table/TableProvider.js +8 -32
- package/dist/components/Table/components/TableBodyCell.js +1 -1
- package/dist/components/Table/components/TableEmpty.js +9 -9
- package/dist/components/Table/components/TableHeader.js +43 -6
- package/dist/components/Table/components/TableHeaderCell.js +33 -6
- package/dist/components/Table/components/TableRows.js +33 -32
- package/dist/components/Table/components/TableSortButton.js +33 -5
- package/dist/components/Table/helpers/composeTableColumnDefs.js +7 -0
- package/dist/components/Table/helpers/composeTableInitialSorting.js +9 -0
- package/dist/components/Table/hooks/useTableColumnSort.js +25 -0
- package/dist/components/Table/hooks/useTableColumnStyles.js +29 -0
- package/dist/components/Table/index.js +10 -13
- package/dist/components/Tag/Tag.js +46 -6
- package/dist/components/Tag/Tag.styles.js +71 -0
- package/dist/components/Tag/TagInput/TagInput.js +123 -6
- package/dist/components/Tag/index.js +6 -3
- package/dist/components/Text/Text.js +43 -32
- package/dist/components/Text/Text.styles.js +81 -0
- package/dist/components/Text/index.js +5 -4
- package/dist/components/Toaster/Toaster.js +9 -6
- package/dist/components/Toaster/Toaster.styles.js +66 -0
- package/dist/components/Toaster/ToasterProvider.js +4 -3
- package/dist/components/Toaster/components/Toast/Toast.js +96 -0
- package/dist/components/Toaster/components/Toast/Toast.styles.js +197 -0
- package/dist/components/Toaster/components/Toast/ToastAnimated.js +51 -0
- package/dist/components/Toaster/helpers/toasterRegister.js +10 -0
- package/dist/components/Toaster/hooks/useToaster.js +30 -19
- package/dist/components/Toaster/index.js +8 -15
- package/dist/components/Toggle/Toggle.js +88 -98
- package/dist/components/Toggle/Toggle.styles.js +183 -0
- package/dist/components/Toggle/index.js +4 -5
- package/dist/components/Tooltip/Tooltip.js +59 -55
- package/dist/components/Tooltip/Tooltip.styles.js +28 -0
- package/dist/components/Tooltip/index.js +4 -2
- package/dist/components/ValidationMessage/ValidationLink/ValidationLink.js +12 -14
- package/dist/components/ValidationMessage/ValidationMessage.js +41 -6
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +59 -60
- package/dist/{index-CmsyHM_3.js → composeTableColumnDefs-CeWqgpKW.js} +462 -420
- package/dist/constants.js +8 -8
- package/dist/create-recipe-BqEnhJ30.js +49 -0
- package/dist/cva-B2x59Dph.js +294 -0
- package/dist/cx-DN21T1EH.js +9 -0
- package/dist/enums.js +20 -20
- package/dist/factory-DHLOr79I.js +53 -0
- package/dist/floating-ui.react-CPN4oQCc.js +3462 -0
- package/dist/helpers/styling/getVariablePadding.js +38 -0
- package/dist/helpers/styling/iressCss.js +7 -0
- package/dist/helpers/styling/mapGutterToGap.js +23 -0
- package/dist/helpers/utility/spreadUnlessUndefined.js +9 -0
- package/dist/hooks/index.js +4 -5
- package/dist/hooks/useControlledState.js +29 -31
- package/dist/hooks/useResponsiveProps.js +23 -19
- package/dist/index-DlGwAtoO.js +622 -0
- package/dist/index.esm-BdbWn-w_.js +1215 -0
- package/dist/is-valid-prop-DFFvE05x.js +7 -0
- package/dist/main.js +322 -333
- package/dist/panda.config.d.ts +4 -0
- package/dist/patterns/Form/Form.js +13 -0
- package/dist/patterns/Form/Form.styles.js +43 -0
- package/dist/patterns/Form/FormField/FormField.js +69 -0
- package/dist/patterns/Form/FormField/FormFieldset.js +61 -0
- package/dist/{components/Form/FormField/FormField.types.js → patterns/Form/FormField/helpers/getErrorTypeMessage.js} +18 -2
- package/dist/patterns/Form/FormField/hooks/useFieldRenderProps.js +37 -0
- package/dist/patterns/Form/FormValidationSummary/FormValidationSummary.js +96 -0
- package/dist/patterns/Form/HookForm/HookForm.js +116 -0
- package/dist/patterns/Form/components/LongForm.js +89 -0
- package/dist/patterns/Form/components/ShortForm.js +61 -0
- package/dist/patterns/Form/index.js +12 -0
- package/dist/patterns/Loading/Loading.js +11 -6
- package/dist/patterns/Loading/Loading.styles.js +370 -0
- package/dist/patterns/Loading/LoadingSuspense.js +51 -5
- package/dist/patterns/Loading/components/ComponentLoading.js +64 -8
- package/dist/patterns/Loading/components/DefaultLoading.js +32 -7
- package/dist/patterns/Loading/components/LongLoading.js +114 -118
- package/dist/patterns/Loading/components/PageLoading.js +111 -12
- package/dist/patterns/Loading/components/StartUpLoading.js +70 -76
- package/dist/patterns/Loading/components/ValidateLoading.js +38 -7
- package/dist/patterns/Loading/index.js +4 -3
- package/dist/src/components/Alert/Alert.d.ts +58 -9
- package/dist/src/components/Alert/Alert.styles.d.ts +128 -0
- package/dist/src/components/Alert/index.d.ts +1 -1
- package/dist/src/components/Alert/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Alert/meta/index.d.ts +7 -0
- package/dist/src/components/Autocomplete/Autocomplete.d.ts +51 -2
- package/dist/src/components/Autocomplete/Autocomplete.styles.d.ts +9 -0
- package/dist/src/components/Autocomplete/components/AutocompleteInstructions.d.ts +7 -2
- package/dist/src/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +68 -1
- package/dist/src/components/Autocomplete/index.d.ts +0 -1
- package/dist/src/components/Autocomplete/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Autocomplete/meta/index.d.ts +7 -0
- package/dist/src/components/Badge/Badge.d.ts +21 -2
- package/dist/src/components/Badge/Badge.styles.d.ts +63 -0
- package/dist/src/components/Badge/index.d.ts +2 -2
- package/dist/src/components/Badge/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Badge/meta/index.d.ts +7 -0
- package/dist/src/components/Button/Button.d.ts +90 -2
- package/dist/src/components/Button/CloseButton/CloseButton.d.ts +9 -3
- package/dist/src/components/Button/index.d.ts +1 -2
- package/dist/src/components/Button/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Button/meta/index.d.ts +7 -0
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +35 -2
- package/dist/src/components/ButtonGroup/ButtonGroup.styles.d.ts +9 -0
- package/dist/src/components/ButtonGroup/ButtonGroupProvider.d.ts +18 -3
- package/dist/src/components/ButtonGroup/hooks/useButtonGroupItem.d.ts +15 -0
- package/dist/src/components/ButtonGroup/index.d.ts +2 -2
- package/dist/src/components/ButtonGroup/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/ButtonGroup/meta/index.d.ts +7 -0
- package/dist/src/components/Card/Card.d.ts +44 -2
- package/dist/src/components/Card/Card.styles.d.ts +76 -0
- package/dist/src/components/Card/index.d.ts +1 -5
- package/dist/src/components/Card/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Card/meta/index.d.ts +7 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +64 -2
- package/dist/src/components/Checkbox/Checkbox.styles.d.ts +59 -0
- package/dist/src/components/Checkbox/index.d.ts +1 -1
- package/dist/src/components/Checkbox/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Checkbox/meta/index.d.ts +7 -0
- package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +55 -2
- package/dist/src/components/CheckboxGroup/CheckboxGroup.styles.d.ts +37 -0
- package/dist/src/components/CheckboxGroup/index.d.ts +1 -1
- package/dist/src/components/CheckboxGroup/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/CheckboxGroup/meta/index.d.ts +7 -0
- package/dist/src/components/CheckboxMark/CheckboxMark.d.ts +16 -2
- package/dist/src/components/CheckboxMark/CheckboxMark.styles.d.ts +42 -0
- package/dist/src/components/CheckboxMark/index.d.ts +1 -1
- package/dist/src/components/Col/Col.d.ts +23 -2
- package/dist/src/components/Col/Col.styles.d.ts +16 -0
- package/dist/src/components/Col/index.d.ts +1 -1
- package/dist/src/components/Col/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Col/meta/index.d.ts +7 -0
- package/dist/src/components/Container/Container.d.ts +13 -2
- package/dist/src/components/Container/Container.styles.d.ts +35 -0
- package/dist/src/components/Container/index.d.ts +1 -1
- package/dist/src/components/Container/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Container/meta/index.d.ts +7 -0
- package/dist/src/components/Divider/Divider.d.ts +8 -2
- package/dist/src/components/Divider/Divider.styles.d.ts +18 -0
- package/dist/src/components/Divider/index.d.ts +1 -1
- package/dist/src/components/Divider/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Divider/meta/index.d.ts +7 -0
- package/dist/src/components/Expander/Expander.d.ts +31 -2
- package/dist/src/components/Expander/Expander.styles.d.ts +45 -0
- package/dist/src/components/Expander/index.d.ts +1 -1
- package/dist/src/components/Expander/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Expander/meta/index.d.ts +7 -0
- package/dist/src/components/Field/Field.d.ts +57 -2
- package/dist/src/components/Field/Field.styles.d.ts +81 -0
- package/dist/src/components/Field/FieldGroup/FieldGroup.d.ts +17 -2
- package/dist/src/components/Field/FieldGroup/FieldGroup.styles.d.ts +81 -0
- package/dist/src/components/Field/components/FieldFooter.d.ts +22 -0
- package/dist/src/components/Field/components/FieldHint.d.ts +27 -0
- package/dist/src/components/Field/index.d.ts +2 -2
- package/dist/src/components/Field/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Field/meta/index.d.ts +7 -0
- package/dist/src/components/Filter/Filter.d.ts +75 -2
- package/dist/src/components/Filter/Filter.styles.d.ts +2 -0
- package/dist/src/components/Filter/components/FilterLabel.d.ts +3 -2
- package/dist/src/components/Filter/components/FilterResetButton.d.ts +1 -2
- package/dist/src/components/Filter/components/FilterResultsDescriptor.d.ts +15 -0
- package/dist/src/components/Filter/components/FilterSearch.d.ts +15 -3
- package/dist/src/components/Filter/hooks/useFilterFlags.d.ts +2 -2
- package/dist/src/components/Filter/index.d.ts +0 -1
- package/dist/src/components/Filter/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Filter/meta/index.d.ts +7 -0
- package/dist/src/components/Hide/Hide.d.ts +28 -2
- package/dist/src/components/Hide/helpers/normaliseHideValues.d.ts +2 -0
- package/dist/src/components/Hide/index.d.ts +0 -1
- package/dist/src/components/Hide/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Hide/meta/index.d.ts +7 -0
- package/dist/src/components/Icon/Icon.d.ts +36 -2
- package/dist/src/components/Icon/Icon.styles.d.ts +38 -0
- package/dist/src/components/Icon/index.d.ts +1 -1
- package/dist/src/components/Icon/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Icon/meta/index.d.ts +7 -0
- package/dist/src/components/Image/Image.d.ts +16 -0
- package/dist/src/components/Image/Image.styles.d.ts +1 -0
- package/dist/src/components/Image/index.d.ts +2 -0
- package/dist/src/components/Image/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Image/meta/index.d.ts +7 -0
- package/dist/src/components/Inline/Inline.d.ts +32 -2
- package/dist/src/components/Inline/Inline.styles.d.ts +49 -0
- package/dist/src/components/Inline/index.d.ts +1 -1
- package/dist/src/components/Inline/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Inline/meta/index.d.ts +7 -0
- package/dist/src/components/Input/Input.d.ts +56 -13
- package/dist/src/components/Input/Input.styles.d.ts +121 -0
- package/dist/src/components/Input/InputBase/InputBase.d.ts +32 -2
- package/dist/src/components/Input/index.d.ts +2 -2
- package/dist/src/components/Input/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Input/meta/index.d.ts +7 -0
- package/dist/src/components/InputCurrency/InputCurrency.d.ts +28 -4
- package/dist/src/components/InputCurrency/index.d.ts +0 -1
- package/dist/src/components/InputCurrency/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/InputCurrency/meta/index.d.ts +7 -0
- package/dist/src/components/Label/Label.d.ts +19 -2
- package/dist/src/components/Label/Label.styles.d.ts +1 -0
- package/dist/src/components/Label/LabelBase/LabelBase.d.ts +28 -2
- package/dist/src/components/Label/index.d.ts +1 -1
- package/dist/src/components/Label/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Label/meta/index.d.ts +7 -0
- package/dist/src/components/Link/Link.d.ts +42 -0
- package/dist/src/components/Link/Link.styles.d.ts +29 -0
- package/dist/src/components/Link/index.d.ts +2 -0
- package/dist/src/components/Link/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Link/meta/index.d.ts +7 -0
- package/dist/src/components/Menu/Menu.d.ts +110 -2
- package/dist/src/components/Menu/Menu.styles.d.ts +121 -0
- package/dist/src/components/Menu/MenuDivider/MenuDivider.d.ts +3 -2
- package/dist/src/components/Menu/MenuItem/MenuItem.d.ts +99 -2
- package/dist/src/components/Menu/MenuItem/hooks/useMenuItemRole.d.ts +1 -6
- package/dist/src/components/Menu/MenuText/MenuText.d.ts +19 -2
- package/dist/src/components/Menu/index.d.ts +4 -11
- package/dist/src/components/Menu/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Menu/meta/index.d.ts +7 -0
- package/dist/src/components/Modal/Modal.d.ts +74 -2
- package/dist/src/components/Modal/Modal.styles.d.ts +81 -0
- package/dist/src/components/Modal/ModalProvider.d.ts +25 -2
- package/dist/src/components/Modal/hooks/useProviderModal.d.ts +9 -0
- package/dist/src/components/Modal/index.d.ts +3 -2
- package/dist/src/components/Modal/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Modal/meta/index.d.ts +7 -0
- package/dist/src/components/Panel/Panel.d.ts +15 -2
- package/dist/src/components/Panel/Panel.styles.d.ts +7 -0
- package/dist/src/components/Panel/index.d.ts +1 -1
- package/dist/src/components/Panel/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Panel/meta/index.d.ts +7 -0
- package/dist/src/components/Placeholder/Placeholder.d.ts +21 -2
- package/dist/src/components/Placeholder/Placeholder.styles.d.ts +1 -0
- package/dist/src/components/Placeholder/index.d.ts +1 -1
- package/dist/src/components/Placeholder/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Placeholder/meta/index.d.ts +7 -0
- package/dist/src/components/Popover/InputPopover/InputPopover.d.ts +20 -2
- package/dist/src/components/Popover/InputPopover/InputPopoverActivator.d.ts +9 -2
- package/dist/src/components/Popover/Popover.d.ts +91 -2
- package/dist/src/components/Popover/Popover.styles.d.ts +27 -0
- package/dist/src/components/Popover/components/NestedPopoverActivator.d.ts +2 -2
- package/dist/src/components/Popover/components/PopoverActivator.d.ts +5 -1
- package/dist/src/components/Popover/components/PopoverContent.d.ts +6 -1
- package/dist/src/components/Popover/helpers/composeFloatingProps.d.ts +8 -7
- package/dist/src/components/Popover/helpers/handlePopoverTabKey.d.ts +3 -3
- package/dist/src/components/Popover/hooks/usePopover.d.ts +120 -1
- package/dist/src/components/Popover/hooks/usePopoverActivatorInteractions.d.ts +7 -7
- package/dist/src/components/Popover/hooks/usePopoverAria.d.ts +4 -1
- package/dist/src/components/Popover/hooks/usePopoverImperativeHandle.d.ts +7 -3
- package/dist/src/components/Popover/hooks/usePopoverItem.d.ts +29 -2
- package/dist/src/components/Popover/hooks/usePopoverNavigation.d.ts +8 -4
- package/dist/src/components/Popover/index.d.ts +3 -3
- package/dist/src/components/Popover/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Popover/meta/index.d.ts +7 -0
- package/dist/src/components/Progress/Progress.d.ts +44 -2
- package/dist/src/components/Progress/Progress.styles.d.ts +1 -0
- package/dist/src/components/Progress/index.d.ts +2 -1
- package/dist/src/components/Progress/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Progress/meta/index.d.ts +7 -0
- package/dist/src/components/Provider/Provider.d.ts +6 -2
- package/dist/src/components/Radio/Radio.d.ts +47 -2
- package/dist/src/components/Radio/Radio.styles.d.ts +51 -0
- package/dist/src/components/Radio/index.d.ts +1 -1
- package/dist/src/components/Radio/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Radio/meta/index.d.ts +7 -0
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +56 -2
- package/dist/src/components/RadioGroup/RadioGroup.styles.d.ts +50 -0
- package/dist/src/components/RadioGroup/index.d.ts +1 -1
- package/dist/src/components/RadioGroup/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/RadioGroup/meta/index.d.ts +7 -0
- package/dist/src/components/Readonly/Readonly.d.ts +14 -3
- package/dist/src/components/Readonly/Readonly.styles.d.ts +106 -0
- package/dist/src/components/Readonly/index.d.ts +1 -1
- package/dist/src/components/Readonly/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Readonly/meta/index.d.ts +7 -0
- package/dist/src/components/RichSelect/RichSelect.d.ts +142 -2
- package/dist/src/components/RichSelect/RichSelect.styles.d.ts +59 -0
- package/dist/src/components/RichSelect/SelectBody/SelectBody.d.ts +12 -1
- package/dist/src/components/RichSelect/SelectBody/SelectBody.styles.d.ts +1 -0
- package/dist/src/components/RichSelect/SelectCreate/SelectCreate.d.ts +28 -1
- package/dist/src/components/RichSelect/SelectHeading/SelectHeading.d.ts +17 -2
- package/dist/src/components/RichSelect/SelectLabel/SelectLabel.d.ts +3 -1
- package/dist/src/components/RichSelect/SelectLabel/SelectLabel.styles.d.ts +15 -0
- package/dist/src/components/RichSelect/SelectMenu/SelectMenu.d.ts +52 -2
- package/dist/src/components/RichSelect/SelectMenu/SelectMenu.styles.d.ts +1 -0
- package/dist/src/components/RichSelect/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/dist/src/components/RichSelect/SelectSearch/SelectSearch.d.ts +3 -2
- package/dist/src/components/RichSelect/SelectSearch/SelectSearch.styles.d.ts +1 -0
- package/dist/src/components/RichSelect/SelectSearchInput/SelectSearchInput.d.ts +13 -1
- package/dist/src/components/RichSelect/SelectSearchInput/SelectSearchInput.styles.d.ts +1 -0
- package/dist/src/components/RichSelect/SelectTags/SelectTags.d.ts +32 -2
- package/dist/src/components/RichSelect/SelectTags/SelectTags.styles.d.ts +16 -0
- package/dist/src/components/RichSelect/components/SelectActivator.d.ts +34 -3
- package/dist/src/components/RichSelect/components/SelectHiddenInput.d.ts +26 -3
- package/dist/src/components/RichSelect/components/SelectOptions.d.ts +3 -3
- package/dist/src/components/RichSelect/hooks/useRichSelectState.d.ts +3 -3
- package/dist/src/components/RichSelect/index.d.ts +0 -9
- package/dist/src/components/RichSelect/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/RichSelect/meta/index.d.ts +7 -0
- package/dist/src/components/Row/Row.d.ts +29 -2
- package/dist/src/components/Row/Row.styles.d.ts +36 -0
- package/dist/src/components/Row/index.d.ts +1 -1
- package/dist/src/components/Row/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Row/meta/index.d.ts +7 -0
- package/dist/src/components/Select/Select.d.ts +47 -2
- package/dist/src/components/Select/Select.styles.d.ts +94 -0
- package/dist/src/components/Select/SelectOption/SelectOption.d.ts +8 -1
- package/dist/src/components/Select/components/SelectControl.d.ts +24 -2
- package/dist/src/components/Select/components/SelectReadonly.d.ts +16 -2
- package/dist/src/components/Select/helpers/nodesToSelectOptions.d.ts +10 -5
- package/dist/src/components/Select/index.d.ts +1 -2
- package/dist/src/components/Select/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Select/meta/index.d.ts +7 -0
- package/dist/src/components/Skeleton/Skeleton.d.ts +25 -2
- package/dist/src/components/Skeleton/Skeleton.styles.d.ts +17 -0
- package/dist/src/components/Skeleton/index.d.ts +1 -1
- package/dist/src/components/Skeleton/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Skeleton/meta/index.d.ts +7 -0
- package/dist/src/components/SkipLink/SkipLink.d.ts +17 -2
- package/dist/src/components/SkipLink/SkipLink.styles.d.ts +1 -0
- package/dist/src/components/SkipLink/index.d.ts +1 -1
- package/dist/src/components/SkipLink/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/SkipLink/meta/index.d.ts +7 -0
- package/dist/src/components/Slideout/Slideout.d.ts +82 -2
- package/dist/src/components/Slideout/Slideout.styles.d.ts +66 -0
- package/dist/src/components/Slideout/SlideoutProvider.d.ts +16 -3
- package/dist/src/components/Slideout/components/SlideoutInner.d.ts +10 -2
- package/dist/src/components/Slideout/hooks/useProviderSlideout.d.ts +9 -0
- package/dist/src/components/Slideout/hooks/usePushElement.d.ts +10 -0
- package/dist/src/components/Slideout/index.d.ts +3 -2
- package/dist/src/components/Slideout/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Slideout/meta/index.d.ts +7 -0
- package/dist/src/components/Slider/Slider.d.ts +70 -1
- package/dist/src/components/Slider/Slider.styles.d.ts +1 -0
- package/dist/src/components/Slider/components/SliderTicks.d.ts +57 -1
- package/dist/src/components/Slider/index.d.ts +1 -1
- package/dist/src/components/Slider/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Slider/meta/index.d.ts +7 -0
- package/dist/src/components/Spinner/Spinner.d.ts +9 -2
- package/dist/src/components/Spinner/Spinner.styles.d.ts +1 -0
- package/dist/src/components/Spinner/index.d.ts +1 -1
- package/dist/src/components/Spinner/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Spinner/meta/index.d.ts +7 -0
- package/dist/src/components/Stack/Stack.d.ts +24 -2
- package/dist/src/components/Stack/Stack.styles.d.ts +13 -0
- package/dist/src/components/Stack/index.d.ts +1 -1
- package/dist/src/components/Stack/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Stack/meta/index.d.ts +7 -0
- package/dist/src/components/TabSet/Tab/Tab.d.ts +31 -2
- package/dist/src/components/TabSet/Tab/Tab.styles.d.ts +17 -0
- package/dist/src/components/TabSet/TabSet.d.ts +29 -2
- package/dist/src/components/TabSet/TabSet.styles.d.ts +25 -0
- package/dist/src/components/TabSet/TabSetProvider.d.ts +32 -3
- package/dist/src/components/TabSet/index.d.ts +4 -4
- package/dist/src/components/TabSet/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/TabSet/meta/index.d.ts +7 -0
- package/dist/src/components/Table/Table.d.ts +66 -5
- package/dist/src/components/Table/Table.styles.d.ts +23 -0
- package/dist/src/components/Table/TableBody/TableBody.d.ts +29 -2
- package/dist/src/components/Table/TableFormattedValue/TableFormattedValue.d.ts +26 -2
- package/dist/src/components/Table/TableProvider.d.ts +14 -2
- package/dist/src/components/Table/components/TableBodyCell.d.ts +11 -1
- package/dist/src/components/Table/components/TableHeader.d.ts +8 -2
- package/dist/src/components/Table/components/TableHeaderCell.d.ts +8 -1
- package/dist/src/components/Table/components/TableRows.d.ts +11 -1
- package/dist/src/components/Table/components/TableSortButton.d.ts +8 -1
- package/dist/src/components/Table/helpers/composeTableColumnDefs.d.ts +56 -0
- package/dist/src/components/Table/helpers/composeTableInitialSorting.d.ts +3 -0
- package/dist/src/components/Table/hooks/useTableColumnSort.d.ts +13 -0
- package/dist/src/components/Table/hooks/useTableColumnStyles.d.ts +11 -0
- package/dist/src/components/Table/index.d.ts +3 -4
- package/dist/src/components/Table/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Table/meta/index.d.ts +7 -0
- package/dist/src/components/Tag/Tag.d.ts +25 -1
- package/dist/src/components/Tag/Tag.styles.d.ts +31 -0
- package/dist/src/components/Tag/TagInput/TagInput.d.ts +43 -2
- package/dist/src/components/Tag/index.d.ts +1 -2
- package/dist/src/components/Tag/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Tag/meta/index.d.ts +7 -0
- package/dist/src/components/Text/Text.d.ts +10 -2
- package/dist/src/components/Text/Text.styles.d.ts +1 -0
- package/dist/src/components/Text/index.d.ts +1 -1
- package/dist/src/components/Text/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Text/meta/index.d.ts +7 -0
- package/dist/src/components/Toaster/Toaster.d.ts +25 -2
- package/dist/src/components/Toaster/Toaster.styles.d.ts +42 -0
- package/dist/src/components/Toaster/ToasterProvider.d.ts +11 -13
- package/dist/src/components/Toaster/components/Toast/Toast.d.ts +33 -0
- package/dist/src/components/Toaster/components/Toast/Toast.styles.d.ts +90 -0
- package/dist/src/components/Toaster/components/Toast/ToastAnimated.d.ts +19 -0
- package/dist/src/components/Toaster/helpers/toasterRegister.d.ts +17 -0
- package/dist/src/components/Toaster/hooks/useToaster.d.ts +30 -7
- package/dist/src/components/Toaster/index.d.ts +6 -4
- package/dist/src/components/Toaster/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Toaster/meta/index.d.ts +7 -0
- package/dist/src/components/Toggle/Toggle.d.ts +25 -2
- package/dist/src/components/Toggle/Toggle.styles.d.ts +80 -0
- package/dist/src/components/Toggle/index.d.ts +1 -1
- package/dist/src/components/Toggle/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Toggle/meta/index.d.ts +7 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +28 -2
- package/dist/src/components/Tooltip/Tooltip.styles.d.ts +1 -0
- package/dist/src/components/Tooltip/index.d.ts +1 -1
- package/dist/src/components/Tooltip/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/Tooltip/meta/index.d.ts +7 -0
- package/dist/src/components/ValidationMessage/ValidationLink/ValidationLink.d.ts +19 -2
- package/dist/src/components/ValidationMessage/ValidationMessage.d.ts +35 -2
- package/dist/src/components/ValidationMessage/ValidationSummary/ValidationSummary.d.ts +31 -2
- package/dist/src/components/ValidationMessage/index.d.ts +0 -3
- package/dist/src/components/ValidationMessage/meta/Thumbnail.d.ts +2 -0
- package/dist/src/components/ValidationMessage/meta/index.d.ts +7 -0
- package/dist/src/enums.d.ts +79 -5
- package/dist/src/helpers/form/getFormControlValueAsString.d.ts +1 -1
- package/dist/src/helpers/form/getFormControlValueAsStringIfDefined.d.ts +1 -1
- package/dist/src/helpers/label-value/getValueFromLabelValues.d.ts +1 -1
- package/dist/src/helpers/styling/getVariablePadding.d.ts +6 -0
- package/dist/src/helpers/styling/iressCss.d.ts +22 -0
- package/dist/src/helpers/styling/mapGutterToGap.d.ts +3 -0
- package/dist/src/helpers/utility/spreadUnlessUndefined.d.ts +3 -0
- package/dist/src/hooks/useControlledState.d.ts +13 -10
- package/dist/src/hooks/useIdIfNeeded.d.ts +2 -2
- package/dist/src/hooks/useResponsiveProps.d.ts +6 -13
- package/dist/src/interfaces.d.ts +378 -2
- package/dist/src/main.d.ts +7 -5
- package/dist/src/patterns/Form/Form.d.ts +11 -0
- package/dist/src/patterns/Form/Form.styles.d.ts +30 -0
- package/dist/src/patterns/Form/FormContext.d.ts +28 -0
- package/dist/src/patterns/Form/FormField/FormField.d.ts +54 -0
- package/dist/src/patterns/Form/FormField/FormFieldset.d.ts +40 -0
- package/dist/src/patterns/Form/FormField/helpers/getErrorTypeMessage.d.ts +14 -0
- package/dist/src/patterns/Form/FormField/helpers/transformCustomRulesToValidateRule.d.ts +11 -0
- package/dist/src/patterns/Form/FormField/hooks/useFieldRenderProps.d.ts +17 -0
- package/dist/src/patterns/Form/FormValidationSummary/FormValidationSummary.d.ts +15 -0
- package/dist/src/patterns/Form/HookForm/HookForm.d.ts +174 -0
- package/dist/src/patterns/Form/components/LongForm.d.ts +53 -0
- package/dist/src/patterns/Form/components/ShortForm.d.ts +36 -0
- package/dist/src/patterns/Form/index.d.ts +6 -0
- package/dist/src/patterns/Form/meta/Thumbnail.d.ts +2 -0
- package/dist/src/patterns/Form/meta/index.d.ts +7 -0
- package/dist/src/patterns/Loading/Loading.styles.d.ts +185 -0
- package/dist/src/patterns/Loading/components/ComponentLoading.d.ts +2 -2
- package/dist/src/patterns/Loading/components/DefaultLoading.d.ts +2 -2
- package/dist/src/patterns/Loading/components/LongLoading.d.ts +4 -4
- package/dist/src/patterns/Loading/components/PageLoading.d.ts +2 -2
- package/dist/src/patterns/Loading/components/StartUpLoading.d.ts +5 -5
- package/dist/src/patterns/Loading/components/ValidateLoading.d.ts +4 -4
- package/dist/src/patterns/Loading/hooks/useEstimatedProgressValue.d.ts +2 -2
- package/dist/src/patterns/Loading/meta/Thumbnail.d.ts +2 -0
- package/dist/src/patterns/Loading/meta/index.d.ts +7 -0
- package/dist/src/styled-system/css/css.d.ts +22 -0
- package/dist/src/styled-system/css/cva.d.ts +6 -0
- package/dist/src/styled-system/css/cx.d.ts +5 -0
- package/dist/src/styled-system/css/index.d.ts +5 -0
- package/dist/src/styled-system/css/sva.d.ts +4 -0
- package/dist/src/styled-system/jsx/aspect-ratio.d.ts +10 -0
- package/dist/src/styled-system/jsx/bleed.d.ts +10 -0
- package/dist/src/styled-system/jsx/box.d.ts +10 -0
- package/dist/src/styled-system/jsx/center.d.ts +10 -0
- package/dist/src/styled-system/jsx/circle.d.ts +10 -0
- package/dist/src/styled-system/jsx/container.d.ts +10 -0
- package/dist/src/styled-system/jsx/cq.d.ts +10 -0
- package/dist/src/styled-system/jsx/divider.d.ts +10 -0
- package/dist/src/styled-system/jsx/factory.d.ts +3 -0
- package/dist/src/styled-system/jsx/flex.d.ts +10 -0
- package/dist/src/styled-system/jsx/float.d.ts +10 -0
- package/dist/src/styled-system/jsx/grid-item.d.ts +10 -0
- package/dist/src/styled-system/jsx/grid.d.ts +10 -0
- package/dist/src/styled-system/jsx/hstack.d.ts +10 -0
- package/dist/src/styled-system/jsx/index.d.ts +24 -0
- package/dist/src/styled-system/jsx/is-valid-prop.d.ts +11 -0
- package/dist/src/styled-system/jsx/link-overlay.d.ts +10 -0
- package/dist/src/styled-system/jsx/spacer.d.ts +10 -0
- package/dist/src/styled-system/jsx/square.d.ts +10 -0
- package/dist/src/styled-system/jsx/stack.d.ts +10 -0
- package/dist/src/styled-system/jsx/visually-hidden.d.ts +10 -0
- package/dist/src/styled-system/jsx/vstack.d.ts +10 -0
- package/dist/src/styled-system/jsx/wrap.d.ts +10 -0
- package/dist/src/styled-system/patterns/aspect-ratio.d.ts +21 -0
- package/dist/src/styled-system/patterns/bleed.d.ts +22 -0
- package/dist/src/styled-system/patterns/box.d.ts +21 -0
- package/dist/src/styled-system/patterns/center.d.ts +21 -0
- package/dist/src/styled-system/patterns/circle.d.ts +21 -0
- package/dist/src/styled-system/patterns/container.d.ts +21 -0
- package/dist/src/styled-system/patterns/cq.d.ts +22 -0
- package/dist/src/styled-system/patterns/divider.d.ts +23 -0
- package/dist/src/styled-system/patterns/flex.d.ts +27 -0
- package/dist/src/styled-system/patterns/float.d.ts +24 -0
- package/dist/src/styled-system/patterns/grid-item.d.ts +26 -0
- package/dist/src/styled-system/patterns/grid.d.ts +25 -0
- package/dist/src/styled-system/patterns/hstack.d.ts +22 -0
- package/dist/src/styled-system/patterns/index.d.ts +21 -0
- package/dist/src/styled-system/patterns/link-overlay.d.ts +21 -0
- package/dist/src/styled-system/patterns/spacer.d.ts +21 -0
- package/dist/src/styled-system/patterns/square.d.ts +21 -0
- package/dist/src/styled-system/patterns/stack.d.ts +24 -0
- package/dist/src/styled-system/patterns/visually-hidden.d.ts +21 -0
- package/dist/src/styled-system/patterns/vstack.d.ts +22 -0
- package/dist/src/styled-system/patterns/wrap.d.ts +25 -0
- package/dist/src/styled-system/recipes/button.d.ts +38 -0
- package/dist/src/styled-system/recipes/index.d.ts +4 -0
- package/dist/src/styled-system/recipes/table.d.ts +46 -0
- package/dist/src/styled-system/recipes/text.d.ts +35 -0
- package/dist/src/styled-system/tokens/index.d.ts +9 -0
- package/dist/src/styled-system/tokens/tokens.d.ts +30 -0
- package/dist/src/styled-system/types/composition.d.ts +164 -0
- package/dist/src/styled-system/types/conditions.d.ts +334 -0
- package/dist/src/styled-system/types/csstype.d.ts +21298 -0
- package/dist/src/styled-system/types/global.d.ts +20 -0
- package/dist/src/styled-system/types/index.d.ts +8 -0
- package/dist/src/styled-system/types/jsx.d.ts +52 -0
- package/dist/src/styled-system/types/parts.d.ts +8 -0
- package/dist/src/styled-system/types/pattern.d.ts +78 -0
- package/dist/src/styled-system/types/prop-type.d.ts +234 -0
- package/dist/src/styled-system/types/recipe.d.ts +181 -0
- package/dist/src/styled-system/types/selectors.d.ts +59 -0
- package/dist/src/styled-system/types/static-css.d.ts +56 -0
- package/dist/src/styled-system/types/style-props.d.ts +7505 -0
- package/dist/src/styled-system/types/system-types.d.ts +193 -0
- package/dist/src/types.d.ts +13 -3
- package/dist/style.css +1 -1
- package/dist/sva-TRyehFkb.js +32 -0
- package/dist/theme-preset/config-recipes/button.d.ts +6 -0
- package/dist/theme-preset/config-recipes/table.d.ts +1 -0
- package/dist/theme-preset/config-recipes/text.d.ts +1 -0
- package/dist/theme-preset/globalCss.d.ts +1 -0
- package/dist/theme-preset/index.d.ts +2 -0
- package/dist/theme-preset/staticCss.d.ts +2 -0
- package/dist/theme-preset/storybook.d.ts +4 -0
- package/dist/theme-preset/tokens/animationStyles.d.ts +1 -0
- package/dist/theme-preset/tokens/borders.d.ts +50 -0
- package/dist/theme-preset/tokens/breakpoints.d.ts +8 -0
- package/dist/theme-preset/tokens/colors.d.ts +156 -0
- package/dist/theme-preset/tokens/keyframes.d.ts +1 -0
- package/dist/theme-preset/tokens/layerStyles.d.ts +40 -0
- package/dist/theme-preset/tokens/radii.d.ts +42 -0
- package/dist/theme-preset/tokens/sizes.d.ts +246 -0
- package/dist/theme-preset/tokens/spacing.d.ts +100 -0
- package/dist/theme-preset/tokens/textStyles.d.ts +5 -0
- package/dist/theme-preset/tokens/zIndex.d.ts +23 -0
- package/dist/theme-preset/utilities/chevron.d.ts +3 -0
- package/dist/theme-preset/utilities/focusable.d.ts +1 -0
- package/dist/theme-preset/utilities/gutter.d.ts +1 -0
- package/dist/theme-preset/utilities/hide.d.ts +1 -0
- package/dist/theme-preset/utilities/noGutter.d.ts +1 -0
- package/dist/theme-preset/utilities/offset.d.ts +75 -0
- package/dist/theme-preset/utilities/sliderThumb.d.ts +1 -0
- package/dist/theme-preset/utilities/span.d.ts +120 -0
- package/dist/theme-preset/utilities/stretch.d.ts +1 -0
- package/dist/theme-preset/utilities/topLeftTriangle.d.ts +2 -0
- package/dist/typography--vGt_ztU.js +12 -0
- package/package.json +8 -3
- package/dist/AutocompleteNoResults-Z4L_A4F_.js +0 -12
- package/dist/ComboboxHiddenInput-gJl1k-Vp.js +0 -32
- package/dist/FieldAppendToLabel-CNMj7tRY.js +0 -76
- package/dist/InputBase-Dt3vHG19.js +0 -56
- package/dist/Loading.module-PM8ehb0Z.js +0 -13
- package/dist/LoadingSuspense-BjzbePWa.js +0 -5725
- package/dist/LogoFromSrc-Dr3xwNJa.js +0 -59
- package/dist/MenuItem.module-xNOwGiI0.js +0 -24
- package/dist/Popover.module-BzjyEvrY.js +0 -11
- package/dist/PopoverProvider-BqnPfQtY.js +0 -138
- package/dist/SelectControl-IZ6Sl4ap.js +0 -47
- package/dist/SlideoutProvider-CQh140HM.js +0 -200
- package/dist/SliderTicks-8ffd5McY.js +0 -78
- package/dist/TabSet.module-p87tRckl.js +0 -13
- package/dist/Table.module-CdZFi754.js +0 -32
- package/dist/components/Alert/Alert.types.js +0 -9
- package/dist/components/Autocomplete/Autocomplete.types.js +0 -1
- package/dist/components/Autocomplete/components/AutocompleteNoResults.js +0 -5
- package/dist/components/Badge/Badge.types.js +0 -15
- package/dist/components/Button/Button.types.js +0 -20
- package/dist/components/Button/CloseButton/CloseButton.types.js +0 -1
- package/dist/components/ButtonGroup/ButtonGroup.types.js +0 -1
- package/dist/components/ButtonGroup/hooks/useButtonGroup.js +0 -6
- package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +0 -6
- package/dist/components/Card/Card.types.js +0 -5
- package/dist/components/Card/components/ButtonCard.js +0 -38
- package/dist/components/Card/components/LinkCard.js +0 -37
- package/dist/components/Card/helpers/composeIDSCard.js +0 -27
- package/dist/components/Card/helpers/composeIDSCardSlots.js +0 -33
- package/dist/components/Checkbox/Checkbox.types.js +0 -1
- package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +0 -19
- package/dist/components/CheckboxGroup/CheckboxGroup.types.js +0 -11
- package/dist/components/CheckboxGroup/CheckboxGroupContext.js +0 -5
- package/dist/components/CheckboxMark/CheckboxMark.types.js +0 -16
- package/dist/components/Col/Col.types.js +0 -66
- package/dist/components/Combobox/Combobox.js +0 -47
- package/dist/components/Combobox/Combobox.types.js +0 -1
- package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +0 -45
- package/dist/components/Combobox/MultiCombobox/MultiCombobox.types.js +0 -1
- package/dist/components/Combobox/components/ComboboxHiddenInput.js +0 -8
- package/dist/components/Combobox/components/ComboboxResults.js +0 -40
- package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +0 -39
- package/dist/components/Combobox/hooks/useComboboxFlags.js +0 -15
- package/dist/components/Combobox/hooks/useComboboxInlineCompletion.js +0 -63
- package/dist/components/Combobox/index.js +0 -5
- package/dist/components/Container/Container.types.js +0 -4
- package/dist/components/Divider/Divider.types.js +0 -4
- package/dist/components/Expander/Expander.types.js +0 -6
- package/dist/components/Field/Field.types.js +0 -1
- package/dist/components/Field/FieldGroup/FieldGroup.types.js +0 -1
- package/dist/components/Field/components/FieldAppendToLabel.js +0 -42
- package/dist/components/Field/components/FieldLegend.js +0 -6
- package/dist/components/Filter/Filter.types.js +0 -1
- package/dist/components/Form/Form.js +0 -6
- package/dist/components/Form/Form.types.js +0 -4
- package/dist/components/Form/FormField/FormField.js +0 -89
- package/dist/components/Form/FormField/FormFieldset.js +0 -83
- package/dist/components/Form/FormField/helpers/getErrorTypeMessage.js +0 -19
- package/dist/components/Form/HookForm/HookForm.js +0 -12
- package/dist/components/Form/components/FormValidationSummary.js +0 -24
- package/dist/components/Form/index.js +0 -13
- package/dist/components/HeadingWithDeprecatedFallback/HeadingWithDeprecatedFallback.js +0 -14
- package/dist/components/Hide/Hide.types.js +0 -5
- package/dist/components/Hide/helpers/composeHideClasses.js +0 -39
- package/dist/components/Icon/Icon.types.js +0 -31
- package/dist/components/Inline/Inline.types.js +0 -4
- package/dist/components/Input/ClearButton/ClearButton.js +0 -20
- package/dist/components/Input/Input.types.js +0 -16
- package/dist/components/Input/InputBase/InputBase.types.js +0 -1
- package/dist/components/InputCurrency/InputCurrency.types.js +0 -1
- package/dist/components/Label/Label.types.js +0 -1
- package/dist/components/Label/LabelBase/LabelBase.types.js +0 -1
- package/dist/components/Menu/Menu.types.js +0 -10
- package/dist/components/Menu/MenuHeading/MenuHeading.js +0 -8
- package/dist/components/Menu/MenuItem/MenuItem.types.js +0 -6
- package/dist/components/Menu/MenuItem/hooks/useMenuItemAria.js +0 -17
- package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +0 -47
- package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +0 -15
- package/dist/components/Menu/MenuItem/hooks/useMenuItemInteractions.js +0 -67
- package/dist/components/Menu/MenuProvider.js +0 -67
- package/dist/components/Menu/helpers/mapMenuItems.js +0 -47
- package/dist/components/Menu/hooks/useMenu.js +0 -6
- package/dist/components/Menu/hooks/useMenuAria.js +0 -19
- package/dist/components/Menu/hooks/useMenuComposite.js +0 -9
- package/dist/components/Menu/hooks/useMenuRole.js +0 -13
- package/dist/components/Menu/hooks/useMenuStyles.js +0 -26
- package/dist/components/Modal/Modal.types.js +0 -4
- package/dist/components/Navbar/Navbar.js +0 -13
- package/dist/components/Navbar/Navbar.types.js +0 -4
- package/dist/components/Navbar/components/HomeLinkContent.js +0 -6
- package/dist/components/Navbar/components/LogoFromSrc.js +0 -6
- package/dist/components/Navbar/components/NavbarLogo.js +0 -8
- package/dist/components/Navbar/index.js +0 -6
- package/dist/components/Panel/Panel.types.js +0 -12
- package/dist/components/Placeholder/Placeholder.types.js +0 -1
- package/dist/components/Popover/InputPopover/InputPopover.types.js +0 -1
- package/dist/components/Popover/InputPopover/InputPopoverProvider.js +0 -103
- package/dist/components/Popover/Popover.types.js +0 -15
- package/dist/components/Popover/PopoverProvider.js +0 -15
- package/dist/components/Popover/helpers/composePopoverWidth.js +0 -4
- package/dist/components/Popover/hooks/usePopoverState.js +0 -29
- package/dist/components/Progress/Progress.types.js +0 -1
- package/dist/components/Radio/Radio.types.js +0 -1
- package/dist/components/Radio/helpers/mapRadioGroupOptions.js +0 -19
- package/dist/components/RadioGroup/RadioGroup.types.js +0 -12
- package/dist/components/RadioGroup/RadioGroupContext.js +0 -5
- package/dist/components/Readonly/Readonly.types.js +0 -1
- package/dist/components/RichSelect/RichSelect.types.js +0 -1
- package/dist/components/RichSelect/SelectBody/SelectBody.types.js +0 -1
- package/dist/components/RichSelect/SelectCreate/SelectCreate.types.js +0 -1
- package/dist/components/RichSelect/SelectHeading/SelectHeading.types.js +0 -1
- package/dist/components/RichSelect/SelectLabel/SelectLabel.types.js +0 -1
- package/dist/components/RichSelect/SelectMenu/SelectMenu.types.js +0 -1
- package/dist/components/RichSelect/SelectSearch/SelectSearch.types.js +0 -1
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.types.js +0 -1
- package/dist/components/RichSelect/SelectTags/SelectTags.types.js +0 -1
- package/dist/components/Row/Row.types.js +0 -4
- package/dist/components/Select/Select.types.js +0 -1
- package/dist/components/Select/helpers/mapSelectOptions.js +0 -21
- package/dist/components/Skeleton/Skeleton.types.js +0 -6
- package/dist/components/SkipLink/SkipLink.types.js +0 -1
- package/dist/components/Slideout/Slideout.types.js +0 -14
- package/dist/components/Slideout/hooks/useIDSProvidedSlideout.js +0 -13
- package/dist/components/Slider/Slider.types.js +0 -1
- package/dist/components/Spinner/Spinner.types.js +0 -1
- package/dist/components/Stack/Stack.types.js +0 -4
- package/dist/components/TabSet/Tab/Tab.types.js +0 -1
- package/dist/components/TabSet/TabSet.types.js +0 -6
- package/dist/components/TabSet/components/TabSetItem.js +0 -45
- package/dist/components/TabSet/helpers/mapTabs.js +0 -33
- package/dist/components/TabSet/hooks/useTabSetItems.js +0 -6
- package/dist/components/Table/Table.types.js +0 -23
- package/dist/components/Table/TableBody/TableBody.types.js +0 -1
- package/dist/components/Table/TableContext.js +0 -11
- package/dist/components/Table/TableFormattedValue/TableFormattedValue.types.js +0 -1
- package/dist/components/Table/helpers/composeIDSTableColumnDefs.js +0 -42
- package/dist/components/Table/helpers/composeIDSTableInitialSorting.js +0 -10
- package/dist/components/Table/helpers/findColumnByKey.js +0 -4
- package/dist/components/Table/helpers/getFormatFromValue.js +0 -11
- package/dist/components/Table/helpers/hasColumns.js +0 -4
- package/dist/components/Table/hooks/useIDSTableColumnSort.js +0 -24
- package/dist/components/Table/hooks/useIDSTableColumnStyles.js +0 -25
- package/dist/components/Table/hooks/useTable.js +0 -6
- package/dist/components/Tag/Tag.types.js +0 -1
- package/dist/components/Tag/TagInput/TagInput.types.js +0 -1
- package/dist/components/Tag/components/TagListInput/TagListInput.js +0 -8
- package/dist/components/Tag/components/TagListInput/TagListInput.types.js +0 -1
- package/dist/components/Text/Text.types.js +0 -19
- package/dist/components/Toaster/Toast/Toast.js +0 -13
- package/dist/components/Toaster/Toast/Toast.types.js +0 -10
- package/dist/components/Toaster/Toast/ToastAnimated.js +0 -9
- package/dist/components/Toaster/Toast/ToastIcon.js +0 -6
- package/dist/components/Toaster/Toaster.types.js +0 -26
- package/dist/components/Toggle/Toggle.types.js +0 -11
- package/dist/components/Tooltip/Tooltip.types.js +0 -1
- package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +0 -51
- package/dist/components/ValidationMessage/ValidationBase/ValidationBase.types.js +0 -1
- package/dist/components/ValidationMessage/ValidationLink/ValidationLink.types.js +0 -1
- package/dist/components/ValidationMessage/ValidationMessage.types.js +0 -1
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.types.js +0 -1
- package/dist/floating-ui.react-nmA48tb2.js +0 -3463
- package/dist/index-2QXL0WYc.js +0 -45
- package/dist/index-CtOScEKX.js +0 -57
- package/dist/src/components/Alert/Alert.types.d.ts +0 -41
- package/dist/src/components/Autocomplete/Autocomplete.types.d.ts +0 -144
- package/dist/src/components/Autocomplete/components/AutocompleteNoResults.d.ts +0 -2
- package/dist/src/components/Badge/Badge.types.d.ts +0 -37
- package/dist/src/components/Button/Button.types.d.ts +0 -106
- package/dist/src/components/Button/CloseButton/CloseButton.types.d.ts +0 -8
- package/dist/src/components/ButtonGroup/ButtonGroup.types.d.ts +0 -63
- package/dist/src/components/ButtonGroup/hooks/useButtonGroup.d.ts +0 -1
- package/dist/src/components/ButtonGroup/hooks/useIDSButtonGroupItem.d.ts +0 -2
- package/dist/src/components/Card/Card.types.d.ts +0 -91
- package/dist/src/components/Card/components/ButtonCard.d.ts +0 -2
- package/dist/src/components/Card/components/LinkCard.d.ts +0 -2
- package/dist/src/components/Card/helpers/composeIDSCard.d.ts +0 -3
- package/dist/src/components/Card/helpers/composeIDSCardSlots.d.ts +0 -2
- package/dist/src/components/Checkbox/Checkbox.types.d.ts +0 -65
- package/dist/src/components/Checkbox/helpers/mapCheckboxGroupOptions.d.ts +0 -5
- package/dist/src/components/CheckboxGroup/CheckboxGroup.types.d.ts +0 -70
- package/dist/src/components/CheckboxGroup/CheckboxGroupContext.d.ts +0 -2
- package/dist/src/components/CheckboxMark/CheckboxMark.types.d.ts +0 -11
- package/dist/src/components/Col/Col.types.d.ts +0 -78
- package/dist/src/components/Combobox/Combobox.d.ts +0 -6
- package/dist/src/components/Combobox/Combobox.types.d.ts +0 -55
- package/dist/src/components/Combobox/MultiCombobox/MultiCombobox.d.ts +0 -6
- package/dist/src/components/Combobox/MultiCombobox/MultiCombobox.types.d.ts +0 -27
- package/dist/src/components/Combobox/components/ComboboxHiddenInput.d.ts +0 -2
- package/dist/src/components/Combobox/components/ComboboxResults.d.ts +0 -2
- package/dist/src/components/Combobox/components/ComboboxResultsDescriptor.d.ts +0 -2
- package/dist/src/components/Combobox/hooks/useComboboxFlags.d.ts +0 -5
- package/dist/src/components/Combobox/hooks/useComboboxInlineCompletion.d.ts +0 -2
- package/dist/src/components/Combobox/index.d.ts +0 -4
- package/dist/src/components/Container/Container.types.d.ts +0 -15
- package/dist/src/components/Divider/Divider.types.d.ts +0 -17
- package/dist/src/components/Expander/Expander.types.d.ts +0 -39
- package/dist/src/components/Field/Field.types.d.ts +0 -34
- package/dist/src/components/Field/FieldGroup/FieldGroup.types.d.ts +0 -15
- package/dist/src/components/Field/components/FieldAppendToLabel.d.ts +0 -2
- package/dist/src/components/Field/components/FieldLegend.d.ts +0 -2
- package/dist/src/components/Filter/Filter.types.d.ts +0 -71
- package/dist/src/components/Form/Form.d.ts +0 -11
- package/dist/src/components/Form/Form.types.d.ts +0 -188
- package/dist/src/components/Form/FormContext.d.ts +0 -8
- package/dist/src/components/Form/FormField/FormField.d.ts +0 -7
- package/dist/src/components/Form/FormField/FormField.types.d.ts +0 -105
- package/dist/src/components/Form/FormField/FormFieldset.d.ts +0 -7
- package/dist/src/components/Form/FormField/helpers/getErrorTypeMessage.d.ts +0 -2
- package/dist/src/components/Form/FormField/helpers/transformCustomRulesToValidateRule.d.ts +0 -3
- package/dist/src/components/Form/HookForm/HookForm.d.ts +0 -5
- package/dist/src/components/Form/components/FormValidationSummary.d.ts +0 -5
- package/dist/src/components/Form/index.d.ts +0 -6
- package/dist/src/components/HeadingWithDeprecatedFallback/HeadingWithDeprecatedFallback.d.ts +0 -10
- package/dist/src/components/Hide/Hide.types.d.ts +0 -24
- package/dist/src/components/Hide/helpers/composeHideClasses.d.ts +0 -4
- package/dist/src/components/Icon/Icon.types.d.ts +0 -99
- package/dist/src/components/Inline/Inline.types.d.ts +0 -41
- package/dist/src/components/Input/ClearButton/ClearButton.d.ts +0 -4
- package/dist/src/components/Input/Input.types.d.ts +0 -73
- package/dist/src/components/Input/InputBase/InputBase.types.d.ts +0 -15
- package/dist/src/components/InputCurrency/InputCurrency.types.d.ts +0 -23
- package/dist/src/components/Label/Label.types.d.ts +0 -15
- package/dist/src/components/Label/LabelBase/LabelBase.types.d.ts +0 -35
- package/dist/src/components/Menu/Menu.types.d.ts +0 -130
- package/dist/src/components/Menu/MenuHeading/MenuHeading.d.ts +0 -2
- package/dist/src/components/Menu/MenuItem/MenuItem.types.d.ts +0 -122
- package/dist/src/components/Menu/MenuItem/hooks/useMenuItemAria.d.ts +0 -11
- package/dist/src/components/Menu/MenuItem/hooks/useMenuItemButtonProps.d.ts +0 -14
- package/dist/src/components/Menu/MenuItem/hooks/useMenuItemComposite.d.ts +0 -20
- package/dist/src/components/Menu/MenuItem/hooks/useMenuItemInteractions.d.ts +0 -11
- package/dist/src/components/Menu/MenuProvider.d.ts +0 -3
- package/dist/src/components/Menu/helpers/mapMenuItems.d.ts +0 -6
- package/dist/src/components/Menu/hooks/useMenu.d.ts +0 -1
- package/dist/src/components/Menu/hooks/useMenuAria.d.ts +0 -11
- package/dist/src/components/Menu/hooks/useMenuComposite.d.ts +0 -18
- package/dist/src/components/Menu/hooks/useMenuRole.d.ts +0 -12
- package/dist/src/components/Menu/hooks/useMenuStyles.d.ts +0 -11
- package/dist/src/components/Modal/Modal.types.d.ts +0 -105
- package/dist/src/components/Modal/hooks/useIDSProvidedModal.d.ts +0 -5
- package/dist/src/components/Navbar/Navbar.d.ts +0 -2
- package/dist/src/components/Navbar/Navbar.types.d.ts +0 -65
- package/dist/src/components/Navbar/components/HomeLinkContent.d.ts +0 -7
- package/dist/src/components/Navbar/components/LogoFromSrc.d.ts +0 -6
- package/dist/src/components/Navbar/components/NavbarLogo.d.ts +0 -8
- package/dist/src/components/Navbar/index.d.ts +0 -2
- package/dist/src/components/Panel/Panel.types.d.ts +0 -59
- package/dist/src/components/Placeholder/Placeholder.types.d.ts +0 -24
- package/dist/src/components/Popover/InputPopover/InputPopover.types.d.ts +0 -26
- package/dist/src/components/Popover/InputPopover/InputPopoverProvider.d.ts +0 -2
- package/dist/src/components/Popover/Popover.types.d.ts +0 -177
- package/dist/src/components/Popover/PopoverProvider.d.ts +0 -3
- package/dist/src/components/Popover/helpers/composePopoverWidth.d.ts +0 -2
- package/dist/src/components/Popover/hooks/usePopoverState.d.ts +0 -10
- package/dist/src/components/Progress/Progress.types.d.ts +0 -23
- package/dist/src/components/Radio/Radio.types.d.ts +0 -45
- package/dist/src/components/Radio/helpers/mapRadioGroupOptions.d.ts +0 -5
- package/dist/src/components/RadioGroup/RadioGroup.types.d.ts +0 -70
- package/dist/src/components/RadioGroup/RadioGroupContext.d.ts +0 -2
- package/dist/src/components/Readonly/Readonly.types.d.ts +0 -10
- package/dist/src/components/RichSelect/RichSelect.types.d.ts +0 -181
- package/dist/src/components/RichSelect/SelectBody/SelectBody.types.d.ts +0 -12
- package/dist/src/components/RichSelect/SelectCreate/SelectCreate.types.d.ts +0 -29
- package/dist/src/components/RichSelect/SelectHeading/SelectHeading.types.d.ts +0 -17
- package/dist/src/components/RichSelect/SelectLabel/SelectLabel.types.d.ts +0 -3
- package/dist/src/components/RichSelect/SelectMenu/SelectMenu.types.d.ts +0 -49
- package/dist/src/components/RichSelect/SelectSearch/SelectSearch.types.d.ts +0 -2
- package/dist/src/components/RichSelect/SelectSearchInput/SelectSearchInput.types.d.ts +0 -18
- package/dist/src/components/RichSelect/SelectTags/SelectTags.types.d.ts +0 -27
- package/dist/src/components/Row/Row.types.d.ts +0 -42
- package/dist/src/components/Select/Select.types.d.ts +0 -89
- package/dist/src/components/Select/helpers/mapSelectOptions.d.ts +0 -3
- package/dist/src/components/Skeleton/Skeleton.types.d.ts +0 -36
- package/dist/src/components/SkipLink/SkipLink.types.d.ts +0 -22
- package/dist/src/components/Slideout/Slideout.types.d.ts +0 -150
- package/dist/src/components/Slideout/hooks/useIDSProvidedSlideout.d.ts +0 -5
- package/dist/src/components/Slider/Slider.types.d.ts +0 -94
- package/dist/src/components/Spinner/Spinner.types.d.ts +0 -13
- package/dist/src/components/Stack/Stack.types.d.ts +0 -22
- package/dist/src/components/TabSet/Tab/Tab.types.d.ts +0 -21
- package/dist/src/components/TabSet/TabSet.types.d.ts +0 -84
- package/dist/src/components/TabSet/components/TabSetItem.d.ts +0 -2
- package/dist/src/components/TabSet/helpers/mapTabs.d.ts +0 -3
- package/dist/src/components/TabSet/hooks/useTabSetItems.d.ts +0 -1
- package/dist/src/components/Table/Table.types.d.ts +0 -199
- package/dist/src/components/Table/TableBody/TableBody.types.d.ts +0 -29
- package/dist/src/components/Table/TableContext.d.ts +0 -2
- package/dist/src/components/Table/TableFormattedValue/TableFormattedValue.types.d.ts +0 -30
- package/dist/src/components/Table/helpers/composeIDSTableColumnDefs.d.ts +0 -2
- package/dist/src/components/Table/helpers/composeIDSTableInitialSorting.d.ts +0 -3
- package/dist/src/components/Table/helpers/findColumnByKey.d.ts +0 -2
- package/dist/src/components/Table/helpers/getFormatFromValue.d.ts +0 -2
- package/dist/src/components/Table/helpers/hasColumns.d.ts +0 -2
- package/dist/src/components/Table/hooks/useIDSTableColumnSort.d.ts +0 -2
- package/dist/src/components/Table/hooks/useIDSTableColumnStyles.d.ts +0 -2
- package/dist/src/components/Table/hooks/useTable.d.ts +0 -1
- package/dist/src/components/Tag/Tag.types.d.ts +0 -25
- package/dist/src/components/Tag/TagInput/TagInput.types.d.ts +0 -21
- package/dist/src/components/Tag/components/TagListInput/TagListInput.d.ts +0 -3
- package/dist/src/components/Tag/components/TagListInput/TagListInput.types.d.ts +0 -45
- package/dist/src/components/Text/Text.types.d.ts +0 -45
- package/dist/src/components/Toaster/Toast/Toast.d.ts +0 -3
- package/dist/src/components/Toaster/Toast/Toast.types.d.ts +0 -95
- package/dist/src/components/Toaster/Toast/ToastAnimated.d.ts +0 -2
- package/dist/src/components/Toaster/Toast/ToastIcon.d.ts +0 -6
- package/dist/src/components/Toaster/Toaster.types.d.ts +0 -37
- package/dist/src/components/Toggle/Toggle.types.d.ts +0 -45
- package/dist/src/components/Tooltip/Tooltip.types.d.ts +0 -33
- package/dist/src/components/ValidationMessage/ValidationBase/ValidationBase.d.ts +0 -2
- package/dist/src/components/ValidationMessage/ValidationBase/ValidationBase.types.d.ts +0 -27
- package/dist/src/components/ValidationMessage/ValidationLink/ValidationLink.types.d.ts +0 -12
- package/dist/src/components/ValidationMessage/ValidationMessage.types.d.ts +0 -13
- package/dist/src/components/ValidationMessage/ValidationSummary/ValidationSummary.types.d.ts +0 -27
- package/dist/useIDSButtonGroupItem-NdNvcZnJ.js +0 -30
- /package/dist/{components → patterns}/Form/FormContext.js +0 -0
- /package/dist/{components → patterns}/Form/FormField/helpers/transformCustomRulesToValidateRule.js +0 -0
- /package/dist/{components → patterns}/Form/hooks/useNoDefaultValueInForms.js +0 -0
- /package/dist/src/{components → patterns}/Form/hooks/useNoDefaultValueInForms.d.ts +0 -0
|
@@ -0,0 +1,3462 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import { useLayoutEffect as Un } from "react";
|
|
3
|
+
import { t as At, i as Gn, f as Sr } from "./index.esm-BnSuefUA.js";
|
|
4
|
+
import { jsx as me, jsxs as jn, Fragment as Pr } from "react/jsx-runtime";
|
|
5
|
+
import * as tn from "react-dom";
|
|
6
|
+
function Mt() {
|
|
7
|
+
return typeof window < "u";
|
|
8
|
+
}
|
|
9
|
+
function Ve(e) {
|
|
10
|
+
return nn(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
11
|
+
}
|
|
12
|
+
function pe(e) {
|
|
13
|
+
var t;
|
|
14
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
15
|
+
}
|
|
16
|
+
function Te(e) {
|
|
17
|
+
var t;
|
|
18
|
+
return (t = (nn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
19
|
+
}
|
|
20
|
+
function nn(e) {
|
|
21
|
+
return Mt() ? e instanceof Node || e instanceof pe(e).Node : !1;
|
|
22
|
+
}
|
|
23
|
+
function X(e) {
|
|
24
|
+
return Mt() ? e instanceof Element || e instanceof pe(e).Element : !1;
|
|
25
|
+
}
|
|
26
|
+
function ne(e) {
|
|
27
|
+
return Mt() ? e instanceof HTMLElement || e instanceof pe(e).HTMLElement : !1;
|
|
28
|
+
}
|
|
29
|
+
function Xt(e) {
|
|
30
|
+
return !Mt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof pe(e).ShadowRoot;
|
|
31
|
+
}
|
|
32
|
+
const Dr = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
33
|
+
function ut(e) {
|
|
34
|
+
const {
|
|
35
|
+
overflow: t,
|
|
36
|
+
overflowX: n,
|
|
37
|
+
overflowY: r,
|
|
38
|
+
display: o
|
|
39
|
+
} = we(e);
|
|
40
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !Dr.has(o);
|
|
41
|
+
}
|
|
42
|
+
const kr = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
43
|
+
function Lr(e) {
|
|
44
|
+
return kr.has(Ve(e));
|
|
45
|
+
}
|
|
46
|
+
const Fr = [":popover-open", ":modal"];
|
|
47
|
+
function St(e) {
|
|
48
|
+
return Fr.some((t) => {
|
|
49
|
+
try {
|
|
50
|
+
return e.matches(t);
|
|
51
|
+
} catch {
|
|
52
|
+
return !1;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const Nr = ["transform", "translate", "scale", "rotate", "perspective"], _r = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Vr = ["paint", "layout", "strict", "content"];
|
|
57
|
+
function rn(e) {
|
|
58
|
+
const t = Pt(), n = X(e) ? we(e) : e;
|
|
59
|
+
return Nr.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || _r.some((r) => (n.willChange || "").includes(r)) || Vr.some((r) => (n.contain || "").includes(r));
|
|
60
|
+
}
|
|
61
|
+
function Wr(e) {
|
|
62
|
+
let t = Pe(e);
|
|
63
|
+
for (; ne(t) && !Se(t); ) {
|
|
64
|
+
if (rn(t))
|
|
65
|
+
return t;
|
|
66
|
+
if (St(t))
|
|
67
|
+
return null;
|
|
68
|
+
t = Pe(t);
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
function Pt() {
|
|
73
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
74
|
+
}
|
|
75
|
+
const Kr = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
76
|
+
function Se(e) {
|
|
77
|
+
return Kr.has(Ve(e));
|
|
78
|
+
}
|
|
79
|
+
function we(e) {
|
|
80
|
+
return pe(e).getComputedStyle(e);
|
|
81
|
+
}
|
|
82
|
+
function Dt(e) {
|
|
83
|
+
return X(e) ? {
|
|
84
|
+
scrollLeft: e.scrollLeft,
|
|
85
|
+
scrollTop: e.scrollTop
|
|
86
|
+
} : {
|
|
87
|
+
scrollLeft: e.scrollX,
|
|
88
|
+
scrollTop: e.scrollY
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function Pe(e) {
|
|
92
|
+
if (Ve(e) === "html")
|
|
93
|
+
return e;
|
|
94
|
+
const t = (
|
|
95
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
96
|
+
e.assignedSlot || // DOM Element detected.
|
|
97
|
+
e.parentNode || // ShadowRoot detected.
|
|
98
|
+
Xt(e) && e.host || // Fallback.
|
|
99
|
+
Te(e)
|
|
100
|
+
);
|
|
101
|
+
return Xt(t) ? t.host : t;
|
|
102
|
+
}
|
|
103
|
+
function qn(e) {
|
|
104
|
+
const t = Pe(e);
|
|
105
|
+
return Se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ne(t) && ut(t) ? t : qn(t);
|
|
106
|
+
}
|
|
107
|
+
function Le(e, t, n) {
|
|
108
|
+
var r;
|
|
109
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
110
|
+
const o = qn(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = pe(o);
|
|
111
|
+
if (s) {
|
|
112
|
+
const c = Jt(i);
|
|
113
|
+
return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ? Le(c) : []);
|
|
114
|
+
}
|
|
115
|
+
return t.concat(o, Le(o, [], n));
|
|
116
|
+
}
|
|
117
|
+
function Jt(e) {
|
|
118
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
119
|
+
}
|
|
120
|
+
const $r = ["top", "right", "bottom", "left"], pn = ["start", "end"], gn = /* @__PURE__ */ $r.reduce((e, t) => e.concat(t, t + "-" + pn[0], t + "-" + pn[1]), []), Je = Math.min, he = Math.max, xt = Math.round, je = Math.floor, Ee = (e) => ({
|
|
121
|
+
x: e,
|
|
122
|
+
y: e
|
|
123
|
+
}), Br = {
|
|
124
|
+
left: "right",
|
|
125
|
+
right: "left",
|
|
126
|
+
bottom: "top",
|
|
127
|
+
top: "bottom"
|
|
128
|
+
}, Hr = {
|
|
129
|
+
start: "end",
|
|
130
|
+
end: "start"
|
|
131
|
+
};
|
|
132
|
+
function hn(e, t, n) {
|
|
133
|
+
return he(e, Je(t, n));
|
|
134
|
+
}
|
|
135
|
+
function Qe(e, t) {
|
|
136
|
+
return typeof e == "function" ? e(t) : e;
|
|
137
|
+
}
|
|
138
|
+
function Ce(e) {
|
|
139
|
+
return e.split("-")[0];
|
|
140
|
+
}
|
|
141
|
+
function Ie(e) {
|
|
142
|
+
return e.split("-")[1];
|
|
143
|
+
}
|
|
144
|
+
function Yn(e) {
|
|
145
|
+
return e === "x" ? "y" : "x";
|
|
146
|
+
}
|
|
147
|
+
function Xn(e) {
|
|
148
|
+
return e === "y" ? "height" : "width";
|
|
149
|
+
}
|
|
150
|
+
const zr = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
151
|
+
function Me(e) {
|
|
152
|
+
return zr.has(Ce(e)) ? "y" : "x";
|
|
153
|
+
}
|
|
154
|
+
function Jn(e) {
|
|
155
|
+
return Yn(Me(e));
|
|
156
|
+
}
|
|
157
|
+
function Qn(e, t, n) {
|
|
158
|
+
n === void 0 && (n = !1);
|
|
159
|
+
const r = Ie(e), o = Jn(e), s = Xn(o);
|
|
160
|
+
let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
161
|
+
return t.reference[s] > t.floating[s] && (i = Et(i)), [i, Et(i)];
|
|
162
|
+
}
|
|
163
|
+
function Ur(e) {
|
|
164
|
+
const t = Et(e);
|
|
165
|
+
return [Rt(e), t, Rt(t)];
|
|
166
|
+
}
|
|
167
|
+
function Rt(e) {
|
|
168
|
+
return e.replace(/start|end/g, (t) => Hr[t]);
|
|
169
|
+
}
|
|
170
|
+
const vn = ["left", "right"], bn = ["right", "left"], Gr = ["top", "bottom"], jr = ["bottom", "top"];
|
|
171
|
+
function qr(e, t, n) {
|
|
172
|
+
switch (e) {
|
|
173
|
+
case "top":
|
|
174
|
+
case "bottom":
|
|
175
|
+
return n ? t ? bn : vn : t ? vn : bn;
|
|
176
|
+
case "left":
|
|
177
|
+
case "right":
|
|
178
|
+
return t ? Gr : jr;
|
|
179
|
+
default:
|
|
180
|
+
return [];
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function Yr(e, t, n, r) {
|
|
184
|
+
const o = Ie(e);
|
|
185
|
+
let s = qr(Ce(e), n === "start", r);
|
|
186
|
+
return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Rt)))), s;
|
|
187
|
+
}
|
|
188
|
+
function Et(e) {
|
|
189
|
+
return e.replace(/left|right|bottom|top/g, (t) => Br[t]);
|
|
190
|
+
}
|
|
191
|
+
function Xr(e) {
|
|
192
|
+
return {
|
|
193
|
+
top: 0,
|
|
194
|
+
right: 0,
|
|
195
|
+
bottom: 0,
|
|
196
|
+
left: 0,
|
|
197
|
+
...e
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function Jr(e) {
|
|
201
|
+
return typeof e != "number" ? Xr(e) : {
|
|
202
|
+
top: e,
|
|
203
|
+
right: e,
|
|
204
|
+
bottom: e,
|
|
205
|
+
left: e
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function It(e) {
|
|
209
|
+
const {
|
|
210
|
+
x: t,
|
|
211
|
+
y: n,
|
|
212
|
+
width: r,
|
|
213
|
+
height: o
|
|
214
|
+
} = e;
|
|
215
|
+
return {
|
|
216
|
+
width: r,
|
|
217
|
+
height: o,
|
|
218
|
+
top: n,
|
|
219
|
+
left: t,
|
|
220
|
+
right: t + r,
|
|
221
|
+
bottom: n + o,
|
|
222
|
+
x: t,
|
|
223
|
+
y: n
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function on() {
|
|
227
|
+
const e = navigator.userAgentData;
|
|
228
|
+
return e != null && e.platform ? e.platform : navigator.platform;
|
|
229
|
+
}
|
|
230
|
+
function Zn() {
|
|
231
|
+
const e = navigator.userAgentData;
|
|
232
|
+
return e && Array.isArray(e.brands) ? e.brands.map((t) => {
|
|
233
|
+
let {
|
|
234
|
+
brand: n,
|
|
235
|
+
version: r
|
|
236
|
+
} = t;
|
|
237
|
+
return n + "/" + r;
|
|
238
|
+
}).join(" ") : navigator.userAgent;
|
|
239
|
+
}
|
|
240
|
+
function er() {
|
|
241
|
+
return /apple/i.test(navigator.vendor);
|
|
242
|
+
}
|
|
243
|
+
function Qt() {
|
|
244
|
+
const e = /android/i;
|
|
245
|
+
return e.test(on()) || e.test(Zn());
|
|
246
|
+
}
|
|
247
|
+
function Qr() {
|
|
248
|
+
return on().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
|
|
249
|
+
}
|
|
250
|
+
function tr() {
|
|
251
|
+
return Zn().includes("jsdom/");
|
|
252
|
+
}
|
|
253
|
+
const yn = "data-floating-ui-focusable", Zr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", _t = "ArrowLeft", Vt = "ArrowRight", eo = "ArrowUp", to = "ArrowDown";
|
|
254
|
+
function Re(e) {
|
|
255
|
+
let t = e.activeElement;
|
|
256
|
+
for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
|
|
257
|
+
var n;
|
|
258
|
+
t = t.shadowRoot.activeElement;
|
|
259
|
+
}
|
|
260
|
+
return t;
|
|
261
|
+
}
|
|
262
|
+
function ce(e, t) {
|
|
263
|
+
if (!e || !t)
|
|
264
|
+
return !1;
|
|
265
|
+
const n = t.getRootNode == null ? void 0 : t.getRootNode();
|
|
266
|
+
if (e.contains(t))
|
|
267
|
+
return !0;
|
|
268
|
+
if (n && Xt(n)) {
|
|
269
|
+
let r = t;
|
|
270
|
+
for (; r; ) {
|
|
271
|
+
if (e === r)
|
|
272
|
+
return !0;
|
|
273
|
+
r = r.parentNode || r.host;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return !1;
|
|
277
|
+
}
|
|
278
|
+
function Ae(e) {
|
|
279
|
+
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
280
|
+
}
|
|
281
|
+
function Wt(e, t) {
|
|
282
|
+
if (t == null)
|
|
283
|
+
return !1;
|
|
284
|
+
if ("composedPath" in e)
|
|
285
|
+
return e.composedPath().includes(t);
|
|
286
|
+
const n = e;
|
|
287
|
+
return n.target != null && t.contains(n.target);
|
|
288
|
+
}
|
|
289
|
+
function no(e) {
|
|
290
|
+
return e.matches("html,body");
|
|
291
|
+
}
|
|
292
|
+
function le(e) {
|
|
293
|
+
return (e == null ? void 0 : e.ownerDocument) || document;
|
|
294
|
+
}
|
|
295
|
+
function sn(e) {
|
|
296
|
+
return ne(e) && e.matches(Zr);
|
|
297
|
+
}
|
|
298
|
+
function Zt(e) {
|
|
299
|
+
return e ? e.getAttribute("role") === "combobox" && sn(e) : !1;
|
|
300
|
+
}
|
|
301
|
+
function ro(e) {
|
|
302
|
+
if (!e || tr()) return !0;
|
|
303
|
+
try {
|
|
304
|
+
return e.matches(":focus-visible");
|
|
305
|
+
} catch {
|
|
306
|
+
return !0;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
function Ct(e) {
|
|
310
|
+
return e ? e.hasAttribute(yn) ? e : e.querySelector("[" + yn + "]") || e : null;
|
|
311
|
+
}
|
|
312
|
+
function $e(e, t, n) {
|
|
313
|
+
return n === void 0 && (n = !0), e.filter((o) => {
|
|
314
|
+
var s;
|
|
315
|
+
return o.parentId === t && (!n || ((s = o.context) == null ? void 0 : s.open));
|
|
316
|
+
}).flatMap((o) => [o, ...$e(e, o.id, n)]);
|
|
317
|
+
}
|
|
318
|
+
function oo(e, t) {
|
|
319
|
+
let n, r = -1;
|
|
320
|
+
function o(s, i) {
|
|
321
|
+
i > r && (n = s, r = i), $e(e, s).forEach((a) => {
|
|
322
|
+
o(a.id, i + 1);
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
return o(t, 0), e.find((s) => s.id === n);
|
|
326
|
+
}
|
|
327
|
+
function wn(e, t) {
|
|
328
|
+
var n;
|
|
329
|
+
let r = [], o = (n = e.find((s) => s.id === t)) == null ? void 0 : n.parentId;
|
|
330
|
+
for (; o; ) {
|
|
331
|
+
const s = e.find((i) => i.id === o);
|
|
332
|
+
o = s == null ? void 0 : s.parentId, s && (r = r.concat(s));
|
|
333
|
+
}
|
|
334
|
+
return r;
|
|
335
|
+
}
|
|
336
|
+
function de(e) {
|
|
337
|
+
e.preventDefault(), e.stopPropagation();
|
|
338
|
+
}
|
|
339
|
+
function io(e) {
|
|
340
|
+
return "nativeEvent" in e;
|
|
341
|
+
}
|
|
342
|
+
function nr(e) {
|
|
343
|
+
return e.mozInputSource === 0 && e.isTrusted ? !0 : Qt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
344
|
+
}
|
|
345
|
+
function rr(e) {
|
|
346
|
+
return tr() ? !1 : !Qt() && e.width === 0 && e.height === 0 || Qt() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
|
|
347
|
+
e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
|
|
348
|
+
}
|
|
349
|
+
function it(e, t) {
|
|
350
|
+
const n = ["mouse", "pen"];
|
|
351
|
+
return t || n.push("", void 0), n.includes(e);
|
|
352
|
+
}
|
|
353
|
+
var so = typeof document < "u", co = function() {
|
|
354
|
+
}, Y = so ? Un : co;
|
|
355
|
+
const uo = {
|
|
356
|
+
...f
|
|
357
|
+
};
|
|
358
|
+
function ye(e) {
|
|
359
|
+
const t = f.useRef(e);
|
|
360
|
+
return Y(() => {
|
|
361
|
+
t.current = e;
|
|
362
|
+
}), t;
|
|
363
|
+
}
|
|
364
|
+
const lo = uo.useInsertionEffect, ao = lo || ((e) => e());
|
|
365
|
+
function ie(e) {
|
|
366
|
+
const t = f.useRef(() => {
|
|
367
|
+
if (process.env.NODE_ENV !== "production")
|
|
368
|
+
throw new Error("Cannot call an event handler while rendering.");
|
|
369
|
+
});
|
|
370
|
+
return ao(() => {
|
|
371
|
+
t.current = e;
|
|
372
|
+
}), f.useCallback(function() {
|
|
373
|
+
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
374
|
+
r[o] = arguments[o];
|
|
375
|
+
return t.current == null ? void 0 : t.current(...r);
|
|
376
|
+
}, []);
|
|
377
|
+
}
|
|
378
|
+
function pt(e, t, n) {
|
|
379
|
+
return Math.floor(e / t) !== n;
|
|
380
|
+
}
|
|
381
|
+
function qe(e, t) {
|
|
382
|
+
return t < 0 || t >= e.current.length;
|
|
383
|
+
}
|
|
384
|
+
function yt(e, t) {
|
|
385
|
+
return ue(e, {
|
|
386
|
+
disabledIndices: t
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
function en(e, t) {
|
|
390
|
+
return ue(e, {
|
|
391
|
+
decrement: !0,
|
|
392
|
+
startingIndex: e.current.length,
|
|
393
|
+
disabledIndices: t
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
function ue(e, t) {
|
|
397
|
+
let {
|
|
398
|
+
startingIndex: n = -1,
|
|
399
|
+
decrement: r = !1,
|
|
400
|
+
disabledIndices: o,
|
|
401
|
+
amount: s = 1
|
|
402
|
+
} = t === void 0 ? {} : t, i = n;
|
|
403
|
+
do
|
|
404
|
+
i += r ? -s : s;
|
|
405
|
+
while (i >= 0 && i <= e.current.length - 1 && Be(e, i, o));
|
|
406
|
+
return i;
|
|
407
|
+
}
|
|
408
|
+
function or(e, t) {
|
|
409
|
+
let {
|
|
410
|
+
event: n,
|
|
411
|
+
orientation: r,
|
|
412
|
+
loop: o,
|
|
413
|
+
rtl: s,
|
|
414
|
+
cols: i,
|
|
415
|
+
disabledIndices: c,
|
|
416
|
+
minIndex: a,
|
|
417
|
+
maxIndex: u,
|
|
418
|
+
prevIndex: l,
|
|
419
|
+
stopEvent: m = !1
|
|
420
|
+
} = t, g = l;
|
|
421
|
+
if (n.key === eo) {
|
|
422
|
+
if (m && de(n), l === -1)
|
|
423
|
+
g = u;
|
|
424
|
+
else if (g = ue(e, {
|
|
425
|
+
startingIndex: g,
|
|
426
|
+
amount: i,
|
|
427
|
+
decrement: !0,
|
|
428
|
+
disabledIndices: c
|
|
429
|
+
}), o && (l - i < a || g < 0)) {
|
|
430
|
+
const d = l % i, v = u % i, p = u - (v - d);
|
|
431
|
+
v === d ? g = u : g = v > d ? p : p - i;
|
|
432
|
+
}
|
|
433
|
+
qe(e, g) && (g = l);
|
|
434
|
+
}
|
|
435
|
+
if (n.key === to && (m && de(n), l === -1 ? g = a : (g = ue(e, {
|
|
436
|
+
startingIndex: l,
|
|
437
|
+
amount: i,
|
|
438
|
+
disabledIndices: c
|
|
439
|
+
}), o && l + i > u && (g = ue(e, {
|
|
440
|
+
startingIndex: l % i - i,
|
|
441
|
+
amount: i,
|
|
442
|
+
disabledIndices: c
|
|
443
|
+
}))), qe(e, g) && (g = l)), r === "both") {
|
|
444
|
+
const d = je(l / i);
|
|
445
|
+
n.key === (s ? _t : Vt) && (m && de(n), l % i !== i - 1 ? (g = ue(e, {
|
|
446
|
+
startingIndex: l,
|
|
447
|
+
disabledIndices: c
|
|
448
|
+
}), o && pt(g, i, d) && (g = ue(e, {
|
|
449
|
+
startingIndex: l - l % i - 1,
|
|
450
|
+
disabledIndices: c
|
|
451
|
+
}))) : o && (g = ue(e, {
|
|
452
|
+
startingIndex: l - l % i - 1,
|
|
453
|
+
disabledIndices: c
|
|
454
|
+
})), pt(g, i, d) && (g = l)), n.key === (s ? Vt : _t) && (m && de(n), l % i !== 0 ? (g = ue(e, {
|
|
455
|
+
startingIndex: l,
|
|
456
|
+
decrement: !0,
|
|
457
|
+
disabledIndices: c
|
|
458
|
+
}), o && pt(g, i, d) && (g = ue(e, {
|
|
459
|
+
startingIndex: l + (i - l % i),
|
|
460
|
+
decrement: !0,
|
|
461
|
+
disabledIndices: c
|
|
462
|
+
}))) : o && (g = ue(e, {
|
|
463
|
+
startingIndex: l + (i - l % i),
|
|
464
|
+
decrement: !0,
|
|
465
|
+
disabledIndices: c
|
|
466
|
+
})), pt(g, i, d) && (g = l));
|
|
467
|
+
const v = je(u / i) === d;
|
|
468
|
+
qe(e, g) && (o && v ? g = n.key === (s ? Vt : _t) ? u : ue(e, {
|
|
469
|
+
startingIndex: l - l % i - 1,
|
|
470
|
+
disabledIndices: c
|
|
471
|
+
}) : g = l);
|
|
472
|
+
}
|
|
473
|
+
return g;
|
|
474
|
+
}
|
|
475
|
+
function ir(e, t, n) {
|
|
476
|
+
const r = [];
|
|
477
|
+
let o = 0;
|
|
478
|
+
return e.forEach((s, i) => {
|
|
479
|
+
let {
|
|
480
|
+
width: c,
|
|
481
|
+
height: a
|
|
482
|
+
} = s;
|
|
483
|
+
if (c > t && process.env.NODE_ENV !== "production")
|
|
484
|
+
throw new Error("[Floating UI]: Invalid grid - item width at index " + i + " is greater than grid columns");
|
|
485
|
+
let u = !1;
|
|
486
|
+
for (n && (o = 0); !u; ) {
|
|
487
|
+
const l = [];
|
|
488
|
+
for (let m = 0; m < c; m++)
|
|
489
|
+
for (let g = 0; g < a; g++)
|
|
490
|
+
l.push(o + m + g * t);
|
|
491
|
+
o % t + c <= t && l.every((m) => r[m] == null) ? (l.forEach((m) => {
|
|
492
|
+
r[m] = i;
|
|
493
|
+
}), u = !0) : o++;
|
|
494
|
+
}
|
|
495
|
+
}), [...r];
|
|
496
|
+
}
|
|
497
|
+
function sr(e, t, n, r, o) {
|
|
498
|
+
if (e === -1) return -1;
|
|
499
|
+
const s = n.indexOf(e), i = t[e];
|
|
500
|
+
switch (o) {
|
|
501
|
+
case "tl":
|
|
502
|
+
return s;
|
|
503
|
+
case "tr":
|
|
504
|
+
return i ? s + i.width - 1 : s;
|
|
505
|
+
case "bl":
|
|
506
|
+
return i ? s + (i.height - 1) * r : s;
|
|
507
|
+
case "br":
|
|
508
|
+
return n.lastIndexOf(e);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
function cr(e, t) {
|
|
512
|
+
return t.flatMap((n, r) => e.includes(n) ? [r] : []);
|
|
513
|
+
}
|
|
514
|
+
function Be(e, t, n) {
|
|
515
|
+
if (typeof n == "function")
|
|
516
|
+
return n(t);
|
|
517
|
+
if (n)
|
|
518
|
+
return n.includes(t);
|
|
519
|
+
const r = e.current[t];
|
|
520
|
+
return r == null || r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true";
|
|
521
|
+
}
|
|
522
|
+
const lt = () => ({
|
|
523
|
+
getShadowRoot: !0,
|
|
524
|
+
displayCheck: (
|
|
525
|
+
// JSDOM does not support the `tabbable` library. To solve this we can
|
|
526
|
+
// check if `ResizeObserver` is a real function (not polyfilled), which
|
|
527
|
+
// determines if the current environment is JSDOM-like.
|
|
528
|
+
typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
|
|
529
|
+
)
|
|
530
|
+
});
|
|
531
|
+
function ur(e, t) {
|
|
532
|
+
const n = At(e, lt()), r = n.length;
|
|
533
|
+
if (r === 0) return;
|
|
534
|
+
const o = Re(le(e)), s = n.indexOf(o), i = s === -1 ? t === 1 ? 0 : r - 1 : s + t;
|
|
535
|
+
return n[i];
|
|
536
|
+
}
|
|
537
|
+
function lr(e) {
|
|
538
|
+
return ur(le(e).body, 1) || e;
|
|
539
|
+
}
|
|
540
|
+
function ar(e) {
|
|
541
|
+
return ur(le(e).body, -1) || e;
|
|
542
|
+
}
|
|
543
|
+
function ot(e, t) {
|
|
544
|
+
const n = t || e.currentTarget, r = e.relatedTarget;
|
|
545
|
+
return !r || !ce(n, r);
|
|
546
|
+
}
|
|
547
|
+
function fo(e) {
|
|
548
|
+
At(e, lt()).forEach((n) => {
|
|
549
|
+
n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
function xn(e) {
|
|
553
|
+
e.querySelectorAll("[data-tabindex]").forEach((n) => {
|
|
554
|
+
const r = n.dataset.tabindex;
|
|
555
|
+
delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
function Rn(e, t, n) {
|
|
559
|
+
let {
|
|
560
|
+
reference: r,
|
|
561
|
+
floating: o
|
|
562
|
+
} = e;
|
|
563
|
+
const s = Me(t), i = Jn(t), c = Xn(i), a = Ce(t), u = s === "y", l = r.x + r.width / 2 - o.width / 2, m = r.y + r.height / 2 - o.height / 2, g = r[c] / 2 - o[c] / 2;
|
|
564
|
+
let d;
|
|
565
|
+
switch (a) {
|
|
566
|
+
case "top":
|
|
567
|
+
d = {
|
|
568
|
+
x: l,
|
|
569
|
+
y: r.y - o.height
|
|
570
|
+
};
|
|
571
|
+
break;
|
|
572
|
+
case "bottom":
|
|
573
|
+
d = {
|
|
574
|
+
x: l,
|
|
575
|
+
y: r.y + r.height
|
|
576
|
+
};
|
|
577
|
+
break;
|
|
578
|
+
case "right":
|
|
579
|
+
d = {
|
|
580
|
+
x: r.x + r.width,
|
|
581
|
+
y: m
|
|
582
|
+
};
|
|
583
|
+
break;
|
|
584
|
+
case "left":
|
|
585
|
+
d = {
|
|
586
|
+
x: r.x - o.width,
|
|
587
|
+
y: m
|
|
588
|
+
};
|
|
589
|
+
break;
|
|
590
|
+
default:
|
|
591
|
+
d = {
|
|
592
|
+
x: r.x,
|
|
593
|
+
y: r.y
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
switch (Ie(t)) {
|
|
597
|
+
case "start":
|
|
598
|
+
d[i] -= g * (n && u ? -1 : 1);
|
|
599
|
+
break;
|
|
600
|
+
case "end":
|
|
601
|
+
d[i] += g * (n && u ? -1 : 1);
|
|
602
|
+
break;
|
|
603
|
+
}
|
|
604
|
+
return d;
|
|
605
|
+
}
|
|
606
|
+
const mo = async (e, t, n) => {
|
|
607
|
+
const {
|
|
608
|
+
placement: r = "bottom",
|
|
609
|
+
strategy: o = "absolute",
|
|
610
|
+
middleware: s = [],
|
|
611
|
+
platform: i
|
|
612
|
+
} = n, c = s.filter(Boolean), a = await (i.isRTL == null ? void 0 : i.isRTL(t));
|
|
613
|
+
let u = await i.getElementRects({
|
|
614
|
+
reference: e,
|
|
615
|
+
floating: t,
|
|
616
|
+
strategy: o
|
|
617
|
+
}), {
|
|
618
|
+
x: l,
|
|
619
|
+
y: m
|
|
620
|
+
} = Rn(u, r, a), g = r, d = {}, v = 0;
|
|
621
|
+
for (let p = 0; p < c.length; p++) {
|
|
622
|
+
const {
|
|
623
|
+
name: y,
|
|
624
|
+
fn: x
|
|
625
|
+
} = c[p], {
|
|
626
|
+
x: b,
|
|
627
|
+
y: w,
|
|
628
|
+
data: I,
|
|
629
|
+
reset: S
|
|
630
|
+
} = await x({
|
|
631
|
+
x: l,
|
|
632
|
+
y: m,
|
|
633
|
+
initialPlacement: r,
|
|
634
|
+
placement: g,
|
|
635
|
+
strategy: o,
|
|
636
|
+
middlewareData: d,
|
|
637
|
+
rects: u,
|
|
638
|
+
platform: i,
|
|
639
|
+
elements: {
|
|
640
|
+
reference: e,
|
|
641
|
+
floating: t
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
l = b ?? l, m = w ?? m, d = {
|
|
645
|
+
...d,
|
|
646
|
+
[y]: {
|
|
647
|
+
...d[y],
|
|
648
|
+
...I
|
|
649
|
+
}
|
|
650
|
+
}, S && v <= 50 && (v++, typeof S == "object" && (S.placement && (g = S.placement), S.rects && (u = S.rects === !0 ? await i.getElementRects({
|
|
651
|
+
reference: e,
|
|
652
|
+
floating: t,
|
|
653
|
+
strategy: o
|
|
654
|
+
}) : S.rects), {
|
|
655
|
+
x: l,
|
|
656
|
+
y: m
|
|
657
|
+
} = Rn(u, g, a)), p = -1);
|
|
658
|
+
}
|
|
659
|
+
return {
|
|
660
|
+
x: l,
|
|
661
|
+
y: m,
|
|
662
|
+
placement: g,
|
|
663
|
+
strategy: o,
|
|
664
|
+
middlewareData: d
|
|
665
|
+
};
|
|
666
|
+
};
|
|
667
|
+
async function kt(e, t) {
|
|
668
|
+
var n;
|
|
669
|
+
t === void 0 && (t = {});
|
|
670
|
+
const {
|
|
671
|
+
x: r,
|
|
672
|
+
y: o,
|
|
673
|
+
platform: s,
|
|
674
|
+
rects: i,
|
|
675
|
+
elements: c,
|
|
676
|
+
strategy: a
|
|
677
|
+
} = e, {
|
|
678
|
+
boundary: u = "clippingAncestors",
|
|
679
|
+
rootBoundary: l = "viewport",
|
|
680
|
+
elementContext: m = "floating",
|
|
681
|
+
altBoundary: g = !1,
|
|
682
|
+
padding: d = 0
|
|
683
|
+
} = Qe(t, e), v = Jr(d), y = c[g ? m === "floating" ? "reference" : "floating" : m], x = It(await s.getClippingRect({
|
|
684
|
+
element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
685
|
+
boundary: u,
|
|
686
|
+
rootBoundary: l,
|
|
687
|
+
strategy: a
|
|
688
|
+
})), b = m === "floating" ? {
|
|
689
|
+
x: r,
|
|
690
|
+
y: o,
|
|
691
|
+
width: i.floating.width,
|
|
692
|
+
height: i.floating.height
|
|
693
|
+
} : i.reference, w = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), I = await (s.isElement == null ? void 0 : s.isElement(w)) ? await (s.getScale == null ? void 0 : s.getScale(w)) || {
|
|
694
|
+
x: 1,
|
|
695
|
+
y: 1
|
|
696
|
+
} : {
|
|
697
|
+
x: 1,
|
|
698
|
+
y: 1
|
|
699
|
+
}, S = It(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
700
|
+
elements: c,
|
|
701
|
+
rect: b,
|
|
702
|
+
offsetParent: w,
|
|
703
|
+
strategy: a
|
|
704
|
+
}) : b);
|
|
705
|
+
return {
|
|
706
|
+
top: (x.top - S.top + v.top) / I.y,
|
|
707
|
+
bottom: (S.bottom - x.bottom + v.bottom) / I.y,
|
|
708
|
+
left: (x.left - S.left + v.left) / I.x,
|
|
709
|
+
right: (S.right - x.right + v.right) / I.x
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
function po(e, t, n) {
|
|
713
|
+
return (e ? [...n.filter((o) => Ie(o) === e), ...n.filter((o) => Ie(o) !== e)] : n.filter((o) => Ce(o) === o)).filter((o) => e ? Ie(o) === e || (t ? Rt(o) !== o : !1) : !0);
|
|
714
|
+
}
|
|
715
|
+
const go = function(e) {
|
|
716
|
+
return e === void 0 && (e = {}), {
|
|
717
|
+
name: "autoPlacement",
|
|
718
|
+
options: e,
|
|
719
|
+
async fn(t) {
|
|
720
|
+
var n, r, o;
|
|
721
|
+
const {
|
|
722
|
+
rects: s,
|
|
723
|
+
middlewareData: i,
|
|
724
|
+
placement: c,
|
|
725
|
+
platform: a,
|
|
726
|
+
elements: u
|
|
727
|
+
} = t, {
|
|
728
|
+
crossAxis: l = !1,
|
|
729
|
+
alignment: m,
|
|
730
|
+
allowedPlacements: g = gn,
|
|
731
|
+
autoAlignment: d = !0,
|
|
732
|
+
...v
|
|
733
|
+
} = Qe(e, t), p = m !== void 0 || g === gn ? po(m || null, d, g) : g, y = await kt(t, v), x = ((n = i.autoPlacement) == null ? void 0 : n.index) || 0, b = p[x];
|
|
734
|
+
if (b == null)
|
|
735
|
+
return {};
|
|
736
|
+
const w = Qn(b, s, await (a.isRTL == null ? void 0 : a.isRTL(u.floating)));
|
|
737
|
+
if (c !== b)
|
|
738
|
+
return {
|
|
739
|
+
reset: {
|
|
740
|
+
placement: p[0]
|
|
741
|
+
}
|
|
742
|
+
};
|
|
743
|
+
const I = [y[Ce(b)], y[w[0]], y[w[1]]], S = [...((r = i.autoPlacement) == null ? void 0 : r.overflows) || [], {
|
|
744
|
+
placement: b,
|
|
745
|
+
overflows: I
|
|
746
|
+
}], L = p[x + 1];
|
|
747
|
+
if (L)
|
|
748
|
+
return {
|
|
749
|
+
data: {
|
|
750
|
+
index: x + 1,
|
|
751
|
+
overflows: S
|
|
752
|
+
},
|
|
753
|
+
reset: {
|
|
754
|
+
placement: L
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
const N = S.map((k) => {
|
|
758
|
+
const _ = Ie(k.placement);
|
|
759
|
+
return [k.placement, _ && l ? (
|
|
760
|
+
// Check along the mainAxis and main crossAxis side.
|
|
761
|
+
k.overflows.slice(0, 2).reduce((G, V) => G + V, 0)
|
|
762
|
+
) : (
|
|
763
|
+
// Check only the mainAxis.
|
|
764
|
+
k.overflows[0]
|
|
765
|
+
), k.overflows];
|
|
766
|
+
}).sort((k, _) => k[1] - _[1]), W = ((o = N.filter((k) => k[2].slice(
|
|
767
|
+
0,
|
|
768
|
+
// Aligned placements should not check their opposite crossAxis
|
|
769
|
+
// side.
|
|
770
|
+
Ie(k[0]) ? 2 : 3
|
|
771
|
+
).every((_) => _ <= 0))[0]) == null ? void 0 : o[0]) || N[0][0];
|
|
772
|
+
return W !== c ? {
|
|
773
|
+
data: {
|
|
774
|
+
index: x + 1,
|
|
775
|
+
overflows: S
|
|
776
|
+
},
|
|
777
|
+
reset: {
|
|
778
|
+
placement: W
|
|
779
|
+
}
|
|
780
|
+
} : {};
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
}, ho = function(e) {
|
|
784
|
+
return e === void 0 && (e = {}), {
|
|
785
|
+
name: "flip",
|
|
786
|
+
options: e,
|
|
787
|
+
async fn(t) {
|
|
788
|
+
var n, r;
|
|
789
|
+
const {
|
|
790
|
+
placement: o,
|
|
791
|
+
middlewareData: s,
|
|
792
|
+
rects: i,
|
|
793
|
+
initialPlacement: c,
|
|
794
|
+
platform: a,
|
|
795
|
+
elements: u
|
|
796
|
+
} = t, {
|
|
797
|
+
mainAxis: l = !0,
|
|
798
|
+
crossAxis: m = !0,
|
|
799
|
+
fallbackPlacements: g,
|
|
800
|
+
fallbackStrategy: d = "bestFit",
|
|
801
|
+
fallbackAxisSideDirection: v = "none",
|
|
802
|
+
flipAlignment: p = !0,
|
|
803
|
+
...y
|
|
804
|
+
} = Qe(e, t);
|
|
805
|
+
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
806
|
+
return {};
|
|
807
|
+
const x = Ce(o), b = Me(c), w = Ce(c) === c, I = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), S = g || (w || !p ? [Et(c)] : Ur(c)), L = v !== "none";
|
|
808
|
+
!g && L && S.push(...Yr(c, p, v, I));
|
|
809
|
+
const N = [c, ...S], P = await kt(t, y), W = [];
|
|
810
|
+
let k = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
811
|
+
if (l && W.push(P[x]), m) {
|
|
812
|
+
const R = Qn(o, i, I);
|
|
813
|
+
W.push(P[R[0]], P[R[1]]);
|
|
814
|
+
}
|
|
815
|
+
if (k = [...k, {
|
|
816
|
+
placement: o,
|
|
817
|
+
overflows: W
|
|
818
|
+
}], !W.every((R) => R <= 0)) {
|
|
819
|
+
var _, G;
|
|
820
|
+
const R = (((_ = s.flip) == null ? void 0 : _.index) || 0) + 1, E = N[R];
|
|
821
|
+
if (E && (!(m === "alignment" ? b !== Me(E) : !1) || // We leave the current main axis only if every placement on that axis
|
|
822
|
+
// overflows the main axis.
|
|
823
|
+
k.every((h) => Me(h.placement) === b ? h.overflows[0] > 0 : !0)))
|
|
824
|
+
return {
|
|
825
|
+
data: {
|
|
826
|
+
index: R,
|
|
827
|
+
overflows: k
|
|
828
|
+
},
|
|
829
|
+
reset: {
|
|
830
|
+
placement: E
|
|
831
|
+
}
|
|
832
|
+
};
|
|
833
|
+
let $ = (G = k.filter((T) => T.overflows[0] <= 0).sort((T, h) => T.overflows[1] - h.overflows[1])[0]) == null ? void 0 : G.placement;
|
|
834
|
+
if (!$)
|
|
835
|
+
switch (d) {
|
|
836
|
+
case "bestFit": {
|
|
837
|
+
var V;
|
|
838
|
+
const T = (V = k.filter((h) => {
|
|
839
|
+
if (L) {
|
|
840
|
+
const C = Me(h.placement);
|
|
841
|
+
return C === b || // Create a bias to the `y` side axis due to horizontal
|
|
842
|
+
// reading directions favoring greater width.
|
|
843
|
+
C === "y";
|
|
844
|
+
}
|
|
845
|
+
return !0;
|
|
846
|
+
}).map((h) => [h.placement, h.overflows.filter((C) => C > 0).reduce((C, D) => C + D, 0)]).sort((h, C) => h[1] - C[1])[0]) == null ? void 0 : V[0];
|
|
847
|
+
T && ($ = T);
|
|
848
|
+
break;
|
|
849
|
+
}
|
|
850
|
+
case "initialPlacement":
|
|
851
|
+
$ = c;
|
|
852
|
+
break;
|
|
853
|
+
}
|
|
854
|
+
if (o !== $)
|
|
855
|
+
return {
|
|
856
|
+
reset: {
|
|
857
|
+
placement: $
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
return {};
|
|
862
|
+
}
|
|
863
|
+
};
|
|
864
|
+
}, vo = /* @__PURE__ */ new Set(["left", "top"]);
|
|
865
|
+
async function bo(e, t) {
|
|
866
|
+
const {
|
|
867
|
+
placement: n,
|
|
868
|
+
platform: r,
|
|
869
|
+
elements: o
|
|
870
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Ce(n), c = Ie(n), a = Me(n) === "y", u = vo.has(i) ? -1 : 1, l = s && a ? -1 : 1, m = Qe(t, e);
|
|
871
|
+
let {
|
|
872
|
+
mainAxis: g,
|
|
873
|
+
crossAxis: d,
|
|
874
|
+
alignmentAxis: v
|
|
875
|
+
} = typeof m == "number" ? {
|
|
876
|
+
mainAxis: m,
|
|
877
|
+
crossAxis: 0,
|
|
878
|
+
alignmentAxis: null
|
|
879
|
+
} : {
|
|
880
|
+
mainAxis: m.mainAxis || 0,
|
|
881
|
+
crossAxis: m.crossAxis || 0,
|
|
882
|
+
alignmentAxis: m.alignmentAxis
|
|
883
|
+
};
|
|
884
|
+
return c && typeof v == "number" && (d = c === "end" ? v * -1 : v), a ? {
|
|
885
|
+
x: d * l,
|
|
886
|
+
y: g * u
|
|
887
|
+
} : {
|
|
888
|
+
x: g * u,
|
|
889
|
+
y: d * l
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
const yo = function(e) {
|
|
893
|
+
return e === void 0 && (e = 0), {
|
|
894
|
+
name: "offset",
|
|
895
|
+
options: e,
|
|
896
|
+
async fn(t) {
|
|
897
|
+
var n, r;
|
|
898
|
+
const {
|
|
899
|
+
x: o,
|
|
900
|
+
y: s,
|
|
901
|
+
placement: i,
|
|
902
|
+
middlewareData: c
|
|
903
|
+
} = t, a = await bo(t, e);
|
|
904
|
+
return i === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
|
|
905
|
+
x: o + a.x,
|
|
906
|
+
y: s + a.y,
|
|
907
|
+
data: {
|
|
908
|
+
...a,
|
|
909
|
+
placement: i
|
|
910
|
+
}
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
}, wo = function(e) {
|
|
915
|
+
return e === void 0 && (e = {}), {
|
|
916
|
+
name: "shift",
|
|
917
|
+
options: e,
|
|
918
|
+
async fn(t) {
|
|
919
|
+
const {
|
|
920
|
+
x: n,
|
|
921
|
+
y: r,
|
|
922
|
+
placement: o
|
|
923
|
+
} = t, {
|
|
924
|
+
mainAxis: s = !0,
|
|
925
|
+
crossAxis: i = !1,
|
|
926
|
+
limiter: c = {
|
|
927
|
+
fn: (y) => {
|
|
928
|
+
let {
|
|
929
|
+
x,
|
|
930
|
+
y: b
|
|
931
|
+
} = y;
|
|
932
|
+
return {
|
|
933
|
+
x,
|
|
934
|
+
y: b
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
...a
|
|
939
|
+
} = Qe(e, t), u = {
|
|
940
|
+
x: n,
|
|
941
|
+
y: r
|
|
942
|
+
}, l = await kt(t, a), m = Me(Ce(o)), g = Yn(m);
|
|
943
|
+
let d = u[g], v = u[m];
|
|
944
|
+
if (s) {
|
|
945
|
+
const y = g === "y" ? "top" : "left", x = g === "y" ? "bottom" : "right", b = d + l[y], w = d - l[x];
|
|
946
|
+
d = hn(b, d, w);
|
|
947
|
+
}
|
|
948
|
+
if (i) {
|
|
949
|
+
const y = m === "y" ? "top" : "left", x = m === "y" ? "bottom" : "right", b = v + l[y], w = v - l[x];
|
|
950
|
+
v = hn(b, v, w);
|
|
951
|
+
}
|
|
952
|
+
const p = c.fn({
|
|
953
|
+
...t,
|
|
954
|
+
[g]: d,
|
|
955
|
+
[m]: v
|
|
956
|
+
});
|
|
957
|
+
return {
|
|
958
|
+
...p,
|
|
959
|
+
data: {
|
|
960
|
+
x: p.x - n,
|
|
961
|
+
y: p.y - r,
|
|
962
|
+
enabled: {
|
|
963
|
+
[g]: s,
|
|
964
|
+
[m]: i
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
}, xo = function(e) {
|
|
971
|
+
return e === void 0 && (e = {}), {
|
|
972
|
+
name: "size",
|
|
973
|
+
options: e,
|
|
974
|
+
async fn(t) {
|
|
975
|
+
var n, r;
|
|
976
|
+
const {
|
|
977
|
+
placement: o,
|
|
978
|
+
rects: s,
|
|
979
|
+
platform: i,
|
|
980
|
+
elements: c
|
|
981
|
+
} = t, {
|
|
982
|
+
apply: a = () => {
|
|
983
|
+
},
|
|
984
|
+
...u
|
|
985
|
+
} = Qe(e, t), l = await kt(t, u), m = Ce(o), g = Ie(o), d = Me(o) === "y", {
|
|
986
|
+
width: v,
|
|
987
|
+
height: p
|
|
988
|
+
} = s.floating;
|
|
989
|
+
let y, x;
|
|
990
|
+
m === "top" || m === "bottom" ? (y = m, x = g === (await (i.isRTL == null ? void 0 : i.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (x = m, y = g === "end" ? "top" : "bottom");
|
|
991
|
+
const b = p - l.top - l.bottom, w = v - l.left - l.right, I = Je(p - l[y], b), S = Je(v - l[x], w), L = !t.middlewareData.shift;
|
|
992
|
+
let N = I, P = S;
|
|
993
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (P = w), (r = t.middlewareData.shift) != null && r.enabled.y && (N = b), L && !g) {
|
|
994
|
+
const k = he(l.left, 0), _ = he(l.right, 0), G = he(l.top, 0), V = he(l.bottom, 0);
|
|
995
|
+
d ? P = v - 2 * (k !== 0 || _ !== 0 ? k + _ : he(l.left, l.right)) : N = p - 2 * (G !== 0 || V !== 0 ? G + V : he(l.top, l.bottom));
|
|
996
|
+
}
|
|
997
|
+
await a({
|
|
998
|
+
...t,
|
|
999
|
+
availableWidth: P,
|
|
1000
|
+
availableHeight: N
|
|
1001
|
+
});
|
|
1002
|
+
const W = await i.getDimensions(c.floating);
|
|
1003
|
+
return v !== W.width || p !== W.height ? {
|
|
1004
|
+
reset: {
|
|
1005
|
+
rects: !0
|
|
1006
|
+
}
|
|
1007
|
+
} : {};
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
function fr(e) {
|
|
1012
|
+
const t = we(e);
|
|
1013
|
+
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1014
|
+
const o = ne(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, c = xt(n) !== s || xt(r) !== i;
|
|
1015
|
+
return c && (n = s, r = i), {
|
|
1016
|
+
width: n,
|
|
1017
|
+
height: r,
|
|
1018
|
+
$: c
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
function cn(e) {
|
|
1022
|
+
return X(e) ? e : e.contextElement;
|
|
1023
|
+
}
|
|
1024
|
+
function Ye(e) {
|
|
1025
|
+
const t = cn(e);
|
|
1026
|
+
if (!ne(t))
|
|
1027
|
+
return Ee(1);
|
|
1028
|
+
const n = t.getBoundingClientRect(), {
|
|
1029
|
+
width: r,
|
|
1030
|
+
height: o,
|
|
1031
|
+
$: s
|
|
1032
|
+
} = fr(t);
|
|
1033
|
+
let i = (s ? xt(n.width) : n.width) / r, c = (s ? xt(n.height) : n.height) / o;
|
|
1034
|
+
return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1035
|
+
x: i,
|
|
1036
|
+
y: c
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
const Ro = /* @__PURE__ */ Ee(0);
|
|
1040
|
+
function dr(e) {
|
|
1041
|
+
const t = pe(e);
|
|
1042
|
+
return !Pt() || !t.visualViewport ? Ro : {
|
|
1043
|
+
x: t.visualViewport.offsetLeft,
|
|
1044
|
+
y: t.visualViewport.offsetTop
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
function Eo(e, t, n) {
|
|
1048
|
+
return t === void 0 && (t = !1), !n || t && n !== pe(e) ? !1 : t;
|
|
1049
|
+
}
|
|
1050
|
+
function He(e, t, n, r) {
|
|
1051
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1052
|
+
const o = e.getBoundingClientRect(), s = cn(e);
|
|
1053
|
+
let i = Ee(1);
|
|
1054
|
+
t && (r ? X(r) && (i = Ye(r)) : i = Ye(e));
|
|
1055
|
+
const c = Eo(s, n, r) ? dr(s) : Ee(0);
|
|
1056
|
+
let a = (o.left + c.x) / i.x, u = (o.top + c.y) / i.y, l = o.width / i.x, m = o.height / i.y;
|
|
1057
|
+
if (s) {
|
|
1058
|
+
const g = pe(s), d = r && X(r) ? pe(r) : r;
|
|
1059
|
+
let v = g, p = Jt(v);
|
|
1060
|
+
for (; p && r && d !== v; ) {
|
|
1061
|
+
const y = Ye(p), x = p.getBoundingClientRect(), b = we(p), w = x.left + (p.clientLeft + parseFloat(b.paddingLeft)) * y.x, I = x.top + (p.clientTop + parseFloat(b.paddingTop)) * y.y;
|
|
1062
|
+
a *= y.x, u *= y.y, l *= y.x, m *= y.y, a += w, u += I, v = pe(p), p = Jt(v);
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
return It({
|
|
1066
|
+
width: l,
|
|
1067
|
+
height: m,
|
|
1068
|
+
x: a,
|
|
1069
|
+
y: u
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
function un(e, t) {
|
|
1073
|
+
const n = Dt(e).scrollLeft;
|
|
1074
|
+
return t ? t.left + n : He(Te(e)).left + n;
|
|
1075
|
+
}
|
|
1076
|
+
function mr(e, t, n) {
|
|
1077
|
+
n === void 0 && (n = !1);
|
|
1078
|
+
const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
|
|
1079
|
+
// RTL <body> scrollbar.
|
|
1080
|
+
un(e, r)
|
|
1081
|
+
)), s = r.top + t.scrollTop;
|
|
1082
|
+
return {
|
|
1083
|
+
x: o,
|
|
1084
|
+
y: s
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
function Io(e) {
|
|
1088
|
+
let {
|
|
1089
|
+
elements: t,
|
|
1090
|
+
rect: n,
|
|
1091
|
+
offsetParent: r,
|
|
1092
|
+
strategy: o
|
|
1093
|
+
} = e;
|
|
1094
|
+
const s = o === "fixed", i = Te(r), c = t ? St(t.floating) : !1;
|
|
1095
|
+
if (r === i || c && s)
|
|
1096
|
+
return n;
|
|
1097
|
+
let a = {
|
|
1098
|
+
scrollLeft: 0,
|
|
1099
|
+
scrollTop: 0
|
|
1100
|
+
}, u = Ee(1);
|
|
1101
|
+
const l = Ee(0), m = ne(r);
|
|
1102
|
+
if ((m || !m && !s) && ((Ve(r) !== "body" || ut(i)) && (a = Dt(r)), ne(r))) {
|
|
1103
|
+
const d = He(r);
|
|
1104
|
+
u = Ye(r), l.x = d.x + r.clientLeft, l.y = d.y + r.clientTop;
|
|
1105
|
+
}
|
|
1106
|
+
const g = i && !m && !s ? mr(i, a, !0) : Ee(0);
|
|
1107
|
+
return {
|
|
1108
|
+
width: n.width * u.x,
|
|
1109
|
+
height: n.height * u.y,
|
|
1110
|
+
x: n.x * u.x - a.scrollLeft * u.x + l.x + g.x,
|
|
1111
|
+
y: n.y * u.y - a.scrollTop * u.y + l.y + g.y
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
function Co(e) {
|
|
1115
|
+
return Array.from(e.getClientRects());
|
|
1116
|
+
}
|
|
1117
|
+
function To(e) {
|
|
1118
|
+
const t = Te(e), n = Dt(e), r = e.ownerDocument.body, o = he(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = he(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1119
|
+
let i = -n.scrollLeft + un(e);
|
|
1120
|
+
const c = -n.scrollTop;
|
|
1121
|
+
return we(r).direction === "rtl" && (i += he(t.clientWidth, r.clientWidth) - o), {
|
|
1122
|
+
width: o,
|
|
1123
|
+
height: s,
|
|
1124
|
+
x: i,
|
|
1125
|
+
y: c
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
function Oo(e, t) {
|
|
1129
|
+
const n = pe(e), r = Te(e), o = n.visualViewport;
|
|
1130
|
+
let s = r.clientWidth, i = r.clientHeight, c = 0, a = 0;
|
|
1131
|
+
if (o) {
|
|
1132
|
+
s = o.width, i = o.height;
|
|
1133
|
+
const u = Pt();
|
|
1134
|
+
(!u || u && t === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
|
|
1135
|
+
}
|
|
1136
|
+
return {
|
|
1137
|
+
width: s,
|
|
1138
|
+
height: i,
|
|
1139
|
+
x: c,
|
|
1140
|
+
y: a
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
const Ao = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1144
|
+
function Mo(e, t) {
|
|
1145
|
+
const n = He(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = ne(e) ? Ye(e) : Ee(1), i = e.clientWidth * s.x, c = e.clientHeight * s.y, a = o * s.x, u = r * s.y;
|
|
1146
|
+
return {
|
|
1147
|
+
width: i,
|
|
1148
|
+
height: c,
|
|
1149
|
+
x: a,
|
|
1150
|
+
y: u
|
|
1151
|
+
};
|
|
1152
|
+
}
|
|
1153
|
+
function En(e, t, n) {
|
|
1154
|
+
let r;
|
|
1155
|
+
if (t === "viewport")
|
|
1156
|
+
r = Oo(e, n);
|
|
1157
|
+
else if (t === "document")
|
|
1158
|
+
r = To(Te(e));
|
|
1159
|
+
else if (X(t))
|
|
1160
|
+
r = Mo(t, n);
|
|
1161
|
+
else {
|
|
1162
|
+
const o = dr(e);
|
|
1163
|
+
r = {
|
|
1164
|
+
x: t.x - o.x,
|
|
1165
|
+
y: t.y - o.y,
|
|
1166
|
+
width: t.width,
|
|
1167
|
+
height: t.height
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
return It(r);
|
|
1171
|
+
}
|
|
1172
|
+
function pr(e, t) {
|
|
1173
|
+
const n = Pe(e);
|
|
1174
|
+
return n === t || !X(n) || Se(n) ? !1 : we(n).position === "fixed" || pr(n, t);
|
|
1175
|
+
}
|
|
1176
|
+
function So(e, t) {
|
|
1177
|
+
const n = t.get(e);
|
|
1178
|
+
if (n)
|
|
1179
|
+
return n;
|
|
1180
|
+
let r = Le(e, [], !1).filter((c) => X(c) && Ve(c) !== "body"), o = null;
|
|
1181
|
+
const s = we(e).position === "fixed";
|
|
1182
|
+
let i = s ? Pe(e) : e;
|
|
1183
|
+
for (; X(i) && !Se(i); ) {
|
|
1184
|
+
const c = we(i), a = rn(i);
|
|
1185
|
+
!a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && Ao.has(o.position) || ut(i) && !a && pr(e, i)) ? r = r.filter((l) => l !== i) : o = c, i = Pe(i);
|
|
1186
|
+
}
|
|
1187
|
+
return t.set(e, r), r;
|
|
1188
|
+
}
|
|
1189
|
+
function Po(e) {
|
|
1190
|
+
let {
|
|
1191
|
+
element: t,
|
|
1192
|
+
boundary: n,
|
|
1193
|
+
rootBoundary: r,
|
|
1194
|
+
strategy: o
|
|
1195
|
+
} = e;
|
|
1196
|
+
const i = [...n === "clippingAncestors" ? St(t) ? [] : So(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
|
|
1197
|
+
const m = En(t, l, o);
|
|
1198
|
+
return u.top = he(m.top, u.top), u.right = Je(m.right, u.right), u.bottom = Je(m.bottom, u.bottom), u.left = he(m.left, u.left), u;
|
|
1199
|
+
}, En(t, c, o));
|
|
1200
|
+
return {
|
|
1201
|
+
width: a.right - a.left,
|
|
1202
|
+
height: a.bottom - a.top,
|
|
1203
|
+
x: a.left,
|
|
1204
|
+
y: a.top
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
function Do(e) {
|
|
1208
|
+
const {
|
|
1209
|
+
width: t,
|
|
1210
|
+
height: n
|
|
1211
|
+
} = fr(e);
|
|
1212
|
+
return {
|
|
1213
|
+
width: t,
|
|
1214
|
+
height: n
|
|
1215
|
+
};
|
|
1216
|
+
}
|
|
1217
|
+
function ko(e, t, n) {
|
|
1218
|
+
const r = ne(t), o = Te(t), s = n === "fixed", i = He(e, !0, s, t);
|
|
1219
|
+
let c = {
|
|
1220
|
+
scrollLeft: 0,
|
|
1221
|
+
scrollTop: 0
|
|
1222
|
+
};
|
|
1223
|
+
const a = Ee(0);
|
|
1224
|
+
function u() {
|
|
1225
|
+
a.x = un(o);
|
|
1226
|
+
}
|
|
1227
|
+
if (r || !r && !s)
|
|
1228
|
+
if ((Ve(t) !== "body" || ut(o)) && (c = Dt(t)), r) {
|
|
1229
|
+
const d = He(t, !0, s, t);
|
|
1230
|
+
a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
|
|
1231
|
+
} else o && u();
|
|
1232
|
+
s && !r && o && u();
|
|
1233
|
+
const l = o && !r && !s ? mr(o, c) : Ee(0), m = i.left + c.scrollLeft - a.x - l.x, g = i.top + c.scrollTop - a.y - l.y;
|
|
1234
|
+
return {
|
|
1235
|
+
x: m,
|
|
1236
|
+
y: g,
|
|
1237
|
+
width: i.width,
|
|
1238
|
+
height: i.height
|
|
1239
|
+
};
|
|
1240
|
+
}
|
|
1241
|
+
function Kt(e) {
|
|
1242
|
+
return we(e).position === "static";
|
|
1243
|
+
}
|
|
1244
|
+
function In(e, t) {
|
|
1245
|
+
if (!ne(e) || we(e).position === "fixed")
|
|
1246
|
+
return null;
|
|
1247
|
+
if (t)
|
|
1248
|
+
return t(e);
|
|
1249
|
+
let n = e.offsetParent;
|
|
1250
|
+
return Te(e) === n && (n = n.ownerDocument.body), n;
|
|
1251
|
+
}
|
|
1252
|
+
function gr(e, t) {
|
|
1253
|
+
const n = pe(e);
|
|
1254
|
+
if (St(e))
|
|
1255
|
+
return n;
|
|
1256
|
+
if (!ne(e)) {
|
|
1257
|
+
let o = Pe(e);
|
|
1258
|
+
for (; o && !Se(o); ) {
|
|
1259
|
+
if (X(o) && !Kt(o))
|
|
1260
|
+
return o;
|
|
1261
|
+
o = Pe(o);
|
|
1262
|
+
}
|
|
1263
|
+
return n;
|
|
1264
|
+
}
|
|
1265
|
+
let r = In(e, t);
|
|
1266
|
+
for (; r && Lr(r) && Kt(r); )
|
|
1267
|
+
r = In(r, t);
|
|
1268
|
+
return r && Se(r) && Kt(r) && !rn(r) ? n : r || Wr(e) || n;
|
|
1269
|
+
}
|
|
1270
|
+
const Lo = async function(e) {
|
|
1271
|
+
const t = this.getOffsetParent || gr, n = this.getDimensions, r = await n(e.floating);
|
|
1272
|
+
return {
|
|
1273
|
+
reference: ko(e.reference, await t(e.floating), e.strategy),
|
|
1274
|
+
floating: {
|
|
1275
|
+
x: 0,
|
|
1276
|
+
y: 0,
|
|
1277
|
+
width: r.width,
|
|
1278
|
+
height: r.height
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
};
|
|
1282
|
+
function Fo(e) {
|
|
1283
|
+
return we(e).direction === "rtl";
|
|
1284
|
+
}
|
|
1285
|
+
const No = {
|
|
1286
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Io,
|
|
1287
|
+
getDocumentElement: Te,
|
|
1288
|
+
getClippingRect: Po,
|
|
1289
|
+
getOffsetParent: gr,
|
|
1290
|
+
getElementRects: Lo,
|
|
1291
|
+
getClientRects: Co,
|
|
1292
|
+
getDimensions: Do,
|
|
1293
|
+
getScale: Ye,
|
|
1294
|
+
isElement: X,
|
|
1295
|
+
isRTL: Fo
|
|
1296
|
+
};
|
|
1297
|
+
function hr(e, t) {
|
|
1298
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1299
|
+
}
|
|
1300
|
+
function _o(e, t) {
|
|
1301
|
+
let n = null, r;
|
|
1302
|
+
const o = Te(e);
|
|
1303
|
+
function s() {
|
|
1304
|
+
var c;
|
|
1305
|
+
clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
|
|
1306
|
+
}
|
|
1307
|
+
function i(c, a) {
|
|
1308
|
+
c === void 0 && (c = !1), a === void 0 && (a = 1), s();
|
|
1309
|
+
const u = e.getBoundingClientRect(), {
|
|
1310
|
+
left: l,
|
|
1311
|
+
top: m,
|
|
1312
|
+
width: g,
|
|
1313
|
+
height: d
|
|
1314
|
+
} = u;
|
|
1315
|
+
if (c || t(), !g || !d)
|
|
1316
|
+
return;
|
|
1317
|
+
const v = je(m), p = je(o.clientWidth - (l + g)), y = je(o.clientHeight - (m + d)), x = je(l), w = {
|
|
1318
|
+
rootMargin: -v + "px " + -p + "px " + -y + "px " + -x + "px",
|
|
1319
|
+
threshold: he(0, Je(1, a)) || 1
|
|
1320
|
+
};
|
|
1321
|
+
let I = !0;
|
|
1322
|
+
function S(L) {
|
|
1323
|
+
const N = L[0].intersectionRatio;
|
|
1324
|
+
if (N !== a) {
|
|
1325
|
+
if (!I)
|
|
1326
|
+
return i();
|
|
1327
|
+
N ? i(!1, N) : r = setTimeout(() => {
|
|
1328
|
+
i(!1, 1e-7);
|
|
1329
|
+
}, 1e3);
|
|
1330
|
+
}
|
|
1331
|
+
N === 1 && !hr(u, e.getBoundingClientRect()) && i(), I = !1;
|
|
1332
|
+
}
|
|
1333
|
+
try {
|
|
1334
|
+
n = new IntersectionObserver(S, {
|
|
1335
|
+
...w,
|
|
1336
|
+
// Handle <iframe>s
|
|
1337
|
+
root: o.ownerDocument
|
|
1338
|
+
});
|
|
1339
|
+
} catch {
|
|
1340
|
+
n = new IntersectionObserver(S, w);
|
|
1341
|
+
}
|
|
1342
|
+
n.observe(e);
|
|
1343
|
+
}
|
|
1344
|
+
return i(!0), s;
|
|
1345
|
+
}
|
|
1346
|
+
function Ei(e, t, n, r) {
|
|
1347
|
+
r === void 0 && (r = {});
|
|
1348
|
+
const {
|
|
1349
|
+
ancestorScroll: o = !0,
|
|
1350
|
+
ancestorResize: s = !0,
|
|
1351
|
+
elementResize: i = typeof ResizeObserver == "function",
|
|
1352
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1353
|
+
animationFrame: a = !1
|
|
1354
|
+
} = r, u = cn(e), l = o || s ? [...u ? Le(u) : [], ...Le(t)] : [];
|
|
1355
|
+
l.forEach((x) => {
|
|
1356
|
+
o && x.addEventListener("scroll", n, {
|
|
1357
|
+
passive: !0
|
|
1358
|
+
}), s && x.addEventListener("resize", n);
|
|
1359
|
+
});
|
|
1360
|
+
const m = u && c ? _o(u, n) : null;
|
|
1361
|
+
let g = -1, d = null;
|
|
1362
|
+
i && (d = new ResizeObserver((x) => {
|
|
1363
|
+
let [b] = x;
|
|
1364
|
+
b && b.target === u && d && (d.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
1365
|
+
var w;
|
|
1366
|
+
(w = d) == null || w.observe(t);
|
|
1367
|
+
})), n();
|
|
1368
|
+
}), u && !a && d.observe(u), d.observe(t));
|
|
1369
|
+
let v, p = a ? He(e) : null;
|
|
1370
|
+
a && y();
|
|
1371
|
+
function y() {
|
|
1372
|
+
const x = He(e);
|
|
1373
|
+
p && !hr(p, x) && n(), p = x, v = requestAnimationFrame(y);
|
|
1374
|
+
}
|
|
1375
|
+
return n(), () => {
|
|
1376
|
+
var x;
|
|
1377
|
+
l.forEach((b) => {
|
|
1378
|
+
o && b.removeEventListener("scroll", n), s && b.removeEventListener("resize", n);
|
|
1379
|
+
}), m == null || m(), (x = d) == null || x.disconnect(), d = null, a && cancelAnimationFrame(v);
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
const Vo = yo, Wo = go, Ko = wo, $o = ho, Bo = xo, Ho = (e, t, n) => {
|
|
1383
|
+
const r = /* @__PURE__ */ new Map(), o = {
|
|
1384
|
+
platform: No,
|
|
1385
|
+
...n
|
|
1386
|
+
}, s = {
|
|
1387
|
+
...o.platform,
|
|
1388
|
+
_c: r
|
|
1389
|
+
};
|
|
1390
|
+
return mo(e, t, {
|
|
1391
|
+
...o,
|
|
1392
|
+
platform: s
|
|
1393
|
+
});
|
|
1394
|
+
};
|
|
1395
|
+
var zo = typeof document < "u", Uo = function() {
|
|
1396
|
+
}, wt = zo ? Un : Uo;
|
|
1397
|
+
function Tt(e, t) {
|
|
1398
|
+
if (e === t)
|
|
1399
|
+
return !0;
|
|
1400
|
+
if (typeof e != typeof t)
|
|
1401
|
+
return !1;
|
|
1402
|
+
if (typeof e == "function" && e.toString() === t.toString())
|
|
1403
|
+
return !0;
|
|
1404
|
+
let n, r, o;
|
|
1405
|
+
if (e && t && typeof e == "object") {
|
|
1406
|
+
if (Array.isArray(e)) {
|
|
1407
|
+
if (n = e.length, n !== t.length) return !1;
|
|
1408
|
+
for (r = n; r-- !== 0; )
|
|
1409
|
+
if (!Tt(e[r], t[r]))
|
|
1410
|
+
return !1;
|
|
1411
|
+
return !0;
|
|
1412
|
+
}
|
|
1413
|
+
if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
|
|
1414
|
+
return !1;
|
|
1415
|
+
for (r = n; r-- !== 0; )
|
|
1416
|
+
if (!{}.hasOwnProperty.call(t, o[r]))
|
|
1417
|
+
return !1;
|
|
1418
|
+
for (r = n; r-- !== 0; ) {
|
|
1419
|
+
const s = o[r];
|
|
1420
|
+
if (!(s === "_owner" && e.$$typeof) && !Tt(e[s], t[s]))
|
|
1421
|
+
return !1;
|
|
1422
|
+
}
|
|
1423
|
+
return !0;
|
|
1424
|
+
}
|
|
1425
|
+
return e !== e && t !== t;
|
|
1426
|
+
}
|
|
1427
|
+
function vr(e) {
|
|
1428
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1429
|
+
}
|
|
1430
|
+
function Cn(e, t) {
|
|
1431
|
+
const n = vr(e);
|
|
1432
|
+
return Math.round(t * n) / n;
|
|
1433
|
+
}
|
|
1434
|
+
function $t(e) {
|
|
1435
|
+
const t = f.useRef(e);
|
|
1436
|
+
return wt(() => {
|
|
1437
|
+
t.current = e;
|
|
1438
|
+
}), t;
|
|
1439
|
+
}
|
|
1440
|
+
function Go(e) {
|
|
1441
|
+
e === void 0 && (e = {});
|
|
1442
|
+
const {
|
|
1443
|
+
placement: t = "bottom",
|
|
1444
|
+
strategy: n = "absolute",
|
|
1445
|
+
middleware: r = [],
|
|
1446
|
+
platform: o,
|
|
1447
|
+
elements: {
|
|
1448
|
+
reference: s,
|
|
1449
|
+
floating: i
|
|
1450
|
+
} = {},
|
|
1451
|
+
transform: c = !0,
|
|
1452
|
+
whileElementsMounted: a,
|
|
1453
|
+
open: u
|
|
1454
|
+
} = e, [l, m] = f.useState({
|
|
1455
|
+
x: 0,
|
|
1456
|
+
y: 0,
|
|
1457
|
+
strategy: n,
|
|
1458
|
+
placement: t,
|
|
1459
|
+
middlewareData: {},
|
|
1460
|
+
isPositioned: !1
|
|
1461
|
+
}), [g, d] = f.useState(r);
|
|
1462
|
+
Tt(g, r) || d(r);
|
|
1463
|
+
const [v, p] = f.useState(null), [y, x] = f.useState(null), b = f.useCallback((h) => {
|
|
1464
|
+
h !== L.current && (L.current = h, p(h));
|
|
1465
|
+
}, []), w = f.useCallback((h) => {
|
|
1466
|
+
h !== N.current && (N.current = h, x(h));
|
|
1467
|
+
}, []), I = s || v, S = i || y, L = f.useRef(null), N = f.useRef(null), P = f.useRef(l), W = a != null, k = $t(a), _ = $t(o), G = $t(u), V = f.useCallback(() => {
|
|
1468
|
+
if (!L.current || !N.current)
|
|
1469
|
+
return;
|
|
1470
|
+
const h = {
|
|
1471
|
+
placement: t,
|
|
1472
|
+
strategy: n,
|
|
1473
|
+
middleware: g
|
|
1474
|
+
};
|
|
1475
|
+
_.current && (h.platform = _.current), Ho(L.current, N.current, h).then((C) => {
|
|
1476
|
+
const D = {
|
|
1477
|
+
...C,
|
|
1478
|
+
// The floating element's position may be recomputed while it's closed
|
|
1479
|
+
// but still mounted (such as when transitioning out). To ensure
|
|
1480
|
+
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1481
|
+
// setting it to `true` when `open === false` (must be specified).
|
|
1482
|
+
isPositioned: G.current !== !1
|
|
1483
|
+
};
|
|
1484
|
+
R.current && !Tt(P.current, D) && (P.current = D, tn.flushSync(() => {
|
|
1485
|
+
m(D);
|
|
1486
|
+
}));
|
|
1487
|
+
});
|
|
1488
|
+
}, [g, t, n, _, G]);
|
|
1489
|
+
wt(() => {
|
|
1490
|
+
u === !1 && P.current.isPositioned && (P.current.isPositioned = !1, m((h) => ({
|
|
1491
|
+
...h,
|
|
1492
|
+
isPositioned: !1
|
|
1493
|
+
})));
|
|
1494
|
+
}, [u]);
|
|
1495
|
+
const R = f.useRef(!1);
|
|
1496
|
+
wt(() => (R.current = !0, () => {
|
|
1497
|
+
R.current = !1;
|
|
1498
|
+
}), []), wt(() => {
|
|
1499
|
+
if (I && (L.current = I), S && (N.current = S), I && S) {
|
|
1500
|
+
if (k.current)
|
|
1501
|
+
return k.current(I, S, V);
|
|
1502
|
+
V();
|
|
1503
|
+
}
|
|
1504
|
+
}, [I, S, V, k, W]);
|
|
1505
|
+
const E = f.useMemo(() => ({
|
|
1506
|
+
reference: L,
|
|
1507
|
+
floating: N,
|
|
1508
|
+
setReference: b,
|
|
1509
|
+
setFloating: w
|
|
1510
|
+
}), [b, w]), $ = f.useMemo(() => ({
|
|
1511
|
+
reference: I,
|
|
1512
|
+
floating: S
|
|
1513
|
+
}), [I, S]), T = f.useMemo(() => {
|
|
1514
|
+
const h = {
|
|
1515
|
+
position: n,
|
|
1516
|
+
left: 0,
|
|
1517
|
+
top: 0
|
|
1518
|
+
};
|
|
1519
|
+
if (!$.floating)
|
|
1520
|
+
return h;
|
|
1521
|
+
const C = Cn($.floating, l.x), D = Cn($.floating, l.y);
|
|
1522
|
+
return c ? {
|
|
1523
|
+
...h,
|
|
1524
|
+
transform: "translate(" + C + "px, " + D + "px)",
|
|
1525
|
+
...vr($.floating) >= 1.5 && {
|
|
1526
|
+
willChange: "transform"
|
|
1527
|
+
}
|
|
1528
|
+
} : {
|
|
1529
|
+
position: n,
|
|
1530
|
+
left: C,
|
|
1531
|
+
top: D
|
|
1532
|
+
};
|
|
1533
|
+
}, [n, c, $.floating, l.x, l.y]);
|
|
1534
|
+
return f.useMemo(() => ({
|
|
1535
|
+
...l,
|
|
1536
|
+
update: V,
|
|
1537
|
+
refs: E,
|
|
1538
|
+
elements: $,
|
|
1539
|
+
floatingStyles: T
|
|
1540
|
+
}), [l, V, E, $, T]);
|
|
1541
|
+
}
|
|
1542
|
+
const Ii = (e, t) => ({
|
|
1543
|
+
...Vo(e),
|
|
1544
|
+
options: [e, t]
|
|
1545
|
+
}), Ci = (e, t) => ({
|
|
1546
|
+
...Ko(e),
|
|
1547
|
+
options: [e, t]
|
|
1548
|
+
}), Ti = (e, t) => ({
|
|
1549
|
+
...$o(e),
|
|
1550
|
+
options: [e, t]
|
|
1551
|
+
}), Oi = (e, t) => ({
|
|
1552
|
+
...Bo(e),
|
|
1553
|
+
options: [e, t]
|
|
1554
|
+
}), Ai = (e, t) => ({
|
|
1555
|
+
...Wo(e),
|
|
1556
|
+
options: [e, t]
|
|
1557
|
+
});
|
|
1558
|
+
function jo(e) {
|
|
1559
|
+
const t = f.useRef(void 0), n = f.useCallback((r) => {
|
|
1560
|
+
const o = e.map((s) => {
|
|
1561
|
+
if (s != null) {
|
|
1562
|
+
if (typeof s == "function") {
|
|
1563
|
+
const i = s, c = i(r);
|
|
1564
|
+
return typeof c == "function" ? c : () => {
|
|
1565
|
+
i(null);
|
|
1566
|
+
};
|
|
1567
|
+
}
|
|
1568
|
+
return s.current = r, () => {
|
|
1569
|
+
s.current = null;
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1572
|
+
});
|
|
1573
|
+
return () => {
|
|
1574
|
+
o.forEach((s) => s == null ? void 0 : s());
|
|
1575
|
+
};
|
|
1576
|
+
}, e);
|
|
1577
|
+
return f.useMemo(() => e.every((r) => r == null) ? null : (r) => {
|
|
1578
|
+
t.current && (t.current(), t.current = void 0), r != null && (t.current = n(r));
|
|
1579
|
+
}, e);
|
|
1580
|
+
}
|
|
1581
|
+
function qo(e, t) {
|
|
1582
|
+
const n = e.compareDocumentPosition(t);
|
|
1583
|
+
return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
|
|
1584
|
+
}
|
|
1585
|
+
const br = /* @__PURE__ */ f.createContext({
|
|
1586
|
+
register: () => {
|
|
1587
|
+
},
|
|
1588
|
+
unregister: () => {
|
|
1589
|
+
},
|
|
1590
|
+
map: /* @__PURE__ */ new Map(),
|
|
1591
|
+
elementsRef: {
|
|
1592
|
+
current: []
|
|
1593
|
+
}
|
|
1594
|
+
});
|
|
1595
|
+
function Yo(e) {
|
|
1596
|
+
const {
|
|
1597
|
+
children: t,
|
|
1598
|
+
elementsRef: n,
|
|
1599
|
+
labelsRef: r
|
|
1600
|
+
} = e, [o, s] = f.useState(() => /* @__PURE__ */ new Set()), i = f.useCallback((u) => {
|
|
1601
|
+
s((l) => new Set(l).add(u));
|
|
1602
|
+
}, []), c = f.useCallback((u) => {
|
|
1603
|
+
s((l) => {
|
|
1604
|
+
const m = new Set(l);
|
|
1605
|
+
return m.delete(u), m;
|
|
1606
|
+
});
|
|
1607
|
+
}, []), a = f.useMemo(() => {
|
|
1608
|
+
const u = /* @__PURE__ */ new Map();
|
|
1609
|
+
return Array.from(o.keys()).sort(qo).forEach((m, g) => {
|
|
1610
|
+
u.set(m, g);
|
|
1611
|
+
}), u;
|
|
1612
|
+
}, [o]);
|
|
1613
|
+
return /* @__PURE__ */ me(br.Provider, {
|
|
1614
|
+
value: f.useMemo(() => ({
|
|
1615
|
+
register: i,
|
|
1616
|
+
unregister: c,
|
|
1617
|
+
map: a,
|
|
1618
|
+
elementsRef: n,
|
|
1619
|
+
labelsRef: r
|
|
1620
|
+
}), [i, c, a, n, r]),
|
|
1621
|
+
children: t
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
function Xo(e) {
|
|
1625
|
+
e === void 0 && (e = {});
|
|
1626
|
+
const {
|
|
1627
|
+
label: t
|
|
1628
|
+
} = e, {
|
|
1629
|
+
register: n,
|
|
1630
|
+
unregister: r,
|
|
1631
|
+
map: o,
|
|
1632
|
+
elementsRef: s,
|
|
1633
|
+
labelsRef: i
|
|
1634
|
+
} = f.useContext(br), [c, a] = f.useState(null), u = f.useRef(null), l = f.useCallback((m) => {
|
|
1635
|
+
if (u.current = m, c !== null && (s.current[c] = m, i)) {
|
|
1636
|
+
var g;
|
|
1637
|
+
const d = t !== void 0;
|
|
1638
|
+
i.current[c] = d ? t : (g = m == null ? void 0 : m.textContent) != null ? g : null;
|
|
1639
|
+
}
|
|
1640
|
+
}, [c, s, i, t]);
|
|
1641
|
+
return Y(() => {
|
|
1642
|
+
const m = u.current;
|
|
1643
|
+
if (m)
|
|
1644
|
+
return n(m), () => {
|
|
1645
|
+
r(m);
|
|
1646
|
+
};
|
|
1647
|
+
}, [n, r]), Y(() => {
|
|
1648
|
+
const m = u.current ? o.get(u.current) : null;
|
|
1649
|
+
m != null && a(m);
|
|
1650
|
+
}, [o]), f.useMemo(() => ({
|
|
1651
|
+
ref: l,
|
|
1652
|
+
index: c ?? -1
|
|
1653
|
+
}), [c, l]);
|
|
1654
|
+
}
|
|
1655
|
+
const Jo = "data-floating-ui-focusable", Tn = "active", On = "selected", Ne = "ArrowLeft", _e = "ArrowRight", st = "ArrowUp", Fe = "ArrowDown";
|
|
1656
|
+
function yr(e, t) {
|
|
1657
|
+
return typeof e == "function" ? e(t) : e ? /* @__PURE__ */ f.cloneElement(e, t) : /* @__PURE__ */ me("div", {
|
|
1658
|
+
...t
|
|
1659
|
+
});
|
|
1660
|
+
}
|
|
1661
|
+
const wr = /* @__PURE__ */ f.createContext({
|
|
1662
|
+
activeIndex: 0,
|
|
1663
|
+
onNavigate: () => {
|
|
1664
|
+
}
|
|
1665
|
+
}), xr = [Ne, _e], Rr = [st, Fe], Bt = [...xr, ...Rr], Mi = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
1666
|
+
const {
|
|
1667
|
+
render: r,
|
|
1668
|
+
orientation: o = "both",
|
|
1669
|
+
loop: s = !0,
|
|
1670
|
+
rtl: i = !1,
|
|
1671
|
+
cols: c = 1,
|
|
1672
|
+
disabledIndices: a,
|
|
1673
|
+
activeIndex: u,
|
|
1674
|
+
onNavigate: l,
|
|
1675
|
+
itemSizes: m,
|
|
1676
|
+
dense: g = !1,
|
|
1677
|
+
...d
|
|
1678
|
+
} = t, [v, p] = f.useState(0), y = u ?? v, x = ie(l ?? p), b = f.useRef([]), w = r && typeof r != "function" ? r.props : {}, I = f.useMemo(() => ({
|
|
1679
|
+
activeIndex: y,
|
|
1680
|
+
onNavigate: x
|
|
1681
|
+
}), [y, x]), S = c > 1;
|
|
1682
|
+
function L(P) {
|
|
1683
|
+
if (!Bt.includes(P.key)) return;
|
|
1684
|
+
let W = y;
|
|
1685
|
+
const k = yt(b, a), _ = en(b, a), G = i ? Ne : _e, V = i ? _e : Ne;
|
|
1686
|
+
if (S) {
|
|
1687
|
+
const h = m || Array.from({
|
|
1688
|
+
length: b.current.length
|
|
1689
|
+
}, () => ({
|
|
1690
|
+
width: 1,
|
|
1691
|
+
height: 1
|
|
1692
|
+
})), C = ir(h, c, g), D = C.findIndex((O) => O != null && !Be(b, O, a)), ee = C.reduce((O, J, j) => J != null && !Be(b, J, a) ? j : O, -1), F = C[or({
|
|
1693
|
+
current: C.map((O) => O ? b.current[O] : null)
|
|
1694
|
+
}, {
|
|
1695
|
+
event: P,
|
|
1696
|
+
orientation: o,
|
|
1697
|
+
loop: s,
|
|
1698
|
+
rtl: i,
|
|
1699
|
+
cols: c,
|
|
1700
|
+
// treat undefined (empty grid spaces) as disabled indices so we
|
|
1701
|
+
// don't end up in them
|
|
1702
|
+
disabledIndices: cr([...(typeof a != "function" ? a : null) || b.current.map((O, J) => Be(b, J, a) ? J : void 0), void 0], C),
|
|
1703
|
+
minIndex: D,
|
|
1704
|
+
maxIndex: ee,
|
|
1705
|
+
prevIndex: sr(
|
|
1706
|
+
y > _ ? k : y,
|
|
1707
|
+
h,
|
|
1708
|
+
C,
|
|
1709
|
+
c,
|
|
1710
|
+
// use a corner matching the edge closest to the direction we're
|
|
1711
|
+
// moving in so we don't end up in the same item. Prefer
|
|
1712
|
+
// top/left over bottom/right.
|
|
1713
|
+
P.key === Fe ? "bl" : P.key === G ? "tr" : "tl"
|
|
1714
|
+
)
|
|
1715
|
+
})];
|
|
1716
|
+
F != null && (W = F);
|
|
1717
|
+
}
|
|
1718
|
+
const R = {
|
|
1719
|
+
horizontal: [G],
|
|
1720
|
+
vertical: [Fe],
|
|
1721
|
+
both: [G, Fe]
|
|
1722
|
+
}[o], E = {
|
|
1723
|
+
horizontal: [V],
|
|
1724
|
+
vertical: [st],
|
|
1725
|
+
both: [V, st]
|
|
1726
|
+
}[o], $ = S ? Bt : {
|
|
1727
|
+
horizontal: xr,
|
|
1728
|
+
vertical: Rr,
|
|
1729
|
+
both: Bt
|
|
1730
|
+
}[o];
|
|
1731
|
+
if (W === y && [...R, ...E].includes(P.key) && (s && W === _ && R.includes(P.key) ? W = k : s && W === k && E.includes(P.key) ? W = _ : W = ue(b, {
|
|
1732
|
+
startingIndex: W,
|
|
1733
|
+
decrement: E.includes(P.key),
|
|
1734
|
+
disabledIndices: a
|
|
1735
|
+
})), W !== y && !qe(b, W)) {
|
|
1736
|
+
var T;
|
|
1737
|
+
P.stopPropagation(), $.includes(P.key) && P.preventDefault(), x(W), (T = b.current[W]) == null || T.focus();
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
const N = {
|
|
1741
|
+
...d,
|
|
1742
|
+
...w,
|
|
1743
|
+
ref: n,
|
|
1744
|
+
"aria-orientation": o === "both" ? void 0 : o,
|
|
1745
|
+
onKeyDown(P) {
|
|
1746
|
+
d.onKeyDown == null || d.onKeyDown(P), w.onKeyDown == null || w.onKeyDown(P), L(P);
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
return /* @__PURE__ */ me(wr.Provider, {
|
|
1750
|
+
value: I,
|
|
1751
|
+
children: /* @__PURE__ */ me(Yo, {
|
|
1752
|
+
elementsRef: b,
|
|
1753
|
+
children: yr(r, N)
|
|
1754
|
+
})
|
|
1755
|
+
});
|
|
1756
|
+
}), Si = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
1757
|
+
const {
|
|
1758
|
+
render: r,
|
|
1759
|
+
...o
|
|
1760
|
+
} = t, s = r && typeof r != "function" ? r.props : {}, {
|
|
1761
|
+
activeIndex: i,
|
|
1762
|
+
onNavigate: c
|
|
1763
|
+
} = f.useContext(wr), {
|
|
1764
|
+
ref: a,
|
|
1765
|
+
index: u
|
|
1766
|
+
} = Xo(), l = jo([a, n, s.ref]), m = i === u, g = {
|
|
1767
|
+
...o,
|
|
1768
|
+
...s,
|
|
1769
|
+
ref: l,
|
|
1770
|
+
tabIndex: m ? 0 : -1,
|
|
1771
|
+
"data-active": m ? "" : void 0,
|
|
1772
|
+
onFocus(d) {
|
|
1773
|
+
o.onFocus == null || o.onFocus(d), s.onFocus == null || s.onFocus(d), c(u);
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
1776
|
+
return yr(r, g);
|
|
1777
|
+
}), Qo = {
|
|
1778
|
+
...f
|
|
1779
|
+
};
|
|
1780
|
+
let An = !1, Zo = 0;
|
|
1781
|
+
const Mn = () => (
|
|
1782
|
+
// Ensure the id is unique with multiple independent versions of Floating UI
|
|
1783
|
+
// on <React 18
|
|
1784
|
+
"floating-ui-" + Math.random().toString(36).slice(2, 6) + Zo++
|
|
1785
|
+
);
|
|
1786
|
+
function ei() {
|
|
1787
|
+
const [e, t] = f.useState(() => An ? Mn() : void 0);
|
|
1788
|
+
return Y(() => {
|
|
1789
|
+
e == null && t(Mn());
|
|
1790
|
+
}, []), f.useEffect(() => {
|
|
1791
|
+
An = !0;
|
|
1792
|
+
}, []), e;
|
|
1793
|
+
}
|
|
1794
|
+
const ti = Qo.useId, Lt = ti || ei;
|
|
1795
|
+
let ct;
|
|
1796
|
+
process.env.NODE_ENV !== "production" && (ct = /* @__PURE__ */ new Set());
|
|
1797
|
+
function Ht() {
|
|
1798
|
+
for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
1799
|
+
n[r] = arguments[r];
|
|
1800
|
+
const o = "Floating UI: " + n.join(" ");
|
|
1801
|
+
if (!((e = ct) != null && e.has(o))) {
|
|
1802
|
+
var s;
|
|
1803
|
+
(s = ct) == null || s.add(o), console.warn(o);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
function ni() {
|
|
1807
|
+
for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
1808
|
+
n[r] = arguments[r];
|
|
1809
|
+
const o = "Floating UI: " + n.join(" ");
|
|
1810
|
+
if (!((e = ct) != null && e.has(o))) {
|
|
1811
|
+
var s;
|
|
1812
|
+
(s = ct) == null || s.add(o), console.error(o);
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
function Er() {
|
|
1816
|
+
const e = /* @__PURE__ */ new Map();
|
|
1817
|
+
return {
|
|
1818
|
+
emit(t, n) {
|
|
1819
|
+
var r;
|
|
1820
|
+
(r = e.get(t)) == null || r.forEach((o) => o(n));
|
|
1821
|
+
},
|
|
1822
|
+
on(t, n) {
|
|
1823
|
+
e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n);
|
|
1824
|
+
},
|
|
1825
|
+
off(t, n) {
|
|
1826
|
+
var r;
|
|
1827
|
+
(r = e.get(t)) == null || r.delete(n);
|
|
1828
|
+
}
|
|
1829
|
+
};
|
|
1830
|
+
}
|
|
1831
|
+
const Ir = /* @__PURE__ */ f.createContext(null), Cr = /* @__PURE__ */ f.createContext(null), Ze = () => {
|
|
1832
|
+
var e;
|
|
1833
|
+
return ((e = f.useContext(Ir)) == null ? void 0 : e.id) || null;
|
|
1834
|
+
}, et = () => f.useContext(Cr);
|
|
1835
|
+
function Pi(e) {
|
|
1836
|
+
const t = Lt(), n = et(), o = Ze();
|
|
1837
|
+
return Y(() => {
|
|
1838
|
+
if (!t) return;
|
|
1839
|
+
const s = {
|
|
1840
|
+
id: t,
|
|
1841
|
+
parentId: o
|
|
1842
|
+
};
|
|
1843
|
+
return n == null || n.addNode(s), () => {
|
|
1844
|
+
n == null || n.removeNode(s);
|
|
1845
|
+
};
|
|
1846
|
+
}, [n, t, o]), t;
|
|
1847
|
+
}
|
|
1848
|
+
function Di(e) {
|
|
1849
|
+
const {
|
|
1850
|
+
children: t,
|
|
1851
|
+
id: n
|
|
1852
|
+
} = e, r = Ze();
|
|
1853
|
+
return /* @__PURE__ */ me(Ir.Provider, {
|
|
1854
|
+
value: f.useMemo(() => ({
|
|
1855
|
+
id: n,
|
|
1856
|
+
parentId: r
|
|
1857
|
+
}), [n, r]),
|
|
1858
|
+
children: t
|
|
1859
|
+
});
|
|
1860
|
+
}
|
|
1861
|
+
function ki(e) {
|
|
1862
|
+
const {
|
|
1863
|
+
children: t
|
|
1864
|
+
} = e, n = f.useRef([]), r = f.useCallback((i) => {
|
|
1865
|
+
n.current = [...n.current, i];
|
|
1866
|
+
}, []), o = f.useCallback((i) => {
|
|
1867
|
+
n.current = n.current.filter((c) => c !== i);
|
|
1868
|
+
}, []), [s] = f.useState(() => Er());
|
|
1869
|
+
return /* @__PURE__ */ me(Cr.Provider, {
|
|
1870
|
+
value: f.useMemo(() => ({
|
|
1871
|
+
nodesRef: n,
|
|
1872
|
+
addNode: r,
|
|
1873
|
+
removeNode: o,
|
|
1874
|
+
events: s
|
|
1875
|
+
}), [r, o, s]),
|
|
1876
|
+
children: t
|
|
1877
|
+
});
|
|
1878
|
+
}
|
|
1879
|
+
function ze(e) {
|
|
1880
|
+
return "data-floating-ui-" + e;
|
|
1881
|
+
}
|
|
1882
|
+
function ge(e) {
|
|
1883
|
+
e.current !== -1 && (clearTimeout(e.current), e.current = -1);
|
|
1884
|
+
}
|
|
1885
|
+
const Sn = /* @__PURE__ */ ze("safe-polygon");
|
|
1886
|
+
function zt(e, t, n) {
|
|
1887
|
+
if (n && !it(n))
|
|
1888
|
+
return 0;
|
|
1889
|
+
if (typeof e == "number")
|
|
1890
|
+
return e;
|
|
1891
|
+
if (typeof e == "function") {
|
|
1892
|
+
const r = e();
|
|
1893
|
+
return typeof r == "number" ? r : r == null ? void 0 : r[t];
|
|
1894
|
+
}
|
|
1895
|
+
return e == null ? void 0 : e[t];
|
|
1896
|
+
}
|
|
1897
|
+
function Ut(e) {
|
|
1898
|
+
return typeof e == "function" ? e() : e;
|
|
1899
|
+
}
|
|
1900
|
+
function Li(e, t) {
|
|
1901
|
+
t === void 0 && (t = {});
|
|
1902
|
+
const {
|
|
1903
|
+
open: n,
|
|
1904
|
+
onOpenChange: r,
|
|
1905
|
+
dataRef: o,
|
|
1906
|
+
events: s,
|
|
1907
|
+
elements: i
|
|
1908
|
+
} = e, {
|
|
1909
|
+
enabled: c = !0,
|
|
1910
|
+
delay: a = 0,
|
|
1911
|
+
handleClose: u = null,
|
|
1912
|
+
mouseOnly: l = !1,
|
|
1913
|
+
restMs: m = 0,
|
|
1914
|
+
move: g = !0
|
|
1915
|
+
} = t, d = et(), v = Ze(), p = ye(u), y = ye(a), x = ye(n), b = ye(m), w = f.useRef(), I = f.useRef(-1), S = f.useRef(), L = f.useRef(-1), N = f.useRef(!0), P = f.useRef(!1), W = f.useRef(() => {
|
|
1916
|
+
}), k = f.useRef(!1), _ = ie(() => {
|
|
1917
|
+
var T;
|
|
1918
|
+
const h = (T = o.current.openEvent) == null ? void 0 : T.type;
|
|
1919
|
+
return (h == null ? void 0 : h.includes("mouse")) && h !== "mousedown";
|
|
1920
|
+
});
|
|
1921
|
+
f.useEffect(() => {
|
|
1922
|
+
if (!c) return;
|
|
1923
|
+
function T(h) {
|
|
1924
|
+
let {
|
|
1925
|
+
open: C
|
|
1926
|
+
} = h;
|
|
1927
|
+
C || (ge(I), ge(L), N.current = !0, k.current = !1);
|
|
1928
|
+
}
|
|
1929
|
+
return s.on("openchange", T), () => {
|
|
1930
|
+
s.off("openchange", T);
|
|
1931
|
+
};
|
|
1932
|
+
}, [c, s]), f.useEffect(() => {
|
|
1933
|
+
if (!c || !p.current || !n) return;
|
|
1934
|
+
function T(C) {
|
|
1935
|
+
_() && r(!1, C, "hover");
|
|
1936
|
+
}
|
|
1937
|
+
const h = le(i.floating).documentElement;
|
|
1938
|
+
return h.addEventListener("mouseleave", T), () => {
|
|
1939
|
+
h.removeEventListener("mouseleave", T);
|
|
1940
|
+
};
|
|
1941
|
+
}, [i.floating, n, r, c, p, _]);
|
|
1942
|
+
const G = f.useCallback(function(T, h, C) {
|
|
1943
|
+
h === void 0 && (h = !0), C === void 0 && (C = "hover");
|
|
1944
|
+
const D = zt(y.current, "close", w.current);
|
|
1945
|
+
D && !S.current ? (ge(I), I.current = window.setTimeout(() => r(!1, T, C), D)) : h && (ge(I), r(!1, T, C));
|
|
1946
|
+
}, [y, r]), V = ie(() => {
|
|
1947
|
+
W.current(), S.current = void 0;
|
|
1948
|
+
}), R = ie(() => {
|
|
1949
|
+
if (P.current) {
|
|
1950
|
+
const T = le(i.floating).body;
|
|
1951
|
+
T.style.pointerEvents = "", T.removeAttribute(Sn), P.current = !1;
|
|
1952
|
+
}
|
|
1953
|
+
}), E = ie(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
|
|
1954
|
+
f.useEffect(() => {
|
|
1955
|
+
if (!c) return;
|
|
1956
|
+
function T(F) {
|
|
1957
|
+
if (ge(I), N.current = !1, l && !it(w.current) || Ut(b.current) > 0 && !zt(y.current, "open"))
|
|
1958
|
+
return;
|
|
1959
|
+
const O = zt(y.current, "open", w.current);
|
|
1960
|
+
O ? I.current = window.setTimeout(() => {
|
|
1961
|
+
x.current || r(!0, F, "hover");
|
|
1962
|
+
}, O) : n || r(!0, F, "hover");
|
|
1963
|
+
}
|
|
1964
|
+
function h(F) {
|
|
1965
|
+
if (E()) {
|
|
1966
|
+
R();
|
|
1967
|
+
return;
|
|
1968
|
+
}
|
|
1969
|
+
W.current();
|
|
1970
|
+
const O = le(i.floating);
|
|
1971
|
+
if (ge(L), k.current = !1, p.current && o.current.floatingContext) {
|
|
1972
|
+
n || ge(I), S.current = p.current({
|
|
1973
|
+
...o.current.floatingContext,
|
|
1974
|
+
tree: d,
|
|
1975
|
+
x: F.clientX,
|
|
1976
|
+
y: F.clientY,
|
|
1977
|
+
onClose() {
|
|
1978
|
+
R(), V(), E() || G(F, !0, "safe-polygon");
|
|
1979
|
+
}
|
|
1980
|
+
});
|
|
1981
|
+
const j = S.current;
|
|
1982
|
+
O.addEventListener("mousemove", j), W.current = () => {
|
|
1983
|
+
O.removeEventListener("mousemove", j);
|
|
1984
|
+
};
|
|
1985
|
+
return;
|
|
1986
|
+
}
|
|
1987
|
+
(w.current === "touch" ? !ce(i.floating, F.relatedTarget) : !0) && G(F);
|
|
1988
|
+
}
|
|
1989
|
+
function C(F) {
|
|
1990
|
+
E() || o.current.floatingContext && (p.current == null || p.current({
|
|
1991
|
+
...o.current.floatingContext,
|
|
1992
|
+
tree: d,
|
|
1993
|
+
x: F.clientX,
|
|
1994
|
+
y: F.clientY,
|
|
1995
|
+
onClose() {
|
|
1996
|
+
R(), V(), E() || G(F);
|
|
1997
|
+
}
|
|
1998
|
+
})(F));
|
|
1999
|
+
}
|
|
2000
|
+
function D() {
|
|
2001
|
+
ge(I);
|
|
2002
|
+
}
|
|
2003
|
+
function ee(F) {
|
|
2004
|
+
E() || G(F, !1);
|
|
2005
|
+
}
|
|
2006
|
+
if (X(i.domReference)) {
|
|
2007
|
+
const F = i.domReference, O = i.floating;
|
|
2008
|
+
return n && F.addEventListener("mouseleave", C), g && F.addEventListener("mousemove", T, {
|
|
2009
|
+
once: !0
|
|
2010
|
+
}), F.addEventListener("mouseenter", T), F.addEventListener("mouseleave", h), O && (O.addEventListener("mouseleave", C), O.addEventListener("mouseenter", D), O.addEventListener("mouseleave", ee)), () => {
|
|
2011
|
+
n && F.removeEventListener("mouseleave", C), g && F.removeEventListener("mousemove", T), F.removeEventListener("mouseenter", T), F.removeEventListener("mouseleave", h), O && (O.removeEventListener("mouseleave", C), O.removeEventListener("mouseenter", D), O.removeEventListener("mouseleave", ee));
|
|
2012
|
+
};
|
|
2013
|
+
}
|
|
2014
|
+
}, [i, c, e, l, g, G, V, R, r, n, x, d, y, p, o, E, b]), Y(() => {
|
|
2015
|
+
var T;
|
|
2016
|
+
if (c && n && (T = p.current) != null && (T = T.__options) != null && T.blockPointerEvents && _()) {
|
|
2017
|
+
P.current = !0;
|
|
2018
|
+
const C = i.floating;
|
|
2019
|
+
if (X(i.domReference) && C) {
|
|
2020
|
+
var h;
|
|
2021
|
+
const D = le(i.floating).body;
|
|
2022
|
+
D.setAttribute(Sn, "");
|
|
2023
|
+
const ee = i.domReference, F = d == null || (h = d.nodesRef.current.find((O) => O.id === v)) == null || (h = h.context) == null ? void 0 : h.elements.floating;
|
|
2024
|
+
return F && (F.style.pointerEvents = ""), D.style.pointerEvents = "none", ee.style.pointerEvents = "auto", C.style.pointerEvents = "auto", () => {
|
|
2025
|
+
D.style.pointerEvents = "", ee.style.pointerEvents = "", C.style.pointerEvents = "";
|
|
2026
|
+
};
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
}, [c, n, v, i, d, p, _]), Y(() => {
|
|
2030
|
+
n || (w.current = void 0, k.current = !1, V(), R());
|
|
2031
|
+
}, [n, V, R]), f.useEffect(() => () => {
|
|
2032
|
+
V(), ge(I), ge(L), R();
|
|
2033
|
+
}, [c, i.domReference, V, R]);
|
|
2034
|
+
const $ = f.useMemo(() => {
|
|
2035
|
+
function T(h) {
|
|
2036
|
+
w.current = h.pointerType;
|
|
2037
|
+
}
|
|
2038
|
+
return {
|
|
2039
|
+
onPointerDown: T,
|
|
2040
|
+
onPointerEnter: T,
|
|
2041
|
+
onMouseMove(h) {
|
|
2042
|
+
const {
|
|
2043
|
+
nativeEvent: C
|
|
2044
|
+
} = h;
|
|
2045
|
+
function D() {
|
|
2046
|
+
!N.current && !x.current && r(!0, C, "hover");
|
|
2047
|
+
}
|
|
2048
|
+
l && !it(w.current) || n || Ut(b.current) === 0 || k.current && h.movementX ** 2 + h.movementY ** 2 < 2 || (ge(L), w.current === "touch" ? D() : (k.current = !0, L.current = window.setTimeout(D, Ut(b.current))));
|
|
2049
|
+
}
|
|
2050
|
+
};
|
|
2051
|
+
}, [l, r, n, x, b]);
|
|
2052
|
+
return f.useMemo(() => c ? {
|
|
2053
|
+
reference: $
|
|
2054
|
+
} : {}, [c, $]);
|
|
2055
|
+
}
|
|
2056
|
+
let Pn = 0;
|
|
2057
|
+
function Ke(e, t) {
|
|
2058
|
+
t === void 0 && (t = {});
|
|
2059
|
+
const {
|
|
2060
|
+
preventScroll: n = !1,
|
|
2061
|
+
cancelPrevious: r = !0,
|
|
2062
|
+
sync: o = !1
|
|
2063
|
+
} = t;
|
|
2064
|
+
r && cancelAnimationFrame(Pn);
|
|
2065
|
+
const s = () => e == null ? void 0 : e.focus({
|
|
2066
|
+
preventScroll: n
|
|
2067
|
+
});
|
|
2068
|
+
o ? s() : Pn = requestAnimationFrame(s);
|
|
2069
|
+
}
|
|
2070
|
+
function ri(e) {
|
|
2071
|
+
return (e == null ? void 0 : e.ownerDocument) || document;
|
|
2072
|
+
}
|
|
2073
|
+
const Xe = {
|
|
2074
|
+
inert: /* @__PURE__ */ new WeakMap(),
|
|
2075
|
+
"aria-hidden": /* @__PURE__ */ new WeakMap(),
|
|
2076
|
+
none: /* @__PURE__ */ new WeakMap()
|
|
2077
|
+
};
|
|
2078
|
+
function Dn(e) {
|
|
2079
|
+
return e === "inert" ? Xe.inert : e === "aria-hidden" ? Xe["aria-hidden"] : Xe.none;
|
|
2080
|
+
}
|
|
2081
|
+
let gt = /* @__PURE__ */ new WeakSet(), ht = {}, Gt = 0;
|
|
2082
|
+
const oi = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, Tr = (e) => e && (e.host || Tr(e.parentNode)), ii = (e, t) => t.map((n) => {
|
|
2083
|
+
if (e.contains(n))
|
|
2084
|
+
return n;
|
|
2085
|
+
const r = Tr(n);
|
|
2086
|
+
return e.contains(r) ? r : null;
|
|
2087
|
+
}).filter((n) => n != null);
|
|
2088
|
+
function si(e, t, n, r) {
|
|
2089
|
+
const o = "data-floating-ui-inert", s = r ? "inert" : n ? "aria-hidden" : null, i = ii(t, e), c = /* @__PURE__ */ new Set(), a = new Set(i), u = [];
|
|
2090
|
+
ht[o] || (ht[o] = /* @__PURE__ */ new WeakMap());
|
|
2091
|
+
const l = ht[o];
|
|
2092
|
+
i.forEach(m), g(t), c.clear();
|
|
2093
|
+
function m(d) {
|
|
2094
|
+
!d || c.has(d) || (c.add(d), d.parentNode && m(d.parentNode));
|
|
2095
|
+
}
|
|
2096
|
+
function g(d) {
|
|
2097
|
+
!d || a.has(d) || [].forEach.call(d.children, (v) => {
|
|
2098
|
+
if (Ve(v) !== "script")
|
|
2099
|
+
if (c.has(v))
|
|
2100
|
+
g(v);
|
|
2101
|
+
else {
|
|
2102
|
+
const p = s ? v.getAttribute(s) : null, y = p !== null && p !== "false", x = Dn(s), b = (x.get(v) || 0) + 1, w = (l.get(v) || 0) + 1;
|
|
2103
|
+
x.set(v, b), l.set(v, w), u.push(v), b === 1 && y && gt.add(v), w === 1 && v.setAttribute(o, ""), !y && s && v.setAttribute(s, s === "inert" ? "" : "true");
|
|
2104
|
+
}
|
|
2105
|
+
});
|
|
2106
|
+
}
|
|
2107
|
+
return Gt++, () => {
|
|
2108
|
+
u.forEach((d) => {
|
|
2109
|
+
const v = Dn(s), y = (v.get(d) || 0) - 1, x = (l.get(d) || 0) - 1;
|
|
2110
|
+
v.set(d, y), l.set(d, x), y || (!gt.has(d) && s && d.removeAttribute(s), gt.delete(d)), x || d.removeAttribute(o);
|
|
2111
|
+
}), Gt--, Gt || (Xe.inert = /* @__PURE__ */ new WeakMap(), Xe["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Xe.none = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakSet(), ht = {});
|
|
2112
|
+
};
|
|
2113
|
+
}
|
|
2114
|
+
function kn(e, t, n) {
|
|
2115
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2116
|
+
const r = ri(e[0]).body;
|
|
2117
|
+
return si(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))), r, t, n);
|
|
2118
|
+
}
|
|
2119
|
+
const Ft = {
|
|
2120
|
+
border: 0,
|
|
2121
|
+
clip: "rect(0 0 0 0)",
|
|
2122
|
+
height: "1px",
|
|
2123
|
+
margin: "-1px",
|
|
2124
|
+
overflow: "hidden",
|
|
2125
|
+
padding: 0,
|
|
2126
|
+
position: "fixed",
|
|
2127
|
+
whiteSpace: "nowrap",
|
|
2128
|
+
width: "1px",
|
|
2129
|
+
top: 0,
|
|
2130
|
+
left: 0
|
|
2131
|
+
}, Ot = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
2132
|
+
const [r, o] = f.useState();
|
|
2133
|
+
Y(() => {
|
|
2134
|
+
er() && o("button");
|
|
2135
|
+
}, []);
|
|
2136
|
+
const s = {
|
|
2137
|
+
ref: n,
|
|
2138
|
+
tabIndex: 0,
|
|
2139
|
+
// Role is only for VoiceOver
|
|
2140
|
+
role: r,
|
|
2141
|
+
"aria-hidden": r ? void 0 : !0,
|
|
2142
|
+
[ze("focus-guard")]: "",
|
|
2143
|
+
style: Ft
|
|
2144
|
+
};
|
|
2145
|
+
return /* @__PURE__ */ me("span", {
|
|
2146
|
+
...t,
|
|
2147
|
+
...s
|
|
2148
|
+
});
|
|
2149
|
+
}), Or = /* @__PURE__ */ f.createContext(null), Ln = /* @__PURE__ */ ze("portal");
|
|
2150
|
+
function ci(e) {
|
|
2151
|
+
e === void 0 && (e = {});
|
|
2152
|
+
const {
|
|
2153
|
+
id: t,
|
|
2154
|
+
root: n
|
|
2155
|
+
} = e, r = Lt(), o = Ar(), [s, i] = f.useState(null), c = f.useRef(null);
|
|
2156
|
+
return Y(() => () => {
|
|
2157
|
+
s == null || s.remove(), queueMicrotask(() => {
|
|
2158
|
+
c.current = null;
|
|
2159
|
+
});
|
|
2160
|
+
}, [s]), Y(() => {
|
|
2161
|
+
if (!r || c.current) return;
|
|
2162
|
+
const a = t ? document.getElementById(t) : null;
|
|
2163
|
+
if (!a) return;
|
|
2164
|
+
const u = document.createElement("div");
|
|
2165
|
+
u.id = r, u.setAttribute(Ln, ""), a.appendChild(u), c.current = u, i(u);
|
|
2166
|
+
}, [t, r]), Y(() => {
|
|
2167
|
+
if (n === null || !r || c.current) return;
|
|
2168
|
+
let a = n || (o == null ? void 0 : o.portalNode);
|
|
2169
|
+
a && !nn(a) && (a = a.current), a = a || document.body;
|
|
2170
|
+
let u = null;
|
|
2171
|
+
t && (u = document.createElement("div"), u.id = t, a.appendChild(u));
|
|
2172
|
+
const l = document.createElement("div");
|
|
2173
|
+
l.id = r, l.setAttribute(Ln, ""), a = u || a, a.appendChild(l), c.current = l, i(l);
|
|
2174
|
+
}, [t, n, r, o]), s;
|
|
2175
|
+
}
|
|
2176
|
+
function Fi(e) {
|
|
2177
|
+
const {
|
|
2178
|
+
children: t,
|
|
2179
|
+
id: n,
|
|
2180
|
+
root: r,
|
|
2181
|
+
preserveTabOrder: o = !0
|
|
2182
|
+
} = e, s = ci({
|
|
2183
|
+
id: n,
|
|
2184
|
+
root: r
|
|
2185
|
+
}), [i, c] = f.useState(null), a = f.useRef(null), u = f.useRef(null), l = f.useRef(null), m = f.useRef(null), g = i == null ? void 0 : i.modal, d = i == null ? void 0 : i.open, v = (
|
|
2186
|
+
// The FocusManager and therefore floating element are currently open/
|
|
2187
|
+
// rendered.
|
|
2188
|
+
!!i && // Guards are only for non-modal focus management.
|
|
2189
|
+
!i.modal && // Don't render if unmount is transitioning.
|
|
2190
|
+
i.open && o && !!(r || s)
|
|
2191
|
+
);
|
|
2192
|
+
return f.useEffect(() => {
|
|
2193
|
+
if (!s || !o || g)
|
|
2194
|
+
return;
|
|
2195
|
+
function p(y) {
|
|
2196
|
+
s && ot(y) && (y.type === "focusin" ? xn : fo)(s);
|
|
2197
|
+
}
|
|
2198
|
+
return s.addEventListener("focusin", p, !0), s.addEventListener("focusout", p, !0), () => {
|
|
2199
|
+
s.removeEventListener("focusin", p, !0), s.removeEventListener("focusout", p, !0);
|
|
2200
|
+
};
|
|
2201
|
+
}, [s, o, g]), f.useEffect(() => {
|
|
2202
|
+
s && (d || xn(s));
|
|
2203
|
+
}, [d, s]), /* @__PURE__ */ jn(Or.Provider, {
|
|
2204
|
+
value: f.useMemo(() => ({
|
|
2205
|
+
preserveTabOrder: o,
|
|
2206
|
+
beforeOutsideRef: a,
|
|
2207
|
+
afterOutsideRef: u,
|
|
2208
|
+
beforeInsideRef: l,
|
|
2209
|
+
afterInsideRef: m,
|
|
2210
|
+
portalNode: s,
|
|
2211
|
+
setFocusManagerState: c
|
|
2212
|
+
}), [o, s]),
|
|
2213
|
+
children: [v && s && /* @__PURE__ */ me(Ot, {
|
|
2214
|
+
"data-type": "outside",
|
|
2215
|
+
ref: a,
|
|
2216
|
+
onFocus: (p) => {
|
|
2217
|
+
if (ot(p, s)) {
|
|
2218
|
+
var y;
|
|
2219
|
+
(y = l.current) == null || y.focus();
|
|
2220
|
+
} else {
|
|
2221
|
+
const x = i ? i.domReference : null, b = ar(x);
|
|
2222
|
+
b == null || b.focus();
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
}), v && s && /* @__PURE__ */ me("span", {
|
|
2226
|
+
"aria-owns": s.id,
|
|
2227
|
+
style: Ft
|
|
2228
|
+
}), s && /* @__PURE__ */ tn.createPortal(t, s), v && s && /* @__PURE__ */ me(Ot, {
|
|
2229
|
+
"data-type": "outside",
|
|
2230
|
+
ref: u,
|
|
2231
|
+
onFocus: (p) => {
|
|
2232
|
+
if (ot(p, s)) {
|
|
2233
|
+
var y;
|
|
2234
|
+
(y = m.current) == null || y.focus();
|
|
2235
|
+
} else {
|
|
2236
|
+
const x = i ? i.domReference : null, b = lr(x);
|
|
2237
|
+
b == null || b.focus(), i != null && i.closeOnFocusOut && (i == null || i.onOpenChange(!1, p.nativeEvent, "focus-out"));
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
})]
|
|
2241
|
+
});
|
|
2242
|
+
}
|
|
2243
|
+
const Ar = () => f.useContext(Or);
|
|
2244
|
+
function Fn(e) {
|
|
2245
|
+
return f.useMemo(() => (t) => {
|
|
2246
|
+
e.forEach((n) => {
|
|
2247
|
+
n && (n.current = t);
|
|
2248
|
+
});
|
|
2249
|
+
}, e);
|
|
2250
|
+
}
|
|
2251
|
+
const ui = 20;
|
|
2252
|
+
let ke = [];
|
|
2253
|
+
function ln() {
|
|
2254
|
+
ke = ke.filter((e) => e.isConnected);
|
|
2255
|
+
}
|
|
2256
|
+
function li(e) {
|
|
2257
|
+
ln(), e && Ve(e) !== "body" && (ke.push(e), ke.length > ui && (ke = ke.slice(-20)));
|
|
2258
|
+
}
|
|
2259
|
+
function Nn() {
|
|
2260
|
+
return ln(), ke[ke.length - 1];
|
|
2261
|
+
}
|
|
2262
|
+
function ai(e) {
|
|
2263
|
+
const t = lt();
|
|
2264
|
+
return Gn(e, t) ? e : At(e, t)[0] || e;
|
|
2265
|
+
}
|
|
2266
|
+
function _n(e, t) {
|
|
2267
|
+
var n;
|
|
2268
|
+
if (!t.current.includes("floating") && !((n = e.getAttribute("role")) != null && n.includes("dialog")))
|
|
2269
|
+
return;
|
|
2270
|
+
const r = lt(), s = Sr(e, r).filter((c) => {
|
|
2271
|
+
const a = c.getAttribute("data-tabindex") || "";
|
|
2272
|
+
return Gn(c, r) || c.hasAttribute("data-tabindex") && !a.startsWith("-");
|
|
2273
|
+
}), i = e.getAttribute("tabindex");
|
|
2274
|
+
t.current.includes("floating") || s.length === 0 ? i !== "0" && e.setAttribute("tabindex", "0") : (i !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
|
|
2275
|
+
}
|
|
2276
|
+
const fi = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
2277
|
+
return /* @__PURE__ */ me("button", {
|
|
2278
|
+
...t,
|
|
2279
|
+
type: "button",
|
|
2280
|
+
ref: n,
|
|
2281
|
+
tabIndex: -1,
|
|
2282
|
+
style: Ft
|
|
2283
|
+
});
|
|
2284
|
+
});
|
|
2285
|
+
function Ni(e) {
|
|
2286
|
+
const {
|
|
2287
|
+
context: t,
|
|
2288
|
+
children: n,
|
|
2289
|
+
disabled: r = !1,
|
|
2290
|
+
order: o = ["content"],
|
|
2291
|
+
guards: s = !0,
|
|
2292
|
+
initialFocus: i = 0,
|
|
2293
|
+
returnFocus: c = !0,
|
|
2294
|
+
restoreFocus: a = !1,
|
|
2295
|
+
modal: u = !0,
|
|
2296
|
+
visuallyHiddenDismiss: l = !1,
|
|
2297
|
+
closeOnFocusOut: m = !0,
|
|
2298
|
+
outsideElementsInert: g = !1,
|
|
2299
|
+
getInsideElements: d = () => []
|
|
2300
|
+
} = e, {
|
|
2301
|
+
open: v,
|
|
2302
|
+
onOpenChange: p,
|
|
2303
|
+
events: y,
|
|
2304
|
+
dataRef: x,
|
|
2305
|
+
elements: {
|
|
2306
|
+
domReference: b,
|
|
2307
|
+
floating: w
|
|
2308
|
+
}
|
|
2309
|
+
} = t, I = ie(() => {
|
|
2310
|
+
var K;
|
|
2311
|
+
return (K = x.current.floatingContext) == null ? void 0 : K.nodeId;
|
|
2312
|
+
}), S = ie(d), L = typeof i == "number" && i < 0, N = Zt(b) && L, P = oi(), W = P ? s : !0, k = !W || P && g, _ = ye(o), G = ye(i), V = ye(c), R = et(), E = Ar(), $ = f.useRef(null), T = f.useRef(null), h = f.useRef(!1), C = f.useRef(!1), D = f.useRef(-1), ee = f.useRef(-1), F = E != null, O = Ct(w), J = ie(function(K) {
|
|
2313
|
+
return K === void 0 && (K = O), K ? At(K, lt()) : [];
|
|
2314
|
+
}), j = ie((K) => {
|
|
2315
|
+
const z = J(K);
|
|
2316
|
+
return _.current.map((B) => b && B === "reference" ? b : O && B === "floating" ? O : z).filter(Boolean).flat();
|
|
2317
|
+
});
|
|
2318
|
+
f.useEffect(() => {
|
|
2319
|
+
if (r || !u) return;
|
|
2320
|
+
function K(B) {
|
|
2321
|
+
if (B.key === "Tab") {
|
|
2322
|
+
ce(O, Re(le(O))) && J().length === 0 && !N && de(B);
|
|
2323
|
+
const Q = j(), te = Ae(B);
|
|
2324
|
+
_.current[0] === "reference" && te === b && (de(B), B.shiftKey ? Ke(Q[Q.length - 1]) : Ke(Q[1])), _.current[1] === "floating" && te === O && B.shiftKey && (de(B), Ke(Q[0]));
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
const z = le(O);
|
|
2328
|
+
return z.addEventListener("keydown", K), () => {
|
|
2329
|
+
z.removeEventListener("keydown", K);
|
|
2330
|
+
};
|
|
2331
|
+
}, [r, b, O, u, _, N, J, j]), f.useEffect(() => {
|
|
2332
|
+
if (r || !w) return;
|
|
2333
|
+
function K(z) {
|
|
2334
|
+
const B = Ae(z), te = J().indexOf(B);
|
|
2335
|
+
te !== -1 && (D.current = te);
|
|
2336
|
+
}
|
|
2337
|
+
return w.addEventListener("focusin", K), () => {
|
|
2338
|
+
w.removeEventListener("focusin", K);
|
|
2339
|
+
};
|
|
2340
|
+
}, [r, w, J]), f.useEffect(() => {
|
|
2341
|
+
if (r || !m) return;
|
|
2342
|
+
function K() {
|
|
2343
|
+
C.current = !0, setTimeout(() => {
|
|
2344
|
+
C.current = !1;
|
|
2345
|
+
});
|
|
2346
|
+
}
|
|
2347
|
+
function z(te) {
|
|
2348
|
+
const U = te.relatedTarget, fe = te.currentTarget, se = Ae(te);
|
|
2349
|
+
queueMicrotask(() => {
|
|
2350
|
+
const ae = I(), xe = !(ce(b, U) || ce(w, U) || ce(U, w) || ce(E == null ? void 0 : E.portalNode, U) || U != null && U.hasAttribute(ze("focus-guard")) || R && ($e(R.nodesRef.current, ae).find((M) => {
|
|
2351
|
+
var H, A;
|
|
2352
|
+
return ce((H = M.context) == null ? void 0 : H.elements.floating, U) || ce((A = M.context) == null ? void 0 : A.elements.domReference, U);
|
|
2353
|
+
}) || wn(R.nodesRef.current, ae).find((M) => {
|
|
2354
|
+
var H, A, q;
|
|
2355
|
+
return [(H = M.context) == null ? void 0 : H.elements.floating, Ct((A = M.context) == null ? void 0 : A.elements.floating)].includes(U) || ((q = M.context) == null ? void 0 : q.elements.domReference) === U;
|
|
2356
|
+
})));
|
|
2357
|
+
if (fe === b && O && _n(O, _), a && fe !== b && !(se != null && se.isConnected) && Re(le(O)) === le(O).body) {
|
|
2358
|
+
ne(O) && O.focus();
|
|
2359
|
+
const M = D.current, H = J(), A = H[M] || H[H.length - 1] || O;
|
|
2360
|
+
ne(A) && A.focus();
|
|
2361
|
+
}
|
|
2362
|
+
if (x.current.insideReactTree) {
|
|
2363
|
+
x.current.insideReactTree = !1;
|
|
2364
|
+
return;
|
|
2365
|
+
}
|
|
2366
|
+
(N || !u) && U && xe && !C.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
|
|
2367
|
+
U !== Nn() && (h.current = !0, p(!1, te, "focus-out"));
|
|
2368
|
+
});
|
|
2369
|
+
}
|
|
2370
|
+
const B = !!(!R && E);
|
|
2371
|
+
function Q() {
|
|
2372
|
+
ge(ee), x.current.insideReactTree = !0, ee.current = window.setTimeout(() => {
|
|
2373
|
+
x.current.insideReactTree = !1;
|
|
2374
|
+
});
|
|
2375
|
+
}
|
|
2376
|
+
if (w && ne(b))
|
|
2377
|
+
return b.addEventListener("focusout", z), b.addEventListener("pointerdown", K), w.addEventListener("focusout", z), B && w.addEventListener("focusout", Q, !0), () => {
|
|
2378
|
+
b.removeEventListener("focusout", z), b.removeEventListener("pointerdown", K), w.removeEventListener("focusout", z), B && w.removeEventListener("focusout", Q, !0);
|
|
2379
|
+
};
|
|
2380
|
+
}, [r, b, w, O, u, R, E, p, m, a, J, N, I, _, x]);
|
|
2381
|
+
const oe = f.useRef(null), ve = f.useRef(null), tt = Fn([oe, E == null ? void 0 : E.beforeInsideRef]), Ue = Fn([ve, E == null ? void 0 : E.afterInsideRef]);
|
|
2382
|
+
f.useEffect(() => {
|
|
2383
|
+
var K, z;
|
|
2384
|
+
if (r || !w) return;
|
|
2385
|
+
const B = Array.from((E == null || (K = E.portalNode) == null ? void 0 : K.querySelectorAll("[" + ze("portal") + "]")) || []), te = (z = (R ? wn(R.nodesRef.current, I()) : []).find((se) => {
|
|
2386
|
+
var ae;
|
|
2387
|
+
return Zt(((ae = se.context) == null ? void 0 : ae.elements.domReference) || null);
|
|
2388
|
+
})) == null || (z = z.context) == null ? void 0 : z.elements.domReference, U = [w, te, ...B, ...S(), $.current, T.current, oe.current, ve.current, E == null ? void 0 : E.beforeOutsideRef.current, E == null ? void 0 : E.afterOutsideRef.current, _.current.includes("reference") || N ? b : null].filter((se) => se != null), fe = u || N ? kn(U, !k, k) : kn(U);
|
|
2389
|
+
return () => {
|
|
2390
|
+
fe();
|
|
2391
|
+
};
|
|
2392
|
+
}, [r, b, w, u, _, E, N, W, k, R, I, S]), Y(() => {
|
|
2393
|
+
if (r || !ne(O)) return;
|
|
2394
|
+
const K = le(O), z = Re(K);
|
|
2395
|
+
queueMicrotask(() => {
|
|
2396
|
+
const B = j(O), Q = G.current, te = (typeof Q == "number" ? B[Q] : Q.current) || O, U = ce(O, z);
|
|
2397
|
+
!L && !U && v && Ke(te, {
|
|
2398
|
+
preventScroll: te === O
|
|
2399
|
+
});
|
|
2400
|
+
});
|
|
2401
|
+
}, [r, v, O, L, j, G]), Y(() => {
|
|
2402
|
+
if (r || !O) return;
|
|
2403
|
+
const K = le(O), z = Re(K);
|
|
2404
|
+
li(z);
|
|
2405
|
+
function B(U) {
|
|
2406
|
+
let {
|
|
2407
|
+
reason: fe,
|
|
2408
|
+
event: se,
|
|
2409
|
+
nested: ae
|
|
2410
|
+
} = U;
|
|
2411
|
+
if (["hover", "safe-polygon"].includes(fe) && se.type === "mouseleave" && (h.current = !0), fe === "outside-press")
|
|
2412
|
+
if (ae)
|
|
2413
|
+
h.current = !1;
|
|
2414
|
+
else if (nr(se) || rr(se))
|
|
2415
|
+
h.current = !1;
|
|
2416
|
+
else {
|
|
2417
|
+
let xe = !1;
|
|
2418
|
+
document.createElement("div").focus({
|
|
2419
|
+
get preventScroll() {
|
|
2420
|
+
return xe = !0, !1;
|
|
2421
|
+
}
|
|
2422
|
+
}), xe ? h.current = !1 : h.current = !0;
|
|
2423
|
+
}
|
|
2424
|
+
}
|
|
2425
|
+
y.on("openchange", B);
|
|
2426
|
+
const Q = K.createElement("span");
|
|
2427
|
+
Q.setAttribute("tabindex", "-1"), Q.setAttribute("aria-hidden", "true"), Object.assign(Q.style, Ft), F && b && b.insertAdjacentElement("afterend", Q);
|
|
2428
|
+
function te() {
|
|
2429
|
+
if (typeof V.current == "boolean") {
|
|
2430
|
+
const U = b || Nn();
|
|
2431
|
+
return U && U.isConnected ? U : Q;
|
|
2432
|
+
}
|
|
2433
|
+
return V.current.current || Q;
|
|
2434
|
+
}
|
|
2435
|
+
return () => {
|
|
2436
|
+
y.off("openchange", B);
|
|
2437
|
+
const U = Re(K), fe = ce(w, U) || R && $e(R.nodesRef.current, I(), !1).some((ae) => {
|
|
2438
|
+
var xe;
|
|
2439
|
+
return ce((xe = ae.context) == null ? void 0 : xe.elements.floating, U);
|
|
2440
|
+
}), se = te();
|
|
2441
|
+
queueMicrotask(() => {
|
|
2442
|
+
const ae = ai(se);
|
|
2443
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2444
|
+
V.current && !h.current && ne(ae) && // If the focus moved somewhere else after mount, avoid returning focus
|
|
2445
|
+
// since it likely entered a different element which should be
|
|
2446
|
+
// respected: https://github.com/floating-ui/floating-ui/issues/2607
|
|
2447
|
+
(!(ae !== U && U !== K.body) || fe) && ae.focus({
|
|
2448
|
+
preventScroll: !0
|
|
2449
|
+
}), Q.remove();
|
|
2450
|
+
});
|
|
2451
|
+
};
|
|
2452
|
+
}, [r, w, O, V, x, y, R, F, b, I]), f.useEffect(() => (queueMicrotask(() => {
|
|
2453
|
+
h.current = !1;
|
|
2454
|
+
}), () => {
|
|
2455
|
+
queueMicrotask(ln);
|
|
2456
|
+
}), [r]), Y(() => {
|
|
2457
|
+
if (!r && E)
|
|
2458
|
+
return E.setFocusManagerState({
|
|
2459
|
+
modal: u,
|
|
2460
|
+
closeOnFocusOut: m,
|
|
2461
|
+
open: v,
|
|
2462
|
+
onOpenChange: p,
|
|
2463
|
+
domReference: b
|
|
2464
|
+
}), () => {
|
|
2465
|
+
E.setFocusManagerState(null);
|
|
2466
|
+
};
|
|
2467
|
+
}, [r, E, u, v, p, m, b]), Y(() => {
|
|
2468
|
+
r || O && _n(O, _);
|
|
2469
|
+
}, [r, O, _]);
|
|
2470
|
+
function Oe(K) {
|
|
2471
|
+
return r || !l || !u ? null : /* @__PURE__ */ me(fi, {
|
|
2472
|
+
ref: K === "start" ? $ : T,
|
|
2473
|
+
onClick: (z) => p(!1, z.nativeEvent),
|
|
2474
|
+
children: typeof l == "string" ? l : "Dismiss"
|
|
2475
|
+
});
|
|
2476
|
+
}
|
|
2477
|
+
const Ge = !r && W && (u ? !N : !0) && (F || u);
|
|
2478
|
+
return /* @__PURE__ */ jn(Pr, {
|
|
2479
|
+
children: [Ge && /* @__PURE__ */ me(Ot, {
|
|
2480
|
+
"data-type": "inside",
|
|
2481
|
+
ref: tt,
|
|
2482
|
+
onFocus: (K) => {
|
|
2483
|
+
if (u) {
|
|
2484
|
+
const B = j();
|
|
2485
|
+
Ke(o[0] === "reference" ? B[0] : B[B.length - 1]);
|
|
2486
|
+
} else if (E != null && E.preserveTabOrder && E.portalNode)
|
|
2487
|
+
if (h.current = !1, ot(K, E.portalNode)) {
|
|
2488
|
+
const B = lr(b);
|
|
2489
|
+
B == null || B.focus();
|
|
2490
|
+
} else {
|
|
2491
|
+
var z;
|
|
2492
|
+
(z = E.beforeOutsideRef.current) == null || z.focus();
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
}), !N && Oe("start"), n, Oe("end"), Ge && /* @__PURE__ */ me(Ot, {
|
|
2496
|
+
"data-type": "inside",
|
|
2497
|
+
ref: Ue,
|
|
2498
|
+
onFocus: (K) => {
|
|
2499
|
+
if (u)
|
|
2500
|
+
Ke(j()[0]);
|
|
2501
|
+
else if (E != null && E.preserveTabOrder && E.portalNode)
|
|
2502
|
+
if (m && (h.current = !0), ot(K, E.portalNode)) {
|
|
2503
|
+
const B = ar(b);
|
|
2504
|
+
B == null || B.focus();
|
|
2505
|
+
} else {
|
|
2506
|
+
var z;
|
|
2507
|
+
(z = E.afterOutsideRef.current) == null || z.focus();
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
})]
|
|
2511
|
+
});
|
|
2512
|
+
}
|
|
2513
|
+
let vt = 0;
|
|
2514
|
+
const Vn = "--floating-ui-scrollbar-width";
|
|
2515
|
+
function di() {
|
|
2516
|
+
const e = on(), t = /iP(hone|ad|od)|iOS/.test(e) || // iPads can claim to be MacIntel
|
|
2517
|
+
e === "MacIntel" && navigator.maxTouchPoints > 1, n = document.body.style, o = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft ? "paddingLeft" : "paddingRight", s = window.innerWidth - document.documentElement.clientWidth, i = n.left ? parseFloat(n.left) : window.scrollX, c = n.top ? parseFloat(n.top) : window.scrollY;
|
|
2518
|
+
if (n.overflow = "hidden", n.setProperty(Vn, s + "px"), s && (n[o] = s + "px"), t) {
|
|
2519
|
+
var a, u;
|
|
2520
|
+
const l = ((a = window.visualViewport) == null ? void 0 : a.offsetLeft) || 0, m = ((u = window.visualViewport) == null ? void 0 : u.offsetTop) || 0;
|
|
2521
|
+
Object.assign(n, {
|
|
2522
|
+
position: "fixed",
|
|
2523
|
+
top: -(c - Math.floor(m)) + "px",
|
|
2524
|
+
left: -(i - Math.floor(l)) + "px",
|
|
2525
|
+
right: "0"
|
|
2526
|
+
});
|
|
2527
|
+
}
|
|
2528
|
+
return () => {
|
|
2529
|
+
Object.assign(n, {
|
|
2530
|
+
overflow: "",
|
|
2531
|
+
[o]: ""
|
|
2532
|
+
}), n.removeProperty(Vn), t && (Object.assign(n, {
|
|
2533
|
+
position: "",
|
|
2534
|
+
top: "",
|
|
2535
|
+
left: "",
|
|
2536
|
+
right: ""
|
|
2537
|
+
}), window.scrollTo(i, c));
|
|
2538
|
+
};
|
|
2539
|
+
}
|
|
2540
|
+
let Wn = () => {
|
|
2541
|
+
};
|
|
2542
|
+
const _i = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
2543
|
+
const {
|
|
2544
|
+
lockScroll: r = !1,
|
|
2545
|
+
...o
|
|
2546
|
+
} = t;
|
|
2547
|
+
return Y(() => {
|
|
2548
|
+
if (r)
|
|
2549
|
+
return vt++, vt === 1 && (Wn = di()), () => {
|
|
2550
|
+
vt--, vt === 0 && Wn();
|
|
2551
|
+
};
|
|
2552
|
+
}, [r]), /* @__PURE__ */ me("div", {
|
|
2553
|
+
ref: n,
|
|
2554
|
+
...o,
|
|
2555
|
+
style: {
|
|
2556
|
+
position: "fixed",
|
|
2557
|
+
overflow: "auto",
|
|
2558
|
+
top: 0,
|
|
2559
|
+
right: 0,
|
|
2560
|
+
bottom: 0,
|
|
2561
|
+
left: 0,
|
|
2562
|
+
...o.style
|
|
2563
|
+
}
|
|
2564
|
+
});
|
|
2565
|
+
});
|
|
2566
|
+
function Kn(e) {
|
|
2567
|
+
return ne(e.target) && e.target.tagName === "BUTTON";
|
|
2568
|
+
}
|
|
2569
|
+
function mi(e) {
|
|
2570
|
+
return ne(e.target) && e.target.tagName === "A";
|
|
2571
|
+
}
|
|
2572
|
+
function $n(e) {
|
|
2573
|
+
return sn(e);
|
|
2574
|
+
}
|
|
2575
|
+
function Vi(e, t) {
|
|
2576
|
+
t === void 0 && (t = {});
|
|
2577
|
+
const {
|
|
2578
|
+
open: n,
|
|
2579
|
+
onOpenChange: r,
|
|
2580
|
+
dataRef: o,
|
|
2581
|
+
elements: {
|
|
2582
|
+
domReference: s
|
|
2583
|
+
}
|
|
2584
|
+
} = e, {
|
|
2585
|
+
enabled: i = !0,
|
|
2586
|
+
event: c = "click",
|
|
2587
|
+
toggle: a = !0,
|
|
2588
|
+
ignoreMouse: u = !1,
|
|
2589
|
+
keyboardHandlers: l = !0,
|
|
2590
|
+
stickIfOpen: m = !0
|
|
2591
|
+
} = t, g = f.useRef(), d = f.useRef(!1), v = f.useMemo(() => ({
|
|
2592
|
+
onPointerDown(p) {
|
|
2593
|
+
g.current = p.pointerType;
|
|
2594
|
+
},
|
|
2595
|
+
onMouseDown(p) {
|
|
2596
|
+
const y = g.current;
|
|
2597
|
+
p.button === 0 && c !== "click" && (it(y, !0) && u || (n && a && (!(o.current.openEvent && m) || o.current.openEvent.type === "mousedown") ? r(!1, p.nativeEvent, "click") : (p.preventDefault(), r(!0, p.nativeEvent, "click"))));
|
|
2598
|
+
},
|
|
2599
|
+
onClick(p) {
|
|
2600
|
+
const y = g.current;
|
|
2601
|
+
if (c === "mousedown" && g.current) {
|
|
2602
|
+
g.current = void 0;
|
|
2603
|
+
return;
|
|
2604
|
+
}
|
|
2605
|
+
it(y, !0) && u || (n && a && (!(o.current.openEvent && m) || o.current.openEvent.type === "click") ? r(!1, p.nativeEvent, "click") : r(!0, p.nativeEvent, "click"));
|
|
2606
|
+
},
|
|
2607
|
+
onKeyDown(p) {
|
|
2608
|
+
g.current = void 0, !(p.defaultPrevented || !l || Kn(p)) && (p.key === " " && !$n(s) && (p.preventDefault(), d.current = !0), !mi(p) && p.key === "Enter" && r(!(n && a), p.nativeEvent, "click"));
|
|
2609
|
+
},
|
|
2610
|
+
onKeyUp(p) {
|
|
2611
|
+
p.defaultPrevented || !l || Kn(p) || $n(s) || p.key === " " && d.current && (d.current = !1, r(!(n && a), p.nativeEvent, "click"));
|
|
2612
|
+
}
|
|
2613
|
+
}), [o, s, c, u, l, r, n, m, a]);
|
|
2614
|
+
return f.useMemo(() => i ? {
|
|
2615
|
+
reference: v
|
|
2616
|
+
} : {}, [i, v]);
|
|
2617
|
+
}
|
|
2618
|
+
const pi = {
|
|
2619
|
+
pointerdown: "onPointerDown",
|
|
2620
|
+
mousedown: "onMouseDown",
|
|
2621
|
+
click: "onClick"
|
|
2622
|
+
}, gi = {
|
|
2623
|
+
pointerdown: "onPointerDownCapture",
|
|
2624
|
+
mousedown: "onMouseDownCapture",
|
|
2625
|
+
click: "onClickCapture"
|
|
2626
|
+
}, Bn = (e) => {
|
|
2627
|
+
var t, n;
|
|
2628
|
+
return {
|
|
2629
|
+
escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
|
|
2630
|
+
outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
|
|
2631
|
+
};
|
|
2632
|
+
};
|
|
2633
|
+
function Wi(e, t) {
|
|
2634
|
+
t === void 0 && (t = {});
|
|
2635
|
+
const {
|
|
2636
|
+
open: n,
|
|
2637
|
+
onOpenChange: r,
|
|
2638
|
+
elements: o,
|
|
2639
|
+
dataRef: s
|
|
2640
|
+
} = e, {
|
|
2641
|
+
enabled: i = !0,
|
|
2642
|
+
escapeKey: c = !0,
|
|
2643
|
+
outsidePress: a = !0,
|
|
2644
|
+
outsidePressEvent: u = "pointerdown",
|
|
2645
|
+
referencePress: l = !1,
|
|
2646
|
+
referencePressEvent: m = "pointerdown",
|
|
2647
|
+
ancestorScroll: g = !1,
|
|
2648
|
+
bubbles: d,
|
|
2649
|
+
capture: v
|
|
2650
|
+
} = t, p = et(), y = ie(typeof a == "function" ? a : () => !1), x = typeof a == "function" ? y : a, b = f.useRef(!1), {
|
|
2651
|
+
escapeKey: w,
|
|
2652
|
+
outsidePress: I
|
|
2653
|
+
} = Bn(d), {
|
|
2654
|
+
escapeKey: S,
|
|
2655
|
+
outsidePress: L
|
|
2656
|
+
} = Bn(v), N = f.useRef(!1), P = ie((R) => {
|
|
2657
|
+
var E;
|
|
2658
|
+
if (!n || !i || !c || R.key !== "Escape" || N.current)
|
|
2659
|
+
return;
|
|
2660
|
+
const $ = (E = s.current.floatingContext) == null ? void 0 : E.nodeId, T = p ? $e(p.nodesRef.current, $) : [];
|
|
2661
|
+
if (!w && (R.stopPropagation(), T.length > 0)) {
|
|
2662
|
+
let h = !0;
|
|
2663
|
+
if (T.forEach((C) => {
|
|
2664
|
+
var D;
|
|
2665
|
+
if ((D = C.context) != null && D.open && !C.context.dataRef.current.__escapeKeyBubbles) {
|
|
2666
|
+
h = !1;
|
|
2667
|
+
return;
|
|
2668
|
+
}
|
|
2669
|
+
}), !h)
|
|
2670
|
+
return;
|
|
2671
|
+
}
|
|
2672
|
+
r(!1, io(R) ? R.nativeEvent : R, "escape-key");
|
|
2673
|
+
}), W = ie((R) => {
|
|
2674
|
+
var E;
|
|
2675
|
+
const $ = () => {
|
|
2676
|
+
var T;
|
|
2677
|
+
P(R), (T = Ae(R)) == null || T.removeEventListener("keydown", $);
|
|
2678
|
+
};
|
|
2679
|
+
(E = Ae(R)) == null || E.addEventListener("keydown", $);
|
|
2680
|
+
}), k = ie((R) => {
|
|
2681
|
+
var E;
|
|
2682
|
+
const $ = s.current.insideReactTree;
|
|
2683
|
+
s.current.insideReactTree = !1;
|
|
2684
|
+
const T = b.current;
|
|
2685
|
+
if (b.current = !1, u === "click" && T || $ || typeof x == "function" && !x(R))
|
|
2686
|
+
return;
|
|
2687
|
+
const h = Ae(R), C = "[" + ze("inert") + "]", D = le(o.floating).querySelectorAll(C);
|
|
2688
|
+
let ee = X(h) ? h : null;
|
|
2689
|
+
for (; ee && !Se(ee); ) {
|
|
2690
|
+
const j = Pe(ee);
|
|
2691
|
+
if (Se(j) || !X(j))
|
|
2692
|
+
break;
|
|
2693
|
+
ee = j;
|
|
2694
|
+
}
|
|
2695
|
+
if (D.length && X(h) && !no(h) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
2696
|
+
!ce(h, o.floating) && // If the target root element contains none of the markers, then the
|
|
2697
|
+
// element was injected after the floating element rendered.
|
|
2698
|
+
Array.from(D).every((j) => !ce(ee, j)))
|
|
2699
|
+
return;
|
|
2700
|
+
if (ne(h) && V) {
|
|
2701
|
+
const j = Se(h), oe = we(h), ve = /auto|scroll/, tt = j || ve.test(oe.overflowX), Ue = j || ve.test(oe.overflowY), Oe = tt && h.clientWidth > 0 && h.scrollWidth > h.clientWidth, Ge = Ue && h.clientHeight > 0 && h.scrollHeight > h.clientHeight, K = oe.direction === "rtl", z = Ge && (K ? R.offsetX <= h.offsetWidth - h.clientWidth : R.offsetX > h.clientWidth), B = Oe && R.offsetY > h.clientHeight;
|
|
2702
|
+
if (z || B)
|
|
2703
|
+
return;
|
|
2704
|
+
}
|
|
2705
|
+
const F = (E = s.current.floatingContext) == null ? void 0 : E.nodeId, O = p && $e(p.nodesRef.current, F).some((j) => {
|
|
2706
|
+
var oe;
|
|
2707
|
+
return Wt(R, (oe = j.context) == null ? void 0 : oe.elements.floating);
|
|
2708
|
+
});
|
|
2709
|
+
if (Wt(R, o.floating) || Wt(R, o.domReference) || O)
|
|
2710
|
+
return;
|
|
2711
|
+
const J = p ? $e(p.nodesRef.current, F) : [];
|
|
2712
|
+
if (J.length > 0) {
|
|
2713
|
+
let j = !0;
|
|
2714
|
+
if (J.forEach((oe) => {
|
|
2715
|
+
var ve;
|
|
2716
|
+
if ((ve = oe.context) != null && ve.open && !oe.context.dataRef.current.__outsidePressBubbles) {
|
|
2717
|
+
j = !1;
|
|
2718
|
+
return;
|
|
2719
|
+
}
|
|
2720
|
+
}), !j)
|
|
2721
|
+
return;
|
|
2722
|
+
}
|
|
2723
|
+
r(!1, R, "outside-press");
|
|
2724
|
+
}), _ = ie((R) => {
|
|
2725
|
+
var E;
|
|
2726
|
+
const $ = () => {
|
|
2727
|
+
var T;
|
|
2728
|
+
k(R), (T = Ae(R)) == null || T.removeEventListener(u, $);
|
|
2729
|
+
};
|
|
2730
|
+
(E = Ae(R)) == null || E.addEventListener(u, $);
|
|
2731
|
+
});
|
|
2732
|
+
f.useEffect(() => {
|
|
2733
|
+
if (!n || !i)
|
|
2734
|
+
return;
|
|
2735
|
+
s.current.__escapeKeyBubbles = w, s.current.__outsidePressBubbles = I;
|
|
2736
|
+
let R = -1;
|
|
2737
|
+
function E(D) {
|
|
2738
|
+
r(!1, D, "ancestor-scroll");
|
|
2739
|
+
}
|
|
2740
|
+
function $() {
|
|
2741
|
+
window.clearTimeout(R), N.current = !0;
|
|
2742
|
+
}
|
|
2743
|
+
function T() {
|
|
2744
|
+
R = window.setTimeout(
|
|
2745
|
+
() => {
|
|
2746
|
+
N.current = !1;
|
|
2747
|
+
},
|
|
2748
|
+
// 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
|
|
2749
|
+
// Only apply to WebKit for the test to remain 0ms.
|
|
2750
|
+
Pt() ? 5 : 0
|
|
2751
|
+
);
|
|
2752
|
+
}
|
|
2753
|
+
const h = le(o.floating);
|
|
2754
|
+
c && (h.addEventListener("keydown", S ? W : P, S), h.addEventListener("compositionstart", $), h.addEventListener("compositionend", T)), x && h.addEventListener(u, L ? _ : k, L);
|
|
2755
|
+
let C = [];
|
|
2756
|
+
return g && (X(o.domReference) && (C = Le(o.domReference)), X(o.floating) && (C = C.concat(Le(o.floating))), !X(o.reference) && o.reference && o.reference.contextElement && (C = C.concat(Le(o.reference.contextElement)))), C = C.filter((D) => {
|
|
2757
|
+
var ee;
|
|
2758
|
+
return D !== ((ee = h.defaultView) == null ? void 0 : ee.visualViewport);
|
|
2759
|
+
}), C.forEach((D) => {
|
|
2760
|
+
D.addEventListener("scroll", E, {
|
|
2761
|
+
passive: !0
|
|
2762
|
+
});
|
|
2763
|
+
}), () => {
|
|
2764
|
+
c && (h.removeEventListener("keydown", S ? W : P, S), h.removeEventListener("compositionstart", $), h.removeEventListener("compositionend", T)), x && h.removeEventListener(u, L ? _ : k, L), C.forEach((D) => {
|
|
2765
|
+
D.removeEventListener("scroll", E);
|
|
2766
|
+
}), window.clearTimeout(R);
|
|
2767
|
+
};
|
|
2768
|
+
}, [s, o, c, x, u, n, r, g, i, w, I, P, S, W, k, L, _]), f.useEffect(() => {
|
|
2769
|
+
s.current.insideReactTree = !1;
|
|
2770
|
+
}, [s, x, u]);
|
|
2771
|
+
const G = f.useMemo(() => ({
|
|
2772
|
+
onKeyDown: P,
|
|
2773
|
+
...l && {
|
|
2774
|
+
[pi[m]]: (R) => {
|
|
2775
|
+
r(!1, R.nativeEvent, "reference-press");
|
|
2776
|
+
},
|
|
2777
|
+
...m !== "click" && {
|
|
2778
|
+
onClick(R) {
|
|
2779
|
+
r(!1, R.nativeEvent, "reference-press");
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
}), [P, r, l, m]), V = f.useMemo(() => ({
|
|
2784
|
+
onKeyDown: P,
|
|
2785
|
+
onMouseDown() {
|
|
2786
|
+
b.current = !0;
|
|
2787
|
+
},
|
|
2788
|
+
onMouseUp() {
|
|
2789
|
+
b.current = !0;
|
|
2790
|
+
},
|
|
2791
|
+
[gi[u]]: () => {
|
|
2792
|
+
s.current.insideReactTree = !0;
|
|
2793
|
+
}
|
|
2794
|
+
}), [P, u, s]);
|
|
2795
|
+
return f.useMemo(() => i ? {
|
|
2796
|
+
reference: G,
|
|
2797
|
+
floating: V
|
|
2798
|
+
} : {}, [i, G, V]);
|
|
2799
|
+
}
|
|
2800
|
+
function hi(e) {
|
|
2801
|
+
const {
|
|
2802
|
+
open: t = !1,
|
|
2803
|
+
onOpenChange: n,
|
|
2804
|
+
elements: r
|
|
2805
|
+
} = e, o = Lt(), s = f.useRef({}), [i] = f.useState(() => Er()), c = Ze() != null;
|
|
2806
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2807
|
+
const d = r.reference;
|
|
2808
|
+
d && !X(d) && ni("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
2809
|
+
}
|
|
2810
|
+
const [a, u] = f.useState(r.reference), l = ie((d, v, p) => {
|
|
2811
|
+
s.current.openEvent = d ? v : void 0, i.emit("openchange", {
|
|
2812
|
+
open: d,
|
|
2813
|
+
event: v,
|
|
2814
|
+
reason: p,
|
|
2815
|
+
nested: c
|
|
2816
|
+
}), n == null || n(d, v, p);
|
|
2817
|
+
}), m = f.useMemo(() => ({
|
|
2818
|
+
setPositionReference: u
|
|
2819
|
+
}), []), g = f.useMemo(() => ({
|
|
2820
|
+
reference: a || r.reference || null,
|
|
2821
|
+
floating: r.floating || null,
|
|
2822
|
+
domReference: r.reference
|
|
2823
|
+
}), [a, r.reference, r.floating]);
|
|
2824
|
+
return f.useMemo(() => ({
|
|
2825
|
+
dataRef: s,
|
|
2826
|
+
open: t,
|
|
2827
|
+
onOpenChange: l,
|
|
2828
|
+
elements: g,
|
|
2829
|
+
events: i,
|
|
2830
|
+
floatingId: o,
|
|
2831
|
+
refs: m
|
|
2832
|
+
}), [t, l, g, i, o, m]);
|
|
2833
|
+
}
|
|
2834
|
+
function Ki(e) {
|
|
2835
|
+
e === void 0 && (e = {});
|
|
2836
|
+
const {
|
|
2837
|
+
nodeId: t
|
|
2838
|
+
} = e, n = hi({
|
|
2839
|
+
...e,
|
|
2840
|
+
elements: {
|
|
2841
|
+
reference: null,
|
|
2842
|
+
floating: null,
|
|
2843
|
+
...e.elements
|
|
2844
|
+
}
|
|
2845
|
+
}), r = e.rootContext || n, o = r.elements, [s, i] = f.useState(null), [c, a] = f.useState(null), l = (o == null ? void 0 : o.domReference) || s, m = f.useRef(null), g = et();
|
|
2846
|
+
Y(() => {
|
|
2847
|
+
l && (m.current = l);
|
|
2848
|
+
}, [l]);
|
|
2849
|
+
const d = Go({
|
|
2850
|
+
...e,
|
|
2851
|
+
elements: {
|
|
2852
|
+
...o,
|
|
2853
|
+
...c && {
|
|
2854
|
+
reference: c
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2857
|
+
}), v = f.useCallback((w) => {
|
|
2858
|
+
const I = X(w) ? {
|
|
2859
|
+
getBoundingClientRect: () => w.getBoundingClientRect(),
|
|
2860
|
+
getClientRects: () => w.getClientRects(),
|
|
2861
|
+
contextElement: w
|
|
2862
|
+
} : w;
|
|
2863
|
+
a(I), d.refs.setReference(I);
|
|
2864
|
+
}, [d.refs]), p = f.useCallback((w) => {
|
|
2865
|
+
(X(w) || w === null) && (m.current = w, i(w)), (X(d.refs.reference.current) || d.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
2866
|
+
// `null` to support `positionReference` + an unstable `reference`
|
|
2867
|
+
// callback ref.
|
|
2868
|
+
w !== null && !X(w)) && d.refs.setReference(w);
|
|
2869
|
+
}, [d.refs]), y = f.useMemo(() => ({
|
|
2870
|
+
...d.refs,
|
|
2871
|
+
setReference: p,
|
|
2872
|
+
setPositionReference: v,
|
|
2873
|
+
domReference: m
|
|
2874
|
+
}), [d.refs, p, v]), x = f.useMemo(() => ({
|
|
2875
|
+
...d.elements,
|
|
2876
|
+
domReference: l
|
|
2877
|
+
}), [d.elements, l]), b = f.useMemo(() => ({
|
|
2878
|
+
...d,
|
|
2879
|
+
...r,
|
|
2880
|
+
refs: y,
|
|
2881
|
+
elements: x,
|
|
2882
|
+
nodeId: t
|
|
2883
|
+
}), [d, y, x, t, r]);
|
|
2884
|
+
return Y(() => {
|
|
2885
|
+
r.dataRef.current.floatingContext = b;
|
|
2886
|
+
const w = g == null ? void 0 : g.nodesRef.current.find((I) => I.id === t);
|
|
2887
|
+
w && (w.context = b);
|
|
2888
|
+
}), f.useMemo(() => ({
|
|
2889
|
+
...d,
|
|
2890
|
+
context: b,
|
|
2891
|
+
refs: y,
|
|
2892
|
+
elements: x
|
|
2893
|
+
}), [d, y, x, b]);
|
|
2894
|
+
}
|
|
2895
|
+
function jt() {
|
|
2896
|
+
return Qr() && er();
|
|
2897
|
+
}
|
|
2898
|
+
function $i(e, t) {
|
|
2899
|
+
t === void 0 && (t = {});
|
|
2900
|
+
const {
|
|
2901
|
+
open: n,
|
|
2902
|
+
onOpenChange: r,
|
|
2903
|
+
events: o,
|
|
2904
|
+
dataRef: s,
|
|
2905
|
+
elements: i
|
|
2906
|
+
} = e, {
|
|
2907
|
+
enabled: c = !0,
|
|
2908
|
+
visibleOnly: a = !0
|
|
2909
|
+
} = t, u = f.useRef(!1), l = f.useRef(-1), m = f.useRef(!0);
|
|
2910
|
+
f.useEffect(() => {
|
|
2911
|
+
if (!c) return;
|
|
2912
|
+
const d = pe(i.domReference);
|
|
2913
|
+
function v() {
|
|
2914
|
+
!n && ne(i.domReference) && i.domReference === Re(le(i.domReference)) && (u.current = !0);
|
|
2915
|
+
}
|
|
2916
|
+
function p() {
|
|
2917
|
+
m.current = !0;
|
|
2918
|
+
}
|
|
2919
|
+
function y() {
|
|
2920
|
+
m.current = !1;
|
|
2921
|
+
}
|
|
2922
|
+
return d.addEventListener("blur", v), jt() && (d.addEventListener("keydown", p, !0), d.addEventListener("pointerdown", y, !0)), () => {
|
|
2923
|
+
d.removeEventListener("blur", v), jt() && (d.removeEventListener("keydown", p, !0), d.removeEventListener("pointerdown", y, !0));
|
|
2924
|
+
};
|
|
2925
|
+
}, [i.domReference, n, c]), f.useEffect(() => {
|
|
2926
|
+
if (!c) return;
|
|
2927
|
+
function d(v) {
|
|
2928
|
+
let {
|
|
2929
|
+
reason: p
|
|
2930
|
+
} = v;
|
|
2931
|
+
(p === "reference-press" || p === "escape-key") && (u.current = !0);
|
|
2932
|
+
}
|
|
2933
|
+
return o.on("openchange", d), () => {
|
|
2934
|
+
o.off("openchange", d);
|
|
2935
|
+
};
|
|
2936
|
+
}, [o, c]), f.useEffect(() => () => {
|
|
2937
|
+
ge(l);
|
|
2938
|
+
}, []);
|
|
2939
|
+
const g = f.useMemo(() => ({
|
|
2940
|
+
onMouseLeave() {
|
|
2941
|
+
u.current = !1;
|
|
2942
|
+
},
|
|
2943
|
+
onFocus(d) {
|
|
2944
|
+
if (u.current) return;
|
|
2945
|
+
const v = Ae(d.nativeEvent);
|
|
2946
|
+
if (a && X(v)) {
|
|
2947
|
+
if (jt() && !d.relatedTarget) {
|
|
2948
|
+
if (!m.current && !sn(v))
|
|
2949
|
+
return;
|
|
2950
|
+
} else if (!ro(v))
|
|
2951
|
+
return;
|
|
2952
|
+
}
|
|
2953
|
+
r(!0, d.nativeEvent, "focus");
|
|
2954
|
+
},
|
|
2955
|
+
onBlur(d) {
|
|
2956
|
+
u.current = !1;
|
|
2957
|
+
const v = d.relatedTarget, p = d.nativeEvent, y = X(v) && v.hasAttribute(ze("focus-guard")) && v.getAttribute("data-type") === "outside";
|
|
2958
|
+
l.current = window.setTimeout(() => {
|
|
2959
|
+
var x;
|
|
2960
|
+
const b = Re(i.domReference ? i.domReference.ownerDocument : document);
|
|
2961
|
+
!v && b === i.domReference || ce((x = s.current.floatingContext) == null ? void 0 : x.refs.floating.current, b) || ce(i.domReference, b) || y || r(!1, p, "focus");
|
|
2962
|
+
});
|
|
2963
|
+
}
|
|
2964
|
+
}), [s, i.domReference, r, a]);
|
|
2965
|
+
return f.useMemo(() => c ? {
|
|
2966
|
+
reference: g
|
|
2967
|
+
} : {}, [c, g]);
|
|
2968
|
+
}
|
|
2969
|
+
function qt(e, t, n) {
|
|
2970
|
+
const r = /* @__PURE__ */ new Map(), o = n === "item";
|
|
2971
|
+
let s = e;
|
|
2972
|
+
if (o && e) {
|
|
2973
|
+
const {
|
|
2974
|
+
[Tn]: i,
|
|
2975
|
+
[On]: c,
|
|
2976
|
+
...a
|
|
2977
|
+
} = e;
|
|
2978
|
+
s = a;
|
|
2979
|
+
}
|
|
2980
|
+
return {
|
|
2981
|
+
...n === "floating" && {
|
|
2982
|
+
tabIndex: -1,
|
|
2983
|
+
[Jo]: ""
|
|
2984
|
+
},
|
|
2985
|
+
...s,
|
|
2986
|
+
...t.map((i) => {
|
|
2987
|
+
const c = i ? i[n] : null;
|
|
2988
|
+
return typeof c == "function" ? e ? c(e) : null : c;
|
|
2989
|
+
}).concat(e).reduce((i, c) => (c && Object.entries(c).forEach((a) => {
|
|
2990
|
+
let [u, l] = a;
|
|
2991
|
+
if (!(o && [Tn, On].includes(u)))
|
|
2992
|
+
if (u.indexOf("on") === 0) {
|
|
2993
|
+
if (r.has(u) || r.set(u, []), typeof l == "function") {
|
|
2994
|
+
var m;
|
|
2995
|
+
(m = r.get(u)) == null || m.push(l), i[u] = function() {
|
|
2996
|
+
for (var g, d = arguments.length, v = new Array(d), p = 0; p < d; p++)
|
|
2997
|
+
v[p] = arguments[p];
|
|
2998
|
+
return (g = r.get(u)) == null ? void 0 : g.map((y) => y(...v)).find((y) => y !== void 0);
|
|
2999
|
+
};
|
|
3000
|
+
}
|
|
3001
|
+
} else
|
|
3002
|
+
i[u] = l;
|
|
3003
|
+
}), i), {})
|
|
3004
|
+
};
|
|
3005
|
+
}
|
|
3006
|
+
function Bi(e) {
|
|
3007
|
+
e === void 0 && (e = []);
|
|
3008
|
+
const t = e.map((c) => c == null ? void 0 : c.reference), n = e.map((c) => c == null ? void 0 : c.floating), r = e.map((c) => c == null ? void 0 : c.item), o = f.useCallback(
|
|
3009
|
+
(c) => qt(c, e, "reference"),
|
|
3010
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3011
|
+
t
|
|
3012
|
+
), s = f.useCallback(
|
|
3013
|
+
(c) => qt(c, e, "floating"),
|
|
3014
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3015
|
+
n
|
|
3016
|
+
), i = f.useCallback(
|
|
3017
|
+
(c) => qt(c, e, "item"),
|
|
3018
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3019
|
+
r
|
|
3020
|
+
);
|
|
3021
|
+
return f.useMemo(() => ({
|
|
3022
|
+
getReferenceProps: o,
|
|
3023
|
+
getFloatingProps: s,
|
|
3024
|
+
getItemProps: i
|
|
3025
|
+
}), [o, s, i]);
|
|
3026
|
+
}
|
|
3027
|
+
const vi = "Escape";
|
|
3028
|
+
function Nt(e, t, n) {
|
|
3029
|
+
switch (e) {
|
|
3030
|
+
case "vertical":
|
|
3031
|
+
return t;
|
|
3032
|
+
case "horizontal":
|
|
3033
|
+
return n;
|
|
3034
|
+
default:
|
|
3035
|
+
return t || n;
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
function bt(e, t) {
|
|
3039
|
+
return Nt(t, e === st || e === Fe, e === Ne || e === _e);
|
|
3040
|
+
}
|
|
3041
|
+
function Yt(e, t, n) {
|
|
3042
|
+
return Nt(t, e === Fe, n ? e === Ne : e === _e) || e === "Enter" || e === " " || e === "";
|
|
3043
|
+
}
|
|
3044
|
+
function Hn(e, t, n) {
|
|
3045
|
+
return Nt(t, n ? e === Ne : e === _e, e === Fe);
|
|
3046
|
+
}
|
|
3047
|
+
function zn(e, t, n, r) {
|
|
3048
|
+
const o = n ? e === _e : e === Ne, s = e === st;
|
|
3049
|
+
return t === "both" || t === "horizontal" && r && r > 1 ? e === vi : Nt(t, o, s);
|
|
3050
|
+
}
|
|
3051
|
+
function Hi(e, t) {
|
|
3052
|
+
const {
|
|
3053
|
+
open: n,
|
|
3054
|
+
onOpenChange: r,
|
|
3055
|
+
elements: o,
|
|
3056
|
+
floatingId: s
|
|
3057
|
+
} = e, {
|
|
3058
|
+
listRef: i,
|
|
3059
|
+
activeIndex: c,
|
|
3060
|
+
onNavigate: a = () => {
|
|
3061
|
+
},
|
|
3062
|
+
enabled: u = !0,
|
|
3063
|
+
selectedIndex: l = null,
|
|
3064
|
+
allowEscape: m = !1,
|
|
3065
|
+
loop: g = !1,
|
|
3066
|
+
nested: d = !1,
|
|
3067
|
+
rtl: v = !1,
|
|
3068
|
+
virtual: p = !1,
|
|
3069
|
+
focusItemOnOpen: y = "auto",
|
|
3070
|
+
focusItemOnHover: x = !0,
|
|
3071
|
+
openOnArrowKeyDown: b = !0,
|
|
3072
|
+
disabledIndices: w = void 0,
|
|
3073
|
+
orientation: I = "vertical",
|
|
3074
|
+
parentOrientation: S,
|
|
3075
|
+
cols: L = 1,
|
|
3076
|
+
scrollItemIntoView: N = !0,
|
|
3077
|
+
virtualItemRef: P,
|
|
3078
|
+
itemSizes: W,
|
|
3079
|
+
dense: k = !1
|
|
3080
|
+
} = t;
|
|
3081
|
+
process.env.NODE_ENV !== "production" && (m && (g || Ht("`useListNavigation` looping must be enabled to allow escaping."), p || Ht("`useListNavigation` must be virtual to allow escaping.")), I === "vertical" && L > 1 && Ht("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
|
|
3082
|
+
const _ = Ct(o.floating), G = ye(_), V = Ze(), R = et();
|
|
3083
|
+
Y(() => {
|
|
3084
|
+
e.dataRef.current.orientation = I;
|
|
3085
|
+
}, [e, I]);
|
|
3086
|
+
const E = ie(() => {
|
|
3087
|
+
a(h.current === -1 ? null : h.current);
|
|
3088
|
+
}), $ = Zt(o.domReference), T = f.useRef(y), h = f.useRef(l ?? -1), C = f.useRef(null), D = f.useRef(!0), ee = f.useRef(E), F = f.useRef(!!o.floating), O = f.useRef(n), J = f.useRef(!1), j = f.useRef(!1), oe = ye(w), ve = ye(n), tt = ye(N), Ue = ye(l), [Oe, Ge] = f.useState(), [K, z] = f.useState(), B = ie(() => {
|
|
3089
|
+
function M(Z) {
|
|
3090
|
+
if (p) {
|
|
3091
|
+
var re;
|
|
3092
|
+
(re = Z.id) != null && re.endsWith("-fui-option") && (Z.id = s + "-" + Math.random().toString(16).slice(2, 10)), Ge(Z.id), R == null || R.events.emit("virtualfocus", Z), P && (P.current = Z);
|
|
3093
|
+
} else
|
|
3094
|
+
Ke(Z, {
|
|
3095
|
+
sync: J.current,
|
|
3096
|
+
preventScroll: !0
|
|
3097
|
+
});
|
|
3098
|
+
}
|
|
3099
|
+
const H = i.current[h.current], A = j.current;
|
|
3100
|
+
H && M(H), (J.current ? (Z) => Z() : requestAnimationFrame)(() => {
|
|
3101
|
+
const Z = i.current[h.current] || H;
|
|
3102
|
+
if (!Z) return;
|
|
3103
|
+
H || M(Z);
|
|
3104
|
+
const re = tt.current;
|
|
3105
|
+
re && te && (A || !D.current) && (Z.scrollIntoView == null || Z.scrollIntoView(typeof re == "boolean" ? {
|
|
3106
|
+
block: "nearest",
|
|
3107
|
+
inline: "nearest"
|
|
3108
|
+
} : re));
|
|
3109
|
+
});
|
|
3110
|
+
});
|
|
3111
|
+
Y(() => {
|
|
3112
|
+
u && (n && o.floating ? T.current && l != null && (j.current = !0, h.current = l, E()) : F.current && (h.current = -1, ee.current()));
|
|
3113
|
+
}, [u, n, o.floating, l, E]), Y(() => {
|
|
3114
|
+
if (u && n && o.floating)
|
|
3115
|
+
if (c == null) {
|
|
3116
|
+
if (J.current = !1, Ue.current != null)
|
|
3117
|
+
return;
|
|
3118
|
+
if (F.current && (h.current = -1, B()), (!O.current || !F.current) && T.current && (C.current != null || T.current === !0 && C.current == null)) {
|
|
3119
|
+
let M = 0;
|
|
3120
|
+
const H = () => {
|
|
3121
|
+
i.current[0] == null ? (M < 2 && (M ? requestAnimationFrame : queueMicrotask)(H), M++) : (h.current = C.current == null || Yt(C.current, I, v) || d ? yt(i, oe.current) : en(i, oe.current), C.current = null, E());
|
|
3122
|
+
};
|
|
3123
|
+
H();
|
|
3124
|
+
}
|
|
3125
|
+
} else qe(i, c) || (h.current = c, B(), j.current = !1);
|
|
3126
|
+
}, [u, n, o.floating, c, Ue, d, i, I, v, E, B, oe]), Y(() => {
|
|
3127
|
+
var M;
|
|
3128
|
+
if (!u || o.floating || !R || p || !F.current)
|
|
3129
|
+
return;
|
|
3130
|
+
const H = R.nodesRef.current, A = (M = H.find((re) => re.id === V)) == null || (M = M.context) == null ? void 0 : M.elements.floating, q = Re(le(o.floating)), Z = H.some((re) => re.context && ce(re.context.elements.floating, q));
|
|
3131
|
+
A && !Z && D.current && A.focus({
|
|
3132
|
+
preventScroll: !0
|
|
3133
|
+
});
|
|
3134
|
+
}, [u, o.floating, R, V, p]), Y(() => {
|
|
3135
|
+
if (!u || !R || !p || V) return;
|
|
3136
|
+
function M(H) {
|
|
3137
|
+
z(H.id), P && (P.current = H);
|
|
3138
|
+
}
|
|
3139
|
+
return R.events.on("virtualfocus", M), () => {
|
|
3140
|
+
R.events.off("virtualfocus", M);
|
|
3141
|
+
};
|
|
3142
|
+
}, [u, R, p, V, P]), Y(() => {
|
|
3143
|
+
ee.current = E, O.current = n, F.current = !!o.floating;
|
|
3144
|
+
}), Y(() => {
|
|
3145
|
+
n || (C.current = null, T.current = y);
|
|
3146
|
+
}, [n, y]);
|
|
3147
|
+
const Q = c != null, te = f.useMemo(() => {
|
|
3148
|
+
function M(A) {
|
|
3149
|
+
if (!ve.current) return;
|
|
3150
|
+
const q = i.current.indexOf(A);
|
|
3151
|
+
q !== -1 && h.current !== q && (h.current = q, E());
|
|
3152
|
+
}
|
|
3153
|
+
return {
|
|
3154
|
+
onFocus(A) {
|
|
3155
|
+
let {
|
|
3156
|
+
currentTarget: q
|
|
3157
|
+
} = A;
|
|
3158
|
+
J.current = !0, M(q);
|
|
3159
|
+
},
|
|
3160
|
+
onClick: (A) => {
|
|
3161
|
+
let {
|
|
3162
|
+
currentTarget: q
|
|
3163
|
+
} = A;
|
|
3164
|
+
return q.focus({
|
|
3165
|
+
preventScroll: !0
|
|
3166
|
+
});
|
|
3167
|
+
},
|
|
3168
|
+
// Safari
|
|
3169
|
+
onMouseMove(A) {
|
|
3170
|
+
let {
|
|
3171
|
+
currentTarget: q
|
|
3172
|
+
} = A;
|
|
3173
|
+
J.current = !0, j.current = !1, x && M(q);
|
|
3174
|
+
},
|
|
3175
|
+
onPointerLeave(A) {
|
|
3176
|
+
let {
|
|
3177
|
+
pointerType: q
|
|
3178
|
+
} = A;
|
|
3179
|
+
if (!(!D.current || q === "touch") && (J.current = !0, !!x && (h.current = -1, E(), !p))) {
|
|
3180
|
+
var Z;
|
|
3181
|
+
(Z = G.current) == null || Z.focus({
|
|
3182
|
+
preventScroll: !0
|
|
3183
|
+
});
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
};
|
|
3187
|
+
}, [ve, G, x, i, E, p]), U = f.useCallback(() => {
|
|
3188
|
+
var M;
|
|
3189
|
+
return S ?? (R == null || (M = R.nodesRef.current.find((H) => H.id === V)) == null || (M = M.context) == null || (M = M.dataRef) == null ? void 0 : M.current.orientation);
|
|
3190
|
+
}, [V, R, S]), fe = ie((M) => {
|
|
3191
|
+
if (D.current = !1, J.current = !0, M.which === 229 || !ve.current && M.currentTarget === G.current)
|
|
3192
|
+
return;
|
|
3193
|
+
if (d && zn(M.key, I, v, L)) {
|
|
3194
|
+
bt(M.key, U()) || de(M), r(!1, M.nativeEvent, "list-navigation"), ne(o.domReference) && (p ? R == null || R.events.emit("virtualfocus", o.domReference) : o.domReference.focus());
|
|
3195
|
+
return;
|
|
3196
|
+
}
|
|
3197
|
+
const H = h.current, A = yt(i, w), q = en(i, w);
|
|
3198
|
+
if ($ || (M.key === "Home" && (de(M), h.current = A, E()), M.key === "End" && (de(M), h.current = q, E())), L > 1) {
|
|
3199
|
+
const Z = W || Array.from({
|
|
3200
|
+
length: i.current.length
|
|
3201
|
+
}, () => ({
|
|
3202
|
+
width: 1,
|
|
3203
|
+
height: 1
|
|
3204
|
+
})), re = ir(Z, L, k), nt = re.findIndex((be) => be != null && !Be(i, be, w)), at = re.reduce((be, We, ft) => We != null && !Be(i, We, w) ? ft : be, -1), rt = re[or({
|
|
3205
|
+
current: re.map((be) => be != null ? i.current[be] : null)
|
|
3206
|
+
}, {
|
|
3207
|
+
event: M,
|
|
3208
|
+
orientation: I,
|
|
3209
|
+
loop: g,
|
|
3210
|
+
rtl: v,
|
|
3211
|
+
cols: L,
|
|
3212
|
+
// treat undefined (empty grid spaces) as disabled indices so we
|
|
3213
|
+
// don't end up in them
|
|
3214
|
+
disabledIndices: cr([...(typeof w != "function" ? w : null) || i.current.map((be, We) => Be(i, We, w) ? We : void 0), void 0], re),
|
|
3215
|
+
minIndex: nt,
|
|
3216
|
+
maxIndex: at,
|
|
3217
|
+
prevIndex: sr(
|
|
3218
|
+
h.current > q ? A : h.current,
|
|
3219
|
+
Z,
|
|
3220
|
+
re,
|
|
3221
|
+
L,
|
|
3222
|
+
// use a corner matching the edge closest to the direction
|
|
3223
|
+
// we're moving in so we don't end up in the same item. Prefer
|
|
3224
|
+
// top/left over bottom/right.
|
|
3225
|
+
M.key === Fe ? "bl" : M.key === (v ? Ne : _e) ? "tr" : "tl"
|
|
3226
|
+
),
|
|
3227
|
+
stopEvent: !0
|
|
3228
|
+
})];
|
|
3229
|
+
if (rt != null && (h.current = rt, E()), I === "both")
|
|
3230
|
+
return;
|
|
3231
|
+
}
|
|
3232
|
+
if (bt(M.key, I)) {
|
|
3233
|
+
if (de(M), n && !p && Re(M.currentTarget.ownerDocument) === M.currentTarget) {
|
|
3234
|
+
h.current = Yt(M.key, I, v) ? A : q, E();
|
|
3235
|
+
return;
|
|
3236
|
+
}
|
|
3237
|
+
Yt(M.key, I, v) ? g ? h.current = H >= q ? m && H !== i.current.length ? -1 : A : ue(i, {
|
|
3238
|
+
startingIndex: H,
|
|
3239
|
+
disabledIndices: w
|
|
3240
|
+
}) : h.current = Math.min(q, ue(i, {
|
|
3241
|
+
startingIndex: H,
|
|
3242
|
+
disabledIndices: w
|
|
3243
|
+
})) : g ? h.current = H <= A ? m && H !== -1 ? i.current.length : q : ue(i, {
|
|
3244
|
+
startingIndex: H,
|
|
3245
|
+
decrement: !0,
|
|
3246
|
+
disabledIndices: w
|
|
3247
|
+
}) : h.current = Math.max(A, ue(i, {
|
|
3248
|
+
startingIndex: H,
|
|
3249
|
+
decrement: !0,
|
|
3250
|
+
disabledIndices: w
|
|
3251
|
+
})), qe(i, h.current) && (h.current = -1), E();
|
|
3252
|
+
}
|
|
3253
|
+
}), se = f.useMemo(() => p && n && Q && {
|
|
3254
|
+
"aria-activedescendant": K || Oe
|
|
3255
|
+
}, [p, n, Q, K, Oe]), ae = f.useMemo(() => ({
|
|
3256
|
+
"aria-orientation": I === "both" ? void 0 : I,
|
|
3257
|
+
...$ ? {} : se,
|
|
3258
|
+
onKeyDown: fe,
|
|
3259
|
+
onPointerMove() {
|
|
3260
|
+
D.current = !0;
|
|
3261
|
+
}
|
|
3262
|
+
}), [se, fe, I, $]), xe = f.useMemo(() => {
|
|
3263
|
+
function M(A) {
|
|
3264
|
+
y === "auto" && nr(A.nativeEvent) && (T.current = !0);
|
|
3265
|
+
}
|
|
3266
|
+
function H(A) {
|
|
3267
|
+
T.current = y, y === "auto" && rr(A.nativeEvent) && (T.current = !0);
|
|
3268
|
+
}
|
|
3269
|
+
return {
|
|
3270
|
+
...se,
|
|
3271
|
+
onKeyDown(A) {
|
|
3272
|
+
D.current = !1;
|
|
3273
|
+
const q = A.key.startsWith("Arrow"), Z = ["Home", "End"].includes(A.key), re = q || Z, nt = Hn(A.key, I, v), at = zn(A.key, I, v, L), rt = Hn(A.key, U(), v), be = bt(A.key, I), We = (d ? rt : be) || A.key === "Enter" || A.key.trim() === "";
|
|
3274
|
+
if (p && n) {
|
|
3275
|
+
const dt = R == null ? void 0 : R.nodesRef.current.find((mt) => mt.parentId == null), De = R && dt ? oo(R.nodesRef.current, dt.id) : null;
|
|
3276
|
+
if (re && De && P) {
|
|
3277
|
+
const mt = new KeyboardEvent("keydown", {
|
|
3278
|
+
key: A.key,
|
|
3279
|
+
bubbles: !0
|
|
3280
|
+
});
|
|
3281
|
+
if (nt || at) {
|
|
3282
|
+
var ft, an;
|
|
3283
|
+
const Mr = ((ft = De.context) == null ? void 0 : ft.elements.domReference) === A.currentTarget, dn = at && !Mr ? (an = De.context) == null ? void 0 : an.elements.domReference : nt ? i.current.find((mn) => (mn == null ? void 0 : mn.id) === Oe) : null;
|
|
3284
|
+
dn && (de(A), dn.dispatchEvent(mt), z(void 0));
|
|
3285
|
+
}
|
|
3286
|
+
if ((be || Z) && De.context && De.context.open && De.parentId && A.currentTarget !== De.context.elements.domReference) {
|
|
3287
|
+
var fn;
|
|
3288
|
+
de(A), (fn = De.context.elements.domReference) == null || fn.dispatchEvent(mt);
|
|
3289
|
+
return;
|
|
3290
|
+
}
|
|
3291
|
+
}
|
|
3292
|
+
return fe(A);
|
|
3293
|
+
}
|
|
3294
|
+
if (!(!n && !b && q)) {
|
|
3295
|
+
if (We) {
|
|
3296
|
+
const dt = bt(A.key, U());
|
|
3297
|
+
C.current = d && dt ? null : A.key;
|
|
3298
|
+
}
|
|
3299
|
+
if (d) {
|
|
3300
|
+
rt && (de(A), n ? (h.current = yt(i, oe.current), E()) : r(!0, A.nativeEvent, "list-navigation"));
|
|
3301
|
+
return;
|
|
3302
|
+
}
|
|
3303
|
+
be && (l != null && (h.current = l), de(A), !n && b ? r(!0, A.nativeEvent, "list-navigation") : fe(A), n && E());
|
|
3304
|
+
}
|
|
3305
|
+
},
|
|
3306
|
+
onFocus() {
|
|
3307
|
+
n && !p && (h.current = -1, E());
|
|
3308
|
+
},
|
|
3309
|
+
onPointerDown: H,
|
|
3310
|
+
onPointerEnter: H,
|
|
3311
|
+
onMouseDown: M,
|
|
3312
|
+
onClick: M
|
|
3313
|
+
};
|
|
3314
|
+
}, [Oe, se, L, fe, oe, y, i, d, E, r, n, b, I, U, v, l, R, p, P]);
|
|
3315
|
+
return f.useMemo(() => u ? {
|
|
3316
|
+
reference: xe,
|
|
3317
|
+
floating: ae,
|
|
3318
|
+
item: te
|
|
3319
|
+
} : {}, [u, xe, ae, te]);
|
|
3320
|
+
}
|
|
3321
|
+
const bi = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
|
|
3322
|
+
function zi(e, t) {
|
|
3323
|
+
var n, r;
|
|
3324
|
+
t === void 0 && (t = {});
|
|
3325
|
+
const {
|
|
3326
|
+
open: o,
|
|
3327
|
+
elements: s,
|
|
3328
|
+
floatingId: i
|
|
3329
|
+
} = e, {
|
|
3330
|
+
enabled: c = !0,
|
|
3331
|
+
role: a = "dialog"
|
|
3332
|
+
} = t, u = Lt(), l = ((n = s.domReference) == null ? void 0 : n.id) || u, m = f.useMemo(() => {
|
|
3333
|
+
var b;
|
|
3334
|
+
return ((b = Ct(s.floating)) == null ? void 0 : b.id) || i;
|
|
3335
|
+
}, [s.floating, i]), g = (r = bi.get(a)) != null ? r : a, v = Ze() != null, p = f.useMemo(() => g === "tooltip" || a === "label" ? {
|
|
3336
|
+
["aria-" + (a === "label" ? "labelledby" : "describedby")]: o ? m : void 0
|
|
3337
|
+
} : {
|
|
3338
|
+
"aria-expanded": o ? "true" : "false",
|
|
3339
|
+
"aria-haspopup": g === "alertdialog" ? "dialog" : g,
|
|
3340
|
+
"aria-controls": o ? m : void 0,
|
|
3341
|
+
...g === "listbox" && {
|
|
3342
|
+
role: "combobox"
|
|
3343
|
+
},
|
|
3344
|
+
...g === "menu" && {
|
|
3345
|
+
id: l
|
|
3346
|
+
},
|
|
3347
|
+
...g === "menu" && v && {
|
|
3348
|
+
role: "menuitem"
|
|
3349
|
+
},
|
|
3350
|
+
...a === "select" && {
|
|
3351
|
+
"aria-autocomplete": "none"
|
|
3352
|
+
},
|
|
3353
|
+
...a === "combobox" && {
|
|
3354
|
+
"aria-autocomplete": "list"
|
|
3355
|
+
}
|
|
3356
|
+
}, [g, m, v, o, l, a]), y = f.useMemo(() => {
|
|
3357
|
+
const b = {
|
|
3358
|
+
id: m,
|
|
3359
|
+
...g && {
|
|
3360
|
+
role: g
|
|
3361
|
+
}
|
|
3362
|
+
};
|
|
3363
|
+
return g === "tooltip" || a === "label" ? b : {
|
|
3364
|
+
...b,
|
|
3365
|
+
...g === "menu" && {
|
|
3366
|
+
"aria-labelledby": l
|
|
3367
|
+
}
|
|
3368
|
+
};
|
|
3369
|
+
}, [g, m, l, a]), x = f.useCallback((b) => {
|
|
3370
|
+
let {
|
|
3371
|
+
active: w,
|
|
3372
|
+
selected: I
|
|
3373
|
+
} = b;
|
|
3374
|
+
const S = {
|
|
3375
|
+
role: "option",
|
|
3376
|
+
...w && {
|
|
3377
|
+
id: m + "-fui-option"
|
|
3378
|
+
}
|
|
3379
|
+
};
|
|
3380
|
+
switch (a) {
|
|
3381
|
+
case "select":
|
|
3382
|
+
case "combobox":
|
|
3383
|
+
return {
|
|
3384
|
+
...S,
|
|
3385
|
+
"aria-selected": I
|
|
3386
|
+
};
|
|
3387
|
+
}
|
|
3388
|
+
return {};
|
|
3389
|
+
}, [m, a]);
|
|
3390
|
+
return f.useMemo(() => c ? {
|
|
3391
|
+
reference: p,
|
|
3392
|
+
floating: y,
|
|
3393
|
+
item: x
|
|
3394
|
+
} : {}, [c, p, y, x]);
|
|
3395
|
+
}
|
|
3396
|
+
function yi(e, t) {
|
|
3397
|
+
const [n, r] = f.useState(e);
|
|
3398
|
+
return e && !n && r(!0), f.useEffect(() => {
|
|
3399
|
+
if (!e && n) {
|
|
3400
|
+
const o = setTimeout(() => r(!1), t);
|
|
3401
|
+
return () => clearTimeout(o);
|
|
3402
|
+
}
|
|
3403
|
+
}, [e, n, t]), n;
|
|
3404
|
+
}
|
|
3405
|
+
function Ui(e, t) {
|
|
3406
|
+
t === void 0 && (t = {});
|
|
3407
|
+
const {
|
|
3408
|
+
open: n,
|
|
3409
|
+
elements: {
|
|
3410
|
+
floating: r
|
|
3411
|
+
}
|
|
3412
|
+
} = e, {
|
|
3413
|
+
duration: o = 250
|
|
3414
|
+
} = t, i = (typeof o == "number" ? o : o.close) || 0, [c, a] = f.useState("unmounted"), u = yi(n, i);
|
|
3415
|
+
return !u && c === "close" && a("unmounted"), Y(() => {
|
|
3416
|
+
if (r) {
|
|
3417
|
+
if (n) {
|
|
3418
|
+
a("initial");
|
|
3419
|
+
const l = requestAnimationFrame(() => {
|
|
3420
|
+
tn.flushSync(() => {
|
|
3421
|
+
a("open");
|
|
3422
|
+
});
|
|
3423
|
+
});
|
|
3424
|
+
return () => {
|
|
3425
|
+
cancelAnimationFrame(l);
|
|
3426
|
+
};
|
|
3427
|
+
}
|
|
3428
|
+
a("close");
|
|
3429
|
+
}
|
|
3430
|
+
}, [n, r]), {
|
|
3431
|
+
isMounted: u,
|
|
3432
|
+
status: c
|
|
3433
|
+
};
|
|
3434
|
+
}
|
|
3435
|
+
export {
|
|
3436
|
+
Mi as C,
|
|
3437
|
+
_i as F,
|
|
3438
|
+
Si as a,
|
|
3439
|
+
Wi as b,
|
|
3440
|
+
zi as c,
|
|
3441
|
+
Bi as d,
|
|
3442
|
+
Ui as e,
|
|
3443
|
+
Ni as f,
|
|
3444
|
+
Fi as g,
|
|
3445
|
+
Xo as h,
|
|
3446
|
+
Ai as i,
|
|
3447
|
+
Ti as j,
|
|
3448
|
+
Li as k,
|
|
3449
|
+
$i as l,
|
|
3450
|
+
Oi as m,
|
|
3451
|
+
Vi as n,
|
|
3452
|
+
Ii as o,
|
|
3453
|
+
Ei as p,
|
|
3454
|
+
Ze as q,
|
|
3455
|
+
ki as r,
|
|
3456
|
+
Ci as s,
|
|
3457
|
+
Pi as t,
|
|
3458
|
+
Ki as u,
|
|
3459
|
+
Di as v,
|
|
3460
|
+
Yo as w,
|
|
3461
|
+
Hi as x
|
|
3462
|
+
};
|