@strapi/design-system 1.7.6 → 1.7.8

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 (143) hide show
  1. package/dist/BaseButton/BaseButton.cjs +3 -3
  2. package/dist/BaseButton/BaseButton.js +5 -5
  3. package/dist/Box/Box.cjs +2 -2
  4. package/dist/Box/Box.js +1 -1
  5. package/dist/CarouselInput/Carousel.cjs +6 -7
  6. package/dist/CarouselInput/Carousel.js +25 -79
  7. package/dist/CarouselInput/CarouselActions.cjs +1 -1
  8. package/dist/CarouselInput/CarouselActions.js +1 -14
  9. package/dist/CarouselInput/CarouselImage.cjs +3 -4
  10. package/dist/CarouselInput/CarouselImage.js +13 -23
  11. package/dist/CarouselInput/CarouselInput.cjs +1 -1
  12. package/dist/CarouselInput/CarouselInput.js +12 -75
  13. package/dist/CarouselInput/CarouselSlide.cjs +1 -3
  14. package/dist/CarouselInput/CarouselSlide.js +4 -29
  15. package/dist/Checkbox/Checkbox.cjs +3 -3
  16. package/dist/Checkbox/Checkbox.js +18 -40
  17. package/dist/Dialog/Dialog.cjs +5 -5
  18. package/dist/Dialog/Dialog.js +21 -49
  19. package/dist/Dialog/DialogBody.cjs +2 -2
  20. package/dist/Dialog/DialogBody.js +6 -19
  21. package/dist/Dialog/DialogFooter.cjs +2 -2
  22. package/dist/Dialog/DialogFooter.js +7 -21
  23. package/dist/Grid/Grid.cjs +3 -3
  24. package/dist/Grid/Grid.js +8 -22
  25. package/dist/Grid/GridItem.cjs +2 -2
  26. package/dist/Grid/GridItem.js +10 -27
  27. package/dist/Layout/ActionLayout.cjs +1 -9
  28. package/dist/Layout/ActionLayout.js +4 -27
  29. package/dist/Layout/ContentLayout.cjs +1 -1
  30. package/dist/Layout/ContentLayout.js +4 -9
  31. package/dist/Layout/GridLayout.cjs +3 -3
  32. package/dist/Layout/GridLayout.js +4 -8
  33. package/dist/Layout/HeaderLayout.cjs +4 -4
  34. package/dist/Layout/HeaderLayout.js +25 -120
  35. package/dist/Layout/Layout.cjs +4 -4
  36. package/dist/Layout/Layout.js +7 -19
  37. package/dist/Layout/TwoColsLayout.cjs +1 -1
  38. package/dist/Layout/TwoColsLayout.js +6 -15
  39. package/dist/ModalLayout/ModalBody.cjs +2 -2
  40. package/dist/ModalLayout/ModalBody.js +4 -5
  41. package/dist/ModalLayout/ModalContext.cjs +1 -1
  42. package/dist/ModalLayout/ModalContext.js +2 -1
  43. package/dist/ModalLayout/ModalFooter.cjs +2 -6
  44. package/dist/ModalLayout/ModalFooter.js +9 -26
  45. package/dist/ModalLayout/ModalHeader.cjs +2 -2
  46. package/dist/ModalLayout/ModalHeader.js +10 -22
  47. package/dist/ModalLayout/ModalLayout.cjs +3 -5
  48. package/dist/ModalLayout/ModalLayout.js +10 -30
  49. package/dist/NumberInput/NumberInput.cjs +2 -2
  50. package/dist/NumberInput/NumberInput.js +68 -168
  51. package/dist/Pagination/Pagination.cjs +1 -5
  52. package/dist/Pagination/Pagination.js +7 -21
  53. package/dist/Pagination/components.cjs +7 -10
  54. package/dist/Pagination/components.js +34 -81
  55. package/dist/Popover/Popover.cjs +3 -3
  56. package/dist/Popover/Popover.js +67 -66
  57. package/dist/ProgressBar/ProgressBar.cjs +5 -5
  58. package/dist/ProgressBar/ProgressBar.js +6 -37
  59. package/dist/Radio/Radio.cjs +1 -4
  60. package/dist/Radio/Radio.js +5 -18
  61. package/dist/Searchbar/SearchForm.cjs +1 -1
  62. package/dist/Searchbar/SearchForm.js +2 -3
  63. package/dist/Searchbar/Searchbar.cjs +10 -11
  64. package/dist/Searchbar/Searchbar.js +25 -54
  65. package/dist/Status/Status.cjs +6 -6
  66. package/dist/Status/Status.js +8 -46
  67. package/dist/Switch/Switch.cjs +5 -5
  68. package/dist/Switch/Switch.js +16 -52
  69. package/dist/Table/Cell.cjs +3 -3
  70. package/dist/Table/Cell.js +10 -23
  71. package/dist/Table/TFooter.cjs +3 -3
  72. package/dist/Table/TFooter.js +8 -20
  73. package/dist/Table/Table.cjs +12 -12
  74. package/dist/Table/Table.js +19 -31
  75. package/dist/Table/Tbody.cjs +2 -2
  76. package/dist/Table/Tbody.js +4 -5
  77. package/dist/Table/Thead.cjs +2 -2
  78. package/dist/Table/Thead.js +6 -7
  79. package/dist/Table/Tr.cjs +1 -1
  80. package/dist/Table/Tr.js +3 -4
  81. package/dist/Tabs/TabGroup.cjs +1 -1
  82. package/dist/Tabs/TabGroup.js +13 -37
  83. package/dist/Tabs/TabPanels.cjs +1 -1
  84. package/dist/Tabs/TabPanels.js +11 -22
  85. package/dist/Tabs/Tabs.cjs +2 -2
  86. package/dist/Tabs/Tabs.js +55 -110
  87. package/dist/Tabs/TabsContext.cjs +1 -1
  88. package/dist/Tabs/TabsContext.js +11 -4
  89. package/dist/Textarea/Textarea.cjs +14 -12
  90. package/dist/Textarea/Textarea.js +33 -55
  91. package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
  92. package/dist/ToggleCheckbox/ToggleCheckbox.js +25 -121
  93. package/dist/ToggleInput/ToggleInput.cjs +3 -3
  94. package/dist/ToggleInput/ToggleInput.js +17 -70
  95. package/dist/Typography/Typography.cjs +1 -1
  96. package/dist/Typography/Typography.js +6 -6
  97. package/dist/hooks/useControllableState.cjs +1 -1
  98. package/dist/hooks/useControllableState.js +6 -6
  99. package/dist/themes/utils.cjs +2 -2
  100. package/dist/themes/utils.js +1 -1
  101. package/dist/v2/MainNav/MainNav.cjs +2 -2
  102. package/dist/v2/MainNav/MainNav.js +9 -31
  103. package/dist/v2/MainNav/MainNavContext.cjs +1 -1
  104. package/dist/v2/MainNav/MainNavContext.js +1 -1
  105. package/dist/v2/MainNav/NavBrand.cjs +3 -3
  106. package/dist/v2/MainNav/NavBrand.js +13 -36
  107. package/dist/v2/MainNav/NavCondense.cjs +2 -5
  108. package/dist/v2/MainNav/NavCondense.js +15 -22
  109. package/dist/v2/MainNav/NavFooter.cjs +1 -1
  110. package/dist/v2/MainNav/NavFooter.js +4 -10
  111. package/dist/v2/MainNav/NavLink.cjs +10 -10
  112. package/dist/v2/MainNav/NavLink.js +18 -39
  113. package/dist/v2/MainNav/NavSection.cjs +1 -1
  114. package/dist/v2/MainNav/NavSection.js +8 -42
  115. package/dist/v2/MainNav/NavSections.cjs +2 -2
  116. package/dist/v2/MainNav/NavSections.js +8 -22
  117. package/dist/v2/MainNav/NavUser.cjs +2 -2
  118. package/dist/v2/MainNav/NavUser.js +13 -27
  119. package/dist/v2/Pagination/Pagination.cjs +1 -5
  120. package/dist/v2/Pagination/Pagination.js +7 -21
  121. package/dist/v2/Pagination/components.cjs +7 -10
  122. package/dist/v2/Pagination/components.js +32 -65
  123. package/dist/v2/SubNav/SubNav.cjs +5 -5
  124. package/dist/v2/SubNav/SubNav.js +8 -13
  125. package/dist/v2/SubNav/SubNavHeader.cjs +3 -3
  126. package/dist/v2/SubNav/SubNavHeader.js +30 -77
  127. package/dist/v2/SubNav/SubNavLink.cjs +5 -5
  128. package/dist/v2/SubNav/SubNavLink.js +13 -47
  129. package/dist/v2/SubNav/SubNavLinkSection.cjs +4 -4
  130. package/dist/v2/SubNav/SubNavLinkSection.js +19 -34
  131. package/dist/v2/SubNav/SubNavSection.cjs +2 -2
  132. package/dist/v2/SubNav/SubNavSection.js +16 -55
  133. package/dist/v2/SubNav/SubNavSectionLabel.cjs +3 -3
  134. package/dist/v2/SubNav/SubNavSectionLabel.js +10 -38
  135. package/dist/v2/SubNav/SubNavSections.cjs +1 -1
  136. package/dist/v2/SubNav/SubNavSections.js +4 -18
  137. package/package.json +4 -4
  138. package/dist/Grid/GridContext.cjs +0 -1
  139. package/dist/Grid/GridContext.js +0 -6
  140. package/dist/Tabs/useTabsFocus.cjs +0 -1
  141. package/dist/Tabs/useTabsFocus.js +0 -17
  142. package/dist/Textarea/TextareaInput.cjs +0 -30
  143. package/dist/Textarea/TextareaInput.js +0 -65
