@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
|
-
}, v = (e, r) => T(e, N(r));
|
|
13
|
-
var d = (e, r) => {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var o in e)
|
|
16
|
-
y.call(e, o) && r.indexOf(o) < 0 && (t[o] = e[o]);
|
|
17
|
-
if (e != null && m)
|
|
18
|
-
for (var o of m(e))
|
|
19
|
-
r.indexOf(o) < 0 && P.call(e, o) && (t[o] = e[o]);
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
|
-
import i from "react";
|
|
23
|
-
import p from "styled-components";
|
|
24
|
-
import c from "prop-types";
|
|
25
|
-
import q from "@strapi/icons/ChevronLeft";
|
|
26
|
-
import W from "@strapi/icons/ChevronRight";
|
|
27
|
-
import { NavLink as C } from "react-router-dom";
|
|
28
|
-
import { VisuallyHidden as u } from "../VisuallyHidden/VisuallyHidden.js";
|
|
29
|
-
import { usePagination as f } from "./PaginationContext.js";
|
|
30
|
-
import { Typography as S } from "../Typography/Typography.js";
|
|
31
|
-
import { buttonFocusStyle as A } from "../themes/utils.js";
|
|
32
|
-
const E = p(S)`
|
|
1
|
+
import t from "react";
|
|
2
|
+
import s from "styled-components";
|
|
3
|
+
import n from "prop-types";
|
|
4
|
+
import b from "@strapi/icons/ChevronLeft";
|
|
5
|
+
import y from "@strapi/icons/ChevronRight";
|
|
6
|
+
import { NavLink as P } from "react-router-dom";
|
|
7
|
+
import { VisuallyHidden as l } from "../VisuallyHidden/VisuallyHidden.js";
|
|
8
|
+
import { usePagination as c } from "./PaginationContext.js";
|
|
9
|
+
import { Typography as E } from "../Typography/Typography.js";
|
|
10
|
+
import { buttonFocusStyle as k } from "../themes/utils.js";
|
|
11
|
+
const m = s(E)`
|
|
33
12
|
line-height: revert;
|
|
34
|
-
`,
|
|
13
|
+
`, L = {
|
|
35
14
|
active: !0
|
|
36
|
-
},
|
|
37
|
-
shouldForwardProp: (e, r) => !
|
|
15
|
+
}, p = s(P).withConfig({
|
|
16
|
+
shouldForwardProp: (e, r) => !L[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(S)`
|
|
|
42
21
|
text-decoration: none;
|
|
43
22
|
display: flex;
|
|
44
23
|
|
|
45
|
-
${
|
|
46
|
-
`,
|
|
24
|
+
${k}
|
|
25
|
+
`, $ = 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,69 +45,67 @@ const E = p(S)`
|
|
|
66
45
|
${(e) => e["aria-disabled"] ? `
|
|
67
46
|
pointer-events: none;
|
|
68
47
|
` : void 0}
|
|
69
|
-
`,
|
|
48
|
+
`, x = s(p)`
|
|
70
49
|
color: ${({ theme: e }) => e.colors.neutral800};
|
|
71
|
-
`,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
50
|
+
`, h = ({ children: e, to: r, ...i }) => {
|
|
51
|
+
const { activePage: a } = c(), o = a === 1;
|
|
52
|
+
return /* @__PURE__ */ t.createElement(u, {
|
|
53
|
+
to: o ? "#" : r,
|
|
54
|
+
"aria-disabled": o,
|
|
55
|
+
tabIndex: o ? -1 : void 0,
|
|
56
|
+
...i
|
|
57
|
+
}, /* @__PURE__ */ t.createElement(l, null, e), /* @__PURE__ */ t.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 v = ({ children: e, to: r, ...i }) => {
|
|
63
|
+
const { activePage: a, pageCount: o } = c(), d = a === o;
|
|
64
|
+
return /* @__PURE__ */ t.createElement(u, {
|
|
65
|
+
to: d ? "#" : r,
|
|
66
|
+
"aria-disabled": d,
|
|
67
|
+
tabIndex: d ? -1 : void 0,
|
|
68
|
+
...i
|
|
69
|
+
}, /* @__PURE__ */ t.createElement(l, null, e), /* @__PURE__ */ t.createElement(y, {
|
|
91
70
|
"aria-hidden": !0
|
|
92
71
|
}));
|
|
93
72
|
};
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
active:
|
|
100
|
-
}
|
|
73
|
+
v.displayName = "NextLink";
|
|
74
|
+
const f = ({ number: e, children: r, ...i }) => {
|
|
75
|
+
const { activePage: a } = c(), o = a === e;
|
|
76
|
+
return /* @__PURE__ */ t.createElement($, {
|
|
77
|
+
...i,
|
|
78
|
+
active: o
|
|
79
|
+
}, /* @__PURE__ */ t.createElement(l, null, r), /* @__PURE__ */ t.createElement(m, {
|
|
101
80
|
"aria-hidden": !0,
|
|
102
81
|
variant: "pi",
|
|
103
|
-
fontWeight:
|
|
82
|
+
fontWeight: o ? "bold" : null
|
|
104
83
|
}, e));
|
|
105
84
|
};
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
children: c.node.isRequired,
|
|
118
|
-
number: c.number.isRequired
|
|
85
|
+
f.displayName = "PageLink";
|
|
86
|
+
const w = ({ children: e, ...r }) => /* @__PURE__ */ t.createElement(x, {
|
|
87
|
+
...r,
|
|
88
|
+
as: "div"
|
|
89
|
+
}, /* @__PURE__ */ t.createElement(l, null, e), /* @__PURE__ */ t.createElement(m, {
|
|
90
|
+
"aria-hidden": !0,
|
|
91
|
+
variant: "pi"
|
|
92
|
+
}, "\u2026"));
|
|
93
|
+
f.propTypes = {
|
|
94
|
+
children: n.node.isRequired,
|
|
95
|
+
number: n.number.isRequired
|
|
119
96
|
};
|
|
120
|
-
const
|
|
121
|
-
children:
|
|
122
|
-
to:
|
|
97
|
+
const g = {
|
|
98
|
+
children: n.node.isRequired,
|
|
99
|
+
to: n.string.isRequired
|
|
123
100
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
children:
|
|
101
|
+
v.propTypes = g;
|
|
102
|
+
h.propTypes = g;
|
|
103
|
+
w.propTypes = {
|
|
104
|
+
children: n.node.isRequired
|
|
128
105
|
};
|
|
129
106
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
107
|
+
w as Dots,
|
|
108
|
+
v as NextLink,
|
|
109
|
+
f as PageLink,
|
|
110
|
+
h as PreviousLink
|
|
134
111
|
};
|
package/dist/Popover/Popover.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const q=require("react"),j=require("prop-types"),S=require("styled-components"),s=require("@floating-ui/react-dom"),c=require("../Box/Box.cjs"),T=require("../Portal/Portal.cjs"),$=require("../helpers/useIntersection.cjs"),b=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function M(e){if(e&&e.__esModule)return e;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const o=M(q),t=b(j),m=b(S),h=["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"],B=m.default(c.Box)`
|
|
2
2
|
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
3
3
|
z-index: 4;
|
|
4
4
|
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
5
5
|
background: ${({theme:e})=>e.colors.neutral0};
|
|
6
|
-
`,
|
|
6
|
+
`,W=m.default(c.Box)`
|
|
7
7
|
// 16 is base base size, 3 is the factor to get closer to 40px and 5 is the number of elements visible in the list
|
|
8
8
|
max-height: ${3*5}rem;
|
|
9
9
|
overflow-y: auto;
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
24
24
|
margin-right: 10px;
|
|
25
25
|
}
|
|
26
|
-
`,
|
|
26
|
+
`,u=({source:e,children:n,spacing:r,fullWidth:a,placement:y,onReachEnd:i,intersectionId:l,centered:v,...x})=>{const f=o.useRef(null),[w,E]=o.useState(void 0),{x:_,y:O,reference:p,floating:k,strategy:R}=s.useFloating({strategy:"fixed",placement:v?"bottom":y,middleware:[s.offset({mainAxis:r}),s.shift(),s.flip()],whileElementsMounted:s.autoUpdate});return o.useLayoutEffect(()=>{p(e.current)},[e,p]),o.useLayoutEffect(()=>{a&&E(e.current.offsetWidth)},[a,e]),$.useIntersection(f,i,{selectorToWatch:`#${l}`,skipWhen:!l||!i}),o.createElement(B,{ref:k,style:{left:_,top:O,position:R,width:w||void 0},hasRadius:!0,background:"neutral0",padding:1},o.createElement(W,{ref:f,...x},n,l&&i&&o.createElement(c.Box,{id:l,width:"100%",height:"1px"})))},d=e=>o.createElement(T.Portal,null,o.createElement(u,{...e})),g={fullWidth:!1,intersectionId:void 0,onReachEnd:void 0,centered:!1,placement:"bottom-start",spacing:0},P={centered:t.default.bool,children:t.default.node.isRequired,fullWidth:t.default.bool,intersectionId:t.default.string,onReachEnd:t.default.func,placement:t.default.oneOf(h),source:t.default.shape({current:(typeof Element>"u"?t.default.any:t.default.instanceOf(Element)).isRequired}).isRequired,spacing:t.default.number};u.propTypes=P;u.defaultProps=g;d.propTypes=P;d.defaultProps=g;exports.POPOVER_PLACEMENTS=h;exports.Popover=d;
|
package/dist/Popover/Popover.js
CHANGED
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
g.call(o, t) && h(e, t, o[t]);
|
|
10
|
-
return e;
|
|
11
|
-
};
|
|
12
|
-
var w = (e, o) => {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var r in e)
|
|
15
|
-
b.call(e, r) && o.indexOf(r) < 0 && (t[r] = e[r]);
|
|
16
|
-
if (e != null && i)
|
|
17
|
-
for (var r of i(e))
|
|
18
|
-
o.indexOf(r) < 0 && g.call(e, r) && (t[r] = e[r]);
|
|
19
|
-
return t;
|
|
20
|
-
};
|
|
21
|
-
import * as s from "react";
|
|
22
|
-
import n from "prop-types";
|
|
23
|
-
import v from "styled-components";
|
|
24
|
-
import { useFloating as z, offset as A, shift as C, flip as M, autoUpdate as B } from "@floating-ui/react-dom";
|
|
25
|
-
import { Box as d } from "../Box/Box.js";
|
|
26
|
-
import { Portal as D } from "../Portal/Portal.js";
|
|
27
|
-
import { useIntersection as F } from "../helpers/useIntersection.js";
|
|
28
|
-
const N = [
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import d from "styled-components";
|
|
4
|
+
import { useFloating as R, offset as $, shift as W, flip as T, autoUpdate as O } from "@floating-ui/react-dom";
|
|
5
|
+
import { Box as s } from "../Box/Box.js";
|
|
6
|
+
import { Portal as S } from "../Portal/Portal.js";
|
|
7
|
+
import { useIntersection as q } from "../helpers/useIntersection.js";
|
|
8
|
+
const L = [
|
|
29
9
|
"top",
|
|
30
10
|
"top-start",
|
|
31
11
|
"top-end",
|
|
@@ -38,12 +18,12 @@ const N = [
|
|
|
38
18
|
"left",
|
|
39
19
|
"left-start",
|
|
40
20
|
"left-end"
|
|
41
|
-
],
|
|
21
|
+
], z = d(s)`
|
|
42
22
|
box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
|
|
43
23
|
z-index: 4;
|
|
44
24
|
border: 1px solid ${({ theme: e }) => e.colors.neutral150};
|
|
45
25
|
background: ${({ theme: e }) => e.colors.neutral0};
|
|
46
|
-
`,
|
|
26
|
+
`, A = d(s)`
|
|
47
27
|
// 16 is base base size, 3 is the factor to get closer to 40px and 5 is the number of elements visible in the list
|
|
48
28
|
max-height: ${3 * 5}rem;
|
|
49
29
|
overflow-y: auto;
|
|
@@ -63,87 +43,81 @@ const N = [
|
|
|
63
43
|
border-radius: ${({ theme: e }) => e.borderRadius};
|
|
64
44
|
margin-right: 10px;
|
|
65
45
|
}
|
|
66
|
-
`,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"children",
|
|
79
|
-
"spacing",
|
|
80
|
-
"fullWidth",
|
|
81
|
-
"placement",
|
|
82
|
-
"onReachEnd",
|
|
83
|
-
"intersectionId",
|
|
84
|
-
"centered"
|
|
85
|
-
]);
|
|
86
|
-
const u = s.useRef(null), [$, W] = s.useState(void 0), { x: T, y: O, reference: m, floating: S, strategy: q } = z({
|
|
46
|
+
`, a = ({
|
|
47
|
+
source: e,
|
|
48
|
+
children: m,
|
|
49
|
+
spacing: h,
|
|
50
|
+
fullWidth: i,
|
|
51
|
+
placement: b,
|
|
52
|
+
onReachEnd: n,
|
|
53
|
+
intersectionId: r,
|
|
54
|
+
centered: g,
|
|
55
|
+
...w
|
|
56
|
+
}) => {
|
|
57
|
+
const l = o.useRef(null), [v, x] = o.useState(void 0), { x: y, y: E, reference: p, floating: P, strategy: k } = R({
|
|
87
58
|
strategy: "fixed",
|
|
88
|
-
placement:
|
|
59
|
+
placement: g ? "bottom" : b,
|
|
89
60
|
middleware: [
|
|
90
|
-
|
|
91
|
-
mainAxis:
|
|
61
|
+
$({
|
|
62
|
+
mainAxis: h
|
|
92
63
|
}),
|
|
93
|
-
|
|
94
|
-
|
|
64
|
+
W(),
|
|
65
|
+
T()
|
|
95
66
|
],
|
|
96
|
-
whileElementsMounted:
|
|
67
|
+
whileElementsMounted: O
|
|
97
68
|
});
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
}, [e,
|
|
101
|
-
|
|
102
|
-
}, [
|
|
103
|
-
selectorToWatch: `#${
|
|
104
|
-
skipWhen: !
|
|
105
|
-
}), /* @__PURE__ */
|
|
106
|
-
ref:
|
|
69
|
+
return o.useLayoutEffect(() => {
|
|
70
|
+
p(e.current);
|
|
71
|
+
}, [e, p]), o.useLayoutEffect(() => {
|
|
72
|
+
i && x(e.current.offsetWidth);
|
|
73
|
+
}, [i, e]), q(l, n, {
|
|
74
|
+
selectorToWatch: `#${r}`,
|
|
75
|
+
skipWhen: !r || !n
|
|
76
|
+
}), /* @__PURE__ */ o.createElement(z, {
|
|
77
|
+
ref: P,
|
|
107
78
|
style: {
|
|
108
|
-
left:
|
|
109
|
-
top:
|
|
110
|
-
position:
|
|
111
|
-
width:
|
|
79
|
+
left: y,
|
|
80
|
+
top: E,
|
|
81
|
+
position: k,
|
|
82
|
+
width: v || void 0
|
|
112
83
|
},
|
|
113
84
|
hasRadius: !0,
|
|
114
85
|
background: "neutral0",
|
|
115
86
|
padding: 1
|
|
116
|
-
}, /* @__PURE__ */
|
|
117
|
-
ref:
|
|
118
|
-
|
|
119
|
-
|
|
87
|
+
}, /* @__PURE__ */ o.createElement(A, {
|
|
88
|
+
ref: l,
|
|
89
|
+
...w
|
|
90
|
+
}, m, r && n && /* @__PURE__ */ o.createElement(s, {
|
|
91
|
+
id: r,
|
|
120
92
|
width: "100%",
|
|
121
93
|
height: "1px"
|
|
122
94
|
})));
|
|
123
|
-
},
|
|
95
|
+
}, c = (e) => /* @__PURE__ */ o.createElement(S, null, /* @__PURE__ */ o.createElement(a, {
|
|
96
|
+
...e
|
|
97
|
+
})), f = {
|
|
124
98
|
fullWidth: !1,
|
|
125
99
|
intersectionId: void 0,
|
|
126
100
|
onReachEnd: void 0,
|
|
127
101
|
centered: !1,
|
|
128
102
|
placement: "bottom-start",
|
|
129
103
|
spacing: 0
|
|
130
|
-
},
|
|
131
|
-
centered:
|
|
132
|
-
children:
|
|
133
|
-
fullWidth:
|
|
134
|
-
intersectionId:
|
|
135
|
-
onReachEnd:
|
|
136
|
-
placement:
|
|
137
|
-
source:
|
|
138
|
-
current: (typeof Element
|
|
104
|
+
}, u = {
|
|
105
|
+
centered: t.bool,
|
|
106
|
+
children: t.node.isRequired,
|
|
107
|
+
fullWidth: t.bool,
|
|
108
|
+
intersectionId: t.string,
|
|
109
|
+
onReachEnd: t.func,
|
|
110
|
+
placement: t.oneOf(L),
|
|
111
|
+
source: t.shape({
|
|
112
|
+
current: (typeof Element > "u" ? t.any : t.instanceOf(Element)).isRequired
|
|
139
113
|
}).isRequired,
|
|
140
|
-
spacing:
|
|
114
|
+
spacing: t.number
|
|
141
115
|
};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
116
|
+
a.propTypes = u;
|
|
117
|
+
a.defaultProps = f;
|
|
118
|
+
c.propTypes = u;
|
|
119
|
+
c.defaultProps = f;
|
|
146
120
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
121
|
+
L as POPOVER_PLACEMENTS,
|
|
122
|
+
c as Popover
|
|
149
123
|
};
|
package/dist/Portal/Portal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),c=require("react-dom"),a=require("prop-types"),s=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=s(a),u=({children:e})=>{const t=r.useRef(null),[o,n]=r.useState(!1);return r.useLayoutEffect(()=>(t.current=document.createElement("div"),t.current.setAttribute("data-react-portal","true"),document.body.appendChild(t.current),n(!0),()=>{t.current?.remove()}),[]),!o||!t.current?null:c.createPortal(e,t.current)};u.propTypes={children:l.default.node.isRequired};exports.Portal=u;
|
package/dist/Portal/Portal.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { createPortal as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
const e =
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}), []), !o || !e.current ? null : d(t, e.current);
|
|
1
|
+
import { useRef as u, useState as n, useLayoutEffect as c } from "react";
|
|
2
|
+
import { createPortal as a } from "react-dom";
|
|
3
|
+
import d from "prop-types";
|
|
4
|
+
const p = ({ children: r }) => {
|
|
5
|
+
const e = u(null), [t, o] = n(!1);
|
|
6
|
+
return c(() => (e.current = document.createElement("div"), e.current.setAttribute("data-react-portal", "true"), document.body.appendChild(e.current), o(!0), () => {
|
|
7
|
+
e.current?.remove();
|
|
8
|
+
}), []), !t || !e.current ? null : a(r, e.current);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
children:
|
|
10
|
+
p.propTypes = {
|
|
11
|
+
children: d.node.isRequired
|
|
13
12
|
};
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
p as Portal
|
|
16
15
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react"),d=require("prop-types"),c=require("styled-components"),p=require("../Box/Box.cjs"),r=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},f=r(i),t=r(d),b=r(c),m=b.default(p.Box)`
|
|
2
2
|
&:before {
|
|
3
3
|
background-color: ${({theme:e})=>e.colors.neutral0};
|
|
4
4
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
top: 0;
|
|
9
9
|
width: ${({value:e})=>`${e}%`};
|
|
10
10
|
}
|
|
11
|
-
`,
|
|
11
|
+
`,o=({min:e,max:u,value:a,children:l,size:s,...n})=>f.default.createElement(m,{background:"neutral600",hasRadius:!0,"aria-label":l,"aria-valuemax":u,"aria-valuemin":e,"aria-valuenow":a,height:s==="S"?1:2,position:"relative",role:"progressbar",value:a,width:s==="S"?"78px":"102px",...n});o.defaultProps={min:0,max:100,value:0,size:"M"};o.propTypes={children:t.default.node.isRequired,max:t.default.number,min:t.default.number,size:t.default.oneOf(["S","M"]),value:t.default.number};exports.ProgressBar=o;
|
|
@@ -1,28 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
m.call(o, e) && u(r, e, o[e]);
|
|
7
|
-
if (i)
|
|
8
|
-
for (var e of i(o))
|
|
9
|
-
l.call(o, e) && u(r, e, o[e]);
|
|
10
|
-
return r;
|
|
11
|
-
};
|
|
12
|
-
var d = (r, o) => {
|
|
13
|
-
var e = {};
|
|
14
|
-
for (var a in r)
|
|
15
|
-
m.call(r, a) && o.indexOf(a) < 0 && (e[a] = r[a]);
|
|
16
|
-
if (r != null && i)
|
|
17
|
-
for (var a of i(r))
|
|
18
|
-
o.indexOf(a) < 0 && l.call(r, a) && (e[a] = r[a]);
|
|
19
|
-
return e;
|
|
20
|
-
};
|
|
21
|
-
import x from "react";
|
|
22
|
-
import t from "prop-types";
|
|
23
|
-
import g from "styled-components";
|
|
24
|
-
import { Box as h } from "../Box/Box.js";
|
|
25
|
-
const v = g(h)`
|
|
1
|
+
import u from "react";
|
|
2
|
+
import e from "prop-types";
|
|
3
|
+
import m from "styled-components";
|
|
4
|
+
import { Box as l } from "../Box/Box.js";
|
|
5
|
+
const p = m(l)`
|
|
26
6
|
&:before {
|
|
27
7
|
background-color: ${({ theme: r }) => r.colors.neutral0};
|
|
28
8
|
border-radius: ${({ theme: r }) => r.borderRadius};
|
|
@@ -32,35 +12,33 @@ const v = g(h)`
|
|
|
32
12
|
top: 0;
|
|
33
13
|
width: ${({ value: r }) => `${r}%`};
|
|
34
14
|
}
|
|
35
|
-
`,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
b.defaultProps = {
|
|
15
|
+
`, t = ({ min: r, max: i, value: o, children: s, size: a, ...n }) => /* @__PURE__ */ u.createElement(p, {
|
|
16
|
+
background: "neutral600",
|
|
17
|
+
hasRadius: !0,
|
|
18
|
+
"aria-label": s,
|
|
19
|
+
"aria-valuemax": i,
|
|
20
|
+
"aria-valuemin": r,
|
|
21
|
+
"aria-valuenow": o,
|
|
22
|
+
height: a === "S" ? 1 : 2,
|
|
23
|
+
position: "relative",
|
|
24
|
+
role: "progressbar",
|
|
25
|
+
value: o,
|
|
26
|
+
width: a === "S" ? "78px" : "102px",
|
|
27
|
+
...n
|
|
28
|
+
});
|
|
29
|
+
t.defaultProps = {
|
|
52
30
|
min: 0,
|
|
53
31
|
max: 100,
|
|
54
32
|
value: 0,
|
|
55
33
|
size: "M"
|
|
56
34
|
};
|
|
57
|
-
|
|
58
|
-
children:
|
|
59
|
-
max:
|
|
60
|
-
min:
|
|
61
|
-
size:
|
|
62
|
-
value:
|
|
35
|
+
t.propTypes = {
|
|
36
|
+
children: e.node.isRequired,
|
|
37
|
+
max: e.number,
|
|
38
|
+
min: e.number,
|
|
39
|
+
size: e.oneOf(["S", "M"]),
|
|
40
|
+
value: e.number
|
|
63
41
|
};
|
|
64
42
|
export {
|
|
65
|
-
|
|
43
|
+
t as ProgressBar
|
|
66
44
|
};
|
package/dist/Radio/Radio.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react"),d=require("prop-types"),n=require("styled-components"),u=require("../BaseRadio/BaseRadio.cjs"),c=require("../Typography/Typography.cjs"),i=require("../Box/Box.cjs"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=a(l),o=a(d),p=a(n),y=p.default(c.Typography)`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
|
-
`,
|
|
4
|
+
`,r=({children:e,...s})=>t.default.createElement(y,{as:"label",textColor:"neutral800"},t.default.createElement(u.BaseRadio,{...s}),t.default.createElement(i.Box,{paddingLeft:2},e));r.propTypes={children:o.default.node.isRequired,value:o.default.any.isRequired};exports.Radio=r;
|