@strapi/design-system 1.6.3 → 1.6.4

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 (283) hide show
  1. package/dist/Accordion/Accordion.cjs +5 -5
  2. package/dist/Accordion/Accordion.js +45 -44
  3. package/dist/Accordion/AccordionContent.cjs +1 -1
  4. package/dist/Accordion/AccordionContent.js +4 -4
  5. package/dist/Accordion/AccordionGroup.cjs +4 -4
  6. package/dist/Accordion/AccordionGroup.js +18 -18
  7. package/dist/Accordion/AccordionToggle.cjs +2 -2
  8. package/dist/Accordion/AccordionToggle.js +11 -11
  9. package/dist/Alert/Alert.cjs +1 -1
  10. package/dist/Alert/Alert.js +8 -8
  11. package/dist/Avatar/Avatar.cjs +5 -5
  12. package/dist/Avatar/Avatar.js +11 -11
  13. package/dist/Avatar/AvatarGroup.cjs +2 -2
  14. package/dist/Avatar/AvatarGroup.js +4 -4
  15. package/dist/BaseButton/BaseButton.cjs +5 -11
  16. package/dist/BaseButton/BaseButton.js +31 -38
  17. package/dist/BaseCheckbox/BaseCheckbox.cjs +3 -3
  18. package/dist/BaseCheckbox/BaseCheckbox.js +22 -22
  19. package/dist/BaseRadio/BaseRadio.cjs +2 -2
  20. package/dist/BaseRadio/BaseRadio.js +4 -4
  21. package/dist/BaseRadio/RadioGroup.cjs +1 -1
  22. package/dist/BaseRadio/RadioGroup.js +28 -26
  23. package/dist/Box/Box.cjs +1 -1
  24. package/dist/Box/Box.js +1 -1
  25. package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
  26. package/dist/Breadcrumbs/Breadcrumbs.js +12 -12
  27. package/dist/Button/Button.cjs +10 -27
  28. package/dist/Button/Button.js +65 -85
  29. package/dist/Button/utils.cjs +22 -22
  30. package/dist/Button/utils.js +2 -2
  31. package/dist/Card/Card.cjs +1 -1
  32. package/dist/Card/Card.js +15 -14
  33. package/dist/Card/CardAsset.js +4 -4
  34. package/dist/Card/CardBody.cjs +1 -1
  35. package/dist/Card/CardBody.js +4 -4
  36. package/dist/Card/CardCheckbox.cjs +1 -1
  37. package/dist/Card/CardCheckbox.js +6 -6
  38. package/dist/Card/CardTitle.cjs +1 -1
  39. package/dist/Card/CardTitle.js +1 -1
  40. package/dist/CarouselInput/Carousel.cjs +2 -2
  41. package/dist/CarouselInput/Carousel.js +19 -64
  42. package/dist/CarouselInput/CarouselActions.js +1 -9
  43. package/dist/CarouselInput/CarouselImage.js +1 -10
  44. package/dist/CarouselInput/CarouselInput.cjs +1 -1
  45. package/dist/CarouselInput/CarouselInput.js +19 -24
  46. package/dist/CarouselInput/CarouselSlide.js +13 -9
  47. package/dist/Checkbox/Checkbox.cjs +2 -2
  48. package/dist/Checkbox/Checkbox.js +7 -26
  49. package/dist/Combobox/Combobox.cjs +1 -1
  50. package/dist/Combobox/Combobox.js +106 -120
  51. package/dist/Combobox/ComboboxOption.cjs +1 -1
  52. package/dist/Combobox/ComboboxOption.js +18 -17
  53. package/dist/DatePicker/DatePicker.cjs +1 -1
  54. package/dist/DatePicker/DatePicker.js +47 -46
  55. package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
  56. package/dist/DatePicker/DatePickerCalendar.js +28 -61
  57. package/dist/DatePicker/DatePickerTd.js +1 -12
  58. package/dist/DatePicker/DatePickerTh.cjs +3 -3
  59. package/dist/DatePicker/DatePickerTh.js +7 -16
  60. package/dist/DatePicker/components.cjs +3 -3
  61. package/dist/DatePicker/components.js +6 -6
  62. package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
  63. package/dist/DateTimePicker/DateTimePicker.js +64 -61
  64. package/dist/DateTimePicker/DateTimePickerProps.js +1 -3
  65. package/dist/Dialog/Dialog.cjs +4 -4
  66. package/dist/Dialog/Dialog.js +26 -37
  67. package/dist/Dialog/DialogBody.cjs +1 -1
  68. package/dist/Dialog/DialogBody.js +2 -11
  69. package/dist/Dialog/DialogFooter.cjs +1 -1
  70. package/dist/Dialog/DialogFooter.js +2 -7
  71. package/dist/DismissibleLayer/DismissibleLayer.js +1 -4
  72. package/dist/Divider/Divider.js +1 -5
  73. package/dist/EmptyStateLayout/EmptyStateLayout.cjs +1 -1
  74. package/dist/EmptyStateLayout/EmptyStateLayout.js +2 -16
  75. package/dist/EmptyStateLayout/story-assets/Illo.js +60 -45
  76. package/dist/Field/Field.cjs +1 -1
  77. package/dist/Field/Field.js +12 -13
  78. package/dist/Field/FieldAction.cjs +1 -1
  79. package/dist/Field/FieldAction.js +2 -6
  80. package/dist/Field/FieldError.js +1 -7
  81. package/dist/Field/FieldHint.js +1 -6
  82. package/dist/Field/FieldInput.cjs +4 -4
  83. package/dist/Field/FieldInput.js +26 -34
  84. package/dist/Field/FieldLabel.cjs +1 -1
  85. package/dist/Field/FieldLabel.js +3 -16
  86. package/dist/FocusTrap/FocusTrap.js +1 -5
  87. package/dist/Grid/Grid.cjs +3 -3
  88. package/dist/Grid/Grid.js +12 -15
  89. package/dist/Grid/GridItem.cjs +2 -2
  90. package/dist/Grid/GridItem.js +5 -13
  91. package/dist/IconButton/IconButton.cjs +7 -12
  92. package/dist/IconButton/IconButton.js +88 -84
  93. package/dist/JSONInput/JSONInput.cjs +1 -1
  94. package/dist/JSONInput/JSONInput.js +85 -78
  95. package/dist/JSONInput/JSONInputContainer.cjs +10 -10
  96. package/dist/JSONInput/JSONInputContainer.js +22 -15
  97. package/dist/Layout/ActionLayout.js +1 -13
  98. package/dist/Layout/ContentLayout.js +1 -4
  99. package/dist/Layout/HeaderLayout.cjs +1 -1
  100. package/dist/Layout/HeaderLayout.js +35 -64
  101. package/dist/Layout/Layout.js +1 -5
  102. package/dist/Layout/TwoColsLayout.js +1 -17
  103. package/dist/Link/Link.cjs +5 -5
  104. package/dist/Link/Link.js +55 -57
  105. package/dist/LinkButton/LinkButton.cjs +7 -24
  106. package/dist/LinkButton/LinkButton.js +60 -87
  107. package/dist/LiveRegions/LiveRegions.cjs +1 -1
  108. package/dist/LiveRegions/LiveRegions.js +1 -1
  109. package/dist/Loader/Loader.cjs +4 -4
  110. package/dist/Loader/Loader.js +26 -24
  111. package/dist/Main/Main.js +1 -6
  112. package/dist/Main/SkipToContent.cjs +2 -2
  113. package/dist/Main/SkipToContent.js +17 -13
  114. package/dist/MainNav/MainNav.cjs +2 -2
  115. package/dist/MainNav/MainNav.js +21 -20
  116. package/dist/MainNav/NavBrand.cjs +2 -2
  117. package/dist/MainNav/NavBrand.js +4 -38
  118. package/dist/MainNav/NavCondense.cjs +2 -2
  119. package/dist/MainNav/NavCondense.js +10 -18
  120. package/dist/MainNav/NavFooter.js +1 -3
  121. package/dist/MainNav/NavLink.cjs +4 -4
  122. package/dist/MainNav/NavLink.js +8 -34
  123. package/dist/MainNav/NavSection.cjs +1 -1
  124. package/dist/MainNav/NavSection.js +5 -38
  125. package/dist/MainNav/NavSections.cjs +2 -2
  126. package/dist/MainNav/NavSections.js +4 -15
  127. package/dist/MainNav/NavUser.cjs +2 -2
  128. package/dist/MainNav/NavUser.js +6 -27
  129. package/dist/ModalLayout/ModalBody.js +1 -4
  130. package/dist/ModalLayout/ModalFooter.cjs +1 -1
  131. package/dist/ModalLayout/ModalFooter.js +2 -10
  132. package/dist/ModalLayout/ModalHeader.cjs +2 -2
  133. package/dist/ModalLayout/ModalHeader.js +8 -20
  134. package/dist/ModalLayout/ModalLayout.cjs +3 -3
  135. package/dist/ModalLayout/ModalLayout.js +23 -31
  136. package/dist/NumberInput/NumberInput.cjs +2 -2
  137. package/dist/NumberInput/NumberInput.js +54 -59
  138. package/dist/Pagination/Pagination.cjs +2 -2
  139. package/dist/Pagination/Pagination.js +11 -16
  140. package/dist/Pagination/components.cjs +3 -3
  141. package/dist/Pagination/components.js +31 -38
  142. package/dist/Popover/Popover.cjs +3 -3
  143. package/dist/Popover/Popover.js +5 -5
  144. package/dist/Portal/Portal.cjs +1 -1
  145. package/dist/Portal/Portal.js +10 -12
  146. package/dist/ProgressBar/ProgressBar.js +17 -14
  147. package/dist/Radio/Radio.cjs +2 -2
  148. package/dist/Radio/Radio.js +4 -11
  149. package/dist/RawTable/RawCell.cjs +1 -1
  150. package/dist/RawTable/RawCell.js +5 -14
  151. package/dist/RawTable/RawTable.cjs +1 -1
  152. package/dist/RawTable/RawTable.js +36 -35
  153. package/dist/RawTable/RawTbody.js +1 -3
  154. package/dist/RawTable/RawThead.js +1 -3
  155. package/dist/RawTable/RawTr.js +1 -4
  156. package/dist/Searchbar/SearchForm.js +1 -4
  157. package/dist/Searchbar/Searchbar.cjs +3 -3
  158. package/dist/Searchbar/Searchbar.js +21 -25
  159. package/dist/Select/MultiSelectNested.js +2 -14
  160. package/dist/Select/OptGroup.cjs +1 -1
  161. package/dist/Select/OptGroup.js +14 -10
  162. package/dist/Select/Option.cjs +3 -3
  163. package/dist/Select/Option.js +31 -33
  164. package/dist/Select/Select.cjs +2 -2
  165. package/dist/Select/Select.js +86 -106
  166. package/dist/Select/SelectButton.cjs +1 -1
  167. package/dist/Select/SelectButton.js +14 -11
  168. package/dist/Select/SelectList.cjs +1 -1
  169. package/dist/Select/SelectList.js +20 -16
  170. package/dist/Select/SelectTags.cjs +3 -3
  171. package/dist/Select/SelectTags.js +17 -15
  172. package/dist/Select/SingleSelect.cjs +1 -1
  173. package/dist/Select/SingleSelect.js +1 -1
  174. package/dist/SimpleMenu/SimpleMenu.cjs +3 -3
  175. package/dist/SimpleMenu/SimpleMenu.js +43 -67
  176. package/dist/Status/Status.js +15 -13
  177. package/dist/SubNav/SubNav.cjs +2 -2
  178. package/dist/SubNav/SubNav.js +5 -9
  179. package/dist/SubNav/SubNavHeader.cjs +2 -2
  180. package/dist/SubNav/SubNavHeader.js +31 -53
  181. package/dist/SubNav/SubNavLink.cjs +3 -3
  182. package/dist/SubNav/SubNavLink.js +18 -22
  183. package/dist/SubNav/SubNavLinkSection.cjs +2 -2
  184. package/dist/SubNav/SubNavLinkSection.js +5 -30
  185. package/dist/SubNav/SubNavSection.cjs +2 -2
  186. package/dist/SubNav/SubNavSection.js +23 -30
  187. package/dist/SubNav/SubNavSectionLabel.cjs +2 -2
  188. package/dist/SubNav/SubNavSectionLabel.js +15 -24
  189. package/dist/SubNav/SubNavSections.cjs +1 -1
  190. package/dist/SubNav/SubNavSections.js +3 -12
  191. package/dist/Switch/Switch.cjs +2 -2
  192. package/dist/Switch/Switch.js +16 -17
  193. package/dist/Table/Cell.cjs +1 -1
  194. package/dist/Table/Cell.js +3 -8
  195. package/dist/Table/TFooter.cjs +2 -2
  196. package/dist/Table/TFooter.js +3 -17
  197. package/dist/Table/Table.cjs +1 -1
  198. package/dist/Table/Table.js +2 -18
  199. package/dist/Table/Tbody.js +1 -3
  200. package/dist/Table/Thead.js +1 -3
  201. package/dist/Table/Tr.js +1 -3
  202. package/dist/Tabs/TabGroup.cjs +1 -1
  203. package/dist/Tabs/TabGroup.js +30 -27
  204. package/dist/Tabs/TabPanels.js +2 -10
  205. package/dist/Tabs/Tabs.cjs +1 -1
  206. package/dist/Tabs/Tabs.js +43 -51
  207. package/dist/Tag/Tag.cjs +1 -1
  208. package/dist/Tag/Tag.js +20 -23
  209. package/dist/TextButton/TextButton.cjs +6 -6
  210. package/dist/TextButton/TextButton.js +15 -15
  211. package/dist/TextInput/TextInput.cjs +1 -1
  212. package/dist/TextInput/TextInput.js +6 -24
  213. package/dist/Textarea/Textarea.cjs +2 -2
  214. package/dist/Textarea/Textarea.js +10 -25
  215. package/dist/Textarea/TextareaInput.cjs +1 -1
  216. package/dist/Textarea/TextareaInput.js +15 -15
  217. package/dist/TimePicker/TimePicker.cjs +2 -2
  218. package/dist/TimePicker/TimePicker.js +26 -25
  219. package/dist/ToggleCheckbox/ToggleCheckbox.cjs +5 -5
  220. package/dist/ToggleCheckbox/ToggleCheckbox.js +85 -60
  221. package/dist/ToggleInput/ToggleInput.cjs +3 -3
  222. package/dist/ToggleInput/ToggleInput.js +14 -32
  223. package/dist/Tooltip/Tooltip.cjs +2 -2
  224. package/dist/Tooltip/Tooltip.js +62 -53
  225. package/dist/Tooltip/hooks/useTooltipHandlers.cjs +1 -1
  226. package/dist/Tooltip/hooks/useTooltipHandlers.js +7 -7
  227. package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -1
  228. package/dist/Tooltip/hooks/useTooltipLayout.js +8 -5
  229. package/dist/Typography/Typography.cjs +3 -2
  230. package/dist/Typography/Typography.js +17 -14
  231. package/dist/helpers/objects.cjs +1 -1
  232. package/dist/helpers/objects.js +1 -1
  233. package/dist/hooks/useId.cjs +1 -0
  234. package/dist/hooks/useId.js +13 -0
  235. package/dist/themes/extendTheme.cjs +1 -1
  236. package/dist/themes/extendTheme.js +4 -4
  237. package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
  238. package/dist/v2/Breadcrumbs/Breadcrumbs.js +4 -13
  239. package/dist/v2/Breadcrumbs/Crumb.js +11 -12
  240. package/dist/v2/Breadcrumbs/CrumbLink.js +1 -3
  241. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
  242. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +5 -11
  243. package/dist/v2/Breadcrumbs/Divider.js +1 -8
  244. package/dist/v2/Link/Link.cjs +2 -2
  245. package/dist/v2/Link/Link.js +5 -24
  246. package/dist/v2/LinkButton/LinkButton.cjs +11 -24
  247. package/dist/v2/LinkButton/LinkButton.js +62 -84
  248. package/dist/v2/MainNav/MainNav.cjs +2 -2
  249. package/dist/v2/MainNav/MainNav.js +21 -20
  250. package/dist/v2/MainNav/NavBrand.cjs +2 -2
  251. package/dist/v2/MainNav/NavBrand.js +4 -38
  252. package/dist/v2/MainNav/NavCondense.cjs +2 -2
  253. package/dist/v2/MainNav/NavCondense.js +10 -18
  254. package/dist/v2/MainNav/NavFooter.js +1 -3
  255. package/dist/v2/MainNav/NavLink.cjs +4 -4
  256. package/dist/v2/MainNav/NavLink.js +10 -39
  257. package/dist/v2/MainNav/NavSection.cjs +1 -1
  258. package/dist/v2/MainNav/NavSection.js +5 -38
  259. package/dist/v2/MainNav/NavSections.cjs +2 -2
  260. package/dist/v2/MainNav/NavSections.js +4 -15
  261. package/dist/v2/MainNav/NavUser.cjs +2 -2
  262. package/dist/v2/MainNav/NavUser.js +6 -27
  263. package/dist/v2/Pagination/Pagination.cjs +2 -2
  264. package/dist/v2/Pagination/Pagination.js +11 -16
  265. package/dist/v2/Pagination/components.cjs +2 -2
  266. package/dist/v2/Pagination/components.js +11 -39
  267. package/dist/v2/SimpleMenu/SimpleMenu.cjs +4 -4
  268. package/dist/v2/SimpleMenu/SimpleMenu.js +42 -65
  269. package/dist/v2/SubNav/SubNav.cjs +2 -2
  270. package/dist/v2/SubNav/SubNav.js +5 -9
  271. package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
  272. package/dist/v2/SubNav/SubNavHeader.js +31 -53
  273. package/dist/v2/SubNav/SubNavLink.cjs +2 -2
  274. package/dist/v2/SubNav/SubNavLink.js +18 -22
  275. package/dist/v2/SubNav/SubNavLinkSection.cjs +2 -2
  276. package/dist/v2/SubNav/SubNavLinkSection.js +5 -30
  277. package/dist/v2/SubNav/SubNavSection.cjs +2 -2
  278. package/dist/v2/SubNav/SubNavSection.js +26 -33
  279. package/dist/v2/SubNav/SubNavSectionLabel.cjs +2 -2
  280. package/dist/v2/SubNav/SubNavSectionLabel.js +15 -24
  281. package/dist/v2/SubNav/SubNavSections.cjs +1 -1
  282. package/dist/v2/SubNav/SubNavSections.js +3 -12
  283. package/package.json +7 -4
