@strapi/design-system 1.4.0-beta.0 → 1.4.0-beta.1

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 (307) hide show
  1. package/dist/Accordion/Accordion.cjs +8 -8
  2. package/dist/Accordion/Accordion.js +6 -7
  3. package/dist/Accordion/AccordionContent.cjs +1 -1
  4. package/dist/Accordion/AccordionContent.js +37 -17
  5. package/dist/Accordion/AccordionToggle.cjs +6 -6
  6. package/dist/Accordion/AccordionToggle.js +96 -75
  7. package/dist/Alert/Alert.cjs +12 -12
  8. package/dist/Alert/Alert.js +102 -83
  9. package/dist/Badge/Badge.cjs +4 -1
  10. package/dist/Badge/Badge.js +56 -26
  11. package/dist/BaseButton/BaseButton.cjs +3 -3
  12. package/dist/BaseButton/BaseButton.js +42 -20
  13. package/dist/BaseCheckbox/BaseCheckbox.cjs +6 -6
  14. package/dist/BaseCheckbox/BaseCheckbox.js +56 -36
  15. package/dist/BaseLink/BaseLink.cjs +2 -2
  16. package/dist/BaseLink/BaseLink.js +43 -21
  17. package/dist/BaseRadio/BaseRadio.cjs +8 -8
  18. package/dist/BaseRadio/BaseRadio.js +51 -31
  19. package/dist/BaseRadio/RadioGroup.cjs +1 -1
  20. package/dist/BaseRadio/RadioGroup.js +44 -24
  21. package/dist/Box/BoxProps.cjs +1 -1
  22. package/dist/Box/BoxProps.js +19 -10
  23. package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
  24. package/dist/Breadcrumbs/Breadcrumbs.js +50 -29
  25. package/dist/Button/Button.cjs +14 -14
  26. package/dist/Button/Button.js +73 -53
  27. package/dist/Card/Card.cjs +1 -1
  28. package/dist/Card/Card.js +37 -17
  29. package/dist/Card/CardAsset.cjs +4 -4
  30. package/dist/Card/CardAsset.js +42 -19
  31. package/dist/Card/CardBadge.cjs +3 -3
  32. package/dist/Card/CardBadge.js +18 -9
  33. package/dist/Card/CardBody.cjs +1 -1
  34. package/dist/Card/CardBody.js +19 -8
  35. package/dist/Card/CardCheckbox.cjs +1 -1
  36. package/dist/Card/CardCheckbox.js +22 -12
  37. package/dist/Card/CardContent.cjs +2 -2
  38. package/dist/Card/CardContent.js +32 -11
  39. package/dist/Card/CardHeader.cjs +2 -2
  40. package/dist/Card/CardHeader.js +19 -9
  41. package/dist/Card/CardTimer.cjs +2 -2
  42. package/dist/Card/CardTimer.js +42 -20
  43. package/dist/Card/CardTitle.cjs +1 -1
  44. package/dist/Card/CardTitle.js +27 -16
  45. package/dist/CarouselInput/Carousel.cjs +6 -6
  46. package/dist/CarouselInput/Carousel.js +107 -77
  47. package/dist/CarouselInput/CarouselActions.cjs +1 -1
  48. package/dist/CarouselInput/CarouselActions.js +17 -7
  49. package/dist/CarouselInput/CarouselImage.cjs +3 -3
  50. package/dist/CarouselInput/CarouselImage.js +38 -26
  51. package/dist/CarouselInput/CarouselInput.cjs +1 -1
  52. package/dist/CarouselInput/CarouselInput.js +84 -49
  53. package/dist/CarouselInput/CarouselSlide.cjs +2 -2
  54. package/dist/CarouselInput/CarouselSlide.js +42 -20
  55. package/dist/Checkbox/Checkbox.cjs +2 -2
  56. package/dist/Checkbox/Checkbox.js +63 -44
  57. package/dist/Combobox/Combobox.cjs +1 -1
  58. package/dist/Combobox/Combobox.js +262 -194
  59. package/dist/Combobox/ComboboxList.cjs +1 -1
  60. package/dist/Combobox/ComboboxList.js +5 -5
  61. package/dist/Combobox/ComboboxOption.cjs +1 -1
  62. package/dist/Combobox/ComboboxOption.js +47 -25
  63. package/dist/Combobox/components.cjs +2 -2
  64. package/dist/Combobox/components.js +1 -1
  65. package/dist/Combobox/utils.cjs +1 -1
  66. package/dist/Combobox/utils.js +21 -21
  67. package/dist/DatePicker/DatePicker.cjs +1 -1
  68. package/dist/DatePicker/DatePicker.js +110 -80
  69. package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
  70. package/dist/DatePicker/DatePickerCalendar.js +18 -13
  71. package/dist/DatePicker/DatePickerTd.cjs +4 -4
  72. package/dist/DatePicker/DatePickerTd.js +42 -23
  73. package/dist/DatePicker/DatePickerTh.cjs +3 -3
  74. package/dist/DatePicker/DatePickerTh.js +44 -23
  75. package/dist/DatePicker/utils/getYears.cjs +1 -1
  76. package/dist/DatePicker/utils/getYears.js +7 -6
  77. package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
  78. package/dist/DateTimePicker/DateTimePicker.js +124 -89
  79. package/dist/DateTimePicker/DateTimePickerProps.cjs +1 -1
  80. package/dist/DateTimePicker/DateTimePickerProps.js +19 -10
  81. package/dist/Dialog/Dialog.cjs +5 -5
  82. package/dist/Dialog/Dialog.js +58 -39
  83. package/dist/Dialog/DialogBody.cjs +2 -2
  84. package/dist/Dialog/DialogBody.js +14 -11
  85. package/dist/DismissibleLayer/DismissibleLayer.cjs +1 -1
  86. package/dist/DismissibleLayer/DismissibleLayer.js +22 -27
  87. package/dist/Divider/Divider.cjs +2 -2
  88. package/dist/Divider/Divider.js +38 -15
  89. package/dist/Field/Field.cjs +1 -1
  90. package/dist/Field/Field.js +38 -19
  91. package/dist/Field/FieldAction.cjs +2 -2
  92. package/dist/Field/FieldAction.js +35 -13
  93. package/dist/Field/FieldInput.cjs +6 -6
  94. package/dist/Field/FieldInput.js +67 -47
  95. package/dist/Field/FieldLabel.cjs +3 -3
  96. package/dist/Field/FieldLabel.js +45 -25
  97. package/dist/Flex/FlexProps.cjs +1 -1
  98. package/dist/Flex/FlexProps.js +20 -10
  99. package/dist/FocusTrap/ExampleComponent.cjs +1 -1
  100. package/dist/FocusTrap/ExampleComponent.js +3 -2
  101. package/dist/FocusTrap/FocusTrap.cjs +1 -1
  102. package/dist/FocusTrap/FocusTrap.js +56 -35
  103. package/dist/Grid/Grid.cjs +3 -3
  104. package/dist/Grid/Grid.js +42 -20
  105. package/dist/Grid/GridItem.cjs +2 -2
  106. package/dist/Grid/GridItem.js +41 -22
  107. package/dist/Icon/Icon.cjs +2 -2
  108. package/dist/Icon/Icon.js +27 -17
  109. package/dist/IconButton/IconButton.cjs +4 -4
  110. package/dist/IconButton/IconButton.js +68 -49
  111. package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -1
  112. package/dist/KeyboardNavigable/KeyboardNavigable.js +58 -38
  113. package/dist/Layout/HeaderLayout.cjs +2 -2
  114. package/dist/Layout/HeaderLayout.js +96 -78
  115. package/dist/Link/Link.cjs +6 -6
  116. package/dist/Link/Link.js +59 -37
  117. package/dist/LinkButton/LinkButton.cjs +10 -10
  118. package/dist/LinkButton/LinkButton.js +71 -49
  119. package/dist/Loader/Loader.cjs +4 -4
  120. package/dist/Loader/Loader.js +47 -25
  121. package/dist/Main/Main.cjs +2 -2
  122. package/dist/Main/Main.js +35 -15
  123. package/dist/MainNav/MainNav.cjs +2 -2
  124. package/dist/MainNav/MainNav.js +39 -17
  125. package/dist/MainNav/NavCondense.cjs +3 -3
  126. package/dist/MainNav/NavCondense.js +40 -20
  127. package/dist/MainNav/NavLink.cjs +9 -9
  128. package/dist/MainNav/NavLink.js +72 -53
  129. package/dist/MainNav/NavSection.cjs +1 -1
  130. package/dist/MainNav/NavSection.js +67 -46
  131. package/dist/MainNav/NavSections.cjs +1 -1
  132. package/dist/MainNav/NavSections.js +40 -18
  133. package/dist/MainNav/NavUser.cjs +2 -2
  134. package/dist/MainNav/NavUser.js +51 -31
  135. package/dist/ModalLayout/ModalBody.cjs +2 -2
  136. package/dist/ModalLayout/ModalBody.js +19 -9
  137. package/dist/ModalLayout/ModalLayout.cjs +3 -3
  138. package/dist/ModalLayout/ModalLayout.js +52 -30
  139. package/dist/NumberInput/NumberInput.cjs +6 -6
  140. package/dist/NumberInput/NumberInput.js +149 -117
  141. package/dist/Pagination/components.cjs +7 -7
  142. package/dist/Pagination/components.js +88 -65
  143. package/dist/Popover/Popover.cjs +3 -3
  144. package/dist/Popover/Popover.js +93 -66
  145. package/dist/Portal/Portal.cjs +1 -1
  146. package/dist/Portal/Portal.js +12 -11
  147. package/dist/ProgressBar/ProgressBar.cjs +2 -2
  148. package/dist/ProgressBar/ProgressBar.js +49 -27
  149. package/dist/Radio/Radio.cjs +2 -2
  150. package/dist/Radio/Radio.js +40 -19
  151. package/dist/RawTable/RawCell.cjs +1 -1
  152. package/dist/RawTable/RawCell.js +97 -62
  153. package/dist/RawTable/RawTable.cjs +1 -1
  154. package/dist/RawTable/RawTable.js +67 -46
  155. package/dist/RawTable/RawTableContext.cjs +1 -1
  156. package/dist/RawTable/RawTableContext.js +1 -1
  157. package/dist/RawTable/RawTbody.cjs +1 -1
  158. package/dist/RawTable/RawTbody.js +30 -11
  159. package/dist/RawTable/RawThead.cjs +1 -1
  160. package/dist/RawTable/RawThead.js +29 -10
  161. package/dist/RawTable/RawTr.cjs +1 -1
  162. package/dist/RawTable/RawTr.js +34 -14
  163. package/dist/Searchbar/SearchForm.cjs +1 -1
  164. package/dist/Searchbar/SearchForm.js +16 -5
  165. package/dist/Searchbar/Searchbar.cjs +7 -7
  166. package/dist/Searchbar/Searchbar.js +65 -45
  167. package/dist/Select/MultiSelectNested.cjs +1 -1
  168. package/dist/Select/MultiSelectNested.js +45 -23
  169. package/dist/Select/OptGroup.cjs +1 -1
  170. package/dist/Select/OptGroup.js +35 -15
  171. package/dist/Select/Option.cjs +7 -7
  172. package/dist/Select/Option.js +57 -37
  173. package/dist/Select/Select.cjs +2 -2
  174. package/dist/Select/Select.js +187 -148
  175. package/dist/Select/SelectButton.cjs +2 -2
  176. package/dist/Select/SelectButton.js +53 -33
  177. package/dist/SimpleMenu/SimpleMenu.cjs +7 -7
  178. package/dist/SimpleMenu/SimpleMenu.js +143 -102
  179. package/dist/Stack/Stack.cjs +3 -3
  180. package/dist/Stack/Stack.js +50 -29
  181. package/dist/Status/Status.cjs +4 -4
  182. package/dist/Status/Status.js +50 -30
  183. package/dist/SubNav/SubNav.cjs +3 -3
  184. package/dist/SubNav/SubNav.js +37 -15
  185. package/dist/SubNav/SubNavHeader.cjs +2 -2
  186. package/dist/SubNav/SubNavHeader.js +44 -43
  187. package/dist/SubNav/SubNavLink.cjs +6 -6
  188. package/dist/SubNav/SubNavLink.js +61 -40
  189. package/dist/SubNav/SubNavLinkSection.cjs +4 -4
  190. package/dist/SubNav/SubNavLinkSection.js +8 -7
  191. package/dist/SubNav/SubNavSection.cjs +2 -2
  192. package/dist/SubNav/SubNavSection.js +11 -10
  193. package/dist/SubNav/SubNavSectionLabel.cjs +1 -1
  194. package/dist/SubNav/SubNavSectionLabel.js +1 -1
  195. package/dist/SubNav/SubNavSections.cjs +1 -1
  196. package/dist/SubNav/SubNavSections.js +39 -17
  197. package/dist/Switch/Switch.cjs +5 -5
  198. package/dist/Switch/Switch.js +57 -35
  199. package/dist/Table/Cell.cjs +3 -3
  200. package/dist/Table/Cell.js +40 -20
  201. package/dist/Table/TFooter.cjs +3 -3
  202. package/dist/Table/TFooter.js +50 -28
  203. package/dist/Table/Table.cjs +5 -5
  204. package/dist/Table/Table.js +59 -36
  205. package/dist/Table/Tbody.cjs +2 -2
  206. package/dist/Table/Tbody.js +17 -8
  207. package/dist/Table/Thead.cjs +2 -2
  208. package/dist/Table/Thead.js +17 -8
  209. package/dist/Table/Tr.cjs +2 -2
  210. package/dist/Table/Tr.js +17 -8
  211. package/dist/Tabs/TabGroup.cjs +1 -1
  212. package/dist/Tabs/TabGroup.js +46 -27
  213. package/dist/Tabs/TabPanels.cjs +1 -1
  214. package/dist/Tabs/TabPanels.js +43 -24
  215. package/dist/Tabs/Tabs.cjs +2 -2
  216. package/dist/Tabs/Tabs.js +112 -94
  217. package/dist/Tabs/useTabsFocus.cjs +1 -1
  218. package/dist/Tabs/useTabsFocus.js +12 -11
  219. package/dist/Tag/Tag.cjs +4 -4
  220. package/dist/Tag/Tag.js +50 -27
  221. package/dist/TextButton/TextButton.cjs +6 -6
  222. package/dist/TextButton/TextButton.js +59 -39
  223. package/dist/TextInput/TextInput.cjs +1 -1
  224. package/dist/TextInput/TextInput.js +69 -49
  225. package/dist/Textarea/Textarea.cjs +3 -3
  226. package/dist/Textarea/Textarea.js +63 -43
  227. package/dist/Textarea/TextareaInput.cjs +4 -4
  228. package/dist/Textarea/TextareaInput.js +49 -29
  229. package/dist/TimePicker/TimePicker.cjs +3 -3
  230. package/dist/TimePicker/TimePicker.js +93 -60
  231. package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
  232. package/dist/ToggleCheckbox/ToggleCheckbox.js +75 -53
  233. package/dist/ToggleInput/ToggleInput.cjs +3 -3
  234. package/dist/ToggleInput/ToggleInput.js +98 -66
  235. package/dist/Tooltip/Tooltip.cjs +2 -2
  236. package/dist/Tooltip/Tooltip.js +57 -38
  237. package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -1
  238. package/dist/Tooltip/hooks/useTooltipLayout.js +9 -9
  239. package/dist/Typography/TypographyProps.cjs +1 -1
  240. package/dist/Typography/TypographyProps.js +22 -13
  241. package/dist/helpers/getDefaultLocale.cjs +1 -1
  242. package/dist/helpers/getDefaultLocale.js +1 -1
  243. package/dist/helpers/handleResponsiveValues.cjs +5 -5
  244. package/dist/helpers/handleResponsiveValues.js +14 -14
  245. package/dist/helpers/useIntersection.cjs +1 -1
  246. package/dist/helpers/useIntersection.js +13 -11
  247. package/dist/helpers/useResizeObserver.cjs +1 -1
  248. package/dist/helpers/useResizeObserver.js +10 -8
  249. package/dist/hooks/useControllableState.cjs +1 -0
  250. package/dist/hooks/useControllableState.js +25 -0
  251. package/dist/index.cjs +1 -1
  252. package/dist/index.js +285 -284
  253. package/dist/themes/ColorButton.cjs +2 -2
  254. package/dist/themes/ColorButton.js +4 -4
  255. package/dist/themes/darkTheme/index.cjs +1 -1
  256. package/dist/themes/darkTheme/index.js +18 -8
  257. package/dist/themes/extendTheme.cjs +5 -5
  258. package/dist/themes/extendTheme.js +30 -19
  259. package/dist/themes/lightTheme/index.cjs +1 -1
  260. package/dist/themes/lightTheme/index.js +18 -8
  261. package/dist/themes/sizes.cjs +1 -1
  262. package/dist/themes/sizes.js +4 -0
  263. package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
  264. package/dist/v2/Breadcrumbs/Breadcrumbs.js +43 -23
  265. package/dist/v2/Breadcrumbs/Crumb.cjs +1 -1
  266. package/dist/v2/Breadcrumbs/Crumb.js +44 -22
  267. package/dist/v2/Breadcrumbs/CrumbLink.cjs +2 -2
  268. package/dist/v2/Breadcrumbs/CrumbLink.js +35 -14
  269. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
  270. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +41 -19
  271. package/dist/v2/Link/Link.cjs +5 -5
  272. package/dist/v2/Link/Link.js +64 -42
  273. package/dist/v2/LinkButton/LinkButton.cjs +10 -10
  274. package/dist/v2/LinkButton/LinkButton.js +77 -53
  275. package/dist/v2/MainNav/MainNav.cjs +2 -2
  276. package/dist/v2/MainNav/MainNav.js +39 -17
  277. package/dist/v2/MainNav/NavBrand.cjs +3 -3
  278. package/dist/v2/MainNav/NavBrand.js +78 -57
  279. package/dist/v2/MainNav/NavCondense.cjs +3 -3
  280. package/dist/v2/MainNav/NavCondense.js +40 -20
  281. package/dist/v2/MainNav/NavLink.cjs +9 -9
  282. package/dist/v2/MainNav/NavLink.js +77 -56
  283. package/dist/v2/MainNav/NavSection.cjs +1 -1
  284. package/dist/v2/MainNav/NavSection.js +67 -46
  285. package/dist/v2/MainNav/NavSections.cjs +1 -1
  286. package/dist/v2/MainNav/NavSections.js +40 -18
  287. package/dist/v2/MainNav/NavUser.cjs +2 -2
  288. package/dist/v2/MainNav/NavUser.js +51 -31
  289. package/dist/v2/Pagination/components.cjs +7 -7
  290. package/dist/v2/Pagination/components.js +89 -65
  291. package/dist/v2/SimpleMenu/SimpleMenu.cjs +7 -7
  292. package/dist/v2/SimpleMenu/SimpleMenu.js +155 -120
  293. package/dist/v2/SubNav/SubNav.cjs +3 -3
  294. package/dist/v2/SubNav/SubNav.js +37 -15
  295. package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
  296. package/dist/v2/SubNav/SubNavHeader.js +44 -43
  297. package/dist/v2/SubNav/SubNavLink.cjs +6 -6
  298. package/dist/v2/SubNav/SubNavLink.js +64 -43
  299. package/dist/v2/SubNav/SubNavLinkSection.cjs +4 -4
  300. package/dist/v2/SubNav/SubNavLinkSection.js +8 -8
  301. package/dist/v2/SubNav/SubNavSection.cjs +2 -2
  302. package/dist/v2/SubNav/SubNavSection.js +1 -1
  303. package/dist/v2/SubNav/SubNavSectionLabel.cjs +1 -1
  304. package/dist/v2/SubNav/SubNavSectionLabel.js +1 -1
  305. package/dist/v2/SubNav/SubNavSections.cjs +1 -1
  306. package/dist/v2/SubNav/SubNavSections.js +39 -17
  307. package/package.json +8 -15
