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