@@ -1,57 +1,50 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import a from "react";
3
- import d from "styled-components";
4
- import { buttonFocusStyle as i } from "../themes/utils.js";
5
- const n = d.button`
6
- display: flex;
7
- cursor: pointer;
8
- padding: ${({
9
- theme: r
10
- }) => r.spaces[2]};
11
- border-radius: ${({
12
- theme: r
13
- }) => r.borderRadius};
14
- background: ${({
15
- theme: r
16
- }) => r.colors.neutral0};
17
- border: 1px solid ${({
18
- theme: r
19
- }) => r.colors.neutral200};
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import s from "react";
3
+ import n from "styled-components";
4
+ import { Flex as i } from "../Flex/Flex.js";
5
+ import { buttonFocusStyle as u } from "../themes/utils.js";
6
+ const p = n(i)`
20
7
  svg {
21
8
  height: ${({
22
- theme: r
23
- }) => r.spaces[3]};
9
+ theme: t
10
+ }) => t.spaces[3]};
24
11
  width: ${({
25
- theme: r
26
- }) => r.spaces[3]};
27
- }
28
- svg {
12
+ theme: t
13
+ }) => t.spaces[3]};
14
+
29
15
  > g,
30
16
  path {
31
17
  fill: ${({
32
- theme: r
33
- }) => r.colors.neutral0};
18
+ theme: t
19
+ }) => t.colors.neutral0};
34
20
  }
