@strapi/design-system 1.4.2 → 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/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 +85 -117
- 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 +3 -3
package/dist/Select/Select.js
CHANGED
|
@@ -1,220 +1,179 @@
|
|
|
1
|
-
|
|
2
|
-
var B = Object.getOwnPropertySymbols;
|
|
3
|
-
var G = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var z = (o, l, i) => l in o ? se(o, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[l] = i, W = (o, l) => {
|
|
5
|
-
for (var i in l || (l = {}))
|
|
6
|
-
G.call(l, i) && z(o, i, l[i]);
|
|
7
|
-
if (B)
|
|
8
|
-
for (var i of B(l))
|
|
9
|
-
H.call(l, i) && z(o, i, l[i]);
|
|
10
|
-
return o;
|
|
11
|
-
};
|
|
12
|
-
var N = (o, l) => {
|
|
13
|
-
var i = {};
|
|
14
|
-
for (var s in o)
|
|
15
|
-
G.call(o, s) && l.indexOf(s) < 0 && (i[s] = o[s]);
|
|
16
|
-
if (o != null && B)
|
|
17
|
-
for (var s of B(o))
|
|
18
|
-
l.indexOf(s) < 0 && H.call(o, s) && (i[s] = o[s]);
|
|
19
|
-
return i;
|
|
20
|
-
};
|
|
21
|
-
import r, { useState as ae, useRef as pe, Children as J, cloneElement as K } from "react";
|
|
1
|
+
import r, { useState as ee, useRef as te, Children as j, cloneElement as A } from "react";
|
|
22
2
|
import e from "prop-types";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import { sizes as
|
|
27
|
-
import { SelectButton as
|
|
28
|
-
import { Field as
|
|
29
|
-
import { FieldLabel as
|
|
3
|
+
import re from "@strapi/icons/CarretDown";
|
|
4
|
+
import oe from "@strapi/icons/Cross";
|
|
5
|
+
import ne from "styled-components";
|
|
6
|
+
import { sizes as ie } from "../themes/sizes.js";
|
|
7
|
+
import { SelectButton as le } from "./SelectButton.js";
|
|
8
|
+
import { Field as se } from "../Field/Field.js";
|
|
9
|
+
import { FieldLabel as ae } from "../Field/FieldLabel.js";
|
|
30
10
|
import "../Field/FieldInput.js";
|
|
31
|
-
import { FieldHint as
|
|
32
|
-
import { FieldError as
|
|
11
|
+
import { FieldHint as pe } from "../Field/FieldHint.js";
|
|
12
|
+
import { FieldError as ce } from "../Field/FieldError.js";
|
|
33
13
|
import "../Field/FieldContext.js";
|
|
34
14
|
import "../Field/FieldAction.js";
|
|
35
|
-
import { Popover as
|
|
36
|
-
import { Stack as
|
|
37
|
-
import { Typography as
|
|
38
|
-
import { Flex as
|
|
39
|
-
import { Box as
|
|
40
|
-
import { useId as
|
|
41
|
-
import { SelectList as
|
|
42
|
-
import { SelectButtonWrapper as
|
|
43
|
-
import { useButtonRef as
|
|
44
|
-
import { VisuallyHidden as
|
|
45
|
-
import { DownState as
|
|
46
|
-
import { escapeSelector as
|
|
47
|
-
import { SelectTags as
|
|
48
|
-
const
|
|
15
|
+
import { Popover as me } from "../Popover/Popover.js";
|
|
16
|
+
import { Stack as de } from "../Stack/Stack.js";
|
|
17
|
+
import { Typography as P } from "../Typography/Typography.js";
|
|
18
|
+
import { Flex as C } from "../Flex/Flex.js";
|
|
19
|
+
import { Box as _ } from "../Box/Box.js";
|
|
20
|
+
import { useId as fe } from "../helpers/useId.js";
|
|
21
|
+
import { SelectList as ue } from "./SelectList.js";
|
|
22
|
+
import { SelectButtonWrapper as he, IconBox as Ee, CaretBox as be } from "./components.js";
|
|
23
|
+
import { useButtonRef as ye } from "./hooks/useButtonRef.js";
|
|
24
|
+
import { VisuallyHidden as q } from "../VisuallyHidden/VisuallyHidden.js";
|
|
25
|
+
import { DownState as ge } from "./constants.js";
|
|
26
|
+
import { escapeSelector as z } from "../helpers/escapeSelector.js";
|
|
27
|
+
import { SelectTags as ve } from "./SelectTags.js";
|
|
28
|
+
const Be = ne(C)`
|
|
49
29
|
width: 100%;
|
|
50
|
-
`,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"children",
|
|
77
|
-
"customizeContent",
|
|
78
|
-
"placeholder",
|
|
79
|
-
"onChange",
|
|
80
|
-
"value",
|
|
81
|
-
"hint",
|
|
82
|
-
"error",
|
|
83
|
-
"disabled",
|
|
84
|
-
"clearLabel",
|
|
85
|
-
"onClear",
|
|
86
|
-
"onReachEnd",
|
|
87
|
-
"multi",
|
|
88
|
-
"required",
|
|
89
|
-
"selectButtonTitle",
|
|
90
|
-
"size",
|
|
91
|
-
"startIcon",
|
|
92
|
-
"withTags"
|
|
93
|
-
]);
|
|
94
|
-
const a = Be("select", i), [y, g] = ae(void 0), F = Se(y), M = pe(null), k = `${a}-label`, v = `${a}-content`, j = typeof E == "string";
|
|
95
|
-
let I;
|
|
96
|
-
if (j ? I = `${a}-error` : C && (I = `${a}-hint`), b && !p)
|
|
30
|
+
`, G = ({
|
|
31
|
+
label: m,
|
|
32
|
+
labelAction: H,
|
|
33
|
+
id: W,
|
|
34
|
+
children: N,
|
|
35
|
+
customizeContent: d,
|
|
36
|
+
placeholder: y,
|
|
37
|
+
onChange: g,
|
|
38
|
+
value: o,
|
|
39
|
+
hint: v,
|
|
40
|
+
error: f,
|
|
41
|
+
disabled: s,
|
|
42
|
+
clearLabel: I,
|
|
43
|
+
onClear: S,
|
|
44
|
+
onReachEnd: J,
|
|
45
|
+
multi: i,
|
|
46
|
+
required: K,
|
|
47
|
+
selectButtonTitle: Q,
|
|
48
|
+
size: U,
|
|
49
|
+
startIcon: x,
|
|
50
|
+
withTags: u,
|
|
51
|
+
...X
|
|
52
|
+
}) => {
|
|
53
|
+
const n = fe("select", W), [h, E] = ee(void 0), $ = ye(h), R = te(null), w = `${n}-label`, b = `${n}-content`, D = typeof f == "string";
|
|
54
|
+
let B;
|
|
55
|
+
if (D ? B = `${n}-error` : v && (B = `${n}-hint`), u && !i)
|
|
97
56
|
throw new Error('The "withTags" props can only be used when the "multi" prop is present');
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
t.preventDefault(), !
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
57
|
+
const Y = () => {
|
|
58
|
+
E(void 0);
|
|
59
|
+
}, Z = () => {
|
|
60
|
+
s || (S(), $.current.focus());
|
|
61
|
+
}, L = (t) => {
|
|
62
|
+
t.preventDefault(), !s && (t.nativeEvent.which === 3 || t.nativeEvent.button === 2 || E(ge.Mouse));
|
|
63
|
+
}, O = (t, l = !0) => {
|
|
64
|
+
i ? g(o.includes(t) ? o.filter((a) => a !== t) : [...o, t]) : (g(t), l && E(void 0));
|
|
65
|
+
}, F = (t) => {
|
|
66
|
+
g(
|
|
67
|
+
o.includes(t[0]) ? o.filter((l, a, c) => c.indexOf(l) < 0, t) : [...o, ...t]
|
|
109
68
|
);
|
|
110
69
|
};
|
|
111
|
-
let
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
return
|
|
115
|
-
id:
|
|
116
|
-
onClick: () =>
|
|
117
|
-
selected:
|
|
118
|
-
multi:
|
|
119
|
-
isChild:
|
|
70
|
+
let T, M = [];
|
|
71
|
+
const k = (t, l) => {
|
|
72
|
+
const a = `${n}-option-${t.props.value}`, c = i ? o.includes(t.props.value) : t.props.value === o;
|
|
73
|
+
return c && (u ? M.push({ label: t.props.children, value: t.props.value }) : T = t.props.children), A(t, {
|
|
74
|
+
id: z(a),
|
|
75
|
+
onClick: () => O(t.props.value),
|
|
76
|
+
selected: c,
|
|
77
|
+
multi: i,
|
|
78
|
+
isChild: l
|
|
120
79
|
});
|
|
121
|
-
},
|
|
80
|
+
}, V = j.toArray(N).map((t) => {
|
|
122
81
|
if (t.type.displayName === "OptGroup") {
|
|
123
|
-
const
|
|
124
|
-
return
|
|
125
|
-
id:
|
|
126
|
-
onClick: () =>
|
|
127
|
-
selected:
|
|
128
|
-
indeterminate:
|
|
129
|
-
multi:
|
|
130
|
-
children:
|
|
82
|
+
const l = `${n}-option-${t.props.label}`, a = t.props.children.every((p) => o.includes(p.props.value)), c = !a && t.props.children.some((p) => o.includes(p.props.value));
|
|
83
|
+
return A(t, {
|
|
84
|
+
id: z(l),
|
|
85
|
+
onClick: () => F(t.props.children.map((p) => p.props.value)),
|
|
86
|
+
selected: a,
|
|
87
|
+
indeterminate: c,
|
|
88
|
+
multi: i,
|
|
89
|
+
children: j.toArray(t.props.children).map((p) => k(p, !0)),
|
|
131
90
|
value: t.props.label
|
|
132
91
|
});
|
|
133
92
|
}
|
|
134
|
-
return
|
|
93
|
+
return k(t);
|
|
135
94
|
});
|
|
136
|
-
return /* @__PURE__ */ r.createElement(
|
|
137
|
-
hint:
|
|
138
|
-
error:
|
|
139
|
-
id:
|
|
140
|
-
required:
|
|
141
|
-
}, /* @__PURE__ */ r.createElement(
|
|
142
|
-
spacing:
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
95
|
+
return /* @__PURE__ */ r.createElement(se, {
|
|
96
|
+
hint: v,
|
|
97
|
+
error: f,
|
|
98
|
+
id: n,
|
|
99
|
+
required: K
|
|
100
|
+
}, /* @__PURE__ */ r.createElement(de, {
|
|
101
|
+
spacing: m || v || D ? 1 : 0
|
|
102
|
+
}, m && /* @__PURE__ */ r.createElement(ae, {
|
|
103
|
+
action: H
|
|
104
|
+
}, m), /* @__PURE__ */ r.createElement(he, {
|
|
105
|
+
size: U,
|
|
106
|
+
hasError: Boolean(f),
|
|
107
|
+
disabled: s,
|
|
108
|
+
ref: R
|
|
109
|
+
}, /* @__PURE__ */ r.createElement(le, {
|
|
110
|
+
ref: $,
|
|
111
|
+
labelledBy: `${n} ${w} ${b}`,
|
|
112
|
+
"aria-describedby": B,
|
|
113
|
+
expanded: Boolean(h),
|
|
114
|
+
onTrigger: E,
|
|
115
|
+
id: n,
|
|
116
|
+
hasError: Boolean(f),
|
|
117
|
+
disabled: s,
|
|
118
|
+
onMouseDown: L,
|
|
119
|
+
...X
|
|
120
|
+
}), /* @__PURE__ */ r.createElement(Be, {
|
|
162
121
|
justifyContent: "space-between"
|
|
163
|
-
}, /* @__PURE__ */ r.createElement(
|
|
122
|
+
}, /* @__PURE__ */ r.createElement(C, null, x && /* @__PURE__ */ r.createElement(_, {
|
|
164
123
|
paddingLeft: 3,
|
|
165
124
|
"aria-hidden": !0
|
|
166
|
-
},
|
|
167
|
-
tags:
|
|
168
|
-
onRemoveTag:
|
|
169
|
-
disabled:
|
|
170
|
-
}), /* @__PURE__ */ r.createElement(
|
|
125
|
+
}, x), u && /* @__PURE__ */ r.createElement(ve, {
|
|
126
|
+
tags: M,
|
|
127
|
+
onRemoveTag: O,
|
|
128
|
+
disabled: s
|
|
129
|
+
}), /* @__PURE__ */ r.createElement(_, {
|
|
171
130
|
paddingLeft: 4,
|
|
172
131
|
paddingRight: 4
|
|
173
|
-
},
|
|
132
|
+
}, u ? /* @__PURE__ */ r.createElement(r.Fragment, null, !o || o.length === 0 ? /* @__PURE__ */ r.createElement(P, {
|
|
174
133
|
ellipsis: !0,
|
|
175
|
-
id:
|
|
134
|
+
id: b,
|
|
176
135
|
textColor: "neutral600"
|
|
177
|
-
},
|
|
136
|
+
}, y) : null, /* @__PURE__ */ r.createElement(q, {
|
|
178
137
|
as: "span",
|
|
179
|
-
id:
|
|
180
|
-
},
|
|
138
|
+
id: b
|
|
139
|
+
}, d ? d(o) : T || y, o.join(", "))) : /* @__PURE__ */ r.createElement(P, {
|
|
181
140
|
ellipsis: !0,
|
|
182
|
-
id:
|
|
183
|
-
textColor:
|
|
184
|
-
},
|
|
141
|
+
id: b,
|
|
142
|
+
textColor: o ? "neutral800" : "neutral600"
|
|
143
|
+
}, d ? d(o) : T || y, i && /* @__PURE__ */ r.createElement(q, {
|
|
185
144
|
as: "span"
|
|
186
|
-
},
|
|
145
|
+
}, o.join(", "))))), /* @__PURE__ */ r.createElement(C, null, (i && o && o.length || !i && o) && S && /* @__PURE__ */ r.createElement(Ee, {
|
|
187
146
|
as: "button",
|
|
188
147
|
type: "button",
|
|
189
|
-
onClick:
|
|
190
|
-
"aria-label":
|
|
191
|
-
"aria-disabled":
|
|
192
|
-
title:
|
|
193
|
-
}, /* @__PURE__ */ r.createElement(
|
|
148
|
+
onClick: Z,
|
|
149
|
+
"aria-label": I,
|
|
150
|
+
"aria-disabled": s,
|
|
151
|
+
title: I
|
|
152
|
+
}, /* @__PURE__ */ r.createElement(oe, null)), /* @__PURE__ */ r.createElement(be, {
|
|
194
153
|
paddingLeft: 3,
|
|
195
154
|
"aria-hidden": !0,
|
|
196
155
|
as: "button",
|
|
197
156
|
type: "button",
|
|
198
|
-
onMouseDown:
|
|
157
|
+
onMouseDown: L,
|
|
199
158
|
tabIndex: -1,
|
|
200
|
-
disabled:
|
|
201
|
-
title:
|
|
202
|
-
}, /* @__PURE__ */ r.createElement(
|
|
203
|
-
source:
|
|
159
|
+
disabled: s,
|
|
160
|
+
title: Q
|
|
161
|
+
}, /* @__PURE__ */ r.createElement(re, null))))), /* @__PURE__ */ r.createElement(pe, null), /* @__PURE__ */ r.createElement(ce, null)), h && /* @__PURE__ */ r.createElement(me, {
|
|
162
|
+
source: R,
|
|
204
163
|
spacing: 4,
|
|
205
164
|
fullWidth: !0,
|
|
206
|
-
intersectionId: `select-list-intersection-${
|
|
207
|
-
onReachEnd:
|
|
208
|
-
}, /* @__PURE__ */ r.createElement(
|
|
209
|
-
selectId:
|
|
210
|
-
labelledBy:
|
|
211
|
-
onEscape:
|
|
212
|
-
expanded:
|
|
213
|
-
onSelectItem: (t,
|
|
214
|
-
multi:
|
|
215
|
-
},
|
|
165
|
+
intersectionId: `select-list-intersection-${n}`,
|
|
166
|
+
onReachEnd: J
|
|
167
|
+
}, /* @__PURE__ */ r.createElement(ue, {
|
|
168
|
+
selectId: n,
|
|
169
|
+
labelledBy: m ? w : void 0,
|
|
170
|
+
onEscape: Y,
|
|
171
|
+
expanded: h,
|
|
172
|
+
onSelectItem: (t, l) => l ? F(t) : O(t, !1),
|
|
173
|
+
multi: i
|
|
174
|
+
}, V)));
|
|
216
175
|
};
|
|
217
|
-
|
|
176
|
+
G.defaultProps = {
|
|
218
177
|
"aria-label": void 0,
|
|
219
178
|
children: [],
|
|
220
179
|
clearLabel: "Clear",
|
|
@@ -238,7 +197,7 @@ Z.defaultProps = {
|
|
|
238
197
|
startIcon: void 0,
|
|
239
198
|
withTags: !1
|
|
240
199
|
};
|
|
241
|
-
|
|
200
|
+
G.propTypes = {
|
|
242
201
|
"aria-label": e.string,
|
|
243
202
|
children: e.oneOfType([e.arrayOf(e.node), e.node]),
|
|
244
203
|
clearLabel: e.string,
|
|
@@ -256,7 +215,7 @@ Z.propTypes = {
|
|
|
256
215
|
placeholder: e.string,
|
|
257
216
|
required: e.bool,
|
|
258
217
|
selectButtonTitle: e.string,
|
|
259
|
-
size: e.oneOf(Object.keys(
|
|
218
|
+
size: e.oneOf(Object.keys(ie.input)),
|
|
260
219
|
startIcon: e.element,
|
|
261
220
|
value: e.oneOfType([
|
|
262
221
|
e.arrayOf(e.oneOfType([e.string, e.number])),
|
|
@@ -266,5 +225,5 @@ Z.propTypes = {
|
|
|
266
225
|
withTags: e.bool
|
|
267
226
|
};
|
|
268
227
|
export {
|
|
269
|
-
|
|
228
|
+
G as Select
|
|
270
229
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react"),b=require("prop-types"),f=require("styled-components"),t=require("../helpers/keyboardKeys.cjs"),l=require("./constants.cjs"),r=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},K=r(u),a=r(b),h=r(f),S=h.default.button`
|
|
2
2
|
position: absolute;
|
|
3
3
|
left: 0;
|
|
4
4
|
right: 0;
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
&[aria-disabled='true'] {
|
|
17
17
|
cursor: not-allowed;
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`,o=u.forwardRef(({labelledBy:e,expanded:c,onTrigger:n,disabled:d,...i},y)=>{const p=s=>{if(!d)switch(s.key){case t.KeyboardKeys.DOWN:case t.KeyboardKeys.SPACE:case t.KeyboardKeys.ENTER:{s.preventDefault(),n(l.DownState.Keyboard);break}case t.KeyboardKeys.UP:{s.preventDefault(),n(l.UpState.Keyboard);break}}};return K.default.createElement(S,{ref:y,"aria-labelledby":e,"aria-haspopup":"listbox","aria-expanded":c,onKeyDown:p,"aria-disabled":d,type:"button",...i})});o.displayName="SelectButton";o.defaultProps={expanded:!1,disabled:!1};o.propTypes={disabled:a.default.bool,expanded:a.default.bool,labelledBy:a.default.string.isRequired,onTrigger:a.default.func.isRequired};exports.SelectButton=o;
|
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (r)
|
|
8
|
-
for (var t of r(o))
|
|
9
|
-
b.call(o, t) && p(e, t, o[t]);
|
|
10
|
-
return e;
|
|
11
|
-
};
|
|
12
|
-
var f = (e, o) => {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var a in e)
|
|
15
|
-
u.call(e, a) && o.indexOf(a) < 0 && (t[a] = e[a]);
|
|
16
|
-
if (e != null && r)
|
|
17
|
-
for (var a of r(e))
|
|
18
|
-
o.indexOf(a) < 0 && b.call(e, a) && (t[a] = e[a]);
|
|
19
|
-
return t;
|
|
20
|
-
};
|
|
21
|
-
import S, { forwardRef as D } from "react";
|
|
22
|
-
import n from "prop-types";
|
|
23
|
-
import K from "styled-components";
|
|
24
|
-
import { KeyboardKeys as s } from "../helpers/keyboardKeys.js";
|
|
25
|
-
import { UpState as k, DownState as x } from "./constants.js";
|
|
26
|
-
const R = K.button`
|
|
1
|
+
import u, { forwardRef as b } from "react";
|
|
2
|
+
import e from "prop-types";
|
|
3
|
+
import c from "styled-components";
|
|
4
|
+
import { KeyboardKeys as t } from "../helpers/keyboardKeys.js";
|
|
5
|
+
import { UpState as f, DownState as y } from "./constants.js";
|
|
6
|
+
const m = c.button`
|
|
27
7
|
position: absolute;
|
|
28
8
|
left: 0;
|
|
29
9
|
right: 0;
|
|
@@ -41,44 +21,44 @@ const R = K.button`
|
|
|
41
21
|
&[aria-disabled='true'] {
|
|
42
22
|
cursor: not-allowed;
|
|
43
23
|
}
|
|
44
|
-
`,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
case
|
|
50
|
-
case
|
|
51
|
-
|
|
52
|
-
d.preventDefault(), t(x.Keyboard);
|
|
24
|
+
`, a = b(({ labelledBy: s, expanded: d, onTrigger: r, disabled: n, ...l }, i) => {
|
|
25
|
+
const p = (o) => {
|
|
26
|
+
if (!n)
|
|
27
|
+
switch (o.key) {
|
|
28
|
+
case t.DOWN:
|
|
29
|
+
case t.SPACE:
|
|
30
|
+
case t.ENTER: {
|
|
31
|
+
o.preventDefault(), r(y.Keyboard);
|
|
53
32
|
break;
|
|
54
33
|
}
|
|
55
|
-
case
|
|
56
|
-
|
|
34
|
+
case t.UP: {
|
|
35
|
+
o.preventDefault(), r(f.Keyboard);
|
|
57
36
|
break;
|
|
58
37
|
}
|
|
59
38
|
}
|
|
60
39
|
};
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
ref:
|
|
63
|
-
"aria-labelledby":
|
|
40
|
+
return /* @__PURE__ */ u.createElement(m, {
|
|
41
|
+
ref: i,
|
|
42
|
+
"aria-labelledby": s,
|
|
64
43
|
"aria-haspopup": "listbox",
|
|
65
|
-
"aria-expanded":
|
|
66
|
-
onKeyDown:
|
|
67
|
-
"aria-disabled":
|
|
68
|
-
type: "button"
|
|
69
|
-
|
|
44
|
+
"aria-expanded": d,
|
|
45
|
+
onKeyDown: p,
|
|
46
|
+
"aria-disabled": n,
|
|
47
|
+
type: "button",
|
|
48
|
+
...l
|
|
49
|
+
});
|
|
70
50
|
});
|
|
71
|
-
|
|
72
|
-
|
|
51
|
+
a.displayName = "SelectButton";
|
|
52
|
+
a.defaultProps = {
|
|
73
53
|
expanded: !1,
|
|
74
54
|
disabled: !1
|
|
75
55
|
};
|
|
76
|
-
|
|
77
|
-
disabled:
|
|
78
|
-
expanded:
|
|
79
|
-
labelledBy:
|
|
80
|
-
onTrigger:
|
|
56
|
+
a.propTypes = {
|
|
57
|
+
disabled: e.bool,
|
|
58
|
+
expanded: e.bool,
|
|
59
|
+
labelledBy: e.string.isRequired,
|
|
60
|
+
onTrigger: e.func.isRequired
|
|
81
61
|
};
|
|
82
62
|
export {
|
|
83
|
-
|
|
63
|
+
a as SelectButton
|
|
84
64
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),z=require("prop-types"),U=require("styled-components"),H=require("react-router-dom"),M=require("@radix-ui/react-use-callback-ref"),G=require("@strapi/icons/CarretDown"),q=require("../Typography/Typography.cjs"),J=require("../Link/Link.cjs"),b=require("../Box/Box.cjs"),Q=require("../Flex/Flex.cjs"),w=require("../Button/Button.cjs"),j=require("../Popover/Popover.cjs"),B=require("./utils.cjs"),X=require("../helpers/useId.cjs"),s=require("../helpers/keyboardKeys.cjs"),x=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},o=x(a),t=x(z),E=x(U),Y=x(G),Z=E.default.button`
|
|
2
2
|
border: none;
|
|
3
3
|
padding: 0;
|
|
4
4
|
background: transparent;
|
|
5
5
|
cursor: pointer;
|
|
6
|
-
${
|
|
7
|
-
`,
|
|
6
|
+
${B.getOptionStyle}
|
|
7
|
+
`,ee=E.default(H.NavLink)`
|
|
8
8
|
text-decoration: none;
|
|
9
|
-
${
|
|
10
|
-
`,
|
|
9
|
+
${B.getOptionStyle}
|
|
10
|
+
`,te=E.default(J.Link)`
|
|
11
11
|
/* Removing Link hover effect */
|
|
12
12
|
&:hover {
|
|
13
13
|
color: currentColor;
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
${
|
|
26
|
-
`,
|
|
25
|
+
${B.getOptionStyle}
|
|
26
|
+
`,ne=E.default.span`
|
|
27
27
|
display: flex;
|
|
28
28
|
align-items: center;
|
|
29
29
|
svg {
|
|
30
30
|
height: 4px;
|
|
31
31
|
width: 6px;
|
|
32
32
|
}
|
|
33
|
-
`,
|
|
33
|
+
`,oe=E.default(w.Button)`
|
|
34
34
|
padding: ${({theme:e})=>`${e.spaces[1]} ${e.spaces[3]}`};
|
|
35
|
-
`,
|
|
35
|
+
`,D=({children:e,onClick:h,to:u,isFocused:l,href:c,...C})=>{const d=a.useRef();a.useEffect(()=>{l&&d.current&&d.current.focus()},[l]);const i={tabIndex:l?0:-1,ref:d,role:"menuitem",...C},f=v=>{(v.key===s.KeyboardKeys.SPACE||v.key===s.KeyboardKeys.ENTER)&&h()};return u&&!c?o.default.createElement(ee,{to:u,...i},o.default.createElement(b.Box,{padding:2},o.default.createElement(q.Typography,null,e))):c&&!u?o.default.createElement(te,{isExternal:!0,href:c,...i},o.default.createElement(b.Box,{padding:2},o.default.createElement(q.Typography,null,e))):o.default.createElement(Z,{onKeyDown:f,onMouseDown:h,type:"button",...i},o.default.createElement(b.Box,{padding:2},o.default.createElement(q.Typography,null,e)))};D.defaultProps={as:void 0,href:void 0,isFocused:!1,onClick(){},to:void 0};D.propTypes={as:t.default.elementType,children:t.default.node.isRequired,href:t.default.string,isFocused:t.default.bool,onClick:t.default.func,to:t.default.string};const g=({label:e,children:h,id:u,as:l,onOpen:c=()=>{},onClose:C=()=>{},size:d,popoverPlacement:i,onReachEnd:f,...v})=>{const p=a.useRef(),K=X.useId("simplemenu",u),R=a.useRef(!1),[y,m]=a.useState(!1),[P,T]=a.useState(0),k=a.Children.toArray(h),_=d==="S"?oe:w.Button,L=l||_,I=!!f&&typeof f=="function";a.useEffect(()=>{if(["string","number"].includes(typeof e)){const n=k.findIndex(r=>r.props.children===e);n!==-1&&T(n)}},[e]);const O=M.useCallbackRef(c),S=M.useCallbackRef(C);a.useEffect(()=>{R?.current?y?O():S():R.current=!0},[R,S,O,y]),a.useEffect(()=>{o.default.isValidElement(e)&&P===-1&&p.current.focus()},[e,P]);const $=n=>{y&&(n.key===s.KeyboardKeys.ESCAPE&&(n.stopPropagation(),m(!1),p.current.focus()),n.key===s.KeyboardKeys.DOWN&&T(r=>r===k.length-1?0:r+1),n.key===s.KeyboardKeys.UP&&T(r=>r===0?k.length-1:r-1))},F=n=>{(n.key===s.KeyboardKeys.ENTER||n.key===s.KeyboardKeys.SPACE)&&m(r=>!r)},A=n=>{n.preventDefault(),n.currentTarget.contains(n.relatedTarget)||m(!1)},N=n=>{n.preventDefault(),m(r=>!r)},V=()=>{I&&f()},W=k.map((n,r)=>o.default.createElement(Q.Flex,{as:"li",key:r,justifyContent:"center",role:"menuitem"},a.cloneElement(n,{onClick(){n.props.onClick(),m(!1),p.current.focus()},isFocused:P===r})));return o.default.createElement("div",{onKeyDown:$},o.default.createElement(L,{label:o.default.isValidElement(e)?null:e,"aria-haspopup":!0,"aria-expanded":y,"aria-controls":K,onKeyDown:F,onMouseDown:N,ref:p,type:"button",variant:"ghost",endIcon:o.default.createElement(ne,null,o.default.createElement(Y.default,{"aria-hidden":!0})),...v},e),y&&o.default.createElement(j.Popover,{onBlur:A,placement:i,source:p,onReachEnd:V,intersectionId:I?`popover-${K}`:void 0,spacing:4},o.default.createElement(b.Box,{role:"menu",as:"ul",padding:1,id:K},W)))};g.defaultProps={as:void 0};g.displayName="SimpleMenu";g.defaultProps={id:void 0,onOpen:void 0,onClose:void 0,onReachEnd:void 0,popoverPlacement:"bottom-start",size:"M"};g.propTypes={as:t.default.any,children:t.default.oneOfType([t.default.arrayOf(t.default.node),t.default.node]).isRequired,id:t.default.string,label:t.default.oneOfType([t.default.string,t.default.number,t.default.element]).isRequired,onClose:t.default.func,onOpen:t.default.func,onReachEnd:t.default.func,popoverPlacement:t.default.oneOf(j.POPOVER_PLACEMENTS),size:t.default.oneOf(["S","M"])};exports.MenuItem=D;exports.SimpleMenu=g;
|