@@ -1,32 +1,30 @@
1
- import { jsxs as c, jsx as l } from "react/jsx-runtime";
2
- import L from "react";
3
- import t from "prop-types";
4
- import a from "styled-components";
5
- import { sizes as j } from "../themes/sizes.js";
6
- import { inputFocusStyle as q } from "../themes/utils.js";
7
- import { Box as z } from "../Box/Box.js";
1
+ import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
+ import R from "react";
3
+ import i from "styled-components";
4
+ import { inputFocusStyle as T } from "../themes/utils.js";
5
+ import { Box as L } from "../Box/Box.js";
8
6
  import { Flex as W } from "../Flex/Flex.js";
9
- import { useField as S } from "../Field/FieldContext.js";
10
- import { VisuallyHidden as B } from "../VisuallyHidden/VisuallyHidden.js";
7
+ import { useField as j } from "../Field/FieldContext.js";
8
+ import { VisuallyHidden as z } from "../VisuallyHidden/VisuallyHidden.js";
11
9
  import { Typography as h } from "../Typography/Typography.js";
12
- const F = a.label`
10
+ const B = i.label`
13
11
  position: relative;
14
12
  display: inline-block;
15
13
  z-index: 0;
16
14
  width: 100%;
17
- `, I = a(z)`
15
+ `, S = i(L)`
18
16
  cursor: ${({ disabled: e }) => e ? "not-allowed" : void 0};