35
21
  }
22
+
36
23
  &[aria-disabled='true'] {
37
24
  pointer-events: none;
38
25
  }
39
26
 
40
- ${i}
41
- `, l = a.forwardRef(({
42
- disabled: r,
43
- children: t,
27
+ ${u}
28
+ `, d = s.forwardRef(({
29
+ disabled: t,
30
+ children: r,
44
31
  ...e
45
- }, o) => s(n, {
32
+ }, o) => a(p, {
46
33
  ref: o,
47
- "aria-disabled": r,
34
+ "aria-disabled": t,
35
+ as: "button",
48
36
  type: "button",
49
- disabled: r,
37
+ disabled: t,
38
+ padding: 2,
39
+ hasRadius: !0,
40
+ background: "neutral0",
41
+ borderColor: "neutral200",
42
+ cursor: "pointer",
50
43
  ...e,
51
- children: t
44
+ children: r
52
45
  }));
53
- l.displayName = "BaseButton";
46
+ d.displayName = "BaseButton";
54
47
  export {
55
- l as BaseButton,
56
- n as BaseButtonWrapper
48
+ d as BaseButton,
49
+ p as BaseButtonWrapper
57
50
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react/jsx-runtime"),a=require("react"),b=require("styled-components"),p=require("../Box/Box.cjs"),s=require("./utils.cjs"),k=require("./assets/checkmark.cjs"),h=require("./assets/checkmark-black.cjs"),f=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},x=f(b),g=x.default.input`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),b=require("react"),p=require("styled-components"),f=require("./assets/checkmark-black.cjs"),k=require("./assets/checkmark.cjs"),s=require("./utils.cjs"),h=require("../Box/Box.cjs"),x=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function g(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const l=g(b),m=x(p),y=m.default.input`
2
2
  height: ${s.getCheckboxSize};
3
3
  min-width: ${s.getCheckboxSize};
4
4
  margin: 0;
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  &:disabled:after {
28
- background: url(${h}) no-repeat no-repeat center center;
28
+ background: url(${f}) no-repeat no-repeat center center;
29
29
  }
30
30
  }