@@ -1,150 +1,190 @@
1
- import t, { useRef as T, useEffect as g, useState as x, Children as F, cloneElement as V } from "react";
1
+ var Y = Object.defineProperty;
2
+ var g = Object.getOwnPropertySymbols;
3
+ var $ = Object.prototype.hasOwnProperty, F = Object.prototype.propertyIsEnumerable;
4
+ var N = (e, r, o) => r in e ? Y(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o, y = (e, r) => {
5
+ for (var o in r || (r = {}))
6
+ $.call(r, o) && N(e, o, r[o]);
7
+ if (g)
8
+ for (var o of g(r))
9
+ F.call(r, o) && N(e, o, r[o]);
10
+ return e;
11
+ };
12
+ var S = (e, r) => {
13
+ var o = {};
14
+ for (var s in e)
15
+ $.call(e, s) && r.indexOf(s) < 0 && (o[s] = e[s]);
16
+ if (e != null && g)
17
+ for (var s of g(e))
18
+ r.indexOf(s) < 0 && F.call(e, s) && (o[s] = e[s]);
19
+ return o;
20
+ };
21
+ import i, { useRef as w, useEffect as C, useState as V, Children as Z, cloneElement as ee } from "react";
2
22
  import n from "prop-types";
3
- import h from "styled-components";
4
- import q from "@strapi/icons/CarretDown";
5
- import { NavLink as L } from "react-router-dom";
6
- import { Typography as M } from "../Typography/Typography.js";
7
- import { Box as S } from "../Box/Box.js";
8
- import { Flex as W } from "../Flex/Flex.js";
9
- import { Button as O } from "../Button/Button.js";
10
- import { POPOVER_PLACEMENTS as _, Popover as z } from "../Popover/Popover.js";
11
- import { getOptionStyle as v } from "./utils.js";
12
- import { useId as j } from "../helpers/useId.js";
13
- import { KeyboardKeys as s } from "../helpers/keyboardKeys.js";
14
- const U = h.button`
23
+ import v from "styled-components";
24
+ import { NavLink as ne } from "react-router-dom";
25
+ import { useCallbackRef as q } from "@radix-ui/react-use-callback-ref";
26
+ import oe from "@strapi/icons/CarretDown";
27
+ import { Typography as L } from "../Typography/Typography.js";
28
+ import { Box as x } from "../Box/Box.js";
29
+ import { Flex as te } from "../Flex/Flex.js";
30
+ import { Button as W } from "../Button/Button.js";
31
+ import { POPOVER_PLACEMENTS as re, Popover as se } from "../Popover/Popover.js";
32
+ import { getOptionStyle as _ } from "./utils.js";
33
+ import { useId as ie } from "../helpers/useId.js";
34
+ import { KeyboardKeys as c } from "../helpers/keyboardKeys.js";
35
+ const ae = v.button`
15
36
  border: none;
16
37
  padding: 0;
17
38
  background: transparent;
18
39
  cursor: pointer;
19
- ${v}
20
- `, G = h(L)`
40
+ ${_}
41
+ `, ce = v(ne)`
21
42
  text-decoration: none;
22
- ${v}
23
- `, H = h.span`
43
+ ${_}
44
+ `, le = v.span`
24
45
  display: flex;
25
46
  align-items: center;
26
47
  svg {
27
48
  height: 4px;
28
49
  width: 6px;
29
50
  }
30
- `, J = h(O)`
31
- padding: ${({ theme: o }) => `${o.spaces[1]} ${o.spaces[3]}`};
32
- `, R = ({ children: o, onClick: l, to: m, isFocused: a, ...f }) => {
33
- const i = T();
34
- g(() => {
35
- a && i.current && i.current.focus();
36
- }, [a]);
37
- const d = {
38
- tabIndex: a ? 0 : -1,
39
- ref: i,
40
- role: "menuitem",
41
- ...f
42
- }, D = (y) => {
43
- (y.key === s.SPACE || y.key === s.ENTER) && l();
51
+ `, pe = v(W)`
52
+ padding: ${({ theme: e }) => `${e.spaces[1]} ${e.spaces[3]}`};
53
+ `, z = (b) => {
54
+ var E = b, { children: e, onClick: r, to: o, isFocused: s } = E, k = S(E, ["children", "onClick", "to", "isFocused"]);
55
+ const p = w();
56
+ C(() => {
57
+ s && p.current && p.current.focus();
58
+ }, [s]);
59
+ const l = y({
60
+ tabIndex: s ? 0 : -1,
61
+ ref: p,
62
+ role: "menuitem"
63
+ }, k), D = (I) => {
64
+ (I.key === c.SPACE || I.key === c.ENTER) && r();
44
65
  };
45
- return m ? /* @__PURE__ */ t.createElement(G, {
46
- to: m,
47
- ...d
48
- }, /* @__PURE__ */ t.createElement(S, {
66
+ return o ? /* @__PURE__ */ i.createElement(ce, y({
67
+ to: o
68
+ }, l), /* @__PURE__ */ i.createElement(x, {
49
69
  padding: 2
50
- }, /* @__PURE__ */ t.createElement(M, null, o))) : /* @__PURE__ */ t.createElement(U, {
70
+ }, /* @__PURE__ */ i.createElement(L, null, e))) : /* @__PURE__ */ i.createElement(ae, y({
51
71
  onKeyDown: D,
52
- onMouseDown: l,
53
- type: "button",
54
- ...d
55
- }, /* @__PURE__ */ t.createElement(S, {
72
+ onMouseDown: r,
73
+ type: "button"
74
+ }, l), /* @__PURE__ */ i.createElement(x, {
56
75
  padding: 2
57
- }, /* @__PURE__ */ t.createElement(M, null, o)));
76
+ }, /* @__PURE__ */ i.createElement(L, null, e)));
58
77
  };
59
- R.defaultProps = {
60
- onClick: () => {
78
+ z.defaultProps = {
79
+ as: void 0,
80
+ onClick() {
61
81
  },
62
82
  isFocused: !1,
63
83
  to: void 0
64
84
  };
65
- R.propTypes = {
85
+ z.propTypes = {
66
86
  as: n.elementType,
67
87
  children: n.node.isRequired,
68
88
  isFocused: n.bool,
69
89
  onClick: n.func,
70
90
  to: n.string
71
91
  };
72
- const P = ({
73
- label: o,
74
- children: l,
75
- id: m,
76
- as: a,
77
- onOpen: f = () => {
78
- },
79
- onClose: i = () => {
80
- },
81
- size: d,
82
- popoverPlacement: D,
83
- ...y
84
- }) => {
85
- const c = T(), w = j("simplemenu", m), k = T(!1), [p, u] = x(!1), [C, I] = x(0), E = F.toArray(l), b = a || (d === "S" ? J : O);
86
- g(() => {
87
- if (["string", "number"].includes(typeof o)) {
88
- const e = E.findIndex((r) => r.props.children === o);
89
- e !== -1 && I(e);
92
+ const P = (I) => {
93
+ var M = I, {
94
+ label: e,
95
+ children: r,
96
+ id: o,
97
+ as: s,
98
+ onOpen: k = () => {
99
+ },
100
+ onClose: b = () => {
101
+ },
102
+ size: E,
103
+ popoverPlacement: p,
104
+ onReachEnd: l
105
+ } = M, D = S(M, [
106
+ "label",
107
+ "children",
108
+ "id",
109
+ "as",
110
+ "onOpen",
111
+ "onClose",
112
+ "size",
113
+ "popoverPlacement",
114
+ "onReachEnd"
115
+ ]);
116
+ const u = w(), O = ie("simplemenu", o), m = w(!1), [d, f] = V(!1), [R, T] = V(0), h = Z.toArray(r), j = s || (E === "S" ? pe : W), B = !!l && typeof l == "function";
117
+ C(() => {
118
+ if (["string", "number"].includes(typeof e)) {
119
+ const t = h.findIndex((a) => a.props.children === e);
120
+ t !== -1 && T(t);
90
121
  }
91
- }, [o]), g(() => {
92
- k?.current ? p && typeof f == "function" ? f() : typeof i == "function" && i() : k.current = !0;
93
- }, [k, p]), g(() => {
94
- t.isValidElement(o) && C == -1 && c.current.focus();
95
- }, [o, C]);
96
- const B = (e) => {
97
- p && (e.key === s.ESCAPE && (e.stopPropagation(), u(!1), c.current.focus()), e.key === s.DOWN && I((r) => r === E.length - 1 ? 0 : r + 1), e.key === s.UP && I((r) => r === 0 ? E.length - 1 : r - 1));
98
- }, K = (e) => {
99
- (e.key === s.ENTER || e.key === s.SPACE) && u((r) => !r);
100
- }, A = (e) => {
101
- e.preventDefault(), e.currentTarget.contains(e.relatedTarget) || u(!1);
102
- }, N = (e) => {
103
- e.preventDefault(), u((r) => !r);
104
- }, $ = E.map((e, r) => /* @__PURE__ */ t.createElement(W, {
122
+ }, [e]);
123
+ const K = q(k), A = q(b);
124
+ C(() => {
125
+ m != null && m.current ? d ? K() : A() : m.current = !0;
126
+ }, [m, A, K, d]), C(() => {
127
+ i.isValidElement(e) && R === -1 && u.current.focus();
128
+ }, [e, R]);
129
+ const H = (t) => {
130
+ d && (t.key === c.ESCAPE && (t.stopPropagation(), f(!1), u.current.focus()), t.key === c.DOWN && T((a) => a === h.length - 1 ? 0 : a + 1), t.key === c.UP && T((a) => a === 0 ? h.length - 1 : a - 1));
131
+ }, U = (t) => {
132
+ (t.key === c.ENTER || t.key === c.SPACE) && f((a) => !a);
133
+ }, G = (t) => {
134
+ t.preventDefault(), t.currentTarget.contains(t.relatedTarget) || f(!1);
135
+ }, J = (t) => {
136
+ t.preventDefault(), f((a) => !a);
137
+ }, Q = () => {
138
+ B && l();
139
+ }, X = h.map((t, a) => /* @__PURE__ */ i.createElement(te, {
105
140
  as: "li",
106
- key: r,
141
+ key: a,
107
142
  justifyContent: "center",
108
143
  role: "menuitem"
109
- }, V(e, {
110
- onClick: () => {
111
- e.props.onClick(), u(!1), c.current.focus();
144
+ }, ee(t, {
145
+ onClick() {
146
+ t.props.onClick(), f(!1), u.current.focus();
112
147
  },
113
- isFocused: C === r
148
+ isFocused: R === a
114
149
  })));
115
- return /* @__PURE__ */ t.createElement("div", {
116
- onKeyDown: B
117
- }, /* @__PURE__ */ t.createElement(b, {
118
- label: t.isValidElement(o) ? null : o,
150
+ return /* @__PURE__ */ i.createElement("div", {
151
+ onKeyDown: H
152
+ }, /* @__PURE__ */ i.createElement(j, y({
153
+ label: i.isValidElement(e) ? null : e,
119
154
  "aria-haspopup": !0,
120
- "aria-expanded": p,
121
- "aria-controls": w,
122
- onKeyDown: K,
123
- onMouseDown: N,
124
- ref: c,
155
+ "aria-expanded": d,
156
+ "aria-controls": O,
157
+ onKeyDown: U,
158
+ onMouseDown: J,
159
+ ref: u,
125
160
  type: "button",
126
161
  variant: "ghost",
127
- endIcon: /* @__PURE__ */ t.createElement(H, null, /* @__PURE__ */ t.createElement(q, {
162
+ endIcon: /* @__PURE__ */ i.createElement(le, null, /* @__PURE__ */ i.createElement(oe, {
128
163
  "aria-hidden": !0
129
- })),
130
- ...y
131
- }, o), p && /* @__PURE__ */ t.createElement(z, {
132
- onBlur: A,
133
- placement: D,
134
- source: c,
164
+ }))
165
+ }, D), e), d && /* @__PURE__ */ i.createElement(se, {
166
+ onBlur: G,
167
+ placement: p,
168
+ source: u,
169
+ onReachEnd: Q,
170
+ intersectionId: B ? `popover-${O}` : void 0,
135
171
  spacing: 4
136
- }, /* @__PURE__ */ t.createElement(S, {
172
+ }, /* @__PURE__ */ i.createElement(x, {
137
173
  role: "menu",
138
174
  as: "ul",
139
175
  padding: 1,
140
- id: w
141
- }, $)));
176
+ id: O
177
+ }, X)));
142
178
  };
143
179
  P.defaultProps = {
144
180
  as: void 0
145
181
  };
146
182
  P.displayName = "SimpleMenu";
147
183
  P.defaultProps = {
184
+ id: void 0,
185
+ onOpen: void 0,
186
+ onClose: void 0,
187
+ onReachEnd: void 0,
148
188
  popoverPlacement: "bottom-start",
149
189
  size: "M"
150
190
  };
@@ -155,10 +195,11 @@ P.propTypes = {
155
195
  label: n.oneOfType([n.string, n.number, n.element]).isRequired,
156
196
  onClose: n.func,
157
197
  onOpen: n.func,
158
- popoverPlacement: n.oneOf(_),
198
+ onReachEnd: n.func,
199
+ popoverPlacement: n.oneOf(re),
159
200
  size: n.oneOf(["S", "M"])
160
201
  };
161
202
  export {
162
- R as MenuItem,
203
+ z as MenuItem,
163
204
  P as SimpleMenu
164
205
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react"),f=require("prop-types"),g=require("styled-components"),d=require("../Flex/Flex.cjs"),r=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=r(c),n=r(f),u=r(g),p={size:!0},m=u.default(d.Flex).withConfig({shouldForwardProp:(e,t)=>!p[e]&&t(e)})`
1
+ "use strict";var w=Object.defineProperty;var n=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var u=(e,t,a)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,s=(e,t)=>{for(var a in t||(t={}))p.call(t,a)&&u(e,a,t[a]);if(n)for(var a of n(t))f.call(t,a)&&u(e,a,t[a]);return e};var g=(e,t)=>{var a={};for(var o in e)p.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&n)for(var o of n(e))t.indexOf(o)<0&&f.call(e,o)&&(a[o]=e[o]);return a};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("react"),P=require("prop-types"),S=require("styled-components"),h=require("../Flex/Flex.cjs"),l=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},m=l(y),i=l(P),_=l(S),b={size:!0},F=_.default(h.Flex).withConfig({shouldForwardProp:(e,t)=>!b[e]&&t(e)})`
2
2
  & > * {
3
3
  margin-top: 0;
4
4
  margin-bottom: 0;
@@ -7,7 +7,7 @@
7
7
  & > * + * {
8
8
  margin-top: ${({theme:e,spacing:t})=>e.spaces[t]};
9
9
  }
10
- `,y=u.default(d.Flex).withConfig({shouldForwardProp:(e,t)=>!p[e]&&t(e)})`
10
+ `,k=_.default(h.Flex).withConfig({shouldForwardProp:(e,t)=>!b[e]&&t(e)})`
11
11
  & > * {
12
12
  margin-left: 0;
13
13
  margin-right: 0;
@@ -16,4 +16,4 @@
16
16
  & > * + * {
17
17
  margin-left: ${({theme:e,spacing:t})=>e.spaces[t]};
18
18
  }
19
- `,a=c.forwardRef(({horizontal:e,spacing:t,size:o,...s},i)=>(o&&console.warn('Deprecation warning: Usage of "size" prop in Stack component is deprecated. This is discouraged and will be removed in the next major release. Please use "spacing" instead'),e?l.default.createElement(y,{ref:i,spacing:t||o,...s}):l.default.createElement(m,{direction:"column",alignItems:"stretch",ref:i,spacing:t||o,...s})));a.displayName="Stack";a.defaultProps={horizontal:!1,size:void 0,spacing:void 0};a.propTypes={horizontal:n.default.bool,size:n.default.number,spacing:n.default.number};exports.Stack=a;
19
+ `,r=y.forwardRef((x,c)=>{var d=x,{horizontal:e,spacing:t,size:a}=d,o=g(d,["horizontal","spacing","size"]);return a&&console.warn('Deprecation warning: Usage of "size" prop in Stack component is deprecated. This is discouraged and will be removed in the next major release. Please use "spacing" instead'),e?m.default.createElement(k,s({ref:c,spacing:t||a},o)):m.default.createElement(F,s({direction:"column",alignItems:"stretch",ref:c,spacing:t||a},o))});r.displayName="Stack";r.defaultProps={horizontal:!1,size:void 0,spacing:void 0};r.propTypes={horizontal:i.default.bool,size:i.default.number,spacing:i.default.number};exports.Stack=r;
@@ -1,11 +1,31 @@
1
- import s, { forwardRef as p } from "react";
2
- import r from "prop-types";
3
- import c from "styled-components";
4
- import { Flex as m } from "../Flex/Flex.js";
5
- const l = {
1
+ var P = Object.defineProperty;
2
+ var a = Object.getOwnPropertySymbols;
3
+ var p = Object.prototype.hasOwnProperty, d = Object.prototype.propertyIsEnumerable;
4
+ var l = (e, t, o) => t in e ? P(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, i = (e, t) => {
5
+ for (var o in t || (t = {}))
6
+ p.call(t, o) && l(e, o, t[o]);
7
+ if (a)
8
+ for (var o of a(t))
9
+ d.call(t, o) && l(e, o, t[o]);
10
+ return e;
11
+ };
12
+ var g = (e, t) => {
13
+ var o = {};
14
+ for (var r in e)
15
+ p.call(e, r) && t.indexOf(r) < 0 && (o[r] = e[r]);
16
+ if (e != null && a)
17
+ for (var r of a(e))
18
+ t.indexOf(r) < 0 && d.call(e, r) && (o[r] = e[r]);
19
+ return o;
20
+ };
21
+ import f, { forwardRef as b } from "react";
22
+ import n from "prop-types";
23
+ import u from "styled-components";
24
+ import { Flex as h } from "../Flex/Flex.js";
25
+ const w = {
6
26
  size: !0
7
- }, d = c(m).withConfig({
8
- shouldForwardProp: (e, t) => !l[e] && t(e)
27
+ }, k = u(h).withConfig({
28
+ shouldForwardProp: (e, t) => !w[e] && t(e)
9
29
  })`
10
30
  & > * {
11
31
  margin-top: 0;
@@ -15,8 +35,8 @@ const l = {
15
35
  & > * + * {
16
36
  margin-top: ${({ theme: e, spacing: t }) => e.spaces[t]};
17
37
  }
18
- `, g = c(m).withConfig({
19
- shouldForwardProp: (e, t) => !l[e] && t(e)
38
+ `, S = u(h).withConfig({
39
+ shouldForwardProp: (e, t) => !w[e] && t(e)
20
40
  })`
21
41
  & > * {
22
42
  margin-left: 0;
@@ -26,30 +46,31 @@ const l = {
26
46
  & > * + * {
27
47
  margin-left: ${({ theme: e, spacing: t }) => e.spaces[t]};
28
48
  }
29
- `, a = p(({ horizontal: e, spacing: t, size: o, ...i }, n) => (o && console.warn(
30
- 'Deprecation warning: Usage of "size" prop in Stack component is deprecated. This is discouraged and will be removed in the next major release. Please use "spacing" instead'
31
- ), e ? /* @__PURE__ */ s.createElement(g, {
32
- ref: n,
33
- spacing: t || o,
34
- ...i
35
- }) : /* @__PURE__ */ s.createElement(d, {
36
- direction: "column",
37
- alignItems: "stretch",
38
- ref: n,
39
- spacing: t || o,
40
- ...i
41
- })));
42
- a.displayName = "Stack";
43
- a.defaultProps = {
49
+ `, s = b((y, c) => {
50
+ var m = y, { horizontal: e, spacing: t, size: o } = m, r = g(m, ["horizontal", "spacing", "size"]);
51
+ return o && console.warn(
52
+ 'Deprecation warning: Usage of "size" prop in Stack component is deprecated. This is discouraged and will be removed in the next major release. Please use "spacing" instead'
53
+ ), e ? /* @__PURE__ */ f.createElement(S, i({
54
+ ref: c,
55
+ spacing: t || o
56
+ }, r)) : /* @__PURE__ */ f.createElement(k, i({
57
+ direction: "column",
58
+ alignItems: "stretch",
59
+ ref: c,
60
+ spacing: t || o
61
+ }, r));
62
+ });
63
+ s.displayName = "Stack";
64
+ s.defaultProps = {
44
65
  horizontal: !1,
45
66
  size: void 0,
46
67
  spacing: void 0
47
68
  };
48
- a.propTypes = {
49
- horizontal: r.bool,
50
- size: r.number,
51
- spacing: r.number
69
+ s.propTypes = {
70
+ horizontal: n.bool,
71
+ size: n.number,
72
+ spacing: n.number
52
73
  };
53
74
  export {
54
- a as Stack
75
+ s as Stack
55
76
  };
@@ -1,11 +1,11 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("react"),b=require("prop-types"),m=require("../Box/Box.cjs"),$=require("../Flex/Flex.cjs"),x=require("../Typography/Typography.cjs"),T=require("styled-components"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=a(h),o=a(b),c=a(T),_=c.default.div`
1
+ "use strict";var B=Object.defineProperty;var a=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var i=(e,t,o)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,y=(e,t)=>{for(var o in t||(t={}))g.call(t,o)&&i(e,o,t[o]);if(a)for(var o of a(t))f.call(t,o)&&i(e,o,t[o]);return e};var h=(e,t)=>{var o={};for(var r in e)g.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&a)for(var r of a(e))t.indexOf(r)<0&&f.call(e,r)&&(o[r]=e[r]);return o};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("react"),q=require("prop-types"),j=require("styled-components"),C=require("../Box/Box.cjs"),R=require("../Flex/Flex.cjs"),k=require("../Typography/Typography.cjs"),n=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=n(S),s=n(q),b=n(j),w=b.default.div`
2
2
  margin-right: ${({theme:e})=>e.spaces[3]};
3
3
  width: ${6/16}rem;
4
4
  height: ${6/16}rem;
5
5
  border-radius: 50%;
6
6
  background: ${({theme:e,backgroundColor:t})=>e.colors[t]};
7
- `,B=c.default(m.Box)`
8
- ${x.Typography} {
7
+ `,F=b.default(C.Box)`
8
+ ${k.Typography} {
9
9
  color: ${({theme:e,textColor:t})=>e.colors[t]};
10
10
  }
11
- `,s=({variant:e,showBullet:t,size:l,children:n,...p})=>{const i=`${e}100`,g=`${e}200`,f=`${e}600`,y=`${e}600`,u=l==="S"?2:5,d=l==="S"?1:4;return r.default.createElement(B,{borderColor:g,textColor:y,background:i,hasRadius:!0,paddingTop:d,paddingBottom:d,paddingLeft:u,paddingRight:u,...p},t?r.default.createElement($.Flex,null,r.default.createElement(_,{backgroundColor:f}),n):n)};s.defaultProps={showBullet:!0,size:"M",variant:"primary"};s.propTypes={children:o.default.node.isRequired,showBullet:o.default.bool,size:o.default.oneOf(["S","M"]),variant:o.default.oneOf(["alternative","danger","neutral","primary","secondary","success","warning"])};exports.Status=s;
11
+ `,u=M=>{var d=M,{variant:e,showBullet:t,size:o,children:r}=d,m=h(d,["variant","showBullet","size","children"]);const $=`${e}100`,x=`${e}200`,T=`${e}600`,_=`${e}600`,c=o==="S"?2:5,p=o==="S"?1:4;return l.default.createElement(F,y({borderColor:x,textColor:_,background:$,hasRadius:!0,paddingTop:p,paddingBottom:p,paddingLeft:c,paddingRight:c},m),t?l.default.createElement(R.Flex,null,l.default.createElement(w,{backgroundColor:T}),r):r)};u.defaultProps={showBullet:!0,size:"M",variant:"primary"};u.propTypes={children:s.default.node.isRequired,showBullet:s.default.bool,size:s.default.oneOf(["S","M"]),variant:s.default.oneOf(["alternative","danger","neutral","primary","secondary","success","warning"])};exports.Status=u;
@@ -1,46 +1,66 @@
1
- import t from "react";
2
- import e from "prop-types";
3
- import { Box as f } from "../Box/Box.js";
4
- import { Flex as $ } from "../Flex/Flex.js";
5
- import { Typography as h } from "../Typography/Typography.js";
6
- import l from "styled-components";
7
- const b = l.div`
1
+ var S = Object.defineProperty;
2
+ var n = Object.getOwnPropertySymbols;
3
+ var c = Object.prototype.hasOwnProperty, m = Object.prototype.propertyIsEnumerable;
4
+ var i = (o, r, e) => r in o ? S(o, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[r] = e, u = (o, r) => {
5
+ for (var e in r || (r = {}))
6
+ c.call(r, e) && i(o, e, r[e]);
7
+ if (n)
8
+ for (var e of n(r))
9
+ m.call(r, e) && i(o, e, r[e]);
10
+ return o;
11
+ };
12
+ var g = (o, r) => {
13
+ var e = {};
14
+ for (var t in o)
15
+ c.call(o, t) && r.indexOf(t) < 0 && (e[t] = o[t]);
16
+ if (o != null && n)
17
+ for (var t of n(o))
18
+ r.indexOf(t) < 0 && m.call(o, t) && (e[t] = o[t]);
19
+ return e;
20
+ };
21
+ import s from "react";
22
+ import a from "prop-types";
23
+ import f from "styled-components";
24
+ import { Box as k } from "../Box/Box.js";
25
+ import { Flex as w } from "../Flex/Flex.js";
26
+ import { Typography as x } from "../Typography/Typography.js";
27
+ const R = f.div`
8
28
  margin-right: ${({ theme: o }) => o.spaces[3]};
9
29
  width: ${6 / 16}rem;
10
30
  height: ${6 / 16}rem;
11
31
  border-radius: 50%;
12
32
  background: ${({ theme: o, backgroundColor: r }) => o.colors[r]};
13
- `, y = l(f)`
14
- ${h} {
33
+ `, T = f(k)`
34
+ ${x} {
15
35
  color: ${({ theme: o, textColor: r }) => o.colors[r]};
16
36
  }
17
- `, p = ({ variant: o, showBullet: r, size: n, children: a, ...i }) => {
18
- const c = `${o}100`, m = `${o}200`, u = `${o}600`, g = `${o}600`, s = n === "S" ? 2 : 5, d = n === "S" ? 1 : 4;
19
- return /* @__PURE__ */ t.createElement(y, {
20
- borderColor: m,
21
- textColor: g,
22
- background: c,
37
+ `, $ = (E) => {
38
+ var d = E, { variant: o, showBullet: r, size: e, children: t } = d, h = g(d, ["variant", "showBullet", "size", "children"]);
39
+ const b = `${o}100`, y = `${o}200`, B = `${o}600`, C = `${o}600`, l = e === "S" ? 2 : 5, p = e === "S" ? 1 : 4;
40
+ return /* @__PURE__ */ s.createElement(T, u({
41
+ borderColor: y,
42
+ textColor: C,
43
+ background: b,
23
44
  hasRadius: !0,
24
- paddingTop: d,
25
- paddingBottom: d,
26
- paddingLeft: s,
27
- paddingRight: s,
28
- ...i
29
- }, r ? /* @__PURE__ */ t.createElement($, null, /* @__PURE__ */ t.createElement(b, {
30
- backgroundColor: u
31
- }), a) : a);
45
+ paddingTop: p,
46
+ paddingBottom: p,
47
+ paddingLeft: l,
48
+ paddingRight: l
49
+ }, h), r ? /* @__PURE__ */ s.createElement(w, null, /* @__PURE__ */ s.createElement(R, {
50
+ backgroundColor: B
51
+ }), t) : t);
32
52
  };
33
- p.defaultProps = {
53
+ $.defaultProps = {
34
54
  showBullet: !0,
35
55
  size: "M",
36
56
  variant: "primary"
37
57
  };
38
- p.propTypes = {
39
- children: e.node.isRequired,
40
- showBullet: e.bool,
41
- size: e.oneOf(["S", "M"]),
42
- variant: e.oneOf(["alternative", "danger", "neutral", "primary", "secondary", "success", "warning"])
58
+ $.propTypes = {
59
+ children: a.node.isRequired,
60
+ showBullet: a.bool,
61
+ size: a.oneOf(["S", "M"]),
62
+ variant: a.oneOf(["alternative", "danger", "neutral", "primary", "secondary", "success", "warning"])
43
63
  };
44
64
  export {
45
- p as Status
65
+ $ as Status
46
66
  };
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react"),i=require("styled-components"),u=require("prop-types"),d=require("../Grid/Grid.cjs");require("../Grid/GridItem.cjs");const t=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=t(s),c=t(i),n=t(u),r=`${232/16}rem`,p=c.default(d.Grid)`
2
- width: ${r};
1
+ "use strict";var b=Object.defineProperty;var a=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;var i=(e,t,r)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&i(e,r,t[r]);if(a)for(var r of a(t))d.call(t,r)&&i(e,r,t[r]);return e};var c=(e,t)=>{var r={};for(var o in e)u.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&a)for(var o of a(e))t.indexOf(o)<0&&d.call(e,o)&&(r[o]=e[o]);return r};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react"),y=require("styled-components"),v=require("prop-types"),_=require("../Grid/Grid.cjs");require("../Grid/GridItem.cjs");const s=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},g=s(f),h=s(y),q=s(v),n=`${232/16}rem`,G=h.default(_.Grid)`
2
+ width: ${n};
3
3
  background: ${({theme:e})=>e.colors.neutral100};
4
4
  position: sticky;
5
5
  top: 0;
@@ -7,4 +7,4 @@
7
7
  overflow-y: auto;
8
8
  border-right: 1px solid ${({theme:e})=>e.colors.neutral200};
9
9
  z-index: 1;
10
- `,o=({ariaLabel:e,...a})=>l.default.createElement(p,{"aria-label":e,as:"nav",...a});o.propTypes={ariaLabel:n.default.string.isRequired};exports.SubNav=o;exports.subNavWidth=r;
10
+ `,p=r=>{var o=r,{ariaLabel:e}=o,t=c(o,["ariaLabel"]);return g.default.createElement(G,l({"aria-label":e,as:"nav"},t))};p.propTypes={ariaLabel:q.default.string.isRequired};exports.SubNav=p;exports.subNavWidth=n;
@@ -1,10 +1,30 @@
1
- import t from "react";
2
- import e from "styled-components";
3
- import i from "prop-types";
4
- import { Grid as a } from "../Grid/Grid.js";
1
+ var m = Object.defineProperty;
2
+ var i = Object.getOwnPropertySymbols;
3
+ var p = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
4
+ var a = (r, o, t) => o in r ? m(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t, l = (r, o) => {
5
+ for (var t in o || (o = {}))
6
+ p.call(o, t) && a(r, t, o[t]);
7
+ if (i)
8
+ for (var t of i(o))
9
+ s.call(o, t) && a(r, t, o[t]);
10
+ return r;
11
+ };
12
+ var n = (r, o) => {
13
+ var t = {};
14
+ for (var e in r)
15
+ p.call(r, e) && o.indexOf(e) < 0 && (t[e] = r[e]);
16
+ if (r != null && i)
17
+ for (var e of i(r))
18
+ o.indexOf(e) < 0 && s.call(r, e) && (t[e] = r[e]);
19
+ return t;
20
+ };
21
+ import d from "react";
22
+ import u from "styled-components";
23
+ import c from "prop-types";
24
+ import { Grid as b } from "../Grid/Grid.js";
5
25
  import "../Grid/GridItem.js";
6
- const p = `${232 / 16}rem`, s = e(a)`
7
- width: ${p};
26
+ const f = `${232 / 16}rem`, h = u(b)`
27
+ width: ${f};
8
28
  background: ${({ theme: r }) => r.colors.neutral100};
9
29
  position: sticky;
10
30
  top: 0;
@@ -12,15 +32,17 @@ const p = `${232 / 16}rem`, s = e(a)`
12
32
  overflow-y: auto;
13
33
  border-right: 1px solid ${({ theme: r }) => r.colors.neutral200};
14
34
  z-index: 1;
15
- `, l = ({ ariaLabel: r, ...o }) => /* @__PURE__ */ t.createElement(s, {
16
- "aria-label": r,
17
- as: "nav",
18
- ...o
19
- });
20
- l.propTypes = {
21
- ariaLabel: i.string.isRequired
35
+ `, v = (t) => {
36
+ var e = t, { ariaLabel: r } = e, o = n(e, ["ariaLabel"]);
37
+ return /* @__PURE__ */ d.createElement(h, l({
38
+ "aria-label": r,
39
+ as: "nav"
40
+ }, o));
41
+ };
42
+ v.propTypes = {
43
+ ariaLabel: c.string.isRequired
22
44
  };
23
45
  export {
24
- l as SubNav,
25
- p as subNavWidth
46
+ v as SubNav,
47
+ f as subNavWidth
26
48
  };