@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/Box/Box.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("styled-components"),o=require("../helpers/handleResponsiveValues.cjs"),r=require("../helpers/theme.cjs"),a=e=>e&&e.__esModule?e:{default:e},
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("styled-components"),o=require("../helpers/handleResponsiveValues.cjs"),r=require("../helpers/theme.cjs"),a=e=>e&&e.__esModule?e:{default:e},m=a(n),d={color:!0,cursor:!0,height:!0,width:!0},l=m.default.div.withConfig({shouldForwardProp:(e,t)=>!d[e]&&t(e)})`
|
|
2
2
|
// Font
|
|
3
3
|
font-size: ${({fontSize:e,theme:t})=>r.extractStyleFromTheme(t.fontSizes,e,e)};
|
|
4
4
|
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
// Text
|
|
73
73
|
text-align: ${({textAlign:e})=>e};
|
|
74
74
|
text-transform: ${({textTransform:e})=>e};
|
|
75
|
-
line-height: ${({lineHeight:
|
|
75
|
+
line-height: ${({theme:e,lineHeight:t})=>r.extractStyleFromTheme(e.lineHeights,t,t)};
|
|
76
76
|
|
|
77
77
|
// Cursor
|
|
78
78
|
cursor: ${({cursor:e})=>e};
|
package/dist/Box/Box.js
CHANGED
|
@@ -85,7 +85,7 @@ const t = {
|
|
|
85
85
|
// Text
|
|
86
86
|
text-align: ${({ textAlign: e }) => e};
|
|
87
87
|
text-transform: ${({ textTransform: e }) => e};
|
|
88
|
-
line-height: ${({
|
|
88
|
+
line-height: ${({ theme: e, lineHeight: o }) => s(e.lineHeights, o, o)};
|
|
89
89
|
|
|
90
90
|
// Cursor
|
|
91
91
|
cursor: ${({ cursor: e }) => e};
|
package/dist/Grid/Grid.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("styled-components"),i=require("../helpers/handleResponsiveValues.cjs"),d=require("../Box/Box.cjs"),l=e=>e&&e.__esModule?e:{default:e},n=l(o),u=n.default(d.Box)`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(${({gridCols:e})=>e}, 1fr);
|
|
4
|
-
${({theme:e,gap:t})=>
|
|
5
|
-
`,
|
|
4
|
+
${({theme:e,gap:t})=>i("gap",t,e)}
|
|
5
|
+
`,a=({gap:e="0",gridCols:t=12,...r})=>s.jsx(u,{gap:e,gridCols:t,...r});exports.Grid=a;
|
package/dist/Grid/Grid.js
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import d from "../helpers/handleResponsiveValues.js";
|
|
7
|
-
import { Box as f } from "../Box/Box.js";
|
|
8
|
-
const l = n(f)`
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import t from "styled-components";
|
|
3
|
+
import i from "../helpers/handleResponsiveValues.js";
|
|
4
|
+
import { Box as m } from "../Box/Box.js";
|
|
5
|
+
const s = t(m)`
|
|
9
6
|
display: grid;
|
|
10
7
|
grid-template-columns: repeat(${({ gridCols: r }) => r}, 1fr);
|
|
11
|
-
${({ theme: r, gap: o }) =>
|
|
12
|
-
`,
|
|
13
|
-
const i = s.useMemo(() => ({ gap: r, gridCols: o }), [r, o]);
|
|
14
|
-
return /* @__PURE__ */ p(a.Provider, { value: i, children: /* @__PURE__ */ p(l, { gap: r, gridCols: o, ...m }) });
|
|
15
|
-
};
|
|
16
|
-
t.defaultProps = {
|
|
17
|
-
gap: 0,
|
|
18
|
-
gridCols: 12
|
|
19
|
-
};
|
|
20
|
-
t.propTypes = {
|
|
21
|
-
gap: e.oneOfType([e.number, e.arrayOf(e.number)]),
|
|
22
|
-
gridCols: e.number
|
|
23
|
-
};
|
|
8
|
+
${({ theme: r, gap: o }) => i("gap", o, r)}
|
|
9
|
+
`, f = ({ gap: r = "0", gridCols: o = 12, ...p }) => e(s, { gap: r, gridCols: o, ...p });
|
|
24
10
|
export {
|
|
25
|
-
|
|
11
|
+
f as Grid
|
|
26
12
|
};
|
package/dist/Grid/GridItem.cjs
CHANGED
|
@@ -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("styled-components"),i=require("../Box/Box.cjs"),o=e=>e&&e.__esModule?e:{default:e},d=o(t),r=d.default(i.Box)`
|
|
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
|
+
`;exports.GridItem=r;
|
package/dist/Grid/GridItem.js
CHANGED
|
@@ -1,34 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { useGrid as l } from "./GridContext.js";
|
|
6
|
-
import { Box as u } from "../Box/Box.js";
|
|
7
|
-
const a = n.div`
|
|
8
|
-
grid-column: span ${({ col: r }) => r};
|
|
1
|
+
import m from "styled-components";
|
|
2
|
+
import { Box as e } from "../Box/Box.js";
|
|
3
|
+
const t = m(e)`
|
|
4
|
+
grid-column: span ${({ col: i }) => i};
|
|
9
5
|
max-width: 100%;
|
|
10
6
|
|
|
11
|
-
${({ theme:
|
|
12
|
-
grid-column: span ${({ s:
|
|
7
|
+
${({ theme: i }) => i.mediaQueries.tablet} {
|
|
8
|
+
grid-column: span ${({ s: i }) => i};
|
|
13
9
|
}
|
|
14
10
|
|
|
15
|
-
${({ theme:
|
|
16
|
-
grid-column: span ${({ xs:
|
|
11
|
+
${({ theme: i }) => i.mediaQueries.mobile} {
|
|
12
|
+
grid-column: span ${({ xs: i }) => i};
|
|
17
13
|
}
|
|
18
|
-
|
|
19
|
-
const { gap: t, gridCols: d } = l();
|
|
20
|
-
return /* @__PURE__ */ i(a, { gap: t, gridCols: d, col: r, xs: e, s: p, children: /* @__PURE__ */ i(u, { ...s }) });
|
|
21
|
-
};
|
|
22
|
-
m.defaultProps = {
|
|
23
|
-
col: void 0,
|
|
24
|
-
s: void 0,
|
|
25
|
-
xs: void 0
|
|
26
|
-
};
|
|
27
|
-
m.propTypes = {
|
|
28
|
-
col: o.number,
|
|
29
|
-
s: o.number,
|
|
30
|
-
xs: o.number
|
|
31
|
-
};
|
|
14
|
+
`;
|
|
32
15
|
export {
|
|
33
|
-
|
|
16
|
+
t as GridItem
|
|
34
17
|
};
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
& > * + * {
|
|
3
|
-
margin-left: ${({theme:e})=>e.spaces[2]};
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
margin-left: ${({pullRight:e})=>e?"auto":void 0};
|
|
7
|
-
`,p=d.default(u)`
|
|
8
|
-
flex-shrink: 0;
|
|
9
|
-
`,n=({startActions:e,endActions:o})=>e||o?t.jsx(r.Box,{paddingLeft:10,paddingRight:10,children:t.jsx(r.Box,{paddingBottom:4,children:t.jsxs(l.Flex,{justifyContent:"space-between",alignItems:"flex-start",children:[e&&t.jsx(u,{wrap:"wrap",children:e}),o&&t.jsx(p,{pullRight:!0,children:o})]})})}):null;n.defaultProps={endActions:void 0,startActions:void 0};n.propTypes={endActions:s.default.node,startActions:s.default.node};exports.ActionLayout=n;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../Flex/Flex.cjs"),i=({startActions:r,endActions:n})=>!r&&!n?null:e.jsxs(t.Flex,{justifyContent:"space-between",alignItems:"flex-start",paddingBottom:4,paddingLeft:10,paddingRight:10,children:[e.jsx(t.Flex,{gap:2,wrap:"wrap",children:r}),e.jsx(t.Flex,{gap:2,shrink:0,wrap:"wrap",children:n})]});exports.ActionLayout=i;
|
|
@@ -1,29 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
import n from "styled-components";
|
|
5
|
-
import { Flex as p } from "../Flex/Flex.js";
|
|
6
|
-
import { Box as i } from "../Box/Box.js";
|
|
7
|
-
const d = n(p)`
|
|
8
|
-
& > * + * {
|
|
9
|
-
margin-left: ${({ theme: t }) => t.spaces[2]};
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
margin-left: ${({ pullRight: t }) => t ? "auto" : void 0};
|
|
13
|
-
`, a = n(d)`
|
|
14
|
-
flex-shrink: 0;
|
|
15
|
-
`, l = ({ startActions: t, endActions: r }) => t || r ? /* @__PURE__ */ o(i, { paddingLeft: 10, paddingRight: 10, children: /* @__PURE__ */ o(i, { paddingBottom: 4, children: /* @__PURE__ */ s(p, { justifyContent: "space-between", alignItems: "flex-start", children: [
|
|
16
|
-
t && /* @__PURE__ */ o(d, { wrap: "wrap", children: t }),
|
|
17
|
-
r && /* @__PURE__ */ o(a, { pullRight: !0, children: r })
|
|
18
|
-
] }) }) }) : null;
|
|
19
|
-
l.defaultProps = {
|
|
20
|
-
endActions: void 0,
|
|
21
|
-
startActions: void 0
|
|
22
|
-
};
|
|
23
|
-
l.propTypes = {
|
|
24
|
-
endActions: e.node,
|
|
25
|
-
startActions: e.node
|
|
26
|
-
};
|
|
1
|
+
import { jsxs as p, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as r } from "../Flex/Flex.js";
|
|
3
|
+
const o = ({ startActions: t, endActions: e }) => !t && !e ? null : p(r, { justifyContent: "space-between", alignItems: "flex-start", paddingBottom: 4, paddingLeft: 10, paddingRight: 10, children: [n(r, { gap: 2, wrap: "wrap", children: t }), n(r, { gap: 2, shrink: 0, wrap: "wrap", children: e })] });
|
|
27
4
|
export {
|
|
28
|
-
|
|
5
|
+
o as ActionLayout
|
|
29
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../Box/Box.cjs"),o=({children:t})=>e.jsx(n.Box,{paddingLeft:10,paddingRight:10,children:t});exports.ContentLayout=o;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
import { Box as t } from "../Box/Box.js";
|
|
5
|
-
const e = ({ children: o }) => /* @__PURE__ */ r(t, { paddingLeft: 10, paddingRight: 10, children: o });
|
|
6
|
-
e.propTypes = {
|
|
7
|
-
children: p.node.isRequired
|
|
8
|
-
};
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Box as r } from "../Box/Box.js";
|
|
3
|
+
const d = ({ children: t }) => o(r, { paddingLeft: 10, paddingRight: 10, children: t });
|
|
9
4
|
export {
|
|
10
|
-
|
|
5
|
+
d as ContentLayout
|
|
11
6
|
};
|
|
@@ -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 e=require("styled-components"),a=t=>t&&t.__esModule?t:{default:t},d=a(e),i=d.default.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
4
|
-
grid-gap: ${({theme:
|
|
5
|
-
`;
|
|
4
|
+
grid-gap: ${({theme:t})=>t.spaces[4]};
|
|
5
|
+
`;exports.GridLayout=i;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const i = e.div`
|
|
1
|
+
import i from "styled-components";
|
|
2
|
+
const a = i.div`
|
|
4
3
|
display: grid;
|
|
5
4
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
6
|
-
grid-gap: ${({ theme:
|
|
5
|
+
grid-gap: ${({ theme: t }) => t.spaces[4]};
|
|
7
6
|
`;
|
|
8
|
-
i.propTypes = {
|
|
9
|
-
children: p.node.isRequired
|
|
10
|
-
};
|
|
11
7
|
export {
|
|
12
|
-
|
|
8
|
+
a as GridLayout
|
|
13
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
width: ${
|
|
3
|
-
z-index: ${({theme:
|
|
4
|
-
`,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),y=require("styled-components"),B=require("../hooks/useElementOnScreen.cjs"),R=require("../hooks/useResizeObserver.cjs"),d=require("../Box/Box.cjs"),a=require("../Flex/Flex.cjs"),o=require("../Typography/Typography.cjs"),p=t=>t&&t.__esModule?t:{default:t},L=p(u),S=p(y),g=t=>{const r=u.useRef(null),[s,n]=u.useState(null),[i,l]=B.useElementOnScreen({root:null,rootMargin:"0px",threshold:0});return R.useResizeObserver(i,()=>{i.current&&n(i.current.getBoundingClientRect())}),u.useEffect(()=>{r.current&&n(r.current.getBoundingClientRect())},[r]),e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{height:s?.height},ref:i,children:l&&e.jsx(c,{ref:r,...t})}),!l&&e.jsx(c,{...t,sticky:!0,width:s?.width})]})};g.displayName="HeaderLayout";const b=S.default(d.Box)`
|
|
2
|
+
width: ${({width:t})=>t?`${t/16}rem`:void 0};
|
|
3
|
+
z-index: ${({theme:t})=>t.zIndices[1]};
|
|
4
|
+
`,c=L.default.forwardRef(({navigationAction:t,primaryAction:r,secondaryAction:s,subtitle:n,title:i,sticky:l,width:f,...h},j)=>{const x=typeof n=="string";return l?e.jsx(b,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,position:"fixed",top:0,right:0,background:"neutral0",shadow:"tableShadow",width:f,"data-strapi-header-sticky":!0,children:e.jsxs(a.Flex,{justifyContent:"space-between",children:[e.jsxs(a.Flex,{children:[t&&e.jsx(d.Box,{paddingRight:3,children:t}),e.jsxs(d.Box,{children:[e.jsx(o.Typography,{variant:"beta",as:"h1",...h,children:i}),x?e.jsx(o.Typography,{variant:"pi",textColor:"neutral600",children:n}):n]}),s?e.jsx(d.Box,{paddingLeft:4,children:s}):null]}),e.jsx(a.Flex,{children:r?e.jsx(d.Box,{paddingLeft:2,children:r}):void 0})]})}):e.jsxs(d.Box,{ref:j,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:t?6:8,background:"neutral100","data-strapi-header":!0,children:[t?e.jsx(d.Box,{paddingBottom:2,children:t}):null,e.jsxs(a.Flex,{justifyContent:"space-between",children:[e.jsxs(a.Flex,{minWidth:0,children:[e.jsx(o.Typography,{as:"h1",variant:"alpha",...h,children:i}),s?e.jsx(d.Box,{paddingLeft:4,children:s}):null]}),r]}),x?e.jsx(o.Typography,{variant:"epsilon",textColor:"neutral600",as:"p",children:n}):n]})});exports.BaseHeaderLayout=c;exports.HeaderLayout=g;
|
|
@@ -1,127 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const e = b(null), [o, n] = x(null), [r, a] = S({
|
|
1
|
+
import { jsx as e, jsxs as l, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import x, { useRef as R, useState as y, useEffect as L } from "react";
|
|
3
|
+
import w from "styled-components";
|
|
4
|
+
import { useElementOnScreen as B } from "../hooks/useElementOnScreen.js";
|
|
5
|
+
import { useResizeObserver as S } from "../hooks/useResizeObserver.js";
|
|
6
|
+
import { Box as n } from "../Box/Box.js";
|
|
7
|
+
import { Flex as o } from "../Flex/Flex.js";
|
|
8
|
+
import { Typography as u } from "../Typography/Typography.js";
|
|
9
|
+
const b = (r) => {
|
|
10
|
+
const t = R(null), [i, d] = y(null), [a, h] = B({
|
|
12
11
|
root: null,
|
|
13
12
|
rootMargin: "0px",
|
|
14
13
|
threshold: 0
|
|
15
14
|
});
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
}),
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
containerRef: r,
|
|
22
|
-
isVisible: a,
|
|
23
|
-
baseHeaderLayoutRef: e,
|
|
24
|
-
headerSize: o
|
|
25
|
-
};
|
|
26
|
-
}, h = (e) => {
|
|
27
|
-
const { containerRef: o, isVisible: n, baseHeaderLayoutRef: r, headerSize: a } = H();
|
|
28
|
-
return /* @__PURE__ */ s(v, { children: [
|
|
29
|
-
/* @__PURE__ */ i("div", { style: { height: a?.height }, ref: o, children: n && /* @__PURE__ */ i(c, { ref: r, ...e }) }),
|
|
30
|
-
!n && /* @__PURE__ */ i(c, { ...e, sticky: !0, width: a?.width })
|
|
31
|
-
] });
|
|
32
|
-
};
|
|
33
|
-
h.displayName = "HeaderLayout";
|
|
34
|
-
const T = L(d)`
|
|
35
|
-
width: ${(e) => e.width}px;
|
|
36
|
-
z-index: ${({ theme: e }) => e.zIndices[1]};
|
|
37
|
-
`, c = R.forwardRef(
|
|
38
|
-
({ navigationAction: e, primaryAction: o, secondaryAction: n, subtitle: r, title: a, sticky: g, width: m, ...u }, y) => {
|
|
39
|
-
const f = typeof r == "string";
|
|
40
|
-
return g ? /* @__PURE__ */ i(
|
|
41
|
-
T,
|
|
42
|
-
{
|
|
43
|
-
paddingLeft: 6,
|
|
44
|
-
paddingRight: 6,
|
|
45
|
-
paddingTop: 3,
|
|
46
|
-
paddingBottom: 3,
|
|
47
|
-
position: "fixed",
|
|
48
|
-
top: 0,
|
|
49
|
-
right: 0,
|
|
50
|
-
background: "neutral0",
|
|
51
|
-
shadow: "tableShadow",
|
|
52
|
-
width: m,
|
|
53
|
-
"data-strapi-header-sticky": !0,
|
|
54
|
-
children: /* @__PURE__ */ s(l, { justifyContent: "space-between", children: [
|
|
55
|
-
/* @__PURE__ */ s(l, { children: [
|
|
56
|
-
e && /* @__PURE__ */ i(d, { paddingRight: 3, children: e }),
|
|
57
|
-
/* @__PURE__ */ s(d, { children: [
|
|
58
|
-
/* @__PURE__ */ i(p, { variant: "beta", as: "h1", ...u, children: a }),
|
|
59
|
-
f ? /* @__PURE__ */ i(p, { variant: "pi", textColor: "neutral600", children: r }) : r
|
|
60
|
-
] }),
|
|
61
|
-
n ? /* @__PURE__ */ i(d, { paddingLeft: 4, children: n }) : null
|
|
62
|
-
] }),
|
|
63
|
-
/* @__PURE__ */ i(l, { children: o ? /* @__PURE__ */ i(d, { paddingLeft: 2, children: o }) : void 0 })
|
|
64
|
-
] })
|
|
65
|
-
}
|
|
66
|
-
) : /* @__PURE__ */ s(
|
|
67
|
-
d,
|
|
68
|
-
{
|
|
69
|
-
ref: y,
|
|
70
|
-
paddingLeft: 10,
|
|
71
|
-
paddingRight: 10,
|
|
72
|
-
paddingBottom: 8,
|
|
73
|
-
paddingTop: e ? 6 : 8,
|
|
74
|
-
background: "neutral100",
|
|
75
|
-
"data-strapi-header": !0,
|
|
76
|
-
children: [
|
|
77
|
-
e ? /* @__PURE__ */ i(d, { paddingBottom: 2, children: e }) : null,
|
|
78
|
-
/* @__PURE__ */ s(l, { justifyContent: "space-between", children: [
|
|
79
|
-
/* @__PURE__ */ s(l, { minWidth: 0, children: [
|
|
80
|
-
/* @__PURE__ */ i(p, { as: "h1", variant: "alpha", ...u, children: a }),
|
|
81
|
-
n ? /* @__PURE__ */ i(d, { paddingLeft: 4, children: n }) : null
|
|
82
|
-
] }),
|
|
83
|
-
o
|
|
84
|
-
] }),
|
|
85
|
-
f ? /* @__PURE__ */ i(p, { variant: "epsilon", textColor: "neutral600", as: "p", children: r }) : r
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
c.displayName = "BaseHeaderLayout";
|
|
92
|
-
c.defaultProps = {
|
|
93
|
-
navigationAction: void 0,
|
|
94
|
-
primaryAction: void 0,
|
|
95
|
-
secondaryAction: void 0,
|
|
96
|
-
subtitle: void 0,
|
|
97
|
-
sticky: !1,
|
|
98
|
-
width: void 0
|
|
99
|
-
};
|
|
100
|
-
c.propTypes = {
|
|
101
|
-
navigationAction: t.node,
|
|
102
|
-
primaryAction: t.node,
|
|
103
|
-
secondaryAction: t.node,
|
|
104
|
-
sticky: t.bool,
|
|
105
|
-
// TODO V2: Remove the string fallback
|
|
106
|
-
subtitle: t.oneOfType([t.string, t.node]),
|
|
107
|
-
title: t.string.isRequired,
|
|
108
|
-
width: t.number
|
|
109
|
-
};
|
|
110
|
-
h.defaultProps = {
|
|
111
|
-
navigationAction: void 0,
|
|
112
|
-
primaryAction: void 0,
|
|
113
|
-
secondaryAction: void 0,
|
|
114
|
-
subtitle: void 0
|
|
115
|
-
};
|
|
116
|
-
h.propTypes = {
|
|
117
|
-
navigationAction: t.node,
|
|
118
|
-
primaryAction: t.node,
|
|
119
|
-
secondaryAction: t.node,
|
|
120
|
-
// TODO V2: Remove the string fallback
|
|
121
|
-
subtitle: t.oneOfType([t.string, t.node]),
|
|
122
|
-
title: t.string.isRequired
|
|
15
|
+
return S(a, () => {
|
|
16
|
+
a.current && d(a.current.getBoundingClientRect());
|
|
17
|
+
}), L(() => {
|
|
18
|
+
t.current && d(t.current.getBoundingClientRect());
|
|
19
|
+
}, [t]), l(m, { children: [e("div", { style: { height: i?.height }, ref: a, children: h && e(p, { ref: t, ...r }) }), !h && e(p, { ...r, sticky: !0, width: i?.width })] });
|
|
123
20
|
};
|
|
21
|
+
b.displayName = "HeaderLayout";
|
|
22
|
+
const C = w(n)`
|
|
23
|
+
width: ${({ width: r }) => r ? `${r / 16}rem` : void 0};
|
|
24
|
+
z-index: ${({ theme: r }) => r.zIndices[1]};
|
|
25
|
+
`, p = x.forwardRef(({ navigationAction: r, primaryAction: t, secondaryAction: i, subtitle: d, title: a, sticky: h, width: c, ...s }, g) => {
|
|
26
|
+
const f = typeof d == "string";
|
|
27
|
+
return h ? e(C, { paddingLeft: 6, paddingRight: 6, paddingTop: 3, paddingBottom: 3, position: "fixed", top: 0, right: 0, background: "neutral0", shadow: "tableShadow", width: c, "data-strapi-header-sticky": !0, children: l(o, { justifyContent: "space-between", children: [l(o, { children: [r && e(n, { paddingRight: 3, children: r }), l(n, { children: [e(u, { variant: "beta", as: "h1", ...s, children: a }), f ? e(u, { variant: "pi", textColor: "neutral600", children: d }) : d] }), i ? e(n, { paddingLeft: 4, children: i }) : null] }), e(o, { children: t ? e(n, { paddingLeft: 2, children: t }) : void 0 })] }) }) : l(n, { ref: g, paddingLeft: 10, paddingRight: 10, paddingBottom: 8, paddingTop: r ? 6 : 8, background: "neutral100", "data-strapi-header": !0, children: [r ? e(n, { paddingBottom: 2, children: r }) : null, l(o, { justifyContent: "space-between", children: [l(o, { minWidth: 0, children: [e(u, { as: "h1", variant: "alpha", ...s, children: a }), i ? e(n, { paddingLeft: 4, children: i }) : null] }), t] }), f ? e(u, { variant: "epsilon", textColor: "neutral600", as: "p", children: d }) : d] });
|
|
28
|
+
});
|
|
124
29
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
30
|
+
p as BaseHeaderLayout,
|
|
31
|
+
b as HeaderLayout
|
|
127
32
|
};
|
package/dist/Layout/Layout.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("styled-components"),o=require("../Box/Box.cjs"),l=t=>t&&t.__esModule?t:{default:t},r=l(d),s=r.default(o.Box)`
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: ${({hasSideNav:
|
|
4
|
-
`,
|
|
3
|
+
grid-template-columns: ${({hasSideNav:t})=>t?"auto 1fr":"1fr"};
|
|
4
|
+
`,i=r.default(o.Box)`
|
|
5
5
|
overflow-x: hidden;
|
|
6
|
-
`,
|
|
6
|
+
`,u=({sideNav:t,children:n})=>e.jsxs(s,{hasSideNav:!!t,children:[t,e.jsx(i,{paddingBottom:10,children:n})]});exports.Layout=u;
|
package/dist/Layout/Layout.js
CHANGED
|
@@ -1,24 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { Box as i } from "../Box/Box.js";
|
|
6
|
-
const s = e(i)`
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import r from "styled-components";
|
|
3
|
+
import { Box as t } from "../Box/Box.js";
|
|
4
|
+
const d = r(t)`
|
|
7
5
|
display: grid;
|
|
8
6
|
grid-template-columns: ${({ hasSideNav: o }) => o ? "auto 1fr" : "1fr"};
|
|
9
|
-
`, m =
|
|
7
|
+
`, m = r(t)`
|
|
10
8
|
overflow-x: hidden;
|
|
11
|
-
`,
|
|
12
|
-
o,
|
|
13
|
-
/* @__PURE__ */ p(m, { paddingBottom: 10, children: d })
|
|
14
|
-
] });
|
|
15
|
-
t.defaultProps = {
|
|
16
|
-
sideNav: void 0
|
|
17
|
-
};
|
|
18
|
-
t.propTypes = {
|
|
19
|
-
children: r.node.isRequired,
|
|
20
|
-
sideNav: r.node
|
|
21
|
-
};
|
|
9
|
+
`, f = ({ sideNav: o, children: e }) => i(d, { hasSideNav: !!o, children: [o, n(m, { paddingBottom: 10, children: e })] });
|
|
22
10
|
export {
|
|
23
|
-
|
|
11
|
+
f as Layout
|
|
24
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../Grid/Grid.cjs"),r=require("../Grid/GridItem.cjs"),o=require("../Box/Box.cjs"),i=({startCol:s,endCol:t})=>e.jsxs(d.Grid,{gap:4,children:[e.jsx(r.GridItem,{col:9,s:12,children:e.jsx(o.Box,{hasRadius:!0,background:"neutral0",shadow:"tableShadow",children:s})}),e.jsx(r.GridItem,{col:3,s:12,children:e.jsx(o.Box,{hasRadius:!0,background:"neutral0",shadow:"tableShadow",children:t})})]});exports.TwoColsLayout=i;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import "
|
|
3
|
-
import o from "
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { Box as d } from "../Box/Box.js";
|
|
7
|
-
const l = ({ startCol: i, endCol: t }) => /* @__PURE__ */ s(a, { gap: 4, children: [
|
|
8
|
-
/* @__PURE__ */ r(e, { col: 9, s: 12, children: /* @__PURE__ */ r(d, { hasRadius: !0, background: "neutral0", shadow: "tableShadow", children: i }) }),
|
|
9
|
-
/* @__PURE__ */ r(e, { col: 3, s: 12, children: /* @__PURE__ */ r(d, { hasRadius: !0, background: "neutral0", shadow: "tableShadow", children: t }) })
|
|
10
|
-
] });
|
|
11
|
-
l.propTypes = {
|
|
12
|
-
endCol: o.node.isRequired,
|
|
13
|
-
startCol: o.node.isRequired
|
|
14
|
-
};
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Grid as i } from "../Grid/Grid.js";
|
|
3
|
+
import { GridItem as o } from "../Grid/GridItem.js";
|
|
4
|
+
import { Box as a } from "../Box/Box.js";
|
|
5
|
+
const c = ({ startCol: d, endCol: t }) => e(i, { gap: 4, children: [r(o, { col: 9, s: 12, children: r(a, { hasRadius: !0, background: "neutral0", shadow: "tableShadow", children: d }) }), r(o, { col: 3, s: 12, children: r(a, { hasRadius: !0, background: "neutral0", shadow: "tableShadow", children: t }) })] });
|
|
15
6
|
export {
|
|
16
|
-
|
|
7
|
+
c as TwoColsLayout
|
|
17
8
|
};
|
package/dist/Table/Cell.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("styled-components"),r=require("../RawTable/RawCell.cjs"),i=require("../Flex/Flex.cjs"),a=e=>e&&e.__esModule?e:{default:e},n=a(c),s=n.default(r.RawTd)`
|
|
2
2
|
vertical-align: middle;
|
|
3
3
|
text-align: left;
|
|
4
4
|
color: ${({theme:e})=>e.colors.neutral600};
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
input {
|
|
11
11
|
vertical-align: sub;
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,u=n.default.span`
|
|
14
14
|
svg {
|
|
15
15
|
height: ${4/16}rem;
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`,d=({children:e,action:l,...o})=>t.jsx(s,{as:r.RawTh,...o,children:t.jsxs(i.Flex,{children:[e,t.jsx(u,{children:l})]})}),h=({children:e,...l})=>t.jsx(s,{...l,children:e});exports.Td=h;exports.Th=d;
|
package/dist/Table/Cell.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import { Flex as d } from "../Flex/Flex.js";
|
|
7
|
-
const i = t(a)`
|
|
1
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import o from "styled-components";
|
|
3
|
+
import { RawTd as c, RawTh as s } from "../RawTable/RawCell.js";
|
|
4
|
+
import { Flex as a } from "../Flex/Flex.js";
|
|
5
|
+
const l = o(c)`
|
|
8
6
|
vertical-align: middle;
|
|
9
7
|
text-align: left;
|
|
10
|
-
color: ${({ theme:
|
|
8
|
+
color: ${({ theme: r }) => r.colors.neutral600};
|
|
11
9
|
outline-offset: -4px;
|
|
12
10
|
|
|
13
11
|
/**
|
|
@@ -16,23 +14,12 @@ const i = t(a)`
|
|
|
16
14
|
input {
|
|
17
15
|
vertical-align: sub;
|
|
18
16
|
}
|
|
19
|
-
`,
|
|
17
|
+
`, p = o.span`
|
|
20
18
|
svg {
|
|
21
19
|
height: ${4 / 16}rem;
|
|
22
20
|
}
|
|
23
|
-
`,
|
|
24
|
-
o,
|
|
25
|
-
/* @__PURE__ */ r(m, { children: l })
|
|
26
|
-
] }) });
|
|
27
|
-
n.defaultProps = {
|
|
28
|
-
action: void 0
|
|
29
|
-
};
|
|
30
|
-
n.propTypes = {
|
|
31
|
-
action: e.node,
|
|
32
|
-
children: e.node.isRequired
|
|
33
|
-
};
|
|
34
|
-
const k = (o) => /* @__PURE__ */ r(i, { ...o });
|
|
21
|
+
`, u = ({ children: r, action: e, ...i }) => t(l, { as: s, ...i, children: n(a, { children: [r, t(p, { children: e })] }) }), x = ({ children: r, ...e }) => t(l, { ...e, children: r });
|
|
35
22
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
23
|
+
x as Td,
|
|
24
|
+
u as Th
|
|
38
25
|
};
|
package/dist/Table/TFooter.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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("styled-components"),t=require("../Box/Box.cjs"),s=require("../Divider/Divider.cjs"),a=require("../Flex/Flex.cjs"),l=require("../Typography/Typography.cjs"),c=e=>e&&e.__esModule?e:{default:e},i=c(n),u=i.default(t.Box)`
|
|
2
2
|
height: ${24/16}rem;
|
|
3
3
|
width: ${24/16}rem;
|
|
4
4
|
border-radius: 50%;
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
svg path {
|
|
15
15
|
fill: ${({theme:e})=>e.colors.primary600};
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`,h=i.default(t.Box)`
|
|
18
18
|
border-radius: 0 0 ${({theme:e})=>e.borderRadius} ${({theme:e})=>e.borderRadius};
|
|
19
19
|
display: block;
|
|
20
20
|
width: 100%;
|
|
21
21
|
border: none;
|
|
22
|
-
`,
|
|
22
|
+
`,x=({children:e,icon:o,...d})=>r.jsxs("div",{children:[r.jsx(s.Divider,{}),r.jsx(h,{as:"button",background:"primary100",padding:5,...d,children:r.jsxs(a.Flex,{children:[r.jsx(u,{"aria-hidden":!0,background:"primary200",children:o}),r.jsx(t.Box,{paddingLeft:3,children:r.jsx(l.Typography,{variant:"pi",fontWeight:"bold",textColor:"primary600",children:e})})]})})]});exports.TFooter=x;
|