31
31
 
@@ -59,4 +59,4 @@
59
59
  }
60
60
  }
61
61
  }
62
- `,n=({indeterminate:e=!1,size:l="M",name:i,value:o=!1,onValueChange:t,...u})=>{const r=a.useRef(null);a.useEffect(()=>{r.current&&e?r.current.indeterminate=e:r.current.indeterminate=!1},[e]);const d=()=>{t&&t(!o)};return c.jsx(p.Box,{children:c.jsx(g,{size:l,checked:o,onChange:d,type:"checkbox",ref:r,name:i,...u})})};n.displayName="BaseCheckbox";exports.BaseCheckbox=n;
62
+ `,i=({indeterminate:e=!1,size:o="M",name:r,value:t=!1,onValueChange:a,...u})=>{const c=l.useRef(null);l.useEffect(()=>{c.current&&e?c.current.indeterminate=e:c.current.indeterminate=!1},[e]);const d=()=>{a&&a(!t)};return n.jsx(h.Box,{children:n.jsx(y,{size:o,checked:t,onChange:d,type:"checkbox",ref:c,name:r,...u})})};i.displayName="BaseCheckbox";exports.BaseCheckbox=i;
@@ -1,13 +1,13 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { useRef as s, useEffect as d } from "react";
3
- import p from "styled-components";
4
- import { Box as u } from "../Box/Box.js";
5
- import { getCheckboxSize as c } from "./utils.js";
6
- import b from "./assets/checkmark.js";
7
- import m from "./assets/checkmark-black.js";
8
- const f = p.input`
9
- height: ${c};
10
- min-width: ${c};
2
+ import * as c from "react";
3
+ import d from "styled-components";
4
+ import p from "./assets/checkmark-black.js";
5
+ import u from "./assets/checkmark.js";
6
+ import { getCheckboxSize as n } from "./utils.js";
7
+ import { Box as b } from "../Box/Box.js";
8
+ const m = d.input`
9
+ height: ${n};
10
+ min-width: ${n};
11
11
  margin: 0;
