@iress-oss/ids-components 6.0.0-alpha.0 → 6.0.0-alpha.2
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/README.md +1 -1
- package/dist/Autocomplete-C5ubHBTi.js +358 -0
- package/dist/{Button-BXzmntRi.js → Button-mmhMLwp9.js} +89 -85
- package/dist/Provider-8wS70V56.js +64 -0
- package/dist/{TableProvider-D8SQKIG8.js → TableProvider-bdUNuoG-.js} +11 -21
- package/dist/components/Alert/Alert.js +34 -35
- package/dist/components/Alert/Alert.styles.js +15 -15
- package/dist/components/Alert/index.js +4 -5
- package/dist/components/Autocomplete/Autocomplete.js +17 -82
- package/dist/components/Autocomplete/Autocomplete.styles.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +36 -35
- package/dist/components/Autocomplete/index.js +6 -4
- package/dist/components/Badge/Badge.js +3 -3
- package/dist/components/Badge/Badge.styles.js +5 -5
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/CloseButton/CloseButton.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.styles.js +1 -1
- package/dist/components/ButtonGroup/hooks/useButtonGroupItem.js +11 -12
- package/dist/components/Card/Card.js +2 -2
- package/dist/components/Card/Card.styles.js +17 -17
- package/dist/components/Checkbox/Checkbox.js +85 -86
- package/dist/components/Checkbox/Checkbox.styles.js +6 -6
- package/dist/components/CheckboxGroup/CheckboxGroup.js +69 -74
- package/dist/components/CheckboxGroup/CheckboxGroup.styles.js +11 -11
- package/dist/components/CheckboxMark/CheckboxMark.js +2 -2
- package/dist/components/CheckboxMark/CheckboxMark.styles.js +2 -2
- package/dist/components/Col/Col.js +1 -1
- package/dist/components/Col/Col.styles.js +1 -1
- package/dist/components/Container/Container.js +1 -1
- package/dist/components/Container/Container.styles.js +4 -3
- package/dist/components/Divider/Divider.js +2 -2
- package/dist/components/Divider/Divider.styles.js +2 -2
- package/dist/components/Expander/Expander.js +46 -41
- package/dist/components/Expander/Expander.styles.js +5 -5
- package/dist/components/Field/Field.js +55 -54
- package/dist/components/Field/Field.styles.js +17 -10
- package/dist/components/Field/FieldGroup/FieldGroup.js +40 -40
- package/dist/components/Field/FieldGroup/FieldGroup.styles.js +6 -6
- package/dist/components/Field/components/FieldFooter.js +32 -32
- package/dist/components/Field/components/FieldHint.js +3 -3
- package/dist/components/Filter/Filter.js +213 -100
- package/dist/components/Filter/Filter.styles.js +4 -4
- package/dist/components/Filter/components/FilterResetButton.js +17 -18
- package/dist/components/Filter/components/FilterResultsDescriptor.js +6 -6
- package/dist/components/Filter/components/FilterSearch.js +18 -19
- package/dist/components/Filter/index.js +2 -2
- package/dist/components/Hide/Hide.js +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Icon/Icon.styles.js +1 -1
- package/dist/components/Image/Image.js +1 -1
- package/dist/components/Image/Image.styles.js +1 -1
- package/dist/components/Inline/Inline.js +1 -1
- package/dist/components/Inline/Inline.styles.js +2 -2
- package/dist/components/Input/Input.js +102 -108
- package/dist/components/Input/Input.styles.js +8 -8
- package/dist/components/Input/InputBase/InputBase.js +23 -23
- package/dist/components/Label/Label.styles.js +4 -4
- package/dist/components/Label/LabelBase/LabelBase.js +32 -32
- package/dist/components/Link/Link.js +50 -51
- package/dist/components/Link/Link.styles.js +4 -3
- package/dist/components/Menu/Menu.js +51 -51
- package/dist/components/Menu/Menu.styles.js +12 -12
- package/dist/components/Menu/MenuDivider/MenuDivider.js +13 -13
- package/dist/components/Menu/MenuItem/MenuItem.js +144 -146
- package/dist/components/Menu/MenuItem/hooks/useMenuItemRole.js +5 -5
- package/dist/components/Menu/MenuText/MenuText.js +38 -38
- package/dist/components/Modal/Modal.js +115 -125
- package/dist/components/Modal/Modal.styles.js +22 -13
- package/dist/components/Modal/ModalProvider.js +20 -22
- package/dist/components/Modal/hooks/useModal.js +9 -7
- package/dist/components/Modal/hooks/useProviderModal.js +8 -8
- package/dist/components/Modal/index.js +7 -6
- package/dist/components/Panel/Panel.js +1 -1
- package/dist/components/Panel/Panel.styles.js +1 -1
- package/dist/components/Placeholder/Placeholder.js +14 -14
- package/dist/components/Placeholder/Placeholder.styles.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopover.js +89 -14
- package/dist/components/Popover/InputPopover/InputPopoverActivator.js +31 -34
- package/dist/components/Popover/Popover.js +44 -43
- package/dist/components/Popover/Popover.styles.js +2 -2
- package/dist/components/Popover/components/NestedPopoverActivator.js +1 -1
- package/dist/components/Popover/components/PopoverActivator.js +48 -53
- package/dist/components/Popover/components/PopoverContent.js +33 -33
- package/dist/components/Popover/helpers/composeFloatingProps.js +23 -26
- package/dist/components/Popover/helpers/handlePopoverTabKey.js +11 -14
- package/dist/components/Popover/hooks/usePopover.js +79 -75
- package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +23 -26
- package/dist/components/Popover/hooks/usePopoverItem.js +16 -17
- package/dist/components/Popover/hooks/usePopoverNavigation.js +22 -22
- package/dist/components/Popover/index.js +6 -6
- package/dist/components/Progress/Progress.js +35 -41
- package/dist/components/Progress/Progress.styles.js +4 -4
- package/dist/components/Provider/Provider.js +12 -35
- package/dist/components/Provider/index.js +1 -1
- package/dist/components/Radio/Radio.js +86 -81
- package/dist/components/Radio/Radio.styles.js +6 -6
- package/dist/components/RadioGroup/RadioGroup.js +69 -77
- package/dist/components/RadioGroup/RadioGroup.styles.js +5 -5
- package/dist/components/Readonly/Readonly.js +44 -43
- package/dist/components/Readonly/Readonly.styles.js +12 -17
- package/dist/components/RichSelect/RichSelect.js +21 -86
- package/dist/components/RichSelect/RichSelect.styles.js +10 -10
- package/dist/components/RichSelect/SelectBody/SelectBody.js +23 -117
- package/dist/components/RichSelect/SelectBody/SelectBody.styles.js +1 -1
- package/dist/components/RichSelect/SelectCreate/SelectCreate.js +25 -114
- package/dist/components/RichSelect/SelectHeading/SelectHeading.js +67 -97
- package/dist/components/RichSelect/SelectLabel/SelectLabel.js +19 -19
- package/dist/components/RichSelect/SelectLabel/SelectLabel.styles.js +6 -6
- package/dist/components/RichSelect/SelectMenu/SelectMenu.js +69 -69
- package/dist/components/RichSelect/SelectMenu/SelectMenu.styles.js +1 -1
- package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +52 -46
- package/dist/components/RichSelect/SelectSearch/SelectSearch.js +43 -98
- package/dist/components/RichSelect/SelectSearch/SelectSearch.styles.js +1 -1
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +31 -32
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.styles.js +1 -1
- package/dist/components/RichSelect/SelectTags/SelectTags.js +159 -105
- package/dist/components/RichSelect/SelectTags/SelectTags.styles.js +4 -4
- package/dist/components/RichSelect/components/SelectActivator.js +63 -6
- package/dist/components/RichSelect/components/SelectOptions.js +201 -95
- package/dist/components/RichSelect/index.js +18 -15
- package/dist/components/Row/Row.js +1 -1
- package/dist/components/Row/Row.styles.js +1 -1
- package/dist/components/Select/Select.js +71 -71
- package/dist/components/Select/Select.styles.js +9 -9
- package/dist/components/Select/SelectOption/SelectOption.js +1 -1
- package/dist/components/Select/components/SelectControl.js +1 -1
- package/dist/components/Select/components/SelectReadonly.js +30 -33
- package/dist/components/Select/helpers/nodesToSelectOptions.js +19 -20
- package/dist/components/Skeleton/Skeleton.styles.js +2 -2
- package/dist/components/SkipLink/SkipLink.js +1 -1
- package/dist/components/SkipLink/SkipLink.styles.js +3 -3
- package/dist/components/Slideout/Slideout.js +161 -161
- package/dist/components/Slideout/Slideout.styles.js +8 -8
- package/dist/components/Slideout/SlideoutProvider.js +18 -20
- package/dist/components/Slideout/components/SlideoutInner.js +3 -3
- package/dist/components/Slideout/hooks/useProviderSlideout.js +8 -8
- package/dist/components/Slideout/hooks/usePushElement.js +27 -27
- package/dist/components/Slideout/hooks/useSlideout.js +11 -9
- package/dist/components/Slideout/index.js +7 -6
- package/dist/components/Slider/Slider.js +76 -76
- package/dist/components/Slider/Slider.styles.js +4 -4
- package/dist/components/Slider/components/SliderTicks.js +15 -16
- package/dist/components/Spinner/Spinner.styles.js +1 -1
- package/dist/components/Stack/Stack.js +1 -1
- package/dist/components/Stack/Stack.styles.js +4 -4
- package/dist/components/TabSet/Tab/Tab.js +88 -88
- package/dist/components/TabSet/Tab/Tab.styles.js +3 -3
- package/dist/components/TabSet/TabSet.js +80 -67
- package/dist/components/TabSet/TabSet.styles.js +4 -4
- package/dist/components/TabSet/TabSetProvider.js +43 -43
- package/dist/components/Table/Table.js +39 -39
- package/dist/components/Table/Table.styles.js +10 -8
- package/dist/components/Table/TableBody/TableBody.js +76 -76
- package/dist/components/Table/TableFormattedValue/TableFormattedValue.js +8 -18
- package/dist/components/Table/TableProvider.js +2 -2
- package/dist/components/Table/components/TableEmpty.js +8 -8
- package/dist/components/Table/components/TableHeader.js +31 -32
- package/dist/components/Table/components/TableHeaderCell.js +23 -24
- package/dist/components/Table/components/TableRows.js +38 -38
- package/dist/components/Table/components/TableSortButton.js +6 -6
- package/dist/components/Table/helpers/composeTableColumnDefs.js +1 -1
- package/dist/components/Table/helpers/composeTableInitialSorting.js +4 -4
- package/dist/components/Table/hooks/useTableColumnSort.js +12 -12
- package/dist/components/Table/hooks/useTableColumnStyles.js +13 -14
- package/dist/components/Table/index.js +2 -3
- package/dist/components/Tag/Tag.js +29 -32
- package/dist/components/Tag/Tag.styles.js +5 -6
- package/dist/components/Tag/TagInput/TagInput.js +120 -104
- package/dist/components/Tag/TagInput/TagInput.styles.js +26 -0
- package/dist/components/Text/Text.js +16 -36
- package/dist/components/Text/Text.styles.js +5 -4
- package/dist/components/Text/index.js +1 -2
- package/dist/components/Toaster/Toaster.js +59 -11
- package/dist/components/Toaster/Toaster.styles.js +2 -2
- package/dist/components/Toaster/ToasterProvider.js +49 -6
- package/dist/components/Toaster/components/Toast/Toast.js +46 -47
- package/dist/components/Toaster/components/Toast/Toast.styles.js +13 -13
- package/dist/components/Toaster/components/Toast/ToastAnimated.js +38 -37
- package/dist/components/Toaster/hooks/useToaster.js +24 -22
- package/dist/components/Toaster/index.js +5 -4
- package/dist/components/Toggle/Toggle.js +59 -54
- package/dist/components/Toggle/Toggle.styles.js +13 -13
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.styles.js +2 -2
- package/dist/components/ValidationMessage/ValidationMessage.js +25 -26
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +5 -5
- package/dist/{composeTableColumnDefs-CeWqgpKW.js → composeTableColumnDefs-BfFBOARB.js} +99 -109
- package/dist/constants.js +10 -10
- package/dist/{create-recipe-BqEnhJ30.js → create-recipe-C-ASk1Hy.js} +11 -10
- package/dist/css-fGu_jDvv.js +228 -0
- package/dist/cva-JiDXAa83.js +63 -0
- package/dist/enums.js +7 -7
- package/dist/factory-oPXoMw9H.js +58 -0
- package/dist/{floating-ui.react-CPN4oQCc.js → floating-ui.react-BetVZ099.js} +1153 -1151
- package/dist/fuzzysort-DKAolWVP.js +397 -0
- package/dist/helpers/dom/closestCrossShadow.js +16 -17
- package/dist/helpers/dom/focusableElements.js +6 -6
- package/dist/helpers/dom/getActiveElement.js +5 -6
- package/dist/helpers/formatting/formatDateTime.js +9 -10
- package/dist/helpers/label-value/composeLabelValueDescriptor.js +8 -8
- package/dist/helpers/label-value/getQueryRangeExclusive.js +1 -1
- package/dist/helpers/label-value/getValueFromLabelValues.js +5 -6
- package/dist/helpers/label-value/highlightQueryInLabel.js +4 -7
- package/dist/helpers/label-value/highlightQueryInLabelValue.js +6 -5
- package/dist/helpers/label-value/searchLabelValues.js +1 -1
- package/dist/helpers/responsive/getResponsiveLayoutModifiers.js +4 -4
- package/dist/helpers/styling/iressCss.js +2 -2
- package/dist/helpers/styling/mapGutterToGap.js +7 -7
- package/dist/helpers/transition/getTransitionDuration.js +5 -8
- package/dist/hooks/useAriaRelationship.js +19 -21
- package/dist/hooks/useBreakpoint.js +8 -11
- package/dist/hooks/useControlledState.js +37 -35
- package/dist/{index-DlGwAtoO.js → index-CZ9ot38T.js} +107 -129
- package/dist/{index.esm-BdbWn-w_.js → index.esm-B6vzbp0e.js} +5 -5
- package/dist/{index.esm-BnSuefUA.js → index.esm-CL8gh5wr.js} +1 -5
- package/dist/is-valid-prop-Ce0wiweq.js +7 -0
- package/dist/main.js +298 -292
- package/dist/patterns/Form/Form.js +1 -1
- package/dist/patterns/Form/Form.styles.js +1 -1
- package/dist/patterns/Form/FormField/FormField.js +41 -44
- package/dist/patterns/Form/FormField/FormFieldset.js +41 -44
- package/dist/patterns/Form/FormField/helpers/getErrorTypeMessage.js +10 -10
- package/dist/patterns/Form/FormField/hooks/useFieldRenderProps.js +26 -26
- package/dist/patterns/Form/FormValidationSummary/FormValidationSummary.js +55 -56
- package/dist/patterns/Form/HookForm/HookForm.js +72 -75
- package/dist/patterns/Form/components/LongForm.js +1 -1
- package/dist/patterns/Form/components/ShortForm.js +12 -12
- package/dist/patterns/Loading/Loading.styles.js +32 -20
- package/dist/patterns/Loading/LoadingSuspense.js +34 -34
- package/dist/patterns/Loading/components/ComponentLoading.js +42 -47
- package/dist/patterns/Loading/components/DefaultLoading.js +1 -1
- package/dist/patterns/Loading/components/LongLoading.js +45 -45
- package/dist/patterns/Loading/components/PageLoading.js +64 -64
- package/dist/patterns/Loading/components/StartUpLoading.js +61 -59
- package/dist/patterns/Loading/components/ValidateLoading.js +2 -2
- package/dist/patterns/Loading/hooks/useEstimatedProgressValue.js +8 -12
- package/dist/patterns/Loading/hooks/useShouldRenderLoading.js +14 -14
- package/dist/patterns/Loading/hooks/useShowIndicator.js +11 -11
- package/dist/patterns/Shadow/Shadow.js +22009 -0
- package/dist/patterns/Shadow/index.js +4 -0
- package/dist/src/components/Alert/Alert.d.ts +0 -1
- package/dist/src/components/Alert/Alert.styles.d.ts +2 -2
- package/dist/src/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/src/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +1 -1
- package/dist/src/components/Autocomplete/index.d.ts +1 -0
- package/dist/src/components/Badge/Badge.styles.d.ts +2 -2
- package/dist/src/components/Card/Card.styles.d.ts +2 -2
- package/dist/src/components/Checkbox/Checkbox.d.ts +3 -1
- package/dist/src/components/Checkbox/Checkbox.styles.d.ts +3 -3
- package/dist/src/components/CheckboxGroup/CheckboxGroup.styles.d.ts +4 -4
- package/dist/src/components/Expander/Expander.styles.d.ts +2 -2
- package/dist/src/components/Field/Field.styles.d.ts +13 -6
- package/dist/src/components/Field/FieldGroup/FieldGroup.styles.d.ts +1 -1
- package/dist/src/components/Inline/Inline.d.ts +1 -2
- package/dist/src/components/Label/Label.styles.d.ts +1 -1
- package/dist/src/components/Menu/Menu.styles.d.ts +5 -5
- package/dist/src/components/Modal/Modal.styles.d.ts +8 -2
- package/dist/src/components/Modal/ModalProvider.d.ts +0 -16
- package/dist/src/components/Modal/hooks/useModal.d.ts +17 -0
- package/dist/src/components/Popover/Popover.styles.d.ts +1 -1
- package/dist/src/components/Popover/components/NestedPopoverActivator.d.ts +1 -1
- package/dist/src/components/Popover/hooks/usePopover.d.ts +4 -0
- package/dist/src/components/Popover/hooks/usePopoverNavigation.d.ts +1 -1
- package/dist/src/components/Radio/Radio.styles.d.ts +1 -1
- package/dist/src/components/RadioGroup/RadioGroup.styles.d.ts +4 -4
- package/dist/src/components/Readonly/Readonly.styles.d.ts +1 -1
- package/dist/src/components/RichSelect/RichSelect.d.ts +11 -1
- package/dist/src/components/RichSelect/RichSelect.styles.d.ts +7 -7
- package/dist/src/components/RichSelect/SelectBody/SelectBody.d.ts +1 -1
- package/dist/src/components/RichSelect/SelectMenu/SelectMenu.d.ts +2 -2
- package/dist/src/components/RichSelect/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/dist/src/components/RichSelect/SelectSearch/SelectSearch.d.ts +1 -1
- package/dist/src/components/RichSelect/SelectSearchInput/SelectSearchInput.d.ts +1 -2
- package/dist/src/components/RichSelect/SelectTags/SelectTags.d.ts +1 -1
- package/dist/src/components/RichSelect/SelectTags/SelectTags.styles.d.ts +1 -1
- package/dist/src/components/RichSelect/components/SelectOptions.d.ts +1 -1
- package/dist/src/components/Row/Row.d.ts +1 -2
- package/dist/src/components/Select/Select.styles.d.ts +7 -7
- package/dist/src/components/Skeleton/Skeleton.styles.d.ts +1 -1
- package/dist/src/components/Slideout/Slideout.styles.d.ts +2 -2
- package/dist/src/components/Slideout/SlideoutProvider.d.ts +0 -6
- package/dist/src/components/Slideout/hooks/useSlideout.d.ts +7 -0
- package/dist/src/components/Stack/Stack.d.ts +1 -2
- package/dist/src/components/TabSet/TabSet.d.ts +10 -1
- package/dist/src/components/Table/TableFormattedValue/TableFormattedValue.d.ts +2 -3
- package/dist/src/components/Table/helpers/composeTableColumnDefs.d.ts +1 -1
- package/dist/src/components/Tag/TagInput/TagInput.styles.d.ts +1 -0
- package/dist/src/components/Text/Text.d.ts +1 -2
- package/dist/src/components/Toaster/ToasterProvider.d.ts +0 -2
- package/dist/src/components/Toaster/components/Toast/Toast.d.ts +1 -2
- package/dist/src/components/Toaster/components/Toast/Toast.styles.d.ts +4 -4
- package/dist/src/components/Toaster/hooks/useToaster.d.ts +7 -6
- package/dist/src/components/Toggle/Toggle.d.ts +10 -2
- package/dist/src/components/Toggle/Toggle.styles.d.ts +4 -4
- package/dist/src/enums.d.ts +1 -9
- package/dist/src/interfaces.d.ts +9 -10
- package/dist/src/main.d.ts +1 -1
- package/dist/src/patterns/Form/hooks/useNoDefaultValueInForms.d.ts +1 -1
- package/dist/src/patterns/Loading/Loading.styles.d.ts +11 -10
- package/dist/src/patterns/Loading/components/PageLoading.d.ts +5 -1
- package/dist/src/patterns/Loading/components/StartUpLoading.d.ts +8 -3
- package/dist/src/patterns/Loading/components/ValidateLoading.d.ts +1 -1
- package/dist/src/patterns/Shadow/Shadow.d.ts +34 -0
- package/dist/src/patterns/Shadow/index.d.ts +1 -0
- package/dist/src/patterns/Shadow/meta/Thumbnail.d.ts +2 -0
- package/dist/src/patterns/Shadow/meta/index.d.ts +7 -0
- package/dist/src/styled-system/jsx/create-style-context.d.ts +54 -0
- package/dist/src/styled-system/jsx/index.d.ts +1 -0
- package/dist/src/styled-system/patterns/aspect-ratio.d.ts +0 -1
- package/dist/src/styled-system/patterns/bleed.d.ts +0 -1
- package/dist/src/styled-system/patterns/box.d.ts +0 -1
- package/dist/src/styled-system/patterns/center.d.ts +0 -1
- package/dist/src/styled-system/patterns/circle.d.ts +0 -1
- package/dist/src/styled-system/patterns/container.d.ts +0 -1
- package/dist/src/styled-system/patterns/cq.d.ts +0 -1
- package/dist/src/styled-system/patterns/divider.d.ts +0 -1
- package/dist/src/styled-system/patterns/flex.d.ts +0 -1
- package/dist/src/styled-system/patterns/float.d.ts +0 -1
- package/dist/src/styled-system/patterns/grid-item.d.ts +0 -1
- package/dist/src/styled-system/patterns/grid.d.ts +0 -1
- package/dist/src/styled-system/patterns/hstack.d.ts +0 -1
- package/dist/src/styled-system/patterns/link-overlay.d.ts +0 -1
- package/dist/src/styled-system/patterns/spacer.d.ts +0 -1
- package/dist/src/styled-system/patterns/square.d.ts +0 -1
- package/dist/src/styled-system/patterns/stack.d.ts +0 -1
- package/dist/src/styled-system/patterns/visually-hidden.d.ts +0 -1
- package/dist/src/styled-system/patterns/vstack.d.ts +0 -1
- package/dist/src/styled-system/patterns/wrap.d.ts +0 -1
- package/dist/src/styled-system/recipes/button.d.ts +4 -3
- package/dist/src/styled-system/recipes/table.d.ts +4 -1
- package/dist/src/styled-system/recipes/text.d.ts +3 -2
- package/dist/src/styled-system/tokens/tokens.d.ts +4 -4
- package/dist/src/styled-system/types/composition.d.ts +83 -23
- package/dist/src/styled-system/types/conditions.d.ts +15 -11
- package/dist/src/styled-system/types/jsx.d.ts +27 -10
- package/dist/src/styled-system/types/prop-type.d.ts +11 -4
- package/dist/src/styled-system/types/style-props.d.ts +14 -1
- package/dist/src/styled-system/types/system-types.d.ts +76 -0
- package/dist/src/types.d.ts +3 -1
- package/dist/style.css +1 -1
- package/dist/sva-OmxClA9g.js +34 -0
- package/package.json +68 -46
- package/dist/Filter-Bwk7SIlJ.js +0 -1103
- package/dist/InputPopover-BWWuoQZ2.js +0 -132
- package/dist/ToasterProvider-XqpAGfRs.js +0 -112
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/cva-B2x59Dph.js +0 -294
- package/dist/factory-DHLOr79I.js +0 -53
- package/dist/fuzzysort-eoXOpoo6.js +0 -395
- package/dist/helpers/utility/generateScopedName.js +0 -9
- package/dist/is-valid-prop-DFFvE05x.js +0 -7
- package/dist/panda.config.d.ts +0 -4
- package/dist/src/helpers/utility/generateScopedName.d.ts +0 -8
- package/dist/sva-TRyehFkb.js +0 -32
- package/dist/theme-preset/config-recipes/button.d.ts +0 -6
- package/dist/theme-preset/config-recipes/table.d.ts +0 -1
- package/dist/theme-preset/config-recipes/text.d.ts +0 -1
- package/dist/theme-preset/globalCss.d.ts +0 -1
- package/dist/theme-preset/index.d.ts +0 -2
- package/dist/theme-preset/staticCss.d.ts +0 -2
- package/dist/theme-preset/storybook.d.ts +0 -4
- package/dist/theme-preset/tokens/animationStyles.d.ts +0 -1
- package/dist/theme-preset/tokens/borders.d.ts +0 -50
- package/dist/theme-preset/tokens/breakpoints.d.ts +0 -8
- package/dist/theme-preset/tokens/colors.d.ts +0 -156
- package/dist/theme-preset/tokens/keyframes.d.ts +0 -1
- package/dist/theme-preset/tokens/layerStyles.d.ts +0 -40
- package/dist/theme-preset/tokens/radii.d.ts +0 -42
- package/dist/theme-preset/tokens/sizes.d.ts +0 -246
- package/dist/theme-preset/tokens/spacing.d.ts +0 -100
- package/dist/theme-preset/tokens/textStyles.d.ts +0 -5
- package/dist/theme-preset/tokens/zIndex.d.ts +0 -23
- package/dist/theme-preset/utilities/chevron.d.ts +0 -3
- package/dist/theme-preset/utilities/focusable.d.ts +0 -1
- package/dist/theme-preset/utilities/gutter.d.ts +0 -1
- package/dist/theme-preset/utilities/hide.d.ts +0 -1
- package/dist/theme-preset/utilities/noGutter.d.ts +0 -1
- package/dist/theme-preset/utilities/offset.d.ts +0 -75
- package/dist/theme-preset/utilities/sliderThumb.d.ts +0 -1
- package/dist/theme-preset/utilities/span.d.ts +0 -120
- package/dist/theme-preset/utilities/stretch.d.ts +0 -1
- package/dist/theme-preset/utilities/topLeftTriangle.d.ts +0 -2
- package/dist/typography--vGt_ztU.js +0 -12
- package/dist/vite.config.d.ts +0 -2
- package/dist/vitest.config.d.ts +0 -2
- package/dist/vitest.setup.d.ts +0 -0
- /package/{LICENSE.txt → LICENSE} +0 -0
|
@@ -1,16 +1,91 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import "../../../
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
12
|
-
import "../
|
|
13
|
-
|
|
1
|
+
import { jsx as o, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y, useContext as E } from "react";
|
|
3
|
+
import { GlobalCSSClass as t } from "../../../enums.js";
|
|
4
|
+
import { propagateTestid as m } from "../../../helpers/utility/propagateTestid.js";
|
|
5
|
+
import { PopoverContent as G } from "../components/PopoverContent.js";
|
|
6
|
+
import { InputPopoverActivator as H } from "./InputPopoverActivator.js";
|
|
7
|
+
import { usePopoverImperativeHandle as R } from "../hooks/usePopoverImperativeHandle.js";
|
|
8
|
+
import { s as S } from "../../../factory-oPXoMw9H.js";
|
|
9
|
+
import { usePopover as T, PopoverContext as c } from "../hooks/usePopover.js";
|
|
10
|
+
import { c as n } from "../../../cx-DN21T1EH.js";
|
|
11
|
+
import { popover as W } from "../Popover.styles.js";
|
|
12
|
+
import { NestedPopoverActivator as k } from "../components/NestedPopoverActivator.js";
|
|
13
|
+
const q = ({
|
|
14
|
+
activator: v,
|
|
15
|
+
align: u = "auto",
|
|
16
|
+
autoHighlight: l = !0,
|
|
17
|
+
children: d,
|
|
18
|
+
className: f,
|
|
19
|
+
container: P,
|
|
20
|
+
contentClassName: h,
|
|
21
|
+
contentStyle: a,
|
|
22
|
+
defaultShow: x,
|
|
23
|
+
displayMode: s = "overlay",
|
|
24
|
+
focusStartIndex: I,
|
|
25
|
+
minLength: C,
|
|
26
|
+
onActivated: A,
|
|
27
|
+
onDeactivated: N,
|
|
28
|
+
onNavigate: F,
|
|
29
|
+
show: b,
|
|
30
|
+
type: j = "listbox",
|
|
31
|
+
...r
|
|
32
|
+
}, g) => {
|
|
33
|
+
const i = s === "overlay", e = W({ hasInputActivator: !0, matchActivatorWidth: i }), p = T({
|
|
34
|
+
align: u,
|
|
35
|
+
autoHighlight: l,
|
|
36
|
+
defaultShow: x,
|
|
37
|
+
focusStartIndex: I,
|
|
38
|
+
hasInputActivator: !0,
|
|
39
|
+
matchActivatorWidth: i,
|
|
40
|
+
onActivated: A,
|
|
41
|
+
onDeactivated: N,
|
|
42
|
+
onNavigate: F,
|
|
43
|
+
show: b,
|
|
44
|
+
type: j,
|
|
45
|
+
virtualFocus: !0
|
|
46
|
+
});
|
|
47
|
+
return R(g, p), /* @__PURE__ */ o(c.Provider, { value: p, children: /* @__PURE__ */ w(
|
|
48
|
+
S.div,
|
|
49
|
+
{
|
|
50
|
+
...r,
|
|
51
|
+
className: n(
|
|
52
|
+
f,
|
|
53
|
+
t.FormElement,
|
|
54
|
+
e.root,
|
|
55
|
+
t.Popover,
|
|
56
|
+
t.InputPopover
|
|
57
|
+
),
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ o(k, { parentPopover: E(c), children: /* @__PURE__ */ o(
|
|
60
|
+
H,
|
|
61
|
+
{
|
|
62
|
+
className: e.activator,
|
|
63
|
+
"data-testid": m(r["data-testid"], "activator"),
|
|
64
|
+
minLength: C,
|
|
65
|
+
children: v
|
|
66
|
+
}
|
|
67
|
+
) }),
|
|
68
|
+
/* @__PURE__ */ o(
|
|
69
|
+
G,
|
|
70
|
+
{
|
|
71
|
+
className: n(
|
|
72
|
+
h,
|
|
73
|
+
a?.className,
|
|
74
|
+
e.content,
|
|
75
|
+
t.PopoverContent
|
|
76
|
+
),
|
|
77
|
+
container: P,
|
|
78
|
+
"data-testid": m(r["data-testid"], "content"),
|
|
79
|
+
displayMode: s,
|
|
80
|
+
virtualFocus: !0,
|
|
81
|
+
...a,
|
|
82
|
+
children: d
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
) });
|
|
88
|
+
}, Z = y(q);
|
|
14
89
|
export {
|
|
15
|
-
|
|
90
|
+
Z as IressInputPopover
|
|
16
91
|
};
|
|
@@ -1,48 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { hasFocus as
|
|
4
|
-
import { usePopoverActivatorInteractions as
|
|
5
|
-
import { PopoverContext as
|
|
6
|
-
const
|
|
7
|
-
children:
|
|
8
|
-
minLength:
|
|
9
|
-
...
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as m, useCallback as c, cloneElement as C } from "react";
|
|
3
|
+
import { hasFocus as w } from "../helpers/hasFocus.js";
|
|
4
|
+
import { usePopoverActivatorInteractions as E } from "../hooks/usePopoverActivatorInteractions.js";
|
|
5
|
+
import { PopoverContext as R } from "../hooks/usePopover.js";
|
|
6
|
+
const S = ({
|
|
7
|
+
children: r,
|
|
8
|
+
minLength: l,
|
|
9
|
+
...u
|
|
10
10
|
}) => {
|
|
11
|
-
const t =
|
|
12
|
-
(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
c && (t == null ? void 0 : t.show) === !1 ? t.setShowWithReason(!0, n.nativeEvent, u) : !c && (t != null && t.show) && t.setShowWithReason(!1, n.nativeEvent, u), (r = e.onChange) == null || r.call(e, n, a);
|
|
11
|
+
const t = m(R), o = r?.props, n = l ?? o.minLength ?? 1, a = "focus", h = c(
|
|
12
|
+
(e) => {
|
|
13
|
+
const s = e.currentTarget.value, i = s.length >= n;
|
|
14
|
+
i && t?.show === !1 ? t.setShowWithReason(!0, e.nativeEvent, a) : !i && t?.show && t.setShowWithReason(!1, e.nativeEvent, a), o.onChange?.(e, s);
|
|
16
15
|
},
|
|
17
|
-
[
|
|
18
|
-
),
|
|
19
|
-
(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(c = e.onClick) == null || c.call(e, n), (t == null ? void 0 : t.show) === !1 && R(n.currentTarget) && a.length >= s && t.setShowWithReason(!0, n.nativeEvent, u);
|
|
16
|
+
[o, n, t]
|
|
17
|
+
), v = c(
|
|
18
|
+
(e) => {
|
|
19
|
+
const s = e.currentTarget.value;
|
|
20
|
+
o.onClick?.(e), t?.show === !1 && w(e.currentTarget) && s.length >= n && t.setShowWithReason(!0, e.nativeEvent, a);
|
|
23
21
|
},
|
|
24
|
-
[
|
|
25
|
-
),
|
|
26
|
-
(
|
|
27
|
-
|
|
28
|
-
(a = e.onFocus) == null || a.call(e, n), (!s || n.currentTarget.value.length >= s) && (t == null ? void 0 : t.show) === !1 && t.setShowWithReason(!0, n.nativeEvent, "focus");
|
|
22
|
+
[o, n, t]
|
|
23
|
+
), p = c(
|
|
24
|
+
(e) => {
|
|
25
|
+
o.onFocus?.(e), (!n || e.currentTarget.value.length >= n) && t?.show === !1 && t.setShowWithReason(!0, e.nativeEvent, "focus");
|
|
29
26
|
},
|
|
30
|
-
[
|
|
31
|
-
),
|
|
27
|
+
[o, n, t]
|
|
28
|
+
), f = E(
|
|
32
29
|
t,
|
|
33
|
-
|
|
30
|
+
o
|
|
34
31
|
);
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
|
|
32
|
+
return /* @__PURE__ */ g("div", { ...u, ref: t?.api.refs.setReference, children: r && t && C(
|
|
33
|
+
r,
|
|
37
34
|
t.interactions.getReferenceProps({
|
|
38
|
-
...
|
|
35
|
+
...f,
|
|
39
36
|
"aria-autocomplete": "list",
|
|
40
37
|
onChange: h,
|
|
41
|
-
onClick:
|
|
42
|
-
onFocus:
|
|
38
|
+
onClick: v,
|
|
39
|
+
onFocus: p
|
|
43
40
|
})
|
|
44
41
|
) });
|
|
45
42
|
};
|
|
46
43
|
export {
|
|
47
|
-
|
|
44
|
+
S as InputPopoverActivator
|
|
48
45
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { GlobalCSSClass as
|
|
1
|
+
import { jsx as o, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as E, useRef as G, useContext as H } from "react";
|
|
3
|
+
import { GlobalCSSClass as e } from "../../enums.js";
|
|
4
4
|
import { propagateTestid as c } from "../../helpers/utility/propagateTestid.js";
|
|
5
|
-
import { PopoverActivator as
|
|
6
|
-
import { PopoverContent as
|
|
7
|
-
import { s as
|
|
8
|
-
import { c as
|
|
9
|
-
import { usePopoverImperativeHandle as
|
|
10
|
-
import { popover as
|
|
11
|
-
import { usePopover as
|
|
12
|
-
import { NestedPopoverActivator as
|
|
13
|
-
const
|
|
14
|
-
activator:
|
|
15
|
-
align:
|
|
16
|
-
children:
|
|
5
|
+
import { PopoverActivator as S } from "./components/PopoverActivator.js";
|
|
6
|
+
import { PopoverContent as T } from "./components/PopoverContent.js";
|
|
7
|
+
import { s as k } from "../../factory-oPXoMw9H.js";
|
|
8
|
+
import { c as n } from "../../cx-DN21T1EH.js";
|
|
9
|
+
import { usePopoverImperativeHandle as q } from "./hooks/usePopoverImperativeHandle.js";
|
|
10
|
+
import { popover as z } from "./Popover.styles.js";
|
|
11
|
+
import { usePopover as B, PopoverContext as v } from "./hooks/usePopover.js";
|
|
12
|
+
import { NestedPopoverActivator as D } from "./components/NestedPopoverActivator.js";
|
|
13
|
+
const F = ({
|
|
14
|
+
activator: d,
|
|
15
|
+
align: l = "auto",
|
|
16
|
+
children: f,
|
|
17
17
|
className: P,
|
|
18
18
|
container: h,
|
|
19
19
|
contentClassName: x,
|
|
20
|
-
contentStyle:
|
|
20
|
+
contentStyle: a,
|
|
21
21
|
defaultShow: u,
|
|
22
|
-
displayMode:
|
|
22
|
+
displayMode: m = "overlay",
|
|
23
23
|
fluid: C,
|
|
24
24
|
focusStartIndex: N,
|
|
25
25
|
matchActivatorWidth: A,
|
|
@@ -28,61 +28,62 @@ const K = ({
|
|
|
28
28
|
onNavigate: R,
|
|
29
29
|
type: W,
|
|
30
30
|
show: b,
|
|
31
|
-
virtualFocus:
|
|
31
|
+
virtualFocus: s,
|
|
32
32
|
...t
|
|
33
33
|
}, g) => {
|
|
34
|
-
const w =
|
|
35
|
-
align:
|
|
34
|
+
const w = G(null), i = A && m === "overlay", r = z({ fluid: C, matchActivatorWidth: i }), p = B({
|
|
35
|
+
align: l,
|
|
36
36
|
defaultShow: u,
|
|
37
37
|
focusStartIndex: N,
|
|
38
|
-
matchActivatorWidth:
|
|
38
|
+
matchActivatorWidth: i,
|
|
39
39
|
onActivated: j,
|
|
40
40
|
onDeactivated: I,
|
|
41
41
|
onNavigate: R,
|
|
42
42
|
show: b,
|
|
43
43
|
type: W,
|
|
44
|
-
virtualFocus:
|
|
44
|
+
virtualFocus: s
|
|
45
45
|
});
|
|
46
|
-
return
|
|
47
|
-
|
|
46
|
+
return q(g, p), /* @__PURE__ */ o(v.Provider, { value: p, children: /* @__PURE__ */ y(
|
|
47
|
+
k.div,
|
|
48
48
|
{
|
|
49
49
|
...t,
|
|
50
|
-
className:
|
|
50
|
+
className: n(
|
|
51
51
|
P,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
e.FormElement,
|
|
53
|
+
r.root,
|
|
54
|
+
e.Popover
|
|
55
55
|
),
|
|
56
56
|
ref: w,
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
58
|
+
/* @__PURE__ */ o(D, { parentPopover: H(v), children: /* @__PURE__ */ o(
|
|
59
|
+
S,
|
|
60
60
|
{
|
|
61
|
-
className:
|
|
61
|
+
className: r.activator,
|
|
62
62
|
"data-testid": c(t["data-testid"], "activator"),
|
|
63
|
-
children:
|
|
63
|
+
children: d
|
|
64
64
|
}
|
|
65
65
|
) }),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
66
|
+
/* @__PURE__ */ o(
|
|
67
|
+
T,
|
|
68
68
|
{
|
|
69
|
-
...
|
|
70
|
-
className:
|
|
69
|
+
...a,
|
|
70
|
+
className: n(
|
|
71
71
|
x,
|
|
72
|
-
|
|
73
|
-
e.
|
|
72
|
+
a?.className,
|
|
73
|
+
e.PopoverContent,
|
|
74
|
+
r.content
|
|
74
75
|
),
|
|
75
76
|
container: h,
|
|
76
77
|
"data-testid": c(t["data-testid"], "content"),
|
|
77
|
-
displayMode:
|
|
78
|
-
virtualFocus:
|
|
79
|
-
children:
|
|
78
|
+
displayMode: m,
|
|
79
|
+
virtualFocus: s,
|
|
80
|
+
children: f
|
|
80
81
|
}
|
|
81
82
|
)
|
|
82
83
|
]
|
|
83
84
|
}
|
|
84
85
|
) });
|
|
85
|
-
},
|
|
86
|
+
}, M = E(F);
|
|
86
87
|
export {
|
|
87
|
-
|
|
88
|
+
M as IressPopover
|
|
88
89
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as t } from "../../sva-
|
|
1
|
+
import { s as t } from "../../sva-OmxClA9g.js";
|
|
2
2
|
const a = t({
|
|
3
3
|
slots: ["root", "activator", "content"],
|
|
4
4
|
base: {
|
|
@@ -36,7 +36,7 @@ const a = t({
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
matchActivatorWidth: {
|
|
39
|
-
|
|
39
|
+
false: {
|
|
40
40
|
content: {
|
|
41
41
|
maxWidth: "[none]"
|
|
42
42
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useContext as l, useRef as
|
|
3
|
-
import { focusableElements as
|
|
4
|
-
import { usePopoverActivatorInteractions as
|
|
5
|
-
import { PopoverContext as
|
|
6
|
-
const
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as l, useRef as d, useMemo as p, useEffect as m } from "react";
|
|
3
|
+
import { focusableElements as v } from "../../../helpers/dom/focusableElements.js";
|
|
4
|
+
import { usePopoverActivatorInteractions as g } from "../hooks/usePopoverActivatorInteractions.js";
|
|
5
|
+
import { PopoverContext as A } from "../hooks/usePopover.js";
|
|
6
|
+
const b = [
|
|
7
7
|
"aria-controls",
|
|
8
8
|
"aria-expanded",
|
|
9
9
|
"aria-haspopup",
|
|
@@ -11,72 +11,67 @@ const v = [
|
|
|
11
11
|
"id",
|
|
12
12
|
"role",
|
|
13
13
|
"tabindex"
|
|
14
|
-
],
|
|
15
|
-
const t =
|
|
16
|
-
t
|
|
17
|
-
const c =
|
|
18
|
-
|
|
19
|
-
}),
|
|
20
|
-
},
|
|
21
|
-
children:
|
|
22
|
-
...
|
|
14
|
+
], x = (i, s) => {
|
|
15
|
+
const t = i.querySelector("[id]"), o = t?.getAttribute("id");
|
|
16
|
+
t?.removeAttribute("id"), b.forEach((r) => {
|
|
17
|
+
const c = i.getAttribute(r);
|
|
18
|
+
i.removeAttribute(r), c && s.setAttribute(r, c);
|
|
19
|
+
}), o && s.setAttribute("id", o);
|
|
20
|
+
}, y = ({
|
|
21
|
+
children: i,
|
|
22
|
+
...s
|
|
23
23
|
}) => {
|
|
24
|
-
const t = l(
|
|
24
|
+
const t = l(A), o = d(null), r = i?.props, c = g(
|
|
25
25
|
t,
|
|
26
|
-
|
|
27
|
-
),
|
|
28
|
-
if (t
|
|
26
|
+
r
|
|
27
|
+
), u = p(() => {
|
|
28
|
+
if (t?.show)
|
|
29
29
|
return [
|
|
30
30
|
...t.getAriaControls(),
|
|
31
|
-
|
|
31
|
+
r["aria-controls"],
|
|
32
32
|
t.api.context.floatingId
|
|
33
33
|
].join(" ").trim();
|
|
34
|
-
}, [
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"aria-activedescendant"
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
), i.current.setAttribute(
|
|
34
|
+
}, [r, t]);
|
|
35
|
+
return m(() => {
|
|
36
|
+
!o.current || !t?.getVirtualFocus || t.activeIndex === null || (setTimeout(
|
|
37
|
+
() => t?.api.refs.domReference.current?.removeAttribute(
|
|
38
|
+
"aria-activedescendant"
|
|
39
|
+
)
|
|
40
|
+
), o.current.setAttribute(
|
|
45
41
|
"aria-activedescendant",
|
|
46
|
-
|
|
42
|
+
t.list.current?.[t.activeIndex]?.id ?? ""
|
|
47
43
|
));
|
|
48
|
-
}, [t]), /* @__PURE__ */
|
|
44
|
+
}, [t]), /* @__PURE__ */ f(
|
|
49
45
|
"div",
|
|
50
46
|
{
|
|
51
|
-
...
|
|
52
|
-
...t
|
|
47
|
+
...s,
|
|
48
|
+
...t?.interactions.getReferenceProps({
|
|
53
49
|
...c,
|
|
54
|
-
"aria-controls":
|
|
55
|
-
role:
|
|
56
|
-
ref: (
|
|
57
|
-
if (!
|
|
58
|
-
t
|
|
59
|
-
const
|
|
60
|
-
|
|
50
|
+
"aria-controls": u,
|
|
51
|
+
role: r.role,
|
|
52
|
+
ref: (e) => {
|
|
53
|
+
if (!e) return;
|
|
54
|
+
t?.api.refs.setReference(e);
|
|
55
|
+
const n = e?.querySelector("[role=combobox]") ?? v(e)[0];
|
|
56
|
+
n && (o.current = n, x(e, n));
|
|
61
57
|
},
|
|
62
|
-
onBlur: (
|
|
63
|
-
const
|
|
64
|
-
|
|
58
|
+
onBlur: (e) => {
|
|
59
|
+
const n = t?.api.refs.floating.current, a = e.relatedTarget;
|
|
60
|
+
a instanceof Element && n?.contains(a) && (e.preventDefault(), e.stopPropagation());
|
|
65
61
|
},
|
|
66
|
-
onFocus: (
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(u = i.current) == null || u.focus();
|
|
62
|
+
onFocus: (e) => {
|
|
63
|
+
const n = t?.api.refs.floating.current, a = e.relatedTarget;
|
|
64
|
+
a instanceof Element && (a.hasAttribute("data-floating-ui-focus-guard") || n?.contains(a)) && t.show && (setTimeout(() => {
|
|
65
|
+
o.current?.focus();
|
|
71
66
|
}), setTimeout(() => {
|
|
72
|
-
t.setShowWithReason(!1,
|
|
67
|
+
t.setShowWithReason(!1, e.nativeEvent, "focus");
|
|
73
68
|
}, 300));
|
|
74
69
|
}
|
|
75
70
|
}),
|
|
76
|
-
children:
|
|
71
|
+
children: i
|
|
77
72
|
}
|
|
78
73
|
);
|
|
79
74
|
};
|
|
80
75
|
export {
|
|
81
|
-
|
|
76
|
+
y as PopoverActivator
|
|
82
77
|
};
|
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { q as
|
|
3
|
-
import { composePopoverFloatingProps as
|
|
4
|
-
import { useContext as
|
|
5
|
-
import { s as
|
|
6
|
-
import { PopoverContext as
|
|
2
|
+
import { q as F, r as v, t as x, v as c, g as I, w as P, f as w } from "../../../floating-ui.react-BetVZ099.js";
|
|
3
|
+
import { composePopoverFloatingProps as C } from "../helpers/composeFloatingProps.js";
|
|
4
|
+
import { useContext as E, useEffect as T } from "react";
|
|
5
|
+
import { s as N } from "../../../factory-oPXoMw9H.js";
|
|
6
|
+
import { PopoverContext as A } from "../hooks/usePopover.js";
|
|
7
7
|
const u = ({
|
|
8
|
-
children:
|
|
9
|
-
displayMode:
|
|
8
|
+
children: r,
|
|
9
|
+
displayMode: n,
|
|
10
10
|
id: i,
|
|
11
11
|
style: f,
|
|
12
12
|
virtualFocus: a,
|
|
13
13
|
...m
|
|
14
14
|
}) => {
|
|
15
|
-
const t =
|
|
16
|
-
if (
|
|
17
|
-
if (t
|
|
18
|
-
const
|
|
15
|
+
const t = E(A);
|
|
16
|
+
if (T(() => {
|
|
17
|
+
if (t?.show) {
|
|
18
|
+
const p = () => {
|
|
19
19
|
document.querySelectorAll(
|
|
20
20
|
'[data-floating-ui-focus-guard][aria-hidden="true"]'
|
|
21
21
|
).forEach((s) => {
|
|
22
22
|
s instanceof HTMLElement && s.tabIndex !== -1 && (s.tabIndex = -1);
|
|
23
23
|
});
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
s.addedNodes.forEach(
|
|
24
|
+
}, g = (o) => {
|
|
25
|
+
o instanceof HTMLElement && o.hasAttribute("data-floating-ui-focus-guard") && o.getAttribute("aria-hidden") === "true" && o.tabIndex !== -1 && (o.tabIndex = -1);
|
|
26
|
+
}, b = setTimeout(p, 0), d = new MutationObserver((o) => {
|
|
27
|
+
o.forEach((s) => {
|
|
28
|
+
s.addedNodes.forEach(g);
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
return d.observe(document.body, {
|
|
32
32
|
childList: !0,
|
|
33
33
|
subtree: !0
|
|
34
34
|
}), () => {
|
|
35
|
-
clearTimeout(
|
|
35
|
+
clearTimeout(b), d.disconnect();
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
}, [t
|
|
39
|
-
const h =
|
|
38
|
+
}, [t?.show]), !t) return null;
|
|
39
|
+
const h = C(
|
|
40
40
|
t,
|
|
41
|
-
|
|
41
|
+
n,
|
|
42
42
|
f,
|
|
43
43
|
i
|
|
44
44
|
);
|
|
45
|
-
return /* @__PURE__ */ e(
|
|
46
|
-
|
|
45
|
+
return /* @__PURE__ */ e(P, { elementsRef: t.list, children: /* @__PURE__ */ e(
|
|
46
|
+
w,
|
|
47
47
|
{
|
|
48
48
|
context: t.api.context,
|
|
49
49
|
initialFocus: a ? -1 : 0,
|
|
50
50
|
modal: !1,
|
|
51
|
-
disabled: !
|
|
51
|
+
disabled: !t?.show,
|
|
52
52
|
returnFocus: !a,
|
|
53
53
|
children: /* @__PURE__ */ e(
|
|
54
|
-
|
|
54
|
+
N.div,
|
|
55
55
|
{
|
|
56
56
|
...m,
|
|
57
|
-
hidden: !
|
|
58
|
-
ref: t
|
|
57
|
+
hidden: !t?.show,
|
|
58
|
+
ref: t?.api.refs.setFloating,
|
|
59
59
|
...h,
|
|
60
|
-
children:
|
|
60
|
+
children: r
|
|
61
61
|
}
|
|
62
62
|
)
|
|
63
63
|
}
|
|
64
64
|
) });
|
|
65
65
|
}, l = ({
|
|
66
|
-
container:
|
|
67
|
-
...
|
|
66
|
+
container: r,
|
|
67
|
+
...n
|
|
68
68
|
}) => {
|
|
69
|
-
const i =
|
|
70
|
-
return
|
|
71
|
-
},
|
|
69
|
+
const i = x();
|
|
70
|
+
return r ? /* @__PURE__ */ e(c, { id: i, children: /* @__PURE__ */ e(I, { root: r, preserveTabOrder: !0, children: /* @__PURE__ */ e(u, { ...n }) }) }) : /* @__PURE__ */ e(c, { id: i, children: /* @__PURE__ */ e(u, { ...n }) });
|
|
71
|
+
}, O = (r) => F() === null ? /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(l, { ...r }) }) : /* @__PURE__ */ e(l, { ...r });
|
|
72
72
|
export {
|
|
73
|
-
|
|
73
|
+
O as PopoverContent
|
|
74
74
|
};
|
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
import { getActiveElement as
|
|
2
|
-
import { handlePopoverTabKey as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
const a = t != null && t.hasInnerRole() || t == null ? void 0 : t.type, y = a && ["listbox", "menu", "tree"].includes(a), g = a && ["application", "combobox", "composite", "group"].includes(a), x = c === "inline", h = () => {
|
|
1
|
+
import { getActiveElement as g } from "../../../helpers/dom/getActiveElement.js";
|
|
2
|
+
import { handlePopoverTabKey as m } from "./handlePopoverTabKey.js";
|
|
3
|
+
const P = (t, e, s, c) => {
|
|
4
|
+
const i = t?.hasInnerRole() ? void 0 : t?.type, o = i && ["listbox", "menu", "tree"].includes(i), l = i && ["application", "combobox", "composite", "group"].includes(i), r = e === "inline", u = () => {
|
|
6
5
|
setTimeout(() => {
|
|
7
|
-
|
|
8
|
-
F() === t.api.elements.floating && !t.getVirtualFocus && ((s = (i = t.list.current) == null ? void 0 : i[0]) == null || s.focus());
|
|
6
|
+
g() === t.api.elements.floating && !t.getVirtualFocus && t.list.current?.[0]?.focus();
|
|
9
7
|
});
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
(d = t.list.current[A]) == null || d.focus();
|
|
8
|
+
}, d = (n) => {
|
|
9
|
+
if (n.key === "Tab" && m(t, n), n.key === "PageUp" && !t?.isVirtualFocus && t.list.current[0]?.focus(), n.key === "PageDown" && !t?.isVirtualFocus) {
|
|
10
|
+
const f = Math.max(t?.list.current.length - 1, 0);
|
|
11
|
+
t.list.current[f]?.focus();
|
|
15
12
|
}
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
onFocus:
|
|
19
|
-
onKeyDown:
|
|
13
|
+
y(t, n);
|
|
14
|
+
}, a = t.interactions.getFloatingProps({
|
|
15
|
+
onFocus: u,
|
|
16
|
+
onKeyDown: d
|
|
20
17
|
});
|
|
21
18
|
return {
|
|
22
|
-
...
|
|
23
|
-
"aria-activedescendant":
|
|
24
|
-
"aria-orientation":
|
|
25
|
-
id:
|
|
26
|
-
role:
|
|
19
|
+
...a,
|
|
20
|
+
"aria-activedescendant": l ? a?.["aria-activedescendant"] : void 0,
|
|
21
|
+
"aria-orientation": o ? a?.["aria-orientation"] : void 0,
|
|
22
|
+
id: c ?? t?.api?.context?.floatingId,
|
|
23
|
+
role: i,
|
|
27
24
|
style: {
|
|
28
|
-
...
|
|
29
|
-
...
|
|
25
|
+
...s,
|
|
26
|
+
...r ? {} : t?.api?.floatingStyles
|
|
30
27
|
}
|
|
31
28
|
};
|
|
32
|
-
},
|
|
33
|
-
t.type !== "listbox" ||
|
|
29
|
+
}, y = (t, e) => {
|
|
30
|
+
t.type !== "listbox" || e.key !== "ArrowUp" || t.activeIndex !== 0 || t.setShowWithReason(!1, e.nativeEvent, "list-navigation");
|
|
34
31
|
};
|
|
35
32
|
export {
|
|
36
|
-
|
|
33
|
+
P as composePopoverFloatingProps
|
|
37
34
|
};
|