@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/Grid/GridItem.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"),c=require("styled-components"),p=require("prop-types"),m=require("../Box/Box.cjs"),f=require("./GridContext.cjs"),o=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},s=o(l),y=o(c),t=o(p),x=y.default.div`
|
|
2
2
|
grid-column: span ${({col:e})=>e};
|
|
3
3
|
max-width: 100%;
|
|
4
4
|
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
${({theme:e})=>e.mediaQueries.mobile} {
|
|
10
10
|
grid-column: span ${({xs:e})=>e};
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
12
|
+
`,r=({col:e,xs:d,s:u,...n})=>{const{gap:a,gridCols:i}=f.useGrid();return s.default.createElement(x,{gap:a,gridCols:i,col:e,xs:d,s:u},s.default.createElement(m.Box,{...n}))};r.defaultProps={col:void 0,s:void 0,xs:void 0};r.propTypes={col:t.default.number,s:t.default.number,xs:t.default.number};exports.GridItem=r;
|
package/dist/Grid/GridItem.js
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (t)
|
|
8
|
-
for (var e of t(o))
|
|
9
|
-
n.call(o, e) && s(r, e, o[e]);
|
|
10
|
-
return r;
|
|
11
|
-
};
|
|
12
|
-
var l = (r, o) => {
|
|
13
|
-
var e = {};
|
|
14
|
-
for (var m in r)
|
|
15
|
-
d.call(r, m) && o.indexOf(m) < 0 && (e[m] = r[m]);
|
|
16
|
-
if (r != null && t)
|
|
17
|
-
for (var m of t(r))
|
|
18
|
-
o.indexOf(m) < 0 && n.call(r, m) && (e[m] = r[m]);
|
|
19
|
-
return e;
|
|
20
|
-
};
|
|
21
|
-
import u from "react";
|
|
22
|
-
import x from "styled-components";
|
|
23
|
-
import i from "prop-types";
|
|
24
|
-
import { Box as $ } from "../Box/Box.js";
|
|
25
|
-
import { useGrid as v } from "./GridContext.js";
|
|
26
|
-
const y = x.div`
|
|
1
|
+
import o from "react";
|
|
2
|
+
import n from "styled-components";
|
|
3
|
+
import e from "prop-types";
|
|
4
|
+
import { Box as a } from "../Box/Box.js";
|
|
5
|
+
import { useGrid as l } from "./GridContext.js";
|
|
6
|
+
const u = n.div`
|
|
27
7
|
grid-column: span ${({ col: r }) => r};
|
|
28
8
|
max-width: 100%;
|
|
29
9
|
|
|
@@ -34,27 +14,28 @@ const y = x.div`
|
|
|
34
14
|
${({ theme: r }) => r.mediaQueries.mobile} {
|
|
35
15
|
grid-column: span ${({ xs: r }) => r};
|
|
36
16
|
}
|
|
37
|
-
`,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
gridCols: b,
|
|
17
|
+
`, m = ({ col: r, xs: t, s: i, ...p }) => {
|
|
18
|
+
const { gap: s, gridCols: d } = l();
|
|
19
|
+
return /* @__PURE__ */ o.createElement(u, {
|
|
20
|
+
gap: s,
|
|
21
|
+
gridCols: d,
|
|
43
22
|
col: r,
|
|
44
|
-
xs:
|
|
45
|
-
s:
|
|
46
|
-
}, /* @__PURE__ */
|
|
23
|
+
xs: t,
|
|
24
|
+
s: i
|
|
25
|
+
}, /* @__PURE__ */ o.createElement(a, {
|
|
26
|
+
...p
|
|
27
|
+
}));
|
|
47
28
|
};
|
|
48
|
-
|
|
29
|
+
m.defaultProps = {
|
|
49
30
|
col: void 0,
|
|
50
31
|
s: void 0,
|
|
51
32
|
xs: void 0
|
|
52
33
|
};
|
|
53
|
-
|
|
54
|
-
col:
|
|
55
|
-
s:
|
|
56
|
-
xs:
|
|
34
|
+
m.propTypes = {
|
|
35
|
+
col: e.number,
|
|
36
|
+
s: e.number,
|
|
37
|
+
xs: e.number
|
|
57
38
|
};
|
|
58
39
|
export {
|
|
59
|
-
|
|
40
|
+
m as GridItem
|
|
60
41
|
};
|
package/dist/Icon/Icon.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react"),a=require("prop-types"),n=require("styled-components"),u=require("../Box/Box.cjs"),r=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},c=r(s),l=r(a),d=r(n),p=d.default(u.Box)`
|
|
2
2
|
path {
|
|
3
3
|
fill: ${({color:e,theme:t})=>t.colors[e]};
|
|
4
4
|
}
|
|
5
5
|
${({theme:e,colors:t})=>t(e)}
|
|
6
|
-
`,
|
|
6
|
+
`,o=c.default.forwardRef((e,t)=>c.default.createElement(p,{ref:t,...e}));o.displayName="Icon";o.defaultProps={color:"neutral600",colors:()=>{}};o.propTypes={color:l.default.string,colors:l.default.func};exports.Icon=o;
|
package/dist/Icon/Icon.js
CHANGED
|
@@ -1,36 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
m.call(o, t) && c(r, t, o[t]);
|
|
7
|
-
if (p)
|
|
8
|
-
for (var t of p(o))
|
|
9
|
-
n.call(o, t) && c(r, t, o[t]);
|
|
10
|
-
return r;
|
|
11
|
-
};
|
|
12
|
-
import s from "react";
|
|
13
|
-
import a from "prop-types";
|
|
14
|
-
import i from "styled-components";
|
|
15
|
-
import { Box as d } from "../Box/Box.js";
|
|
16
|
-
const u = i(d)`
|
|
1
|
+
import e from "react";
|
|
2
|
+
import p from "prop-types";
|
|
3
|
+
import c from "styled-components";
|
|
4
|
+
import { Box as l } from "../Box/Box.js";
|
|
5
|
+
const s = c(l)`
|
|
17
6
|
path {
|
|
18
|
-
fill: ${({ color:
|
|
7
|
+
fill: ${({ color: o, theme: r }) => r.colors[o]};
|
|
19
8
|
}
|
|
20
|
-
${({ theme:
|
|
21
|
-
`,
|
|
22
|
-
ref:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
${({ theme: o, colors: r }) => r(o)}
|
|
10
|
+
`, t = e.forwardRef((o, r) => /* @__PURE__ */ e.createElement(s, {
|
|
11
|
+
ref: r,
|
|
12
|
+
...o
|
|
13
|
+
}));
|
|
14
|
+
t.displayName = "Icon";
|
|
15
|
+
t.defaultProps = {
|
|
26
16
|
color: "neutral600",
|
|
27
17
|
colors: () => {
|
|
28
18
|
}
|
|
29
19
|
};
|
|
30
|
-
|
|
31
|
-
color:
|
|
32
|
-
colors:
|
|
20
|
+
t.propTypes = {
|
|
21
|
+
color: p.string,
|
|
22
|
+
colors: p.func
|
|
33
23
|
};
|
|
34
24
|
export {
|
|
35
|
-
|
|
25
|
+
t as Icon
|
|
36
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react"),B=require("prop-types"),m=require("styled-components"),E=require("../Tooltip/Tooltip.cjs"),T=require("../BaseButton/BaseButton.cjs"),_=require("../Flex/Flex.cjs"),g=require("../VisuallyHidden/VisuallyHidden.cjs"),c=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=c(d),a=c(B),v=c(m),u=v.default(T.BaseButton)`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
${({noBorder:e})=>e?"border: none;":void 0}
|
|
39
|
-
`,
|
|
39
|
+
`,j=v.default(_.Flex)`
|
|
40
40
|
& span:first-child button {
|
|
41
41
|
border-left: 1px solid ${({theme:e})=>e.colors.neutral200};
|
|
42
42
|
border-radius: ${({theme:e})=>`${e.borderRadius} 0 0 ${e.borderRadius}`};
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
border-radius: ${({theme:e})=>`0 ${e.borderRadius} ${e.borderRadius} 0`};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
& ${
|
|
49
|
+
& ${u} {
|
|
50
50
|
border-radius: 0;
|
|
51
51
|
border-left: none;
|
|
52
52
|
|
|
@@ -83,4 +83,4 @@
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,s=t.default.forwardRef(({label:e,noBorder:n,children:l,icon:o,disabled:r,onClick:f,"aria-label":h,...p},b)=>{const $=y=>{!r&&f&&f(y)};return e?t.default.createElement(E.Tooltip,{label:e},t.default.createElement(u,{...p,ref:b,noBorder:n,onClick:$,"aria-disabled":r},t.default.createElement(g.VisuallyHidden,{as:"span"},e),d.cloneElement(o||l,{"aria-hidden":!0,focusable:!1}))):t.default.createElement(u,{...p,ref:b,noBorder:n,onClick:$,"aria-disabled":r},t.default.createElement(g.VisuallyHidden,{as:"span"},h),d.cloneElement(o||l,{"aria-hidden":!0,focusable:!1}))});s.displayName="IconButton";s.defaultProps={"aria-label":void 0,children:void 0,disabled:!1,icon:void 0,label:void 0,noBorder:!1,onClick:void 0};const i=(e,n)=>(l,o)=>!l[o]&&e.every(r=>!l[r])?new Error(`One of the following props is required: ${o}, ${e.join(", ")}`):a.default.checkPropTypes({[o]:a.default[n]},l,"prop","IconButton");s.propTypes={"aria-label":i(["label"],"string"),children:i(["icon"],"node"),disabled:a.default.bool,icon:i(["children"],"node"),label:i(["aria-label"],"string"),noBorder:a.default.bool,onClick:a.default.func};exports.IconButton=s;exports.IconButtonGroup=j;
|
|
@@ -1,32 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
for (var o of i(e))
|
|
10
|
-
y.call(e, o) && g(r, o, e[o]);
|
|
11
|
-
return r;
|
|
12
|
-
}, c = (r, e) => C(r, T(e));
|
|
13
|
-
var k = (r, e) => {
|
|
14
|
-
var o = {};
|
|
15
|
-
for (var l in r)
|
|
16
|
-
v.call(r, l) && e.indexOf(l) < 0 && (o[l] = r[l]);
|
|
17
|
-
if (r != null && i)
|
|
18
|
-
for (var l of i(r))
|
|
19
|
-
e.indexOf(l) < 0 && y.call(r, l) && (o[l] = r[l]);
|
|
20
|
-
return o;
|
|
21
|
-
};
|
|
22
|
-
import a, { cloneElement as B } from "react";
|
|
23
|
-
import n from "prop-types";
|
|
24
|
-
import I from "styled-components";
|
|
25
|
-
import { Tooltip as j } from "../Tooltip/Tooltip.js";
|
|
26
|
-
import { BaseButton as P } from "../BaseButton/BaseButton.js";
|
|
27
|
-
import { Flex as _ } from "../Flex/Flex.js";
|
|
28
|
-
import { VisuallyHidden as E } from "../VisuallyHidden/VisuallyHidden.js";
|
|
29
|
-
const u = I(P)`
|
|
1
|
+
import l, { cloneElement as b } from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import h from "styled-components";
|
|
4
|
+
import { Tooltip as v } from "../Tooltip/Tooltip.js";
|
|
5
|
+
import { BaseButton as y } from "../BaseButton/BaseButton.js";
|
|
6
|
+
import { Flex as k } from "../Flex/Flex.js";
|
|
7
|
+
import { VisuallyHidden as $ } from "../VisuallyHidden/VisuallyHidden.js";
|
|
8
|
+
const s = h(y)`
|
|
30
9
|
display: flex;
|
|
31
10
|
align-items: center;
|
|
32
11
|
justify-content: center;
|
|
@@ -64,7 +43,7 @@ const u = I(P)`
|
|
|
64
43
|
}
|
|
65
44
|
}
|
|
66
45
|
${({ noBorder: r }) => r ? "border: none;" : void 0}
|
|
67
|
-
`,
|
|
46
|
+
`, T = h(k)`
|
|
68
47
|
& span:first-child button {
|
|
69
48
|
border-left: 1px solid ${({ theme: r }) => r.colors.neutral200};
|
|
70
49
|
border-radius: ${({ theme: r }) => `${r.borderRadius} 0 0 ${r.borderRadius}`};
|
|
@@ -74,7 +53,7 @@ const u = I(P)`
|
|
|
74
53
|
border-radius: ${({ theme: r }) => `0 ${r.borderRadius} ${r.borderRadius} 0`};
|
|
75
54
|
}
|
|
76
55
|
|
|
77
|
-
& ${
|
|
56
|
+
& ${s} {
|
|
78
57
|
border-radius: 0;
|
|
79
58
|
border-left: none;
|
|
80
59
|
|
|
@@ -111,39 +90,40 @@ const u = I(P)`
|
|
|
111
90
|
}
|
|
112
91
|
}
|
|
113
92
|
}
|
|
114
|
-
`,
|
|
115
|
-
(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
!t && p && p(w);
|
|
93
|
+
`, d = l.forwardRef(
|
|
94
|
+
({ label: r, noBorder: n, children: o, icon: e, disabled: a, onClick: c, "aria-label": m, ...u }, f) => {
|
|
95
|
+
const p = (g) => {
|
|
96
|
+
!a && c && c(g);
|
|
119
97
|
};
|
|
120
|
-
return r ? /* @__PURE__ */
|
|
98
|
+
return r ? /* @__PURE__ */ l.createElement(v, {
|
|
121
99
|
label: r
|
|
122
|
-
}, /* @__PURE__ */
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
100
|
+
}, /* @__PURE__ */ l.createElement(s, {
|
|
101
|
+
...u,
|
|
102
|
+
ref: f,
|
|
103
|
+
noBorder: n,
|
|
104
|
+
onClick: p,
|
|
105
|
+
"aria-disabled": a
|
|
106
|
+
}, /* @__PURE__ */ l.createElement($, {
|
|
128
107
|
as: "span"
|
|
129
|
-
}, r),
|
|
108
|
+
}, r), b(e || o, {
|
|
130
109
|
"aria-hidden": !0,
|
|
131
110
|
focusable: !1
|
|
132
|
-
}))) : /* @__PURE__ */
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
111
|
+
}))) : /* @__PURE__ */ l.createElement(s, {
|
|
112
|
+
...u,
|
|
113
|
+
ref: f,
|
|
114
|
+
noBorder: n,
|
|
115
|
+
onClick: p,
|
|
116
|
+
"aria-disabled": a
|
|
117
|
+
}, /* @__PURE__ */ l.createElement($, {
|
|
138
118
|
as: "span"
|
|
139
|
-
},
|
|
119
|
+
}, m), b(e || o, {
|
|
140
120
|
"aria-hidden": !0,
|
|
141
121
|
focusable: !1
|
|
142
122
|
}));
|
|
143
123
|
}
|
|
144
124
|
);
|
|
145
|
-
|
|
146
|
-
|
|
125
|
+
d.displayName = "IconButton";
|
|
126
|
+
d.defaultProps = {
|
|
147
127
|
"aria-label": void 0,
|
|
148
128
|
children: void 0,
|
|
149
129
|
disabled: !1,
|
|
@@ -152,17 +132,17 @@ f.defaultProps = {
|
|
|
152
132
|
noBorder: !1,
|
|
153
133
|
onClick: void 0
|
|
154
134
|
};
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
"aria-label":
|
|
158
|
-
children:
|
|
159
|
-
disabled:
|
|
160
|
-
icon:
|
|
161
|
-
label:
|
|
162
|
-
noBorder:
|
|
163
|
-
onClick:
|
|
135
|
+
const i = (r, n) => (o, e) => !o[e] && r.every((a) => !o[a]) ? new Error(`One of the following props is required: ${e}, ${r.join(", ")}`) : t.checkPropTypes({ [e]: t[n] }, o, "prop", "IconButton");
|
|
136
|
+
d.propTypes = {
|
|
137
|
+
"aria-label": i(["label"], "string"),
|
|
138
|
+
children: i(["icon"], "node"),
|
|
139
|
+
disabled: t.bool,
|
|
140
|
+
icon: i(["children"], "node"),
|
|
141
|
+
label: i(["aria-label"], "string"),
|
|
142
|
+
noBorder: t.bool,
|
|
143
|
+
onClick: t.func
|
|
164
144
|
};
|
|
165
145
|
export {
|
|
166
|
-
|
|
167
|
-
|
|
146
|
+
d as IconButton,
|
|
147
|
+
T as IconButtonGroup
|
|
168
148
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("react"),K=require("prop-types"),g=require("../Box/Box.cjs"),r=require("../helpers/keyboardKeys.cjs"),y=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},v=y(p),f=y(K),d=({tagName:t,attributeName:i,...b})=>{const a=()=>{const e=document.activeElement;return t?e.tagName.toLowerCase()===t:e.hasAttribute(i)},c=e=>t?e.querySelectorAll(t):e.querySelectorAll(`[${i}]`),m=e=>{switch(e.key){case r.KeyboardKeys.RIGHT:case r.KeyboardKeys.DOWN:{if(a()){e.preventDefault();const n=document.activeElement,o=[...c(e.currentTarget)],s=o.findIndex(u=>u===n),l=s+1<o.length?s+1:0;o[l].focus()}break}case r.KeyboardKeys.LEFT:case r.KeyboardKeys.UP:{if(a()){e.preventDefault();const n=document.activeElement,o=[...c(e.currentTarget)],s=o.findIndex(u=>u===n),l=s-1>-1?s-1:o.length-1;o[l].focus()}break}case r.KeyboardKeys.HOME:{a()&&(e.preventDefault(),c(e.currentTarget).item(0).focus());break}case r.KeyboardKeys.END:{if(a()){e.preventDefault();const n=c(e.currentTarget);n.item(n.length-1).focus()}break}}};return v.default.createElement(g.Box,{onKeyDown:m,...b})};d.defaultProps={attributeName:void 0,tagName:void 0};d.propTypes={attributeName:f.default.string,tagName:f.default.string};exports.KeyboardNavigable=d;
|
|
@@ -1,78 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
for (var o of i(e))
|
|
18
|
-
t.indexOf(o) < 0 && g.call(e, o) && (n[o] = e[o]);
|
|
19
|
-
return n;
|
|
20
|
-
};
|
|
21
|
-
import h from "react";
|
|
22
|
-
import b from "prop-types";
|
|
23
|
-
import { Box as k } from "../Box/Box.js";
|
|
24
|
-
import { KeyboardKeys as a } from "../helpers/keyboardKeys.js";
|
|
25
|
-
const D = (o) => {
|
|
26
|
-
var p = o, { tagName: e, attributeName: t } = p, n = x(p, ["tagName", "attributeName"]);
|
|
27
|
-
const u = () => {
|
|
28
|
-
const r = document.activeElement;
|
|
29
|
-
return e ? r.tagName.toLowerCase() === e : r.hasAttribute(t);
|
|
30
|
-
}, f = (r) => e ? r.querySelectorAll(e) : r.querySelectorAll(`[${t}]`), T = (r) => {
|
|
31
|
-
switch (r.key) {
|
|
32
|
-
case a.RIGHT:
|
|
33
|
-
case a.DOWN: {
|
|
34
|
-
if (u()) {
|
|
35
|
-
r.preventDefault();
|
|
36
|
-
const c = document.activeElement, s = [...f(r.currentTarget)], l = s.findIndex((m) => m === c), d = l + 1 < s.length ? l + 1 : 0;
|
|
37
|
-
s[d].focus();
|
|
1
|
+
import E from "react";
|
|
2
|
+
import i from "prop-types";
|
|
3
|
+
import { Box as y } from "../Box/Box.js";
|
|
4
|
+
import { KeyboardKeys as r } from "../helpers/keyboardKeys.js";
|
|
5
|
+
const d = ({ tagName: c, attributeName: f, ...m }) => {
|
|
6
|
+
const s = () => {
|
|
7
|
+
const e = document.activeElement;
|
|
8
|
+
return c ? e.tagName.toLowerCase() === c : e.hasAttribute(f);
|
|
9
|
+
}, a = (e) => c ? e.querySelectorAll(c) : e.querySelectorAll(`[${f}]`), p = (e) => {
|
|
10
|
+
switch (e.key) {
|
|
11
|
+
case r.RIGHT:
|
|
12
|
+
case r.DOWN: {
|
|
13
|
+
if (s()) {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
const t = document.activeElement, n = [...a(e.currentTarget)], o = n.findIndex((u) => u === t), l = o + 1 < n.length ? o + 1 : 0;
|
|
16
|
+
n[l].focus();
|
|
38
17
|
}
|
|
39
18
|
break;
|
|
40
19
|
}
|
|
41
|
-
case
|
|
42
|
-
case
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
20
|
+
case r.LEFT:
|
|
21
|
+
case r.UP: {
|
|
22
|
+
if (s()) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
const t = document.activeElement, n = [...a(e.currentTarget)], o = n.findIndex((u) => u === t), l = o - 1 > -1 ? o - 1 : n.length - 1;
|
|
25
|
+
n[l].focus();
|
|
47
26
|
}
|
|
48
27
|
break;
|
|
49
28
|
}
|
|
50
|
-
case
|
|
51
|
-
|
|
29
|
+
case r.HOME: {
|
|
30
|
+
s() && (e.preventDefault(), a(e.currentTarget).item(0).focus());
|
|
52
31
|
break;
|
|
53
32
|
}
|
|
54
|
-
case
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
33
|
+
case r.END: {
|
|
34
|
+
if (s()) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
const t = a(e.currentTarget);
|
|
37
|
+
t.item(t.length - 1).focus();
|
|
59
38
|
}
|
|
60
39
|
break;
|
|
61
40
|
}
|
|
62
41
|
}
|
|
63
42
|
};
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
onKeyDown:
|
|
66
|
-
|
|
43
|
+
return /* @__PURE__ */ E.createElement(y, {
|
|
44
|
+
onKeyDown: p,
|
|
45
|
+
...m
|
|
46
|
+
});
|
|
67
47
|
};
|
|
68
|
-
|
|
48
|
+
d.defaultProps = {
|
|
69
49
|
attributeName: void 0,
|
|
70
50
|
tagName: void 0
|
|
71
51
|
};
|
|
72
|
-
|
|
73
|
-
attributeName:
|
|
74
|
-
tagName:
|
|
52
|
+
d.propTypes = {
|
|
53
|
+
attributeName: i.string,
|
|
54
|
+
tagName: i.string
|
|
75
55
|
};
|
|
76
56
|
export {
|
|
77
|
-
|
|
57
|
+
d as KeyboardNavigable
|
|
78
58
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react"),E=require("styled-components"),b=require("prop-types"),s=require("../Typography/Typography.cjs"),d=require("../Box/Box.cjs"),i=require("../Flex/Flex.cjs"),v=require("../helpers/useElementOnScreen.cjs"),B=require("../helpers/useResizeObserver.cjs"),p=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=p(c),R=p(E),a=p(b),T=()=>{const e=c.useRef(null),[l,r]=c.useState(null),[n,o]=v.useElementOnScreen({root:null,rootMargin:"0px",threshold:0});return B.useResizeObserver(n,()=>{n.current&&r(n.current.getBoundingClientRect())}),c.useEffect(()=>{e.current&&r(e.current.getBoundingClientRect())},[e]),{containerRef:n,isVisible:o,baseHeaderLayoutRef:e,headerSize:l}},f=e=>{const{containerRef:l,isVisible:r,baseHeaderLayoutRef:n,headerSize:o}=T();return t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{style:{height:o?.height},ref:l},r&&t.default.createElement(u,{ref:n,...e})),!r&&t.default.createElement(u,{...e,sticky:!0,width:o?.width}))};f.displayName="HeaderLayout";const L=R.default(d.Box)`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
right: 0;
|
|
5
5
|
width: ${e=>e.width}px;
|
|
6
6
|
z-index: 4;
|
|
7
7
|
box-shadow: ${({theme:e})=>e.shadows.tableShadow};
|
|
8
|
-
`,u=
|
|
8
|
+
`,u=t.default.forwardRef(({navigationAction:e,primaryAction:l,secondaryAction:r,subtitle:n,title:o,sticky:h,width:m,...y},x)=>{const g=typeof n=="string";return h?t.default.createElement(L,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,background:"neutral0",width:m,"data-strapi-header-sticky":!0},t.default.createElement(i.Flex,{justifyContent:"space-between"},t.default.createElement(i.Flex,null,e&&t.default.createElement(d.Box,{paddingRight:3},e),t.default.createElement(d.Box,null,t.default.createElement(s.Typography,{variant:"beta",as:"h1",...y},o),g?t.default.createElement(s.Typography,{variant:"pi",textColor:"neutral600"},n):n),r?t.default.createElement(d.Box,{paddingLeft:4},r):null),t.default.createElement(i.Flex,null,l?t.default.createElement(d.Box,{paddingLeft:2},l):void 0))):t.default.createElement(d.Box,{ref:x,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:e?6:8,background:"neutral100","data-strapi-header":!0},e?t.default.createElement(d.Box,{paddingBottom:2},e):null,t.default.createElement(i.Flex,{justifyContent:"space-between"},t.default.createElement(i.Flex,null,t.default.createElement(s.Typography,{as:"h1",variant:"alpha",...y},o),r?t.default.createElement(d.Box,{paddingLeft:4},r):null),l),g?t.default.createElement(s.Typography,{variant:"epsilon",textColor:"neutral600",as:"p"},n):n)});u.displayName="BaseHeaderLayout";u.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0,sticky:!1,width:void 0};u.propTypes={navigationAction:a.default.node,primaryAction:a.default.node,secondaryAction:a.default.node,sticky:a.default.bool,subtitle:a.default.oneOfType([a.default.string,a.default.node]),title:a.default.string.isRequired,width:a.default.number};f.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0};f.propTypes={navigationAction:a.default.node,primaryAction:a.default.node,secondaryAction:a.default.node,subtitle:a.default.oneOfType([a.default.string,a.default.node]),title:a.default.string.isRequired};exports.BaseHeaderLayout=u;exports.HeaderLayout=f;
|