12
12
  border-radius: ${({
13
13
  theme: r
@@ -33,7 +33,7 @@ const f = p.input`
33
33
  content: '';
34
34
  display: block;
35
35
  position: relative;
36
- background: url(${b}) no-repeat no-repeat center center;
36
+ background: url(${u}) no-repeat no-repeat center center;
37
37
  width: 10px;
38
38
  height: 10px;
39
39
  left: 50%;
@@ -42,7 +42,7 @@ const f = p.input`
42
42
  }
43
43
 
44
44
  &:disabled:after {
45
- background: url(${m}) no-repeat no-repeat center center;
45
+ background: url(${p}) no-repeat no-repeat center center;
46
46
  }
47
47
  }
48
48
 
@@ -92,32 +92,32 @@ const f = p.input`
92
92
  }
93
93
  }
94
94
  }
95
- `, h = ({
95
+ `, f = ({
96
96
  indeterminate: r = !1,
97
- size: n = "M",
98
- name: l,
97
+ size: l = "M",
98
+ name: s,
99
99
  value: e = !1,
100
100
  onValueChange: t,
101
101
  ...i
102
102
  }) => {
103
- const o = s(null);
104
- return d(() => {
103
+ const o = c.useRef(null);
104
+ return c.useEffect(() => {
105
105
  o.current && r ? o.current.indeterminate = r : o.current.indeterminate = !1;
106
- }, [r]), a(u, {
107
- children: a(f, {
108
- size: n,
106
+ }, [r]), a(b, {
107
+ children: a(m, {
108
+ size: l,
109
109
  checked: e,
110
110
  onChange: () => {
111
111
  t && t(!e);
112
112
  },
113
113
  type: "checkbox",
114
114
  ref: o,
115
- name: l,
115
+ name: s,
116
116
  ...i
117
117
  })
118
118
  });
119
119
  };
120
- h.displayName = "BaseCheckbox";
120
+ f.displayName = "BaseCheckbox";
121
121
  export {
122
- h as BaseCheckbox
122
+ f as BaseCheckbox
123
123
  };
@@ -1,4 +1,4 @@
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`
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("./context.cjs"),t=require("./utils.cjs"),R=require("../helpers/useId.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
- `,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;
31
+ `,a=m.default.forwardRef(({value:e,disabled:n=!1,...i},c)=>{const s=R.useId(),{onChange:l,selected:u,name:p,size:f}=r.useContext(y.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,9 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
2
  import u, { useContext as b } from "react";
3
3
  import g from "styled-components";
4
- import { useId as h } from "../helpers/useId.js";
5
- import { RadioContext as $ } from "./context.js";
4
+ import { RadioContext as h } from "./context.js";
6
5
  import { getRadioSize as r, getSelectedRadioSize as t, getSelectedRadioPosition as d } from "./utils.js";
6
+ import { useId as $ } from "../helpers/useId.js";
7
7
  const y = g.input`
8
8
  margin: 0;
9
9
  padding: 0;
@@ -57,12 +57,12 @@ const y = g.input`
57
57
  disabled: a = !1,
58
58
  ...n
59
59
  }, i) => {
60
- const c = h(), {
60
+ const c = $(), {
61
61
  onChange: l,
62
62
  selected: p,
63
63
  name: m,
64
64
  size: s
65
- } = b($), o = p === e;
65
+ } = b(h), o = p === e;
66
66
  return f(y, {
67
67
  ref: i,
68
68
  type: "radio",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),s=require("react"),a=require("./context.cjs"),l=require("../helpers/setTabIndexOnFirstItem.cjs"),x=({children:i,labelledBy:n,onChange:u,value:e="",size:c="M",name:t,...d})=>{const r=s.useRef(null);return s.useLayoutEffect(()=>{e||l.setTabIndexOnFirstItem(r.current,`[name="${t}"]`)},[e,t]),o.jsx(a.RadioContext.Provider,{value:{onChange:u,selected:e,name:t,size:c},children:o.jsx("div",{ref:r,role:"radiogroup","aria-labelledby":n,...d,children:i})})};exports.RadioGroup=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react/jsx-runtime"),r=require("react"),l=require("./context.cjs"),x=require("../helpers/setTabIndexOnFirstItem.cjs"),b=({children:n,labelledBy:u,onChange:o,value:e="",size:s="M",name:t,...d})=>{const i=r.useRef(null);r.useLayoutEffect(()=>{e||x.setTabIndexOnFirstItem(i.current,`[name="${t}"]`)},[e,t]);const a=r.useMemo(()=>({onChange:o,selected:e,name:t,size:s}),[t,o,s,e]);return c.jsx(l.RadioContext.Provider,{value:a,children:c.jsx("div",{ref:i,role:"radiogroup","aria-labelledby":u,...d,children:n})})};exports.RadioGroup=b;
@@ -1,35 +1,37 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useRef as m, useLayoutEffect as p } from "react";
3
- import { RadioContext as s } from "./context.js";
4
- import { setTabIndexOnFirstItem as u } from "../helpers/setTabIndexOnFirstItem.js";
5
- const b = ({
6
- children: i,
7
- labelledBy: d,
8
- onChange: f,
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { useRef as n, useLayoutEffect as p, useMemo as u } from "react";
3
+ import { RadioContext as l } from "./context.js";
4
+ import { setTabIndexOnFirstItem as x } from "../helpers/setTabIndexOnFirstItem.js";
5
+ const G = ({
6
+ children: f,
7
+ labelledBy: c,
8
+ onChange: t,
9
9
  value: r = "",
10
- size: n = "M",
10
+ size: e = "M",
11
11
  name: o,
12
- ...l
12
+ ...s
13
13
  }) => {
14
- const e = m(null);
15
- return p(() => {
16
- r || u(e.current, `[name="${o}"]`);
17
- }, [r, o]), t(s.Provider, {
18
- value: {
19
- onChange: f,
20
- selected: r,
21
- name: o,
22
- size: n
23
- },
24
- children: t("div", {
25
- ref: e,
14
+ const i = n(null);
15
+ p(() => {
16
+ r || x(i.current, `[name="${o}"]`);
17
+ }, [r, o]);
18
+ const m = u(() => ({
19
+ onChange: t,
20
+ selected: r,
21
+ name: o,
22
+ size: e
23
+ }), [o, t, e, r]);
24
+ return d(l.Provider, {
25
+ value: m,
26
+ children: d("div", {
27
+ ref: i,
26
28
  role: "radiogroup",
27
- "aria-labelledby": d,
28
- ...l,
29
- children: i
29
+ "aria-labelledby": c,
30
+ ...s,
31
+ children: f
30
32
  })
31
33
  });
32
34
  };
33
35
  export {
34
- b as RadioGroup
36
+ G as RadioGroup
35
37
  };
package/dist/Box/Box.cjs CHANGED
@@ -27,7 +27,7 @@
27
27
  border-style: ${({borderStyle:e})=>e};
28
28
  border-width: ${({borderWidth:e})=>e};
29
29
  border-color: ${({borderColor:e,theme:t})=>r.extractStyleFromTheme(t.colors,e,void 0)};
30
- border: ${({theme:e,borderColor:t,borderStyle:s,borderWidth:n})=>{if(t&&!s&&!n)return`1px solid ${e.colors[t]}`}};
30
+ border: ${({theme:e,borderColor:t,borderStyle:s,borderWidth:n})=>{if(t&&!s&&typeof n>"u")return`1px solid ${e.colors[t]}`}};
31
31
 
32
32
  // Shadows
33
33
  box-shadow: ${({theme:e,shadow:t})=>r.extractStyleFromTheme(e.shadows,t,void 0)};
package/dist/Box/Box.js CHANGED
@@ -96,7 +96,7 @@ const t = {
96
96
  borderStyle: i,
97
97
  borderWidth: n
98
98
  }) => {
99
- if (o && !i && !n)
99
+ if (o && !i && typeof n > "u")
100
100
  return `1px solid ${e.colors[o]}`;
101
101
  }};
102
102
 
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),d=require("styled-components"),u=require("@strapi/icons"),t=require("../Typography/Typography.cjs"),s=require("../Box/Box.cjs"),i=require("../Flex/Flex.cjs"),c=require("../VisuallyHidden/VisuallyHidden.cjs"),p=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},y=p(d),h=y.default(i.Flex)`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),d=require("@strapi/icons"),u=require("styled-components"),t=require("../Box/Box.cjs"),s=require("../Flex/Flex.cjs"),i=require("../Typography/Typography.cjs"),c=require("../VisuallyHidden/VisuallyHidden.cjs"),p=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},y=p(u),h=y.default(s.Flex)`
2
2
  svg {
3
3
  height: ${10/16}rem;
4
4
  width: ${10/16}rem;
@@ -6,11 +6,11 @@
6
6
  fill: ${({theme:e})=>e.colors.neutral500};
7
7
  }
8
8
  }
9
- :last-of-type ${s.Box} {
9
+ :last-of-type ${t.Box} {
10
10
  display: none;
11
11
  }
12
- :last-of-type ${t.Typography} {
12
+ :last-of-type ${i.Typography} {
13
13
  color: ${({theme:e})=>e.colors.neutral800};
14
14
  font-weight: ${({theme:e})=>e.fontWeights.bold};
15
15
  }
16
- `,l=({children:e})=>r.jsxs(h,{inline:!0,as:"li",children:[r.jsx(t.Typography,{variant:"pi",textColor:"neutral600",children:e}),r.jsx(s.Box,{"aria-hidden":!0,paddingLeft:3,paddingRight:3,children:r.jsx(u.ChevronRight,{})})]});l.displayName="Crumb";const o=({children:e,label:n,...a})=>r.jsxs(i.Flex,{...a,children:[r.jsx(c.VisuallyHidden,{children:n}),r.jsx("ol",{"aria-hidden":!0,children:e})]});o.displayName="Breadcrumbs";exports.Breadcrumbs=o;exports.Crumb=l;
16
+ `,l=({children:e})=>r.jsxs(h,{inline:!0,as:"li",children:[r.jsx(i.Typography,{variant:"pi",textColor:"neutral600",children:e}),r.jsx(t.Box,{"aria-hidden":!0,paddingLeft:3,paddingRight:3,children:r.jsx(d.ChevronRight,{})})]});l.displayName="Crumb";const o=({children:e,label:n,...a})=>r.jsxs(s.Flex,{...a,children:[r.jsx(c.VisuallyHidden,{children:n}),r.jsx("ol",{"aria-hidden":!0,children:e})]});o.displayName="Breadcrumbs";exports.Breadcrumbs=o;exports.Crumb=l;
@@ -1,11 +1,11 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import d from "styled-components";
3
- import { ChevronRight as m } from "@strapi/icons";
4
- import { Typography as o } from "../Typography/Typography.js";
5
- import { Box as t } from "../Box/Box.js";
6
- import { Flex as l } from "../Flex/Flex.js";
2
+ import { ChevronRight as d } from "@strapi/icons";
3
+ import m from "styled-components";
4
+ import { Box as o } from "../Box/Box.js";
5
+ import { Flex as t } from "../Flex/Flex.js";
6
+ import { Typography as l } from "../Typography/Typography.js";
7
7
  import { VisuallyHidden as p } from "../VisuallyHidden/VisuallyHidden.js";
8
- const s = d(l)`
8
+ const s = m(t)`
9
9
  svg {
10
10
  height: ${10 / 16}rem;
11
11
  width: ${10 / 16}rem;
@@ -15,10 +15,10 @@ const s = d(l)`
15
15
  }) => r.colors.neutral500};
16
16
  }
17
17
  }
18
- :last-of-type ${t} {
18
+ :last-of-type ${o} {
19
19
  display: none;
20
20
  }
21
- :last-of-type ${o} {
21
+ :last-of-type ${l} {
22
22
  color: ${({
23
23
  theme: r
24
24
  }) => r.colors.neutral800};
@@ -31,15 +31,15 @@ const s = d(l)`
31
31
  }) => i(s, {
32
32
  inline: !0,
33
33
  as: "li",
34
- children: [e(o, {
34
+ children: [e(l, {
35
35
  variant: "pi",
36
36
  textColor: "neutral600",
37
37
  children: r
38
- }), e(t, {
38
+ }), e(o, {
39
39
  "aria-hidden": !0,
40
40
  paddingLeft: 3,
41
41
  paddingRight: 3,
42
- children: e(m, {})
42
+ children: e(d, {})
43
43
  })]
44
44
  });
45
45
  h.displayName = "Crumb";
@@ -47,7 +47,7 @@ const c = ({
47
47
  children: r,
48
48
  label: n,
49
49
  ...a
50
- }) => i(l, {
50
+ }) => i(t, {
51
51
  ...a,
52
52
  children: [e(p, {
53
53
  children: n
@@ -1,48 +1,31 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),S=require("react"),f=require("styled-components"),q=require("@strapi/icons"),p=require("../Typography/Typography.cjs"),s=require("../Box/Box.cjs"),T=require("../BaseButton/BaseButton.cjs"),r=require("./utils.cjs"),u=require("./constants.cjs"),g=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},_=g(S),n=g(f),D=f.keyframes`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),q=require("react"),v=require("@strapi/icons"),l=require("styled-components"),d=require("./constants.cjs"),r=require("./utils.cjs"),S=require("../BaseButton/BaseButton.cjs"),T=require("../Box/Box.cjs"),_=require("../Flex/Flex.cjs"),$=require("../Typography/Typography.cjs"),f=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},D=f(q),p=f(l),F=l.keyframes`
2
2
  from {
3
3
  transform: rotate(0deg);
4
4
  }
5
5
  to {
6
6
  transform: rotate(359deg);
7
7
  }
8
- `,L=n.default.div`
9
- animation: ${D} 2s infinite linear;
8
+ `,L=p.default.div`
9
+ animation: ${F} 2s infinite linear;
10
10
  will-change: transform;
11
- `,R=n.default(s.Box)`
12
- height: 100%;
13
- `,y=n.default(T.BaseButton)`
14
- align-items: center;
15
- background-color: ${({theme:t})=>t.colors.buttonPrimary600};
16
- border: 1px solid ${({theme:t})=>t.colors.buttonPrimary600};
17
- height: ${({theme:t,size:i})=>t.sizes.button[i]};
18
- padding-left: ${({theme:t})=>t.spaces[4]};
19
- padding-right: ${({theme:t})=>t.spaces[4]};
20
-
21
- ${s.Box} {
22
- display: flex;
23
- align-items: center;
24
- }
25
-
26
- ${p.Typography} {
27
- color: ${({theme:t})=>t.colors.buttonNeutral0};
28
- }
11
+ `,y=p.default(S.BaseButton)`
12
+ height: ${({theme:e,size:n})=>e.sizes.button[n]};
29
13
 
30
14
  &[aria-disabled='true'] {
31
15
  ${r.getDisabledStyle}
16
+
32
17
  &:active {
33
18
  ${r.getDisabledStyle}
34
19
  }
35
20
  }
21
+
36
22
  &:hover {
37
23
  ${r.getHoverStyle}
38
24
  }
25
+
39
26
  &:active {
40
27
  ${r.getActiveStyle}
41
28
  }
29
+
42
30
  ${r.getVariantStyle}
43
- ${({fullWidth:t})=>t&&`
44
- display: inline-flex;
45
- justify-content: center;
46
- width: 100%;
47
- `}
48
- `,h=_.default.forwardRef(({variant:t=u.DEFAULT,startIcon:i,endIcon:l,disabled:B=!1,children:x,onClick:c,size:d=u.BUTTON_SIZES[0],loading:a=!1,fullWidth:b=!1,...j},m)=>{const o=B||a,$=v=>{!o&&c&&c(v)};return e.jsxs(y,{ref:m,"aria-disabled":o,disabled:o,size:d,variant:t,onClick:$,fullWidth:b,...j,children:[(i||a)&&e.jsx(R,{"aria-hidden":!0,paddingRight:2,children:a?e.jsx(L,{children:e.jsx(q.Loader,{})}):i}),e.jsx(p.Typography,{variant:d==="S"?"pi":void 0,fontWeight:"bold",lineHeight:0,children:x}),l&&e.jsx(s.Box,{"aria-hidden":!0,paddingLeft:2,children:l})]})});h.displayName="Button";exports.Button=h;exports.ButtonWrapper=y;
31
+ `,g=D.default.forwardRef(({variant:e=d.DEFAULT,startIcon:n,endIcon:s,disabled:h=!1,children:B,onClick:c,size:u=d.BUTTON_SIZES[0],loading:i=!1,fullWidth:a=!1,...j},x)=>{const o=h||i,b=m=>{!o&&c&&c(m)};return t.jsxs(y,{ref:x,"aria-disabled":o,disabled:o,size:u,variant:e,onClick:b,fullWidth:a,alignItems:"center",background:"buttonPrimary600",borderColor:"buttonPrimary600",gap:2,inline:a,justifyContent:a?"center":void 0,paddingLeft:4,paddingRight:4,width:a?"100%":void 0,...j,children:[(n||i)&&t.jsx(T.Box,{"aria-hidden":!0,children:i?t.jsx(L,{children:t.jsx(v.Loader,{})}):n}),t.jsx($.Typography,{variant:u==="S"?"pi":void 0,fontWeight:"bold",lineHeight:0,textColor:"buttonNeutral0",children:B}),s&&t.jsx(_.Flex,{"aria-hidden":!0,children:s})]})});g.displayName="Button";exports.Button=g;exports.ButtonWrapper=y;
@@ -1,118 +1,98 @@
1
- import { jsxs as y, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as h, jsx as t } from "react/jsx-runtime";
2
2
  import b from "react";
3
- import a, { keyframes as v } from "styled-components";
4
- import { Loader as x } from "@strapi/icons";
5
- import { Typography as c } from "../Typography/Typography.js";
6
- import { Box as n } from "../Box/Box.js";
7
- import { BaseButton as B } from "../BaseButton/BaseButton.js";
8
- import { getDisabledStyle as f, getHoverStyle as S, getActiveStyle as k, getVariantStyle as L } from "./utils.js";
9
- import { DEFAULT as T, BUTTON_SIZES as W } from "./constants.js";
10
- const j = v`
3
+ import { Loader as y } from "@strapi/icons";
4
+ import s, { keyframes as v } from "styled-components";
5
+ import { DEFAULT as B, BUTTON_SIZES as S } from "./constants.js";
6
+ import { getDisabledStyle as l, getHoverStyle as $, getActiveStyle as x, getVariantStyle as C } from "./utils.js";
7
+ import { BaseButton as k } from "../BaseButton/BaseButton.js";
8
+ import { Box as L } from "../Box/Box.js";
9
+ import { Flex as T } from "../Flex/Flex.js";
10
+ import { Typography as j } from "../Typography/Typography.js";
11
+ const w = v`
11
12
  from {
12
13
  transform: rotate(0deg);
13
14
  }
14
15
  to {
15
16
  transform: rotate(359deg);
16
17
  }
17
- `, w = a.div`
18
- animation: ${j} 2s infinite linear;
18
+ `, D = s.div`
19
+ animation: ${w} 2s infinite linear;
19
20
  will-change: transform;
20
- `, D = a(n)`
21
- height: 100%;
22
- `, H = a(B)`
23
- align-items: center;
24
- background-color: ${({
25
- theme: t
26
- }) => t.colors.buttonPrimary600};
27
- border: 1px solid ${({
28
- theme: t
29
- }) => t.colors.buttonPrimary600};
21
+ `, N = s(k)`
30
22
  height: ${({
31
- theme: t,
32
- size: r
33
- }) => t.sizes.button[r]};
34
- padding-left: ${({
35
- theme: t
36
- }) => t.spaces[4]};
37
- padding-right: ${({
38
- theme: t
39
- }) => t.spaces[4]};
40
-
41
- ${n} {
42
- display: flex;
43
- align-items: center;
44
- }
45
-
46
- ${c} {
47
- color: ${({
48
- theme: t
49
- }) => t.colors.buttonNeutral0};
50
- }
23
+ theme: i,
24
+ size: e
25
+ }) => i.sizes.button[e]};
51
26
 
52
27
  &[aria-disabled='true'] {
53
- ${f}
28
+ ${l}
29
+
54
30
  &:active {
55
- ${f}
31
+ ${l}
56
32
  }
57
33
  }
34
+
58
35
  &:hover {
59
- ${S}
36
+ ${$}
60
37
  }
38
+
61
39
  &:active {
62
- ${k}
40
+ ${x}
63
41
  }
64
- ${L}
65
- ${({
66
- fullWidth: t
67
- }) => t && `
68
- display: inline-flex;
69
- justify-content: center;
70
- width: 100%;
71
- `}
72
- `, N = b.forwardRef(({
73
- variant: t = T,
74
- startIcon: r,
75
- endIcon: l,
76
- disabled: m = !1,
42
+
43
+ ${C}
44
+ `, R = b.forwardRef(({
45
+ variant: i = B,
46
+ startIcon: e,
47
+ endIcon: n,
48
+ disabled: f = !1,
77
49
  children: p,
78
50
  onClick: d,
79
- size: s = W[0],
80
- loading: i = !1,
81
- fullWidth: h = !1,
82
- ...g
51
+ size: m = S[0],
52
+ loading: o = !1,
53
+ fullWidth: r = !1,
54
+ ...c
83
55
  }, u) => {
84
- const o = m || i;
85
- return y(H, {
56
+ const a = f || o;
57
+ return h(N, {
86
58
  ref: u,
87
- "aria-disabled": o,
88
- disabled: o,
89
- size: s,
90
- variant: t,
91
- onClick: ($) => {
92
- !o && d && d($);
59
+ "aria-disabled": a,
60
+ disabled: a,
61
+ size: m,
62
+ variant: i,
63
+ onClick: (g) => {
64
+ !a && d && d(g);
93
65
  },
94
- fullWidth: h,
95
- ...g,
96
- children: [(r || i) && e(D, {
66
+ fullWidth: r,
67
+ alignItems: "center",
68
+ background: "buttonPrimary600",
69
+ borderColor: "buttonPrimary600",
70
+ gap: 2,
71
+ inline: r,
72
+ justifyContent: r ? "center" : void 0,
73
+ paddingLeft: 4,
74
+ paddingRight: 4,
75
+ width: r ? "100%" : void 0,
76
+ ...c,
77
+ children: [(e || o) && t(L, {
97
78
  "aria-hidden": !0,
98
- paddingRight: 2,
99
- children: i ? e(w, {
100
- children: e(x, {})
101
- }) : r
102
- }), e(c, {
103
- variant: s === "S" ? "pi" : void 0,
79
+ children: o ? t(D, {
80
+ children: t(y, {})
81
+ }) : e
82
+ }), t(j, {
83
+ variant: m === "S" ? "pi" : void 0,
104
84
  fontWeight: "bold",
105
85
  lineHeight: 0,
86
+ textColor: "buttonNeutral0",
106
87
  children: p
107
- }), l && e(n, {
88
+ }), n && t(T, {
108
89
  "aria-hidden": !0,
109
- paddingLeft: 2,
110
- children: l
90
+ children: n
111
91
  })]
112
92
  });
113
93
  });
114
- N.displayName = "Button";
94
+ R.displayName = "Button";
115
95
  export {
116
- N as Button,
117
- H as ButtonWrapper
96
+ R as Button,
97
+ N as ButtonWrapper
118
98
  };