19
17
  // Masks the background of each value
20
18
  overflow: hidden;
21
19
  flex-wrap: wrap;
22
20
 
23
- ${q()}
24
- `, g = a(W).attrs({
21
+ ${T()}
22
+ `, g = i(W).attrs({
25
23
  hasRadius: !0
26
24
  })`
27
- background-color: ${({ theme: e, checked: n, disabled: i }) => n ? i ? e.colors.neutral200 : e.colors.neutral0 : "transparent"};
25
+ background-color: ${({ theme: e, checked: o, disabled: n }) => o ? n ? e.colors.neutral200 : e.colors.neutral0 : "transparent"};
28
26
  border: 1px solid
29
- ${({ theme: e, checked: n, disabled: i }) => n && n !== null ? i ? e.colors.neutral300 : e.colors.neutral200 : i ? e.colors.neutral150 : e.colors.neutral100};
27
+ ${({ theme: e, checked: o, disabled: n }) => o && o !== null ? n ? e.colors.neutral300 : e.colors.neutral200 : n ? e.colors.neutral150 : e.colors.neutral100};
30
28
  position: relative;
31
29
  user-select: none;
32
30
  z-index: 2;
@@ -38,7 +36,7 @@ const F = a.label`
38
36
  */
39
37
  padding-top: ${({ size: e }) => `${e === "S" ? "2px" : "6px"}`};
40
38
  padding-bottom: ${({ size: e }) => `${e === "S" ? "2px" : "6px"}`};
41
- `, M = a.input`
39
+ `, F = i.input`
42
40
  height: 100%;
43
41
  left: 0;
44
42
  opacity: 0;
