@strapi/design-system 1.7.7 → 1.7.9
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/Box/Box.cjs +2 -2
- package/dist/Box/Box.js +1 -1
- package/dist/Grid/Grid.cjs +3 -3
- package/dist/Grid/Grid.js +8 -22
- package/dist/Grid/GridItem.cjs +2 -2
- package/dist/Grid/GridItem.js +10 -27
- package/dist/Layout/ActionLayout.cjs +1 -9
- package/dist/Layout/ActionLayout.js +4 -27
- package/dist/Layout/ContentLayout.cjs +1 -1
- package/dist/Layout/ContentLayout.js +4 -9
- package/dist/Layout/GridLayout.cjs +3 -3
- package/dist/Layout/GridLayout.js +4 -8
- package/dist/Layout/HeaderLayout.cjs +4 -4
- package/dist/Layout/HeaderLayout.js +25 -120
- package/dist/Layout/Layout.cjs +4 -4
- package/dist/Layout/Layout.js +7 -19
- package/dist/Layout/TwoColsLayout.cjs +1 -1
- package/dist/Layout/TwoColsLayout.js +6 -15
- package/dist/Table/Cell.cjs +3 -3
- package/dist/Table/Cell.js +10 -23
- package/dist/Table/TFooter.cjs +3 -3
- package/dist/Table/TFooter.js +8 -20
- package/dist/Table/Table.cjs +12 -12
- package/dist/Table/Table.js +19 -31
- package/dist/Table/Tbody.cjs +2 -2
- package/dist/Table/Tbody.js +4 -5
- package/dist/Table/Thead.cjs +2 -2
- package/dist/Table/Thead.js +6 -7
- package/dist/Table/Tr.cjs +1 -1
- package/dist/Table/Tr.js +3 -4
- package/dist/v2/MainNav/MainNav.cjs +2 -2
- package/dist/v2/MainNav/MainNav.js +9 -31
- package/dist/v2/MainNav/MainNavContext.cjs +1 -1
- package/dist/v2/MainNav/MainNavContext.js +1 -1
- package/dist/v2/MainNav/NavBrand.cjs +3 -3
- package/dist/v2/MainNav/NavBrand.js +13 -36
- package/dist/v2/MainNav/NavCondense.cjs +2 -5
- package/dist/v2/MainNav/NavCondense.js +15 -22
- package/dist/v2/MainNav/NavFooter.cjs +1 -1
- package/dist/v2/MainNav/NavFooter.js +4 -10
- package/dist/v2/MainNav/NavLink.cjs +10 -10
- package/dist/v2/MainNav/NavLink.js +18 -39
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.js +8 -42
- package/dist/v2/MainNav/NavSections.cjs +2 -2
- package/dist/v2/MainNav/NavSections.js +8 -22
- package/dist/v2/MainNav/NavUser.cjs +2 -2
- package/dist/v2/MainNav/NavUser.js +13 -27
- package/dist/v2/Pagination/Pagination.cjs +1 -5
- package/dist/v2/Pagination/Pagination.js +7 -21
- package/dist/v2/Pagination/components.cjs +7 -10
- package/dist/v2/Pagination/components.js +32 -65
- package/dist/v2/SubNav/SubNav.cjs +5 -5
- package/dist/v2/SubNav/SubNav.js +8 -13
- package/dist/v2/SubNav/SubNavHeader.cjs +3 -3
- package/dist/v2/SubNav/SubNavHeader.js +30 -77
- package/dist/v2/SubNav/SubNavLink.cjs +5 -5
- package/dist/v2/SubNav/SubNavLink.js +13 -47
- package/dist/v2/SubNav/SubNavLinkSection.cjs +4 -4
- package/dist/v2/SubNav/SubNavLinkSection.js +19 -34
- package/dist/v2/SubNav/SubNavSection.cjs +2 -2
- package/dist/v2/SubNav/SubNavSection.js +16 -55
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +3 -3
- package/dist/v2/SubNav/SubNavSectionLabel.js +10 -38
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.js +4 -18
- package/package.json +4 -4
- package/dist/Grid/GridContext.cjs +0 -1
- package/dist/Grid/GridContext.js +0 -6
package/dist/Table/TFooter.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { jsxs as e, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import t from "prop-types";
|
|
4
|
-
import d from "styled-components";
|
|
2
|
+
import t from "styled-components";
|
|
5
3
|
import { Box as o } from "../Box/Box.js";
|
|
6
|
-
import { Divider as
|
|
7
|
-
import { Flex as
|
|
8
|
-
import { Typography as
|
|
9
|
-
const
|
|
4
|
+
import { Divider as a } from "../Divider/Divider.js";
|
|
5
|
+
import { Flex as m } from "../Flex/Flex.js";
|
|
6
|
+
import { Typography as p } from "../Typography/Typography.js";
|
|
7
|
+
const s = t(o)`
|
|
10
8
|
height: ${24 / 16}rem;
|
|
11
9
|
width: ${24 / 16}rem;
|
|
12
10
|
border-radius: 50%;
|
|
@@ -22,22 +20,12 @@ const c = d(o)`
|
|
|
22
20
|
svg path {
|
|
23
21
|
fill: ${({ theme: r }) => r.colors.primary600};
|
|
24
22
|
}
|
|
25
|
-
`, l =
|
|
23
|
+
`, l = t(o)`
|
|
26
24
|
border-radius: 0 0 ${({ theme: r }) => r.borderRadius} ${({ theme: r }) => r.borderRadius};
|
|
27
25
|
display: block;
|
|
28
26
|
width: 100%;
|
|
29
27
|
border: none;
|
|
30
|
-
`,
|
|
31
|
-
/* @__PURE__ */ i(m, {}),
|
|
32
|
-
/* @__PURE__ */ i(l, { as: "button", background: "primary100", padding: 5, ...p, children: /* @__PURE__ */ e(s, { children: [
|
|
33
|
-
/* @__PURE__ */ i(c, { "aria-hidden": !0, background: "primary200", children: n }),
|
|
34
|
-
/* @__PURE__ */ i(o, { paddingLeft: 3, children: /* @__PURE__ */ i(a, { variant: "pi", fontWeight: "bold", textColor: "primary600", children: r }) })
|
|
35
|
-
] }) })
|
|
36
|
-
] });
|
|
37
|
-
h.propTypes = {
|
|
38
|
-
children: t.string.isRequired,
|
|
39
|
-
icon: t.node.isRequired
|
|
40
|
-
};
|
|
28
|
+
`, y = ({ children: r, icon: d, ...n }) => e("div", { children: [i(a, {}), i(l, { as: "button", background: "primary100", padding: 5, ...n, children: e(m, { children: [i(s, { "aria-hidden": !0, background: "primary200", children: d }), i(o, { paddingLeft: 3, children: i(p, { variant: "pi", fontWeight: "bold", textColor: "primary600", children: r }) })] }) })] });
|
|
41
29
|
export {
|
|
42
|
-
|
|
30
|
+
y as TFooter
|
|
43
31
|
};
|
package/dist/Table/Table.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("react"),f=require("styled-components"),h=require("../RawTable/RawTable.cjs"),s=require("../Box/Box.cjs"),b=t=>t&&t.__esModule?t:{default:t},a=b(f),g=a.default(s.Box)`
|
|
2
2
|
overflow: hidden;
|
|
3
|
-
border: 1px solid ${({theme:
|
|
4
|
-
`,
|
|
3
|
+
border: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
4
|
+
`,w=a.default(h.RawTable)`
|
|
5
5
|
width: 100%;
|
|
6
6
|
white-space: nowrap;
|
|
7
|
-
`,
|
|
7
|
+
`,p=a.default(s.Box)`
|
|
8
8
|
&:before {
|
|
9
9
|
// TODO: make sure to add a token for this weird stuff
|
|
10
10
|
background: linear-gradient(90deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);
|
|
11
11
|
opacity: 0.2;
|
|
12
12
|
position: absolute;
|
|
13
13
|
height: 100%;
|
|
14
|
-
content: ${({overflowing:
|
|
15
|
-
box-shadow: ${({theme:
|
|
16
|
-
width: ${({theme:
|
|
14
|
+
content: ${({overflowing:t})=>t==="both"||t==="left"?"''":void 0};
|
|
15
|
+
box-shadow: ${({theme:t})=>t.shadows.tableShadow};
|
|
16
|
+
width: ${({theme:t})=>t.spaces[2]};
|
|
17
17
|
left: 0;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
opacity: 0.2;
|
|
24
24
|
position: absolute;
|
|
25
25
|
height: 100%;
|
|
26
|
-
content: ${({overflowing:
|
|
27
|
-
box-shadow: ${({theme:
|
|
28
|
-
width: ${({theme:
|
|
26
|
+
content: ${({overflowing:t})=>t==="both"||t==="right"?"''":void 0};
|
|
27
|
+
box-shadow: ${({theme:t})=>t.shadows.tableShadow};
|
|
28
|
+
width: ${({theme:t})=>t.spaces[2]};
|
|
29
29
|
right: 0;
|
|
30
30
|
top: 0;
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,x=a.default(s.Box)`
|
|
33
33
|
overflow-x: auto;
|
|
34
|
-
`,
|
|
34
|
+
`,S=({footer:t,...i})=>{const l=n.useRef(null),[d,o]=n.useState(),c=e=>{const u=e.target.scrollWidth-e.target.clientWidth;if(e.target.scrollLeft===0){o("right");return}if(e.target.scrollLeft===u){o("left");return}e.target.scrollLeft>0&&o("both")};return n.useEffect(()=>{l.current.scrollWidth>l.current.clientWidth&&o("right")},[]),r.jsxs(g,{shadow:"tableShadow",hasRadius:!0,background:"neutral0",children:[r.jsx(p,{overflowing:d,position:"relative",children:r.jsx(x,{ref:l,onScroll:c,paddingLeft:6,paddingRight:6,children:r.jsx(w,{...i})})}),t]})};exports.Table=S;
|
package/dist/Table/Table.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import s from "prop-types";
|
|
1
|
+
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as h, useState as u, useEffect as g } from "react";
|
|
4
3
|
import r from "styled-components";
|
|
5
|
-
import { RawTable as
|
|
4
|
+
import { RawTable as b } from "../RawTable/RawTable.js";
|
|
6
5
|
import { Box as n } from "../Box/Box.js";
|
|
7
|
-
const
|
|
6
|
+
const p = r(n)`
|
|
8
7
|
overflow: hidden;
|
|
9
8
|
border: 1px solid ${({ theme: t }) => t.colors.neutral150};
|
|
10
|
-
`,
|
|
9
|
+
`, w = r(b)`
|
|
11
10
|
width: 100%;
|
|
12
11
|
white-space: nowrap;
|
|
13
|
-
`,
|
|
12
|
+
`, m = r(n)`
|
|
14
13
|
&:before {
|
|
15
14
|
// TODO: make sure to add a token for this weird stuff
|
|
16
15
|
background: linear-gradient(90deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);
|
|
@@ -35,36 +34,25 @@ const T = r(n)`
|
|
|
35
34
|
right: 0;
|
|
36
35
|
top: 0;
|
|
37
36
|
}
|
|
38
|
-
`,
|
|
37
|
+
`, x = r(n)`
|
|
39
38
|
overflow-x: auto;
|
|
40
|
-
`,
|
|
41
|
-
const a =
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
|
|
39
|
+
`, O = ({ footer: t, ...l }) => {
|
|
40
|
+
const a = h(null), [s, o] = u(), d = (e) => {
|
|
41
|
+
const c = e.target.scrollWidth - e.target.clientWidth;
|
|
42
|
+
if (e.target.scrollLeft === 0) {
|
|
43
|
+
o("right");
|
|
45
44
|
return;
|
|
46
45
|
}
|
|
47
|
-
if (
|
|
48
|
-
|
|
46
|
+
if (e.target.scrollLeft === c) {
|
|
47
|
+
o("left");
|
|
49
48
|
return;
|
|
50
49
|
}
|
|
51
|
-
|
|
50
|
+
e.target.scrollLeft > 0 && o("both");
|
|
52
51
|
};
|
|
53
|
-
return
|
|
54
|
-
a.current.scrollWidth > a.current.clientWidth &&
|
|
55
|
-
}, []),
|
|
56
|
-
/* @__PURE__ */ i(k, { overflowing: h, position: "relative", children: /* @__PURE__ */ i(R, { ref: a, onScroll: u, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ i(S, { colCount: t, rowCount: d, ...f }) }) }),
|
|
57
|
-
c
|
|
58
|
-
] });
|
|
59
|
-
};
|
|
60
|
-
l.defaultProps = {
|
|
61
|
-
footer: void 0
|
|
62
|
-
};
|
|
63
|
-
l.propTypes = {
|
|
64
|
-
colCount: s.number.isRequired,
|
|
65
|
-
footer: s.node,
|
|
66
|
-
rowCount: s.number.isRequired
|
|
52
|
+
return g(() => {
|
|
53
|
+
a.current.scrollWidth > a.current.clientWidth && o("right");
|
|
54
|
+
}, []), f(p, { shadow: "tableShadow", hasRadius: !0, background: "neutral0", children: [i(m, { overflowing: s, position: "relative", children: i(x, { ref: a, onScroll: d, paddingLeft: 6, paddingRight: 6, children: i(w, { ...l }) }) }), t] });
|
|
67
55
|
};
|
|
68
56
|
export {
|
|
69
|
-
|
|
57
|
+
O as Table
|
|
70
58
|
};
|
package/dist/Table/Tbody.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("styled-components"),d=require("../RawTable/RawTbody.cjs"),n=t=>t&&t.__esModule?t:{default:t},s=n(r),u=s.default(d.RawTbody)`
|
|
2
2
|
& tr:last-of-type {
|
|
3
3
|
border-bottom: none;
|
|
4
4
|
}
|
|
5
|
-
`,
|
|
5
|
+
`,l=({children:t,...e})=>o.jsx(u,{...e,children:t});exports.Tbody=l;
|
package/dist/Table/Tbody.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "
|
|
3
|
-
import t from "styled-components";
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import e from "styled-components";
|
|
4
3
|
import { RawTbody as m } from "../RawTable/RawTbody.js";
|
|
5
|
-
const p =
|
|
4
|
+
const p = e(m)`
|
|
6
5
|
& tr:last-of-type {
|
|
7
6
|
border-bottom: none;
|
|
8
7
|
}
|
|
9
|
-
`, s = (o) =>
|
|
8
|
+
`, s = ({ children: o, ...r }) => t(p, { ...r, children: o });
|
|
10
9
|
export {
|
|
11
10
|
s as Tbody
|
|
12
11
|
};
|
package/dist/Table/Thead.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),o=require("styled-components"),d=require("../RawTable/RawThead.cjs"),s=e=>e&&e.__esModule?e:{default:e},a=s(o),l=a.default(d.RawThead)`
|
|
2
2
|
border-bottom: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
3
|
-
`,
|
|
3
|
+
`,n=({children:e,...t})=>r.jsx(l,{...t,children:e});exports.Thead=n;
|
package/dist/Table/Thead.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`, i = (o) => /* @__PURE__ */ r(m, { ...o });
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import e from "styled-components";
|
|
3
|
+
import { RawThead as d } from "../RawTable/RawThead.js";
|
|
4
|
+
const m = e(d)`
|
|
5
|
+
border-bottom: 1px solid ${({ theme: r }) => r.colors.neutral150};
|
|
6
|
+
`, i = ({ children: r, ...o }) => t(m, { ...o, children: r });
|
|
8
7
|
export {
|
|
9
8
|
i as Thead
|
|
10
9
|
};
|
package/dist/Table/Tr.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("styled-components"),o=require("../RawTable/RawTr.cjs"),s=t=>t&&t.__esModule?t:{default:t},d=s(r),i=d.default(o.RawTr)`
|
|
2
2
|
border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
3
3
|
|
|
4
4
|
& td,
|
package/dist/Table/Tr.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
2
|
import o from "styled-components";
|
|
4
3
|
import { RawTr as p } from "../RawTable/RawTr.js";
|
|
5
|
-
const
|
|
4
|
+
const d = o(p)`
|
|
6
5
|
border-bottom: 1px solid ${({ theme: t }) => t.colors.neutral150};
|
|
7
6
|
|
|
8
7
|
& td,
|
|
@@ -21,7 +20,7 @@ const i = o(p)`
|
|
|
21
20
|
padding-bottom: 0;
|
|
22
21
|
height: ${56 / 16}rem;
|
|
23
22
|
}
|
|
24
|
-
`,
|
|
23
|
+
`, a = (t) => r(d, { ...t });
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
a as Tr
|
|
27
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("styled-components"),o=require("./MainNavContext.cjs"),a=require("../../Flex/Flex.cjs"),i=e=>e&&e.__esModule?e:{default:e},s=i(r),l=s.default(a.Flex)`
|
|
2
2
|
width: ${({condensed:e})=>e?"max-content":`${224/16}rem`};
|
|
3
3
|
border-right: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
4
|
-
`,
|
|
4
|
+
`,u=({condensed:e=!1,...n})=>t.jsx(o.MainNavContext.Provider,{value:e,children:t.jsx(l,{alignItems:"normal",as:"nav",background:"neutral0",condensed:e,direction:"column",height:"100vh",position:"sticky",top:0,zIndex:2,...n})});exports.MainNav=u;
|
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
import i from "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
border-right: 1px solid ${({ theme: o }) => o.colors.neutral150};
|
|
10
|
-
`, t = ({ condensed: o, ...e }) => /* @__PURE__ */ r(a.Provider, { value: o, children: /* @__PURE__ */ r(
|
|
11
|
-
m,
|
|
12
|
-
{
|
|
13
|
-
alignItems: "normal",
|
|
14
|
-
as: "nav",
|
|
15
|
-
background: "neutral0",
|
|
16
|
-
condensed: o,
|
|
17
|
-
direction: "column",
|
|
18
|
-
height: "100vh",
|
|
19
|
-
position: "sticky",
|
|
20
|
-
top: 0,
|
|
21
|
-
zIndex: 2,
|
|
22
|
-
...e
|
|
23
|
-
}
|
|
24
|
-
) });
|
|
25
|
-
t.defaultProps = {
|
|
26
|
-
condensed: !1
|
|
27
|
-
};
|
|
28
|
-
t.propTypes = {
|
|
29
|
-
condensed: n.bool
|
|
30
|
-
};
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import n from "styled-components";
|
|
3
|
+
import { MainNavContext as e } from "./MainNavContext.js";
|
|
4
|
+
import { Flex as i } from "../../Flex/Flex.js";
|
|
5
|
+
const a = n(i)`
|
|
6
|
+
width: ${({ condensed: r }) => r ? "max-content" : `${224 / 16}rem`};
|
|
7
|
+
border-right: 1px solid ${({ theme: r }) => r.colors.neutral150};
|
|
8
|
+
`, c = ({ condensed: r = !1, ...t }) => o(e.Provider, { value: r, children: o(a, { alignItems: "normal", as: "nav", background: "neutral0", condensed: r, direction: "column", height: "100vh", position: "sticky", top: 0, zIndex: 2, ...t }) });
|
|
31
9
|
export {
|
|
32
|
-
|
|
10
|
+
c as MainNav
|
|
33
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext(),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext(!1),a=()=>e.useContext(t);exports.MainNavContext=t;exports.useMainNav=a;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),p=require("react"),g=require("styled-components"),f=require("./MainNavContext.cjs"),c=require("../../BaseLink/BaseLink.cjs"),d=require("../../Box/Box.cjs"),s=require("../../VisuallyHidden/VisuallyHidden.cjs"),j=require("../../Flex/Flex.cjs"),o=require("../../Typography/Typography.cjs"),u=e=>e&&e.__esModule?e:{default:e},y=u(p),h=u(g),l=h.default.div`
|
|
2
2
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
3
3
|
|
|
4
4
|
svg,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
height: ${({condensed:e})=>e?`${40/16}rem`:`${32/16}rem`};
|
|
7
7
|
width: ${({condensed:e})=>e?`${40/16}rem`:`${32/16}rem`};
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,B=h.default(c.BaseLink)`
|
|
10
10
|
text-decoration: unset;
|
|
11
11
|
color: inherit;
|
|
12
|
-
`,
|
|
12
|
+
`,m=y.default.forwardRef(({workplace:e,title:t,icon:i,...r},a)=>{const x=f.useMainNav();return r.to=r?.to??"/",x?n.jsx(c.BaseLink,{ref:a,...r,children:n.jsx(d.Box,{paddingLeft:3,paddingRight:3,paddingTop:4,paddingBottom:4,children:n.jsxs(l,{condensed:!0,children:[i,n.jsxs(s.VisuallyHidden,{children:[n.jsx("span",{children:t}),n.jsx("span",{children:e})]})]})})}):n.jsx(B,{ref:a,...r,children:n.jsx(d.Box,{paddingLeft:3,paddingRight:3,paddingTop:4,paddingBottom:4,children:n.jsxs(j.Flex,{children:[n.jsx(l,{"aria-hidden":!0,tabIndex:-1,children:i}),n.jsxs(d.Box,{paddingLeft:2,children:[n.jsxs(o.Typography,{fontWeight:"bold",textColor:"neutral800",as:"span",children:[t,n.jsx(s.VisuallyHidden,{as:"span",children:e})]}),n.jsx(o.Typography,{variant:"pi",as:"p",textColor:"neutral600","aria-hidden":!0,children:e})]})]})})})});exports.NavBrand=m;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as d, jsxs as e } from "react/jsx-runtime";
|
|
2
2
|
import f from "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { BaseLink as g } from "../../BaseLink/BaseLink.js";
|
|
3
|
+
import l from "styled-components";
|
|
4
|
+
import { useMainNav as g } from "./MainNavContext.js";
|
|
5
|
+
import { BaseLink as c } from "../../BaseLink/BaseLink.js";
|
|
7
6
|
import { Box as n } from "../../Box/Box.js";
|
|
8
7
|
import { VisuallyHidden as m } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
9
|
-
import { Flex as
|
|
10
|
-
import { Typography as
|
|
11
|
-
const
|
|
8
|
+
import { Flex as u } from "../../Flex/Flex.js";
|
|
9
|
+
import { Typography as p } from "../../Typography/Typography.js";
|
|
10
|
+
const h = l.div`
|
|
12
11
|
border-radius: ${({ theme: r }) => r.borderRadius};
|
|
13
12
|
|
|
14
13
|
svg,
|
|
@@ -16,35 +15,13 @@ const c = h.div`
|
|
|
16
15
|
height: ${({ condensed: r }) => r ? `${40 / 16}rem` : `${32 / 16}rem`};
|
|
17
16
|
width: ${({ condensed: r }) => r ? `${40 / 16}rem` : `${32 / 16}rem`};
|
|
18
17
|
}
|
|
19
|
-
`,
|
|
18
|
+
`, x = l(c)`
|
|
20
19
|
text-decoration: unset;
|
|
21
20
|
color: inherit;
|
|
22
|
-
`,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */ e("span", { children: r })
|
|
27
|
-
] })
|
|
28
|
-
] }) }) }) : /* @__PURE__ */ e(R, { ref: s, ...p, children: /* @__PURE__ */ e(n, { paddingLeft: 3, paddingRight: 3, paddingTop: 4, paddingBottom: 4, children: /* @__PURE__ */ i(x, { children: [
|
|
29
|
-
/* @__PURE__ */ e(c, { "aria-hidden": !0, tabIndex: -1, children: a }),
|
|
30
|
-
/* @__PURE__ */ i(n, { paddingLeft: 2, children: [
|
|
31
|
-
/* @__PURE__ */ i(l, { fontWeight: "bold", textColor: "neutral800", as: "span", children: [
|
|
32
|
-
o,
|
|
33
|
-
/* @__PURE__ */ e(m, { as: "span", children: r })
|
|
34
|
-
] }),
|
|
35
|
-
/* @__PURE__ */ e(l, { variant: "pi", as: "p", textColor: "neutral600", "aria-hidden": !0, children: r })
|
|
36
|
-
] })
|
|
37
|
-
] }) }) }));
|
|
38
|
-
t.displayName = "NavBrand";
|
|
39
|
-
t.defaultProps = {
|
|
40
|
-
to: "/"
|
|
41
|
-
};
|
|
42
|
-
t.propTypes = {
|
|
43
|
-
icon: d.node.isRequired,
|
|
44
|
-
title: d.string.isRequired,
|
|
45
|
-
to: d.string,
|
|
46
|
-
workplace: d.string.isRequired
|
|
47
|
-
};
|
|
21
|
+
`, W = f.forwardRef(({ workplace: r, title: t, icon: o, ...i }, a) => {
|
|
22
|
+
const s = g();
|
|
23
|
+
return i.to = i?.to ?? "/", s ? d(c, { ref: a, ...i, children: d(n, { paddingLeft: 3, paddingRight: 3, paddingTop: 4, paddingBottom: 4, children: e(h, { condensed: !0, children: [o, e(m, { children: [d("span", { children: t }), d("span", { children: r })] })] }) }) }) : d(x, { ref: a, ...i, children: d(n, { paddingLeft: 3, paddingRight: 3, paddingTop: 4, paddingBottom: 4, children: e(u, { children: [d(h, { "aria-hidden": !0, tabIndex: -1, children: o }), e(n, { paddingLeft: 2, children: [e(p, { fontWeight: "bold", textColor: "neutral800", as: "span", children: [t, d(m, { as: "span", children: r })] }), d(p, { variant: "pi", as: "p", textColor: "neutral600", "aria-hidden": !0, children: r })] })] }) }) });
|
|
24
|
+
});
|
|
48
25
|
export {
|
|
49
|
-
|
|
26
|
+
W as NavBrand
|
|
50
27
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("@strapi/icons"),s=require("styled-components"),i=require("./MainNavContext.cjs"),d=require("../../Flex/Flex.cjs"),a=require("../../Icon/Icon.cjs"),u=require("../../VisuallyHidden/VisuallyHidden.cjs"),l=e=>e&&e.__esModule?e:{default:e},c=l(s),h=c.default(d.Flex).attrs(e=>({justifyContent:"center",...e}))`
|
|
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};
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: center;
|
|
8
5
|
position: absolute;
|
|
9
6
|
bottom: ${(9+4)/16}rem; // 9 is the height of the svg and 4 is the padding below
|
|
10
7
|
right: ${({theme:e,condensed:t})=>t?0:e.spaces[5]};
|
|
@@ -17,4 +14,4 @@
|
|
|
17
14
|
width: ${6/16}rem;
|
|
18
15
|
height: ${9/16}rem;
|
|
19
16
|
}
|
|
20
|
-
`,
|
|
17
|
+
`,g=({children:e,...t})=>{const r=i.useMainNav();return n.jsxs(h,{as:"button",condensed:r,...t,children:[n.jsx(a.Icon,{as:r?o.ChevronRight:o.ChevronLeft,"aria-hidden":!0,color:"neutral600"}),n.jsx(u.VisuallyHidden,{children:e})]})};exports.NavCondense=g;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronRight as i, ChevronLeft as s } from "@strapi/icons";
|
|
3
|
+
import d from "styled-components";
|
|
4
|
+
import { useMainNav as a } from "./MainNavContext.js";
|
|
5
|
+
import { Flex as m } from "../../Flex/Flex.js";
|
|
6
|
+
import { Icon as h } from "../../Icon/Icon.js";
|
|
7
|
+
import { VisuallyHidden as l } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
8
|
+
const c = d(m).attrs((r) => ({
|
|
9
|
+
justifyContent: "center",
|
|
10
|
+
...r
|
|
11
|
+
}))`
|
|
10
12
|
background: ${({ theme: r }) => r.colors.neutral0};
|
|
11
13
|
border: 1px solid ${({ theme: r }) => r.colors.neutral150};
|
|
12
14
|
border-radius: ${({ theme: r }) => r.borderRadius};
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
15
|
position: absolute;
|
|
17
16
|
bottom: ${(9 + 4) / 16}rem; // 9 is the height of the svg and 4 is the padding below
|
|
18
17
|
right: ${({ theme: r, condensed: e }) => e ? 0 : r.spaces[5]};
|
|
@@ -25,16 +24,10 @@ const l = a.button`
|
|
|
25
24
|
width: ${6 / 16}rem;
|
|
26
25
|
height: ${9 / 16}rem;
|
|
27
26
|
}
|
|
28
|
-
`,
|
|
29
|
-
const o =
|
|
30
|
-
return
|
|
31
|
-
/* @__PURE__ */ t(p, { as: o ? n : s, "aria-hidden": !0, color: "neutral600" }),
|
|
32
|
-
/* @__PURE__ */ t(h, { children: r })
|
|
33
|
-
] });
|
|
34
|
-
};
|
|
35
|
-
c.propTypes = {
|
|
36
|
-
children: d.string.isRequired
|
|
27
|
+
`, x = ({ children: r, ...e }) => {
|
|
28
|
+
const o = a();
|
|
29
|
+
return n(c, { as: "button", condensed: o, ...e, children: [t(h, { as: o ? i : s, "aria-hidden": !0, color: "neutral600" }), t(l, { children: r })] });
|
|
37
30
|
};
|
|
38
31
|
export {
|
|
39
|
-
|
|
32
|
+
x as NavCondense
|
|
40
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("../../Box/Box.cjs"),r=({children:e})=>o.jsx(t.Box,{position:"relative",children:e});exports.NavFooter=r;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
import { Box as i } from "../../Box/Box.js";
|
|
5
|
-
const o = ({ children: r }) => /* @__PURE__ */ e(i, { position: "relative", children: r });
|
|
6
|
-
o.displayName = "NavFooter";
|
|
7
|
-
o.propTypes = {
|
|
8
|
-
children: p.node.isRequired
|
|
9
|
-
};
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Box as t } from "../../Box/Box.js";
|
|
3
|
+
const m = ({ children: o }) => r(t, { position: "relative", children: o });
|
|
10
4
|
export {
|
|
11
|
-
|
|
5
|
+
m as NavFooter
|
|
12
6
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),$=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),$=require("react"),y=require("styled-components"),f=require("./MainNavContext.cjs"),x=require("../../Box/Box.cjs"),j=require("../../BaseLink/BaseLink.cjs"),s=require("../../Typography/Typography.cjs"),h=require("../../Flex/Flex.cjs"),v=require("../../Badge/Badge.cjs"),m=require("../../Tooltip/Tooltip.cjs"),g=e=>e&&e.__esModule?e:{default:e},b=g($),a=g(y),c=a.default(x.Box)`
|
|
2
2
|
svg {
|
|
3
3
|
width: 1rem;
|
|
4
4
|
height: 1rem;
|
|
5
5
|
}
|
|
6
|
-
`,
|
|
6
|
+
`,d=a.default(j.BaseLink)`
|
|
7
7
|
position: relative;
|
|
8
8
|
text-decoration: none;
|
|
9
9
|
display: block;
|
|
10
10
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
11
11
|
background: ${({theme:e})=>e.colors.neutral0};
|
|
12
12
|
|
|
13
|
-
${
|
|
13
|
+
${s.Typography} {
|
|
14
14
|
color: ${({theme:e})=>e.colors.neutral600};
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
&:hover {
|
|
22
22
|
background: ${({theme:e})=>e.colors.neutral100};
|
|
23
23
|
|
|
24
|
-
${
|
|
24
|
+
${s.Typography} {
|
|
25
25
|
color: ${({theme:e})=>e.colors.neutral700};
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
fill: ${({theme:e})=>e.colors.primary600};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
${
|
|
40
|
+
${s.Typography} {
|
|
41
41
|
color: ${({theme:e})=>e.colors.primary600};
|
|
42
42
|
font-weight: 500;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
`,
|
|
45
|
+
`,u=a.default(h.Flex)`
|
|
46
46
|
padding: ${({theme:e})=>`${e.spaces[2]} ${e.spaces[3]}`};
|
|
47
|
-
`,
|
|
48
|
-
${({theme:e,condensed:
|
|
47
|
+
`,p=a.default(v.Badge)`
|
|
48
|
+
${({theme:e,condensed:o})=>o&&`
|
|
49
49
|
position: absolute;
|
|
50
50
|
// Values based on visual aspect
|
|
51
51
|
top: -${e.spaces[3]};
|
|
52
52
|
right: -${e.spaces[1]};
|
|
53
53
|
`}
|
|
54
54
|
|
|
55
|
-
${
|
|
55
|
+
${s.Typography} {
|
|
56
56
|
//find a solution to remove !important
|
|
57
57
|
color: ${({theme:e})=>e.colors.neutral0} !important;
|
|
58
58
|
line-height: 0;
|
|
@@ -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
|
-
`,
|
|
69
|
+
`,k=b.default.forwardRef(({children:e,icon:o,badgeContent:t,badgeAriaLabel:n,...i},l)=>f.useMainNav()?r.jsx(d,{ref:l,...i,children:r.jsx(m.Tooltip,{position:"right",label:e,children:r.jsxs(u,{as:"span",justifyContent:"center",children:[r.jsx(c,{"aria-hidden":!0,paddingRight:0,as:"span",children:o}),t&&r.jsx(p,{condensed:!0,"aria-label":n,children:t})]})})}):r.jsx(d,{ref:l,...i,children:r.jsxs(u,{as:"span",justifyContent:"space-between",children:[r.jsxs(h.Flex,{children:[r.jsx(c,{"aria-hidden":!0,paddingRight:3,as:"span",children:o}),r.jsx(s.Typography,{children:e})]}),t&&r.jsx(p,{justifyContent:"center","aria-label":n,children:t})]})}));exports.NavLink=k;
|