@strapi/design-system 1.4.2 → 1.5.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
|
@@ -1,40 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, f = (e, r) => T(e, N(r));
|
|
13
|
-
var c = (e, r) => {
|
|
14
|
-
var o = {};
|
|
15
|
-
for (var t in e)
|
|
16
|
-
y.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
|
|
17
|
-
if (e != null && m)
|
|
18
|
-
for (var t of m(e))
|
|
19
|
-
r.indexOf(t) < 0 && P.call(e, t) && (o[t] = e[t]);
|
|
20
|
-
return o;
|
|
21
|
-
};
|
|
22
|
-
import a from "react";
|
|
23
|
-
import p from "styled-components";
|
|
24
|
-
import u from "prop-types";
|
|
25
|
-
import W from "@strapi/icons/ChevronLeft";
|
|
26
|
-
import q from "@strapi/icons/ChevronRight";
|
|
27
|
-
import { VisuallyHidden as h } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
28
|
-
import { usePagination as v } from "./PaginationContext.js";
|
|
29
|
-
import { Typography as C } from "../../Typography/Typography.js";
|
|
30
|
-
import { buttonFocusStyle as S } from "../../themes/utils.js";
|
|
31
|
-
import { BaseLink as A } from "../../BaseLink/BaseLink.js";
|
|
32
|
-
const E = p(C)`
|
|
1
|
+
import o from "react";
|
|
2
|
+
import s from "styled-components";
|
|
3
|
+
import d from "prop-types";
|
|
4
|
+
import b from "@strapi/icons/ChevronLeft";
|
|
5
|
+
import y from "@strapi/icons/ChevronRight";
|
|
6
|
+
import { VisuallyHidden as l } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
7
|
+
import { usePagination as c } from "./PaginationContext.js";
|
|
8
|
+
import { Typography as P } from "../../Typography/Typography.js";
|
|
9
|
+
import { buttonFocusStyle as E } from "../../themes/utils.js";
|
|
10
|
+
import { BaseLink as k } from "../../BaseLink/BaseLink.js";
|
|
11
|
+
const m = s(P)`
|
|
33
12
|
line-height: revert;
|
|
34
|
-
`,
|
|
13
|
+
`, w = {
|
|
35
14
|
active: !0
|
|
36
|
-
},
|
|
37
|
-
shouldForwardProp: (e, r) => !
|
|
15
|
+
}, p = s(k).withConfig({
|
|
16
|
+
shouldForwardProp: (e, r) => !w[e] && r(e)
|
|
38
17
|
})`
|
|
39
18
|
padding: ${({ theme: e }) => e.spaces[3]};
|
|
40
19
|
border-radius: ${({ theme: e }) => e.borderRadius};
|
|
@@ -42,15 +21,15 @@ const E = p(C)`
|
|
|
42
21
|
text-decoration: none;
|
|
43
22
|
display: flex;
|
|
44
23
|
|
|
45
|
-
${
|
|
46
|
-
`,
|
|
24
|
+
${E}
|
|
25
|
+
`, L = s(p)`
|
|
47
26
|
color: ${({ theme: e, active: r }) => r ? e.colors.primary700 : e.colors.neutral800};
|
|
48
27
|
background: ${({ theme: e, active: r }) => r ? e.colors.neutral0 : void 0};
|
|
49
28
|
|
|
50
29
|
&:hover {
|
|
51
30
|
box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
|
|
52
31
|
}
|
|
53
|
-
`,
|
|
32
|
+
`, u = s(p)`
|
|
54
33
|
font-size: 0.7rem;
|
|
55
34
|
svg path {
|
|
56
35
|
fill: ${(e) => e["aria-disabled"] ? e.theme.colors.neutral300 : e.theme.colors.neutral600};
|
|
@@ -66,70 +45,67 @@ const E = p(C)`
|
|
|
66
45
|
${(e) => e["aria-disabled"] ? `
|
|
67
46
|
pointer-events: none;
|
|
68
47
|
` : void 0}
|
|
69
|
-
`,
|
|
48
|
+
`, $ = s(p)`
|
|
70
49
|
color: ${({ theme: e }) => e.colors.neutral800};
|
|
71
|
-
`,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
50
|
+
`, h = o.forwardRef(({ children: e, ...r }, a) => {
|
|
51
|
+
const { activePage: i } = c(), t = i === 1;
|
|
52
|
+
return /* @__PURE__ */ o.createElement(u, {
|
|
53
|
+
ref: a,
|
|
54
|
+
"aria-disabled": t,
|
|
55
|
+
tabIndex: t ? -1 : void 0,
|
|
56
|
+
...r
|
|
57
|
+
}, /* @__PURE__ */ o.createElement(l, null, e), /* @__PURE__ */ o.createElement(b, {
|
|
79
58
|
"aria-hidden": !0
|
|
80
59
|
}));
|
|
81
60
|
});
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
},
|
|
61
|
+
h.displayName = "PreviousLink";
|
|
62
|
+
const f = o.forwardRef(({ children: e, ...r }, a) => {
|
|
63
|
+
const { activePage: i, pageCount: t } = c(), n = i === t;
|
|
64
|
+
return /* @__PURE__ */ o.createElement(u, {
|
|
65
|
+
ref: a,
|
|
66
|
+
"aria-disabled": n,
|
|
67
|
+
tabIndex: n ? -1 : void 0,
|
|
68
|
+
...r
|
|
69
|
+
}, /* @__PURE__ */ o.createElement(l, null, e), /* @__PURE__ */ o.createElement(y, {
|
|
91
70
|
"aria-hidden": !0
|
|
92
71
|
}));
|
|
93
72
|
});
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}), /* @__PURE__ */ a.createElement(h, null, r), /* @__PURE__ */ a.createElement(E, {
|
|
73
|
+
f.displayName = "NextLink";
|
|
74
|
+
const v = o.forwardRef(({ number: e, children: r, ...a }, i) => {
|
|
75
|
+
const { activePage: t } = c(), n = t === e;
|
|
76
|
+
return /* @__PURE__ */ o.createElement(L, {
|
|
77
|
+
ref: i,
|
|
78
|
+
...a,
|
|
79
|
+
active: n
|
|
80
|
+
}, /* @__PURE__ */ o.createElement(l, null, r), /* @__PURE__ */ o.createElement(m, {
|
|
103
81
|
"aria-hidden": !0,
|
|
104
82
|
variant: "pi",
|
|
105
|
-
fontWeight:
|
|
83
|
+
fontWeight: n ? "bold" : null
|
|
106
84
|
}, e));
|
|
107
85
|
});
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
children: u.node.isRequired,
|
|
120
|
-
number: u.number.isRequired
|
|
86
|
+
v.displayName = "PageLink";
|
|
87
|
+
const x = ({ children: e, ...r }) => /* @__PURE__ */ o.createElement($, {
|
|
88
|
+
...r,
|
|
89
|
+
as: "div"
|
|
90
|
+
}, /* @__PURE__ */ o.createElement(l, null, e), /* @__PURE__ */ o.createElement(m, {
|
|
91
|
+
"aria-hidden": !0,
|
|
92
|
+
variant: "pi"
|
|
93
|
+
}, "\u2026"));
|
|
94
|
+
v.propTypes = {
|
|
95
|
+
children: d.node.isRequired,
|
|
96
|
+
number: d.number.isRequired
|
|
121
97
|
};
|
|
122
|
-
const
|
|
123
|
-
children:
|
|
98
|
+
const g = {
|
|
99
|
+
children: d.node.isRequired
|
|
124
100
|
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
children:
|
|
101
|
+
f.propTypes = g;
|
|
102
|
+
h.propTypes = g;
|
|
103
|
+
x.propTypes = {
|
|
104
|
+
children: d.node.isRequired
|
|
129
105
|
};
|
|
130
106
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
107
|
+
x as Dots,
|
|
108
|
+
f as NextLink,
|
|
109
|
+
v as PageLink,
|
|
110
|
+
h as PreviousLink
|
|
135
111
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react"),N=require("prop-types"),V=require("styled-components"),D=require("@radix-ui/react-use-callback-ref"),W=require("@strapi/icons/CarretDown"),z=require("../Link/Link.cjs"),T=require("../../Typography/Typography.cjs"),b=require("../../Box/Box.cjs"),U=require("../../Flex/Flex.cjs"),I=require("../../Button/Button.cjs"),G=require("../../BaseLink/BaseLink.cjs"),L=require("../../Popover/Popover.cjs"),q=require("./utils.cjs"),H=require("../../helpers/useId.cjs"),l=require("../../helpers/keyboardKeys.cjs"),h=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},o=h(s),t=h(N),m=h(V),J=h(W),Q=m.default.button`
|
|
2
2
|
border: none;
|
|
3
3
|
padding: 0;
|
|
4
4
|
background: transparent;
|
|
5
5
|
cursor: pointer;
|
|
6
|
-
${
|
|
7
|
-
`,
|
|
6
|
+
${q.getOptionStyle}
|
|
7
|
+
`,X=m.default(G.BaseLink)`
|
|
8
8
|
text-decoration: none;
|
|
9
|
-
${
|
|
10
|
-
`,
|
|
9
|
+
${q.getOptionStyle}
|
|
10
|
+
`,Y=m.default(z.Link)`
|
|
11
11
|
&:focus-visible {
|
|
12
12
|
/* Removes Link focus-visible after properties and reset to global outline */
|
|
13
13
|
outline: 2px solid ${({theme:e})=>e.colors.primary600};
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
svg path {
|
|
21
21
|
fill: currentColor;
|
|
22
22
|
}
|
|
23
|
-
${
|
|
24
|
-
`,
|
|
23
|
+
${q.getOptionStyle}
|
|
24
|
+
`,Z=m.default.span`
|
|
25
25
|
display: flex;
|
|
26
26
|
align-items: center;
|
|
27
27
|
svg {
|
|
28
28
|
height: 4px;
|
|
29
29
|
width: 6px;
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,ee=m.default(I.Button)`
|
|
32
32
|
padding: ${({theme:e})=>`${e.spaces[1]} ${e.spaces[3]}`};
|
|
33
|
-
`,
|
|
33
|
+
`,O=({as:e,children:u,onClick:g,isFocused:i,isLink:x,isExternal:B,...C})=>{const c=s.useRef();s.useEffect(()=>{i&&c.current&&c.current.focus()},[i]);const d={tabIndex:i?0:-1,ref:c,role:"menuitem",...C},r=f=>{(f.key===l.KeyboardKeys.SPACE||f.key===l.KeyboardKeys.ENTER)&&g()};return x?o.default.createElement(X,{as:e,...d},o.default.createElement(b.Box,{padding:2},o.default.createElement(T.Typography,null,u))):B?o.default.createElement(Y,{isExternal:!0,...d},o.default.createElement(b.Box,{padding:2},o.default.createElement(T.Typography,null,u))):o.default.createElement(Q,{onKeyDown:r,onMouseDown:g,type:"button",...d},o.default.createElement(b.Box,{padding:2},o.default.createElement(T.Typography,null,u)))};O.defaultProps={as:void 0,onClick(){},isExternal:!1,isFocused:!1,isLink:!1};O.propTypes={as:t.default.elementType,children:t.default.node.isRequired,isExternal:t.default.bool,isFocused:t.default.bool,isLink:t.default.bool,onClick:t.default.func};const E=({label:e,children:u,id:g,as:i,onOpen:x=()=>{},onClose:B=()=>{},size:C,popoverPlacement:c,...d})=>{const r=s.useRef(),f=H.useId("simplemenu",g),K=s.useRef(!1),[p,y]=s.useState(!1),[v,P]=s.useState(0),k=s.Children.toArray(u),M=C==="S"?ee:I.Button,j=i||M;s.useEffect(()=>{if(["string","number"].includes(typeof e)){const n=k.findIndex(a=>a.props.children===e);n!==-1&&P(n)}},[e]);const R=D.useCallbackRef(x),S=D.useCallbackRef(B);s.useEffect(()=>{K?.current?p?R():S():K.current=!0},[K,p,R,S]),s.useEffect(()=>{o.default.isValidElement(e)&&v===-1&&r.current.focus()},[e,v]);const w=n=>{p&&(n.key===l.KeyboardKeys.ESCAPE&&(n.stopPropagation(),y(!1),r.current.focus()),n.key===l.KeyboardKeys.DOWN&&P(a=>a===k.length-1?0:a+1),n.key===l.KeyboardKeys.UP&&P(a=>a===0?k.length-1:a-1))},_=n=>{(n.key===l.KeyboardKeys.ENTER||n.key===l.KeyboardKeys.SPACE)&&y(a=>!a)},F=n=>{n.preventDefault(),n.currentTarget.contains(n.relatedTarget)||y(!1)},$=n=>{n.preventDefault(),y(a=>!a)},A=k.map((n,a)=>o.default.createElement(U.Flex,{as:"li",key:a,justifyContent:"center",role:"menuitem"},s.cloneElement(n,{onClick(){n.props.onClick(),y(!1),r.current.focus()},isFocused:v===a})));return o.default.createElement("div",{onKeyDown:w},o.default.createElement(j,{label:o.default.isValidElement(e)?null:e,"aria-haspopup":!0,"aria-expanded":p,"aria-controls":f,onKeyDown:_,onMouseDown:$,ref:r,type:"button",variant:"ghost",endIcon:o.default.createElement(Z,null,o.default.createElement(J.default,{"aria-hidden":!0})),...d},e),p&&o.default.createElement(L.Popover,{onBlur:F,placement:c,source:r,spacing:4},o.default.createElement(b.Box,{role:"menu",as:"ul",padding:1,id:f},A)))};E.defaultProps={as:void 0};E.displayName="SimpleMenu";E.defaultProps={id:void 0,onClose(){},onOpen(){},popoverPlacement:"bottom-start",size:"M"};E.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,popoverPlacement:t.default.oneOf(L.POPOVER_PLACEMENTS),size:t.default.oneOf(["S","M"])};exports.MenuItem=O;exports.SimpleMenu=E;
|
|
@@ -1,51 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
for (var i of C(e))
|
|
18
|
-
t.indexOf(i) < 0 && N.call(e, i) && (o[i] = e[i]);
|
|
19
|
-
return o;
|
|
20
|
-
};
|
|
21
|
-
import s, { useRef as w, useEffect as x, useState as F, Children as Q, cloneElement as X } from "react";
|
|
22
|
-
import n from "prop-types";
|
|
23
|
-
import E from "styled-components";
|
|
24
|
-
import { useCallbackRef as V } from "@radix-ui/react-use-callback-ref";
|
|
25
|
-
import Y from "@strapi/icons/CarretDown";
|
|
26
|
-
import { Link as Z } from "../Link/Link.js";
|
|
27
|
-
import { Typography as S } from "../../Typography/Typography.js";
|
|
28
|
-
import { Box as v } from "../../Box/Box.js";
|
|
29
|
-
import { Flex as ee } from "../../Flex/Flex.js";
|
|
30
|
-
import { Button as q } from "../../Button/Button.js";
|
|
31
|
-
import { BaseLink as ne } from "../../BaseLink/BaseLink.js";
|
|
32
|
-
import { POPOVER_PLACEMENTS as te, Popover as oe } from "../../Popover/Popover.js";
|
|
33
|
-
import { getOptionStyle as B } from "./utils.js";
|
|
34
|
-
import { useId as re } from "../../helpers/useId.js";
|
|
35
|
-
import { KeyboardKeys as c } from "../../helpers/keyboardKeys.js";
|
|
36
|
-
const se = E.button`
|
|
1
|
+
import t, { useRef as I, useEffect as g, useState as w, Children as q, cloneElement as W } from "react";
|
|
2
|
+
import e from "prop-types";
|
|
3
|
+
import d from "styled-components";
|
|
4
|
+
import { useCallbackRef as M } from "@radix-ui/react-use-callback-ref";
|
|
5
|
+
import _ from "@strapi/icons/CarretDown";
|
|
6
|
+
import { Link as z } from "../Link/Link.js";
|
|
7
|
+
import { Typography as b } from "../../Typography/Typography.js";
|
|
8
|
+
import { Box as k } from "../../Box/Box.js";
|
|
9
|
+
import { Flex as j } from "../../Flex/Flex.js";
|
|
10
|
+
import { Button as B } from "../../Button/Button.js";
|
|
11
|
+
import { BaseLink as U } from "../../BaseLink/BaseLink.js";
|
|
12
|
+
import { POPOVER_PLACEMENTS as G, Popover as H } from "../../Popover/Popover.js";
|
|
13
|
+
import { getOptionStyle as R } from "./utils.js";
|
|
14
|
+
import { useId as J } from "../../helpers/useId.js";
|
|
15
|
+
import { KeyboardKeys as i } from "../../helpers/keyboardKeys.js";
|
|
16
|
+
const Q = d.button`
|
|
37
17
|
border: none;
|
|
38
18
|
padding: 0;
|
|
39
19
|
background: transparent;
|
|
40
20
|
cursor: pointer;
|
|
41
|
-
${
|
|
42
|
-
`,
|
|
21
|
+
${R}
|
|
22
|
+
`, X = d(U)`
|
|
43
23
|
text-decoration: none;
|
|
44
|
-
${
|
|
45
|
-
`,
|
|
24
|
+
${R}
|
|
25
|
+
`, Y = d(z)`
|
|
46
26
|
&:focus-visible {
|
|
47
27
|
/* Removes Link focus-visible after properties and reset to global outline */
|
|
48
|
-
outline: 2px solid ${({ theme:
|
|
28
|
+
outline: 2px solid ${({ theme: o }) => o.colors.primary600};
|
|
49
29
|
outline-offset: 2px;
|
|
50
30
|
&:after {
|
|
51
31
|
content: none;
|
|
@@ -55,46 +35,49 @@ const se = E.button`
|
|
|
55
35
|
svg path {
|
|
56
36
|
fill: currentColor;
|
|
57
37
|
}
|
|
58
|
-
${
|
|
59
|
-
`,
|
|
38
|
+
${R}
|
|
39
|
+
`, Z = d.span`
|
|
60
40
|
display: flex;
|
|
61
41
|
align-items: center;
|
|
62
42
|
svg {
|
|
63
43
|
height: 4px;
|
|
64
44
|
width: 6px;
|
|
65
45
|
}
|
|
66
|
-
`,
|
|
67
|
-
padding: ${({ theme:
|
|
68
|
-
`,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
(
|
|
46
|
+
`, ee = d(B)`
|
|
47
|
+
padding: ${({ theme: o }) => `${o.spaces[1]} ${o.spaces[3]}`};
|
|
48
|
+
`, L = ({ as: o, children: a, onClick: y, isFocused: l, isLink: C, isExternal: x, ...v }) => {
|
|
49
|
+
const c = I();
|
|
50
|
+
g(() => {
|
|
51
|
+
l && c.current && c.current.focus();
|
|
52
|
+
}, [l]);
|
|
53
|
+
const p = {
|
|
54
|
+
tabIndex: l ? 0 : -1,
|
|
55
|
+
ref: c,
|
|
56
|
+
role: "menuitem",
|
|
57
|
+
...v
|
|
58
|
+
}, s = (u) => {
|
|
59
|
+
(u.key === i.SPACE || u.key === i.ENTER) && y();
|
|
80
60
|
};
|
|
81
|
-
return
|
|
82
|
-
as:
|
|
83
|
-
|
|
61
|
+
return C ? /* @__PURE__ */ t.createElement(X, {
|
|
62
|
+
as: o,
|
|
63
|
+
...p
|
|
64
|
+
}, /* @__PURE__ */ t.createElement(k, {
|
|
84
65
|
padding: 2
|
|
85
|
-
}, /* @__PURE__ */
|
|
86
|
-
isExternal: !0
|
|
87
|
-
|
|
66
|
+
}, /* @__PURE__ */ t.createElement(b, null, a))) : x ? /* @__PURE__ */ t.createElement(Y, {
|
|
67
|
+
isExternal: !0,
|
|
68
|
+
...p
|
|
69
|
+
}, /* @__PURE__ */ t.createElement(k, {
|
|
88
70
|
padding: 2
|
|
89
|
-
}, /* @__PURE__ */
|
|
90
|
-
onKeyDown:
|
|
91
|
-
onMouseDown:
|
|
92
|
-
type: "button"
|
|
93
|
-
|
|
71
|
+
}, /* @__PURE__ */ t.createElement(b, null, a))) : /* @__PURE__ */ t.createElement(Q, {
|
|
72
|
+
onKeyDown: s,
|
|
73
|
+
onMouseDown: y,
|
|
74
|
+
type: "button",
|
|
75
|
+
...p
|
|
76
|
+
}, /* @__PURE__ */ t.createElement(k, {
|
|
94
77
|
padding: 2
|
|
95
|
-
}, /* @__PURE__ */
|
|
78
|
+
}, /* @__PURE__ */ t.createElement(b, null, a)));
|
|
96
79
|
};
|
|
97
|
-
|
|
80
|
+
L.defaultProps = {
|
|
98
81
|
as: void 0,
|
|
99
82
|
onClick() {
|
|
100
83
|
},
|
|
@@ -102,100 +85,92 @@ W.defaultProps = {
|
|
|
102
85
|
isFocused: !1,
|
|
103
86
|
isLink: !1
|
|
104
87
|
};
|
|
105
|
-
|
|
106
|
-
as:
|
|
107
|
-
children:
|
|
108
|
-
isExternal:
|
|
109
|
-
isFocused:
|
|
110
|
-
isLink:
|
|
111
|
-
onClick:
|
|
88
|
+
L.propTypes = {
|
|
89
|
+
as: e.elementType,
|
|
90
|
+
children: e.node.isRequired,
|
|
91
|
+
isExternal: e.bool,
|
|
92
|
+
isFocused: e.bool,
|
|
93
|
+
isLink: e.bool,
|
|
94
|
+
onClick: e.func
|
|
112
95
|
};
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"onClose",
|
|
132
|
-
"size",
|
|
133
|
-
"popoverPlacement"
|
|
134
|
-
]);
|
|
135
|
-
const l = w(), m = re("simplemenu", o), f = w(!1), [d, y] = F(!1), [I, R] = F(0), h = Q.toArray(t), _ = i || (b === "S" ? ce : q);
|
|
136
|
-
x(() => {
|
|
137
|
-
if (["string", "number"].includes(typeof e)) {
|
|
138
|
-
const r = h.findIndex((a) => a.props.children === e);
|
|
139
|
-
r !== -1 && R(r);
|
|
96
|
+
const h = ({
|
|
97
|
+
label: o,
|
|
98
|
+
children: a,
|
|
99
|
+
id: y,
|
|
100
|
+
as: l,
|
|
101
|
+
onOpen: C = () => {
|
|
102
|
+
},
|
|
103
|
+
onClose: x = () => {
|
|
104
|
+
},
|
|
105
|
+
size: v,
|
|
106
|
+
popoverPlacement: c,
|
|
107
|
+
...p
|
|
108
|
+
}) => {
|
|
109
|
+
const s = I(), u = J("simplemenu", y), P = I(!1), [m, f] = w(!1), [D, O] = w(0), E = q.toArray(a), K = l || (v === "S" ? ee : B);
|
|
110
|
+
g(() => {
|
|
111
|
+
if (["string", "number"].includes(typeof o)) {
|
|
112
|
+
const n = E.findIndex((r) => r.props.children === o);
|
|
113
|
+
n !== -1 && O(n);
|
|
140
114
|
}
|
|
141
|
-
}, [
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}, [
|
|
146
|
-
|
|
147
|
-
}, [
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
},
|
|
151
|
-
(
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
},
|
|
115
|
+
}, [o]);
|
|
116
|
+
const T = M(C), S = M(x);
|
|
117
|
+
g(() => {
|
|
118
|
+
P?.current ? m ? T() : S() : P.current = !0;
|
|
119
|
+
}, [P, m, T, S]), g(() => {
|
|
120
|
+
t.isValidElement(o) && D === -1 && s.current.focus();
|
|
121
|
+
}, [o, D]);
|
|
122
|
+
const $ = (n) => {
|
|
123
|
+
m && (n.key === i.ESCAPE && (n.stopPropagation(), f(!1), s.current.focus()), n.key === i.DOWN && O((r) => r === E.length - 1 ? 0 : r + 1), n.key === i.UP && O((r) => r === 0 ? E.length - 1 : r - 1));
|
|
124
|
+
}, A = (n) => {
|
|
125
|
+
(n.key === i.ENTER || n.key === i.SPACE) && f((r) => !r);
|
|
126
|
+
}, N = (n) => {
|
|
127
|
+
n.preventDefault(), n.currentTarget.contains(n.relatedTarget) || f(!1);
|
|
128
|
+
}, F = (n) => {
|
|
129
|
+
n.preventDefault(), f((r) => !r);
|
|
130
|
+
}, V = E.map((n, r) => /* @__PURE__ */ t.createElement(j, {
|
|
157
131
|
as: "li",
|
|
158
|
-
key:
|
|
132
|
+
key: r,
|
|
159
133
|
justifyContent: "center",
|
|
160
134
|
role: "menuitem"
|
|
161
|
-
},
|
|
135
|
+
}, W(n, {
|
|
162
136
|
onClick() {
|
|
163
|
-
|
|
137
|
+
n.props.onClick(), f(!1), s.current.focus();
|
|
164
138
|
},
|
|
165
|
-
isFocused:
|
|
139
|
+
isFocused: D === r
|
|
166
140
|
})));
|
|
167
|
-
return /* @__PURE__ */
|
|
168
|
-
onKeyDown:
|
|
169
|
-
}, /* @__PURE__ */
|
|
170
|
-
label:
|
|
141
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
142
|
+
onKeyDown: $
|
|
143
|
+
}, /* @__PURE__ */ t.createElement(K, {
|
|
144
|
+
label: t.isValidElement(o) ? null : o,
|
|
171
145
|
"aria-haspopup": !0,
|
|
172
|
-
"aria-expanded":
|
|
173
|
-
"aria-controls":
|
|
174
|
-
onKeyDown:
|
|
175
|
-
onMouseDown:
|
|
176
|
-
ref:
|
|
146
|
+
"aria-expanded": m,
|
|
147
|
+
"aria-controls": u,
|
|
148
|
+
onKeyDown: A,
|
|
149
|
+
onMouseDown: F,
|
|
150
|
+
ref: s,
|
|
177
151
|
type: "button",
|
|
178
152
|
variant: "ghost",
|
|
179
|
-
endIcon: /* @__PURE__ */
|
|
153
|
+
endIcon: /* @__PURE__ */ t.createElement(Z, null, /* @__PURE__ */ t.createElement(_, {
|
|
180
154
|
"aria-hidden": !0
|
|
181
|
-
}))
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
155
|
+
})),
|
|
156
|
+
...p
|
|
157
|
+
}, o), m && /* @__PURE__ */ t.createElement(H, {
|
|
158
|
+
onBlur: N,
|
|
159
|
+
placement: c,
|
|
160
|
+
source: s,
|
|
186
161
|
spacing: 4
|
|
187
|
-
}, /* @__PURE__ */
|
|
162
|
+
}, /* @__PURE__ */ t.createElement(k, {
|
|
188
163
|
role: "menu",
|
|
189
164
|
as: "ul",
|
|
190
165
|
padding: 1,
|
|
191
|
-
id:
|
|
192
|
-
},
|
|
166
|
+
id: u
|
|
167
|
+
}, V)));
|
|
193
168
|
};
|
|
194
|
-
|
|
169
|
+
h.defaultProps = {
|
|
195
170
|
as: void 0
|
|
196
171
|
};
|
|
197
|
-
|
|
198
|
-
|
|
172
|
+
h.displayName = "SimpleMenu";
|
|
173
|
+
h.defaultProps = {
|
|
199
174
|
id: void 0,
|
|
200
175
|
onClose() {
|
|
201
176
|
},
|
|
@@ -204,17 +179,17 @@ P.defaultProps = {
|
|
|
204
179
|
popoverPlacement: "bottom-start",
|
|
205
180
|
size: "M"
|
|
206
181
|
};
|
|
207
|
-
|
|
208
|
-
as:
|
|
209
|
-
children:
|
|
210
|
-
id:
|
|
211
|
-
label:
|
|
212
|
-
onClose:
|
|
213
|
-
onOpen:
|
|
214
|
-
popoverPlacement:
|
|
215
|
-
size:
|
|
182
|
+
h.propTypes = {
|
|
183
|
+
as: e.any,
|
|
184
|
+
children: e.oneOfType([e.arrayOf(e.node), e.node]).isRequired,
|
|
185
|
+
id: e.string,
|
|
186
|
+
label: e.oneOfType([e.string, e.number, e.element]).isRequired,
|
|
187
|
+
onClose: e.func,
|
|
188
|
+
onOpen: e.func,
|
|
189
|
+
popoverPlacement: e.oneOf(G),
|
|
190
|
+
size: e.oneOf(["S", "M"])
|
|
216
191
|
};
|
|
217
192
|
export {
|
|
218
|
-
|
|
219
|
-
|
|
193
|
+
L as MenuItem,
|
|
194
|
+
h as SimpleMenu
|
|
220
195
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
width: ${
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react"),i=require("styled-components"),u=require("prop-types"),d=require("../../Grid/Grid.cjs");require("../../Grid/GridItem.cjs");const t=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=t(s),c=t(i),n=t(u),r=`${232/16}rem`,p=c.default(d.Grid)`
|
|
2
|
+
width: ${r};
|
|
3
3
|
background: ${({theme:e})=>e.colors.neutral100};
|
|
4
4
|
position: sticky;
|
|
5
5
|
top: 0;
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
overflow-y: auto;
|
|
8
8
|
border-right: 1px solid ${({theme:e})=>e.colors.neutral200};
|
|
9
9
|
z-index: 1;
|
|
10
|
-
`,
|
|
10
|
+
`,o=({ariaLabel:e,...a})=>l.default.createElement(p,{"aria-label":e,as:"nav",...a});o.propTypes={ariaLabel:n.default.string.isRequired};exports.SubNav=o;exports.subNavWidth=r;
|