@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,22 +1,17 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import "react";
3
- import i from "prop-types";
4
- import e from "styled-components";
2
+ import i from "styled-components";
5
3
  import { Grid as a } from "../../Grid/Grid.js";
6
- const p = `${232 / 16}rem`, s = e(a)`
7
- width: ${p};
8
- background: ${({ theme: r }) => r.colors.neutral100};
4
+ const e = `${232 / 16}rem`, s = i(a)`
5
+ width: ${e};
6
+ background: ${({ theme: o }) => o.colors.neutral100};
9
7
  position: sticky;
10
8
  top: 0;
11
9
  height: 100vh;
12
10
  overflow-y: auto;
13
- border-right: 1px solid ${({ theme: r }) => r.colors.neutral200};
11
+ border-right: 1px solid ${({ theme: o }) => o.colors.neutral200};
14
12
  z-index: 1;
15
- `, n = ({ ariaLabel: r, ...o }) => /* @__PURE__ */ t(s, { "aria-label": r, as: "nav", ...o });
16
- n.propTypes = {
17
- ariaLabel: i.string.isRequired
18
- };
13
+ `, d = ({ ariaLabel: o, ...r }) => t(s, { "aria-label": o, as: "nav", ...r });
19
14
  export {
20
- n as SubNav,
21
- p as subNavWidth
15
+ d as SubNav,
16
+ e as subNavWidth
22
17
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),R=require("@strapi/icons"),P=require("prop-types"),_=require("styled-components"),D=require("../../helpers/keyboardKeys.cjs"),I=require("../../hooks/useId.cjs"),K=require("../../hooks/usePrevious.cjs"),L=require("../../Divider/Divider.cjs"),c=require("../../Box/Box.cjs"),k=require("../../Searchbar/SearchForm.cjs"),w=require("../../Searchbar/Searchbar.cjs"),F=require("../../Flex/Flex.cjs"),O=require("../../Typography/Typography.cjs"),E=require("../../IconButton/IconButton.cjs"),h=t=>t&&t.__esModule?t:{default:t},r=h(P),H=h(_),p=H.default(L.Divider)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),v=require("@strapi/icons"),C=require("styled-components"),R=require("../../helpers/keyboardKeys.cjs"),T=require("../../hooks/useId.cjs"),D=require("../../hooks/usePrevious.cjs"),I=require("../../Divider/Divider.cjs"),a=require("../../Box/Box.cjs"),K=require("../../Searchbar/SearchForm.cjs"),_=require("../../Searchbar/Searchbar.cjs"),k=require("../../Flex/Flex.cjs"),w=require("../../Typography/Typography.cjs"),F=require("../../IconButton/IconButton.cjs"),O=r=>r&&r.__esModule?r:{default:r},P=O(C),l=P.default(I.Divider)`
2
2
  width: ${24/16}rem;
3
- background-color: ${({theme:t})=>t.colors.neutral200};
4
- `,d=({as:t,label:g,searchLabel:l,searchable:b,onChange:x,value:y,onClear:S,onSubmit:q,id:j})=>{const[s,i]=o.useState(!1),f=K.usePrevious(s),v=I.useId(j),a=o.useRef(),u=o.useRef();o.useEffect(()=>{s&&a.current&&a.current.focus(),f&&!s&&u.current&&u.current.focus()},[s,f]);const B=()=>{i(n=>!n)},m=n=>{S(n),a.current.focus()},C=n=>{n.relatedTarget?.id!==v&&i(!1)},T=n=>{n.key===D.KeyboardKeys.ESCAPE&&i(!1)};return s?e.jsxs(c.Box,{paddingLeft:4,paddingTop:5,paddingBottom:2,paddingRight:4,children:[e.jsx(k.SearchForm,{children:e.jsx(w.Searchbar,{name:"searchbar",value:y,onChange:x,placeholder:"e.g: strapi-plugin-abcd",onKeyDown:T,ref:a,onBlur:C,onClear:m,onSubmit:q,clearLabel:"Clear",size:"S",children:l})}),e.jsx(c.Box,{paddingLeft:2,paddingTop:4,children:e.jsx(p,{})})]}):e.jsxs(c.Box,{paddingLeft:6,paddingTop:6,paddingBottom:2,paddingRight:4,children:[e.jsxs(F.Flex,{justifyContent:"space-between",alignItems:"flex-start",children:[e.jsx(O.Typography,{variant:"beta",as:t,children:g}),b&&e.jsx(E.IconButton,{ref:u,onClick:B,label:l,icon:e.jsx(R.Search,{})})]}),e.jsx(c.Box,{paddingTop:4,children:e.jsx(p,{})})]})};d.defaultProps={as:"h2",searchable:!1,onChange(){},onClear(){},onSubmit(){},value:"",searchLabel:"",id:void 0};d.propTypes={as:r.default.string,id:r.default.string,label:r.default.string.isRequired,onChange:r.default.func,onClear:r.default.func,onSubmit:r.default.func,searchLabel:r.default.string,searchable:r.default.bool,value:r.default.string};exports.SubNavHeader=d;
3
+ background-color: ${({theme:r})=>r.colors.neutral200};
4
+ `,E=({as:r="h2",label:f,searchLabel:u="",searchable:h=!1,onChange:p=()=>{},value:g="",onClear:x=()=>{},onSubmit:S=()=>{},id:y})=>{const[t,c]=s.useState(!1),d=D.usePrevious(t),b=T.useId(y),o=s.useRef(void 0),i=s.useRef(void 0);s.useEffect(()=>{t&&o.current&&o.current.focus(),d&&!t&&i.current&&i.current.focus()},[t,d]);const j=()=>{c(n=>!n)},q=n=>{x(n),o.current.focus()},B=n=>{n.relatedTarget?.id!==b&&c(!1)},m=n=>{n.key===R.KeyboardKeys.ESCAPE&&c(!1)};return t?e.jsxs(a.Box,{paddingLeft:4,paddingTop:5,paddingBottom:2,paddingRight:4,children:[e.jsx(K.SearchForm,{children:e.jsx(_.Searchbar,{name:"searchbar",value:g,onChange:p,placeholder:"e.g: strapi-plugin-abcd",onKeyDown:m,ref:o,onBlur:B,onClear:q,onSubmit:S,clearLabel:"Clear",size:"S",children:u})}),e.jsx(a.Box,{paddingLeft:2,paddingTop:4,children:e.jsx(l,{})})]}):e.jsxs(a.Box,{paddingLeft:6,paddingTop:6,paddingBottom:2,paddingRight:4,children:[e.jsxs(k.Flex,{justifyContent:"space-between",alignItems:"flex-start",children:[e.jsx(w.Typography,{variant:"beta",as:r,children:f}),h&&e.jsx(F.IconButton,{ref:i,onClick:j,label:u,icon:e.jsx(v.Search,{})})]}),e.jsx(a.Box,{paddingTop:4,children:e.jsx(l,{})})]})};exports.SubNavHeader=E;
@@ -1,86 +1,39 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { useState as w, useRef as f, useEffect as D } from "react";
3
- import { Search as I } from "@strapi/icons";
4
- import r from "prop-types";
5
- import K from "styled-components";
6
- import { KeyboardKeys as P } from "../../helpers/keyboardKeys.js";
1
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
+ import { useState as R, useRef as p, useEffect as w } from "react";
3
+ import { Search as D } from "@strapi/icons";
4
+ import I from "styled-components";
5
+ import { KeyboardKeys as K } from "../../helpers/keyboardKeys.js";
7
6
  import { useId as j } from "../../hooks/useId.js";
8
7
  import { usePrevious as k } from "../../hooks/usePrevious.js";
9
8
  import { Divider as E } from "../../Divider/Divider.js";
10
- import { Box as a } from "../../Box/Box.js";
11
- import { SearchForm as O } from "../../Searchbar/SearchForm.js";
12
- import { Searchbar as F } from "../../Searchbar/Searchbar.js";
13
- import { Flex as $ } from "../../Flex/Flex.js";
14
- import { Typography as q } from "../../Typography/Typography.js";
15
- import { IconButton as z } from "../../IconButton/IconButton.js";
16
- const m = K(E)`
9
+ import { Box as t } from "../../Box/Box.js";
10
+ import { SearchForm as L } from "../../Searchbar/SearchForm.js";
11
+ import { Searchbar as O } from "../../Searchbar/Searchbar.js";
12
+ import { Flex as F } from "../../Flex/Flex.js";
13
+ import { Typography as P } from "../../Typography/Typography.js";
14
+ import { IconButton as $ } from "../../IconButton/IconButton.js";
15
+ const l = I(E)`
17
16
  width: ${24 / 16}rem;
18
17
  background-color: ${({ theme: i }) => i.colors.neutral200};
19
- `, u = ({ as: i, label: h, searchLabel: l, searchable: g, onChange: b, value: S, onClear: y, onSubmit: C, id: v }) => {
20
- const [n, s] = w(!1), p = k(n), B = j(v), t = f(), c = f();
21
- D(() => {
22
- n && t.current && t.current.focus(), p && !n && c.current && c.current.focus();
23
- }, [n, p]);
24
- const T = () => {
25
- s((o) => !o);
26
- }, x = (o) => {
27
- y(o), t.current.focus();
28
- }, R = (o) => {
29
- o.relatedTarget?.id !== B && s(!1);
30
- }, L = (o) => {
31
- o.key === P.ESCAPE && s(!1);
18
+ `, Z = ({ as: i = "h2", label: m, searchLabel: s = "", searchable: u = !1, onChange: h = () => {
19
+ }, value: g = "", onClear: S = () => {
20
+ }, onSubmit: b = () => {
21
+ }, id: y }) => {
22
+ const [o, a] = R(!1), f = k(o), B = j(y), n = p(void 0), d = p(void 0);
23
+ w(() => {
24
+ o && n.current && n.current.focus(), f && !o && d.current && d.current.focus();
25
+ }, [o, f]);
26
+ const C = () => {
27
+ a((r) => !r);
28
+ }, v = (r) => {
29
+ S(r), n.current.focus();
30
+ }, x = (r) => {
31
+ r.relatedTarget?.id !== B && a(!1);
32
+ }, T = (r) => {
33
+ r.key === K.ESCAPE && a(!1);
32
34
  };
33
- return n ? /* @__PURE__ */ d(a, { paddingLeft: 4, paddingTop: 5, paddingBottom: 2, paddingRight: 4, children: [
34
- /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
35
- F,
36
- {
37
- name: "searchbar",
38
- value: S,
39
- onChange: b,
40
- placeholder: "e.g: strapi-plugin-abcd",
41
- onKeyDown: L,
42
- ref: t,
43
- onBlur: R,
44
- onClear: x,
45
- onSubmit: C,
46
- clearLabel: "Clear",
47
- size: "S",
48
- children: l
49
- }
50
- ) }),
51
- /* @__PURE__ */ e(a, { paddingLeft: 2, paddingTop: 4, children: /* @__PURE__ */ e(m, {}) })
52
- ] }) : /* @__PURE__ */ d(a, { paddingLeft: 6, paddingTop: 6, paddingBottom: 2, paddingRight: 4, children: [
53
- /* @__PURE__ */ d($, { justifyContent: "space-between", alignItems: "flex-start", children: [
54
- /* @__PURE__ */ e(q, { variant: "beta", as: i, children: h }),
55
- g && /* @__PURE__ */ e(z, { ref: c, onClick: T, label: l, icon: /* @__PURE__ */ e(I, {}) })
56
- ] }),
57
- /* @__PURE__ */ e(a, { paddingTop: 4, children: /* @__PURE__ */ e(m, {}) })
58
- ] });
59
- };
60
- u.defaultProps = {
61
- as: "h2",
62
- searchable: !1,
63
- onChange() {
64
- },
65
- onClear() {
66
- },
67
- onSubmit() {
68
- },
69
- value: "",
70
- searchLabel: "",
71
- id: void 0
72
- };
73
- u.propTypes = {
74
- as: r.string,
75
- id: r.string,
76
- label: r.string.isRequired,
77
- onChange: r.func,
78
- onClear: r.func,
79
- onSubmit: r.func,
80
- searchLabel: r.string,
81
- searchable: r.bool,
82
- value: r.string
35
+ return o ? c(t, { paddingLeft: 4, paddingTop: 5, paddingBottom: 2, paddingRight: 4, children: [e(L, { children: e(O, { name: "searchbar", value: g, onChange: h, placeholder: "e.g: strapi-plugin-abcd", onKeyDown: T, ref: n, onBlur: x, onClear: v, onSubmit: b, clearLabel: "Clear", size: "S", children: s }) }), e(t, { paddingLeft: 2, paddingTop: 4, children: e(l, {}) })] }) : c(t, { paddingLeft: 6, paddingTop: 6, paddingBottom: 2, paddingRight: 4, children: [c(F, { justifyContent: "space-between", alignItems: "flex-start", children: [e(P, { variant: "beta", as: i, children: m }), u && e($, { ref: d, onClick: C, label: s, icon: e(D, {}) })] }), e(t, { paddingTop: 4, children: e(l, {}) })] });
83
36
  };
84
37
  export {
85
- u as SubNavHeader
38
+ Z as SubNavHeader
86
39
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),x=require("react"),h=require("@strapi/icons"),b=require("prop-types"),$=require("styled-components"),s=require("../../Box/Box.cjs"),c=require("../../Typography/Typography.cjs"),a=require("../../Flex/Flex.cjs"),m=require("../../BaseLink/BaseLink.cjs"),i=e=>e&&e.__esModule?e:{default:e},v=i(x),t=i(b),n=i($),j=n.default(s.Box)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("react"),x=require("@strapi/icons"),y=require("styled-components"),t=require("../../Box/Box.cjs"),n=require("../../Typography/Typography.cjs"),i=require("../../Flex/Flex.cjs"),h=require("../../BaseLink/BaseLink.cjs"),a=e=>e&&e.__esModule?e:{default:e},$=a(g),s=a(y),j=s.default(t.Box)`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: space-between;
@@ -15,7 +15,7 @@
15
15
  svg > * {
16
16
  fill: ${e.colors.primary700};
17
17
  }
18
- ${c.Typography} {
18
+ ${n.Typography} {
19
19
  color: ${e.colors.primary700};
20
20
  font-weight: 500;
21
21
  }
@@ -25,15 +25,15 @@
25
25
  &:focus-visible {
26
26
  outline-offset: -2px;
27
27
  }
28
- `,u=n.default(h.Dot)`
28
+ `,l=s.default(x.Dot)`
29
29
  width: ${12/16}rem;
30
30
  height: ${4/16}rem;
31
31
  * {
32
32
  fill: ${({theme:e,$active:o})=>o?e.colors.primary600:e.colors.neutral600};
33
33
  }
34
- `,q=n.default.div`
34
+ `,v=s.default.div`
35
35
  svg {
36
36
  height: ${12/16}rem;
37
37
  width: ${12/16}rem;
38
38
  }
39
- `,l=v.default.forwardRef(({children:e,icon:o,withBullet:d,as:p,isSubSectionChild:f,...y},g)=>r.jsxs(j,{as:p,icon:o,background:"neutral100",paddingLeft:f?9:7,paddingBottom:2,paddingTop:2,ref:g,...y,children:[r.jsxs(a.Flex,{children:[o?r.jsx(q,{children:o}):r.jsx(u,{}),r.jsx(s.Box,{paddingLeft:2,children:r.jsx(c.Typography,{as:"span",children:e})})]}),d&&r.jsx(s.Box,{as:a.Flex,paddingRight:4,children:r.jsx(u,{$active:!0})})]}));l.displayName="SubNavLink";l.defaultProps={as:m.BaseLink,icon:null,isSubSectionChild:!1,withBullet:!1};l.propTypes={as:t.default.elementType,children:t.default.node.isRequired,icon:t.default.element,isSubSectionChild:t.default.bool,withBullet:t.default.bool};exports.SubNavLink=l;
39
+ `,b=$.default.forwardRef(({children:e,icon:o=null,withBullet:c=!1,as:u=h.BaseLink,isSubSectionChild:d=!1,...p},f)=>r.jsxs(j,{as:u,icon:o,background:"neutral100",paddingLeft:d?9:7,paddingBottom:2,paddingTop:2,ref:f,...p,children:[r.jsxs(i.Flex,{children:[o?r.jsx(v,{children:o}):r.jsx(l,{}),r.jsx(t.Box,{paddingLeft:2,children:r.jsx(n.Typography,{as:"span",children:e})})]}),c&&r.jsx(t.Box,{as:i.Flex,paddingRight:4,children:r.jsx(l,{$active:!0})})]}));exports.SubNavLink=b;
@@ -1,13 +1,12 @@
1
- import { jsxs as s, jsx as o } from "react/jsx-runtime";
2
- import h from "react";
3
- import { Dot as y } from "@strapi/icons";
4
- import i from "prop-types";
5
- import l from "styled-components";
1
+ import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
+ import u from "react";
3
+ import { Dot as g } from "@strapi/icons";
4
+ import e from "styled-components";
6
5
  import { Box as t } from "../../Box/Box.js";
7
- import { Typography as c } from "../../Typography/Typography.js";
8
- import { Flex as a } from "../../Flex/Flex.js";
6
+ import { Typography as s } from "../../Typography/Typography.js";
7
+ import { Flex as n } from "../../Flex/Flex.js";
9
8
  import { BaseLink as $ } from "../../BaseLink/BaseLink.js";
10
- const b = l(t)`
9
+ const h = e(t)`
11
10
  display: flex;
12
11
  align-items: center;
13
12
  justify-content: space-between;
@@ -24,7 +23,7 @@ const b = l(t)`
24
23
  svg > * {
25
24
  fill: ${r.colors.primary700};
26
25
  }
27
- ${c} {
26
+ ${s} {
28
27
  color: ${r.colors.primary700};
29
28
  font-weight: 500;
30
29
  }
@@ -34,51 +33,18 @@ const b = l(t)`
34
33
  &:focus-visible {
35
34
  outline-offset: -2px;
36
35
  }
37
- `, p = l(y)`
36
+ `, a = e(g)`
38
37
  width: ${12 / 16}rem;
39
38
  height: ${4 / 16}rem;
40
39
  * {
41
- fill: ${({ theme: r, $active: e }) => e ? r.colors.primary600 : r.colors.neutral600};
40
+ fill: ${({ theme: r, $active: i }) => i ? r.colors.primary600 : r.colors.neutral600};
42
41
  }
43
- `, v = l.div`
42
+ `, y = e.div`
44
43
  svg {
45
44
  height: ${12 / 16}rem;
46
45
  width: ${12 / 16}rem;
47
46
  }
48
- `, n = h.forwardRef(({ children: r, icon: e, withBullet: d, as: m, isSubSectionChild: f, ...u }, g) => /* @__PURE__ */ s(
49
- b,
50
- {
51
- as: m,
52
- icon: e,
53
- background: "neutral100",
54
- paddingLeft: f ? 9 : 7,
55
- paddingBottom: 2,
56
- paddingTop: 2,
57
- ref: g,
58
- ...u,
59
- children: [
60
- /* @__PURE__ */ s(a, { children: [
61
- e ? /* @__PURE__ */ o(v, { children: e }) : /* @__PURE__ */ o(p, {}),
62
- /* @__PURE__ */ o(t, { paddingLeft: 2, children: /* @__PURE__ */ o(c, { as: "span", children: r }) })
63
- ] }),
64
- d && /* @__PURE__ */ o(t, { as: a, paddingRight: 4, children: /* @__PURE__ */ o(p, { $active: !0 }) })
65
- ]
66
- }
67
- ));
68
- n.displayName = "SubNavLink";
69
- n.defaultProps = {
70
- as: $,
71
- icon: null,
72
- isSubSectionChild: !1,
73
- withBullet: !1
74
- };
75
- n.propTypes = {
76
- as: i.elementType,
77
- children: i.node.isRequired,
78
- icon: i.element,
79
- isSubSectionChild: i.bool,
80
- withBullet: i.bool
81
- };
47
+ `, R = u.forwardRef(({ children: r, icon: i = null, withBullet: c = !1, as: p = $, isSubSectionChild: d = !1, ...f }, m) => l(h, { as: p, icon: i, background: "neutral100", paddingLeft: d ? 9 : 7, paddingBottom: 2, paddingTop: 2, ref: m, ...f, children: [l(n, { children: [i ? o(y, { children: i }) : o(a, {}), o(t, { paddingLeft: 2, children: o(s, { as: "span", children: r }) })] }), c && o(t, { as: n, paddingRight: 4, children: o(a, { $active: !0 }) })] }));
82
48
  export {
83
- n as SubNavLink
49
+ R as SubNavLink
84
50
  };
@@ -1,19 +1,19 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),f=require("@strapi/icons"),y=require("prop-types"),j=require("styled-components"),b=require("../../hooks/useId.cjs"),o=require("../../Box/Box.cjs"),q=require("../../Flex/Flex.cjs"),S=require("../../Typography/Typography.cjs"),c=e=>e&&e.__esModule?e:{default:e},i=c(y),s=c(j),m=s.default(o.Box)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("react"),x=require("@strapi/icons"),h=require("styled-components"),g=require("../../hooks/useId.cjs"),i=require("../../Box/Box.cjs"),f=require("../../Flex/Flex.cjs"),j=require("../../Typography/Typography.cjs"),y=e=>e&&e.__esModule?e:{default:e},o=y(h),S=o.default(i.Box)`
2
2
  svg {
3
3
  height: ${4/16}rem;
4
4
  path {
5
5
  fill: ${({theme:e})=>e.colors.neutral700};
6
6
  }
7
7
  }
8
- `,k=s.default.button`
8
+ `,b=o.default.button`
9
9
  border: none;
10
10
  padding: 0;
11
11
  background: transparent;
12
12
  display: flex;
13
13
  align-items: center;
14
- `,v=s.default.div`
14
+ `,m=o.default.div`
15
15
  display: flex;
16
16
  align-items: center;
17
17
  width: ${12/16}rem;
18
18
  transform: rotateX(${({rotated:e})=>e?"0deg":"180deg"});
19
- `,d=({label:e,children:u,id:p})=>{const[n,g]=l.useState(!0),a=b.useId(p),h=()=>{g(r=>!r)};return t.jsxs(o.Box,{children:[t.jsx(m,{paddingLeft:7,paddingTop:2,paddingBottom:2,paddingRight:4,children:t.jsx(q.Flex,{justifyContent:"space-between",children:t.jsxs(k,{onClick:h,"aria-expanded":n,"aria-controls":a,children:[t.jsx(v,{rotated:n,children:t.jsx(f.CarretDown,{"aria-hidden":!0})}),t.jsx(o.Box,{paddingLeft:2,children:t.jsx(S.Typography,{as:"span",fontWeight:"semiBold",textColor:"neutral800",children:e})})]})})}),n&&t.jsx("ul",{id:a,children:l.Children.map(u,(r,x)=>t.jsx("li",{children:r},x))})]})};d.defaultProps={id:void 0};d.propTypes={children:i.default.node.isRequired,id:i.default.string,label:i.default.string.isRequired};exports.SubNavLinkSection=d;
19
+ `,k=({label:e,children:a,id:l})=>{const[n,c]=d.useState(!0),s=g.useId(l),u=()=>{c(r=>!r)};return t.jsxs(i.Box,{children:[t.jsx(S,{paddingLeft:7,paddingTop:2,paddingBottom:2,paddingRight:4,children:t.jsx(f.Flex,{justifyContent:"space-between",children:t.jsxs(b,{onClick:u,"aria-expanded":n,"aria-controls":s,children:[t.jsx(m,{rotated:n,children:t.jsx(x.CarretDown,{"aria-hidden":!0})}),t.jsx(i.Box,{paddingLeft:2,children:t.jsx(j.Typography,{as:"span",fontWeight:"semiBold",textColor:"neutral800",children:e})})]})})}),n&&t.jsx("ul",{id:s,children:d.Children.map(a,(r,p)=>t.jsx("li",{children:r},p))})]})};exports.SubNavLinkSection=k;
@@ -1,50 +1,35 @@
1
- import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
- import { useState as u, Children as f } from "react";
3
- import { CarretDown as g } from "@strapi/icons";
4
- import n from "prop-types";
5
- import d from "styled-components";
6
- import { useId as x } from "../../hooks/useId.js";
7
- import { Box as o } from "../../Box/Box.js";
8
- import { Flex as b } from "../../Flex/Flex.js";
9
- import { Typography as k } from "../../Typography/Typography.js";
10
- const y = d(o)`
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { useState as m, Children as h } from "react";
3
+ import { CarretDown as f } from "@strapi/icons";
4
+ import o from "styled-components";
5
+ import { useId as g } from "../../hooks/useId.js";
6
+ import { Box as i } from "../../Box/Box.js";
7
+ import { Flex as u } from "../../Flex/Flex.js";
8
+ import { Typography as x } from "../../Typography/Typography.js";
9
+ const k = o(i)`
11
10
  svg {
12
11
  height: ${4 / 16}rem;
13
12
  path {
14
- fill: ${({ theme: r }) => r.colors.neutral700};
13
+ fill: ${({ theme: t }) => t.colors.neutral700};
15
14
  }
16
15
  }
17
- `, C = d.button`
16
+ `, b = o.button`
18
17
  border: none;
19
18
  padding: 0;
20
19
  background: transparent;
21
20
  display: flex;
22
21
  align-items: center;
23
- `, S = d.div`
22
+ `, C = o.div`
24
23
  display: flex;
25
24
  align-items: center;
26
25
  width: ${12 / 16}rem;
27
- transform: rotateX(${({ rotated: r }) => r ? "0deg" : "180deg"});
28
- `, l = ({ label: r, children: s, id: c }) => {
29
- const [i, m] = u(!0), a = x(c);
30
- return /* @__PURE__ */ p(o, { children: [
31
- /* @__PURE__ */ e(y, { paddingLeft: 7, paddingTop: 2, paddingBottom: 2, paddingRight: 4, children: /* @__PURE__ */ e(b, { justifyContent: "space-between", children: /* @__PURE__ */ p(C, { onClick: () => {
32
- m((t) => !t);
33
- }, "aria-expanded": i, "aria-controls": a, children: [
34
- /* @__PURE__ */ e(S, { rotated: i, children: /* @__PURE__ */ e(g, { "aria-hidden": !0 }) }),
35
- /* @__PURE__ */ e(o, { paddingLeft: 2, children: /* @__PURE__ */ e(k, { as: "span", fontWeight: "semiBold", textColor: "neutral800", children: r }) })
36
- ] }) }) }),
37
- i && /* @__PURE__ */ e("ul", { id: a, children: f.map(s, (t, h) => /* @__PURE__ */ e("li", { children: t }, h)) })
38
- ] });
39
- };
40
- l.defaultProps = {
41
- id: void 0
42
- };
43
- l.propTypes = {
44
- children: n.node.isRequired,
45
- id: n.string,
46
- label: n.string.isRequired
26
+ transform: rotateX(${({ rotated: t }) => t ? "0deg" : "180deg"});
27
+ `, I = ({ label: t, children: l, id: p }) => {
28
+ const [n, s] = m(!0), d = g(p);
29
+ return a(i, { children: [e(k, { paddingLeft: 7, paddingTop: 2, paddingBottom: 2, paddingRight: 4, children: e(u, { justifyContent: "space-between", children: a(b, { onClick: () => {
30
+ s((r) => !r);
31
+ }, "aria-expanded": n, "aria-controls": d, children: [e(C, { rotated: n, children: e(f, { "aria-hidden": !0 }) }), e(i, { paddingLeft: 2, children: e(x, { as: "span", fontWeight: "semiBold", textColor: "neutral800", children: t }) })] }) }) }), n && e("ul", { id: d, children: h.map(l, (r, c) => e("li", { children: r }, c)) })] });
47
32
  };
48
33
  export {
49
- l as SubNavLinkSection
34
+ I as SubNavLinkSection
50
35
  };
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),b=require("prop-types"),S=require("styled-components"),q=require("./SubNavSectionLabel.cjs"),j=require("../../hooks/useId.cjs"),d=require("../../Box/Box.cjs"),v=require("../../Flex/Flex.cjs"),m=require("../../Badge/Badge.cjs"),u=e=>e&&e.__esModule?e:{default:e},r=u(b),y=u(S),_=y.default(d.Box)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),h=require("styled-components"),x=require("./SubNavSectionLabel.cjs"),S=require("../../hooks/useId.cjs"),l=require("../../Box/Box.cjs"),f=require("../../Flex/Flex.cjs"),j=require("../../Badge/Badge.cjs"),b=e=>e&&e.__esModule?e:{default:e},m=b(h),q=m.default(l.Box)`
2
2
  svg {
3
3
  height: ${4/16}rem;
4
4
  path {
5
5
  fill: ${({theme:e})=>e.colors.neutral500};
6
6
  }
7
7
  }
8
- `,o=({collapsable:e,label:c,badgeLabel:i,children:p,id:g})=>{const[s,f]=a.useState(!0),l=j.useId(g),h=()=>{f(n=>!n)};return t.jsxs(v.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[t.jsx(_,{paddingLeft:6,paddingTop:2,paddingBottom:2,paddingRight:4,children:t.jsxs(d.Box,{position:"relative",paddingRight:i?6:0,children:[t.jsx(q.SubNavSectionLabel,{onClick:h,ariaExpanded:s,ariaControls:l,collapsable:e,label:c}),i&&t.jsx(m.Badge,{backgroundColor:"neutral150",textColor:"neutral600",position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",children:i})]})}),(!e||s)&&t.jsx("ol",{id:l,children:a.Children.map(p,(n,x)=>t.jsx("li",{children:n},x))})]})};o.defaultProps={badgeLabel:null,collapsable:!1,id:void 0};o.propTypes={badgeLabel:r.default.string,children:r.default.node.isRequired,collapsable:r.default.bool,id:r.default.string,label:r.default.string.isRequired};exports.SubNavSection=o;
8
+ `,v=({collapsable:e=!1,label:a,badgeLabel:n,children:c,id:d})=>{const[i,u]=s.useState(!0),o=S.useId(d),p=()=>{u(r=>!r)};return t.jsxs(f.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[t.jsx(q,{paddingLeft:6,paddingTop:2,paddingBottom:2,paddingRight:4,children:t.jsxs(l.Box,{position:"relative",paddingRight:n?6:0,children:[t.jsx(x.SubNavSectionLabel,{onClick:p,ariaExpanded:i,ariaControls:o,collapsable:e,label:a}),n&&t.jsx(j.Badge,{backgroundColor:"neutral150",textColor:"neutral600",position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",children:n})]})}),(!e||i)&&t.jsx("ol",{id:o,children:s.Children.map(c,(r,g)=>t.jsx("li",{children:r},g))})]})};exports.SubNavSection=v;
@@ -1,63 +1,24 @@
1
- import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
- import { useState as h, Children as f } from "react";
3
- import o from "prop-types";
4
- import b from "styled-components";
5
- import { SubNavSectionLabel as x } from "./SubNavSectionLabel.js";
6
- import { useId as C } from "../../hooks/useId.js";
7
- import { Box as d } from "../../Box/Box.js";
8
- import { Flex as S } from "../../Flex/Flex.js";
9
- import { Badge as v } from "../../Badge/Badge.js";
10
- const k = b(d)`
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import { useState as h, Children as u } from "react";
3
+ import f from "styled-components";
4
+ import { SubNavSectionLabel as g } from "./SubNavSectionLabel.js";
5
+ import { useId as x } from "../../hooks/useId.js";
6
+ import { Box as a } from "../../Box/Box.js";
7
+ import { Flex as C } from "../../Flex/Flex.js";
8
+ import { Badge as S } from "../../Badge/Badge.js";
9
+ const k = f(a)`
11
10
  svg {
12
11
  height: ${4 / 16}rem;
13
12
  path {
14
- fill: ${({ theme: i }) => i.colors.neutral500};
13
+ fill: ${({ theme: o }) => o.colors.neutral500};
15
14
  }
16
15
  }
17
- `, s = ({ collapsable: i, label: p, badgeLabel: t, children: c, id: m }) => {
18
- const [n, u] = h(!0), l = C(m);
19
- return /* @__PURE__ */ a(S, { direction: "column", alignItems: "stretch", gap: 1, children: [
20
- /* @__PURE__ */ r(k, { paddingLeft: 6, paddingTop: 2, paddingBottom: 2, paddingRight: 4, children: /* @__PURE__ */ a(d, { position: "relative", paddingRight: t ? 6 : 0, children: [
21
- /* @__PURE__ */ r(
22
- x,
23
- {
24
- onClick: () => {
25
- u((e) => !e);
26
- },
27
- ariaExpanded: n,
28
- ariaControls: l,
29
- collapsable: i,
30
- label: p
31
- }
32
- ),
33
- t && /* @__PURE__ */ r(
34
- v,
35
- {
36
- backgroundColor: "neutral150",
37
- textColor: "neutral600",
38
- position: "absolute",
39
- right: 0,
40
- top: "50%",
41
- transform: "translateY(-50%)",
42
- children: t
43
- }
44
- )
45
- ] }) }),
46
- (!i || n) && /* @__PURE__ */ r("ol", { id: l, children: f.map(c, (e, g) => /* @__PURE__ */ r("li", { children: e }, g)) })
47
- ] });
48
- };
49
- s.defaultProps = {
50
- badgeLabel: null,
51
- collapsable: !1,
52
- id: void 0
53
- };
54
- s.propTypes = {
55
- badgeLabel: o.string,
56
- children: o.node.isRequired,
57
- collapsable: o.bool,
58
- id: o.string,
59
- label: o.string.isRequired
16
+ `, y = ({ collapsable: o = !1, label: d, badgeLabel: r, children: p, id: s }) => {
17
+ const [n, c] = h(!0), e = x(s);
18
+ return l(C, { direction: "column", alignItems: "stretch", gap: 1, children: [t(k, { paddingLeft: 6, paddingTop: 2, paddingBottom: 2, paddingRight: 4, children: l(a, { position: "relative", paddingRight: r ? 6 : 0, children: [t(g, { onClick: () => {
19
+ c((i) => !i);
20
+ }, ariaExpanded: n, ariaControls: e, collapsable: o, label: d }), r && t(S, { backgroundColor: "neutral150", textColor: "neutral600", position: "absolute", right: 0, top: "50%", transform: "translateY(-50%)", children: r })] }) }), (!o || n) && t("ol", { id: e, children: u.map(p, (i, m) => t("li", { children: i }, m)) })] });
60
21
  };
61
22
  export {
62
- s as SubNavSection
23
+ y as SubNavSection
63
24
  };
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("react");const x=require("@strapi/icons"),f=require("prop-types"),g=require("styled-components"),b=require("../../Flex/Flex.cjs"),l=require("../../Box/Box.cjs"),i=require("../../Typography/Typography.cjs"),d=e=>e&&e.__esModule?e:{default:e},t=d(f),u=d(g),s=u.default(b.Flex)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("@strapi/icons"),u=require("styled-components"),x=require("../../Flex/Flex.cjs"),o=require("../../Box/Box.cjs"),a=require("../../Typography/Typography.cjs"),g=e=>e&&e.__esModule?e:{default:e},s=g(u),i=s.default(x.Flex)`
2
2
  border: none;
3
3
  padding: 0;
4
4
  background: transparent;
5
- `,y=u.default.div`
5
+ `,p=s.default.div`
6
6
  display: flex;
7
7
  align-items: center;
8
8
  transform: rotateX(${({rotated:e})=>e?"0deg":"180deg"});
9
- `,a=({collapsable:e,label:n,onClick:c,ariaExpanded:o,ariaControls:p})=>e?r.jsxs(s,{as:"button",onClick:c,"aria-expanded":o,"aria-controls":p,textAlign:"left",children:[r.jsx(l.Box,{paddingRight:1,children:r.jsx(i.Typography,{variant:"sigma",textColor:"neutral600",children:n})}),e&&r.jsx(y,{rotated:o,children:r.jsx(x.CarretDown,{"aria-hidden":!0})})]}):r.jsx(s,{children:r.jsx(l.Box,{paddingRight:1,children:r.jsx(i.Typography,{variant:"sigma",textColor:"neutral600",children:n})})});a.defaultProps={ariaControls:null,ariaExpanded:null,collapsable:!1,onClick(){}};a.propTypes={ariaControls:t.default.string,ariaExpanded:t.default.bool,collapsable:t.default.bool,label:t.default.string.isRequired,onClick:t.default.func};exports.SubNavSectionLabel=a;
9
+ `,h=({collapsable:e=!1,label:t,onClick:d=()=>{},ariaExpanded:n,ariaControls:l})=>e?r.jsxs(i,{as:"button",onClick:d,"aria-expanded":n,"aria-controls":l,textAlign:"left",children:[r.jsx(o.Box,{paddingRight:1,children:r.jsx(a.Typography,{variant:"sigma",textColor:"neutral600",children:t})}),e&&r.jsx(p,{rotated:n,children:r.jsx(c.CarretDown,{"aria-hidden":!0})})]}):r.jsx(i,{children:r.jsx(o.Box,{paddingRight:1,children:r.jsx(a.Typography,{variant:"sigma",textColor:"neutral600",children:t})})});exports.SubNavSectionLabel=h;
@@ -1,47 +1,19 @@
1
- import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import "react";
3
- import { CarretDown as g } from "@strapi/icons";
4
- import o from "prop-types";
5
- import p from "styled-components";
6
- import { Flex as f } from "../../Flex/Flex.js";
7
- import { Box as a } from "../../Box/Box.js";
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
+ import { CarretDown as m } from "@strapi/icons";
3
+ import d from "styled-components";
4
+ import { Flex as s } from "../../Flex/Flex.js";
5
+ import { Box as o } from "../../Box/Box.js";
8
6
  import { Typography as i } from "../../Typography/Typography.js";
9
- const l = p(f)`
7
+ const a = d(s)`
10
8
  border: none;
11
9
  padding: 0;
12
10
  background: transparent;
13
- `, u = p.div`
11
+ `, g = d.div`
14
12
  display: flex;
15
13
  align-items: center;
16
14
  transform: rotateX(${({ rotated: t }) => t ? "0deg" : "180deg"});
17
- `, d = ({ collapsable: t, label: e, onClick: s, ariaExpanded: n, ariaControls: c }) => t ? /* @__PURE__ */ m(
18
- l,
19
- {
20
- as: "button",
21
- onClick: s,
22
- "aria-expanded": n,
23
- "aria-controls": c,
24
- textAlign: "left",
25
- children: [
26
- /* @__PURE__ */ r(a, { paddingRight: 1, children: /* @__PURE__ */ r(i, { variant: "sigma", textColor: "neutral600", children: e }) }),
27
- t && /* @__PURE__ */ r(u, { rotated: n, children: /* @__PURE__ */ r(g, { "aria-hidden": !0 }) })
28
- ]
29
- }
30
- ) : /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(a, { paddingRight: 1, children: /* @__PURE__ */ r(i, { variant: "sigma", textColor: "neutral600", children: e }) }) });
31
- d.defaultProps = {
32
- ariaControls: null,
33
- ariaExpanded: null,
34
- collapsable: !1,
35
- onClick() {
36
- }
37
- };
38
- d.propTypes = {
39
- ariaControls: o.string,
40
- ariaExpanded: o.bool,
41
- collapsable: o.bool,
42
- label: o.string.isRequired,
43
- onClick: o.func
44
- };
15
+ `, y = ({ collapsable: t = !1, label: e, onClick: l = () => {
16
+ }, ariaExpanded: n, ariaControls: p }) => t ? c(a, { as: "button", onClick: l, "aria-expanded": n, "aria-controls": p, textAlign: "left", children: [r(o, { paddingRight: 1, children: r(i, { variant: "sigma", textColor: "neutral600", children: e }) }), t && r(g, { rotated: n, children: r(m, { "aria-hidden": !0 }) })] }) : r(a, { children: r(o, { paddingRight: 1, children: r(i, { variant: "sigma", textColor: "neutral600", children: e }) }) });
45
17
  export {
46
- d as SubNavSectionLabel
18
+ y as SubNavSectionLabel
47
19
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("react"),l=require("prop-types"),d=require("../../Box/Box.cjs"),a=require("../../Flex/Flex.cjs"),p=e=>e&&e.__esModule?e:{default:e},x=p(l),n=({children:e,spacing:o=2,horizontal:t=!1,...s})=>r.jsx(d.Box,{paddingTop:2,paddingBottom:4,children:r.jsx(a.Flex,{as:"ol",gap:o,direction:t?"row":"column",alignItems:t?"center":"stretch",...s,children:u.Children.map(e,(i,c)=>r.jsx("li",{children:i},c))})});n.propTypes={children:x.default.node.isRequired};exports.SubNavSections=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),l=require("../../Box/Box.cjs"),u=require("../../Flex/Flex.cjs"),a=({children:t,spacing:n=2,horizontal:r=!1,...i})=>e.jsx(l.Box,{paddingTop:2,paddingBottom:4,children:e.jsx(u.Flex,{as:"ol",gap:n,direction:r?"row":"column",alignItems:r?"center":"stretch",...i,children:s.Children.map(t,(o,c)=>e.jsx("li",{children:o},c))})});exports.SubNavSections=a;
@@ -1,22 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { Children as m } from "react";
3
- import d from "prop-types";
2
+ import { Children as p } from "react";
4
3
  import { Box as c } from "../../Box/Box.js";
5
- import { Flex as l } from "../../Flex/Flex.js";
6
- const s = ({ children: e, spacing: i = 2, horizontal: o = !1, ...p }) => /* @__PURE__ */ r(c, { paddingTop: 2, paddingBottom: 4, children: /* @__PURE__ */ r(
7
- l,
8
- {
9
- as: "ol",
10
- gap: i,
11
- direction: o ? "row" : "column",
12
- alignItems: o ? "center" : "stretch",
13
- ...p,
14
- children: m.map(e, (t, n) => /* @__PURE__ */ r("li", { children: t }, n))
15
- }
16
- ) });
17
- s.propTypes = {
18
- children: d.node.isRequired
19
- };
4
+ import { Flex as d } from "../../Flex/Flex.js";
5
+ const g = ({ children: e, spacing: t = 2, horizontal: o = !1, ...i }) => r(c, { paddingTop: 2, paddingBottom: 4, children: r(d, { as: "ol", gap: t, direction: o ? "row" : "column", alignItems: o ? "center" : "stretch", ...i, children: p.map(e, (n, m) => r("li", { children: n }, m)) }) });
20
6
  export {
21
- s as SubNavSections
7
+ g as SubNavSections
22
8
  };