@iress-oss/ids-components 6.2.2 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ai/components/modal.md +6 -1
- package/.ai/components/select.md +22 -0
- package/.ai/patterns/form.md +32 -0
- package/.ai/skills/ui-translation.md +4 -4
- package/dist/Autocomplete-CfNw4UXr.js +328 -0
- package/dist/{Button-BY2qzshw.js → Button-x1_YRAyD.js} +3 -3
- package/dist/{Shadow-DAfthdT2.js → Shadow-BKrsbwQE.js} +8 -6
- package/dist/Slideout-DuFGU2C8.js +197 -0
- package/dist/{Table.styles-CKD_vWqh.js → Table.styles-CeUw7q9b.js} +3 -3
- package/dist/{TableProvider-C8bDaWu2.js → TableProvider-DLIQWfLq.js} +1 -1
- package/dist/{TableRows-DXoiLfwt.js → TableRows-RGC4_RRZ.js} +8 -6
- package/dist/{Text.styles-DUvXBRio.js → Text.styles-CVKI4cU7.js} +2 -2
- package/dist/components/Alert/Alert.js +12 -8
- package/dist/components/Alert/Alert.styles.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.styles.js +1 -1
- package/dist/components/Autocomplete/components/AutocompleteInstructions.js +7 -4
- package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +1 -1
- package/dist/components/Autocomplete/index.js +2 -2
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.styles.js +1 -1
- package/dist/components/Avatar/AvatarGroup/AvatarGroup.js +2 -2
- package/dist/components/Avatar/AvatarGroup/AvatarGroup.styles.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/CloseButton/CloseButton.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +3 -3
- package/dist/components/ButtonGroup/ButtonGroup.styles.js +1 -1
- package/dist/components/Card/Card.js +4 -4
- package/dist/components/Card/Card.styles.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/Checkbox.styles.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.styles.js +1 -1
- package/dist/components/CheckboxMark/CheckboxMark.js +2 -2
- package/dist/components/CheckboxMark/CheckboxMark.styles.js +1 -1
- 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 +1 -1
- package/dist/components/Divider/Divider.js +2 -2
- package/dist/components/Divider/Divider.styles.js +1 -1
- package/dist/components/Expander/Expander.js +3 -3
- package/dist/components/Expander/Expander.styles.js +1 -1
- package/dist/components/ExpanderChevron/ExpanderChevron.styles.js +1 -1
- package/dist/components/Field/Field.d.ts +7 -1
- package/dist/components/Field/Field.js +34 -33
- package/dist/components/Field/Field.styles.js +1 -1
- package/dist/components/Field/components/FieldFooter.d.ts +5 -1
- package/dist/components/Field/components/FieldFooter.js +18 -17
- package/dist/components/Field/components/FieldHint.js +3 -3
- package/dist/components/FieldGroup/FieldGroup.js +3 -3
- package/dist/components/FieldGroup/FieldGroup.styles.js +1 -1
- package/dist/components/Hide/Hide.js +1 -1
- package/dist/components/Icon/Icon.js +4 -4
- 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 +1 -1
- package/dist/components/Input/Input.js +85 -79
- package/dist/components/Input/Input.styles.js +1 -1
- package/dist/components/Input/InputBase/InputBase.js +1 -1
- package/dist/components/Label/Label.styles.js +1 -1
- package/dist/components/Label/LabelBase/LabelBase.js +3 -3
- package/dist/components/Link/Link.js +4 -4
- package/dist/components/Link/Link.styles.js +1 -1
- package/dist/components/Menu/Menu.js +2 -2
- package/dist/components/Menu/Menu.styles.js +1 -1
- package/dist/components/Menu/MenuGroup/MenuGroup.styles.js +1 -1
- package/dist/components/Menu/MenuItem/MenuItem.js +121 -121
- package/dist/components/Menu/MenuItem/MenuItem.styles.js +1 -1
- package/dist/components/Menu/MenuText/MenuText.js +2 -2
- package/dist/components/Modal/Modal.d.ts +3 -2
- package/dist/components/Modal/Modal.js +46 -46
- package/dist/components/Modal/Modal.styles.js +1 -1
- package/dist/components/Pill/Pill.js +3 -3
- package/dist/components/Pill/Pill.styles.js +1 -1
- package/dist/components/Placeholder/Placeholder.styles.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopover.js +1 -1
- package/dist/components/Popover/Popover.js +3 -3
- package/dist/components/Popover/Popover.styles.js +1 -1
- package/dist/components/Popover/components/PopoverContent.js +2 -2
- package/dist/components/Popover/helpers/handlePopoverTabKey.js +2 -2
- package/dist/components/Popover/hooks/useFloatingPopover.js +66 -66
- package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
- package/dist/components/Popover/hooks/usePopoverNavigation.js +1 -1
- package/dist/components/Progress/Progress.js +3 -3
- package/dist/components/Progress/Progress.styles.js +1 -1
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/Radio/Radio.styles.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.styles.js +1 -1
- package/dist/components/RadioMark/RadioMark.js +2 -2
- package/dist/components/RadioMark/RadioMark.styles.js +1 -1
- package/dist/components/Readonly/Readonly.js +3 -3
- package/dist/components/Readonly/Readonly.styles.js +1 -1
- package/dist/components/Row/Row.js +1 -1
- package/dist/components/Row/Row.styles.js +1 -1
- package/dist/components/Select/Select.d.ts +10 -0
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/Select.styles.js +1 -1
- package/dist/components/Select/SelectBody/SelectBody.styles.js +1 -1
- package/dist/components/Select/SelectHeading/SelectHeading.js +1 -1
- package/dist/components/Select/SelectLabel/SelectLabel.styles.js +1 -1
- package/dist/components/Select/SelectMenu/SelectMenu.styles.js +1 -1
- package/dist/components/Select/SelectSearch/SelectSearch.styles.js +1 -1
- package/dist/components/Select/SelectSearchInput/SelectSearchInput.styles.js +1 -1
- package/dist/components/Select/SelectTags/SelectTags.js +1 -1
- package/dist/components/Select/SelectTags/SelectTags.styles.js +1 -1
- package/dist/components/Select/components/NativeSelect.js +3 -3
- package/dist/components/Select/components/NativeSelect.styles.js +1 -1
- package/dist/components/Select/components/SelectOptions.d.ts +2 -2
- package/dist/components/Select/components/SelectOptions.js +89 -74
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Skeleton/Skeleton.styles.js +1 -1
- package/dist/components/SkipLink/SkipLink.js +1 -1
- package/dist/components/SkipLink/SkipLink.styles.js +1 -1
- package/dist/components/Slideout/Slideout.js +1 -1
- package/dist/components/Slideout/Slideout.styles.js +1 -1
- package/dist/components/Slideout/components/SlideoutInner.js +2 -2
- package/dist/components/Slideout/index.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/Slider.styles.js +1 -1
- package/dist/components/Slider/components/SliderTicks.js +16 -13
- package/dist/components/Spinner/Spinner.styles.js +2 -2
- package/dist/components/Stack/Stack.js +11 -8
- package/dist/components/Stack/Stack.styles.js +1 -1
- package/dist/components/Styled/Styled.js +8 -5
- package/dist/components/TabSet/Tab/Tab.js +2 -2
- package/dist/components/TabSet/Tab/Tab.styles.js +1 -1
- package/dist/components/TabSet/TabSet.js +2 -2
- package/dist/components/TabSet/TabSet.styles.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/Table.styles.js +1 -1
- package/dist/components/Table/TableBody/TableBody.js +1 -1
- package/dist/components/Table/TableProvider.js +1 -1
- package/dist/components/Table/components/TableEmpty.js +1 -1
- package/dist/components/Table/components/TableFilterButton.js +1 -1
- package/dist/components/Table/components/TableHeader.js +1 -1
- package/dist/components/Table/components/TableHeaderCell.js +1 -1
- package/dist/components/Table/components/TableRows.js +1 -1
- package/dist/components/Table/components/TableSortButton.js +1 -1
- package/dist/components/Table/helpers/composeTableColumnDefs.js +1 -1
- package/dist/components/Table/helpers/composeTableInitialColumnFilters.js +1 -1
- package/dist/components/Table/hooks/useTable.js +1 -1
- package/dist/components/Table/hooks/useTableColumnFilter.js +3 -3
- package/dist/components/Table/hooks/useTableColumnSort.js +1 -1
- package/dist/components/Table/hooks/useTableColumnStyles.js +4 -4
- package/dist/components/Table/index.js +2 -2
- package/dist/components/Tag/Tag.js +2 -2
- package/dist/components/Tag/Tag.styles.js +1 -1
- package/dist/components/TagInput/TagInput.styles.js +1 -1
- package/dist/components/Text/Text.js +9 -6
- package/dist/components/Text/Text.styles.js +1 -1
- package/dist/components/Text/index.js +1 -1
- package/dist/components/Toaster/Toaster.js +2 -2
- package/dist/components/Toaster/Toaster.styles.js +1 -1
- package/dist/components/Toaster/components/Toast/Toast.js +1 -1
- package/dist/components/Toaster/components/Toast/Toast.styles.js +1 -1
- package/dist/components/Toggle/Toggle.js +2 -2
- package/dist/components/Toggle/Toggle.styles.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +16 -16
- package/dist/components/Tooltip/Tooltip.styles.js +1 -1
- package/dist/components/ValidationMessage/ValidationMessage.js +1 -1
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +1 -1
- package/dist/{composeTableColumnDefs-DzUn8D5f.js → composeTableColumnDefs-Ds00wPMn.js} +3 -3
- package/dist/{create-recipe-A316lnq3.js → create-recipe-BWTPSpll.js} +2 -2
- package/dist/{css-R34N3rft.js → css-BRrgGHqo.js} +1 -1
- package/dist/{cva-DcOwIar2.js → cva-1V8NmPTA.js} +1 -1
- package/dist/{factory-BKr3zaf6.js → factory-Dbc35N0_.js} +5 -5
- package/dist/{floating-ui.react-TDMXDOBr.js → floating-ui.react-DP-wD-Nz.js} +70 -59
- package/dist/helpers/formatting/formatDateTime.js +3 -3
- package/dist/helpers/label-value/highlightQueryInLabel.js +1 -1
- package/dist/helpers/label-value/searchLabelValues.js +1 -1
- package/dist/helpers/styling/iressCss.js +1 -1
- package/dist/{index.esm-CapMi3wi.js → index.esm-Bl8pnHUv.js} +16 -14
- package/dist/{is-valid-prop-BVyYPT21.js → is-valid-prop-CvqUuuBB.js} +1 -1
- package/dist/{main-TklToXNs.js → main-BY3nH2iz.js} +7 -7
- package/dist/main.js +8 -8
- package/dist/patterns/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/patterns/Breadcrumbs/Breadcrumbs.styles.js +1 -1
- package/dist/patterns/ContextualMenu/ContextualMenu.js +4 -4
- package/dist/patterns/ContextualMenu/ContextualMenu.styles.js +1 -1
- package/dist/patterns/DropdownMenu/DropdownMenu.js +4 -4
- package/dist/patterns/DropdownMenu/DropdownMenu.styles.js +1 -1
- package/dist/patterns/Form/Form.styles.js +1 -1
- package/dist/patterns/Form/FormField/FormField.d.ts +9 -0
- package/dist/patterns/Form/FormField/FormField.js +12 -7
- package/dist/patterns/Form/FormValidationSummary/FormValidationSummary.d.ts +1 -1
- package/dist/patterns/Form/FormValidationSummary/FormValidationSummary.js +16 -12
- package/dist/patterns/Form/HookForm/HookForm.js +1 -1
- package/dist/patterns/Loading/Loading.styles.js +1 -1
- package/dist/patterns/Loading/components/ComponentLoading.js +3 -3
- package/dist/patterns/Loading/components/DefaultLoading.js +1 -1
- package/dist/patterns/Loading/components/LongLoading.js +19 -19
- package/dist/patterns/Loading/components/PageLoading.js +1 -1
- package/dist/patterns/Loading/components/StartUpLoading.js +7 -7
- package/dist/patterns/Loading/components/ValidateLoading.js +2 -2
- package/dist/patterns/Shadow/Shadow.js +1 -1
- package/dist/patterns/Shadow/index.js +1 -1
- package/dist/patterns/SideNav/SideNav.js +3 -3
- package/dist/patterns/SideNav/SideNav.styles.js +1 -1
- package/dist/{rolldown-runtime-3b4jIN3o.js → rolldown-runtime-DtPi1Y-2.js} +2 -2
- package/dist/{sva-DGhdmNso.js → sva-CG-TbBow.js} +2 -2
- package/dist/{useAutocompleteSearch-BYzUn7Ag.js → useAutocompleteSearch-m33c4lI7.js} +7 -5
- package/package.json +6 -6
- package/dist/Autocomplete-CzdfUGYJ.js +0 -326
- package/dist/Slideout-BOH2gwIN.js +0 -194
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { t as e } from "../../../css-
|
|
1
|
+
import { t as e } from "../../../css-BRrgGHqo.js";
|
|
2
2
|
import { t } from "../../../cx-QcEwjve6.js";
|
|
3
|
-
import { n } from "../../../is-valid-prop-
|
|
3
|
+
import { n } from "../../../is-valid-prop-CvqUuuBB.js";
|
|
4
4
|
import { GlobalCSSClass as r } from "../../../enums.js";
|
|
5
|
-
import { idsLogger as
|
|
6
|
-
import { IressIcon as
|
|
7
|
-
import { propagateTestid as
|
|
8
|
-
import { n as
|
|
9
|
-
import { usePopover as
|
|
10
|
-
import { usePopoverItem as
|
|
11
|
-
import { IressTooltip as
|
|
12
|
-
import { MenuContext as
|
|
13
|
-
import { menuItem as
|
|
14
|
-
import { IressMenuDivider as
|
|
15
|
-
import { useMenuItemRole as
|
|
16
|
-
import { IressCheckboxMark as
|
|
17
|
-
import { spreadUnlessUndefined as
|
|
18
|
-
import { IressRadioMark as
|
|
19
|
-
import { cloneElement as
|
|
5
|
+
import { idsLogger as i } from "../../../helpers/utility/idsLogger.js";
|
|
6
|
+
import { IressIcon as a } from "../../Icon/Icon.js";
|
|
7
|
+
import { propagateTestid as o } from "../../../helpers/utility/propagateTestid.js";
|
|
8
|
+
import { n as ee } from "../../../floating-ui.react-DP-wD-Nz.js";
|
|
9
|
+
import { usePopover as s } from "../../Popover/hooks/usePopover.js";
|
|
10
|
+
import { usePopoverItem as te } from "../../Popover/hooks/usePopoverItem.js";
|
|
11
|
+
import { IressTooltip as c } from "../../Tooltip/Tooltip.js";
|
|
12
|
+
import { MenuContext as l } from "../Menu.js";
|
|
13
|
+
import { menuItem as ne } from "./MenuItem.styles.js";
|
|
14
|
+
import { IressMenuDivider as re } from "../MenuDivider/MenuDivider.js";
|
|
15
|
+
import { useMenuItemRole as ie } from "./hooks/useMenuItemRole.js";
|
|
16
|
+
import { IressCheckboxMark as ae } from "../../CheckboxMark/CheckboxMark.js";
|
|
17
|
+
import { spreadUnlessUndefined as u } from "../../../helpers/utility/spreadUnlessUndefined.js";
|
|
18
|
+
import { IressRadioMark as d } from "../../RadioMark/RadioMark.js";
|
|
19
|
+
import { cloneElement as f, forwardRef as p, useCallback as m, useContext as h, useImperativeHandle as oe, useMemo as g, useRef as se } from "react";
|
|
20
20
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
21
21
|
//#region src/components/Menu/MenuItem/MenuItem.tsx
|
|
22
|
-
var
|
|
22
|
+
var ce = (...e) => (t) => {
|
|
23
23
|
e.forEach((e) => {
|
|
24
24
|
e && (typeof e == "function" ? e(t) : e.current = t);
|
|
25
25
|
});
|
|
26
|
-
},
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
]),
|
|
32
|
-
"aria-current":
|
|
33
|
-
"aria-selected":
|
|
34
|
-
}), [
|
|
35
|
-
|
|
26
|
+
}, b = p(({ append: p, canToggle: b, children: x, className: S, "data-testid": C, divider: w, element: T, icon: E, listItemStyle: D, onBlur: O, onClick: k, onKeyDown: A, prepend: j, selected: M, value: N, ...P }, F) => {
|
|
27
|
+
let I = h(l), L = s(), R = ie(), z = se(null), B = g(() => (I?.supportsSelection && M && i("IressMenuItem: The selected prop on IressMenuItem does not work when used inside an IressMenu with role=listbox or the multiSelect prop set to true. Use the selected prop on IressMenu instead."), I?.supportsSelection ? I.isSelected(N) : M), [
|
|
28
|
+
I,
|
|
29
|
+
M,
|
|
30
|
+
N
|
|
31
|
+
]), V = g(() => ({
|
|
32
|
+
"aria-current": I?.supportsSelection ? void 0 : B,
|
|
33
|
+
"aria-selected": I?.supportsSelection ? B : void 0
|
|
34
|
+
}), [I?.supportsSelection, B]), H = m((e) => {
|
|
35
|
+
k?.(e), !e.defaultPrevented && (I?.supportsSelection && I.toggle(N, b || I?.multiSelect ? !B : !0), I?.hasArrowKeyNav && !I?.multiSelect && (L?.setShow?.(!1), L?.getFocusableActivator?.()?.focus(), L?.resetActiveIndex()));
|
|
36
36
|
}, [
|
|
37
|
-
|
|
37
|
+
b,
|
|
38
|
+
I,
|
|
39
|
+
k,
|
|
38
40
|
L,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
]), W = p((e) => {
|
|
44
|
-
j?.(e), !e.defaultPrevented && e.key === "Tab" && L?.supportsSelection && L?.changeOnBlur && L?.toggle(P, !0);
|
|
41
|
+
B,
|
|
42
|
+
N
|
|
43
|
+
]), U = m((e) => {
|
|
44
|
+
A?.(e), !e.defaultPrevented && e.key === "Tab" && I?.supportsSelection && I?.changeOnBlur && I?.toggle(N, !0);
|
|
45
45
|
}, [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
]),
|
|
46
|
+
I,
|
|
47
|
+
A,
|
|
48
|
+
N
|
|
49
|
+
]), W = g(() => ({
|
|
50
50
|
onBlur: (e) => {
|
|
51
51
|
let t = new Event("blur", { bubbles: !0 });
|
|
52
52
|
Object.defineProperty(t, "target", {
|
|
@@ -61,7 +61,7 @@ var b = (...e) => (t) => {
|
|
|
61
61
|
value: "",
|
|
62
62
|
...e.target
|
|
63
63
|
}
|
|
64
|
-
}),
|
|
64
|
+
}), O?.(t), !t.defaultPrevented && I?.supportsSelection && I?.changeOnBlur && I?.toggle(N, !0);
|
|
65
65
|
},
|
|
66
66
|
onKeyDown: (e) => {
|
|
67
67
|
if (e.key === "Enter") {
|
|
@@ -72,139 +72,139 @@ var b = (...e) => (t) => {
|
|
|
72
72
|
value: "",
|
|
73
73
|
...e.target
|
|
74
74
|
}
|
|
75
|
-
}),
|
|
76
|
-
e.preventDefault(),
|
|
75
|
+
}), k?.(t), t.defaultPrevented) return;
|
|
76
|
+
e.preventDefault(), I?.toggle(N, b || I?.multiSelect ? !B : !0);
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
A?.(e);
|
|
79
79
|
}
|
|
80
80
|
}), [
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
b,
|
|
82
|
+
I,
|
|
83
|
+
O,
|
|
83
84
|
k,
|
|
84
85
|
A,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
hasAppendOrPrepend: !!(f ?? M ?? L?.multiSelect ?? L?.numbered),
|
|
86
|
+
B,
|
|
87
|
+
N
|
|
88
|
+
]), { isActiveInPopover: G, ...K } = te(void 0, W), q = g(() => ne({
|
|
89
|
+
active: !!L?.isActiveActivator(z.current),
|
|
90
|
+
hasAppendOrPrepend: !!(p ?? j ?? I?.multiSelect ?? I?.numbered),
|
|
91
91
|
isActiveInPopover: G,
|
|
92
|
-
layout:
|
|
93
|
-
multiSelect: !!
|
|
94
|
-
noWrap:
|
|
95
|
-
numbered:
|
|
96
|
-
role:
|
|
97
|
-
selected:
|
|
98
|
-
variant:
|
|
92
|
+
layout: I?.layout,
|
|
93
|
+
multiSelect: !!I?.multiSelect,
|
|
94
|
+
noWrap: I?.noWrap,
|
|
95
|
+
numbered: I?.numbered,
|
|
96
|
+
role: R,
|
|
97
|
+
selected: B,
|
|
98
|
+
variant: I?.variant
|
|
99
99
|
}), [
|
|
100
|
-
|
|
100
|
+
p,
|
|
101
101
|
G,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
I?.layout,
|
|
103
|
+
I?.multiSelect,
|
|
104
|
+
I?.noWrap,
|
|
105
|
+
I?.numbered,
|
|
106
|
+
I?.variant,
|
|
107
|
+
L,
|
|
108
|
+
j,
|
|
107
109
|
R,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
]), J = g(() => L?.multiSelect ? /* @__PURE__ */ v(oe, {
|
|
112
|
-
checked: V,
|
|
110
|
+
B
|
|
111
|
+
]), J = g(() => I?.multiSelect ? /* @__PURE__ */ v(ae, {
|
|
112
|
+
checked: B,
|
|
113
113
|
className: q.checkboxMark,
|
|
114
|
-
"data-testid":
|
|
115
|
-
}) :
|
|
116
|
-
checked:
|
|
114
|
+
"data-testid": o(C, "checkbox-mark")
|
|
115
|
+
}) : I?.variant == "radio" ? /* @__PURE__ */ v(d, {
|
|
116
|
+
checked: B,
|
|
117
117
|
className: q.checkboxMark,
|
|
118
|
-
"data-testid":
|
|
119
|
-
}) :
|
|
118
|
+
"data-testid": o(C, "checkbox")
|
|
119
|
+
}) : j, [
|
|
120
120
|
q.checkboxMark,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
]), [Y, X] = g(() => n(
|
|
127
|
-
...
|
|
121
|
+
C,
|
|
122
|
+
I?.multiSelect,
|
|
123
|
+
I?.variant,
|
|
124
|
+
j,
|
|
125
|
+
B
|
|
126
|
+
]), [Y, X] = g(() => n(P), [P]), Z = g(() => ({
|
|
127
|
+
...V,
|
|
128
128
|
children: /* @__PURE__ */ y(_, { children: [
|
|
129
129
|
J,
|
|
130
|
-
(
|
|
130
|
+
(E ?? x) && /* @__PURE__ */ v("span", {
|
|
131
131
|
className: q.contents,
|
|
132
|
-
children:
|
|
132
|
+
children: E ? /* @__PURE__ */ v(a, { name: E }) : x
|
|
133
133
|
}),
|
|
134
|
-
|
|
134
|
+
p && /* @__PURE__ */ v("span", {
|
|
135
135
|
className: q.append,
|
|
136
|
-
children:
|
|
136
|
+
children: p
|
|
137
137
|
})
|
|
138
138
|
] }),
|
|
139
|
-
className: t(
|
|
140
|
-
"data-testid":
|
|
139
|
+
className: t(S, q.root, e(Y), r.MenuItem),
|
|
140
|
+
"data-testid": C,
|
|
141
141
|
id: K.id,
|
|
142
|
-
onClick:
|
|
143
|
-
onKeyDown:
|
|
142
|
+
onClick: H,
|
|
143
|
+
onKeyDown: U,
|
|
144
144
|
ref: (e) => {
|
|
145
|
-
|
|
145
|
+
I?.isComposite || K.ref?.(e), e && (z.current = e);
|
|
146
146
|
},
|
|
147
|
-
role:
|
|
148
|
-
tabIndex:
|
|
147
|
+
role: R === "listitem" ? void 0 : R,
|
|
148
|
+
tabIndex: I?.hasArrowKeyNav ? K.tabIndex : void 0
|
|
149
149
|
}), [
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
p,
|
|
151
|
+
V,
|
|
152
|
+
x,
|
|
152
153
|
S,
|
|
153
|
-
C,
|
|
154
154
|
q.append,
|
|
155
155
|
q.contents,
|
|
156
156
|
q.root,
|
|
157
|
-
|
|
157
|
+
C,
|
|
158
|
+
H,
|
|
158
159
|
U,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
L?.isComposite,
|
|
160
|
+
E,
|
|
161
|
+
I?.hasArrowKeyNav,
|
|
162
|
+
I?.isComposite,
|
|
163
163
|
K,
|
|
164
164
|
J,
|
|
165
|
-
|
|
165
|
+
R,
|
|
166
166
|
Y
|
|
167
167
|
]), Q = g(() => {
|
|
168
|
-
let e =
|
|
169
|
-
if (
|
|
170
|
-
let n = String(
|
|
171
|
-
return /* @__PURE__ */ v(
|
|
168
|
+
let e = T ?? (X.href ? "a" : "button"), t = e === "button" ? { type: "button" } : {};
|
|
169
|
+
if (E && x) {
|
|
170
|
+
let n = String(x);
|
|
171
|
+
return /* @__PURE__ */ v(c, {
|
|
172
172
|
tooltipText: n,
|
|
173
|
-
align:
|
|
173
|
+
align: I?.variant == "rail" ? "right" : void 0,
|
|
174
174
|
children: /* @__PURE__ */ v(e, {
|
|
175
175
|
"aria-label": n,
|
|
176
|
-
...
|
|
176
|
+
...u(Z, X),
|
|
177
177
|
...t
|
|
178
178
|
})
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
return /* @__PURE__ */ v(e, {
|
|
182
|
-
...
|
|
182
|
+
...u(Z, X),
|
|
183
183
|
...t
|
|
184
184
|
});
|
|
185
185
|
}, [
|
|
186
|
-
|
|
186
|
+
x,
|
|
187
|
+
T,
|
|
187
188
|
E,
|
|
188
|
-
|
|
189
|
-
L?.variant,
|
|
189
|
+
I?.variant,
|
|
190
190
|
X,
|
|
191
191
|
Z
|
|
192
192
|
]);
|
|
193
|
-
|
|
194
|
-
let $ = g(() =>
|
|
193
|
+
oe(F, () => z.current);
|
|
194
|
+
let $ = g(() => R === "listitem" ? /* @__PURE__ */ v("span", {
|
|
195
195
|
role: "listitem",
|
|
196
|
-
...
|
|
196
|
+
...D,
|
|
197
197
|
children: Q
|
|
198
198
|
}) : Q, [
|
|
199
|
-
|
|
199
|
+
D,
|
|
200
200
|
Q,
|
|
201
|
-
|
|
201
|
+
R
|
|
202
202
|
]);
|
|
203
|
-
return /* @__PURE__ */ y(_, { children: [
|
|
203
|
+
return /* @__PURE__ */ y(_, { children: [I?.isComposite ? /* @__PURE__ */ v(ee, { render: (e) => f($, {
|
|
204
204
|
...e,
|
|
205
|
-
ref:
|
|
206
|
-
}) }) : $,
|
|
205
|
+
ref: ce(Z.ref, e.ref)
|
|
206
|
+
}) }) : $, w && /* @__PURE__ */ v(re, {})] });
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
b.displayName = "IressMenuItem";
|
|
209
209
|
//#endregion
|
|
210
|
-
export {
|
|
210
|
+
export { b as IressMenuItem };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "../../../css-
|
|
1
|
+
import { t as e } from "../../../css-BRrgGHqo.js";
|
|
2
2
|
import { t } from "../../../cx-QcEwjve6.js";
|
|
3
|
-
import { n } from "../../../is-valid-prop-
|
|
3
|
+
import { n } from "../../../is-valid-prop-CvqUuuBB.js";
|
|
4
4
|
import { GlobalCSSClass as r } from "../../../enums.js";
|
|
5
5
|
import { IressText as i } from "../../Text/Text.js";
|
|
6
6
|
import { MenuContext as a } from "../Menu.js";
|
|
@@ -27,9 +27,10 @@ export interface IressModalProps<TStatus extends ModalStatus = undefined> extend
|
|
|
27
27
|
*/
|
|
28
28
|
defaultShow?: boolean;
|
|
29
29
|
/**
|
|
30
|
-
* When set to `true`, users cannot exit the modal by clicking the backdrop
|
|
30
|
+
* When set to `true`, users cannot exit the modal by clicking the backdrop.
|
|
31
|
+
* When set to `"no-esc"`, users also cannot exit the modal using the escape key.
|
|
31
32
|
*/
|
|
32
|
-
disableBackdropClick?: boolean;
|
|
33
|
+
disableBackdropClick?: boolean | 'no-esc';
|
|
33
34
|
/**
|
|
34
35
|
* When set to `true` the modal's footer will always be visible and fixed to the bottom of the modal.
|
|
35
36
|
*/
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { t as e } from "../../cx-QcEwjve6.js";
|
|
2
|
-
import { n as t } from "../../is-valid-prop-
|
|
3
|
-
import { t as n } from "../../factory-
|
|
2
|
+
import { n as t } from "../../is-valid-prop-CvqUuuBB.js";
|
|
3
|
+
import { t as n } from "../../factory-Dbc35N0_.js";
|
|
4
4
|
import { GlobalCSSClass as r } from "../../enums.js";
|
|
5
5
|
import { idsLogger as i } from "../../helpers/utility/idsLogger.js";
|
|
6
6
|
import { IressIcon as ee } from "../Icon/Icon.js";
|
|
7
|
-
import { t as te } from "../../Button-
|
|
8
|
-
import { t as ne } from "../../Text.styles-
|
|
9
|
-
import { IressText as
|
|
10
|
-
import { propagateTestid as
|
|
11
|
-
import { alert as
|
|
12
|
-
import { useIdIfNeeded as
|
|
13
|
-
import { b as
|
|
14
|
-
import { IressCloseButton as
|
|
15
|
-
import { modal as
|
|
16
|
-
import { useProviderModal as
|
|
17
|
-
import { getTransitionDuration as
|
|
18
|
-
import { createElement as
|
|
7
|
+
import { t as te } from "../../Button-x1_YRAyD.js";
|
|
8
|
+
import { t as ne } from "../../Text.styles-CVKI4cU7.js";
|
|
9
|
+
import { IressText as re } from "../Text/Text.js";
|
|
10
|
+
import { propagateTestid as a } from "../../helpers/utility/propagateTestid.js";
|
|
11
|
+
import { alert as o } from "../Alert/Alert.styles.js";
|
|
12
|
+
import { useIdIfNeeded as s } from "../../hooks/useIdIfNeeded.js";
|
|
13
|
+
import { b as c, d as l, g as u, o as d, r as f, s as p, u as m, y as h } from "../../floating-ui.react-DP-wD-Nz.js";
|
|
14
|
+
import { IressCloseButton as ie } from "../Button/CloseButton/CloseButton.js";
|
|
15
|
+
import { modal as ae } from "./Modal.styles.js";
|
|
16
|
+
import { useProviderModal as oe } from "./hooks/useProviderModal.js";
|
|
17
|
+
import { getTransitionDuration as se } from "../../helpers/transition/getTransitionDuration.js";
|
|
18
|
+
import { createElement as ce, useEffect as g, useMemo as le, useState as ue } from "react";
|
|
19
19
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
20
20
|
//#region src/components/Modal/Modal.tsx
|
|
21
21
|
var de = {
|
|
@@ -23,50 +23,50 @@ var de = {
|
|
|
23
23
|
success: "check",
|
|
24
24
|
warning: "warning"
|
|
25
25
|
}, y = ({ actions: y, children: fe, className: pe, closeText: b, container: x, "data-testid": S, defaultShow: C = !1, disableBackdropClick: w, fixedFooter: T, footer: E, heading: D, noCloseButton: O, onEntered: k, onExited: A, onShowChange: j, onStatus: M, onTransitionEnd: N, show: P, size: F, status: I, static: L, style: R, ...z }) => {
|
|
26
|
-
let B = F ?? (I ? "sm" : "md"), V = !!y?.length, [me, he] = ue(C), H = 240, U =
|
|
26
|
+
let B = F ?? (I ? "sm" : "md"), V = !!y?.length, [me, he] = ue(C), H = 240, U = oe(z.id), W = s({ id: z.id }), G = `${W}--heading`, ge = U.opened || P || me, K = (e) => {
|
|
27
27
|
U.show(e), he(e), j?.(e);
|
|
28
|
-
}, { context: q } =
|
|
28
|
+
}, { context: q } = l({
|
|
29
29
|
open: ge,
|
|
30
30
|
onOpenChange: K
|
|
31
|
-
}), _e =
|
|
32
|
-
|
|
33
|
-
outsidePress: (e) => !e.target.closest(`.${r.Toaster}`),
|
|
31
|
+
}), _e = m(q, {
|
|
32
|
+
escapeKey: w !== "no-esc",
|
|
33
|
+
outsidePress: (e) => w === !0 || w === "no-esc" ? !1 : !e.target.closest(`.${r.Toaster}`),
|
|
34
34
|
outsidePressEvent: "mousedown"
|
|
35
|
-
}),
|
|
36
|
-
q.refs.floating.current && (H =
|
|
37
|
-
let { isMounted:
|
|
35
|
+
}), ve = h(q), ye = u([_e, ve]);
|
|
36
|
+
q.refs.floating.current && (H = se(q.refs.floating.current, 1.2, 240));
|
|
37
|
+
let { isMounted: be, status: J } = c(q, { duration: { close: H } }), Y = ae({
|
|
38
38
|
alertStatus: I,
|
|
39
39
|
fixedFooter: T,
|
|
40
40
|
size: B,
|
|
41
41
|
static: L,
|
|
42
42
|
status: J
|
|
43
|
-
}), X =
|
|
44
|
-
|
|
43
|
+
}), X = o({ status: I }), xe = B === "sm" && !!I, [Se, Ce] = t(z), { p: Z = "lg", ...we } = Se;
|
|
44
|
+
g(() => {
|
|
45
45
|
U.opened && P && i("IressModal: Please use either IressModalProvider for uncontrolled components, or the show prop for controlled components, rather than both. If you use both, the open state of the modal will become unpredictable. If you want to show a modal by default in uncontrolled mode, use the defaultShow prop.");
|
|
46
|
-
}, [U.opened, P]),
|
|
46
|
+
}, [U.opened, P]), g(() => {
|
|
47
47
|
M?.(J);
|
|
48
48
|
}, [J, M]);
|
|
49
|
-
let Q =
|
|
49
|
+
let Q = le(() => typeof D == "string" ? /* @__PURE__ */ _(re, {
|
|
50
50
|
className: Y.header,
|
|
51
51
|
id: G,
|
|
52
52
|
element: "h2",
|
|
53
|
-
"data-testid":
|
|
53
|
+
"data-testid": a(S, "heading"),
|
|
54
54
|
children: D
|
|
55
55
|
}) : D, [
|
|
56
56
|
S,
|
|
57
57
|
G,
|
|
58
58
|
D,
|
|
59
59
|
Y.header
|
|
60
|
-
]),
|
|
61
|
-
N?.(e), !(
|
|
60
|
+
]), Te = (e) => {
|
|
61
|
+
N?.(e), !(e.propertyName !== "opacity" && e.propertyName || e.target !== e.currentTarget) && (J === "open" ? (k?.(), L || q.refs.floating?.current?.focus()) : J === "close" && A?.());
|
|
62
62
|
};
|
|
63
|
-
if (!
|
|
64
|
-
let $ = /* @__PURE__ */ _(
|
|
63
|
+
if (!be) return null;
|
|
64
|
+
let $ = /* @__PURE__ */ _(d, {
|
|
65
65
|
className: e(pe, Y.backdrop, r.ModalBackdrop),
|
|
66
|
-
"data-testid":
|
|
66
|
+
"data-testid": a(S, "backdrop"),
|
|
67
67
|
lockScroll: !L,
|
|
68
68
|
style: R,
|
|
69
|
-
children: /* @__PURE__ */ _(
|
|
69
|
+
children: /* @__PURE__ */ _(f, {
|
|
70
70
|
context: q,
|
|
71
71
|
initialFocus: q.refs.floating,
|
|
72
72
|
disabled: L,
|
|
@@ -76,39 +76,39 @@ var de = {
|
|
|
76
76
|
id: W,
|
|
77
77
|
"data-testid": S,
|
|
78
78
|
"aria-labelledby": Q ? G : void 0,
|
|
79
|
-
...
|
|
80
|
-
...
|
|
81
|
-
onTransitionEnd:
|
|
79
|
+
...ye.getFloatingProps(Ce),
|
|
80
|
+
...we,
|
|
81
|
+
onTransitionEnd: Te,
|
|
82
82
|
children: [
|
|
83
|
-
!O && /* @__PURE__ */ _(
|
|
83
|
+
!O && /* @__PURE__ */ _(ie, {
|
|
84
84
|
onClick: () => K(!1),
|
|
85
85
|
screenreaderText: b,
|
|
86
86
|
className: Y.closeButton,
|
|
87
|
-
"data-testid":
|
|
87
|
+
"data-testid": a(S, "close-button__button")
|
|
88
88
|
}),
|
|
89
89
|
/* @__PURE__ */ v(n.div, {
|
|
90
90
|
className: Y.content,
|
|
91
|
-
"data-testid":
|
|
91
|
+
"data-testid": a(S, "content"),
|
|
92
92
|
p: Z,
|
|
93
|
-
textAlign:
|
|
93
|
+
textAlign: xe ? "center" : void 0,
|
|
94
94
|
children: [I ? /* @__PURE__ */ v("div", {
|
|
95
95
|
className: Y.statusHeader,
|
|
96
|
-
"data-testid":
|
|
96
|
+
"data-testid": a(S, "status-header"),
|
|
97
97
|
children: [/* @__PURE__ */ _(ee, {
|
|
98
98
|
name: de[I],
|
|
99
99
|
className: Y.statusIcon,
|
|
100
100
|
screenreaderText: `${I}: `,
|
|
101
|
-
"data-testid":
|
|
101
|
+
"data-testid": a(S, "status-icon")
|
|
102
102
|
}), Q]
|
|
103
103
|
}) : Q, fe]
|
|
104
104
|
}),
|
|
105
105
|
(E ?? V) && /* @__PURE__ */ v(n.div, {
|
|
106
106
|
className: Y.footer,
|
|
107
|
-
"data-testid":
|
|
107
|
+
"data-testid": a(S, "footer"),
|
|
108
108
|
p: Z,
|
|
109
109
|
children: [V && /* @__PURE__ */ _("div", {
|
|
110
110
|
className: Y.footerActions,
|
|
111
|
-
children: y?.map((t, n) => /* @__PURE__ */
|
|
111
|
+
children: y?.map((t, n) => /* @__PURE__ */ ce(te, {
|
|
112
112
|
...t,
|
|
113
113
|
className: e(t.className, Y.action, X.action),
|
|
114
114
|
status: I,
|
|
@@ -119,8 +119,8 @@ var de = {
|
|
|
119
119
|
]
|
|
120
120
|
})
|
|
121
121
|
})
|
|
122
|
-
}),
|
|
123
|
-
return L && !
|
|
122
|
+
}), Ee = x ?? U?.container;
|
|
123
|
+
return L && !Ee ? $ : /* @__PURE__ */ _(p, {
|
|
124
124
|
root: x ?? U?.container,
|
|
125
125
|
children: $
|
|
126
126
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "../../css-
|
|
1
|
+
import { t as e } from "../../css-BRrgGHqo.js";
|
|
2
2
|
import { t } from "../../cx-QcEwjve6.js";
|
|
3
|
-
import { n } from "../../is-valid-prop-
|
|
4
|
-
import { t as r } from "../../factory-
|
|
3
|
+
import { n } from "../../is-valid-prop-CvqUuuBB.js";
|
|
4
|
+
import { t as r } from "../../factory-Dbc35N0_.js";
|
|
5
5
|
import { GlobalCSSClass as i } from "../../enums.js";
|
|
6
6
|
import { pill as a } from "./Pill.styles.js";
|
|
7
7
|
import { jsx as o } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../../../cx-QcEwjve6.js";
|
|
2
|
-
import { t } from "../../../factory-
|
|
2
|
+
import { t } from "../../../factory-Dbc35N0_.js";
|
|
3
3
|
import { GlobalCSSClass as n } from "../../../enums.js";
|
|
4
4
|
import { propagateTestid as r } from "../../../helpers/utility/propagateTestid.js";
|
|
5
5
|
import { FloatingPopoverContext as i, useFloatingPopover as a } from "../hooks/useFloatingPopover.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "../../css-
|
|
1
|
+
import { t as e } from "../../css-BRrgGHqo.js";
|
|
2
2
|
import { t } from "../../cx-QcEwjve6.js";
|
|
3
|
-
import { n } from "../../is-valid-prop-
|
|
4
|
-
import { t as r } from "../../factory-
|
|
3
|
+
import { n } from "../../is-valid-prop-CvqUuuBB.js";
|
|
4
|
+
import { t as r } from "../../factory-Dbc35N0_.js";
|
|
5
5
|
import { GlobalCSSClass as i } from "../../enums.js";
|
|
6
6
|
import { propagateTestid as a } from "../../helpers/utility/propagateTestid.js";
|
|
7
7
|
import { FloatingPopoverContext as o, useFloatingPopover as s } from "./hooks/useFloatingPopover.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../../../factory-
|
|
2
|
-
import { a as t, c as n, f as r, i, p as a, r as o, s } from "../../../floating-ui.react-
|
|
1
|
+
import { t as e } from "../../../factory-Dbc35N0_.js";
|
|
2
|
+
import { a as t, c as n, f as r, i, p as a, r as o, s } from "../../../floating-ui.react-DP-wD-Nz.js";
|
|
3
3
|
import { usePopover as c } from "../hooks/usePopover.js";
|
|
4
4
|
import { composePopoverFloatingProps as l } from "../helpers/composeFloatingProps.js";
|
|
5
5
|
import { usePopoverContainer as u } from "../hooks/usePopoverContainer.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../constants-DJz-xntC.js";
|
|
2
2
|
import { focusableElements as e } from "../../../helpers/dom/focusableElements.js";
|
|
3
|
-
import { r as t } from "../../../index.esm-
|
|
3
|
+
import { r as t } from "../../../index.esm-Bl8pnHUv.js";
|
|
4
4
|
import { waitUntilTrue as n } from "./waitUntilTrue.js";
|
|
5
5
|
//#region src/components/Popover/helpers/handlePopoverTabKey.ts
|
|
6
6
|
var r = (e, t) => {
|
|
@@ -11,7 +11,7 @@ var r = (e, t) => {
|
|
|
11
11
|
}, a = async (e, r) => {
|
|
12
12
|
e.setShowWithReason(!1);
|
|
13
13
|
let i = t(document.documentElement).filter((t) => !e.api.elements.floating?.contains(t) && !t.hasAttribute("data-floating-ui-focus-guard")), a = i.indexOf(r), o = i[a + 1];
|
|
14
|
-
a
|
|
14
|
+
a !== -1 && o && (await n(() => !o.hasAttribute("data-floating-ui-inert")), setTimeout(() => o.focus()));
|
|
15
15
|
}, o = (e, n) => {
|
|
16
16
|
let r = t(document.documentElement).filter((t) => e.api.elements.floating?.contains(t)), i = r[r.length - 1];
|
|
17
17
|
document.activeElement === i && e.setShowWithReason(!1, n, "focus-out");
|