@@ -46,110 +44,16 @@ const F = a.label`
46
44
  top: 0;
47
45
  z-index: 1;
48
46
  width: 100%;
49
- `, u = L.forwardRef(
50
- ({ size: e, onLabel: n, offLabel: i, children: b, checked: r, disabled: o, onChange: x, ...m }, y) => {
51
- const { error: C, hint: w, id: d, name: v, required: $ } = S(), f = "neutral600";
52
- let k = !r && r !== null ? "danger700" : f, R = r ? "primary600" : f;
53
- const T = (p) => {
54
- o || x(p);
55
- };
56
- let s;
57
- return C ? s = `${d}-error` : w && (s = `${d}-hint`), /* @__PURE__ */ c(F, { children: [
58
- /* @__PURE__ */ l(B, { children: b }),
59
- /* @__PURE__ */ c(
60
- I,
61
- {
62
- hasRadius: !0,
63
- disabled: o,
64
- padding: 1,
65
- display: "flex",
66
- background: o ? "neutral150" : "neutral100",
67
- borderStyle: "solid",
68
- borderWidth: "1px",
69
- borderColor: "neutral200",
70
- children: [
71
- /* @__PURE__ */ l(
72
- g,
73
- {
74
- size: e,
75
- paddingLeft: 3,
76
- paddingRight: 3,
77
- justifyContent: "center",
78
- alignItems: "center",
79
- "aria-hidden": !0,
80
- checked: r === null ? !1 : !r,
81
- disabled: o,
82
- children: /* @__PURE__ */ l(
83
- h,
84
- {
85
- variant: "pi",
86
- fontWeight: "bold",
87
- textTransform: "uppercase",
88
- textColor: o ? "neutral700" : k,
89
- children: i
90
- }
91
- )
92
- }
93
- ),
94
- /* @__PURE__ */ l(
95
- g,
96
- {
97
- size: e,
98
- paddingLeft: 3,
99
- paddingRight: 3,
100
- justifyContent: "center",
101
- alignItems: "center",
102
- "aria-hidden": !0,
103
- checked: r === null ? !1 : r,
104
- disabled: o,
105
- children: /* @__PURE__ */ l(
106
- h,
107
- {
108
- variant: "pi",
109
- fontWeight: "bold",
110
- textTransform: "uppercase",
111
- textColor: o ? "neutral700" : R,
112
- children: n
113
- }
114
- )
115
- }
116
- ),
117
- /* @__PURE__ */ l(
118
- M,
119
- {
120
- type: "checkbox",
121
- "aria-disabled": o,
122
- "aria-describedby": s,
123
- onChange: (p) => T(p),
124
- name: v,
125
- ref: y,
126
- "aria-required": $,
127
- ...m,
128
- checked: !(r === null || !r)
129
- }
130
- )
131
- ]
132
- }
133
- )
134
- ] });
135
- }
136
- );
137
- u.displayName = "ToggleCheckbox";
138
- u.defaultProps = {
139
- disabled: !1,
140
- checked: !1,
141
- onChange: void 0,
142
- size: "M"
143
- };
144
- u.propTypes = {
145
- checked: t.bool,
146
- children: t.string.isRequired,
147
- disabled: t.bool,
148
- offLabel: t.string.isRequired,
149
- onChange: t.func,
150
- onLabel: t.string.isRequired,
151
- size: t.oneOf(Object.keys(j.input))
152
- };
47
+ `, I = R.forwardRef(({ size: e = "M", onLabel: o, offLabel: n, children: x, checked: r = !1, disabled: t = !1, onChange: s, ...b }, m) => {
48
+ const { error: d, hint: y, id: p, name: w, required: C } = j(), f = "neutral600";
49
+ let $ = !r && r !== null ? "danger700" : f, v = r ? "primary600" : f;
50
+ const k = (u) => {
51
+ t || s && s(u);
52
+ };
53
+ let l;
54
+ return d ? l = `${p}-error` : y && (l = `${p}-hint`), c(B, { children: [a(z, { children: x }), c(S, { hasRadius: !0, disabled: t, padding: 1, display: "flex", background: t ? "neutral150" : "neutral100", borderStyle: "solid", borderWidth: "1px", borderColor: "neutral200", hasError: !!d, children: [a(g, { size: e, paddingLeft: 3, paddingRight: 3, justifyContent: "center", alignItems: "center", "aria-hidden": !0, checked: r === null ? !1 : !r, disabled: t, children: a(h, { variant: "pi", fontWeight: "bold", textTransform: "uppercase", textColor: t ? "neutral700" : $, children: n }) }), a(g, { size: e, paddingLeft: 3, paddingRight: 3, justifyContent: "center", alignItems: "center", "aria-hidden": !0, checked: r === null ? !1 : r, disabled: t, children: a(h, { variant: "pi", fontWeight: "bold", textTransform: "uppercase", textColor: t ? "neutral700" : v, children: o }) }), a(F, { type: "checkbox", "aria-disabled": t, "aria-describedby": l, onChange: (u) => k(u), name: w, ref: m, "aria-required": C, ...b, checked: !(r === null || !r) })] })] });
55
+ });
56
+ I.displayName = "ToggleCheckbox";
153
57
  export {
154
- u as ToggleCheckbox
58
+ I as ToggleCheckbox
155
59
  };
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("react");const T=require("prop-types"),j=require("styled-components"),y=require("../hooks/useId.cjs"),m=require("../themes/sizes.cjs"),v=require("../ToggleCheckbox/ToggleCheckbox.cjs"),I=require("../Field/Field.cjs"),_=require("../TextButton/TextButton.cjs"),u=require("../Flex/Flex.cjs"),k=require("../Field/FieldLabel.cjs"),C=require("../Field/FieldHint.cjs"),O=require("../Field/FieldError.cjs"),a=l=>l&&l.__esModule?l:{default:l},e=a(T),c=a(j),z=c.default(I.Field)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("styled-components"),p=require("../hooks/useId.cjs"),m=require("../ToggleCheckbox/ToggleCheckbox.cjs"),T=require("../Field/Field.cjs"),I=require("../TextButton/TextButton.cjs"),o=require("../Flex/Flex.cjs"),y=require("../Field/FieldLabel.cjs"),_=require("../Field/FieldHint.cjs"),b=require("../Field/FieldError.cjs"),k=t=>t&&t.__esModule?t:{default:t},d=k(j),B=d.default(T.Field)`
2
2
  max-width: 320px;
3
- `,P=c.default(_.TextButton)`
3
+ `,C=d.default(I.TextButton)`
4
4
  align-self: flex-end;
5
5
  margin-left: auto;
