@iress-oss/ids-components 5.20.0 → 5.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +378 -0
- package/README.md +1 -1
- package/dist/{AutocompleteNoResults-CogA3XZs.js → AutocompleteNoResults-B7El1R2l.js} +1 -1
- package/dist/ComboboxHiddenInput-CWfIj-Zz.js +32 -0
- package/dist/{FieldAppendToLabel-CuSREliL.js → FieldAppendToLabel-BTdzhQ7Z.js} +5 -5
- package/dist/InputBase-Hc9D8St6.js +56 -0
- package/dist/Loading.module-BjceG0Wh.js +13 -0
- package/dist/LoadingSuspense-Bwd232Nt.js +5728 -0
- package/dist/LogoFromSrc-CAdoYYud.js +59 -0
- package/dist/MenuItem.module-BQw_K5D4.js +24 -0
- package/dist/Popover.module-ZU-08mVQ.js +11 -0
- package/dist/PopoverProvider-Cvg6ObBO.js +142 -0
- package/dist/{SelectControl-D1SJlplM.js → SelectControl-WoixPfwh.js} +2 -2
- package/dist/SliderTicks-D-B1uIdS.js +74 -0
- package/dist/TabSet.module-4ohNBuQS.js +13 -0
- package/dist/Table.module-BYwGboft.js +32 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +4 -4
- package/dist/components/Autocomplete/components/AutocompleteInstructions.js +7 -7
- package/dist/components/Autocomplete/components/AutocompleteNoResults.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +36 -35
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/Badge/Badge.js +5 -5
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/CloseButton/CloseButton.js +2 -2
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +3 -3
- package/dist/components/ButtonGroup/ButtonGroupProvider.js +22 -22
- package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +2 -2
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Card/helpers/composeIDSCard.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +11 -11
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +74 -75
- package/dist/components/CheckboxMark/CheckboxMark.js +1 -1
- package/dist/components/CheckboxMark/CheckboxMark.types.js +2 -2
- package/dist/components/Col/Col.js +1 -1
- package/dist/components/Combobox/Combobox.js +4 -4
- package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +4 -4
- package/dist/components/Combobox/components/ComboboxHiddenInput.js +2 -2
- package/dist/components/Combobox/components/ComboboxResults.js +6 -6
- package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +4 -4
- package/dist/components/Combobox/hooks/useComboboxInlineCompletion.js +34 -37
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/Container/Container.js +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Expander/Expander.js +48 -48
- package/dist/components/Field/Field.js +47 -47
- package/dist/components/Field/FieldGroup/FieldGroup.js +59 -59
- package/dist/components/Field/components/FieldAppendToLabel.js +5 -5
- package/dist/components/Filter/Filter.js +4 -4
- package/dist/components/Filter/components/FilterResetButton.js +4 -4
- package/dist/components/Filter/components/FilterSearch.js +4 -4
- package/dist/components/Filter/index.js +1 -1
- package/dist/components/Form/Form.js +1 -1
- package/dist/components/Form/FormField/FormField.js +46 -49
- package/dist/components/Form/FormField/FormFieldset.js +42 -45
- package/dist/components/Form/FormField/helpers/getErrorTypeMessage.js +10 -10
- package/dist/components/Form/HookForm/HookForm.js +2 -2
- package/dist/components/Form/components/FormValidationSummary.js +15 -16
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Hide/Hide.js +2 -2
- package/dist/components/Hide/helpers/composeHideClasses.js +4 -4
- package/dist/components/Hide/index.js +1 -1
- package/dist/components/Icon/Icon.js +4 -4
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Inline/Inline.js +4 -4
- package/dist/components/Inline/index.js +1 -1
- package/dist/components/Input/ClearButton/ClearButton.js +1 -1
- package/dist/components/Input/Input.js +3 -3
- package/dist/components/Input/InputBase/InputBase.js +2 -2
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputCurrency/InputCurrency.js +1 -1
- package/dist/components/InputCurrency/index.js +1 -1
- package/dist/components/Label/LabelBase/LabelBase.js +37 -37
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuDivider/MenuDivider.js +4 -4
- package/dist/components/Menu/MenuHeading/MenuHeading.js +3 -3
- package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
- package/dist/components/Menu/MenuItem/hooks/useMenuItemAria.js +7 -7
- package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +30 -30
- package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +2 -2
- package/dist/components/Menu/MenuItem/hooks/useMenuItemInteractions.js +47 -49
- package/dist/components/Menu/MenuItem/hooks/useMenuItemRole.js +5 -5
- package/dist/components/Menu/MenuText/MenuText.js +5 -5
- package/dist/components/Menu/helpers/mapMenuItems.js +21 -21
- package/dist/components/Menu/hooks/useMenuAria.js +2 -2
- package/dist/components/Menu/hooks/useMenuComposite.js +6 -6
- package/dist/components/Menu/hooks/useMenuRole.js +10 -10
- package/dist/components/Menu/hooks/useMenuStyles.js +18 -18
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Modal/hooks/useIDSProvidedModal.js +8 -8
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Navbar/Navbar.js +3 -3
- package/dist/components/Navbar/components/HomeLinkContent.js +2 -2
- package/dist/components/Navbar/components/LogoFromSrc.js +1 -1
- package/dist/components/Navbar/components/NavbarLogo.js +3 -3
- package/dist/components/Navbar/index.js +1 -1
- package/dist/components/Panel/Panel.js +1 -1
- package/dist/components/Placeholder/Placeholder.js +20 -20
- package/dist/components/Popover/InputPopover/InputPopover.js +2 -2
- package/dist/components/Popover/InputPopover/InputPopoverActivator.js +40 -43
- package/dist/components/Popover/InputPopover/InputPopoverProvider.js +61 -61
- package/dist/components/Popover/Popover.js +3 -3
- package/dist/components/Popover/PopoverProvider.js +2 -2
- package/dist/components/Popover/components/NestedPopoverActivator.js +1 -1
- package/dist/components/Popover/components/PopoverActivator.js +53 -58
- package/dist/components/Popover/components/PopoverContent.js +31 -31
- package/dist/components/Popover/helpers/composeFloatingProps.js +21 -24
- package/dist/components/Popover/helpers/handlePopoverTabKey.js +2 -2
- package/dist/components/Popover/hooks/usePopover.js +1 -1
- package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +23 -26
- package/dist/components/Popover/hooks/usePopoverImperativeHandle.js +17 -17
- package/dist/components/Popover/hooks/usePopoverItem.js +13 -14
- package/dist/components/Popover/hooks/usePopoverNavigation.js +22 -22
- package/dist/components/Progress/Progress.js +2 -2
- package/dist/components/Provider/Provider.js +1 -1
- package/dist/components/Radio/Radio.js +2 -2
- package/dist/components/Radio/helpers/mapRadioGroupOptions.js +8 -8
- package/dist/components/Radio/index.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +68 -56
- package/dist/components/RadioGroup/index.js +6 -5
- package/dist/components/Readonly/Readonly.js +5 -5
- package/dist/components/Readonly/index.js +1 -1
- package/dist/components/RichSelect/RichSelect.js +3 -3
- package/dist/components/RichSelect/SelectBody/SelectBody.js +4 -4
- package/dist/components/RichSelect/SelectCreate/SelectCreate.js +4 -4
- package/dist/components/RichSelect/SelectHeading/SelectHeading.js +4 -4
- package/dist/components/RichSelect/SelectLabel/SelectLabel.js +2 -2
- package/dist/components/RichSelect/SelectMenu/SelectMenu.js +4 -4
- package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +4 -4
- package/dist/components/RichSelect/SelectSearch/SelectSearch.js +3 -3
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +2 -2
- package/dist/components/RichSelect/SelectTags/SelectTags.js +3 -3
- package/dist/components/RichSelect/components/SelectActivator.js +1 -1
- package/dist/components/RichSelect/components/SelectOptions.js +4 -4
- package/dist/components/RichSelect/index.js +1 -1
- package/dist/components/Row/Row.js +4 -4
- package/dist/components/Row/index.js +1 -1
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/components/SelectControl.js +2 -2
- package/dist/components/Select/components/SelectReadonly.js +4 -4
- package/dist/components/Select/helpers/mapSelectOptions.js +9 -9
- package/dist/components/Select/helpers/nodesToSelectOptions.js +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Skeleton/Skeleton.js +11 -11
- package/dist/components/SkipLink/SkipLink.js +2 -2
- package/dist/components/Slideout/Slideout.js +4 -4
- package/dist/components/Slideout/components/SlideoutInner.js +3 -3
- package/dist/components/Slideout/hooks/useIDSProvidedSlideout.js +7 -7
- package/dist/components/Slideout/index.js +1 -1
- package/dist/components/Slider/Slider.js +3 -3
- package/dist/components/Slider/components/SliderTicks.js +2 -2
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/Stack/Stack.js +1 -1
- package/dist/components/TabSet/Tab/Tab.js +52 -52
- package/dist/components/TabSet/TabSet.js +24 -24
- package/dist/components/TabSet/TabSetProvider.js +30 -30
- package/dist/components/TabSet/components/TabSetItem.js +31 -32
- package/dist/components/TabSet/helpers/mapTabs.js +19 -19
- package/dist/components/Table/Table.js +3 -3
- package/dist/components/Table/TableBody/TableBody.js +91 -91
- package/dist/components/Table/TableProvider.js +2 -2
- package/dist/components/Table/components/TableEmpty.js +8 -8
- package/dist/components/Table/components/TableHeader.js +2 -2
- package/dist/components/Table/components/TableHeaderCell.js +1 -1
- package/dist/components/Table/components/TableRows.js +34 -34
- package/dist/components/Table/components/TableSortButton.js +3 -3
- package/dist/components/Table/helpers/composeIDSTableColumnDefs.js +22 -22
- package/dist/components/Table/helpers/composeIDSTableInitialSorting.js +2 -2
- package/dist/components/Table/hooks/useIDSTableColumnSort.js +6 -6
- package/dist/components/Table/hooks/useIDSTableColumnStyles.js +14 -15
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tag/Tag.js +2 -2
- package/dist/components/Tag/TagInput/TagInput.js +1 -1
- package/dist/components/Tag/components/TagListInput/TagListInput.js +2 -2
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/Toaster/Toast/Toast.js +2 -2
- package/dist/components/Toaster/Toast/ToastAnimated.js +3 -3
- package/dist/components/Toaster/Toast/ToastIcon.js +1 -1
- package/dist/components/Toaster/Toaster.js +3 -3
- package/dist/components/Toaster/ToasterProvider.js +1 -1
- package/dist/components/Toaster/hooks/useToaster.js +1 -1
- package/dist/components/Toaster/index.js +1 -1
- package/dist/components/Toggle/Toggle.js +25 -25
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +2 -2
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +2 -2
- package/dist/constants.js +1 -1
- package/dist/floating-ui.react-DYBeYtOf.js +3464 -0
- package/dist/fuzzysort-BNka47rs.js +395 -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 +8 -7
- 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/searchLabelValues.js +1 -1
- package/dist/helpers/responsive/getResponsiveLayoutModifiers.js +4 -4
- 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 +40 -40
- package/dist/{index-BQfnxwrU.js → index-BaVtNOfa.js} +41 -51
- package/dist/{index-Dms7F5NM.js → index-DLnR8XTt.js} +1 -11
- package/dist/{index-2QXL0WYc.js → index-cbHCAGLB.js} +2 -7
- package/dist/{index.esm-BnSuefUA.js → index.esm-CL8gh5wr.js} +1 -5
- package/dist/main.js +159 -158
- package/dist/patterns/Loading/Loading.js +1 -1
- package/dist/patterns/Loading/LoadingSuspense.js +1 -1
- package/dist/patterns/Loading/components/ComponentLoading.js +3 -3
- package/dist/patterns/Loading/components/DefaultLoading.js +3 -3
- package/dist/patterns/Loading/components/LongLoading.js +42 -42
- package/dist/patterns/Loading/components/PageLoading.js +3 -3
- package/dist/patterns/Loading/components/StartUpLoading.js +65 -65
- package/dist/patterns/Loading/components/ValidateLoading.js +3 -3
- package/dist/patterns/Loading/index.js +1 -1
- package/dist/src/components/InputCurrency/InputCurrency.d.ts +1 -2
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +5 -0
- package/dist/src/components/TabSet/TabSet.types.d.ts +1 -1
- package/dist/src/components/Table/Table.types.d.ts +1 -1
- package/dist/src/components/Table/helpers/composeIDSTableColumnDefs.d.ts +1 -1
- package/dist/src/components/Table/helpers/findColumnByKey.d.ts +1 -1
- package/dist/src/components/Toaster/hooks/useToaster.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/useIDSButtonGroupItem-BB7Moa3N.js +29 -0
- package/package.json +67 -38
- package/dist/ComboboxHiddenInput-gTOjjF3f.js +0 -32
- package/dist/InputBase-BFK9n82f.js +0 -56
- package/dist/Loading.module-g2pe-Gfx.js +0 -13
- package/dist/LoadingSuspense-D9nGJ3gx.js +0 -5773
- package/dist/LogoFromSrc-BnImWqt6.js +0 -59
- package/dist/MenuItem.module-BxcFZeSh.js +0 -24
- package/dist/Popover.module-BKrF_xRW.js +0 -11
- package/dist/PopoverProvider-d3hhpW2k.js +0 -142
- package/dist/SliderTicks-DQN0Ka4d.js +0 -78
- package/dist/TabSet.module-FRUnHgA1.js +0 -13
- package/dist/Table.module-r-RfIeLI.js +0 -32
- package/dist/floating-ui.react-nmA48tb2.js +0 -3463
- package/dist/fuzzysort-eoXOpoo6.js +0 -395
- package/dist/useIDSButtonGroupItem-VfKx4O-O.js +0 -30
- 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,62 +1,59 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { s as
|
|
3
|
-
import { usePopover as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { hasFocus as
|
|
6
|
-
import { usePopoverActivatorInteractions as
|
|
7
|
-
const
|
|
8
|
-
children:
|
|
9
|
-
disabledAutoToggle:
|
|
10
|
-
minLength:
|
|
11
|
-
...
|
|
1
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { s as C } from "../../../Popover.module-ZU-08mVQ.js";
|
|
3
|
+
import { usePopover as E } from "../hooks/usePopover.js";
|
|
4
|
+
import { useCallback as i, cloneElement as R } from "react";
|
|
5
|
+
import { hasFocus as P } from "../helpers/hasFocus.js";
|
|
6
|
+
import { usePopoverActivatorInteractions as k } from "../hooks/usePopoverActivatorInteractions.js";
|
|
7
|
+
const L = ({
|
|
8
|
+
children: a,
|
|
9
|
+
disabledAutoToggle: s,
|
|
10
|
+
minLength: v,
|
|
11
|
+
...f
|
|
12
12
|
}) => {
|
|
13
|
-
const t =
|
|
14
|
-
(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
u && (t == null ? void 0 : t.show) === !1 ? t.setShowWithReason(!0, s.nativeEvent, i) : !u && (t != null && t.show) && t.setShowWithReason(!1, s.nativeEvent, i);
|
|
13
|
+
const t = E(), n = a?.props, o = v ?? n.minLength ?? 1, c = "focus", u = i(
|
|
14
|
+
(e) => {
|
|
15
|
+
const r = e.currentTarget.value;
|
|
16
|
+
if (!s) {
|
|
17
|
+
const h = r.length >= o;
|
|
18
|
+
h && t?.show === !1 ? t.setShowWithReason(!0, e.nativeEvent, c) : !h && t?.show && t.setShowWithReason(!1, e.nativeEvent, c);
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
n.onChange?.(e, r);
|
|
22
21
|
},
|
|
23
|
-
[n,
|
|
24
|
-
),
|
|
25
|
-
(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
(r = n.onClick) == null || r.call(n, s), !o && (t == null ? void 0 : t.show) === !1 && S(s.currentTarget) && a.length >= e && t.setShowWithReason(!0, s.nativeEvent, i);
|
|
22
|
+
[n, s, o, t]
|
|
23
|
+
), p = i(
|
|
24
|
+
(e) => {
|
|
25
|
+
const r = e.currentTarget.value;
|
|
26
|
+
n.onClick?.(e), !s && t?.show === !1 && P(e.currentTarget) && r.length >= o && t.setShowWithReason(!0, e.nativeEvent, c);
|
|
29
27
|
},
|
|
30
|
-
[n,
|
|
31
|
-
),
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
(a = n.onFocus) == null || a.call(n, s), !o && (!e || s.currentTarget.value.length >= e) && (t == null ? void 0 : t.show) === !1 && t.setShowWithReason(!0, s.nativeEvent, "focus");
|
|
28
|
+
[n, s, o, t]
|
|
29
|
+
), l = i(
|
|
30
|
+
(e) => {
|
|
31
|
+
n.onFocus?.(e), !s && (!o || e.currentTarget.value.length >= o) && t?.show === !1 && t.setShowWithReason(!0, e.nativeEvent, "focus");
|
|
35
32
|
},
|
|
36
|
-
[n,
|
|
37
|
-
),
|
|
33
|
+
[n, s, o, t]
|
|
34
|
+
), m = k(
|
|
38
35
|
t,
|
|
39
36
|
n
|
|
40
37
|
);
|
|
41
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ w(
|
|
42
39
|
"div",
|
|
43
40
|
{
|
|
44
|
-
...
|
|
45
|
-
className:
|
|
46
|
-
ref: t
|
|
47
|
-
children:
|
|
48
|
-
|
|
41
|
+
...f,
|
|
42
|
+
className: C.activator,
|
|
43
|
+
ref: t?.api.refs.setReference,
|
|
44
|
+
children: a && t && R(
|
|
45
|
+
a,
|
|
49
46
|
t.interactions.getReferenceProps({
|
|
50
|
-
...
|
|
47
|
+
...m,
|
|
51
48
|
"aria-autocomplete": "list",
|
|
52
|
-
onChange:
|
|
53
|
-
onClick:
|
|
54
|
-
onFocus:
|
|
49
|
+
onChange: u,
|
|
50
|
+
onClick: p,
|
|
51
|
+
onFocus: l
|
|
55
52
|
})
|
|
56
53
|
)
|
|
57
54
|
}
|
|
58
55
|
);
|
|
59
56
|
};
|
|
60
57
|
export {
|
|
61
|
-
|
|
58
|
+
L as InputPopoverActivator
|
|
62
59
|
};
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { o as
|
|
4
|
-
import { POPOVER_USE_MAX_HEIGHT as
|
|
5
|
-
import { usePopoverState as
|
|
6
|
-
import { usePopoverNavigation as
|
|
7
|
-
import { usePopoverAria as
|
|
8
|
-
import { a as
|
|
9
|
-
import { usePopoverImperativeHandle as
|
|
10
|
-
import { focusableElements as
|
|
11
|
-
const
|
|
1
|
+
import { jsx as S } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as V, useRef as _, useMemo as P, useCallback as k } from "react";
|
|
3
|
+
import { o as q, h as y, s as U, i as $, j as z, k as D, l as G, m as K } from "../../../floating-ui.react-DYBeYtOf.js";
|
|
4
|
+
import { POPOVER_USE_MAX_HEIGHT as X } from "../Popover.types.js";
|
|
5
|
+
import { usePopoverState as B } from "../hooks/usePopoverState.js";
|
|
6
|
+
import { usePopoverNavigation as J } from "../hooks/usePopoverNavigation.js";
|
|
7
|
+
import { usePopoverAria as L } from "../hooks/usePopoverAria.js";
|
|
8
|
+
import { a as Q } from "../../../PopoverProvider-Cvg6ObBO.js";
|
|
9
|
+
import { usePopoverImperativeHandle as W } from "../hooks/usePopoverImperativeHandle.js";
|
|
10
|
+
import { focusableElements as Y } from "../../../helpers/dom/focusableElements.js";
|
|
11
|
+
const Z = V(
|
|
12
12
|
({
|
|
13
|
-
align:
|
|
14
|
-
autoHighlight:
|
|
15
|
-
children:
|
|
16
|
-
defaultShow:
|
|
17
|
-
disabledAutoToggle:
|
|
18
|
-
focusStartIndex:
|
|
19
|
-
matchActivatorWidth:
|
|
20
|
-
onActivated:
|
|
21
|
-
onDeactivated:
|
|
13
|
+
align: p,
|
|
14
|
+
autoHighlight: h,
|
|
15
|
+
children: w,
|
|
16
|
+
defaultShow: I,
|
|
17
|
+
disabledAutoToggle: c,
|
|
18
|
+
focusStartIndex: u,
|
|
19
|
+
matchActivatorWidth: l = !0,
|
|
20
|
+
onActivated: O,
|
|
21
|
+
onDeactivated: g,
|
|
22
22
|
onNavigate: F,
|
|
23
23
|
show: E,
|
|
24
24
|
type: n
|
|
25
25
|
}, R) => {
|
|
26
|
-
const b =
|
|
27
|
-
defaultShow:
|
|
26
|
+
const b = p === "auto", f = _(null), r = B({
|
|
27
|
+
defaultShow: I,
|
|
28
28
|
show: E
|
|
29
|
-
}),
|
|
30
|
-
const e = [
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
apply({ rects:
|
|
29
|
+
}), A = P(() => {
|
|
30
|
+
const e = [q(5), y({ padding: 5 })];
|
|
31
|
+
return l && e.push(
|
|
32
|
+
U({
|
|
33
|
+
apply({ rects: s, availableHeight: t, elements: N }) {
|
|
34
34
|
requestAnimationFrame(() => {
|
|
35
|
-
Object.assign(
|
|
36
|
-
width: `${
|
|
37
|
-
maxHeight:
|
|
35
|
+
Object.assign(N.floating.style, {
|
|
36
|
+
width: `${s.reference.width}px`,
|
|
37
|
+
maxHeight: t > X ? `${t}px` : void 0
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
41
|
padding: 5
|
|
42
42
|
})
|
|
43
43
|
), e;
|
|
44
|
-
}, [
|
|
44
|
+
}, [l]), o = $({
|
|
45
45
|
open: r.show,
|
|
46
|
-
onOpenChange: (e,
|
|
47
|
-
r.setShow(e), e ?
|
|
46
|
+
onOpenChange: (e, s, t) => {
|
|
47
|
+
r.setShow(e), e ? O?.(s, t, i) : g?.(s, t, i);
|
|
48
48
|
},
|
|
49
|
-
middleware:
|
|
50
|
-
placement: b ? void 0 :
|
|
51
|
-
whileElementsMounted:
|
|
52
|
-
}),
|
|
53
|
-
enabled: !
|
|
49
|
+
middleware: A,
|
|
50
|
+
placement: b ? void 0 : p,
|
|
51
|
+
whileElementsMounted: z
|
|
52
|
+
}), C = D(o.context, {
|
|
53
|
+
enabled: !c,
|
|
54
54
|
escapeKey: !1
|
|
55
|
-
}),
|
|
55
|
+
}), M = G(o.context, {
|
|
56
56
|
role: n
|
|
57
|
-
}), { activeIndex: i, list:
|
|
57
|
+
}), { activeIndex: i, list: v, listNav: j, setActiveIndex: a } = J(
|
|
58
58
|
o.context,
|
|
59
59
|
n,
|
|
60
60
|
{
|
|
61
|
-
focusItemOnOpen:
|
|
61
|
+
focusItemOnOpen: h,
|
|
62
62
|
virtual: !0
|
|
63
63
|
},
|
|
64
64
|
F,
|
|
65
|
-
|
|
66
|
-
),
|
|
67
|
-
a(
|
|
68
|
-
}, [
|
|
65
|
+
u
|
|
66
|
+
), d = K([C, M, j]), m = L(), x = k(() => {
|
|
67
|
+
a(u ?? null);
|
|
68
|
+
}, [u, a]), H = P(
|
|
69
69
|
() => ({
|
|
70
|
-
...
|
|
70
|
+
...m,
|
|
71
71
|
...r,
|
|
72
72
|
activeIndex: i,
|
|
73
73
|
api: o,
|
|
74
|
-
disabledAutoToggle:
|
|
74
|
+
disabledAutoToggle: c,
|
|
75
75
|
getFocusableActivator: () => {
|
|
76
76
|
const e = o.elements.reference;
|
|
77
|
-
return
|
|
77
|
+
return e?.querySelector("[role=combobox]") ?? Y(e)[0];
|
|
78
78
|
},
|
|
79
|
-
getVirtualFocus: () =>
|
|
80
|
-
interactions:
|
|
81
|
-
list:
|
|
82
|
-
resetActiveIndex:
|
|
79
|
+
getVirtualFocus: () => f.current,
|
|
80
|
+
interactions: d,
|
|
81
|
+
list: v,
|
|
82
|
+
resetActiveIndex: x,
|
|
83
83
|
setActiveIndex: a,
|
|
84
|
-
setShowWithReason: (e,
|
|
85
|
-
setVirtualFocus: (e) =>
|
|
84
|
+
setShowWithReason: (e, s, t) => o.context.onOpenChange(e, s, t),
|
|
85
|
+
setVirtualFocus: (e) => f.current = e,
|
|
86
86
|
type: n
|
|
87
87
|
}),
|
|
88
88
|
[
|
|
89
89
|
i,
|
|
90
90
|
o,
|
|
91
|
+
m,
|
|
91
92
|
c,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
w,
|
|
93
|
+
d,
|
|
94
|
+
v,
|
|
95
|
+
x,
|
|
96
96
|
a,
|
|
97
97
|
r,
|
|
98
98
|
n
|
|
99
99
|
]
|
|
100
100
|
);
|
|
101
|
-
return
|
|
101
|
+
return W(R, o, m, r), /* @__PURE__ */ S(Q.Provider, { value: H, children: w });
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
|
-
|
|
104
|
+
Z.displayName = "InputPopoverProvider";
|
|
105
105
|
export {
|
|
106
|
-
|
|
106
|
+
Z as InputPopoverProvider
|
|
107
107
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as t, jsxs as C } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as I, useRef as W } from "react";
|
|
3
|
-
import { c as j } from "../../index-
|
|
3
|
+
import { c as j } from "../../index-cbHCAGLB.js";
|
|
4
4
|
import { PopoverType as R } from "./Popover.types.js";
|
|
5
5
|
import { FloatingUIAlign as S, GlobalCSSClass as b } from "../../enums.js";
|
|
6
6
|
import { idsLogger as k } from "../../helpers/utility/idsLogger.js";
|
|
7
7
|
import { propagateTestid as a } from "../../helpers/utility/propagateTestid.js";
|
|
8
|
-
import { s as E } from "../../Popover.module-
|
|
9
|
-
import { P as F } from "../../PopoverProvider-
|
|
8
|
+
import { s as E } from "../../Popover.module-ZU-08mVQ.js";
|
|
9
|
+
import { P as F } from "../../PopoverProvider-Cvg6ObBO.js";
|
|
10
10
|
import { PopoverActivator as G } from "./components/PopoverActivator.js";
|
|
11
11
|
import { PopoverContent as L } from "./components/PopoverContent.js";
|
|
12
12
|
import { composePopoverWidth as U } from "./helpers/composePopoverWidth.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "../../floating-ui.react-
|
|
3
|
+
import "../../floating-ui.react-DYBeYtOf.js";
|
|
4
4
|
import "./Popover.types.js";
|
|
5
5
|
import "./hooks/usePopoverState.js";
|
|
6
6
|
import "./hooks/usePopoverNavigation.js";
|
|
7
7
|
import "./hooks/usePopoverAria.js";
|
|
8
8
|
import "./hooks/usePopoverImperativeHandle.js";
|
|
9
9
|
import "../../helpers/dom/focusableElements.js";
|
|
10
|
-
import { a as d, P as f } from "../../PopoverProvider-
|
|
10
|
+
import { a as d, P as f } from "../../PopoverProvider-Cvg6ObBO.js";
|
|
11
11
|
import "../../helpers/dom/closestCrossShadow.js";
|
|
12
12
|
export {
|
|
13
13
|
d as PopoverContext,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { s as c } from "../../../Popover.module-
|
|
3
|
-
import { PopoverCssClass as
|
|
4
|
-
import { usePopover as
|
|
5
|
-
import { useRef as
|
|
6
|
-
import { focusableElements as
|
|
7
|
-
import { safeClosest as
|
|
8
|
-
import { usePopoverActivatorInteractions as
|
|
9
|
-
import { c as
|
|
10
|
-
const
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { s as c } from "../../../Popover.module-ZU-08mVQ.js";
|
|
3
|
+
import { PopoverCssClass as d } from "../Popover.types.js";
|
|
4
|
+
import { usePopover as p } from "../hooks/usePopover.js";
|
|
5
|
+
import { useRef as m, useMemo as v, useEffect as g } from "react";
|
|
6
|
+
import { focusableElements as A } from "../../../helpers/dom/focusableElements.js";
|
|
7
|
+
import { safeClosest as u } from "../../../helpers/dom/domUtils.js";
|
|
8
|
+
import { usePopoverActivatorInteractions as b } from "../hooks/usePopoverActivatorInteractions.js";
|
|
9
|
+
import { c as T } from "../../../index-cbHCAGLB.js";
|
|
10
|
+
const h = [
|
|
11
11
|
"aria-controls",
|
|
12
12
|
"aria-expanded",
|
|
13
13
|
"aria-haspopup",
|
|
@@ -15,73 +15,68 @@ const P = [
|
|
|
15
15
|
"id",
|
|
16
16
|
"role",
|
|
17
17
|
"tabindex"
|
|
18
|
-
],
|
|
19
|
-
const t =
|
|
20
|
-
t
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
25
|
-
children:
|
|
26
|
-
...
|
|
18
|
+
], x = (s, a) => {
|
|
19
|
+
const t = s.querySelector("[id]"), o = t?.getAttribute("id");
|
|
20
|
+
t?.removeAttribute("id"), h.forEach((r) => {
|
|
21
|
+
const i = s.getAttribute(r);
|
|
22
|
+
s.removeAttribute(r), i && a.setAttribute(r, i);
|
|
23
|
+
}), o && a.setAttribute("id", o);
|
|
24
|
+
}, q = ({
|
|
25
|
+
children: s,
|
|
26
|
+
...a
|
|
27
27
|
}) => {
|
|
28
|
-
const t =
|
|
28
|
+
const t = p(), o = m(null), r = s?.props, i = b(
|
|
29
29
|
t,
|
|
30
|
-
|
|
31
|
-
),
|
|
32
|
-
if (t
|
|
30
|
+
r
|
|
31
|
+
), f = v(() => {
|
|
32
|
+
if (t?.show)
|
|
33
33
|
return [
|
|
34
34
|
...t.getAriaControls(),
|
|
35
|
-
|
|
35
|
+
r["aria-controls"],
|
|
36
36
|
t.api.context.floatingId
|
|
37
37
|
].join(" ").trim();
|
|
38
|
-
}, [
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"aria-activedescendant"
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
), a.current.setAttribute(
|
|
38
|
+
}, [r, t]);
|
|
39
|
+
return g(() => {
|
|
40
|
+
!o.current || !t?.getVirtualFocus || t.activeIndex === null || (setTimeout(
|
|
41
|
+
() => t?.api.refs.domReference.current?.removeAttribute(
|
|
42
|
+
"aria-activedescendant"
|
|
43
|
+
)
|
|
44
|
+
), o.current.setAttribute(
|
|
49
45
|
"aria-activedescendant",
|
|
50
|
-
|
|
46
|
+
t.list.current?.[t.activeIndex]?.id ?? ""
|
|
51
47
|
));
|
|
52
|
-
}, [t]), /* @__PURE__ */
|
|
48
|
+
}, [t]), /* @__PURE__ */ l(
|
|
53
49
|
"div",
|
|
54
50
|
{
|
|
55
|
-
...
|
|
56
|
-
className:
|
|
57
|
-
[
|
|
51
|
+
...a,
|
|
52
|
+
className: T(c.activator, {
|
|
53
|
+
[d.Active]: t?.show
|
|
58
54
|
}),
|
|
59
|
-
...t
|
|
60
|
-
...
|
|
61
|
-
"aria-controls":
|
|
62
|
-
role:
|
|
63
|
-
ref: (
|
|
64
|
-
if (!
|
|
65
|
-
t
|
|
66
|
-
const
|
|
67
|
-
|
|
55
|
+
...t?.interactions.getReferenceProps({
|
|
56
|
+
...i,
|
|
57
|
+
"aria-controls": f,
|
|
58
|
+
role: r.role,
|
|
59
|
+
ref: (e) => {
|
|
60
|
+
if (!e) return;
|
|
61
|
+
t?.api.refs.setReference(e);
|
|
62
|
+
const n = e?.querySelector("[role=combobox]") ?? A(e)[0];
|
|
63
|
+
n && (o.current = n, x(e, n));
|
|
68
64
|
},
|
|
69
|
-
onBlur: (
|
|
70
|
-
|
|
65
|
+
onBlur: (e) => {
|
|
66
|
+
e.relatedTarget instanceof Element && u(e.relatedTarget, `.${c.content}`) && (e.preventDefault(), e.stopPropagation());
|
|
71
67
|
},
|
|
72
|
-
onFocus: (
|
|
73
|
-
t
|
|
74
|
-
|
|
75
|
-
(e = a.current) == null || e.focus();
|
|
68
|
+
onFocus: (e) => {
|
|
69
|
+
t?.disabledAutoToggle || e.relatedTarget instanceof Element && (e.relatedTarget.hasAttribute("data-floating-ui-focus-guard") || u(e.relatedTarget, `.${c.content}`)) && t.show && (setTimeout(() => {
|
|
70
|
+
o.current?.focus();
|
|
76
71
|
}), setTimeout(() => {
|
|
77
|
-
t.setShowWithReason(!1,
|
|
72
|
+
t.setShowWithReason(!1, e.nativeEvent, "focus");
|
|
78
73
|
}, 300));
|
|
79
74
|
}
|
|
80
75
|
}),
|
|
81
|
-
children:
|
|
76
|
+
children: s
|
|
82
77
|
}
|
|
83
78
|
);
|
|
84
79
|
};
|
|
85
80
|
export {
|
|
86
|
-
|
|
81
|
+
q as PopoverActivator
|
|
87
82
|
};
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c } from "../../../index-
|
|
3
|
-
import { s as
|
|
4
|
-
import { usePopover as
|
|
5
|
-
import { b as
|
|
6
|
-
import { composePopoverFloatingProps as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../../index-cbHCAGLB.js";
|
|
3
|
+
import { s as p } from "../../../Popover.module-ZU-08mVQ.js";
|
|
4
|
+
import { usePopover as u } from "../hooks/usePopover.js";
|
|
5
|
+
import { b as g, F, c as h, d as i, e as P, f as v, g as I } from "../../../floating-ui.react-DYBeYtOf.js";
|
|
6
|
+
import { composePopoverFloatingProps as N } from "../helpers/composeFloatingProps.js";
|
|
7
7
|
const l = ({
|
|
8
|
-
children:
|
|
9
|
-
className:
|
|
10
|
-
displayMode:
|
|
8
|
+
children: e,
|
|
9
|
+
className: r,
|
|
10
|
+
displayMode: n,
|
|
11
11
|
style: s,
|
|
12
12
|
virtualFocus: a,
|
|
13
|
-
...
|
|
13
|
+
...m
|
|
14
14
|
}) => {
|
|
15
|
-
const t =
|
|
15
|
+
const t = u();
|
|
16
16
|
if (!t) return null;
|
|
17
|
-
const
|
|
17
|
+
const f = N(
|
|
18
18
|
t,
|
|
19
|
-
|
|
19
|
+
n,
|
|
20
20
|
s
|
|
21
21
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
22
|
+
return /* @__PURE__ */ o(v, { elementsRef: t.list, children: /* @__PURE__ */ o(
|
|
23
|
+
I,
|
|
24
24
|
{
|
|
25
25
|
context: t.api.context,
|
|
26
26
|
initialFocus: a ? -1 : 0,
|
|
27
27
|
modal: !1,
|
|
28
|
-
disabled: !
|
|
28
|
+
disabled: !t?.show,
|
|
29
29
|
returnFocus: !a,
|
|
30
|
-
children: /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ o(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
|
+
...m,
|
|
34
|
+
className: c(r, p.content),
|
|
35
|
+
hidden: !t?.show,
|
|
36
|
+
ref: t?.api.refs.setFloating,
|
|
33
37
|
...f,
|
|
34
|
-
|
|
35
|
-
hidden: !(t != null && t.show),
|
|
36
|
-
ref: t == null ? void 0 : t.api.refs.setFloating,
|
|
37
|
-
...u,
|
|
38
|
-
children: n
|
|
38
|
+
children: e
|
|
39
39
|
}
|
|
40
40
|
)
|
|
41
41
|
}
|
|
42
42
|
) });
|
|
43
43
|
}, d = ({
|
|
44
|
-
className:
|
|
45
|
-
container:
|
|
46
|
-
...
|
|
44
|
+
className: e,
|
|
45
|
+
container: r,
|
|
46
|
+
...n
|
|
47
47
|
}) => {
|
|
48
|
-
const s =
|
|
49
|
-
return
|
|
48
|
+
const s = h();
|
|
49
|
+
return r ? /* @__PURE__ */ o(i, { id: s, children: /* @__PURE__ */ o(P, { root: r, preserveTabOrder: !0, children: /* @__PURE__ */ o(
|
|
50
50
|
l,
|
|
51
51
|
{
|
|
52
|
-
...
|
|
53
|
-
className: c(
|
|
52
|
+
...n,
|
|
53
|
+
className: c(e, p.portal)
|
|
54
54
|
}
|
|
55
|
-
) }) }) : /* @__PURE__ */
|
|
56
|
-
}, y = (
|
|
55
|
+
) }) }) : /* @__PURE__ */ o(i, { id: s, children: /* @__PURE__ */ o(l, { ...n, className: e }) });
|
|
56
|
+
}, y = (e) => g() === null ? /* @__PURE__ */ o(F, { children: /* @__PURE__ */ o(d, { ...e }) }) : /* @__PURE__ */ o(d, { ...e });
|
|
57
57
|
export {
|
|
58
58
|
y as PopoverContent
|
|
59
59
|
};
|
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
import { getActiveElement as
|
|
2
|
-
import { handlePopoverTabKey as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
const s = t != null && t.hasInnerRole() || t == null ? void 0 : t.type, g = s && ["listbox", "menu", "tree"].includes(s), m = s && ["application", "combobox", "composite", "group"].includes(s), f = e === "inline", y = () => {
|
|
1
|
+
import { getActiveElement as f } from "../../../helpers/dom/getActiveElement.js";
|
|
2
|
+
import { handlePopoverTabKey as m } from "./handlePopoverTabKey.js";
|
|
3
|
+
const x = (t, e, o) => {
|
|
4
|
+
const i = t?.hasInnerRole() ? void 0 : t?.type, c = i && ["listbox", "menu", "tree"].includes(i), l = i && ["application", "combobox", "composite", "group"].includes(i), r = e === "inline", u = () => {
|
|
6
5
|
setTimeout(() => {
|
|
7
|
-
|
|
8
|
-
h() === t.api.elements.floating && !t.getVirtualFocus && ((a = (i = t.list.current) == null ? void 0 : i[0]) == null || a.focus());
|
|
6
|
+
f() === t.api.elements.floating && !t.getVirtualFocus && t.list.current?.[0]?.focus();
|
|
9
7
|
});
|
|
10
|
-
},
|
|
11
|
-
var l, u;
|
|
8
|
+
}, d = (n) => {
|
|
12
9
|
const a = t.getVirtualFocus !== void 0;
|
|
13
|
-
if (
|
|
14
|
-
const
|
|
15
|
-
|
|
10
|
+
if (n.key === "Tab" && m(t, n), n.key === "PageUp" && !a && t.list.current[0]?.focus(), n.key === "PageDown" && !a) {
|
|
11
|
+
const g = Math.max(t?.list.current.length - 1, 0);
|
|
12
|
+
t.list.current[g]?.focus();
|
|
16
13
|
}
|
|
17
|
-
t.disabledAutoToggle ||
|
|
18
|
-
},
|
|
19
|
-
onFocus:
|
|
20
|
-
onKeyDown:
|
|
14
|
+
t.disabledAutoToggle || y(t, n);
|
|
15
|
+
}, s = t.interactions.getFloatingProps({
|
|
16
|
+
onFocus: u,
|
|
17
|
+
onKeyDown: d
|
|
21
18
|
});
|
|
22
19
|
return {
|
|
23
|
-
...
|
|
24
|
-
"aria-activedescendant":
|
|
25
|
-
"aria-orientation":
|
|
26
|
-
role:
|
|
20
|
+
...s,
|
|
21
|
+
"aria-activedescendant": l ? s?.["aria-activedescendant"] : void 0,
|
|
22
|
+
"aria-orientation": c ? s?.["aria-orientation"] : void 0,
|
|
23
|
+
role: i,
|
|
27
24
|
style: {
|
|
28
|
-
...
|
|
29
|
-
...
|
|
25
|
+
...o,
|
|
26
|
+
...r ? {} : t?.api?.floatingStyles
|
|
30
27
|
}
|
|
31
28
|
};
|
|
32
|
-
},
|
|
29
|
+
}, y = (t, e) => {
|
|
33
30
|
t.type !== "listbox" || e.key !== "ArrowUp" || t.activeIndex !== 0 || t.setShowWithReason(!1, e.nativeEvent, "list-navigation");
|
|
34
31
|
};
|
|
35
32
|
export {
|
|
36
|
-
|
|
33
|
+
x as composePopoverFloatingProps
|
|
37
34
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as f } from "../../../index.esm-
|
|
2
|
-
import { s as c } from "../../../Popover.module-
|
|
1
|
+
import { t as f } from "../../../index.esm-CL8gh5wr.js";
|
|
2
|
+
import { s as c } from "../../../Popover.module-ZU-08mVQ.js";
|
|
3
3
|
import { FOCUSABLE_QUERY_SELECTOR as l } from "../../../constants.js";
|
|
4
4
|
import { focusableElements as m } from "../../../helpers/dom/focusableElements.js";
|
|
5
5
|
import { waitUntilTrue as u } from "./waitUntilTrue.js";
|