@strapi/design-system 1.6.1 → 1.6.3
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 +24 -22
- package/dist/Avatar/Avatar.cjs +5 -16
- package/dist/Avatar/Avatar.js +44 -48
- package/dist/BaseRadio/BaseRadio.cjs +2 -2
- package/dist/BaseRadio/BaseRadio.js +25 -23
- package/dist/Box/Box.cjs +1 -1
- package/dist/Box/Box.js +36 -33
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.js +1 -1
- package/dist/Card/CardHeader.cjs +1 -2
- package/dist/Card/CardHeader.js +1 -1
- package/dist/Card/CardTimer.cjs +1 -5
- package/dist/Card/CardTimer.js +14 -20
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.js +9 -9
- package/dist/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.js +16 -16
- package/dist/Combobox/Combobox.cjs +1 -1
- package/dist/Combobox/Combobox.js +139 -139
- package/dist/Combobox/ComboboxList.cjs +1 -1
- package/dist/Combobox/ComboboxList.js +5 -12
- package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +71 -71
- package/dist/Dialog/Dialog.cjs +4 -7
- package/dist/Dialog/Dialog.js +30 -29
- package/dist/Field/Field.cjs +1 -1
- package/dist/Field/Field.js +7 -7
- package/dist/Field/FieldHint.cjs +1 -1
- package/dist/Field/FieldHint.js +4 -4
- package/dist/JSONInput/JSONInput.cjs +1 -1
- package/dist/JSONInput/JSONInput.js +45 -42
- package/dist/JSONInput/JSONInputContainer.cjs +5 -2
- package/dist/JSONInput/JSONInputContainer.js +6 -3
- package/dist/Layout/HeaderLayout.cjs +3 -8
- package/dist/Layout/HeaderLayout.js +38 -38
- package/dist/Main/SkipToContent.cjs +1 -2
- package/dist/Main/SkipToContent.js +1 -1
- package/dist/MainNav/MainNav.cjs +1 -6
- package/dist/MainNav/MainNav.js +15 -15
- package/dist/MainNav/NavFooter.cjs +1 -3
- package/dist/MainNav/NavFooter.js +3 -4
- package/dist/ModalLayout/ModalLayout.cjs +3 -9
- package/dist/ModalLayout/ModalLayout.js +24 -23
- package/dist/NumberInput/NumberInput.cjs +1 -1
- package/dist/NumberInput/NumberInput.js +18 -18
- package/dist/Popover/Popover.cjs +3 -3
- package/dist/Popover/Popover.js +112 -103
- package/dist/Popover/index.cjs +1 -1
- package/dist/Popover/index.js +9 -3
- package/dist/Select/Option.cjs +3 -7
- package/dist/Select/Option.js +6 -6
- package/dist/Select/Select.cjs +2 -2
- package/dist/Select/Select.js +58 -58
- package/dist/Select/SelectTags.cjs +1 -3
- package/dist/Select/SelectTags.js +4 -4
- package/dist/Select/SingleSelect.cjs +82 -0
- package/dist/Select/SingleSelect.js +285 -0
- package/dist/SimpleMenu/SimpleMenu.cjs +1 -1
- package/dist/SimpleMenu/SimpleMenu.js +10 -10
- package/dist/Stack/Stack.cjs +5 -5
- package/dist/Stack/Stack.js +7 -6
- package/dist/SubNav/SubNavHeader.cjs +1 -1
- package/dist/SubNav/SubNavHeader.js +15 -15
- package/dist/SubNav/SubNavLinkSection.cjs +2 -2
- package/dist/SubNav/SubNavLinkSection.js +6 -6
- package/dist/SubNav/SubNavSection.cjs +1 -1
- package/dist/SubNav/SubNavSection.js +12 -12
- package/dist/Table/Table.cjs +1 -3
- package/dist/Table/Table.js +2 -3
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.js +11 -11
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.js +24 -24
- package/dist/Textarea/Textarea.cjs +1 -1
- package/dist/Textarea/Textarea.js +1 -1
- package/dist/TimePicker/TimePicker.cjs +2 -2
- package/dist/TimePicker/TimePicker.js +2 -2
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +6 -6
- package/dist/ToggleCheckbox/ToggleCheckbox.js +45 -43
- package/dist/ToggleInput/ToggleInput.cjs +1 -1
- package/dist/ToggleInput/ToggleInput.js +10 -10
- package/dist/Tooltip/Tooltip.cjs +2 -3
- package/dist/Tooltip/Tooltip.js +18 -18
- package/dist/helpers/deprecations.cjs +1 -0
- package/dist/helpers/deprecations.js +13 -0
- package/dist/helpers/useId.cjs +1 -1
- package/dist/helpers/useId.js +11 -4
- package/dist/hooks/useIntersection.cjs +1 -0
- package/dist/hooks/useIntersection.js +23 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +136 -134
- package/dist/v2/MainNav/MainNav.cjs +1 -6
- package/dist/v2/MainNav/MainNav.js +15 -15
- package/dist/v2/MainNav/NavFooter.cjs +1 -3
- package/dist/v2/MainNav/NavFooter.js +3 -4
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +1 -1
- package/dist/v2/SimpleMenu/SimpleMenu.js +12 -12
- package/dist/v2/SubNav/SubNavHeader.cjs +1 -1
- package/dist/v2/SubNav/SubNavHeader.js +15 -15
- package/dist/v2/SubNav/SubNavLinkSection.cjs +4 -4
- package/dist/v2/SubNav/SubNavLinkSection.js +8 -8
- package/dist/v2/SubNav/SubNavSection.cjs +1 -1
- package/dist/v2/SubNav/SubNavSection.js +4 -4
- package/package.json +3 -4
- package/dist/helpers/genId.cjs +0 -1
- package/dist/helpers/genId.js +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
-
border: ${
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),$=require("styled-components"),c=require("../Typography/Typography.cjs"),j=require("../helpers/useId.cjs"),a=require("../Box/Box.cjs"),h=require("../Flex/Flex.cjs"),T=require("./AccordionContext.cjs"),m=r=>r&&typeof r=="object"&&"default"in r?r:{default:r},d=m($),b=({theme:r,expanded:o,variant:e,disabled:t,error:n})=>n?`1px solid ${r.colors.danger600} !important`:t?`1px solid ${r.colors.neutral150}`:o?`1px solid ${r.colors.primary600}`:e==="primary"?`1px solid ${r.colors.neutral0}`:`1px solid ${r.colors.neutral100}`,l=d.default(c.Typography)``,A=d.default(a.Box)`
|
|
2
|
+
border: ${b};
|
|
3
3
|
|
|
4
4
|
&:hover:not([aria-disabled='true']) {
|
|
5
5
|
border: 1px solid ${({theme:r})=>r.colors.primary600};
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
color: ${({theme:r,expanded:o})=>o?void 0:r.colors.primary700};
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${c.Typography} {
|
|
12
12
|
color: ${({theme:r,expanded:o})=>o?void 0:r.colors.primary600};
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
& > ${
|
|
15
|
+
& > ${h.Flex} {
|
|
16
16
|
background: ${({theme:r})=>r.colors.primary100};
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
background: ${({theme:r})=>r.colors.primary200};
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
23
|
+
`,q=({children:r,disabled:o=!1,error:e,expanded:t=!1,hasErrorMessage:n=!0,id:p,onToggle:u,toggle:y,size:x="M",variant:i="primary",shadow:g})=>{const f=j.useId(p);return s.jsxs(T.AccordionContext.Provider,{value:{expanded:t,onToggle:u,toggle:y,id:f,size:x,variant:i,disabled:o},children:[s.jsx(A,{"data-strapi-expanded":t,disabled:o,"aria-disabled":o,expanded:t,hasRadius:!0,variant:i,error:e,shadow:g,children:r}),e&&n&&s.jsx(a.Box,{paddingTop:1,children:s.jsx(c.Typography,{variant:"pi",textColor:"danger600",children:e})})]})};exports.Accordion=q;exports.AccordionTypography=l;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as x, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import e from "styled-components";
|
|
3
3
|
import { Typography as t } from "../Typography/Typography.js";
|
|
4
|
-
import { useId as
|
|
5
|
-
import { Box as
|
|
6
|
-
import { Flex as
|
|
7
|
-
import { AccordionContext as
|
|
8
|
-
const
|
|
4
|
+
import { useId as y } from "../helpers/useId.js";
|
|
5
|
+
import { Box as s } from "../Box/Box.js";
|
|
6
|
+
import { Flex as g } from "../Flex/Flex.js";
|
|
7
|
+
import { AccordionContext as b } from "./AccordionContext.js";
|
|
8
|
+
const h = ({
|
|
9
9
|
theme: r,
|
|
10
10
|
expanded: o,
|
|
11
11
|
variant: i,
|
|
12
12
|
disabled: d,
|
|
13
13
|
error: a
|
|
14
|
-
}) => a ? `1px solid ${r.colors.danger600} !important` : d ? `1px solid ${r.colors.neutral150}` : o ? `1px solid ${r.colors.primary600}` : i === "primary" ? `1px solid ${r.colors.neutral0}` : `1px solid ${r.colors.neutral100}`,
|
|
15
|
-
border: ${
|
|
14
|
+
}) => a ? `1px solid ${r.colors.danger600} !important` : d ? `1px solid ${r.colors.neutral150}` : o ? `1px solid ${r.colors.primary600}` : i === "primary" ? `1px solid ${r.colors.neutral0}` : `1px solid ${r.colors.neutral100}`, v = e(t)``, A = e(s)`
|
|
15
|
+
border: ${h};
|
|
16
16
|
|
|
17
17
|
&:hover:not([aria-disabled='true']) {
|
|
18
18
|
border: 1px solid ${({
|
|
19
19
|
theme: r
|
|
20
20
|
}) => r.colors.primary600};
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${v} {
|
|
23
23
|
color: ${({
|
|
24
24
|
theme: r,
|
|
25
25
|
expanded: o
|
|
@@ -33,7 +33,7 @@ const b = ({
|
|
|
33
33
|
}) => o ? void 0 : r.colors.primary600};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
& > ${
|
|
36
|
+
& > ${g} {
|
|
37
37
|
background: ${({
|
|
38
38
|
theme: r
|
|
39
39
|
}) => r.colors.primary100};
|
|
@@ -45,30 +45,31 @@ const b = ({
|
|
|
45
45
|
}) => r.colors.primary200};
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
`,
|
|
48
|
+
`, F = ({
|
|
49
49
|
children: r,
|
|
50
50
|
disabled: o = !1,
|
|
51
51
|
error: i,
|
|
52
52
|
expanded: d = !1,
|
|
53
53
|
hasErrorMessage: a = !0,
|
|
54
|
-
id:
|
|
55
|
-
onToggle:
|
|
54
|
+
id: l,
|
|
55
|
+
onToggle: c,
|
|
56
56
|
toggle: u,
|
|
57
57
|
size: m = "M",
|
|
58
|
-
variant: p = "primary"
|
|
58
|
+
variant: p = "primary",
|
|
59
|
+
shadow: f
|
|
59
60
|
}) => {
|
|
60
|
-
const
|
|
61
|
-
return
|
|
61
|
+
const $ = y(l);
|
|
62
|
+
return x(b.Provider, {
|
|
62
63
|
value: {
|
|
63
64
|
expanded: d,
|
|
64
|
-
onToggle:
|
|
65
|
+
onToggle: c,
|
|
65
66
|
toggle: u,
|
|
66
|
-
id:
|
|
67
|
+
id: $,
|
|
67
68
|
size: m,
|
|
68
69
|
variant: p,
|
|
69
70
|
disabled: o
|
|
70
71
|
},
|
|
71
|
-
children: [n(
|
|
72
|
+
children: [n(A, {
|
|
72
73
|
"data-strapi-expanded": d,
|
|
73
74
|
disabled: o,
|
|
74
75
|
"aria-disabled": o,
|
|
@@ -76,8 +77,9 @@ const b = ({
|
|
|
76
77
|
hasRadius: !0,
|
|
77
78
|
variant: p,
|
|
78
79
|
error: i,
|
|
80
|
+
shadow: f,
|
|
79
81
|
children: r
|
|
80
|
-
}), i && a && n(
|
|
82
|
+
}), i && a && n(s, {
|
|
81
83
|
paddingTop: 1,
|
|
82
84
|
children: n(t, {
|
|
83
85
|
variant: "pi",
|
|
@@ -88,6 +90,6 @@ const b = ({
|
|
|
88
90
|
});
|
|
89
91
|
};
|
|
90
92
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
F as Accordion,
|
|
94
|
+
v as AccordionTypography
|
|
93
95
|
};
|
package/dist/Avatar/Avatar.cjs
CHANGED
|
@@ -1,29 +1,18 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),u=require("react"),d=require("styled-components"),p=require("../Typography/Typography.cjs"),x=require("../Flex/Flex.cjs"),l=require("../Box/Box.cjs"),t=require("./constants.cjs"),h=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},i=h(d),v=i.default.img`
|
|
2
2
|
border-radius: 50%;
|
|
3
3
|
object-fit: cover;
|
|
4
4
|
display: block;
|
|
5
5
|
position: relative;
|
|
6
|
-
`,
|
|
7
|
-
position: relative;
|
|
8
|
-
width: ${t.avatarSize/16}rem;
|
|
9
|
-
height: ${t.avatarSize/16}rem;
|
|
10
|
-
z-index: ${({hovering:e})=>e?1:void 0};
|
|
11
|
-
`,x=i.default.img`
|
|
6
|
+
`,g=i.default.img`
|
|
12
7
|
border-radius: 50%;
|
|
13
8
|
object-fit: cover;
|
|
14
9
|
position: absolute;
|
|
15
10
|
transform: translate(-${(t.previewSize-t.avatarSize)/2}px, -100%);
|
|
16
11
|
margin-top: -${({theme:e})=>e.spaces[1]};
|
|
17
|
-
`,
|
|
18
|
-
z-index: 1;
|
|
19
|
-
border-radius: 30%;
|
|
20
|
-
position: absolute;
|
|
21
|
-
width: ${t.avatarSize/16}rem;
|
|
22
|
-
height: ${t.avatarSize/16}rem;
|
|
23
|
-
background: ${({theme:e})=>e.colors.neutral0};
|
|
12
|
+
`,f=i.default(l.Box)`
|
|
24
13
|
opacity: 0.4;
|
|
25
|
-
`,
|
|
14
|
+
`,y=({src:e,alt:o,preview:r})=>{const[c,n]=u.useState(!1),s=Boolean(r&&c);return a.jsxs("span",{children:[s?a.jsx(g,{"aria-hidden":!0,alt:"",width:`${t.previewSize}px`,height:`${t.previewSize}px`,src:r===!0?e:typeof r=="string"?r:""}):null,a.jsxs(l.Box,{zIndex:s?1:void 0,position:"relative",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),width:`${t.avatarSize}px`,height:`${t.avatarSize}px`,children:[s?a.jsx(f,{background:"neutral0",borderRadius:"50%",position:"absolute",width:`${t.avatarSize}px`,height:`${t.avatarSize}px`,zIndex:1}):null,a.jsx(v,{src:e,alt:o,width:`${t.avatarSize}px`,height:`${t.avatarSize}px`})]})]})},b=i.default(x.Flex)`
|
|
26
15
|
span {
|
|
27
16
|
line-height: 0;
|
|
28
17
|
}
|
|
29
|
-
`,
|
|
18
|
+
`,j=({children:e,background:o="primary600",textColor:r="buttonNeutral0"})=>a.jsx(b,{background:o,borderRadius:"50%",width:`${t.avatarSize}px`,height:`${t.avatarSize}px`,justifyContent:"center",children:a.jsx(p.Typography,{fontSize:0,fontWeight:"bold",textColor:r,textTransform:"uppercase",children:e})});exports.Avatar=y;exports.Initials=j;
|
package/dist/Avatar/Avatar.js
CHANGED
|
@@ -1,87 +1,83 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as l, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h } from "react";
|
|
3
3
|
import o from "styled-components";
|
|
4
|
-
import { Typography as
|
|
5
|
-
import { Flex as
|
|
6
|
-
import {
|
|
7
|
-
|
|
4
|
+
import { Typography as u } from "../Typography/Typography.js";
|
|
5
|
+
import { Flex as m } from "../Flex/Flex.js";
|
|
6
|
+
import { Box as d } from "../Box/Box.js";
|
|
7
|
+
import { previewSize as s, avatarSize as t } from "./constants.js";
|
|
8
|
+
const x = o.img`
|
|
8
9
|
border-radius: 50%;
|
|
9
10
|
object-fit: cover;
|
|
10
11
|
display: block;
|
|
11
12
|
position: relative;
|
|
12
|
-
`, u = o.div`
|
|
13
|
-
position: relative;
|
|
14
|
-
width: ${e / 16}rem;
|
|
15
|
-
height: ${e / 16}rem;
|
|
16
|
-
z-index: ${({
|
|
17
|
-
hovering: t
|
|
18
|
-
}) => t ? 1 : void 0};
|
|
19
13
|
`, f = o.img`
|
|
20
14
|
border-radius: 50%;
|
|
21
15
|
object-fit: cover;
|
|
22
16
|
position: absolute;
|
|
23
|
-
transform: translate(-${(s -
|
|
17
|
+
transform: translate(-${(s - t) / 2}px, -100%);
|
|
24
18
|
margin-top: -${({
|
|
25
|
-
theme:
|
|
26
|
-
}) =>
|
|
27
|
-
`, g = o
|
|
28
|
-
z-index: 1;
|
|
29
|
-
border-radius: 30%;
|
|
30
|
-
position: absolute;
|
|
31
|
-
width: ${e / 16}rem;
|
|
32
|
-
height: ${e / 16}rem;
|
|
33
|
-
background: ${({
|
|
34
|
-
theme: t
|
|
35
|
-
}) => t.colors.neutral0};
|
|
19
|
+
theme: e
|
|
20
|
+
}) => e.spaces[1]};
|
|
21
|
+
`, g = o(d)`
|
|
36
22
|
opacity: 0.4;
|
|
37
|
-
`,
|
|
38
|
-
src:
|
|
23
|
+
`, S = ({
|
|
24
|
+
src: e,
|
|
39
25
|
alt: n,
|
|
40
26
|
preview: r
|
|
41
27
|
}) => {
|
|
42
|
-
const [
|
|
43
|
-
return
|
|
44
|
-
children: [
|
|
28
|
+
const [c, p] = h(!1), a = Boolean(r && c);
|
|
29
|
+
return l("span", {
|
|
30
|
+
children: [a ? i(f, {
|
|
45
31
|
"aria-hidden": !0,
|
|
46
32
|
alt: "",
|
|
47
33
|
width: `${s}px`,
|
|
48
34
|
height: `${s}px`,
|
|
49
|
-
src: r === !0 ?
|
|
50
|
-
}) : null,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
35
|
+
src: r === !0 ? e : typeof r == "string" ? r : ""
|
|
36
|
+
}) : null, l(d, {
|
|
37
|
+
zIndex: a ? 1 : void 0,
|
|
38
|
+
position: "relative",
|
|
39
|
+
onMouseEnter: () => p(!0),
|
|
40
|
+
onMouseLeave: () => p(!1),
|
|
41
|
+
width: `${t}px`,
|
|
42
|
+
height: `${t}px`,
|
|
43
|
+
children: [a ? i(g, {
|
|
44
|
+
background: "neutral0",
|
|
45
|
+
borderRadius: "50%",
|
|
46
|
+
position: "absolute",
|
|
47
|
+
width: `${t}px`,
|
|
48
|
+
height: `${t}px`,
|
|
49
|
+
zIndex: 1
|
|
50
|
+
}) : null, i(x, {
|
|
51
|
+
src: e,
|
|
56
52
|
alt: n,
|
|
57
|
-
width: `${
|
|
58
|
-
height: `${
|
|
53
|
+
width: `${t}px`,
|
|
54
|
+
height: `${t}px`
|
|
59
55
|
})]
|
|
60
56
|
})]
|
|
61
57
|
});
|
|
62
|
-
}, b = o(
|
|
58
|
+
}, b = o(m)`
|
|
63
59
|
span {
|
|
64
60
|
line-height: 0;
|
|
65
61
|
}
|
|
66
|
-
`,
|
|
67
|
-
children:
|
|
62
|
+
`, k = ({
|
|
63
|
+
children: e,
|
|
68
64
|
background: n = "primary600",
|
|
69
65
|
textColor: r = "buttonNeutral0"
|
|
70
66
|
}) => i(b, {
|
|
71
67
|
background: n,
|
|
72
68
|
borderRadius: "50%",
|
|
73
|
-
width: `${
|
|
74
|
-
height: `${
|
|
69
|
+
width: `${t}px`,
|
|
70
|
+
height: `${t}px`,
|
|
75
71
|
justifyContent: "center",
|
|
76
|
-
children: i(
|
|
72
|
+
children: i(u, {
|
|
77
73
|
fontSize: 0,
|
|
78
74
|
fontWeight: "bold",
|
|
79
75
|
textColor: r,
|
|
80
76
|
textTransform: "uppercase",
|
|
81
|
-
children:
|
|
77
|
+
children: e
|
|
82
78
|
})
|
|
83
79
|
});
|
|
84
80
|
export {
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
S as Avatar,
|
|
82
|
+
k as Initials
|
|
87
83
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("react/jsx-runtime"),r=require("react"),g=require("styled-components"),y=require("../helpers/useId.cjs"),R=require("./context.cjs"),t=require("./utils.cjs"),d=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},m=d(r),h=d(g),x=h.default.input`
|
|
2
2
|
margin: 0;
|
|
3
3
|
padding: 0;
|
|
4
4
|
background-color: ${({theme:e})=>e.colors.neutral0};
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
border: 1px solid ${({theme:e})=>e.colors.neutral300};
|
|
29
29
|
background: ${({theme:e})=>e.colors.neutral200};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,a=m.default.forwardRef(({value:e,disabled:n=!1,...i},c)=>{const s=y.useId(),{onChange:l,selected:u,name:p,size:f}=r.useContext(R.RadioContext),o=u===e;return b.jsx(x,{ref:c,type:"radio",name:p,value:e,tabIndex:o?0:-1,"aria-checked":o,checked:o,disabled:n,id:s,size:f,onChange:l,...i})});a.displayName="Radio";exports.BaseRadio=a;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import u, { useContext as b } from "react";
|
|
3
|
+
import g from "styled-components";
|
|
4
|
+
import { useId as h } from "../helpers/useId.js";
|
|
5
|
+
import { RadioContext as $ } from "./context.js";
|
|
6
|
+
import { getRadioSize as r, getSelectedRadioSize as t, getSelectedRadioPosition as d } from "./utils.js";
|
|
7
|
+
const y = g.input`
|
|
7
8
|
margin: 0;
|
|
8
9
|
padding: 0;
|
|
9
10
|
background-color: ${({
|
|
@@ -33,8 +34,8 @@ const h = b.input`
|
|
|
33
34
|
width: ${({
|
|
34
35
|
size: e
|
|
35
36
|
}) => typeof e == "number" ? e : t(e)};
|
|
36
|
-
left: ${
|
|
37
|
-
top: ${
|
|
37
|
+
left: ${d};
|
|
38
|
+
top: ${d};
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
&:checked:after {
|
|
@@ -51,32 +52,33 @@ const h = b.input`
|
|
|
51
52
|
theme: e
|
|
52
53
|
}) => e.colors.neutral200};
|
|
53
54
|
}
|
|
54
|
-
`,
|
|
55
|
+
`, R = u.forwardRef(({
|
|
55
56
|
value: e,
|
|
56
|
-
disabled:
|
|
57
|
+
disabled: a = !1,
|
|
57
58
|
...n
|
|
58
59
|
}, i) => {
|
|
59
|
-
const {
|
|
60
|
-
onChange:
|
|
61
|
-
selected:
|
|
62
|
-
name:
|
|
63
|
-
size:
|
|
64
|
-
} =
|
|
65
|
-
return
|
|
60
|
+
const c = h(), {
|
|
61
|
+
onChange: l,
|
|
62
|
+
selected: p,
|
|
63
|
+
name: m,
|
|
64
|
+
size: s
|
|
65
|
+
} = b($), o = p === e;
|
|
66
|
+
return f(y, {
|
|
66
67
|
ref: i,
|
|
67
68
|
type: "radio",
|
|
68
|
-
name:
|
|
69
|
+
name: m,
|
|
69
70
|
value: e,
|
|
70
71
|
tabIndex: o ? 0 : -1,
|
|
71
72
|
"aria-checked": o,
|
|
72
73
|
checked: o,
|
|
73
|
-
disabled:
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
disabled: a,
|
|
75
|
+
id: c,
|
|
76
|
+
size: s,
|
|
77
|
+
onChange: l,
|
|
76
78
|
...n
|
|
77
79
|
});
|
|
78
80
|
});
|
|
79
|
-
|
|
81
|
+
R.displayName = "Radio";
|
|
80
82
|
export {
|
|
81
|
-
|
|
83
|
+
R as BaseRadio
|
|
82
84
|
};
|
package/dist/Box/Box.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("styled-components"),o=require("../helpers/handleResponsiveValues.cjs"),r=require("../helpers/theme.cjs"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},d=a(i),l={color:!0,cursor:!0,height:!0,width:!0},m=d.default.div.withConfig({shouldForwardProp:(e,t)=>!l[e]&&t(e)})`
|
|
2
2
|
// Font
|
|
3
3
|
font-size: ${({fontSize:e,theme:t})=>r.extractStyleFromTheme(t.fontSizes,e,e)};
|
|
4
4
|
|
package/dist/Box/Box.js
CHANGED
|
@@ -1,64 +1,67 @@
|
|
|
1
1
|
import d from "styled-components";
|
|
2
|
-
import
|
|
3
|
-
import { extractStyleFromTheme as
|
|
4
|
-
const
|
|
5
|
-
color: !0
|
|
2
|
+
import s from "../helpers/handleResponsiveValues.js";
|
|
3
|
+
import { extractStyleFromTheme as r } from "../helpers/theme.js";
|
|
4
|
+
const t = {
|
|
5
|
+
color: !0,
|
|
6
|
+
cursor: !0,
|
|
7
|
+
height: !0,
|
|
8
|
+
width: !0
|
|
6
9
|
}, l = d.div.withConfig({
|
|
7
|
-
shouldForwardProp: (e, o) =>
|
|
10
|
+
shouldForwardProp: (e, o) => !t[e] && o(e)
|
|
8
11
|
})`
|
|
9
12
|
// Font
|
|
10
13
|
font-size: ${({
|
|
11
14
|
fontSize: e,
|
|
12
15
|
theme: o
|
|
13
|
-
}) =>
|
|
16
|
+
}) => r(o.fontSizes, e, e)};
|
|
14
17
|
|
|
15
18
|
// Colors
|
|
16
19
|
background: ${({
|
|
17
20
|
theme: e,
|
|
18
21
|
background: o
|
|
19
|
-
}) =>
|
|
22
|
+
}) => r(e.colors, o, void 0)};
|
|
20
23
|
color: ${({
|
|
21
24
|
theme: e,
|
|
22
25
|
color: o
|
|
23
|
-
}) =>
|
|
26
|
+
}) => r(e.colors, o, void 0)};
|
|
24
27
|
|
|
25
28
|
// Spaces
|
|
26
29
|
${({
|
|
27
30
|
theme: e,
|
|
28
31
|
padding: o
|
|
29
|
-
}) =>
|
|
32
|
+
}) => s("padding", o, e)}
|
|
30
33
|
${({
|
|
31
34
|
theme: e,
|
|
32
35
|
paddingTop: o
|
|
33
|
-
}) =>
|
|
36
|
+
}) => s("padding-top", o, e)}
|
|
34
37
|
${({
|
|
35
38
|
theme: e,
|
|
36
39
|
paddingRight: o
|
|
37
|
-
}) =>
|
|
40
|
+
}) => s("padding-right", o, e)}
|
|
38
41
|
${({
|
|
39
42
|
theme: e,
|
|
40
43
|
paddingBottom: o
|
|
41
|
-
}) =>
|
|
44
|
+
}) => s("padding-bottom", o, e)}
|
|
42
45
|
${({
|
|
43
46
|
theme: e,
|
|
44
47
|
paddingLeft: o
|
|
45
|
-
}) =>
|
|
48
|
+
}) => s("padding-left", o, e)}
|
|
46
49
|
${({
|
|
47
50
|
theme: e,
|
|
48
51
|
marginLeft: o
|
|
49
|
-
}) =>
|
|
52
|
+
}) => s("margin-left", o, e)}
|
|
50
53
|
${({
|
|
51
54
|
theme: e,
|
|
52
55
|
marginRight: o
|
|
53
|
-
}) =>
|
|
56
|
+
}) => s("margin-right", o, e)}
|
|
54
57
|
${({
|
|
55
58
|
theme: e,
|
|
56
59
|
marginTop: o
|
|
57
|
-
}) =>
|
|
60
|
+
}) => s("margin-top", o, e)}
|
|
58
61
|
${({
|
|
59
62
|
theme: e,
|
|
60
63
|
marginBottom: o
|
|
61
|
-
}) =>
|
|
64
|
+
}) => s("margin-bottom", o, e)}
|
|
62
65
|
|
|
63
66
|
// Responsive hiding
|
|
64
67
|
${({
|
|
@@ -75,8 +78,8 @@ const $ = {
|
|
|
75
78
|
border-radius: ${({
|
|
76
79
|
theme: e,
|
|
77
80
|
hasRadius: o,
|
|
78
|
-
borderRadius:
|
|
79
|
-
}) => o ? e.borderRadius :
|
|
81
|
+
borderRadius: i
|
|
82
|
+
}) => o ? e.borderRadius : i};
|
|
80
83
|
border-style: ${({
|
|
81
84
|
borderStyle: e
|
|
82
85
|
}) => e};
|
|
@@ -86,14 +89,14 @@ const $ = {
|
|
|
86
89
|
border-color: ${({
|
|
87
90
|
borderColor: e,
|
|
88
91
|
theme: o
|
|
89
|
-
}) =>
|
|
92
|
+
}) => r(o.colors, e, void 0)};
|
|
90
93
|
border: ${({
|
|
91
94
|
theme: e,
|
|
92
95
|
borderColor: o,
|
|
93
|
-
borderStyle:
|
|
96
|
+
borderStyle: i,
|
|
94
97
|
borderWidth: n
|
|
95
98
|
}) => {
|
|
96
|
-
if (o && !
|
|
99
|
+
if (o && !i && !n)
|
|
97
100
|
return `1px solid ${e.colors[o]}`;
|
|
98
101
|
}};
|
|
99
102
|
|
|
@@ -101,7 +104,7 @@ const $ = {
|
|
|
101
104
|
box-shadow: ${({
|
|
102
105
|
theme: e,
|
|
103
106
|
shadow: o
|
|
104
|
-
}) =>
|
|
107
|
+
}) => r(e.shadows, o, void 0)};
|
|
105
108
|
|
|
106
109
|
// Handlers
|
|
107
110
|
pointer-events: ${({
|
|
@@ -126,19 +129,19 @@ const $ = {
|
|
|
126
129
|
left: ${({
|
|
127
130
|
left: e,
|
|
128
131
|
theme: o
|
|
129
|
-
}) =>
|
|
132
|
+
}) => r(o.spaces, e, e)};
|
|
130
133
|
right: ${({
|
|
131
134
|
right: e,
|
|
132
135
|
theme: o
|
|
133
|
-
}) =>
|
|
136
|
+
}) => r(o.spaces, e, e)};
|
|
134
137
|
top: ${({
|
|
135
138
|
top: e,
|
|
136
139
|
theme: o
|
|
137
|
-
}) =>
|
|
140
|
+
}) => r(o.spaces, e, e)};
|
|
138
141
|
bottom: ${({
|
|
139
142
|
bottom: e,
|
|
140
143
|
theme: o
|
|
141
|
-
}) =>
|
|
144
|
+
}) => r(o.spaces, e, e)};
|
|
142
145
|
z-index: ${({
|
|
143
146
|
zIndex: e
|
|
144
147
|
}) => e};
|
|
@@ -150,27 +153,27 @@ const $ = {
|
|
|
150
153
|
width: ${({
|
|
151
154
|
width: e,
|
|
152
155
|
theme: o
|
|
153
|
-
}) =>
|
|
156
|
+
}) => r(o.spaces, e, e)};
|
|
154
157
|
max-width: ${({
|
|
155
158
|
maxWidth: e,
|
|
156
159
|
theme: o
|
|
157
|
-
}) =>
|
|
160
|
+
}) => r(o.spaces, e, e)};
|
|
158
161
|
min-width: ${({
|
|
159
162
|
minWidth: e,
|
|
160
163
|
theme: o
|
|
161
|
-
}) =>
|
|
164
|
+
}) => r(o.spaces, e, e)};
|
|
162
165
|
height: ${({
|
|
163
166
|
height: e,
|
|
164
167
|
theme: o
|
|
165
|
-
}) =>
|
|
168
|
+
}) => r(o.spaces, e, e)};
|
|
166
169
|
max-height: ${({
|
|
167
170
|
maxHeight: e,
|
|
168
171
|
theme: o
|
|
169
|
-
}) =>
|
|
172
|
+
}) => r(o.spaces, e, e)};
|
|
170
173
|
min-height: ${({
|
|
171
174
|
minHeight: e,
|
|
172
175
|
theme: o
|
|
173
|
-
}) =>
|
|
176
|
+
}) => r(o.spaces, e, e)};
|
|
174
177
|
|
|
175
178
|
// Animation
|
|
176
179
|
transition: ${({
|
package/dist/Card/Card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),d=require("../Box/Box.cjs"),s=require("../helpers/useId.cjs"),a=require("./CardContext.cjs"),u=({id:e,...o})=>{const r=s.useId(e);return t.jsx(a.CardContext.Provider,{value:{id:r},children:t.jsx(d.Box,{id:e,tabIndex:0,hasRadius:!0,background:"neutral0",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",shadow:"tableShadow",as:"article","aria-labelledby":`${r}-title`,...o})})};exports.Card=u;
|
package/dist/Card/Card.js
CHANGED
package/dist/Card/CardHeader.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),r=require("styled-components"),o=require("../Flex/Flex.cjs"),s=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=s(r),n=l.default(o.Flex)`
|
|
2
|
-
position: relative;
|
|
3
2
|
border-bottom: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
4
|
-
`,a=e=>t.jsx(n,{justifyContent:"center",...e});exports.CardHeader=a;
|
|
3
|
+
`,a=e=>t.jsx(n,{position:"relative",justifyContent:"center",...e});exports.CardHeader=a;
|
package/dist/Card/CardHeader.js
CHANGED
|
@@ -2,11 +2,11 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import t from "styled-components";
|
|
3
3
|
import { Flex as e } from "../Flex/Flex.js";
|
|
4
4
|
const i = t(e)`
|
|
5
|
-
position: relative;
|
|
6
5
|
border-bottom: 1px solid ${({
|
|
7
6
|
theme: r
|
|
8
7
|
}) => r.colors.neutral150};
|
|
9
8
|
`, a = (r) => o(i, {
|
|
9
|
+
position: "relative",
|
|
10
10
|
justifyContent: "center",
|
|
11
11
|
...r
|
|
12
12
|
});
|
package/dist/Card/CardTimer.cjs
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
-
position: absolute;
|
|
3
|
-
bottom: ${({theme:e})=>e.spaces[1]};
|
|
4
|
-
right: ${({theme:e})=>e.spaces[1]};
|
|
5
|
-
`,c=({children:e,...r})=>t.jsx(u,{padding:1,background:"neutral800",color:"neutral0",as:"time",hasRadius:!0,...r,children:t.jsx(s.Typography,{variant:"pi",textColor:"neutral0",children:e})});exports.CardTimer=c;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),t=require("../Box/Box.cjs"),a=require("../Typography/Typography.cjs"),i=({children:r,...o})=>e.jsx(t.Box,{as:"time",background:"neutral800",bottom:1,right:1,color:"neutral0",hasRadius:!0,position:"absolute",padding:1,...o,children:e.jsx(a.Typography,{variant:"pi",textColor:"neutral0",children:r})});exports.CardTimer=i;
|