6
- `,r=({disabled:l,size:f,error:g,hint:p,label:i,name:x,labelAction:b,required:q,id:h,onClear:d,clearLabel:n,checked:o,...F})=>{const s=y.useId(h);return t.jsx(z,{name:x,hint:p,error:g,id:s,required:q,children:t.jsxs(u.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[t.jsxs(u.Flex,{children:[t.jsx(k.FieldLabel,{action:b,children:i}),n&&d&&o!==null&&!l&&t.jsx(P,{onClick:d,children:n})]}),t.jsx(v.ToggleCheckbox,{id:s,size:f,checked:o,disabled:l,...F,children:i}),t.jsx(C.FieldHint,{}),t.jsx(O.FieldError,{})]})})};r.displayName="ToggleInput";r.defaultProps={checked:!1,clearLabel:void 0,disabled:!1,error:void 0,hint:void 0,id:void 0,label:"",labelAction:void 0,name:"",onClear:void 0,required:!1,size:"M"};r.propTypes={checked:e.default.bool,clearLabel:e.default.string,disabled:e.default.bool,error:e.default.string,hint:e.default.oneOfType([e.default.string,e.default.node,e.default.arrayOf(e.default.node)]),id:e.default.string,label:e.default.string,labelAction:e.default.node,name:e.default.string,onClear:e.default.func,required:e.default.bool,size:e.default.oneOf(Object.keys(m.sizes.input))};exports.ToggleInput=r;
6
+ `,u=({disabled:t=!1,size:c="M",error:a,hint:x,label:r,name:g,labelAction:f,required:F=!1,id:h,onClear:i,clearLabel:n,checked:l=!1,...q})=>{const s=p.useId(h);return e.jsx(B,{name:g,hint:x,error:a,id:s,required:F,children:e.jsxs(o.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[e.jsxs(o.Flex,{children:[e.jsx(y.FieldLabel,{action:f,children:r}),n&&i&&l!==null&&!t&&e.jsx(C,{onClick:i,children:n})]}),e.jsx(m.ToggleCheckbox,{id:s,size:c,checked:l,disabled:t,...q,children:r}),e.jsx(_.FieldHint,{}),e.jsx(b.FieldError,{})]})})};u.displayName="ToggleInput";exports.ToggleInput=u;
@@ -1,76 +1,23 @@
1
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
- import "react";
3
- import e from "prop-types";
4
- import a from "styled-components";
5
- import { useId as T } from "../hooks/useId.js";
6
- import { sizes as v } from "../themes/sizes.js";
7
- import { ToggleCheckbox as F } from "../ToggleCheckbox/ToggleCheckbox.js";
8
- import { Field as I } from "../Field/Field.js";
9
- import { TextButton as k } from "../TextButton/TextButton.js";
10
- import { Flex as p } from "../Flex/Flex.js";
11
- import { FieldLabel as C } from "../Field/FieldLabel.js";
12
- import { FieldHint as O } from "../Field/FieldHint.js";
13
- import { FieldError as j } from "../Field/FieldError.js";
14
- const z = a(I)`
1
+ import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
+ import p from "styled-components";
3
+ import { useId as F } from "../hooks/useId.js";
4
+ import { ToggleCheckbox as I } from "../ToggleCheckbox/ToggleCheckbox.js";
5
+ import { Field as T } from "../Field/Field.js";
6
+ import { TextButton as j } from "../TextButton/TextButton.js";
7
+ import { Flex as d } from "../Flex/Flex.js";
8
+ import { FieldLabel as k } from "../Field/FieldLabel.js";
9
+ import { FieldHint as y } from "../Field/FieldHint.js";
10
+ import { FieldError as B } from "../Field/FieldError.js";
11
+ const C = p(T)`
15
12
  max-width: 320px;
16
- `, q = a(k)`
13
+ `, q = p(j)`
17
14
  align-self: flex-end;
18
15
  margin-left: auto;
19
- `, r = ({
20
- disabled: i,
21
- size: c,
22
- error: f,
23
- hint: g,
24
- label: t,
25
- name: u,
26
- labelAction: h,
27
- required: b,
28
- id: x,
29
- onClear: n,
30
- clearLabel: l,
31
- checked: d,
32
- ...y
33
- }) => {
34
- const m = T(x);
35
- return /* @__PURE__ */ o(z, { name: u, hint: g, error: f, id: m, required: b, children: /* @__PURE__ */ s(p, { direction: "column", alignItems: "stretch", gap: 1, children: [
36
- /* @__PURE__ */ s(p, { children: [
37
- /* @__PURE__ */ o(C, { action: h, children: t }),
38
- l && n && d !== null && !i && /* @__PURE__ */ o(q, { onClick: n, children: l })
39
- ] }),
40
- /* @__PURE__ */ o(F, { id: m, size: c, checked: d, disabled: i, ...y, children: t }),
41
- /* @__PURE__ */ o(O, {}),
42
- /* @__PURE__ */ o(j, {})
43
- ] }) });
44
- };
45
- r.displayName = "ToggleInput";
46
- r.defaultProps = {
47
- checked: !1,
48
- clearLabel: void 0,
49
- disabled: !1,
50
- error: void 0,
51
- hint: void 0,
52
- id: void 0,
53
- label: "",
54
- labelAction: void 0,
55
- name: "",
56
- onClear: void 0,
57
- required: !1,
58
- size: "M"
59
- };
60
- r.propTypes = {
61
- checked: e.bool,
62
- clearLabel: e.string,
63
- disabled: e.bool,
64
- error: e.string,
65
- hint: e.oneOfType([e.string, e.node, e.arrayOf(e.node)]),
66
- id: e.string,
67
- label: e.string,
68
- labelAction: e.node,
69
- name: e.string,
70
- onClear: e.func,
71
- required: e.bool,
72
- size: e.oneOf(Object.keys(v.input))
16
+ `, w = ({ disabled: e = !1, size: s = "M", error: f, hint: c, label: o, name: a, labelAction: g, required: h = !1, id: u, onClear: i, clearLabel: t, checked: n = !1, ...x }) => {
17
+ const l = F(u);
18
+ return r(C, { name: a, hint: c, error: f, id: l, required: h, children: m(d, { direction: "column", alignItems: "stretch", gap: 1, children: [m(d, { children: [r(k, { action: g, children: o }), t && i && n !== null && !e && r(q, { onClick: i, children: t })] }), r(I, { id: l, size: s, checked: n, disabled: e, ...x, children: o }), r(y, {}), r(B, {})] }) });
73
19
  };
