@strapi/design-system 1.4.1 → 1.5.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/AccordionContent.cjs +1 -1
- package/dist/Accordion/AccordionContent.js +17 -37
- package/dist/Accordion/AccordionToggle.cjs +6 -6
- package/dist/Accordion/AccordionToggle.js +75 -96
- package/dist/Alert/Alert.cjs +12 -12
- package/dist/Alert/Alert.js +83 -102
- package/dist/Alert/utils.cjs +1 -1
- package/dist/Alert/utils.js +3 -3
- package/dist/Avatar/Avatar.cjs +4 -4
- package/dist/Avatar/Avatar.js +41 -35
- package/dist/Badge/Badge.cjs +4 -4
- package/dist/Badge/Badge.js +29 -49
- package/dist/BaseButton/BaseButton.cjs +3 -3
- package/dist/BaseButton/BaseButton.js +20 -42
- package/dist/BaseCheckbox/BaseCheckbox.cjs +6 -6
- package/dist/BaseCheckbox/BaseCheckbox.js +35 -55
- package/dist/BaseLink/BaseLink.cjs +2 -2
- package/dist/BaseLink/BaseLink.js +21 -43
- package/dist/BaseRadio/BaseRadio.cjs +8 -8
- package/dist/BaseRadio/BaseRadio.js +31 -51
- package/dist/BaseRadio/RadioGroup.cjs +1 -1
- package/dist/BaseRadio/RadioGroup.js +24 -44
- package/dist/Box/BoxProps.cjs +1 -1
- package/dist/Box/BoxProps.js +10 -19
- package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
- package/dist/Breadcrumbs/Breadcrumbs.js +29 -50
- package/dist/Button/Button.cjs +14 -14
- package/dist/Button/Button.js +53 -73
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.js +17 -37
- package/dist/Card/CardAsset.cjs +4 -4
- package/dist/Card/CardAsset.js +19 -42
- package/dist/Card/CardBadge.cjs +3 -3
- package/dist/Card/CardBadge.js +9 -18
- package/dist/Card/CardBody.cjs +1 -1
- package/dist/Card/CardBody.js +8 -19
- package/dist/Card/CardCheckbox.cjs +1 -1
- package/dist/Card/CardCheckbox.js +12 -22
- package/dist/Card/CardContent.cjs +2 -2
- package/dist/Card/CardContent.js +11 -32
- package/dist/Card/CardHeader.cjs +2 -2
- package/dist/Card/CardHeader.js +9 -19
- package/dist/Card/CardTimer.cjs +2 -2
- package/dist/Card/CardTimer.js +20 -42
- package/dist/Card/CardTitle.cjs +1 -1
- package/dist/Card/CardTitle.js +16 -27
- package/dist/CarouselInput/Carousel.cjs +6 -6
- package/dist/CarouselInput/Carousel.js +77 -107
- package/dist/CarouselInput/CarouselActions.cjs +1 -1
- package/dist/CarouselInput/CarouselActions.js +7 -17
- package/dist/CarouselInput/CarouselImage.cjs +3 -3
- package/dist/CarouselInput/CarouselImage.js +26 -38
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.js +49 -83
- package/dist/CarouselInput/CarouselSlide.cjs +2 -2
- package/dist/CarouselInput/CarouselSlide.js +20 -42
- package/dist/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.js +44 -63
- package/dist/Combobox/Combobox.cjs +1 -1
- package/dist/Combobox/Combobox.js +196 -246
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/ComboboxOption.js +25 -47
- package/dist/Combobox/utils.cjs +1 -1
- package/dist/Combobox/utils.js +21 -21
- package/dist/DatePicker/DatePicker.cjs +1 -1
- package/dist/DatePicker/DatePicker.js +87 -109
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
- package/dist/DatePicker/DatePickerCalendar.js +1 -1
- package/dist/DatePicker/DatePickerTd.cjs +4 -4
- package/dist/DatePicker/DatePickerTd.js +23 -42
- package/dist/DatePicker/DatePickerTh.cjs +3 -3
- package/dist/DatePicker/DatePickerTh.js +23 -44
- package/dist/DatePicker/utils/getYears.cjs +1 -1
- package/dist/DatePicker/utils/getYears.js +6 -7
- package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +92 -126
- package/dist/DateTimePicker/DateTimePickerProps.cjs +1 -1
- package/dist/DateTimePicker/DateTimePickerProps.js +10 -19
- package/dist/Dialog/Dialog.cjs +5 -5
- package/dist/Dialog/Dialog.js +39 -58
- package/dist/Divider/Divider.cjs +4 -2
- package/dist/Divider/Divider.js +17 -38
- package/dist/Field/Field.cjs +1 -1
- package/dist/Field/Field.js +20 -39
- package/dist/Field/FieldAction.cjs +2 -2
- package/dist/Field/FieldAction.js +13 -35
- package/dist/Field/FieldInput.cjs +6 -6
- package/dist/Field/FieldInput.js +47 -67
- package/dist/Field/FieldLabel.cjs +3 -3
- package/dist/Field/FieldLabel.js +26 -46
- package/dist/Flex/FlexProps.cjs +1 -1
- package/dist/Flex/FlexProps.js +10 -19
- package/dist/FocusTrap/FocusTrap.cjs +1 -1
- package/dist/FocusTrap/FocusTrap.js +32 -52
- package/dist/Grid/Grid.cjs +3 -3
- package/dist/Grid/Grid.js +20 -42
- package/dist/Grid/GridItem.cjs +2 -2
- package/dist/Grid/GridItem.js +22 -41
- package/dist/Icon/Icon.cjs +2 -2
- package/dist/Icon/Icon.js +17 -27
- package/dist/IconButton/IconButton.cjs +4 -4
- package/dist/IconButton/IconButton.js +44 -64
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -1
- package/dist/KeyboardNavigable/KeyboardNavigable.js +38 -58
- package/dist/Layout/HeaderLayout.cjs +2 -2
- package/dist/Layout/HeaderLayout.js +78 -96
- package/dist/Link/Link.cjs +6 -6
- package/dist/Link/Link.js +34 -54
- package/dist/LinkButton/LinkButton.cjs +10 -10
- package/dist/LinkButton/LinkButton.js +47 -69
- package/dist/Loader/Loader.cjs +4 -4
- package/dist/Loader/Loader.js +25 -47
- package/dist/Main/Main.cjs +2 -2
- package/dist/Main/Main.js +15 -35
- package/dist/MainNav/MainNav.cjs +2 -2
- package/dist/MainNav/MainNav.js +19 -40
- package/dist/MainNav/NavCondense.cjs +3 -3
- package/dist/MainNav/NavCondense.js +20 -40
- package/dist/MainNav/NavFooter.cjs +3 -0
- package/dist/MainNav/NavFooter.js +14 -0
- package/dist/MainNav/NavLink.cjs +13 -13
- package/dist/MainNav/NavLink.js +57 -76
- package/dist/MainNav/NavSection.cjs +1 -1
- package/dist/MainNav/NavSection.js +46 -67
- package/dist/MainNav/NavSections.cjs +4 -1
- package/dist/MainNav/NavSections.js +23 -40
- package/dist/MainNav/NavUser.cjs +2 -6
- package/dist/MainNav/NavUser.js +31 -55
- package/dist/MainNav/index.cjs +1 -1
- package/dist/MainNav/index.js +14 -12
- package/dist/ModalLayout/ModalBody.cjs +2 -2
- package/dist/ModalLayout/ModalBody.js +9 -19
- package/dist/ModalLayout/ModalLayout.cjs +3 -3
- package/dist/ModalLayout/ModalLayout.js +30 -52
- package/dist/NumberInput/NumberInput.cjs +6 -6
- package/dist/NumberInput/NumberInput.js +123 -157
- package/dist/Pagination/components.cjs +7 -7
- package/dist/Pagination/components.js +65 -88
- package/dist/Popover/Popover.cjs +3 -3
- package/dist/Popover/Popover.js +65 -91
- package/dist/Portal/Portal.cjs +1 -1
- package/dist/Portal/Portal.js +11 -12
- package/dist/ProgressBar/ProgressBar.cjs +2 -2
- package/dist/ProgressBar/ProgressBar.js +27 -49
- package/dist/Radio/Radio.cjs +2 -2
- package/dist/Radio/Radio.js +19 -40
- package/dist/RawTable/RawCell.cjs +1 -1
- package/dist/RawTable/RawCell.js +69 -89
- package/dist/RawTable/RawTable.cjs +1 -1
- package/dist/RawTable/RawTable.js +46 -66
- package/dist/RawTable/RawTbody.cjs +1 -1
- package/dist/RawTable/RawTbody.js +11 -30
- package/dist/RawTable/RawThead.cjs +1 -1
- package/dist/RawTable/RawThead.js +10 -29
- package/dist/RawTable/RawTr.cjs +1 -1
- package/dist/RawTable/RawTr.js +14 -34
- package/dist/Searchbar/SearchForm.cjs +1 -1
- package/dist/Searchbar/SearchForm.js +5 -16
- package/dist/Searchbar/Searchbar.cjs +7 -7
- package/dist/Searchbar/Searchbar.js +45 -65
- package/dist/Select/MultiSelectNested.cjs +1 -1
- package/dist/Select/MultiSelectNested.js +23 -45
- package/dist/Select/OptGroup.cjs +1 -1
- package/dist/Select/OptGroup.js +15 -35
- package/dist/Select/Option.cjs +7 -7
- package/dist/Select/Option.js +37 -57
- package/dist/Select/Select.cjs +2 -2
- package/dist/Select/Select.js +145 -186
- package/dist/Select/SelectButton.cjs +2 -2
- package/dist/Select/SelectButton.js +33 -53
- package/dist/SimpleMenu/SimpleMenu.cjs +9 -9
- package/dist/SimpleMenu/SimpleMenu.js +137 -163
- package/dist/Stack/Stack.cjs +3 -3
- package/dist/Stack/Stack.js +29 -50
- package/dist/Status/Status.cjs +4 -4
- package/dist/Status/Status.js +30 -50
- package/dist/SubNav/SubNav.cjs +3 -3
- package/dist/SubNav/SubNav.js +15 -37
- package/dist/SubNav/SubNavHeader.cjs +2 -2
- package/dist/SubNav/SubNavHeader.js +38 -39
- package/dist/SubNav/SubNavLink.cjs +6 -6
- package/dist/SubNav/SubNavLink.js +39 -61
- package/dist/SubNav/SubNavSections.cjs +1 -1
- package/dist/SubNav/SubNavSections.js +17 -39
- package/dist/Switch/Switch.cjs +5 -5
- package/dist/Switch/Switch.js +35 -57
- package/dist/Table/Cell.cjs +3 -3
- package/dist/Table/Cell.js +20 -40
- package/dist/Table/TFooter.cjs +3 -3
- package/dist/Table/TFooter.js +28 -50
- package/dist/Table/Table.cjs +5 -5
- package/dist/Table/Table.js +35 -55
- package/dist/Table/Tbody.cjs +2 -2
- package/dist/Table/Tbody.js +8 -17
- package/dist/Table/Thead.cjs +2 -2
- package/dist/Table/Thead.js +8 -17
- package/dist/Table/Tr.cjs +2 -2
- package/dist/Table/Tr.js +8 -17
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.js +26 -45
- package/dist/Tabs/TabPanels.cjs +1 -1
- package/dist/Tabs/TabPanels.js +24 -43
- package/dist/Tabs/Tabs.cjs +2 -2
- package/dist/Tabs/Tabs.js +94 -112
- package/dist/Tag/Tag.cjs +4 -4
- package/dist/Tag/Tag.js +27 -50
- package/dist/TextButton/TextButton.cjs +6 -6
- package/dist/TextButton/TextButton.js +39 -59
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.js +49 -69
- package/dist/Textarea/Textarea.cjs +3 -3
- package/dist/Textarea/Textarea.js +43 -63
- package/dist/Textarea/TextareaInput.cjs +4 -4
- package/dist/Textarea/TextareaInput.js +30 -50
- package/dist/TimePicker/TimePicker.cjs +3 -3
- package/dist/TimePicker/TimePicker.js +62 -95
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
- package/dist/ToggleCheckbox/ToggleCheckbox.js +56 -78
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.js +65 -97
- package/dist/Tooltip/Tooltip.cjs +2 -2
- package/dist/Tooltip/Tooltip.js +38 -57
- package/dist/Typography/TypographyProps.cjs +1 -1
- package/dist/Typography/TypographyProps.js +13 -22
- package/dist/helpers/getDefaultLocale.cjs +1 -1
- package/dist/helpers/getDefaultLocale.js +1 -1
- package/dist/helpers/handleResponsiveValues.cjs +5 -5
- package/dist/helpers/handleResponsiveValues.js +14 -14
- package/dist/index.cjs +1 -1
- package/dist/index.js +150 -148
- package/dist/themes/darkTheme/index.cjs +1 -1
- package/dist/themes/darkTheme/index.js +8 -18
- package/dist/themes/extendTheme.cjs +4 -4
- package/dist/themes/extendTheme.js +18 -29
- package/dist/themes/lightTheme/index.cjs +1 -1
- package/dist/themes/lightTheme/index.js +8 -18
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +23 -43
- package/dist/v2/Breadcrumbs/Crumb.cjs +1 -1
- package/dist/v2/Breadcrumbs/Crumb.js +22 -44
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbLink.js +14 -35
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +19 -41
- package/dist/v2/Link/Link.cjs +5 -5
- package/dist/v2/Link/Link.js +42 -64
- package/dist/v2/LinkButton/LinkButton.cjs +10 -10
- package/dist/v2/LinkButton/LinkButton.js +51 -75
- package/dist/v2/MainNav/MainNav.cjs +2 -2
- package/dist/v2/MainNav/MainNav.js +19 -40
- package/dist/v2/MainNav/NavBrand.cjs +3 -3
- package/dist/v2/MainNav/NavBrand.js +57 -78
- package/dist/v2/MainNav/NavCondense.cjs +3 -3
- package/dist/v2/MainNav/NavCondense.js +20 -40
- package/dist/v2/MainNav/NavFooter.cjs +3 -0
- package/dist/v2/MainNav/NavFooter.js +14 -0
- package/dist/v2/MainNav/NavLink.cjs +13 -13
- package/dist/v2/MainNav/NavLink.js +60 -81
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.js +46 -67
- package/dist/v2/MainNav/NavSections.cjs +4 -1
- package/dist/v2/MainNav/NavSections.js +23 -40
- package/dist/v2/MainNav/NavUser.cjs +2 -6
- package/dist/v2/MainNav/NavUser.js +31 -55
- package/dist/v2/MainNav/index.cjs +1 -1
- package/dist/v2/MainNav/index.js +14 -12
- package/dist/v2/Pagination/components.cjs +7 -7
- package/dist/v2/Pagination/components.js +65 -89
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +9 -9
- package/dist/v2/SimpleMenu/SimpleMenu.js +131 -156
- package/dist/v2/SubNav/SubNav.cjs +3 -3
- package/dist/v2/SubNav/SubNav.js +15 -37
- package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
- package/dist/v2/SubNav/SubNavHeader.js +38 -39
- package/dist/v2/SubNav/SubNavLink.cjs +6 -6
- package/dist/v2/SubNav/SubNavLink.js +42 -64
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.js +17 -39
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.js +37 -35
- package/package.json +4 -4
|
@@ -1,310 +1,259 @@
|
|
|
1
|
-
|
|
2
|
-
var $e = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var w = Object.getOwnPropertySymbols;
|
|
4
|
-
var J = Object.prototype.hasOwnProperty, Q = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var G = (o, i, a) => i in o ? Le(o, i, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[i] = a, B = (o, i) => {
|
|
6
|
-
for (var a in i || (i = {}))
|
|
7
|
-
J.call(i, a) && G(o, a, i[a]);
|
|
8
|
-
if (w)
|
|
9
|
-
for (var a of w(i))
|
|
10
|
-
Q.call(i, a) && G(o, a, i[a]);
|
|
11
|
-
return o;
|
|
12
|
-
}, D = (o, i) => we(o, $e(i));
|
|
13
|
-
var X = (o, i) => {
|
|
14
|
-
var a = {};
|
|
15
|
-
for (var p in o)
|
|
16
|
-
J.call(o, p) && i.indexOf(p) < 0 && (a[p] = o[p]);
|
|
17
|
-
if (o != null && w)
|
|
18
|
-
for (var p of w(o))
|
|
19
|
-
i.indexOf(p) < 0 && Q.call(o, p) && (a[p] = o[p]);
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
import r, { useState as k, useRef as y, useEffect as Y, useLayoutEffect as Re, Children as Z, cloneElement as Se } from "react";
|
|
1
|
+
import o, { useState as y, useRef as E, useEffect as U, useLayoutEffect as Ee, Children as _, cloneElement as xe } from "react";
|
|
23
2
|
import e from "prop-types";
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import { useId as
|
|
27
|
-
import { filterOptions as
|
|
28
|
-
import { Flex as
|
|
29
|
-
import { IconBox as
|
|
30
|
-
import { Popover as
|
|
31
|
-
import { Box as
|
|
32
|
-
import { Typography as
|
|
33
|
-
import { Loader as
|
|
34
|
-
import { MainRow as
|
|
35
|
-
import { ComboboxOption as
|
|
36
|
-
import { ComboboxList as
|
|
37
|
-
import { Field as
|
|
38
|
-
import { FieldLabel as
|
|
3
|
+
import ve from "@strapi/icons/CarretDown";
|
|
4
|
+
import ye from "@strapi/icons/Cross";
|
|
5
|
+
import { useId as Ie } from "../helpers/useId.js";
|
|
6
|
+
import { filterOptions as j, maintainScrollVisibility as ke, getActionFromKey as Oe, MenuActions as b, getUpdatedIndex as $ } from "./utils.js";
|
|
7
|
+
import { Flex as q } from "../Flex/Flex.js";
|
|
8
|
+
import { IconBox as Me, CaretBox as Le } from "../Select/components.js";
|
|
9
|
+
import { Popover as we } from "../Popover/Popover.js";
|
|
10
|
+
import { Box as $e } from "../Box/Box.js";
|
|
11
|
+
import { Typography as z } from "../Typography/Typography.js";
|
|
12
|
+
import { Loader as Re } from "../Loader/Loader.js";
|
|
13
|
+
import { MainRow as Se, InputContainer as Be, ValueContainer as De, Input as Fe } from "./components.js";
|
|
14
|
+
import { ComboboxOption as Te } from "./ComboboxOption.js";
|
|
15
|
+
import { ComboboxList as Ae } from "./ComboboxList.js";
|
|
16
|
+
import { Field as Pe } from "../Field/Field.js";
|
|
17
|
+
import { FieldLabel as Ve } from "../Field/FieldLabel.js";
|
|
39
18
|
import "../Field/FieldInput.js";
|
|
40
|
-
import { FieldHint as
|
|
41
|
-
import { FieldError as
|
|
19
|
+
import { FieldHint as Ke } from "../Field/FieldHint.js";
|
|
20
|
+
import { FieldError as Ne } from "../Field/FieldError.js";
|
|
42
21
|
import "../Field/FieldContext.js";
|
|
43
22
|
import "../Field/FieldAction.js";
|
|
44
|
-
import { Stack as
|
|
45
|
-
import { KeyboardKeys as
|
|
46
|
-
import { VisuallyHidden as
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"creatable",
|
|
74
|
-
"createMessage",
|
|
75
|
-
"disabled",
|
|
76
|
-
"error",
|
|
77
|
-
"hasMoreItems",
|
|
78
|
-
"hint",
|
|
79
|
-
"label",
|
|
80
|
-
"labelAction",
|
|
81
|
-
"loading",
|
|
82
|
-
"loadingMessage",
|
|
83
|
-
"noOptionsMessage",
|
|
84
|
-
"onChange",
|
|
85
|
-
"onClear",
|
|
86
|
-
"onCreateOption",
|
|
87
|
-
"onInputChange",
|
|
88
|
-
"onLoadMore",
|
|
89
|
-
"placeholder",
|
|
90
|
-
"required",
|
|
91
|
-
"value"
|
|
92
|
-
]);
|
|
93
|
-
const fe = () => {
|
|
94
|
-
var t;
|
|
95
|
-
return (t = o.find((n) => {
|
|
96
|
-
var l;
|
|
97
|
-
return ((l = n.props) == null ? void 0 : l.value.toLowerCase()) === m.toLowerCase();
|
|
98
|
-
}).props) == null ? void 0 : t.children;
|
|
99
|
-
}, [c, H] = k(0), [ue, me] = k(null), [f, U] = k(o), [g, be] = k(!1), [s, M] = k(""), x = y(), L = y(!1), I = y(), _ = y(), ge = y(), j = y(!0), d = Fe("combobox"), q = `${d}-label`;
|
|
100
|
-
if (!E && !de["aria-label"])
|
|
23
|
+
import { Stack as He } from "../Stack/Stack.js";
|
|
24
|
+
import { KeyboardKeys as Ue } from "../helpers/keyboardKeys.js";
|
|
25
|
+
import { VisuallyHidden as _e } from "../VisuallyHidden/VisuallyHidden.js";
|
|
26
|
+
const I = ({
|
|
27
|
+
children: s,
|
|
28
|
+
clearLabel: G,
|
|
29
|
+
creatable: x,
|
|
30
|
+
createMessage: J,
|
|
31
|
+
disabled: c,
|
|
32
|
+
error: M,
|
|
33
|
+
hasMoreItems: Q,
|
|
34
|
+
hint: R,
|
|
35
|
+
label: g,
|
|
36
|
+
labelAction: X,
|
|
37
|
+
loading: L,
|
|
38
|
+
loadingMessage: Y,
|
|
39
|
+
noOptionsMessage: Z,
|
|
40
|
+
onChange: S,
|
|
41
|
+
onClear: B,
|
|
42
|
+
onCreateOption: ee,
|
|
43
|
+
onInputChange: D,
|
|
44
|
+
onLoadMore: te,
|
|
45
|
+
placeholder: oe,
|
|
46
|
+
required: F,
|
|
47
|
+
value: d,
|
|
48
|
+
...re
|
|
49
|
+
}) => {
|
|
50
|
+
const ne = () => s.find((t) => t.props?.value.toLowerCase() === d.toLowerCase()).props?.children, [a, T] = y(0), [ae, ie] = y(null), [l, A] = y(s), [u, le] = y(!1), [n, k] = y(""), C = E(), O = E(!1), v = E(), P = E(), se = E(), V = E(!0), i = Ie("combobox"), K = `${i}-label`;
|
|
51
|
+
if (!g && !re["aria-label"])
|
|
101
52
|
throw new Error('The Combobox component needs a "label" or an "aria-label" props');
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}, [
|
|
105
|
-
|
|
106
|
-
}, [
|
|
107
|
-
|
|
108
|
-
}, [
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
const { key:
|
|
117
|
-
switch (
|
|
118
|
-
case
|
|
119
|
-
if (
|
|
120
|
-
|
|
53
|
+
U(() => {
|
|
54
|
+
A(j(s, n));
|
|
55
|
+
}, [n, s]), U(() => {
|
|
56
|
+
u && C.current && ke(C.current);
|
|
57
|
+
}, [a, u]), Ee(() => {
|
|
58
|
+
V.current && (V.current = !1);
|
|
59
|
+
}, [d]);
|
|
60
|
+
const ce = u ? `${i}-${a}` : "", N = () => {
|
|
61
|
+
S(null), k("");
|
|
62
|
+
}, pe = (t) => {
|
|
63
|
+
D && D(t);
|
|
64
|
+
const r = v.current.value;
|
|
65
|
+
A(j(s, r)), T(0), ie(null), n !== r && k(r), u || f(!0, !1);
|
|
66
|
+
}, de = (t) => {
|
|
67
|
+
const { key: r } = t, p = x && n ? l.length : l.length - 1, h = Oe(r, u);
|
|
68
|
+
switch (d && !n && r === Ue.BACKSPACE && N(), h) {
|
|
69
|
+
case b.Next: {
|
|
70
|
+
if (a === p) {
|
|
71
|
+
m(0);
|
|
121
72
|
break;
|
|
122
73
|
}
|
|
123
|
-
|
|
74
|
+
m($(a, p, h));
|
|
124
75
|
break;
|
|
125
76
|
}
|
|
126
|
-
case
|
|
127
|
-
if (
|
|
128
|
-
|
|
77
|
+
case b.Previous: {
|
|
78
|
+
if (a === 0) {
|
|
79
|
+
m(p);
|
|
129
80
|
break;
|
|
130
81
|
}
|
|
131
|
-
|
|
82
|
+
m($(a, p, h));
|
|
132
83
|
break;
|
|
133
84
|
}
|
|
134
|
-
case
|
|
135
|
-
case
|
|
136
|
-
if (
|
|
137
|
-
|
|
85
|
+
case b.Last:
|
|
86
|
+
case b.First: {
|
|
87
|
+
if (a === p) {
|
|
88
|
+
m(0);
|
|
138
89
|
break;
|
|
139
90
|
}
|
|
140
|
-
|
|
91
|
+
m($(a, p, h));
|
|
141
92
|
break;
|
|
142
93
|
}
|
|
143
|
-
case
|
|
144
|
-
t.preventDefault(),
|
|
94
|
+
case b.CloseSelect:
|
|
95
|
+
t.preventDefault(), w(a);
|
|
145
96
|
break;
|
|
146
|
-
case
|
|
147
|
-
t.preventDefault(),
|
|
97
|
+
case b.Close:
|
|
98
|
+
t.preventDefault(), f(!1);
|
|
148
99
|
break;
|
|
149
|
-
case
|
|
150
|
-
|
|
100
|
+
case b.Open:
|
|
101
|
+
f(!0);
|
|
151
102
|
break;
|
|
152
103
|
}
|
|
153
|
-
},
|
|
154
|
-
if (t.preventDefault(),
|
|
155
|
-
|
|
104
|
+
}, fe = (t) => {
|
|
105
|
+
if (t.preventDefault(), d && !O.current && k(""), O.current) {
|
|
106
|
+
O.current = !1;
|
|
156
107
|
return;
|
|
157
108
|
}
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
const
|
|
167
|
-
if (
|
|
168
|
-
|
|
109
|
+
f(!1, !1);
|
|
110
|
+
}, m = (t) => {
|
|
111
|
+
T(t);
|
|
112
|
+
}, ue = (t) => {
|
|
113
|
+
m(t), w(t);
|
|
114
|
+
}, H = () => {
|
|
115
|
+
O.current = !0;
|
|
116
|
+
}, w = (t) => {
|
|
117
|
+
const r = l[t];
|
|
118
|
+
if (k(""), r) {
|
|
119
|
+
S(r.props.value), f(!1);
|
|
169
120
|
return;
|
|
170
121
|
}
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
},
|
|
175
|
-
const
|
|
176
|
-
return
|
|
177
|
-
id: `${
|
|
178
|
-
"aria-selected":
|
|
179
|
-
"aria-posinset":
|
|
180
|
-
"aria-setsize":
|
|
181
|
-
ref(
|
|
182
|
-
|
|
122
|
+
x && (ee(n), f(!1));
|
|
123
|
+
}, f = (t, r = !0) => {
|
|
124
|
+
le(t), r && v.current.focus();
|
|
125
|
+
}, me = _.toArray(l).map((t, r) => {
|
|
126
|
+
const p = a === r;
|
|
127
|
+
return xe(t, {
|
|
128
|
+
id: `${i}-${r}`,
|
|
129
|
+
"aria-selected": ae === r,
|
|
130
|
+
"aria-posinset": r + 1,
|
|
131
|
+
"aria-setsize": _.toArray(l).length,
|
|
132
|
+
ref(h) {
|
|
133
|
+
p && (C.current = h);
|
|
183
134
|
},
|
|
184
|
-
onClick: () =>
|
|
185
|
-
onMouseDown:
|
|
186
|
-
isSelected:
|
|
135
|
+
onClick: () => ue(r),
|
|
136
|
+
onMouseDown: H,
|
|
137
|
+
isSelected: p
|
|
187
138
|
});
|
|
188
|
-
}),
|
|
189
|
-
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
const t =
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
return s && t === -1;
|
|
198
|
-
}, Me = (t) => {
|
|
199
|
-
t.preventDefault(), b(t, !0);
|
|
139
|
+
}), be = () => {
|
|
140
|
+
v.current.focus(), B && B(), N();
|
|
141
|
+
}, ge = () => {
|
|
142
|
+
v.current.focus(), f(!0);
|
|
143
|
+
}, Ce = () => {
|
|
144
|
+
const t = l.findIndex((r) => r.props?.children === n);
|
|
145
|
+
return n && t === -1;
|
|
146
|
+
}, he = (t) => {
|
|
147
|
+
t.preventDefault(), f(t, !0);
|
|
200
148
|
};
|
|
201
|
-
return /* @__PURE__ */
|
|
202
|
-
hint:
|
|
203
|
-
error:
|
|
204
|
-
id:
|
|
205
|
-
required:
|
|
206
|
-
}, /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ o.createElement(Pe, {
|
|
150
|
+
hint: R,
|
|
151
|
+
error: M,
|
|
152
|
+
id: i,
|
|
153
|
+
required: F
|
|
154
|
+
}, /* @__PURE__ */ o.createElement(_e, {
|
|
207
155
|
"aria-live": "polite",
|
|
208
156
|
"aria-atomic": "false",
|
|
209
157
|
"aria-relevant": "additions text"
|
|
210
|
-
},
|
|
211
|
-
spacing:
|
|
212
|
-
},
|
|
213
|
-
action:
|
|
214
|
-
},
|
|
215
|
-
ref:
|
|
216
|
-
$disabled:
|
|
217
|
-
hasError:
|
|
218
|
-
}, /* @__PURE__ */
|
|
158
|
+
}, d), /* @__PURE__ */ o.createElement(He, {
|
|
159
|
+
spacing: g || R || M ? 1 : 0
|
|
160
|
+
}, g && /* @__PURE__ */ o.createElement(Ve, {
|
|
161
|
+
action: X
|
|
162
|
+
}, g), /* @__PURE__ */ o.createElement(Se, {
|
|
163
|
+
ref: P,
|
|
164
|
+
$disabled: c,
|
|
165
|
+
hasError: M
|
|
166
|
+
}, /* @__PURE__ */ o.createElement(Be, {
|
|
219
167
|
wrap: "wrap"
|
|
220
|
-
}, !
|
|
221
|
-
id: `${
|
|
222
|
-
}, /* @__PURE__ */
|
|
223
|
-
"aria-activedescendant":
|
|
168
|
+
}, !n && d && /* @__PURE__ */ o.createElement(De, {
|
|
169
|
+
id: `${i}-selected-value`
|
|
170
|
+
}, /* @__PURE__ */ o.createElement(z, null, ne())), /* @__PURE__ */ o.createElement(Fe, {
|
|
171
|
+
"aria-activedescendant": ce,
|
|
224
172
|
"aria-autocomplete": "list",
|
|
225
|
-
"aria-controls": `${
|
|
226
|
-
"aria-disabled":
|
|
227
|
-
"aria-expanded":
|
|
173
|
+
"aria-controls": `${i}-listbox`,
|
|
174
|
+
"aria-disabled": c,
|
|
175
|
+
"aria-expanded": u,
|
|
228
176
|
"aria-haspopup": "listbox",
|
|
229
|
-
"aria-labelledby":
|
|
177
|
+
"aria-labelledby": g ? K : void 0,
|
|
230
178
|
autoComplete: "off",
|
|
231
179
|
autoCorrect: "off",
|
|
232
|
-
id:
|
|
233
|
-
onBlur:
|
|
234
|
-
onClick:
|
|
235
|
-
onInput:
|
|
236
|
-
onKeyDown:
|
|
237
|
-
placeholder:
|
|
238
|
-
readOnly:
|
|
239
|
-
ref:
|
|
240
|
-
required:
|
|
180
|
+
id: i,
|
|
181
|
+
onBlur: c ? void 0 : fe,
|
|
182
|
+
onClick: c ? void 0 : he,
|
|
183
|
+
onInput: c ? void 0 : pe,
|
|
184
|
+
onKeyDown: c ? void 0 : de,
|
|
185
|
+
placeholder: d ? "" : oe,
|
|
186
|
+
readOnly: c,
|
|
187
|
+
ref: v,
|
|
188
|
+
required: F,
|
|
241
189
|
role: "combobox",
|
|
242
190
|
spellCheck: "off",
|
|
243
191
|
type: "text",
|
|
244
|
-
value:
|
|
245
|
-
})), /* @__PURE__ */
|
|
246
|
-
id: `${
|
|
247
|
-
"aria-label":
|
|
248
|
-
disabled:
|
|
192
|
+
value: n
|
|
193
|
+
})), /* @__PURE__ */ o.createElement(q, null, (d || n) && /* @__PURE__ */ o.createElement(Me, {
|
|
194
|
+
id: `${i}-clear`,
|
|
195
|
+
"aria-label": G,
|
|
196
|
+
disabled: c,
|
|
249
197
|
paddingLeft: 3,
|
|
250
198
|
as: "button",
|
|
251
|
-
onClick:
|
|
199
|
+
onClick: be,
|
|
252
200
|
type: "button"
|
|
253
|
-
}, /* @__PURE__ */
|
|
254
|
-
disabled:
|
|
201
|
+
}, /* @__PURE__ */ o.createElement(ye, null)), /* @__PURE__ */ o.createElement(Le, {
|
|
202
|
+
disabled: c,
|
|
255
203
|
paddingLeft: 3,
|
|
256
204
|
"aria-hidden": !0,
|
|
257
205
|
as: "button",
|
|
258
|
-
onClick:
|
|
206
|
+
onClick: ge,
|
|
259
207
|
tabIndex: -1,
|
|
260
208
|
type: "button"
|
|
261
|
-
}, /* @__PURE__ */
|
|
262
|
-
id: `${
|
|
263
|
-
source:
|
|
209
|
+
}, /* @__PURE__ */ o.createElement(ve, null)))), /* @__PURE__ */ o.createElement(Ke, null), /* @__PURE__ */ o.createElement(Ne, null)), u && /* @__PURE__ */ o.createElement(we, {
|
|
210
|
+
id: `${i}-popover`,
|
|
211
|
+
source: P,
|
|
264
212
|
spacing: 4,
|
|
265
213
|
fullWidth: !0,
|
|
266
|
-
intersectionId: `${
|
|
267
|
-
onReachEnd:
|
|
268
|
-
}, /* @__PURE__ */
|
|
214
|
+
intersectionId: `${i}-listbox-popover-intersection`,
|
|
215
|
+
onReachEnd: Q && !L ? te : void 0
|
|
216
|
+
}, /* @__PURE__ */ o.createElement("div", {
|
|
269
217
|
role: "listbox",
|
|
270
|
-
ref:
|
|
271
|
-
id: `${
|
|
272
|
-
"aria-labelledby":
|
|
273
|
-
}, (Boolean(
|
|
274
|
-
activeOptionRef:
|
|
275
|
-
options:
|
|
276
|
-
}),
|
|
277
|
-
isSelected:
|
|
218
|
+
ref: se,
|
|
219
|
+
id: `${i}-listbox`,
|
|
220
|
+
"aria-labelledby": g ? K : void 0
|
|
221
|
+
}, (Boolean(l.length) || x) && /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(Ae, {
|
|
222
|
+
activeOptionRef: C,
|
|
223
|
+
options: me
|
|
224
|
+
}), Ce() && x && /* @__PURE__ */ o.createElement(Te, {
|
|
225
|
+
isSelected: a === l.length,
|
|
278
226
|
ref: (t) => {
|
|
279
|
-
|
|
227
|
+
a === l.length && (C.current = t);
|
|
280
228
|
},
|
|
281
|
-
onMouseDown:
|
|
282
|
-
onClick: () =>
|
|
229
|
+
onMouseDown: H,
|
|
230
|
+
onClick: () => w(),
|
|
283
231
|
taindex: 0
|
|
284
|
-
},
|
|
232
|
+
}, J(n))), !l.length && !x && !L && /* @__PURE__ */ o.createElement($e, {
|
|
285
233
|
paddingLeft: 4,
|
|
286
234
|
paddingRight: 4,
|
|
287
235
|
paddingTop: 2,
|
|
288
236
|
paddingBottom: 2,
|
|
289
|
-
ref:
|
|
290
|
-
}, /* @__PURE__ */
|
|
237
|
+
ref: C
|
|
238
|
+
}, /* @__PURE__ */ o.createElement(z, {
|
|
291
239
|
textColor: "neutral800"
|
|
292
|
-
},
|
|
240
|
+
}, Z(n))), L && /* @__PURE__ */ o.createElement(q, {
|
|
293
241
|
justifyContent: "center",
|
|
294
242
|
alignItems: "center",
|
|
295
243
|
paddingTop: 2,
|
|
296
244
|
paddingBottom: 2
|
|
297
|
-
}, /* @__PURE__ */
|
|
245
|
+
}, /* @__PURE__ */ o.createElement(Re, {
|
|
298
246
|
small: !0
|
|
299
|
-
},
|
|
300
|
-
},
|
|
247
|
+
}, Y)))));
|
|
248
|
+
}, W = (s) => /* @__PURE__ */ o.createElement(I, {
|
|
249
|
+
...s,
|
|
301
250
|
creatable: !0
|
|
302
|
-
})
|
|
303
|
-
|
|
251
|
+
});
|
|
252
|
+
I.defaultProps = {
|
|
304
253
|
"aria-label": void 0,
|
|
305
254
|
clearLabel: "clear",
|
|
306
255
|
creatable: !1,
|
|
307
|
-
createMessage: (
|
|
256
|
+
createMessage: (s) => `Create "${s}"`,
|
|
308
257
|
disabled: !1,
|
|
309
258
|
error: void 0,
|
|
310
259
|
hasMoreItems: !1,
|
|
@@ -320,8 +269,8 @@ O.defaultProps = {
|
|
|
320
269
|
placeholder: "Select or enter a value",
|
|
321
270
|
value: void 0
|
|
322
271
|
};
|
|
323
|
-
|
|
324
|
-
|
|
272
|
+
W.defaultProps = I.defaultProps;
|
|
273
|
+
I.propTypes = {
|
|
325
274
|
"aria-label": e.string,
|
|
326
275
|
children: e.oneOfType([e.arrayOf(e.node), e.node]),
|
|
327
276
|
clearLabel: e.string,
|
|
@@ -344,10 +293,11 @@ O.propTypes = {
|
|
|
344
293
|
placeholder: e.string,
|
|
345
294
|
value: e.string
|
|
346
295
|
};
|
|
347
|
-
|
|
296
|
+
W.propTypes = {
|
|
297
|
+
...I.propTypes,
|
|
348
298
|
onCreateOption: e.func.isRequired
|
|
349
|
-
}
|
|
299
|
+
};
|
|
350
300
|
export {
|
|
351
|
-
|
|
352
|
-
|
|
301
|
+
I as Combobox,
|
|
302
|
+
W as CreatableCombobox
|
|
353
303
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),d=require("prop-types"),i=require("../Typography/Typography.cjs"),s=require("./components.cjs"),n=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=n(a),o=n(d),t=a.forwardRef(({isSelected:e,children:p,...u},l)=>r.default.createElement(s.OptionBox,{hasRadius:!0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2,role:"option",background:"neutral0",isSelected:e,ref:l,...u},r.default.createElement(i.Typography,{textColor:e?"primary600":"neutral800",fontWeight:e?"bold":null},p)));t.defaultProps={isSelected:!1};t.propTypes={children:o.default.oneOfType([o.default.string,o.default.number]).isRequired,isSelected:o.default.bool};t.displayName="ComboboxOption";exports.ComboboxOption=t;
|
|
@@ -1,52 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import s, { forwardRef as b } from "react";
|
|
22
|
-
import i from "prop-types";
|
|
23
|
-
import { Typography as y } from "../Typography/Typography.js";
|
|
24
|
-
import { OptionBox as c } from "./components.js";
|
|
25
|
-
const n = b((h, t) => {
|
|
26
|
-
var a = h, { isSelected: o, children: r } = a, e = u(a, ["isSelected", "children"]);
|
|
27
|
-
return /* @__PURE__ */ s.createElement(c, f({
|
|
28
|
-
hasRadius: !0,
|
|
29
|
-
paddingLeft: 4,
|
|
30
|
-
paddingRight: 4,
|
|
31
|
-
paddingTop: 2,
|
|
32
|
-
paddingBottom: 2,
|
|
33
|
-
role: "option",
|
|
34
|
-
background: "neutral0",
|
|
35
|
-
isSelected: o,
|
|
36
|
-
ref: t
|
|
37
|
-
}, e), /* @__PURE__ */ s.createElement(y, {
|
|
38
|
-
textColor: o ? "primary600" : "neutral800",
|
|
39
|
-
fontWeight: o ? "bold" : null
|
|
40
|
-
}, r));
|
|
41
|
-
});
|
|
42
|
-
n.defaultProps = {
|
|
1
|
+
import t, { forwardRef as a } from "react";
|
|
2
|
+
import o from "prop-types";
|
|
3
|
+
import { Typography as d } from "../Typography/Typography.js";
|
|
4
|
+
import { OptionBox as m } from "./components.js";
|
|
5
|
+
const r = a(({ isSelected: e, children: p, ...i }, n) => /* @__PURE__ */ t.createElement(m, {
|
|
6
|
+
hasRadius: !0,
|
|
7
|
+
paddingLeft: 4,
|
|
8
|
+
paddingRight: 4,
|
|
9
|
+
paddingTop: 2,
|
|
10
|
+
paddingBottom: 2,
|
|
11
|
+
role: "option",
|
|
12
|
+
background: "neutral0",
|
|
13
|
+
isSelected: e,
|
|
14
|
+
ref: n,
|
|
15
|
+
...i
|
|
16
|
+
}, /* @__PURE__ */ t.createElement(d, {
|
|
17
|
+
textColor: e ? "primary600" : "neutral800",
|
|
18
|
+
fontWeight: e ? "bold" : null
|
|
19
|
+
}, p)));
|
|
20
|
+
r.defaultProps = {
|
|
43
21
|
isSelected: !1
|
|
44
22
|
};
|
|
45
|
-
|
|
46
|
-
children:
|
|
47
|
-
isSelected:
|
|
23
|
+
r.propTypes = {
|
|
24
|
+
children: o.oneOfType([o.string, o.number]).isRequired,
|
|
25
|
+
isSelected: o.bool
|
|
48
26
|
};
|
|
49
|
-
|
|
27
|
+
r.displayName = "ComboboxOption";
|
|
50
28
|
export {
|
|
51
|
-
|
|
29
|
+
r as ComboboxOption
|
|
52
30
|
};
|
package/dist/Combobox/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("compute-scroll-into-view"),r=require("../helpers/keyboardKeys.cjs"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},c=a(l),t={Close:"Close",CloseSelect:"CloseSelect",First:"First",Last:"Last",Next:"Next",Open:"Open",PageDown:"PageDown",PageUp:"PageUp",Previous:"Previous",Select:"Select",Space:"Space",Type:"Type"},u={Close:"Close",First:"First",Last:"Last",Next:"Next",Open:"Open",Previous:"Previous",Select:"Select",UpLevel:"UpLevel"};function d(e=[],o=null,s=[]){const n=String(o??"").toLowerCase();return n?e.filter(i=>i.props.children.toString().toLowerCase().includes(n)&&s.indexOf(i)<0):e}function p(e,o){if(!o&&e===r.KeyboardKeys.DOWN)return t.Open;if(e===r.KeyboardKeys.DOWN)return t.Next;if(e===r.KeyboardKeys.UP)return t.Previous;if(e===r.KeyboardKeys.HOME)return t.First;if(e===r.KeyboardKeys.END)return t.Last;if(e===r.KeyboardKeys.ESCAPE)return t.Close;if(e===r.KeyboardKeys.ENTER)return t.CloseSelect;if(e===r.KeyboardKeys.BACKSPACE||e===r.KeyboardKeys.CLEAR||e.length===1)return t.Type}function f(e,o,s){switch(s){case t.First:return 0;case t.Last:return o;case t.Previous:return Math.max(0,e-1);case t.Next:return Math.min(o,e+1);default:return e}}function y(e){c.default(e,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}).forEach(({el:s,top:n,left:i})=>{s.scrollTop=n,s.scrollLeft=i})}exports.MenuActions=t;exports.TreeActions=u;exports.filterOptions=d;exports.getActionFromKey=p;exports.getUpdatedIndex=f;exports.maintainScrollVisibility=y;
|