@strapi/design-system 1.6.3 → 1.6.4
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/Accordion.cjs +5 -5
- package/dist/Accordion/Accordion.js +45 -44
- package/dist/Accordion/AccordionContent.cjs +1 -1
- package/dist/Accordion/AccordionContent.js +4 -4
- package/dist/Accordion/AccordionGroup.cjs +4 -4
- package/dist/Accordion/AccordionGroup.js +18 -18
- package/dist/Accordion/AccordionToggle.cjs +2 -2
- package/dist/Accordion/AccordionToggle.js +11 -11
- package/dist/Alert/Alert.cjs +1 -1
- package/dist/Alert/Alert.js +8 -8
- package/dist/Avatar/Avatar.cjs +5 -5
- package/dist/Avatar/Avatar.js +11 -11
- package/dist/Avatar/AvatarGroup.cjs +2 -2
- package/dist/Avatar/AvatarGroup.js +4 -4
- package/dist/BaseButton/BaseButton.cjs +5 -11
- package/dist/BaseButton/BaseButton.js +31 -38
- package/dist/BaseCheckbox/BaseCheckbox.cjs +3 -3
- package/dist/BaseCheckbox/BaseCheckbox.js +22 -22
- package/dist/BaseRadio/BaseRadio.cjs +2 -2
- package/dist/BaseRadio/BaseRadio.js +4 -4
- package/dist/BaseRadio/RadioGroup.cjs +1 -1
- package/dist/BaseRadio/RadioGroup.js +28 -26
- package/dist/Box/Box.cjs +1 -1
- package/dist/Box/Box.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
- package/dist/Breadcrumbs/Breadcrumbs.js +12 -12
- package/dist/Button/Button.cjs +10 -27
- package/dist/Button/Button.js +65 -85
- package/dist/Button/utils.cjs +22 -22
- package/dist/Button/utils.js +2 -2
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.js +15 -14
- package/dist/Card/CardAsset.js +4 -4
- package/dist/Card/CardBody.cjs +1 -1
- package/dist/Card/CardBody.js +4 -4
- package/dist/Card/CardCheckbox.cjs +1 -1
- package/dist/Card/CardCheckbox.js +6 -6
- package/dist/Card/CardTitle.cjs +1 -1
- package/dist/Card/CardTitle.js +1 -1
- package/dist/CarouselInput/Carousel.cjs +2 -2
- package/dist/CarouselInput/Carousel.js +19 -64
- package/dist/CarouselInput/CarouselActions.js +1 -9
- package/dist/CarouselInput/CarouselImage.js +1 -10
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.js +19 -24
- package/dist/CarouselInput/CarouselSlide.js +13 -9
- package/dist/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.js +7 -26
- package/dist/Combobox/Combobox.cjs +1 -1
- package/dist/Combobox/Combobox.js +106 -120
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/ComboboxOption.js +18 -17
- package/dist/DatePicker/DatePicker.cjs +1 -1
- package/dist/DatePicker/DatePicker.js +47 -46
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
- package/dist/DatePicker/DatePickerCalendar.js +28 -61
- package/dist/DatePicker/DatePickerTd.js +1 -12
- package/dist/DatePicker/DatePickerTh.cjs +3 -3
- package/dist/DatePicker/DatePickerTh.js +7 -16
- package/dist/DatePicker/components.cjs +3 -3
- package/dist/DatePicker/components.js +6 -6
- package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +64 -61
- package/dist/DateTimePicker/DateTimePickerProps.js +1 -3
- package/dist/Dialog/Dialog.cjs +4 -4
- package/dist/Dialog/Dialog.js +26 -37
- package/dist/Dialog/DialogBody.cjs +1 -1
- package/dist/Dialog/DialogBody.js +2 -11
- package/dist/Dialog/DialogFooter.cjs +1 -1
- package/dist/Dialog/DialogFooter.js +2 -7
- package/dist/DismissibleLayer/DismissibleLayer.js +1 -4
- package/dist/Divider/Divider.js +1 -5
- package/dist/EmptyStateLayout/EmptyStateLayout.cjs +1 -1
- package/dist/EmptyStateLayout/EmptyStateLayout.js +2 -16
- package/dist/EmptyStateLayout/story-assets/Illo.js +60 -45
- package/dist/Field/Field.cjs +1 -1
- package/dist/Field/Field.js +12 -13
- package/dist/Field/FieldAction.cjs +1 -1
- package/dist/Field/FieldAction.js +2 -6
- package/dist/Field/FieldError.js +1 -7
- package/dist/Field/FieldHint.js +1 -6
- package/dist/Field/FieldInput.cjs +4 -4
- package/dist/Field/FieldInput.js +26 -34
- package/dist/Field/FieldLabel.cjs +1 -1
- package/dist/Field/FieldLabel.js +3 -16
- package/dist/FocusTrap/FocusTrap.js +1 -5
- package/dist/Grid/Grid.cjs +3 -3
- package/dist/Grid/Grid.js +12 -15
- package/dist/Grid/GridItem.cjs +2 -2
- package/dist/Grid/GridItem.js +5 -13
- package/dist/IconButton/IconButton.cjs +7 -12
- package/dist/IconButton/IconButton.js +88 -84
- package/dist/JSONInput/JSONInput.cjs +1 -1
- package/dist/JSONInput/JSONInput.js +85 -78
- package/dist/JSONInput/JSONInputContainer.cjs +10 -10
- package/dist/JSONInput/JSONInputContainer.js +22 -15
- package/dist/Layout/ActionLayout.js +1 -13
- package/dist/Layout/ContentLayout.js +1 -4
- package/dist/Layout/HeaderLayout.cjs +1 -1
- package/dist/Layout/HeaderLayout.js +35 -64
- package/dist/Layout/Layout.js +1 -5
- package/dist/Layout/TwoColsLayout.js +1 -17
- package/dist/Link/Link.cjs +5 -5
- package/dist/Link/Link.js +55 -57
- package/dist/LinkButton/LinkButton.cjs +7 -24
- package/dist/LinkButton/LinkButton.js +60 -87
- package/dist/LiveRegions/LiveRegions.cjs +1 -1
- package/dist/LiveRegions/LiveRegions.js +1 -1
- package/dist/Loader/Loader.cjs +4 -4
- package/dist/Loader/Loader.js +26 -24
- package/dist/Main/Main.js +1 -6
- package/dist/Main/SkipToContent.cjs +2 -2
- package/dist/Main/SkipToContent.js +17 -13
- package/dist/MainNav/MainNav.cjs +2 -2
- package/dist/MainNav/MainNav.js +21 -20
- package/dist/MainNav/NavBrand.cjs +2 -2
- package/dist/MainNav/NavBrand.js +4 -38
- package/dist/MainNav/NavCondense.cjs +2 -2
- package/dist/MainNav/NavCondense.js +10 -18
- package/dist/MainNav/NavFooter.js +1 -3
- package/dist/MainNav/NavLink.cjs +4 -4
- package/dist/MainNav/NavLink.js +8 -34
- package/dist/MainNav/NavSection.cjs +1 -1
- package/dist/MainNav/NavSection.js +5 -38
- package/dist/MainNav/NavSections.cjs +2 -2
- package/dist/MainNav/NavSections.js +4 -15
- package/dist/MainNav/NavUser.cjs +2 -2
- package/dist/MainNav/NavUser.js +6 -27
- package/dist/ModalLayout/ModalBody.js +1 -4
- package/dist/ModalLayout/ModalFooter.cjs +1 -1
- package/dist/ModalLayout/ModalFooter.js +2 -10
- package/dist/ModalLayout/ModalHeader.cjs +2 -2
- package/dist/ModalLayout/ModalHeader.js +8 -20
- package/dist/ModalLayout/ModalLayout.cjs +3 -3
- package/dist/ModalLayout/ModalLayout.js +23 -31
- package/dist/NumberInput/NumberInput.cjs +2 -2
- package/dist/NumberInput/NumberInput.js +54 -59
- package/dist/Pagination/Pagination.cjs +2 -2
- package/dist/Pagination/Pagination.js +11 -16
- package/dist/Pagination/components.cjs +3 -3
- package/dist/Pagination/components.js +31 -38
- package/dist/Popover/Popover.cjs +3 -3
- package/dist/Popover/Popover.js +5 -5
- package/dist/Portal/Portal.cjs +1 -1
- package/dist/Portal/Portal.js +10 -12
- package/dist/ProgressBar/ProgressBar.js +17 -14
- package/dist/Radio/Radio.cjs +2 -2
- package/dist/Radio/Radio.js +4 -11
- package/dist/RawTable/RawCell.cjs +1 -1
- package/dist/RawTable/RawCell.js +5 -14
- package/dist/RawTable/RawTable.cjs +1 -1
- package/dist/RawTable/RawTable.js +36 -35
- package/dist/RawTable/RawTbody.js +1 -3
- package/dist/RawTable/RawThead.js +1 -3
- package/dist/RawTable/RawTr.js +1 -4
- package/dist/Searchbar/SearchForm.js +1 -4
- package/dist/Searchbar/Searchbar.cjs +3 -3
- package/dist/Searchbar/Searchbar.js +21 -25
- package/dist/Select/MultiSelectNested.js +2 -14
- package/dist/Select/OptGroup.cjs +1 -1
- package/dist/Select/OptGroup.js +14 -10
- package/dist/Select/Option.cjs +3 -3
- package/dist/Select/Option.js +31 -33
- package/dist/Select/Select.cjs +2 -2
- package/dist/Select/Select.js +86 -106
- package/dist/Select/SelectButton.cjs +1 -1
- package/dist/Select/SelectButton.js +14 -11
- package/dist/Select/SelectList.cjs +1 -1
- package/dist/Select/SelectList.js +20 -16
- package/dist/Select/SelectTags.cjs +3 -3
- package/dist/Select/SelectTags.js +17 -15
- package/dist/Select/SingleSelect.cjs +1 -1
- package/dist/Select/SingleSelect.js +1 -1
- package/dist/SimpleMenu/SimpleMenu.cjs +3 -3
- package/dist/SimpleMenu/SimpleMenu.js +43 -67
- package/dist/Status/Status.js +15 -13
- package/dist/SubNav/SubNav.cjs +2 -2
- package/dist/SubNav/SubNav.js +5 -9
- package/dist/SubNav/SubNavHeader.cjs +2 -2
- package/dist/SubNav/SubNavHeader.js +31 -53
- package/dist/SubNav/SubNavLink.cjs +3 -3
- package/dist/SubNav/SubNavLink.js +18 -22
- package/dist/SubNav/SubNavLinkSection.cjs +2 -2
- package/dist/SubNav/SubNavLinkSection.js +5 -30
- package/dist/SubNav/SubNavSection.cjs +2 -2
- package/dist/SubNav/SubNavSection.js +23 -30
- package/dist/SubNav/SubNavSectionLabel.cjs +2 -2
- package/dist/SubNav/SubNavSectionLabel.js +15 -24
- package/dist/SubNav/SubNavSections.cjs +1 -1
- package/dist/SubNav/SubNavSections.js +3 -12
- package/dist/Switch/Switch.cjs +2 -2
- package/dist/Switch/Switch.js +16 -17
- package/dist/Table/Cell.cjs +1 -1
- package/dist/Table/Cell.js +3 -8
- package/dist/Table/TFooter.cjs +2 -2
- package/dist/Table/TFooter.js +3 -17
- package/dist/Table/Table.cjs +1 -1
- package/dist/Table/Table.js +2 -18
- package/dist/Table/Tbody.js +1 -3
- package/dist/Table/Thead.js +1 -3
- package/dist/Table/Tr.js +1 -3
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.js +30 -27
- package/dist/Tabs/TabPanels.js +2 -10
- package/dist/Tabs/Tabs.cjs +1 -1
- package/dist/Tabs/Tabs.js +43 -51
- package/dist/Tag/Tag.cjs +1 -1
- package/dist/Tag/Tag.js +20 -23
- package/dist/TextButton/TextButton.cjs +6 -6
- package/dist/TextButton/TextButton.js +15 -15
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.js +6 -24
- package/dist/Textarea/Textarea.cjs +2 -2
- package/dist/Textarea/Textarea.js +10 -25
- package/dist/Textarea/TextareaInput.cjs +1 -1
- package/dist/Textarea/TextareaInput.js +15 -15
- package/dist/TimePicker/TimePicker.cjs +2 -2
- package/dist/TimePicker/TimePicker.js +26 -25
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +5 -5
- package/dist/ToggleCheckbox/ToggleCheckbox.js +85 -60
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.js +14 -32
- package/dist/Tooltip/Tooltip.cjs +2 -2
- package/dist/Tooltip/Tooltip.js +62 -53
- package/dist/Tooltip/hooks/useTooltipHandlers.cjs +1 -1
- package/dist/Tooltip/hooks/useTooltipHandlers.js +7 -7
- package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -1
- package/dist/Tooltip/hooks/useTooltipLayout.js +8 -5
- package/dist/Typography/Typography.cjs +3 -2
- package/dist/Typography/Typography.js +17 -14
- package/dist/helpers/objects.cjs +1 -1
- package/dist/helpers/objects.js +1 -1
- package/dist/hooks/useId.cjs +1 -0
- package/dist/hooks/useId.js +13 -0
- package/dist/themes/extendTheme.cjs +1 -1
- package/dist/themes/extendTheme.js +4 -4
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +4 -13
- package/dist/v2/Breadcrumbs/Crumb.js +11 -12
- package/dist/v2/Breadcrumbs/CrumbLink.js +1 -3
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +5 -11
- package/dist/v2/Breadcrumbs/Divider.js +1 -8
- package/dist/v2/Link/Link.cjs +2 -2
- package/dist/v2/Link/Link.js +5 -24
- package/dist/v2/LinkButton/LinkButton.cjs +11 -24
- package/dist/v2/LinkButton/LinkButton.js +62 -84
- package/dist/v2/MainNav/MainNav.cjs +2 -2
- package/dist/v2/MainNav/MainNav.js +21 -20
- package/dist/v2/MainNav/NavBrand.cjs +2 -2
- package/dist/v2/MainNav/NavBrand.js +4 -38
- package/dist/v2/MainNav/NavCondense.cjs +2 -2
- package/dist/v2/MainNav/NavCondense.js +10 -18
- package/dist/v2/MainNav/NavFooter.js +1 -3
- package/dist/v2/MainNav/NavLink.cjs +4 -4
- package/dist/v2/MainNav/NavLink.js +10 -39
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.js +5 -38
- package/dist/v2/MainNav/NavSections.cjs +2 -2
- package/dist/v2/MainNav/NavSections.js +4 -15
- package/dist/v2/MainNav/NavUser.cjs +2 -2
- package/dist/v2/MainNav/NavUser.js +6 -27
- package/dist/v2/Pagination/Pagination.cjs +2 -2
- package/dist/v2/Pagination/Pagination.js +11 -16
- package/dist/v2/Pagination/components.cjs +2 -2
- package/dist/v2/Pagination/components.js +11 -39
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +4 -4
- package/dist/v2/SimpleMenu/SimpleMenu.js +42 -65
- package/dist/v2/SubNav/SubNav.cjs +2 -2
- package/dist/v2/SubNav/SubNav.js +5 -9
- package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
- package/dist/v2/SubNav/SubNavHeader.js +31 -53
- package/dist/v2/SubNav/SubNavLink.cjs +2 -2
- package/dist/v2/SubNav/SubNavLink.js +18 -22
- package/dist/v2/SubNav/SubNavLinkSection.cjs +2 -2
- package/dist/v2/SubNav/SubNavLinkSection.js +5 -30
- package/dist/v2/SubNav/SubNavSection.cjs +2 -2
- package/dist/v2/SubNav/SubNavSection.js +26 -33
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +2 -2
- package/dist/v2/SubNav/SubNavSectionLabel.js +15 -24
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.js +3 -12
- package/package.json +7 -4
package/dist/Main/Main.js
CHANGED
|
@@ -8,12 +8,7 @@ const r = a.main`
|
|
|
8
8
|
}
|
|
9
9
|
`, e = ({ labelledBy: o, ...t }) => {
|
|
10
10
|
const n = o || "main-content-title";
|
|
11
|
-
return /* @__PURE__ */ i.createElement(r, {
|
|
12
|
-
"aria-labelledby": n,
|
|
13
|
-
id: "main-content",
|
|
14
|
-
tabIndex: -1,
|
|
15
|
-
...t
|
|
16
|
-
});
|
|
11
|
+
return /* @__PURE__ */ i.createElement(r, { "aria-labelledby": n, id: "main-content", tabIndex: -1, ...t });
|
|
17
12
|
};
|
|
18
13
|
e.defaultProps = {
|
|
19
14
|
labelledBy: void 0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react"),s=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react"),s=require("prop-types"),r=require("styled-components"),a=require("../Box/Box.cjs"),t=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},c=t(n),u=t(s),l=t(r),d=l.default(a.Box)`
|
|
2
2
|
text-decoration: none;
|
|
3
3
|
z-index: 9999;
|
|
4
4
|
left: -100%;
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
left: ${({theme:e})=>e.spaces[3]};
|
|
9
9
|
top: ${({theme:e})=>e.spaces[3]};
|
|
10
10
|
}
|
|
11
|
-
`,o=({children:e})=>c.default.createElement(d,{as:"a",href:"#main-content",background:"primary600",color:"neutral0",padding:3,position:"absolute",hasRadius:!0},e);o.propTypes={children:
|
|
11
|
+
`,o=({children:e})=>c.default.createElement(d,{as:"a",href:"#main-content",background:"primary600",color:"neutral0",padding:3,position:"absolute",hasRadius:!0},e);o.propTypes={children:u.default.node.isRequired};exports.SkipToContent=o;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import e from "react";
|
|
2
|
-
import t from "
|
|
3
|
-
import r from "
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import r from "styled-components";
|
|
4
4
|
import { Box as n } from "../Box/Box.js";
|
|
5
|
-
const p =
|
|
5
|
+
const p = r(n)`
|
|
6
6
|
text-decoration: none;
|
|
7
7
|
z-index: 9999;
|
|
8
8
|
left: -100%;
|
|
@@ -12,17 +12,21 @@ const p = t(n)`
|
|
|
12
12
|
left: ${({ theme: o }) => o.spaces[3]};
|
|
13
13
|
top: ${({ theme: o }) => o.spaces[3]};
|
|
14
14
|
}
|
|
15
|
-
`, a = ({ children: o }) => /* @__PURE__ */ e.createElement(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
`, a = ({ children: o }) => /* @__PURE__ */ e.createElement(
|
|
16
|
+
p,
|
|
17
|
+
{
|
|
18
|
+
as: "a",
|
|
19
|
+
href: "#main-content",
|
|
20
|
+
background: "primary600",
|
|
21
|
+
color: "neutral0",
|
|
22
|
+
padding: 3,
|
|
23
|
+
position: "absolute",
|
|
24
|
+
hasRadius: !0
|
|
25
|
+
},
|
|
26
|
+
o
|
|
27
|
+
);
|
|
24
28
|
a.propTypes = {
|
|
25
|
-
children:
|
|
29
|
+
children: t.node.isRequired
|
|
26
30
|
};
|
|
27
31
|
export {
|
|
28
32
|
a as SkipToContent
|
package/dist/MainNav/MainNav.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),l=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),l=require("prop-types"),s=require("styled-components"),c=require("./MainNavContext.cjs"),i=require("../Flex/Flex.cjs"),t=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},a=t(r),u=t(l),d=t(s),p=d.default(i.Flex)`
|
|
2
2
|
width: ${({condensed:e})=>e?"max-content":`${224/16}rem`};
|
|
3
3
|
border-right: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
4
|
-
`,o=({condensed:e,...n})=>a.default.createElement(
|
|
4
|
+
`,o=({condensed:e,...n})=>a.default.createElement(c.MainNavContext.Provider,{value:e},a.default.createElement(p,{alignItems:"normal",as:"nav",background:"neutral0",condensed:e,direction:"column",height:"100vh",position:"sticky",top:0,zIndex:2,...n}));o.defaultProps={condensed:!1};o.propTypes={condensed:u.default.bool};exports.MainNav=o;
|
package/dist/MainNav/MainNav.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import o from "react";
|
|
2
|
-
import n from "
|
|
3
|
-
import a from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const p =
|
|
2
|
+
import n from "prop-types";
|
|
3
|
+
import a from "styled-components";
|
|
4
|
+
import { MainNavContext as i } from "./MainNavContext.js";
|
|
5
|
+
import { Flex as m } from "../Flex/Flex.js";
|
|
6
|
+
const p = a(m)`
|
|
7
7
|
width: ${({ condensed: e }) => e ? "max-content" : `${224 / 16}rem`};
|
|
8
8
|
border-right: 1px solid ${({ theme: e }) => e.colors.neutral150};
|
|
9
|
-
`, r = ({ condensed: e, ...t }) => /* @__PURE__ */ o.createElement(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
9
|
+
`, r = ({ condensed: e, ...t }) => /* @__PURE__ */ o.createElement(i.Provider, { value: e }, /* @__PURE__ */ o.createElement(
|
|
10
|
+
p,
|
|
11
|
+
{
|
|
12
|
+
alignItems: "normal",
|
|
13
|
+
as: "nav",
|
|
14
|
+
background: "neutral0",
|
|
15
|
+
condensed: e,
|
|
16
|
+
direction: "column",
|
|
17
|
+
height: "100vh",
|
|
18
|
+
position: "sticky",
|
|
19
|
+
top: 0,
|
|
20
|
+
zIndex: 2,
|
|
21
|
+
...t
|
|
22
|
+
}
|
|
23
|
+
));
|
|
23
24
|
r.defaultProps = {
|
|
24
25
|
condensed: !1
|
|
25
26
|
};
|
|
26
27
|
r.propTypes = {
|
|
27
|
-
condensed:
|
|
28
|
+
condensed: n.bool
|
|
28
29
|
};
|
|
29
30
|
export {
|
|
30
31
|
r as MainNav
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react"),m=require("prop-types"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react"),m=require("prop-types"),d=require("react-router-dom"),y=require("styled-components"),x=require("./MainNavContext.cjs"),r=require("../Box/Box.cjs"),h=require("../Flex/Flex.cjs"),s=require("../Typography/Typography.cjs"),c=require("../VisuallyHidden/VisuallyHidden.cjs"),l=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=l(g),a=l(m),f=l(y),p=f.default.div`
|
|
2
2
|
svg,
|
|
3
3
|
img {
|
|
4
4
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
`,v=f.default(d.NavLink)`
|
|
10
10
|
text-decoration: unset;
|
|
11
11
|
color: inherit;
|
|
12
|
-
`,o=({workplace:e,title:i,icon:u,to:n})=>
|
|
12
|
+
`,o=({workplace:e,title:i,icon:u,to:n})=>x.useMainNav()?t.default.createElement(r.Box,{paddingLeft:3,paddingRight:3,paddingTop:4,paddingBottom:4},t.default.createElement(p,{condensed:!0},t.default.createElement(d.NavLink,{to:n},u,t.default.createElement(c.VisuallyHidden,null,t.default.createElement("span",null,i),t.default.createElement("span",null,e))))):t.default.createElement(r.Box,{paddingLeft:3,paddingRight:3,paddingTop:4,paddingBottom:4},t.default.createElement(h.Flex,null,t.default.createElement(p,{as:d.NavLink,to:n,"aria-hidden":!0,tabIndex:-1},u),t.default.createElement(r.Box,{paddingLeft:2},t.default.createElement(s.Typography,{fontWeight:"bold",textColor:"neutral800",as:"span"},t.default.createElement(v,{to:n},i,t.default.createElement(c.VisuallyHidden,{as:"span"},e))),t.default.createElement(s.Typography,{variant:"pi",as:"p",textColor:"neutral600","aria-hidden":!0},e))));o.defaultProps={to:"/"};o.propTypes={icon:a.default.node.isRequired,title:a.default.string.isRequired,to:a.default.string,workplace:a.default.string.isRequired};exports.NavBrand=o;
|
package/dist/MainNav/NavBrand.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import e from "react";
|
|
2
2
|
import r from "prop-types";
|
|
3
|
-
import s from "styled-components";
|
|
4
3
|
import { NavLink as i } from "react-router-dom";
|
|
4
|
+
import s from "styled-components";
|
|
5
|
+
import { useMainNav as u } from "./MainNavContext.js";
|
|
5
6
|
import { Box as a } from "../Box/Box.js";
|
|
7
|
+
import { Flex as g } from "../Flex/Flex.js";
|
|
6
8
|
import { Typography as m } from "../Typography/Typography.js";
|
|
7
|
-
import { Flex as u } from "../Flex/Flex.js";
|
|
8
|
-
import { useMainNav as g } from "./MainNavContext.js";
|
|
9
9
|
import { VisuallyHidden as p } from "../VisuallyHidden/VisuallyHidden.js";
|
|
10
10
|
const l = s.div`
|
|
11
11
|
svg,
|
|
@@ -18,41 +18,7 @@ const l = s.div`
|
|
|
18
18
|
`, f = s(i)`
|
|
19
19
|
text-decoration: unset;
|
|
20
20
|
color: inherit;
|
|
21
|
-
`, c = ({ workplace: t, title: o, icon: d, to: n }) =>
|
|
22
|
-
paddingLeft: 3,
|
|
23
|
-
paddingRight: 3,
|
|
24
|
-
paddingTop: 4,
|
|
25
|
-
paddingBottom: 4
|
|
26
|
-
}, /* @__PURE__ */ e.createElement(l, {
|
|
27
|
-
condensed: !0
|
|
28
|
-
}, /* @__PURE__ */ e.createElement(i, {
|
|
29
|
-
to: n
|
|
30
|
-
}, d, /* @__PURE__ */ e.createElement(p, null, /* @__PURE__ */ e.createElement("span", null, o), /* @__PURE__ */ e.createElement("span", null, t))))) : /* @__PURE__ */ e.createElement(a, {
|
|
31
|
-
paddingLeft: 3,
|
|
32
|
-
paddingRight: 3,
|
|
33
|
-
paddingTop: 4,
|
|
34
|
-
paddingBottom: 4
|
|
35
|
-
}, /* @__PURE__ */ e.createElement(u, null, /* @__PURE__ */ e.createElement(l, {
|
|
36
|
-
as: i,
|
|
37
|
-
to: n,
|
|
38
|
-
"aria-hidden": !0,
|
|
39
|
-
tabIndex: -1
|
|
40
|
-
}, d), /* @__PURE__ */ e.createElement(a, {
|
|
41
|
-
paddingLeft: 2
|
|
42
|
-
}, /* @__PURE__ */ e.createElement(m, {
|
|
43
|
-
fontWeight: "bold",
|
|
44
|
-
textColor: "neutral800",
|
|
45
|
-
as: "span"
|
|
46
|
-
}, /* @__PURE__ */ e.createElement(f, {
|
|
47
|
-
to: n
|
|
48
|
-
}, o, /* @__PURE__ */ e.createElement(p, {
|
|
49
|
-
as: "span"
|
|
50
|
-
}, t))), /* @__PURE__ */ e.createElement(m, {
|
|
51
|
-
variant: "pi",
|
|
52
|
-
as: "p",
|
|
53
|
-
textColor: "neutral600",
|
|
54
|
-
"aria-hidden": !0
|
|
55
|
-
}, t))));
|
|
21
|
+
`, c = ({ workplace: t, title: o, icon: d, to: n }) => u() ? /* @__PURE__ */ e.createElement(a, { paddingLeft: 3, paddingRight: 3, paddingTop: 4, paddingBottom: 4 }, /* @__PURE__ */ e.createElement(l, { condensed: !0 }, /* @__PURE__ */ e.createElement(i, { to: n }, d, /* @__PURE__ */ e.createElement(p, null, /* @__PURE__ */ e.createElement("span", null, o), /* @__PURE__ */ e.createElement("span", null, t))))) : /* @__PURE__ */ e.createElement(a, { paddingLeft: 3, paddingRight: 3, paddingTop: 4, paddingBottom: 4 }, /* @__PURE__ */ e.createElement(g, null, /* @__PURE__ */ e.createElement(l, { as: i, to: n, "aria-hidden": !0, tabIndex: -1 }, d), /* @__PURE__ */ e.createElement(a, { paddingLeft: 2 }, /* @__PURE__ */ e.createElement(m, { fontWeight: "bold", textColor: "neutral800", as: "span" }, /* @__PURE__ */ e.createElement(f, { to: n }, o, /* @__PURE__ */ e.createElement(p, { as: "span" }, t))), /* @__PURE__ */ e.createElement(m, { variant: "pi", as: "p", textColor: "neutral600", "aria-hidden": !0 }, t))));
|
|
56
22
|
c.defaultProps = {
|
|
57
23
|
to: "/"
|
|
58
24
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react"),d=require("prop-types"),l=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react"),s=require("@strapi/icons"),d=require("prop-types"),l=require("styled-components"),c=require("./MainNavContext.cjs"),u=require("../Icon/Icon.cjs"),p=require("../VisuallyHidden/VisuallyHidden.cjs"),o=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},n=o(i),f=o(d),h=o(l),y=h.default.button`
|
|
2
2
|
background: ${({theme:e})=>e.colors.neutral0};
|
|
3
3
|
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
4
4
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
width: ${6/16}rem;
|
|
18
18
|
height: ${9/16}rem;
|
|
19
19
|
}
|
|
20
|
-
`,a=({children:e,...t})=>{const r=
|
|
20
|
+
`,a=({children:e,...t})=>{const r=c.useMainNav();return n.default.createElement(y,{as:"button",condensed:r,...t},n.default.createElement(u.Icon,{as:r?s.ChevronRight:s.ChevronLeft,"aria-hidden":!0,color:"neutral600"}),n.default.createElement(p.VisuallyHidden,null,e))};a.propTypes={children:f.default.string.isRequired};exports.NavCondense=a;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import t from "react";
|
|
2
|
-
import n from "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
const p =
|
|
2
|
+
import { ChevronRight as n, ChevronLeft as i } from "@strapi/icons";
|
|
3
|
+
import s from "prop-types";
|
|
4
|
+
import a from "styled-components";
|
|
5
|
+
import { useMainNav as d } from "./MainNavContext.js";
|
|
6
|
+
import { Icon as m } from "../Icon/Icon.js";
|
|
7
|
+
import { VisuallyHidden as l } from "../VisuallyHidden/VisuallyHidden.js";
|
|
8
|
+
const p = a.button`
|
|
9
9
|
background: ${({ theme: e }) => e.colors.neutral0};
|
|
10
10
|
border: 1px solid ${({ theme: e }) => e.colors.neutral150};
|
|
11
11
|
border-radius: ${({ theme: e }) => e.borderRadius};
|
|
@@ -25,19 +25,11 @@ const p = i.button`
|
|
|
25
25
|
height: ${9 / 16}rem;
|
|
26
26
|
}
|
|
27
27
|
`, c = ({ children: e, ...r }) => {
|
|
28
|
-
const o =
|
|
29
|
-
return /* @__PURE__ */ t.createElement(p, {
|
|
30
|
-
as: "button",
|
|
31
|
-
condensed: o,
|
|
32
|
-
...r
|
|
33
|
-
}, /* @__PURE__ */ t.createElement(d, {
|
|
34
|
-
as: o ? s : a,
|
|
35
|
-
"aria-hidden": !0,
|
|
36
|
-
color: "neutral600"
|
|
37
|
-
}), /* @__PURE__ */ t.createElement(m, null, e));
|
|
28
|
+
const o = d();
|
|
29
|
+
return /* @__PURE__ */ t.createElement(p, { as: "button", condensed: o, ...r }, /* @__PURE__ */ t.createElement(m, { as: o ? n : i, "aria-hidden": !0, color: "neutral600" }), /* @__PURE__ */ t.createElement(l, null, e));
|
|
38
30
|
};
|
|
39
31
|
c.propTypes = {
|
|
40
|
-
children:
|
|
32
|
+
children: s.string.isRequired
|
|
41
33
|
};
|
|
42
34
|
export {
|
|
43
35
|
c as NavCondense
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import r from "react";
|
|
2
2
|
import t from "prop-types";
|
|
3
3
|
import { Box as p } from "../Box/Box.js";
|
|
4
|
-
const e = ({ children: o }) => /* @__PURE__ */ r.createElement(p, {
|
|
5
|
-
position: "relative"
|
|
6
|
-
}, o);
|
|
4
|
+
const e = ({ children: o }) => /* @__PURE__ */ r.createElement(p, { position: "relative" }, o);
|
|
7
5
|
e.displayName = "NavFooter";
|
|
8
6
|
e.propTypes = {
|
|
9
7
|
children: t.node.isRequired
|
package/dist/MainNav/NavLink.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("react"),$=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("react"),$=require("prop-types"),h=require("react-router-dom"),v=require("styled-components"),b=require("./MainNavContext.cjs"),T=require("../Badge/Badge.cjs"),x=require("../Box/Box.cjs"),y=require("../Flex/Flex.cjs"),q=require("../Tooltip/Tooltip.cjs"),o=require("../Typography/Typography.cjs"),i=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=i(m),a=i($),l=i(v),u=l.default(x.Box)`
|
|
2
2
|
svg {
|
|
3
3
|
width: 1rem;
|
|
4
4
|
height: 1rem;
|
|
5
5
|
}
|
|
6
|
-
`,p=l.default(
|
|
6
|
+
`,p=l.default(h.NavLink)`
|
|
7
7
|
position: relative;
|
|
8
8
|
text-decoration: none;
|
|
9
9
|
display: block;
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
`,f=l.default(y.Flex)`
|
|
46
46
|
padding: ${({theme:e})=>`${e.spaces[2]} ${e.spaces[3]}`};
|
|
47
|
-
`,g=l.default(
|
|
47
|
+
`,g=l.default(T.Badge)`
|
|
48
48
|
${({theme:e,condensed:r})=>r&&`
|
|
49
49
|
position: absolute;
|
|
50
50
|
// Values based on visual aspect
|
|
@@ -66,4 +66,4 @@
|
|
|
66
66
|
padding: ${({theme:e})=>`0 ${e.spaces[2]}`};
|
|
67
67
|
border-radius: ${({theme:e})=>e.spaces[10]};
|
|
68
68
|
background: ${({theme:e})=>e.colors.primary600};
|
|
69
|
-
`,s=({children:e,icon:r,badgeContent:n,badgeAriaLabel:c,...d})=>
|
|
69
|
+
`,s=({children:e,icon:r,badgeContent:n,badgeAriaLabel:c,...d})=>b.useMainNav()?t.default.createElement(q.Tooltip,{position:"right",label:e},t.default.createElement(p,{...d},t.default.createElement(f,{as:"span"},t.default.createElement(u,{"aria-hidden":!0,paddingRight:0,as:"span"},r),n&&t.default.createElement(g,{condensed:!0,"aria-label":c},n)))):t.default.createElement(p,{...d},t.default.createElement(f,{as:"span",justifyContent:"space-between"},t.default.createElement(y.Flex,null,t.default.createElement(u,{"aria-hidden":!0,paddingRight:3,as:"span"},r),t.default.createElement(o.Typography,null,e)),n&&t.default.createElement(g,{justifyContent:"center","aria-label":c},n)));s.displayName="NavLink";s.defaultProps={badgeContent:void 0,badgeAriaLabel:void 0};s.propTypes={badgeAriaLabel:a.default.string,badgeContent:a.default.oneOfType([a.default.string,a.default.number]),children:a.default.node.isRequired,icon:a.default.node.isRequired};exports.NavLink=s;
|
package/dist/MainNav/NavLink.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import i from "styled-components";
|
|
3
2
|
import o from "prop-types";
|
|
4
3
|
import { NavLink as g } from "react-router-dom";
|
|
5
|
-
import
|
|
4
|
+
import i from "styled-components";
|
|
5
|
+
import { useMainNav as f } from "./MainNavContext.js";
|
|
6
|
+
import { Badge as h } from "../Badge/Badge.js";
|
|
7
|
+
import { Box as v } from "../Box/Box.js";
|
|
6
8
|
import { Flex as $ } from "../Flex/Flex.js";
|
|
9
|
+
import { Tooltip as b } from "../Tooltip/Tooltip.js";
|
|
7
10
|
import { Typography as a } from "../Typography/Typography.js";
|
|
8
|
-
|
|
9
|
-
import { Tooltip as v } from "../Tooltip/Tooltip.js";
|
|
10
|
-
import { Badge as b } from "../Badge/Badge.js";
|
|
11
|
-
const p = i(f)`
|
|
11
|
+
const p = i(v)`
|
|
12
12
|
svg {
|
|
13
13
|
width: 1rem;
|
|
14
14
|
height: 1rem;
|
|
@@ -54,7 +54,7 @@ const p = i(f)`
|
|
|
54
54
|
}
|
|
55
55
|
`, m = i($)`
|
|
56
56
|
padding: ${({ theme: e }) => `${e.spaces[2]} ${e.spaces[3]}`};
|
|
57
|
-
`, u = i(
|
|
57
|
+
`, u = i(h)`
|
|
58
58
|
${({ theme: e, condensed: t }) => t && `
|
|
59
59
|
position: absolute;
|
|
60
60
|
// Values based on visual aspect
|
|
@@ -76,33 +76,7 @@ const p = i(f)`
|
|
|
76
76
|
padding: ${({ theme: e }) => `0 ${e.spaces[2]}`};
|
|
77
77
|
border-radius: ${({ theme: e }) => e.spaces[10]};
|
|
78
78
|
background: ${({ theme: e }) => e.colors.primary600};
|
|
79
|
-
`, s = ({ children: e, icon: t, badgeContent: n, badgeAriaLabel: l, ...c }) =>
|
|
80
|
-
position: "right",
|
|
81
|
-
label: e
|
|
82
|
-
}, /* @__PURE__ */ r.createElement(d, {
|
|
83
|
-
...c
|
|
84
|
-
}, /* @__PURE__ */ r.createElement(m, {
|
|
85
|
-
as: "span"
|
|
86
|
-
}, /* @__PURE__ */ r.createElement(p, {
|
|
87
|
-
"aria-hidden": !0,
|
|
88
|
-
paddingRight: 0,
|
|
89
|
-
as: "span"
|
|
90
|
-
}, t), n && /* @__PURE__ */ r.createElement(u, {
|
|
91
|
-
condensed: !0,
|
|
92
|
-
"aria-label": l
|
|
93
|
-
}, n)))) : /* @__PURE__ */ r.createElement(d, {
|
|
94
|
-
...c
|
|
95
|
-
}, /* @__PURE__ */ r.createElement(m, {
|
|
96
|
-
as: "span",
|
|
97
|
-
justifyContent: "space-between"
|
|
98
|
-
}, /* @__PURE__ */ r.createElement($, null, /* @__PURE__ */ r.createElement(p, {
|
|
99
|
-
"aria-hidden": !0,
|
|
100
|
-
paddingRight: 3,
|
|
101
|
-
as: "span"
|
|
102
|
-
}, t), /* @__PURE__ */ r.createElement(a, null, e)), n && /* @__PURE__ */ r.createElement(u, {
|
|
103
|
-
justifyContent: "center",
|
|
104
|
-
"aria-label": l
|
|
105
|
-
}, n)));
|
|
79
|
+
`, s = ({ children: e, icon: t, badgeContent: n, badgeAriaLabel: l, ...c }) => f() ? /* @__PURE__ */ r.createElement(b, { position: "right", label: e }, /* @__PURE__ */ r.createElement(d, { ...c }, /* @__PURE__ */ r.createElement(m, { as: "span" }, /* @__PURE__ */ r.createElement(p, { "aria-hidden": !0, paddingRight: 0, as: "span" }, t), n && /* @__PURE__ */ r.createElement(u, { condensed: !0, "aria-label": l }, n)))) : /* @__PURE__ */ r.createElement(d, { ...c }, /* @__PURE__ */ r.createElement(m, { as: "span", justifyContent: "space-between" }, /* @__PURE__ */ r.createElement($, null, /* @__PURE__ */ r.createElement(p, { "aria-hidden": !0, paddingRight: 3, as: "span" }, t), /* @__PURE__ */ r.createElement(a, null, e)), n && /* @__PURE__ */ r.createElement(u, { justifyContent: "center", "aria-label": l }, n)));
|
|
106
80
|
s.displayName = "NavLink";
|
|
107
81
|
s.defaultProps = {
|
|
108
82
|
badgeContent: void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react"),p=require("prop-types"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react"),p=require("prop-types"),f=require("./MainNavContext.cjs"),u=require("../Box/Box.cjs"),g=require("../Divider/Divider.cjs"),a=require("../Stack/Stack.cjs"),y=require("../Typography/Typography.cjs"),m=require("../VisuallyHidden/VisuallyHidden.cjs"),s=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},e=s(i),c=s(p),o=({label:t,children:l,...d})=>f.useMainNav()?e.default.createElement(a.Stack,{spacing:2},e.default.createElement(u.Box,{paddingTop:1,paddingBottom:1,background:"neutral0",hasRadius:!0,as:"span"},e.default.createElement(g.Divider,null),e.default.createElement(m.VisuallyHidden,null,e.default.createElement("span",null,t))),e.default.createElement(a.Stack,{as:"ul",spacing:2,...d},i.Children.map(l,(n,r)=>e.default.createElement("li",{key:r},n)))):e.default.createElement(a.Stack,{spacing:2},e.default.createElement(u.Box,{paddingTop:1,paddingBottom:1,background:"neutral0",paddingRight:3,paddingLeft:3,hasRadius:!0,as:"span"},e.default.createElement(y.Typography,{variant:"sigma",textColor:"neutral600"},t)),e.default.createElement(a.Stack,{as:"ul",spacing:2,...d},i.Children.map(l,(n,r)=>e.default.createElement("li",{key:r},n))));o.propTypes={children:c.default.node.isRequired,label:c.default.string.isRequired};exports.NavSection=o;
|
|
@@ -1,45 +1,12 @@
|
|
|
1
1
|
import e, { Children as m } from "react";
|
|
2
2
|
import p from "prop-types";
|
|
3
|
+
import { useMainNav as d } from "./MainNavContext.js";
|
|
3
4
|
import { Box as l } from "../Box/Box.js";
|
|
4
|
-
import {
|
|
5
|
+
import { Divider as s } from "../Divider/Divider.js";
|
|
5
6
|
import { Stack as t } from "../Stack/Stack.js";
|
|
6
|
-
import {
|
|
7
|
-
import { VisuallyHidden as
|
|
8
|
-
|
|
9
|
-
const g = ({ label: n, children: i, ...o }) => s() ? /* @__PURE__ */ e.createElement(t, {
|
|
10
|
-
spacing: 2
|
|
11
|
-
}, /* @__PURE__ */ e.createElement(l, {
|
|
12
|
-
paddingTop: 1,
|
|
13
|
-
paddingBottom: 1,
|
|
14
|
-
background: "neutral0",
|
|
15
|
-
hasRadius: !0,
|
|
16
|
-
as: "span"
|
|
17
|
-
}, /* @__PURE__ */ e.createElement(u, null), /* @__PURE__ */ e.createElement(c, null, /* @__PURE__ */ e.createElement("span", null, n))), /* @__PURE__ */ e.createElement(t, {
|
|
18
|
-
as: "ul",
|
|
19
|
-
spacing: 2,
|
|
20
|
-
...o
|
|
21
|
-
}, m.map(i, (r, a) => /* @__PURE__ */ e.createElement("li", {
|
|
22
|
-
key: a
|
|
23
|
-
}, r)))) : /* @__PURE__ */ e.createElement(t, {
|
|
24
|
-
spacing: 2
|
|
25
|
-
}, /* @__PURE__ */ e.createElement(l, {
|
|
26
|
-
paddingTop: 1,
|
|
27
|
-
paddingBottom: 1,
|
|
28
|
-
background: "neutral0",
|
|
29
|
-
paddingRight: 3,
|
|
30
|
-
paddingLeft: 3,
|
|
31
|
-
hasRadius: !0,
|
|
32
|
-
as: "span"
|
|
33
|
-
}, /* @__PURE__ */ e.createElement(d, {
|
|
34
|
-
variant: "sigma",
|
|
35
|
-
textColor: "neutral600"
|
|
36
|
-
}, n)), /* @__PURE__ */ e.createElement(t, {
|
|
37
|
-
as: "ul",
|
|
38
|
-
spacing: 2,
|
|
39
|
-
...o
|
|
40
|
-
}, m.map(i, (r, a) => /* @__PURE__ */ e.createElement("li", {
|
|
41
|
-
key: a
|
|
42
|
-
}, r))));
|
|
7
|
+
import { Typography as c } from "../Typography/Typography.js";
|
|
8
|
+
import { VisuallyHidden as u } from "../VisuallyHidden/VisuallyHidden.js";
|
|
9
|
+
const g = ({ label: n, children: i, ...o }) => d() ? /* @__PURE__ */ e.createElement(t, { spacing: 2 }, /* @__PURE__ */ e.createElement(l, { paddingTop: 1, paddingBottom: 1, background: "neutral0", hasRadius: !0, as: "span" }, /* @__PURE__ */ e.createElement(s, null), /* @__PURE__ */ e.createElement(u, null, /* @__PURE__ */ e.createElement("span", null, n))), /* @__PURE__ */ e.createElement(t, { as: "ul", spacing: 2, ...o }, m.map(i, (r, a) => /* @__PURE__ */ e.createElement("li", { key: a }, r)))) : /* @__PURE__ */ e.createElement(t, { spacing: 2 }, /* @__PURE__ */ e.createElement(l, { paddingTop: 1, paddingBottom: 1, background: "neutral0", paddingRight: 3, paddingLeft: 3, hasRadius: !0, as: "span" }, /* @__PURE__ */ e.createElement(c, { variant: "sigma", textColor: "neutral600" }, n)), /* @__PURE__ */ e.createElement(t, { as: "ul", spacing: 2, ...o }, m.map(i, (r, a) => /* @__PURE__ */ e.createElement("li", { key: a }, r))));
|
|
43
10
|
g.propTypes = {
|
|
44
11
|
children: p.node.isRequired,
|
|
45
12
|
label: p.string.isRequired
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),d=require("prop-types"),l=require("styled-components"),u=require("../
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),d=require("prop-types"),l=require("styled-components"),u=require("../Box/Box.cjs"),i=require("../Stack/Stack.cjs"),o=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=o(a),p=o(d),f=o(l),y=f.default(u.Box)`
|
|
2
2
|
flex-grow: 1;
|
|
3
3
|
overflow-y: auto;
|
|
4
|
-
`,r=({children:e,...c})=>t.default.createElement(y,{paddingLeft:3,paddingRight:2,paddingTop:3,paddingBottom:8},t.default.createElement(
|
|
4
|
+
`,r=({children:e,...c})=>t.default.createElement(y,{paddingLeft:3,paddingRight:2,paddingTop:3,paddingBottom:8},t.default.createElement(i.Stack,{as:"ul",spacing:4,...c},a.Children.map(e,(n,s)=>t.default.createElement("li",{key:s},n))));r.propTypes={children:p.default.node.isRequired};exports.NavSections=r;
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import e, { Children as i } from "react";
|
|
2
2
|
import n from "prop-types";
|
|
3
3
|
import a from "styled-components";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const l = a(
|
|
4
|
+
import { Box as m } from "../Box/Box.js";
|
|
5
|
+
import { Stack as d } from "../Stack/Stack.js";
|
|
6
|
+
const l = a(m)`
|
|
7
7
|
flex-grow: 1;
|
|
8
8
|
overflow-y: auto;
|
|
9
|
-
`, c = ({ children: o, ...r }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
|
-
paddingLeft: 3,
|
|
11
|
-
paddingRight: 2,
|
|
12
|
-
paddingTop: 3,
|
|
13
|
-
paddingBottom: 8
|
|
14
|
-
}, /* @__PURE__ */ e.createElement(m, {
|
|
15
|
-
as: "ul",
|
|
16
|
-
spacing: 4,
|
|
17
|
-
...r
|
|
18
|
-
}, i.map(o, (t, p) => /* @__PURE__ */ e.createElement("li", {
|
|
19
|
-
key: p
|
|
20
|
-
}, t))));
|
|
9
|
+
`, c = ({ children: o, ...r }) => /* @__PURE__ */ e.createElement(l, { paddingLeft: 3, paddingRight: 2, paddingTop: 3, paddingBottom: 8 }, /* @__PURE__ */ e.createElement(d, { as: "ul", spacing: 4, ...r }, i.map(o, (t, p) => /* @__PURE__ */ e.createElement("li", { key: p }, t))));
|
|
21
10
|
c.propTypes = {
|
|
22
11
|
children: n.node.isRequired
|
|
23
12
|
};
|
package/dist/MainNav/NavUser.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("react"),f=require("prop-types"),y=require("styled-components"),s=require("../Avatar/Avatar.cjs");require("../Avatar/AvatarGroup.cjs");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("react"),f=require("prop-types"),y=require("styled-components"),v=require("./MainNavContext.cjs"),s=require("../Avatar/Avatar.cjs");require("../Avatar/AvatarGroup.cjs");const d=require("../Box/Box.cjs"),g=require("../Flex/Flex.cjs"),x=require("../Typography/Typography.cjs"),m=require("../VisuallyHidden/VisuallyHidden.cjs"),l=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=l(p),r=l(f),q=l(y),j=q.default(d.Box)`
|
|
2
2
|
border-top: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
3
|
-
`,a=t.default.forwardRef(({src:e,children:n,initials:i,...u},c)=>{const o=
|
|
3
|
+
`,a=t.default.forwardRef(({src:e,children:n,initials:i,...u},c)=>{const o=v.useMainNav();return t.default.createElement(j,{paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5,...u},t.default.createElement(g.Flex,{as:"button",justifyContent:o?"center":void 0,ref:c},e?t.default.createElement(s.Avatar,{src:e,alt:"","aria-hidden":!0}):t.default.createElement(s.Initials,null,i),o?t.default.createElement(m.VisuallyHidden,null,t.default.createElement("span",null,n)):t.default.createElement(d.Box,{width:`${130/16}rem`,paddingLeft:2,as:"span"},t.default.createElement(x.Typography,{ellipsis:!0,textColor:"neutral600"},n))))});a.displayName="NavUser";a.defaultProps={src:void 0,initials:void 0};a.propTypes={children:r.default.node.isRequired,initials:r.default.node,src:r.default.string};exports.NavUser=a;
|
package/dist/MainNav/NavUser.js
CHANGED
|
@@ -1,39 +1,18 @@
|
|
|
1
1
|
import e from "react";
|
|
2
2
|
import r from "prop-types";
|
|
3
3
|
import m from "styled-components";
|
|
4
|
-
import {
|
|
4
|
+
import { useMainNav as s } from "./MainNavContext.js";
|
|
5
|
+
import { Avatar as c, Initials as f } from "../Avatar/Avatar.js";
|
|
5
6
|
import "../Avatar/AvatarGroup.js";
|
|
6
|
-
import { Typography as f } from "../Typography/Typography.js";
|
|
7
|
-
import { Flex as u } from "../Flex/Flex.js";
|
|
8
7
|
import { Box as n } from "../Box/Box.js";
|
|
9
|
-
import {
|
|
8
|
+
import { Flex as u } from "../Flex/Flex.js";
|
|
9
|
+
import { Typography as g } from "../Typography/Typography.js";
|
|
10
10
|
import { VisuallyHidden as v } from "../VisuallyHidden/VisuallyHidden.js";
|
|
11
11
|
const y = m(n)`
|
|
12
12
|
border-top: 1px solid ${({ theme: t }) => t.colors.neutral150};
|
|
13
13
|
`, o = e.forwardRef(({ src: t, children: i, initials: l, ...p }, d) => {
|
|
14
|
-
const a =
|
|
15
|
-
return /* @__PURE__ */ e.createElement(y, {
|
|
16
|
-
paddingTop: 3,
|
|
17
|
-
paddingBottom: 3,
|
|
18
|
-
paddingLeft: 5,
|
|
19
|
-
paddingRight: 5,
|
|
20
|
-
...p
|
|
21
|
-
}, /* @__PURE__ */ e.createElement(u, {
|
|
22
|
-
as: "button",
|
|
23
|
-
justifyContent: a ? "center" : void 0,
|
|
24
|
-
ref: d
|
|
25
|
-
}, t ? /* @__PURE__ */ e.createElement(s, {
|
|
26
|
-
src: t,
|
|
27
|
-
alt: "",
|
|
28
|
-
"aria-hidden": !0
|
|
29
|
-
}) : /* @__PURE__ */ e.createElement(c, null, l), a ? /* @__PURE__ */ e.createElement(v, null, /* @__PURE__ */ e.createElement("span", null, i)) : /* @__PURE__ */ e.createElement(n, {
|
|
30
|
-
width: `${130 / 16}rem`,
|
|
31
|
-
paddingLeft: 2,
|
|
32
|
-
as: "span"
|
|
33
|
-
}, /* @__PURE__ */ e.createElement(f, {
|
|
34
|
-
ellipsis: !0,
|
|
35
|
-
textColor: "neutral600"
|
|
36
|
-
}, i))));
|
|
14
|
+
const a = s();
|
|
15
|
+
return /* @__PURE__ */ e.createElement(y, { paddingTop: 3, paddingBottom: 3, paddingLeft: 5, paddingRight: 5, ...p }, /* @__PURE__ */ e.createElement(u, { as: "button", justifyContent: a ? "center" : void 0, ref: d }, t ? /* @__PURE__ */ e.createElement(c, { src: t, alt: "", "aria-hidden": !0 }) : /* @__PURE__ */ e.createElement(f, null, l), a ? /* @__PURE__ */ e.createElement(v, null, /* @__PURE__ */ e.createElement("span", null, i)) : /* @__PURE__ */ e.createElement(n, { width: `${130 / 16}rem`, paddingLeft: 2, as: "span" }, /* @__PURE__ */ e.createElement(g, { ellipsis: !0, textColor: "neutral600" }, i))));
|
|
37
16
|
});
|
|
38
17
|
o.displayName = "NavUser";
|
|
39
18
|
o.defaultProps = {
|
|
@@ -4,10 +4,7 @@ import { Box as e } from "../Box/Box.js";
|
|
|
4
4
|
const a = r(e)`
|
|
5
5
|
overflow: auto;
|
|
6
6
|
max-height: 60vh;
|
|
7
|
-
`, l = (o) => /* @__PURE__ */ t.createElement(a, {
|
|
8
|
-
padding: 7,
|
|
9
|
-
...o
|
|
10
|
-
});
|
|
7
|
+
`, l = (o) => /* @__PURE__ */ t.createElement(a, { padding: 7, ...o });
|
|
11
8
|
export {
|
|
12
9
|
l as ModalBody
|
|
13
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react"),c=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react"),c=require("prop-types"),i=require("styled-components"),p=require("../Box/Box.cjs"),n=require("../Flex/Flex.cjs"),o=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=o(u),a=o(c),l=o(i),f=l.default(p.Box)`
|
|
2
2
|
border-radius: 0 0 ${({theme:e})=>e.borderRadius} ${({theme:e})=>e.borderRadius};
|
|
3
3
|
border-top: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
4
4
|
`,d=l.default(n.Flex)`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import o from "react";
|
|
2
|
-
import n from "styled-components";
|
|
3
2
|
import t from "prop-types";
|
|
3
|
+
import n from "styled-components";
|
|
4
4
|
import { Box as i } from "../Box/Box.js";
|
|
5
5
|
import { Flex as d } from "../Flex/Flex.js";
|
|
6
6
|
const s = n(i)`
|
|
@@ -10,15 +10,7 @@ const s = n(i)`
|
|
|
10
10
|
& > * + * {
|
|
11
11
|
margin-left: ${({ theme: e }) => e.spaces[2]};
|
|
12
12
|
}
|
|
13
|
-
`, a = ({ startActions: e, endActions: p }) => /* @__PURE__ */ o.createElement(s, {
|
|
14
|
-
paddingTop: 4,
|
|
15
|
-
paddingBottom: 4,
|
|
16
|
-
paddingLeft: 5,
|
|
17
|
-
paddingRight: 5,
|
|
18
|
-
background: "neutral100"
|
|
19
|
-
}, /* @__PURE__ */ o.createElement(d, {
|
|
20
|
-
justifyContent: "space-between"
|
|
21
|
-
}, /* @__PURE__ */ o.createElement(r, null, e), /* @__PURE__ */ o.createElement(r, null, p)));
|
|
13
|
+
`, a = ({ startActions: e, endActions: p }) => /* @__PURE__ */ o.createElement(s, { paddingTop: 4, paddingBottom: 4, paddingLeft: 5, paddingRight: 5, background: "neutral100" }, /* @__PURE__ */ o.createElement(d, { justifyContent: "space-between" }, /* @__PURE__ */ o.createElement(r, null, e), /* @__PURE__ */ o.createElement(r, null, p)));
|
|
22
14
|
a.defaultProps = {
|
|
23
15
|
endActions: void 0,
|
|
24
16
|
startActions: void 0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react"),d=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react"),d=require("@strapi/icons"),c=require("prop-types"),u=require("styled-components"),i=require("./ModalContext.cjs"),p=require("../Box/Box.cjs"),f=require("../Flex/Flex.cjs"),b=require("../IconButton/IconButton.cjs"),o=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=o(s),n=o(c),x=o(u),y=x.default(p.Box)`
|
|
2
2
|
border-radius: ${({theme:e})=>e.borderRadius} ${({theme:e})=>e.borderRadius} 0 0;
|
|
3
3
|
border-bottom: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
4
|
-
`,r=({children:e,closeLabel:a})=>{const l=
|
|
4
|
+
`,r=({children:e,closeLabel:a})=>{const l=i.useModal();return t.default.createElement(y,{paddingTop:4,paddingBottom:4,paddingLeft:5,paddingRight:5,background:"neutral100"},t.default.createElement(f.Flex,{justifyContent:"space-between"},e,t.default.createElement(b.IconButton,{onClick:l,"aria-label":a,icon:t.default.createElement(d.Cross,null)})))};r.defaultProps={closeLabel:"Close the modal"};r.propTypes={children:n.default.node.isRequired,closeLabel:n.default.string};exports.ModalHeader=r;
|