20
+ w.displayName = "ToggleInput";
74
21
  export {
75
- r as ToggleInput
22
+ w as ToggleInput
76
23
  };
@@ -6,7 +6,7 @@
6
6
  // overwrite a variant attribute
7
7
  font-weight: ${({theme:e,fontWeight:t})=>r.extractStyleFromTheme(e.fontWeights,t,void 0)};
8
8
  font-size: ${({theme:e,fontSize:t})=>r.extractStyleFromTheme(e.fontSizes,t,void 0)};
9
- line-height: ${({theme:e,lineHeight:t})=>r.extractStyleFromTheme(e.lineHeights,t,void 0)};
9
+ line-height: ${({theme:e,lineHeight:t})=>r.extractStyleFromTheme(e.lineHeights,t,t)};
10
10
  color: ${o.handleColor};
11
11
  text-align: ${({textAlign:e})=>e};
12
12
  text-decoration: ${({textDecoration:e})=>e};
@@ -1,25 +1,25 @@
1
- import i from "styled-components";
2
- import { variantStyle as r, ellipsisStyle as n, handleColor as a } from "./utils.js";
1
+ import r from "styled-components";
2
+ import { variantStyle as i, ellipsisStyle as n, handleColor as a } from "./utils.js";
3
3
  import { extractStyleFromTheme as o } from "../helpers/theme.js";
