@iress-oss/ids-components 0.0.1-dev.2 → 0.0.1-dev.20
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/{AutocompleteNoResults-ImNh0dmJ.js → AutocompleteNoResults-CogA3XZs.js} +1 -1
- package/dist/{ComboboxHiddenInput-BVhoQtv3.js → ComboboxHiddenInput-gTOjjF3f.js} +5 -5
- package/dist/{FieldAppendToLabel-CY2e0YuF.js → FieldAppendToLabel-DCv5E5th.js} +13 -11
- package/dist/{InputBase-LsLk3nX1.js → InputBase-BFK9n82f.js} +1 -1
- package/dist/Loading.module-g2pe-Gfx.js +13 -0
- package/dist/LoadingSuspense-BwlrIicY.js +5773 -0
- package/dist/LogoFromSrc-BnImWqt6.js +59 -0
- package/dist/MenuItem.module-BxcFZeSh.js +24 -0
- package/dist/Popover.module-BKrF_xRW.js +11 -0
- package/dist/PopoverProvider-d3hhpW2k.js +142 -0
- package/dist/{SelectControl-BJo08wJN.js → SelectControl-D1SJlplM.js} +1 -1
- package/dist/SlideoutProvider-CQh140HM.js +200 -0
- package/dist/{SliderTicks-MkaJGb9A.js → SliderTicks-DQN0Ka4d.js} +1 -1
- package/dist/TabSet.module-FRUnHgA1.js +13 -0
- package/dist/Table.module-r-RfIeLI.js +32 -0
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +8 -6
- package/dist/components/Autocomplete/components/AutocompleteInstructions.js +12 -0
- package/dist/components/Autocomplete/components/AutocompleteNoResults.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +160 -95
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/Badge/Badge.js +4 -4
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/CloseButton/CloseButton.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +6 -6
- package/dist/components/CheckboxMark/CheckboxMark.types.js +2 -2
- package/dist/components/Combobox/Combobox.js +7 -5
- package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +7 -5
- package/dist/components/Combobox/components/ComboboxHiddenInput.js +1 -1
- package/dist/components/Combobox/components/ComboboxResults.js +8 -6
- package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +6 -4
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/Expander/Expander.js +1 -1
- package/dist/components/Field/Field.js +1 -1
- package/dist/components/Field/FieldGroup/FieldGroup.js +2 -2
- package/dist/components/Field/components/FieldAppendToLabel.js +7 -5
- package/dist/components/Filter/Filter.js +7 -5
- package/dist/components/Filter/components/FilterResetButton.js +6 -4
- package/dist/components/Filter/components/FilterSearch.js +6 -4
- package/dist/components/Filter/index.js +1 -1
- package/dist/components/Form/Form.js +1 -1
- package/dist/components/Form/FormField/FormField.js +45 -39
- package/dist/components/Form/FormField/FormFieldset.js +13 -11
- package/dist/components/Form/HookForm/HookForm.js +1 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Hide/Hide.js +1 -1
- package/dist/components/Hide/helpers/composeHideClasses.js +7 -5
- package/dist/components/Hide/index.js +1 -1
- package/dist/components/Icon/Icon.js +6 -4
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Inline/Inline.js +6 -4
- package/dist/components/Inline/index.js +1 -1
- package/dist/components/Input/ClearButton/ClearButton.js +1 -1
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/InputBase/InputBase.js +1 -1
- 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 +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuDivider/MenuDivider.js +6 -4
- package/dist/components/Menu/MenuHeading/MenuHeading.js +2 -2
- package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
- package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +1 -1
- package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +2 -2
- package/dist/components/Menu/MenuItem/hooks/useMenuItemInteractions.js +41 -41
- package/dist/components/Menu/MenuText/MenuText.js +7 -5
- package/dist/components/Menu/helpers/mapMenuItems.js +1 -1
- package/dist/components/Menu/hooks/useMenuStyles.js +3 -3
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/hooks/useModal.js +17 -14
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Navbar/Navbar.js +2 -2
- 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 +2 -2
- package/dist/components/Navbar/index.js +1 -1
- package/dist/components/Placeholder/Placeholder.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopover.js +36 -34
- package/dist/components/Popover/InputPopover/InputPopoverActivator.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopoverProvider.js +72 -66
- package/dist/components/Popover/Popover.js +32 -30
- package/dist/components/Popover/PopoverProvider.js +13 -111
- package/dist/components/Popover/components/NestedPopoverActivator.js +9 -0
- package/dist/components/Popover/components/PopoverActivator.js +40 -41
- package/dist/components/Popover/components/PopoverContent.js +15 -15
- package/dist/components/Popover/helpers/composeFloatingProps.js +26 -22
- package/dist/components/Popover/helpers/handlePopoverTabKey.js +16 -13
- package/dist/components/Popover/helpers/waitUntilTrue.js +12 -0
- package/dist/components/Popover/hooks/usePopover.js +1 -1
- package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +25 -17
- package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
- package/dist/components/Popover/hooks/usePopoverNavigation.js +1 -1
- package/dist/components/Progress/Progress.js +1 -1
- package/dist/components/Provider/Provider.js +38 -0
- package/dist/components/Provider/index.js +4 -0
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/Radio/helpers/mapRadioGroupOptions.js +1 -1
- package/dist/components/Radio/index.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/Readonly/Readonly.js +7 -5
- package/dist/components/Readonly/index.js +1 -1
- package/dist/components/RichSelect/RichSelect.js +6 -4
- package/dist/components/RichSelect/SelectBody/SelectBody.js +7 -5
- package/dist/components/RichSelect/SelectCreate/SelectCreate.js +11 -9
- package/dist/components/RichSelect/SelectHeading/SelectHeading.js +6 -4
- package/dist/components/RichSelect/SelectLabel/SelectLabel.js +1 -1
- package/dist/components/RichSelect/SelectMenu/SelectMenu.js +6 -4
- package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +6 -4
- package/dist/components/RichSelect/SelectSearch/SelectSearch.js +5 -3
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +1 -1
- package/dist/components/RichSelect/SelectTags/SelectTags.js +5 -3
- package/dist/components/RichSelect/components/SelectActivator.js +1 -1
- package/dist/components/RichSelect/components/SelectOptions.js +6 -4
- package/dist/components/RichSelect/index.js +1 -1
- package/dist/components/Row/Row.js +6 -4
- package/dist/components/Row/index.js +1 -1
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/components/SelectControl.js +1 -1
- package/dist/components/Select/components/SelectReadonly.js +6 -4
- package/dist/components/Select/helpers/mapSelectOptions.js +1 -1
- package/dist/components/Select/helpers/nodesToSelectOptions.js +3 -3
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Skeleton/Skeleton.js +2 -2
- package/dist/components/SkipLink/SkipLink.js +1 -1
- package/dist/components/Slideout/Slideout.js +5 -3
- package/dist/components/Slideout/SlideoutProvider.js +6 -89
- package/dist/components/Slideout/components/SlideoutInner.js +3 -2
- package/dist/components/Slideout/hooks/useIDSProvidedSlideout.js +1 -1
- package/dist/components/Slideout/hooks/useSlideout.js +17 -14
- package/dist/components/Slideout/index.js +7 -7
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/components/SliderTicks.js +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/TabSet/Tab/Tab.js +74 -62
- package/dist/components/TabSet/TabSet.js +2 -2
- package/dist/components/TabSet/components/TabSetItem.js +2 -2
- package/dist/components/Table/Table.js +4 -3
- package/dist/components/Table/TableBody/TableBody.js +2 -2
- package/dist/components/Table/TableProvider.js +29 -25
- package/dist/components/Table/components/TableEmpty.js +1 -1
- package/dist/components/Table/components/TableHeader.js +2 -2
- package/dist/components/Table/components/TableHeaderCell.js +2 -2
- package/dist/components/Table/components/TableRows.js +1 -1
- package/dist/components/Table/components/TableSortButton.js +2 -2
- package/dist/components/Table/helpers/composeIDSTableColumnDefs.js +5 -5
- package/dist/components/Table/hooks/useIDSTableColumnStyles.js +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/TagInput/TagInput.js +1 -1
- package/dist/components/Tag/components/TagListInput/TagListInput.js +1 -1
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/Toaster/Toast/Toast.js +1 -1
- package/dist/components/Toaster/Toast/ToastAnimated.js +2 -2
- 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 +24 -3
- package/dist/components/Toaster/index.js +11 -10
- package/dist/components/Toggle/Toggle.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +18 -18
- package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +1 -1
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +1 -1
- package/dist/constants.js +11 -11
- package/dist/{floating-ui.react-D_ysmiM3.js → floating-ui.react-nmA48tb2.js} +1055 -1034
- package/dist/helpers/dom/closestCrossShadow.js +26 -0
- package/dist/helpers/dom/domUtils.js +12 -0
- package/dist/helpers/formatting/formatDateTime.js +21 -16
- package/dist/helpers/label-value/highlightQueryInLabelValue.js +6 -5
- package/dist/{index-CmsyHM_3.js → index-BQfnxwrU.js} +2 -2
- package/dist/{index-CtOScEKX.js → index-Dms7F5NM.js} +8 -8
- package/dist/main.js +185 -181
- package/dist/patterns/Loading/Loading.js +1 -1
- package/dist/patterns/Loading/LoadingSuspense.js +5 -49
- package/dist/patterns/Loading/components/ComponentLoading.js +2 -2
- package/dist/patterns/Loading/components/DefaultLoading.js +2 -2
- package/dist/patterns/Loading/components/LongLoading.js +2 -2
- package/dist/patterns/Loading/components/PageLoading.js +2 -2
- package/dist/patterns/Loading/components/StartUpLoading.js +2 -2
- package/dist/patterns/Loading/components/ValidateLoading.js +2 -2
- package/dist/patterns/Loading/index.js +3 -2
- package/dist/src/components/Autocomplete/Autocomplete.types.d.ts +38 -0
- package/dist/src/components/Autocomplete/components/AutocompleteInstructions.d.ts +2 -0
- package/dist/src/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +5 -1
- package/dist/src/components/Form/Form.types.d.ts +10 -1
- package/dist/src/components/Form/FormField/FormField.d.ts +1 -1
- package/dist/src/components/Form/FormField/FormField.types.d.ts +8 -2
- package/dist/src/components/Modal/Modal.types.d.ts +4 -0
- package/dist/src/components/Popover/Popover.types.d.ts +3 -1
- package/dist/src/components/Popover/components/NestedPopoverActivator.d.ts +5 -0
- package/dist/src/components/Popover/helpers/handlePopoverTabKey.d.ts +1 -1
- package/dist/src/components/Popover/helpers/waitUntilTrue.d.ts +1 -0
- package/dist/src/components/Provider/Provider.d.ts +20 -0
- package/dist/src/components/Provider/index.d.ts +1 -0
- package/dist/src/components/RichSelect/RichSelect.types.d.ts +27 -1
- package/dist/src/components/RichSelect/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/dist/src/components/RichSelect/components/SelectOptions.d.ts +4 -2
- package/dist/src/components/Slideout/Slideout.types.d.ts +5 -1
- package/dist/src/components/Table/Table.d.ts +7 -6
- package/dist/src/components/Table/Table.types.d.ts +10 -1
- package/dist/src/components/Table/TableProvider.d.ts +5 -2
- package/dist/src/components/Toaster/Toast/Toast.types.d.ts +2 -1
- package/dist/src/components/Toaster/ToasterProvider.d.ts +5 -2
- package/dist/src/components/Toaster/hooks/useToaster.d.ts +3 -3
- package/dist/src/constants.d.ts +7 -7
- package/dist/src/helpers/dom/closestCrossShadow.d.ts +9 -0
- package/dist/src/helpers/dom/domUtils.d.ts +5 -0
- package/dist/src/interfaces.d.ts +1 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/patterns/Loading/LoadingSuspense.d.ts +1 -2
- package/dist/src/patterns/Loading/components/PageLoading.d.ts +3 -3
- package/dist/src/patterns/Loading/hooks/useShouldRenderLoading.d.ts +1 -0
- package/dist/src/patterns/Loading/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/{useIDSButtonGroupItem-Y0ZSkNW8.js → useIDSButtonGroupItem-VfKx4O-O.js} +1 -1
- package/dist/vitest.config.d.ts +2 -0
- package/package.json +16 -28
- package/dist/Loading-rKDsRTjZ.js +0 -5638
- package/dist/Loading.module-C58kTwE4.js +0 -13
- package/dist/LogoFromSrc-KxC2Gztm.js +0 -59
- package/dist/MenuItem.module-3aqP1ZMw.js +0 -24
- package/dist/Popover.module-CLIdWyZD.js +0 -11
- package/dist/TabSet.module-DGDICWMf.js +0 -13
- package/dist/Table.module-Co33h7CZ.js +0 -32
- package/dist/components/Autocomplete/hooks/useAutocompleteFlags.js +0 -16
- package/dist/src/components/Autocomplete/hooks/useAutocompleteFlags.d.ts +0 -5
- /package/dist/{setupTests.d.ts → vitest.setup.d.ts} +0 -0
|
@@ -1,101 +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 {
|
|
9
|
-
import { usePopoverImperativeHandle as
|
|
10
|
-
import { focusableElements as
|
|
11
|
-
const
|
|
1
|
+
import { jsx as V } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as _, useRef as k, useMemo as d, useCallback as q } from "react";
|
|
3
|
+
import { o as y, h as U, s as $, i as z, j as G, k as K, l as X, m as A } from "../../../floating-ui.react-nmA48tb2.js";
|
|
4
|
+
import { POPOVER_USE_MAX_HEIGHT as B } from "../Popover.types.js";
|
|
5
|
+
import { usePopoverState as J } from "../hooks/usePopoverState.js";
|
|
6
|
+
import { usePopoverNavigation as L } from "../hooks/usePopoverNavigation.js";
|
|
7
|
+
import { usePopoverAria as Q } from "../hooks/usePopoverAria.js";
|
|
8
|
+
import { a as W } from "../../../PopoverProvider-d3hhpW2k.js";
|
|
9
|
+
import { usePopoverImperativeHandle as Y } from "../hooks/usePopoverImperativeHandle.js";
|
|
10
|
+
import { focusableElements as Z } from "../../../helpers/dom/focusableElements.js";
|
|
11
|
+
const T = _(
|
|
12
12
|
({
|
|
13
|
-
align:
|
|
14
|
-
autoHighlight:
|
|
15
|
-
children:
|
|
16
|
-
defaultShow:
|
|
13
|
+
align: f,
|
|
14
|
+
autoHighlight: I,
|
|
15
|
+
children: O,
|
|
16
|
+
defaultShow: g,
|
|
17
17
|
disabledAutoToggle: u,
|
|
18
|
-
focusStartIndex:
|
|
19
|
-
matchActivatorWidth:
|
|
20
|
-
onActivated:
|
|
21
|
-
onDeactivated:
|
|
22
|
-
onNavigate:
|
|
23
|
-
show:
|
|
18
|
+
focusStartIndex: m,
|
|
19
|
+
matchActivatorWidth: x = !0,
|
|
20
|
+
onActivated: p,
|
|
21
|
+
onDeactivated: l,
|
|
22
|
+
onNavigate: F,
|
|
23
|
+
show: E,
|
|
24
24
|
type: n
|
|
25
|
-
},
|
|
26
|
-
const
|
|
27
|
-
defaultShow:
|
|
28
|
-
show:
|
|
29
|
-
}),
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
apply({ rects:
|
|
25
|
+
}, R) => {
|
|
26
|
+
const b = f === "auto", v = k(null), r = J({
|
|
27
|
+
defaultShow: g,
|
|
28
|
+
show: E
|
|
29
|
+
}), C = d(() => {
|
|
30
|
+
const e = [y(5), U({ padding: 5 })];
|
|
31
|
+
return x && e.push(
|
|
32
|
+
$({
|
|
33
|
+
apply({ rects: t, availableHeight: s, elements: S }) {
|
|
34
34
|
requestAnimationFrame(() => {
|
|
35
|
-
Object.assign(
|
|
36
|
-
width: `${
|
|
37
|
-
maxHeight: s >
|
|
35
|
+
Object.assign(S.floating.style, {
|
|
36
|
+
width: `${t.reference.width}px`,
|
|
37
|
+
maxHeight: s > B ? `${s}px` : void 0
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
41
|
padding: 5
|
|
42
42
|
})
|
|
43
|
-
),
|
|
44
|
-
}, [
|
|
45
|
-
open:
|
|
46
|
-
onOpenChange: (
|
|
47
|
-
|
|
43
|
+
), e;
|
|
44
|
+
}, [x]), o = z({
|
|
45
|
+
open: r.show,
|
|
46
|
+
onOpenChange: (e, t, s) => {
|
|
47
|
+
r.setShow(e), e ? p == null || p(t, s, i) : l == null || l(t, s, i);
|
|
48
48
|
},
|
|
49
|
-
middleware:
|
|
50
|
-
placement:
|
|
51
|
-
whileElementsMounted:
|
|
52
|
-
}),
|
|
49
|
+
middleware: C,
|
|
50
|
+
placement: b ? void 0 : f,
|
|
51
|
+
whileElementsMounted: G
|
|
52
|
+
}), M = K(o.context, {
|
|
53
53
|
enabled: !u,
|
|
54
54
|
escapeKey: !1
|
|
55
|
-
}),
|
|
55
|
+
}), j = X(o.context, {
|
|
56
56
|
role: n
|
|
57
|
-
}), { activeIndex: i, list:
|
|
58
|
-
|
|
57
|
+
}), { activeIndex: i, list: P, listNav: H, setActiveIndex: a } = L(
|
|
58
|
+
o.context,
|
|
59
59
|
n,
|
|
60
60
|
{
|
|
61
|
-
focusItemOnOpen:
|
|
61
|
+
focusItemOnOpen: I,
|
|
62
62
|
virtual: !0
|
|
63
63
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
),
|
|
64
|
+
F,
|
|
65
|
+
m
|
|
66
|
+
), h = A([M, j, H]), c = Q(), w = q(() => {
|
|
67
|
+
a(m ?? null);
|
|
68
|
+
}, [m, a]), N = d(
|
|
67
69
|
() => ({
|
|
68
|
-
...
|
|
69
|
-
...
|
|
70
|
+
...c,
|
|
71
|
+
...r,
|
|
70
72
|
activeIndex: i,
|
|
71
|
-
api:
|
|
73
|
+
api: o,
|
|
72
74
|
disabledAutoToggle: u,
|
|
73
75
|
getFocusableActivator: () => {
|
|
74
|
-
const
|
|
75
|
-
return (
|
|
76
|
+
const e = o.elements.reference;
|
|
77
|
+
return (e == null ? void 0 : e.querySelector("[role=combobox]")) ?? Z(e)[0];
|
|
76
78
|
},
|
|
77
|
-
getVirtualFocus: () =>
|
|
78
|
-
interactions:
|
|
79
|
-
list:
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
getVirtualFocus: () => v.current,
|
|
80
|
+
interactions: h,
|
|
81
|
+
list: P,
|
|
82
|
+
resetActiveIndex: w,
|
|
83
|
+
setActiveIndex: a,
|
|
84
|
+
setShowWithReason: (e, t, s) => o.context.onOpenChange(e, t, s),
|
|
85
|
+
setVirtualFocus: (e) => v.current = e,
|
|
82
86
|
type: n
|
|
83
87
|
}),
|
|
84
88
|
[
|
|
85
89
|
i,
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
o,
|
|
91
|
+
c,
|
|
88
92
|
u,
|
|
93
|
+
h,
|
|
89
94
|
P,
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
w,
|
|
96
|
+
a,
|
|
97
|
+
r,
|
|
92
98
|
n
|
|
93
99
|
]
|
|
94
100
|
);
|
|
95
|
-
return
|
|
101
|
+
return Y(R, o, c, r), /* @__PURE__ */ V(W.Provider, { value: N, children: O });
|
|
96
102
|
}
|
|
97
103
|
);
|
|
98
|
-
|
|
104
|
+
T.displayName = "InputPopoverProvider";
|
|
99
105
|
export {
|
|
100
|
-
|
|
106
|
+
T as InputPopoverProvider
|
|
101
107
|
};
|
|
@@ -1,77 +1,79 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as t, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as I, useRef as W } from "react";
|
|
3
3
|
import { c as j } from "../../index-2QXL0WYc.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 {
|
|
8
|
+
import { s as E } from "../../Popover.module-BKrF_xRW.js";
|
|
9
|
+
import { P as F } from "../../PopoverProvider-d3hhpW2k.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";
|
|
13
|
-
|
|
13
|
+
import { usePopover as q } from "./hooks/usePopover.js";
|
|
14
|
+
import { NestedPopoverActivator as z } from "./components/NestedPopoverActivator.js";
|
|
15
|
+
const B = ({
|
|
14
16
|
activator: p,
|
|
15
17
|
align: d = "auto",
|
|
16
18
|
children: n,
|
|
17
|
-
className:
|
|
18
|
-
container:
|
|
19
|
-
contentClassName:
|
|
20
|
-
defaultShow:
|
|
19
|
+
className: c,
|
|
20
|
+
container: l,
|
|
21
|
+
contentClassName: v,
|
|
22
|
+
defaultShow: f,
|
|
21
23
|
disabledAutoToggle: h,
|
|
22
24
|
displayMode: e = "overlay",
|
|
23
|
-
focusStartIndex:
|
|
24
|
-
matchActivatorWidth:
|
|
25
|
+
focusStartIndex: P,
|
|
26
|
+
matchActivatorWidth: g,
|
|
25
27
|
onActivated: y,
|
|
26
28
|
onDeactivated: A,
|
|
27
|
-
onNavigate:
|
|
28
|
-
type:
|
|
29
|
-
show:
|
|
29
|
+
onNavigate: u,
|
|
30
|
+
type: x,
|
|
31
|
+
show: N,
|
|
30
32
|
width: r,
|
|
31
33
|
virtualFocus: i,
|
|
32
34
|
...o
|
|
33
|
-
},
|
|
34
|
-
const
|
|
35
|
+
}, T) => {
|
|
36
|
+
const w = W(null), s = g && e === "overlay";
|
|
35
37
|
return r !== void 0 && k(
|
|
36
38
|
"IressPopover: The width prop is deprecated. Please use the --iress-width and --iress-max-width design token instead."
|
|
37
39
|
), /* @__PURE__ */ t(
|
|
38
40
|
F,
|
|
39
41
|
{
|
|
40
42
|
align: d,
|
|
41
|
-
defaultShow:
|
|
43
|
+
defaultShow: f,
|
|
42
44
|
disabledAutoToggle: h,
|
|
43
|
-
focusStartIndex:
|
|
45
|
+
focusStartIndex: P,
|
|
44
46
|
matchActivatorWidth: s,
|
|
45
47
|
onActivated: y,
|
|
46
48
|
onDeactivated: A,
|
|
47
|
-
onNavigate:
|
|
48
|
-
ref:
|
|
49
|
-
show:
|
|
50
|
-
type:
|
|
49
|
+
onNavigate: u,
|
|
50
|
+
ref: T,
|
|
51
|
+
show: N,
|
|
52
|
+
type: x,
|
|
51
53
|
virtualFocus: i,
|
|
52
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ C(
|
|
53
55
|
"div",
|
|
54
56
|
{
|
|
55
57
|
...o,
|
|
56
58
|
className: j(
|
|
57
|
-
|
|
59
|
+
c,
|
|
58
60
|
b.FormElement,
|
|
59
61
|
E.popover
|
|
60
62
|
),
|
|
61
|
-
ref:
|
|
63
|
+
ref: w,
|
|
62
64
|
children: [
|
|
63
|
-
/* @__PURE__ */ t(
|
|
65
|
+
/* @__PURE__ */ t(z, { parentPopover: q(), children: /* @__PURE__ */ t(
|
|
64
66
|
G,
|
|
65
67
|
{
|
|
66
68
|
"data-testid": a(o["data-testid"], "activator"),
|
|
67
69
|
children: p
|
|
68
70
|
}
|
|
69
|
-
),
|
|
71
|
+
) }),
|
|
70
72
|
/* @__PURE__ */ t(
|
|
71
73
|
L,
|
|
72
74
|
{
|
|
73
|
-
className:
|
|
74
|
-
container:
|
|
75
|
+
className: v,
|
|
76
|
+
container: l,
|
|
75
77
|
"data-testid": a(o["data-testid"], "content"),
|
|
76
78
|
displayMode: e,
|
|
77
79
|
style: {
|
|
@@ -87,7 +89,7 @@ const q = ({
|
|
|
87
89
|
)
|
|
88
90
|
}
|
|
89
91
|
);
|
|
90
|
-
}, m =
|
|
92
|
+
}, m = I(B);
|
|
91
93
|
m.Align = S;
|
|
92
94
|
m.Type = R;
|
|
93
95
|
export {
|
|
@@ -1,113 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
), oe = k(
|
|
13
|
-
({
|
|
14
|
-
align: x,
|
|
15
|
-
children: C,
|
|
16
|
-
defaultShow: E,
|
|
17
|
-
disabledAutoToggle: n,
|
|
18
|
-
focusStartIndex: I,
|
|
19
|
-
matchActivatorWidth: P,
|
|
20
|
-
onActivated: c,
|
|
21
|
-
onDeactivated: m,
|
|
22
|
-
onNavigate: R,
|
|
23
|
-
type: i,
|
|
24
|
-
show: S,
|
|
25
|
-
virtualFocus: u
|
|
26
|
-
}, b) => {
|
|
27
|
-
const p = x === "auto", h = q(null), r = Y({
|
|
28
|
-
defaultShow: E,
|
|
29
|
-
show: S
|
|
30
|
-
}), g = f(() => {
|
|
31
|
-
const e = [
|
|
32
|
-
U(5),
|
|
33
|
-
p ? $() : y(),
|
|
34
|
-
z()
|
|
35
|
-
];
|
|
36
|
-
return P && e.push(
|
|
37
|
-
G({
|
|
38
|
-
apply({ rects: s, availableHeight: t, elements: H }) {
|
|
39
|
-
requestAnimationFrame(() => {
|
|
40
|
-
Object.assign(H.floating.style, {
|
|
41
|
-
width: `${s.reference.width}px`,
|
|
42
|
-
maxHeight: t > W ? `${t}px` : void 0
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
padding: 5
|
|
47
|
-
})
|
|
48
|
-
), e;
|
|
49
|
-
}, [p, P]), o = X({
|
|
50
|
-
open: r.show,
|
|
51
|
-
onOpenChange: (e, s, t) => {
|
|
52
|
-
r.setShow(e), e ? c == null || c(s, t, a) : m == null || m(s, t, a);
|
|
53
|
-
},
|
|
54
|
-
middleware: g,
|
|
55
|
-
placement: p ? void 0 : x,
|
|
56
|
-
whileElementsMounted: Q
|
|
57
|
-
}), M = B(o.context, {
|
|
58
|
-
enabled: !n
|
|
59
|
-
}), N = J(o.context, {
|
|
60
|
-
enabled: !n
|
|
61
|
-
}), j = K(o.context, {
|
|
62
|
-
role: i
|
|
63
|
-
}), { activeIndex: a, list: w, listNav: F } = Z(
|
|
64
|
-
o.context,
|
|
65
|
-
i,
|
|
66
|
-
{
|
|
67
|
-
focusItemOnOpen: !0,
|
|
68
|
-
virtual: u
|
|
69
|
-
},
|
|
70
|
-
R,
|
|
71
|
-
I
|
|
72
|
-
), l = T(), d = L([M, N, j, F]), v = f(() => u ? {
|
|
73
|
-
getVirtualFocus: () => h.current,
|
|
74
|
-
setVirtualFocus: (e) => {
|
|
75
|
-
h.current = e;
|
|
76
|
-
}
|
|
77
|
-
} : {}, [u]), O = f(
|
|
78
|
-
() => ({
|
|
79
|
-
...l,
|
|
80
|
-
...r,
|
|
81
|
-
...v,
|
|
82
|
-
api: o,
|
|
83
|
-
activeIndex: a,
|
|
84
|
-
disabledAutoToggle: n,
|
|
85
|
-
getFocusableActivator: () => {
|
|
86
|
-
const e = o.elements.reference;
|
|
87
|
-
return (e == null ? void 0 : e.querySelector("[role=combobox]")) ?? D(e)[0];
|
|
88
|
-
},
|
|
89
|
-
interactions: d,
|
|
90
|
-
list: w,
|
|
91
|
-
setShowWithReason: (e, s, t) => o.context.onOpenChange(e, s, t),
|
|
92
|
-
type: i
|
|
93
|
-
}),
|
|
94
|
-
[
|
|
95
|
-
a,
|
|
96
|
-
o,
|
|
97
|
-
l,
|
|
98
|
-
n,
|
|
99
|
-
d,
|
|
100
|
-
w,
|
|
101
|
-
r,
|
|
102
|
-
i,
|
|
103
|
-
v
|
|
104
|
-
]
|
|
105
|
-
);
|
|
106
|
-
return A(b, o, l, r, O), /* @__PURE__ */ V(ee.Provider, { value: O, children: C });
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
oe.displayName = "PopoverProvider";
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../../floating-ui.react-nmA48tb2.js";
|
|
4
|
+
import "./Popover.types.js";
|
|
5
|
+
import "./hooks/usePopoverState.js";
|
|
6
|
+
import "./hooks/usePopoverNavigation.js";
|
|
7
|
+
import "./hooks/usePopoverAria.js";
|
|
8
|
+
import "./hooks/usePopoverImperativeHandle.js";
|
|
9
|
+
import "../../helpers/dom/focusableElements.js";
|
|
10
|
+
import { a as d, P as f } from "../../PopoverProvider-d3hhpW2k.js";
|
|
11
|
+
import "../../helpers/dom/closestCrossShadow.js";
|
|
110
12
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
13
|
+
d as PopoverContext,
|
|
14
|
+
f as PopoverProvider
|
|
113
15
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { f as e } from "../../../floating-ui.react-nmA48tb2.js";
|
|
3
|
+
const f = ({
|
|
4
|
+
children: t,
|
|
5
|
+
parentPopover: o
|
|
6
|
+
}) => o ? /* @__PURE__ */ r(e, { elementsRef: o.list, children: t }) : t;
|
|
7
|
+
export {
|
|
8
|
+
f as NestedPopoverActivator
|
|
9
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { s as
|
|
3
|
-
import { PopoverCssClass as
|
|
4
|
-
import { usePopover as
|
|
5
|
-
import { useRef as A, useMemo as
|
|
6
|
-
import { focusableElements as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { s as c } from "../../../Popover.module-BKrF_xRW.js";
|
|
3
|
+
import { PopoverCssClass as m } from "../Popover.types.js";
|
|
4
|
+
import { usePopover as g } from "../hooks/usePopover.js";
|
|
5
|
+
import { useRef as A, useMemo as b, useEffect as v } from "react";
|
|
6
|
+
import { focusableElements as T } from "../../../helpers/dom/focusableElements.js";
|
|
7
|
+
import { safeClosest as f } from "../../../helpers/dom/domUtils.js";
|
|
8
|
+
import { usePopoverActivatorInteractions as x } from "../hooks/usePopoverActivatorInteractions.js";
|
|
9
|
+
import { c as E } from "../../../index-2QXL0WYc.js";
|
|
9
10
|
const P = [
|
|
10
11
|
"aria-controls",
|
|
11
12
|
"aria-expanded",
|
|
@@ -14,75 +15,73 @@ const P = [
|
|
|
14
15
|
"id",
|
|
15
16
|
"role",
|
|
16
17
|
"tabindex"
|
|
17
|
-
], y = (
|
|
18
|
-
const t =
|
|
19
|
-
t == null || t.removeAttribute("id"), P.forEach((
|
|
20
|
-
const n =
|
|
21
|
-
|
|
22
|
-
}), a &&
|
|
23
|
-
},
|
|
24
|
-
children:
|
|
25
|
-
...
|
|
18
|
+
], y = (o, i) => {
|
|
19
|
+
const t = o.querySelector("[id]"), a = t == null ? void 0 : t.getAttribute("id");
|
|
20
|
+
t == null || t.removeAttribute("id"), P.forEach((s) => {
|
|
21
|
+
const n = o.getAttribute(s);
|
|
22
|
+
o.removeAttribute(s), n && i.setAttribute(s, n);
|
|
23
|
+
}), a && i.setAttribute("id", a);
|
|
24
|
+
}, N = ({
|
|
25
|
+
children: o,
|
|
26
|
+
...i
|
|
26
27
|
}) => {
|
|
27
|
-
const t =
|
|
28
|
+
const t = g(), a = A(null), s = o == null ? void 0 : o.props, n = x(
|
|
28
29
|
t,
|
|
29
|
-
|
|
30
|
-
),
|
|
30
|
+
s
|
|
31
|
+
), l = b(() => {
|
|
31
32
|
if (t != null && t.show)
|
|
32
33
|
return [
|
|
33
34
|
...t.getAriaControls(),
|
|
34
|
-
|
|
35
|
+
s["aria-controls"],
|
|
35
36
|
t.api.context.floatingId
|
|
36
37
|
].join(" ").trim();
|
|
37
|
-
}, [
|
|
38
|
-
return
|
|
39
|
-
var r,
|
|
38
|
+
}, [s, t]);
|
|
39
|
+
return v(() => {
|
|
40
|
+
var r, e;
|
|
40
41
|
!a.current || !(t != null && t.getVirtualFocus) || t.activeIndex === null || (setTimeout(
|
|
41
42
|
() => {
|
|
42
|
-
var
|
|
43
|
-
return (
|
|
43
|
+
var u;
|
|
44
|
+
return (u = t == null ? void 0 : t.api.refs.domReference.current) == null ? void 0 : u.removeAttribute(
|
|
44
45
|
"aria-activedescendant"
|
|
45
46
|
);
|
|
46
47
|
}
|
|
47
48
|
), a.current.setAttribute(
|
|
48
49
|
"aria-activedescendant",
|
|
49
|
-
((
|
|
50
|
+
((e = (r = t.list.current) == null ? void 0 : r[t.activeIndex]) == null ? void 0 : e.id) ?? ""
|
|
50
51
|
));
|
|
51
52
|
}, [t]), /* @__PURE__ */ d(
|
|
52
53
|
"div",
|
|
53
54
|
{
|
|
54
|
-
...
|
|
55
|
-
className:
|
|
56
|
-
[
|
|
55
|
+
...i,
|
|
56
|
+
className: E(c.activator, {
|
|
57
|
+
[m.Active]: t == null ? void 0 : t.show
|
|
57
58
|
}),
|
|
58
59
|
...t == null ? void 0 : t.interactions.getReferenceProps({
|
|
59
60
|
...n,
|
|
60
|
-
"aria-controls":
|
|
61
|
-
role:
|
|
61
|
+
"aria-controls": l,
|
|
62
|
+
role: s.role,
|
|
62
63
|
ref: (r) => {
|
|
63
64
|
if (!r) return;
|
|
64
65
|
t == null || t.api.refs.setReference(r);
|
|
65
|
-
const
|
|
66
|
-
|
|
66
|
+
const e = (r == null ? void 0 : r.querySelector("[role=combobox]")) ?? T(r)[0];
|
|
67
|
+
e && (a.current = e, y(r, e));
|
|
67
68
|
},
|
|
68
69
|
onBlur: (r) => {
|
|
69
|
-
|
|
70
|
-
(o = r.relatedTarget) != null && o.closest(`.${u.content}`) && (r.preventDefault(), r.stopPropagation());
|
|
70
|
+
r.relatedTarget instanceof Element && f(r.relatedTarget, `.${c.content}`) && (r.preventDefault(), r.stopPropagation());
|
|
71
71
|
},
|
|
72
72
|
onFocus: (r) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
(i = a.current) == null || i.focus();
|
|
73
|
+
t != null && t.disabledAutoToggle || r.relatedTarget instanceof Element && (r.relatedTarget.hasAttribute("data-floating-ui-focus-guard") || f(r.relatedTarget, `.${c.content}`)) && t.show && (setTimeout(() => {
|
|
74
|
+
var e;
|
|
75
|
+
(e = a.current) == null || e.focus();
|
|
77
76
|
}), setTimeout(() => {
|
|
78
77
|
t.setShowWithReason(!1, r.nativeEvent, "focus");
|
|
79
78
|
}, 300));
|
|
80
79
|
}
|
|
81
80
|
}),
|
|
82
|
-
children:
|
|
81
|
+
children: o
|
|
83
82
|
}
|
|
84
83
|
);
|
|
85
84
|
};
|
|
86
85
|
export {
|
|
87
|
-
|
|
86
|
+
N as PopoverActivator
|
|
88
87
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "../../../index-2QXL0WYc.js";
|
|
3
|
-
import { s as m } from "../../../Popover.module-
|
|
4
|
-
import { usePopover as
|
|
5
|
-
import {
|
|
3
|
+
import { s as m } from "../../../Popover.module-BKrF_xRW.js";
|
|
4
|
+
import { usePopover as g } from "../hooks/usePopover.js";
|
|
5
|
+
import { b as F, F as h, c as p, d as i, e as P, f as I, g as N } from "../../../floating-ui.react-nmA48tb2.js";
|
|
6
6
|
import { composePopoverFloatingProps as x } from "../helpers/composeFloatingProps.js";
|
|
7
7
|
const l = ({
|
|
8
|
-
children:
|
|
8
|
+
children: n,
|
|
9
9
|
className: o,
|
|
10
10
|
displayMode: r,
|
|
11
11
|
style: s,
|
|
12
12
|
virtualFocus: a,
|
|
13
13
|
...f
|
|
14
14
|
}) => {
|
|
15
|
-
const t =
|
|
15
|
+
const t = g();
|
|
16
16
|
if (!t) return null;
|
|
17
17
|
const u = x(
|
|
18
18
|
t,
|
|
19
19
|
r,
|
|
20
20
|
s
|
|
21
21
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ e(I, { elementsRef: t.list, children: /* @__PURE__ */ e(
|
|
23
23
|
N,
|
|
24
24
|
{
|
|
25
25
|
context: t.api.context,
|
|
@@ -27,7 +27,7 @@ const l = ({
|
|
|
27
27
|
modal: !1,
|
|
28
28
|
disabled: !(t != null && t.show),
|
|
29
29
|
returnFocus: !a,
|
|
30
|
-
children: /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ e(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
...f,
|
|
@@ -35,25 +35,25 @@ const l = ({
|
|
|
35
35
|
hidden: !(t != null && t.show),
|
|
36
36
|
ref: t == null ? void 0 : t.api.refs.setFloating,
|
|
37
37
|
...u,
|
|
38
|
-
children:
|
|
38
|
+
children: n
|
|
39
39
|
}
|
|
40
40
|
)
|
|
41
41
|
}
|
|
42
42
|
) });
|
|
43
43
|
}, d = ({
|
|
44
|
-
className:
|
|
44
|
+
className: n,
|
|
45
45
|
container: o,
|
|
46
46
|
...r
|
|
47
47
|
}) => {
|
|
48
48
|
const s = p();
|
|
49
|
-
return o ? /* @__PURE__ */
|
|
49
|
+
return o ? /* @__PURE__ */ e(i, { id: s, children: /* @__PURE__ */ e(P, { root: o, preserveTabOrder: !0, children: /* @__PURE__ */ e(
|
|
50
50
|
l,
|
|
51
51
|
{
|
|
52
52
|
...r,
|
|
53
|
-
className: c(
|
|
53
|
+
className: c(n, m.portal)
|
|
54
54
|
}
|
|
55
|
-
) }) }) : /* @__PURE__ */
|
|
56
|
-
},
|
|
55
|
+
) }) }) : /* @__PURE__ */ e(i, { id: s, children: /* @__PURE__ */ e(l, { ...r, className: n }) });
|
|
56
|
+
}, y = (n) => F() === null ? /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(d, { ...n }) }) : /* @__PURE__ */ e(d, { ...n });
|
|
57
57
|
export {
|
|
58
|
-
|
|
58
|
+
y as PopoverContent
|
|
59
59
|
};
|