4
4
  const s = {
5
5
  fontSize: !0,
6
6
  fontWeight: !0
7
- }, d = i.span.withConfig({
7
+ }, m = r.span.withConfig({
8
8
  shouldForwardProp: (t, e) => !s[t] && e(t)
9
9
  })`
10
- ${r}
10
+ ${i}
11
11
  ${n}
12
12
 
13
13
  // These properties need to come after {variantStyle}, because they might
14
14
  // overwrite a variant attribute
15
15
  font-weight: ${({ theme: t, fontWeight: e }) => o(t.fontWeights, e, void 0)};
16
16
  font-size: ${({ theme: t, fontSize: e }) => o(t.fontSizes, e, void 0)};
17
- line-height: ${({ theme: t, lineHeight: e }) => o(t.lineHeights, e, void 0)};
17
+ line-height: ${({ theme: t, lineHeight: e }) => o(t.lineHeights, e, e)};
18
18
  color: ${a};
19
19
  text-align: ${({ textAlign: t }) => t};
20
20
  text-decoration: ${({ textDecoration: t }) => t};
21
21
  text-transform: ${({ textTransform: t }) => t};
22
22
  `;
23
23
  export {
24
- d as Typography
24
+ m as Typography
25
25
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),f=require("@strapi/ui-primitives");function g(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const u=g(S);function p({prop:e,defaultProp:o,onChange:n=()=>{}}){const[t,c]=v({defaultProp:o,onChange:n}),r=e!==void 0,l=typeof e=="function"?e(t):e,d=r?l:t,a=f.useCallbackRef(n),b=u.useCallback(s=>{if(r){const i=typeof s=="function"?s(l):s;i!==l&&(a(i),c(s))}else c(s)},[r,l,c,a]);return[d,b]}function v({defaultProp:e,onChange:o}){const n=u.useState(e),[t]=n,c=u.useRef(t),r=f.useCallbackRef(o);return u.useEffect(()=>{c.current!==t&&(r(t),c.current=t)},[t,c,r]),n}exports.useControllableState=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),f=require("@strapi/ui-primitives");function g(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const u=g(S);function p({prop:e,defaultProp:o,onChange:n=()=>{}}){const[t,c]=v({defaultProp:o,onChange:n}),r=e!==void 0,l=e instanceof Function?e(t):e,d=r?l:t,a=f.useCallbackRef(n),b=u.useCallback(s=>{if(r){const i=typeof s=="function"?s(l):s;i!==l&&(a(i),c(s))}else c(s)},[r,l,c,a]);return[d,b]}function v({defaultProp:e,onChange:o}){const n=u.useState(e),[t]=n,c=u.useRef(t),r=f.useCallbackRef(o);return u.useEffect(()=>{c.current!==t&&(r(t),c.current=t)},[t,c,r]),n}exports.useControllableState=p;
@@ -1,14 +1,14 @@
1
1
  import * as r from "react";
2
2
  import { useCallbackRef as i } from "@strapi/ui-primitives";
3
- function R({ prop: n, defaultProp: u, onChange: c = () => {
3
+ function S({ prop: n, defaultProp: u, onChange: c = () => {
4
4
  } }) {
5
- const [t, e] = m({ defaultProp: u, onChange: c }), o = n !== void 0, l = typeof n == "function" ? n(t) : n, d = o ? l : t, f = i(c), C = r.useCallback((s) => {
5
+ const [t, e] = m({ defaultProp: u, onChange: c }), o = n !== void 0, l = n instanceof Function ? n(t) : n, d = o ? l : t, a = i(c), C = r.useCallback((s) => {
6
6
  if (o) {
7
- const a = typeof s == "function" ? s(l) : s;
8
- a !== l && (f(a), e(s));
7
+ const f = typeof s == "function" ? s(l) : s;
8
+ f !== l && (a(f), e(s));
9
9
  } else
10
10
  e(s);
11
- }, [o, l, e, f]);
11
+ }, [o, l, e, a]);
12
12
  return [d, C];
13
13
  }
14
14
  function m({ defaultProp: n, onChange: u }) {
@@ -18,5 +18,5 @@ function m({ defaultProp: n, onChange: u }) {
18
18
  }, [t, e, o]), c;
19
19
  }
20
20
  export {
21
- R as useControllableState
21
+ S as useControllableState
22
22
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("styled-components"),i=t=>({theme:o,size:r})=>o.sizes[t][r],s=(t="&")=>({theme:o,hasError:r})=>e.css`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("styled-components"),s=t=>({theme:o,size:r})=>o.sizes[t][r],i=(t="&")=>({theme:o,hasError:r=!1})=>e.css`
2
2
  outline: none;
3
3
  box-shadow: 0;
4
4
  transition-property: border-color, box-shadow, fill;
@@ -38,4 +38,4 @@
38
38
  border: 2px solid ${t.colors.primary600};
39
39
  }
40
40
  }
41
- `;exports.buttonFocusStyle=n;exports.getThemeSize=i;exports.inputFocusStyle=s;
41
+ `;exports.buttonFocusStyle=n;exports.getThemeSize=s;exports.inputFocusStyle=i;
@@ -1,5 +1,5 @@
1
1
  import { css as i } from "styled-components";
2
- const s = (t) => ({ theme: o, size: r }) => o.sizes[t][r], p = (t = "&") => ({ theme: o, hasError: r }) => i`
2
+ const s = (t) => ({ theme: o, size: r }) => o.sizes[t][r], p = (t = "&") => ({ theme: o, hasError: r = !1 }) => i`
3
3
  outline: none;
4
4
  box-shadow: 0;
5
5
  transition-property: border-color, box-shadow, fill;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime");require("react");const a=require("prop-types"),s=require("styled-components"),i=require("./MainNavContext.cjs"),l=require("../../Flex/Flex.cjs"),r=e=>e&&e.__esModule?e:{default:e},u=r(a),d=r(s),c=d.default(l.Flex)`
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
- `,t=({condensed:e,...n})=>o.jsx(i.MainNavContext.Provider,{value:e,children:o.jsx(c,{alignItems:"normal",as:"nav",background:"neutral0",condensed:e,direction:"column",height:"100vh",position:"sticky",top:0,zIndex:2,...n})});t.defaultProps={condensed:!1};t.propTypes={condensed:u.default.bool};exports.MainNav=t;
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 r } from "react/jsx-runtime";
2
- import "react";
3
- import n from "prop-types";
4
- import i from "styled-components";
5
- import { MainNavContext as a } from "./MainNavContext.js";
6
- import { Flex as p } from "../../Flex/Flex.js";
7
- const m = i(p)`
8
- width: ${({ condensed: o }) => o ? "max-content" : `${224 / 16}rem`};
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
- t as MainNav
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(),n=()=>e.useContext(t);exports.MainNavContext=t;exports.useMainNav=n;
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,5 +1,5 @@
1
1
  import { createContext as t, useContext as e } from "react";
2
- const o = t(), a = () => e(o);
2
+ const o = t(!1), a = () => e(o);
3
3
  export {
4
4
  o as MainNavContext,
5
5
  a as useMainNav
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),f=require("prop-types"),y=require("styled-components"),j=require("./MainNavContext.cjs"),h=require("../../BaseLink/BaseLink.cjs"),t=require("../../Box/Box.cjs"),u=require("../../VisuallyHidden/VisuallyHidden.cjs"),q=require("../../Flex/Flex.cjs"),c=require("../../Typography/Typography.cjs"),i=e=>e&&e.__esModule?e:{default:e},B=i(g),r=i(f),x=i(y),p=x.default.div`
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
- `,m=x.default(h.BaseLink)`
9
+ `,B=h.default(c.BaseLink)`
10
10
  text-decoration: unset;
11
11
  color: inherit;
12
- `,d=B.default.forwardRef(({workplace:e,title:s,icon:a,...o},l)=>j.useMainNav()?n.jsx(h.BaseLink,{ref:l,...o,children:n.jsx(t.Box,{paddingLeft:3,paddingRight:3,paddingTop:4,paddingBottom:4,children:n.jsxs(p,{condensed:!0,children:[a,n.jsxs(u.VisuallyHidden,{children:[n.jsx("span",{children:s}),n.jsx("span",{children:e})]})]})})}):n.jsx(m,{ref:l,...o,children:n.jsx(t.Box,{paddingLeft:3,paddingRight:3,paddingTop:4,paddingBottom:4,children:n.jsxs(q.Flex,{children:[n.jsx(p,{"aria-hidden":!0,tabIndex:-1,children:a}),n.jsxs(t.Box,{paddingLeft:2,children:[n.jsxs(c.Typography,{fontWeight:"bold",textColor:"neutral800",as:"span",children:[s,n.jsx(u.VisuallyHidden,{as:"span",children:e})]}),n.jsx(c.Typography,{variant:"pi",as:"p",textColor:"neutral600","aria-hidden":!0,children:e})]})]})})}));d.displayName="NavBrand";d.defaultProps={to:"/"};d.propTypes={icon:r.default.node.isRequired,title:r.default.string.isRequired,to:r.default.string,workplace:r.default.string.isRequired};exports.NavBrand=d;
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 e, jsxs as i } from "react/jsx-runtime";
1
+ import { jsx as d, jsxs as e } from "react/jsx-runtime";
2
2
  import f from "react";
3
- import d from "prop-types";
4
- import h from "styled-components";
5
- import { useMainNav as u } from "./MainNavContext.js";
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 x } from "../../Flex/Flex.js";
10
- import { Typography as l } from "../../Typography/Typography.js";
11
- const c = h.div`
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
- `, R = h(g)`
18
+ `, x = l(c)`
20
19
  text-decoration: unset;
21
20
  color: inherit;
22
- `, t = f.forwardRef(({ workplace: r, title: o, icon: a, ...p }, s) => u() ? /* @__PURE__ */ e(g, { ref: s, ...p, children: /* @__PURE__ */ e(n, { paddingLeft: 3, paddingRight: 3, paddingTop: 4, paddingBottom: 4, children: /* @__PURE__ */ i(c, { condensed: !0, children: [
23
- a,
24
- /* @__PURE__ */ i(m, { children: [
25
- /* @__PURE__ */ e("span", { children: o }),
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
- t as NavBrand
26
+ W as NavBrand
50
27
  };
@@ -1,10 +1,7 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("react");const s=require("@strapi/icons"),d=require("prop-types"),a=require("styled-components"),u=require("./MainNavContext.cjs"),l=require("../../Icon/Icon.cjs"),c=require("../../VisuallyHidden/VisuallyHidden.cjs"),o=e=>e&&e.__esModule?e:{default:e},h=o(d),p=o(a),g=p.default.button`
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
- `,i=({children:e,...t})=>{const n=u.useMainNav();return r.jsxs(g,{as:"button",condensed:n,...t,children:[r.jsx(l.Icon,{as:n?s.ChevronRight:s.ChevronLeft,"aria-hidden":!0,color:"neutral600"}),r.jsx(c.VisuallyHidden,{children:e})]})};i.propTypes={children:h.default.string.isRequired};exports.NavCondense=i;
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 i, jsx as t } from "react/jsx-runtime";
2
- import "react";
3
- import { ChevronRight as n, ChevronLeft as s } from "@strapi/icons";
4
- import d from "prop-types";
5
- import a from "styled-components";
6
- import { useMainNav as m } from "./MainNavContext.js";
7
- import { Icon as p } from "../../Icon/Icon.js";
8
- import { VisuallyHidden as h } from "../../VisuallyHidden/VisuallyHidden.js";
9
- const l = a.button`
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
- `, c = ({ children: r, ...e }) => {
29
- const o = m();
30
- return /* @__PURE__ */ i(l, { as: "button", condensed: o, ...e, children: [
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
- c as NavCondense
32
+ x as NavCondense
40
33
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("react");const t=require("prop-types"),s=require("../../Box/Box.cjs"),i=e=>e&&e.__esModule?e:{default:e},u=i(t),o=({children:e})=>r.jsx(s.Box,{position:"relative",children:e});o.displayName="NavFooter";o.propTypes={children:u.default.node.isRequired};exports.NavFooter=o;
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;