@strapi/design-system 0.0.0-599b75fb-test → 0.0.0-622b91ef

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 (565) hide show
  1. package/README.md +47 -0
  2. package/dist/Accordion/Accordion.cjs +4 -4
  3. package/dist/Accordion/Accordion.js +13 -71
  4. package/dist/Accordion/AccordionContent.cjs +1 -1
  5. package/dist/Accordion/AccordionContent.js +3 -16
  6. package/dist/Accordion/AccordionContext.cjs +1 -1
  7. package/dist/Accordion/AccordionGroup.cjs +4 -4
  8. package/dist/Accordion/AccordionGroup.js +19 -89
  9. package/dist/Accordion/AccordionToggle.cjs +3 -3
  10. package/dist/Accordion/AccordionToggle.js +11 -101
  11. package/dist/Accordion/index.cjs +1 -1
  12. package/dist/Accordion/utils.cjs +1 -1
  13. package/dist/Alert/Alert.cjs +23 -29
  14. package/dist/Alert/Alert.js +33 -111
  15. package/dist/Alert/index.cjs +1 -1
  16. package/dist/Alert/utils.cjs +1 -1
  17. package/dist/Alert/utils.js +14 -3
  18. package/dist/Avatar/Avatar.cjs +5 -5
  19. package/dist/Avatar/Avatar.js +12 -56
  20. package/dist/Avatar/AvatarGroup.cjs +3 -3
  21. package/dist/Avatar/constants.cjs +1 -1
  22. package/dist/Avatar/index.cjs +1 -1
  23. package/dist/Badge/Badge.cjs +2 -2
  24. package/dist/Badge/Badge.js +4 -33
  25. package/dist/Badge/index.cjs +1 -1
  26. package/dist/BaseButton/BaseButton.cjs +4 -4
  27. package/dist/BaseButton/BaseButton.js +15 -38
  28. package/dist/BaseButton/index.cjs +1 -1
  29. package/dist/BaseCheckbox/BaseCheckbox.cjs +4 -4
  30. package/dist/BaseCheckbox/BaseCheckbox.js +19 -62
  31. package/dist/BaseCheckbox/index.cjs +1 -1
  32. package/dist/BaseCheckbox/utils.cjs +1 -1
  33. package/dist/BaseLink/BaseLink.cjs +1 -3
  34. package/dist/BaseLink/BaseLink.js +2 -18
  35. package/dist/BaseLink/index.cjs +1 -1
  36. package/dist/BaseRadio/BaseRadio.cjs +2 -2
  37. package/dist/BaseRadio/BaseRadio.js +12 -38
  38. package/dist/BaseRadio/RadioGroup.cjs +1 -1
  39. package/dist/BaseRadio/RadioGroup.js +3 -25
  40. package/dist/BaseRadio/context.cjs +1 -1
  41. package/dist/BaseRadio/index.cjs +1 -1
  42. package/dist/BaseRadio/utils.cjs +1 -1
  43. package/dist/Box/Box.cjs +3 -3
  44. package/dist/Box/Box.js +47 -173
  45. package/dist/Box/index.cjs +1 -1
  46. package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
  47. package/dist/Breadcrumbs/Breadcrumbs.js +10 -43
  48. package/dist/Breadcrumbs/index.cjs +1 -1
  49. package/dist/Button/Button.cjs +10 -5
  50. package/dist/Button/Button.js +27 -69
  51. package/dist/Button/constants.cjs +1 -1
  52. package/dist/Button/index.cjs +1 -1
  53. package/dist/Button/utils.cjs +1 -1
  54. package/dist/Card/Card.cjs +1 -1
  55. package/dist/Card/Card.js +5 -25
  56. package/dist/Card/CardAction.cjs +2 -2
  57. package/dist/Card/CardAsset.cjs +3 -3
  58. package/dist/Card/CardAsset.js +5 -25
  59. package/dist/Card/CardBadge.cjs +2 -2
  60. package/dist/Card/CardBadge.js +2 -8
  61. package/dist/Card/CardBody.cjs +1 -1
  62. package/dist/Card/CardBody.js +1 -10
  63. package/dist/Card/CardCheckbox.cjs +1 -1
  64. package/dist/Card/CardCheckbox.js +5 -10
  65. package/dist/Card/CardContent.cjs +2 -2
  66. package/dist/Card/CardContent.js +1 -7
  67. package/dist/Card/CardContext.cjs +1 -1
  68. package/dist/Card/CardContext.js +1 -3
  69. package/dist/Card/CardHeader.cjs +2 -2
  70. package/dist/Card/CardHeader.js +2 -8
  71. package/dist/Card/CardTimer.cjs +1 -1
  72. package/dist/Card/CardTimer.js +1 -19
  73. package/dist/Card/CardTitle.cjs +1 -1
  74. package/dist/Card/CardTitle.js +3 -17
  75. package/dist/Card/index.cjs +1 -1
  76. package/dist/CarouselInput/Carousel.cjs +6 -7
  77. package/dist/CarouselInput/Carousel.js +24 -69
  78. package/dist/CarouselInput/CarouselActions.cjs +1 -1
  79. package/dist/CarouselInput/CarouselActions.js +4 -16
  80. package/dist/CarouselInput/CarouselImage.cjs +3 -4
  81. package/dist/CarouselInput/CarouselImage.js +13 -22
  82. package/dist/CarouselInput/CarouselInput.cjs +1 -1
  83. package/dist/CarouselInput/CarouselInput.js +12 -72
  84. package/dist/CarouselInput/CarouselSlide.cjs +1 -3
  85. package/dist/CarouselInput/CarouselSlide.js +4 -28
  86. package/dist/CarouselInput/index.cjs +1 -1
  87. package/dist/Checkbox/Checkbox.cjs +2 -2
  88. package/dist/Checkbox/Checkbox.js +21 -38
  89. package/dist/Checkbox/index.cjs +1 -1
  90. package/dist/Combobox/Combobox.cjs +107 -1
  91. package/dist/Combobox/Combobox.js +168 -280
  92. package/dist/Combobox/ComboboxList.cjs +5 -1
  93. package/dist/Combobox/ComboboxList.js +8 -6
  94. package/dist/Combobox/ComboboxOption.cjs +1 -1
  95. package/dist/Combobox/ComboboxOption.js +3 -29
  96. package/dist/Combobox/index.cjs +1 -1
  97. package/dist/DatePicker/DatePicker.cjs +85 -5
  98. package/dist/DatePicker/DatePicker.js +423 -76
  99. package/dist/DatePicker/index.cjs +1 -1
  100. package/dist/DateTimePicker/DateTimePicker.cjs +7 -1
  101. package/dist/DateTimePicker/DateTimePicker.js +96 -103
  102. package/dist/DateTimePicker/index.cjs +1 -1
  103. package/dist/DateTimePicker/index.js +3 -2
  104. package/dist/DesignSystemProvider.cjs +1 -0
  105. package/dist/DesignSystemProvider.js +10 -0
  106. package/dist/Dialog/Dialog.cjs +4 -4
  107. package/dist/Dialog/Dialog.js +20 -45
  108. package/dist/Dialog/DialogBody.cjs +2 -2
  109. package/dist/Dialog/DialogBody.js +9 -18
  110. package/dist/Dialog/DialogFooter.cjs +2 -2
  111. package/dist/Dialog/DialogFooter.js +7 -17
  112. package/dist/Dialog/index.cjs +1 -1
  113. package/dist/DismissibleLayer/index.cjs +1 -1
  114. package/dist/DismissibleLayer/index.js +3 -2
  115. package/dist/Divider/Divider.cjs +2 -2
  116. package/dist/Divider/Divider.js +6 -15
  117. package/dist/Divider/index.cjs +1 -1
  118. package/dist/EmptyStateLayout/EmptyStateLayout.cjs +2 -7
  119. package/dist/EmptyStateLayout/EmptyStateLayout.js +8 -25
  120. package/dist/EmptyStateLayout/index.cjs +1 -1
  121. package/dist/EmptyStateLayout/story-assets/Illo.cjs +1 -1
  122. package/dist/EmptyStateLayout/story-assets/Illo.js +3 -62
  123. package/dist/Field/Field.cjs +1 -1
  124. package/dist/Field/Field.js +5 -26
  125. package/dist/Field/FieldAction.cjs +2 -2
  126. package/dist/Field/FieldAction.js +5 -20
  127. package/dist/Field/FieldContext.cjs +1 -1
  128. package/dist/Field/FieldError.cjs +1 -1
  129. package/dist/Field/FieldError.js +2 -12
  130. package/dist/Field/FieldHint.cjs +1 -1
  131. package/dist/Field/FieldHint.js +4 -14
  132. package/dist/Field/FieldInput.cjs +4 -4
  133. package/dist/Field/FieldInput.js +19 -86
  134. package/dist/Field/FieldLabel.cjs +4 -4
  135. package/dist/Field/FieldLabel.js +7 -32
  136. package/dist/Field/index.cjs +1 -1
  137. package/dist/Flex/Flex.cjs +4 -4
  138. package/dist/Flex/Flex.js +10 -25
  139. package/dist/Flex/index.cjs +1 -1
  140. package/dist/FocusTrap/FocusTrap.cjs +1 -1
  141. package/dist/FocusTrap/FocusTrap.js +14 -22
  142. package/dist/FocusTrap/index.cjs +1 -1
  143. package/dist/Grid/Grid.cjs +3 -3
  144. package/dist/Grid/Grid.js +10 -20
  145. package/dist/Grid/GridItem.cjs +2 -2
  146. package/dist/Grid/GridItem.js +10 -26
  147. package/dist/Grid/index.cjs +1 -1
  148. package/dist/Icon/Icon.cjs +3 -3
  149. package/dist/Icon/Icon.js +6 -21
  150. package/dist/Icon/index.cjs +1 -1
  151. package/dist/IconButton/IconButton.cjs +4 -4
  152. package/dist/IconButton/IconButton.js +34 -85
  153. package/dist/IconButton/index.cjs +1 -1
  154. package/dist/JSONInput/JSONInput.cjs +1 -1
  155. package/dist/JSONInput/JSONInput.js +11 -56
  156. package/dist/JSONInput/JSONInputContainer.cjs +3 -3
  157. package/dist/JSONInput/JSONInputContainer.js +7 -14
  158. package/dist/JSONInput/index.cjs +1 -1
  159. package/dist/JSONInput/utils/decorationExtension.cjs +1 -1
  160. package/dist/JSONInput/utils/decorationExtension.js +3 -0
  161. package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -1
  162. package/dist/KeyboardNavigable/KeyboardNavigable.js +32 -39
  163. package/dist/KeyboardNavigable/index.cjs +1 -1
  164. package/dist/Layout/ActionLayout.cjs +1 -9
  165. package/dist/Layout/ActionLayout.js +4 -23
  166. package/dist/Layout/ContentLayout.cjs +1 -1
  167. package/dist/Layout/ContentLayout.js +3 -7
  168. package/dist/Layout/GridLayout.cjs +3 -3
  169. package/dist/Layout/GridLayout.js +4 -8
  170. package/dist/Layout/HeaderLayout.cjs +4 -3
  171. package/dist/Layout/HeaderLayout.js +25 -96
  172. package/dist/Layout/Layout.cjs +4 -4
  173. package/dist/Layout/Layout.js +8 -16
  174. package/dist/Layout/TwoColsLayout.cjs +1 -1
  175. package/dist/Layout/TwoColsLayout.js +6 -11
  176. package/dist/Layout/index.cjs +1 -1
  177. package/dist/Link/Link.cjs +4 -4
  178. package/dist/Link/Link.js +9 -53
  179. package/dist/Link/index.cjs +1 -1
  180. package/dist/LinkButton/LinkButton.cjs +2 -2
  181. package/dist/LinkButton/LinkButton.js +8 -51
  182. package/dist/LinkButton/index.cjs +1 -1
  183. package/dist/LiveRegions/LiveRegions.cjs +1 -1
  184. package/dist/LiveRegions/LiveRegions.js +1 -18
  185. package/dist/LiveRegions/constants.cjs +1 -1
  186. package/dist/LiveRegions/index.cjs +1 -1
  187. package/dist/LiveRegions/useNotifyAT.cjs +1 -1
  188. package/dist/Loader/Loader.cjs +2 -2
  189. package/dist/Loader/Loader.js +3 -22
  190. package/dist/Loader/index.cjs +1 -1
  191. package/dist/Main/Main.cjs +2 -2
  192. package/dist/Main/Main.js +6 -15
  193. package/dist/Main/SkipToContent.cjs +4 -7
  194. package/dist/Main/SkipToContent.js +5 -24
  195. package/dist/Main/index.cjs +1 -1
  196. package/dist/MainNav/MainNav.cjs +2 -2
  197. package/dist/MainNav/MainNav.js +9 -30
  198. package/dist/MainNav/MainNavContext.cjs +1 -1
  199. package/dist/MainNav/MainNavContext.js +1 -1
  200. package/dist/MainNav/NavBrand.cjs +3 -3
  201. package/dist/MainNav/NavBrand.js +14 -24
  202. package/dist/MainNav/NavCondense.cjs +2 -2
  203. package/dist/MainNav/NavCondense.js +10 -14
  204. package/dist/MainNav/NavFooter.cjs +1 -1
  205. package/dist/MainNav/NavFooter.js +4 -9
  206. package/dist/MainNav/NavLink.cjs +6 -6
  207. package/dist/MainNav/NavLink.js +39 -51
  208. package/dist/MainNav/NavSection.cjs +1 -1
  209. package/dist/MainNav/NavSection.js +9 -33
  210. package/dist/MainNav/NavSections.cjs +2 -2
  211. package/dist/MainNav/NavSections.js +8 -21
  212. package/dist/MainNav/NavUser.cjs +2 -2
  213. package/dist/MainNav/NavUser.js +14 -25
  214. package/dist/MainNav/index.cjs +1 -1
  215. package/dist/ModalLayout/ModalBody.cjs +2 -2
  216. package/dist/ModalLayout/ModalBody.js +6 -6
  217. package/dist/ModalLayout/ModalContext.cjs +1 -1
  218. package/dist/ModalLayout/ModalContext.js +2 -1
  219. package/dist/ModalLayout/ModalFooter.cjs +2 -6
  220. package/dist/ModalLayout/ModalFooter.js +8 -21
  221. package/dist/ModalLayout/ModalHeader.cjs +2 -2
  222. package/dist/ModalLayout/ModalHeader.js +13 -21
  223. package/dist/ModalLayout/ModalLayout.cjs +3 -5
  224. package/dist/ModalLayout/ModalLayout.js +12 -31
  225. package/dist/ModalLayout/index.cjs +1 -1
  226. package/dist/NumberInput/NumberInput.cjs +2 -2
  227. package/dist/NumberInput/NumberInput.js +69 -162
  228. package/dist/NumberInput/index.cjs +1 -1
  229. package/dist/Pagination/Pagination.cjs +1 -5
  230. package/dist/Pagination/Pagination.js +8 -21
  231. package/dist/Pagination/PaginationContext.cjs +1 -1
  232. package/dist/Pagination/components.cjs +10 -13
  233. package/dist/Pagination/components.js +33 -69
  234. package/dist/Pagination/index.cjs +1 -1
  235. package/dist/Popover/Popover.cjs +4 -5
  236. package/dist/Popover/Popover.js +105 -110
  237. package/dist/Popover/index.cjs +1 -1
  238. package/dist/Popover/index.js +5 -9
  239. package/dist/Popover/primitives.cjs +1 -0
  240. package/dist/Popover/primitives.js +5 -0
  241. package/dist/Portal/Portal.cjs +1 -1
  242. package/dist/Portal/Portal.js +7 -11
  243. package/dist/Portal/index.cjs +1 -1
  244. package/dist/ProgressBar/ProgressBar.cjs +5 -5
  245. package/dist/ProgressBar/ProgressBar.js +6 -36
  246. package/dist/ProgressBar/index.cjs +1 -1
  247. package/dist/Radio/Radio.cjs +1 -4
  248. package/dist/Radio/Radio.js +6 -15
  249. package/dist/Radio/index.cjs +1 -1
  250. package/dist/RawTable/RawCell.cjs +1 -1
  251. package/dist/RawTable/RawCell.js +6 -29
  252. package/dist/RawTable/RawTable.cjs +1 -1
  253. package/dist/RawTable/RawTable.js +4 -28
  254. package/dist/RawTable/RawTableContext.cjs +1 -1
  255. package/dist/RawTable/RawTbody.cjs +1 -1
  256. package/dist/RawTable/RawTbody.js +3 -11
  257. package/dist/RawTable/RawThead.cjs +1 -1
  258. package/dist/RawTable/RawThead.js +3 -11
  259. package/dist/RawTable/RawTr.cjs +1 -1
  260. package/dist/RawTable/RawTr.js +3 -13
  261. package/dist/RawTable/focusFocusable.cjs +1 -1
  262. package/dist/RawTable/index.cjs +1 -1
  263. package/dist/Searchbar/SearchForm.cjs +1 -1
  264. package/dist/Searchbar/SearchForm.js +3 -3
  265. package/dist/Searchbar/Searchbar.cjs +10 -11
  266. package/dist/Searchbar/Searchbar.js +31 -59
  267. package/dist/Searchbar/index.cjs +1 -1
  268. package/dist/Select/MultiSelect.cjs +30 -0
  269. package/dist/Select/MultiSelect.js +75 -0
  270. package/dist/Select/MultiSelectNested.cjs +3 -1
  271. package/dist/Select/MultiSelectNested.js +7 -12
  272. package/dist/Select/OptGroup.cjs +5 -1
  273. package/dist/Select/OptGroup.js +8 -22
  274. package/dist/Select/Option.cjs +5 -45
  275. package/dist/Select/Option.js +13 -99
  276. package/dist/Select/Select.cjs +6 -3
  277. package/dist/Select/Select.js +16 -206
  278. package/dist/Select/SelectList.cjs +5 -1
  279. package/dist/Select/SelectList.js +67 -69
  280. package/dist/Select/SelectParts.cjs +83 -0
  281. package/dist/Select/SelectParts.js +110 -0
  282. package/dist/Select/SingleSelect.cjs +1 -0
  283. package/dist/Select/SingleSelect.js +44 -0
  284. package/dist/Select/index.cjs +1 -1
  285. package/dist/Select/index.js +17 -10
  286. package/dist/SimpleMenu/SimpleMenu.cjs +9 -9
  287. package/dist/SimpleMenu/SimpleMenu.js +73 -143
  288. package/dist/SimpleMenu/index.cjs +1 -1
  289. package/dist/SimpleMenu/utils.cjs +1 -1
  290. package/dist/Stack/Stack.cjs +5 -5
  291. package/dist/Stack/Stack.js +7 -28
  292. package/dist/Stack/index.cjs +1 -1
  293. package/dist/Status/Status.cjs +7 -7
  294. package/dist/Status/Status.js +12 -38
  295. package/dist/Status/index.cjs +1 -1
  296. package/dist/SubNav/SubNav.cjs +5 -5
  297. package/dist/SubNav/SubNav.js +8 -13
  298. package/dist/SubNav/SubNavHeader.cjs +3 -3
  299. package/dist/SubNav/SubNavHeader.js +32 -69
  300. package/dist/SubNav/SubNavLink.cjs +13 -13
  301. package/dist/SubNav/SubNavLink.js +18 -44
  302. package/dist/SubNav/SubNavLinkSection.cjs +4 -4
  303. package/dist/SubNav/SubNavLinkSection.js +15 -24
  304. package/dist/SubNav/SubNavSection.cjs +2 -2
  305. package/dist/SubNav/SubNavSection.js +16 -49
  306. package/dist/SubNav/SubNavSectionLabel.cjs +3 -3
  307. package/dist/SubNav/SubNavSectionLabel.js +11 -36
  308. package/dist/SubNav/SubNavSections.cjs +1 -1
  309. package/dist/SubNav/SubNavSections.js +5 -18
  310. package/dist/SubNav/index.cjs +1 -1
  311. package/dist/Switch/Switch.cjs +3 -3
  312. package/dist/Switch/Switch.js +15 -44
  313. package/dist/Switch/index.cjs +1 -1
  314. package/dist/Table/Cell.cjs +3 -3
  315. package/dist/Table/Cell.js +9 -18
  316. package/dist/Table/TFooter.cjs +3 -3
  317. package/dist/Table/TFooter.js +11 -16
  318. package/dist/Table/Table.cjs +12 -12
  319. package/dist/Table/Table.js +16 -24
  320. package/dist/Table/Tbody.cjs +2 -2
  321. package/dist/Table/Tbody.js +6 -6
  322. package/dist/Table/Thead.cjs +2 -2
  323. package/dist/Table/Thead.js +6 -6
  324. package/dist/Table/Tr.cjs +2 -2
  325. package/dist/Table/Tr.js +6 -6
  326. package/dist/Table/index.cjs +1 -1
  327. package/dist/Tabs/TabGroup.cjs +1 -1
  328. package/dist/Tabs/TabGroup.js +13 -36
  329. package/dist/Tabs/TabPanels.cjs +1 -1
  330. package/dist/Tabs/TabPanels.js +11 -21
  331. package/dist/Tabs/Tabs.cjs +2 -2
  332. package/dist/Tabs/Tabs.js +56 -106
  333. package/dist/Tabs/TabsContext.cjs +1 -1
  334. package/dist/Tabs/TabsContext.js +11 -4
  335. package/dist/Tabs/components.cjs +17 -17
  336. package/dist/Tabs/index.cjs +1 -1
  337. package/dist/Tag/Tag.cjs +4 -4
  338. package/dist/Tag/Tag.js +6 -43
  339. package/dist/Tag/index.cjs +1 -1
  340. package/dist/TextButton/TextButton.cjs +6 -12
  341. package/dist/TextButton/TextButton.js +17 -60
  342. package/dist/TextButton/index.cjs +1 -1
  343. package/dist/TextInput/TextInput.cjs +1 -1
  344. package/dist/TextInput/TextInput.js +10 -41
  345. package/dist/TextInput/index.cjs +1 -1
  346. package/dist/Textarea/Textarea.cjs +14 -12
  347. package/dist/Textarea/Textarea.js +33 -52
  348. package/dist/Textarea/index.cjs +1 -1
  349. package/dist/ThemeProvider/ThemeProvider.cjs +2 -2
  350. package/dist/ThemeProvider/ThemeProvider.js +5 -12
  351. package/dist/ThemeProvider/hooks.cjs +1 -1
  352. package/dist/ThemeProvider/index.cjs +1 -1
  353. package/dist/TimePicker/TimePicker.cjs +5 -7
  354. package/dist/TimePicker/TimePicker.js +79 -53
  355. package/dist/TimePicker/index.cjs +1 -1
  356. package/dist/TimePicker/index.js +3 -2
  357. package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
  358. package/dist/ToggleCheckbox/ToggleCheckbox.js +27 -122
  359. package/dist/ToggleCheckbox/index.cjs +1 -1
  360. package/dist/ToggleInput/ToggleInput.cjs +3 -3
  361. package/dist/ToggleInput/ToggleInput.js +15 -62
  362. package/dist/ToggleInput/index.cjs +1 -1
  363. package/dist/Tooltip/Tooltip.cjs +2 -2
  364. package/dist/Tooltip/Tooltip.js +9 -52
  365. package/dist/Tooltip/hooks/useTooltipHandlers.cjs +1 -1
  366. package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -1
  367. package/dist/Tooltip/index.cjs +1 -1
  368. package/dist/Tooltip/utils/positionTooltip.cjs +1 -1
  369. package/dist/Typography/Typography.cjs +2 -2
  370. package/dist/Typography/Typography.js +11 -26
  371. package/dist/Typography/constants.cjs +1 -1
  372. package/dist/Typography/index.cjs +1 -1
  373. package/dist/Typography/utils.cjs +9 -9
  374. package/dist/VisuallyHidden/VisuallyHidden.cjs +1 -1
  375. package/dist/VisuallyHidden/index.cjs +1 -1
  376. package/dist/helpers/context.cjs +1 -0
  377. package/dist/helpers/context.js +21 -0
  378. package/dist/helpers/deprecations.cjs +1 -1
  379. package/dist/helpers/getDefaultLocale.cjs +4 -1
  380. package/dist/helpers/getDefaultLocale.js +7 -2
  381. package/dist/helpers/getFocusableNodes.cjs +1 -1
  382. package/dist/helpers/keyboardKeys.cjs +1 -1
  383. package/dist/helpers/objects.cjs +1 -1
  384. package/dist/helpers/objects.js +6 -22
  385. package/dist/helpers/setOpacity.cjs +1 -1
  386. package/dist/helpers/setTabIndexOnFirstItem.cjs +1 -1
  387. package/dist/helpers/strings.cjs +1 -0
  388. package/dist/helpers/strings.js +4 -0
  389. package/dist/helpers/theme.cjs +1 -1
  390. package/dist/helpers/useElementOnScreen.cjs +4 -1
  391. package/dist/helpers/useElementOnScreen.js +6 -1
  392. package/dist/helpers/useId.cjs +4 -1
  393. package/dist/helpers/useId.js +6 -1
  394. package/dist/helpers/useIntersection.cjs +4 -1
  395. package/dist/helpers/useIntersection.js +6 -1
  396. package/dist/helpers/useLockScroll.cjs +4 -1
  397. package/dist/helpers/useLockScroll.js +6 -1
  398. package/dist/helpers/usePrevious.cjs +4 -1
  399. package/dist/helpers/usePrevious.js +6 -1
  400. package/dist/helpers/useResizeObserver.cjs +4 -1
  401. package/dist/helpers/useResizeObserver.js +6 -1
  402. package/dist/hooks/useComposeRefs.cjs +1 -0
  403. package/dist/hooks/useComposeRefs.js +14 -0
  404. package/dist/hooks/useControllableState.cjs +1 -1
  405. package/dist/hooks/useControllableState.js +7 -7
  406. package/dist/hooks/useDateFormatter.cjs +1 -0
  407. package/dist/hooks/useDateFormatter.js +20 -0
  408. package/dist/hooks/useElementOnScreen.cjs +1 -1
  409. package/dist/hooks/useId.cjs +1 -1
  410. package/dist/hooks/useIntersection.cjs +1 -1
  411. package/dist/hooks/useIntersection.js +8 -8
  412. package/dist/hooks/useLockScroll.cjs +1 -1
  413. package/dist/hooks/usePrevious.cjs +1 -1
  414. package/dist/hooks/useResizeObserver.cjs +1 -1
  415. package/dist/hooks/useResizeObserver.js +1 -1
  416. package/dist/index.cjs +1 -1
  417. package/dist/index.js +305 -293
  418. package/dist/themes/common-theme.cjs +1 -1
  419. package/dist/themes/darkTheme/dark-colors.cjs +1 -1
  420. package/dist/themes/darkTheme/dark-shadows.cjs +1 -1
  421. package/dist/themes/darkTheme/index.cjs +1 -1
  422. package/dist/themes/extendTheme.cjs +4 -4
  423. package/dist/themes/extendTheme.js +21 -13
  424. package/dist/themes/index.cjs +1 -1
  425. package/dist/themes/lightTheme/index.cjs +1 -1
  426. package/dist/themes/lightTheme/light-colors.cjs +1 -1
  427. package/dist/themes/lightTheme/light-shadows.cjs +1 -1
  428. package/dist/themes/sizes.cjs +1 -1
  429. package/dist/themes/sizes.js +4 -4
  430. package/dist/themes/utils.cjs +4 -4
  431. package/dist/themes/utils.js +7 -6
  432. package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
  433. package/dist/v2/Breadcrumbs/Breadcrumbs.js +15 -19
  434. package/dist/v2/Breadcrumbs/Crumb.cjs +1 -1
  435. package/dist/v2/Breadcrumbs/Crumb.js +5 -23
  436. package/dist/v2/Breadcrumbs/CrumbLink.cjs +2 -2
  437. package/dist/v2/Breadcrumbs/CrumbLink.js +6 -14
  438. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +4 -3
  439. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +11 -16
  440. package/dist/v2/Breadcrumbs/Divider.cjs +1 -1
  441. package/dist/v2/Breadcrumbs/Divider.js +5 -5
  442. package/dist/v2/Breadcrumbs/index.cjs +1 -1
  443. package/dist/v2/Link/Link.cjs +13 -11
  444. package/dist/v2/Link/Link.js +23 -37
  445. package/dist/v2/Link/index.cjs +1 -1
  446. package/dist/v2/LinkButton/LinkButton.cjs +2 -2
  447. package/dist/v2/LinkButton/LinkButton.js +11 -49
  448. package/dist/v2/LinkButton/index.cjs +1 -1
  449. package/dist/v2/MainNav/MainNav.cjs +2 -2
  450. package/dist/v2/MainNav/MainNav.js +9 -30
  451. package/dist/v2/MainNav/MainNavContext.cjs +1 -1
  452. package/dist/v2/MainNav/MainNavContext.js +1 -1
  453. package/dist/v2/MainNav/NavBrand.cjs +3 -3
  454. package/dist/v2/MainNav/NavBrand.js +16 -23
  455. package/dist/v2/MainNav/NavCondense.cjs +2 -5
  456. package/dist/v2/MainNav/NavCondense.js +19 -22
  457. package/dist/v2/MainNav/NavFooter.cjs +1 -1
  458. package/dist/v2/MainNav/NavFooter.js +4 -9
  459. package/dist/v2/MainNav/NavLink.cjs +10 -10
  460. package/dist/v2/MainNav/NavLink.js +39 -50
  461. package/dist/v2/MainNav/NavSection.cjs +1 -1
  462. package/dist/v2/MainNav/NavSection.js +9 -33
  463. package/dist/v2/MainNav/NavSections.cjs +2 -2
  464. package/dist/v2/MainNav/NavSections.js +7 -20
  465. package/dist/v2/MainNav/NavUser.cjs +2 -2
  466. package/dist/v2/MainNav/NavUser.js +15 -26
  467. package/dist/v2/MainNav/index.cjs +1 -1
  468. package/dist/v2/Pagination/Pagination.cjs +1 -5
  469. package/dist/v2/Pagination/Pagination.js +8 -21
  470. package/dist/v2/Pagination/PaginationContext.cjs +1 -1
  471. package/dist/v2/Pagination/components.cjs +10 -13
  472. package/dist/v2/Pagination/components.js +31 -51
  473. package/dist/v2/Pagination/index.cjs +1 -1
  474. package/dist/v2/SimpleMenu/Menu.cjs +65 -0
  475. package/dist/v2/SimpleMenu/Menu.js +89 -0
  476. package/dist/v2/SimpleMenu/SimpleMenu.cjs +1 -33
  477. package/dist/v2/SimpleMenu/SimpleMenu.js +25 -177
  478. package/dist/v2/SimpleMenu/index.cjs +1 -1
  479. package/dist/v2/SimpleMenu/index.js +5 -3
  480. package/dist/v2/SubNav/SubNav.cjs +5 -5
  481. package/dist/v2/SubNav/SubNav.js +8 -13
  482. package/dist/v2/SubNav/SubNavHeader.cjs +3 -3
  483. package/dist/v2/SubNav/SubNavHeader.js +33 -70
  484. package/dist/v2/SubNav/SubNavLink.cjs +5 -5
  485. package/dist/v2/SubNav/SubNavLink.js +21 -49
  486. package/dist/v2/SubNav/SubNavLinkSection.cjs +4 -4
  487. package/dist/v2/SubNav/SubNavLinkSection.js +16 -24
  488. package/dist/v2/SubNav/SubNavSection.cjs +2 -2
  489. package/dist/v2/SubNav/SubNavSection.js +14 -46
  490. package/dist/v2/SubNav/SubNavSectionLabel.cjs +3 -3
  491. package/dist/v2/SubNav/SubNavSectionLabel.js +11 -36
  492. package/dist/v2/SubNav/SubNavSections.cjs +1 -1
  493. package/dist/v2/SubNav/SubNavSections.js +5 -18
  494. package/dist/v2/SubNav/index.cjs +1 -1
  495. package/dist/v2/index.cjs +1 -1
  496. package/dist/v2/index.js +53 -51
  497. package/package.json +23 -35
  498. package/dist/Combobox/components.cjs +0 -53
  499. package/dist/Combobox/components.js +0 -64
  500. package/dist/Combobox/utils.cjs +0 -1
  501. package/dist/Combobox/utils.js +0 -78
  502. package/dist/DatePicker/DatePickerCalendar.cjs +0 -1
  503. package/dist/DatePicker/DatePickerCalendar.js +0 -142
  504. package/dist/DatePicker/DatePickerTd.cjs +0 -19
  505. package/dist/DatePicker/DatePickerTd.js +0 -61
  506. package/dist/DatePicker/DatePickerTh.cjs +0 -9
  507. package/dist/DatePicker/DatePickerTh.js +0 -42
  508. package/dist/DatePicker/compareDates.cjs +0 -1
  509. package/dist/DatePicker/compareDates.js +0 -4
  510. package/dist/DatePicker/components.cjs +0 -33
  511. package/dist/DatePicker/components.js +0 -43
  512. package/dist/DatePicker/utils/formatDate.cjs +0 -1
  513. package/dist/DatePicker/utils/formatDate.js +0 -4
  514. package/dist/DatePicker/utils/generateWeeks.cjs +0 -1
  515. package/dist/DatePicker/utils/generateWeeks.js +0 -17
  516. package/dist/DatePicker/utils/getDayOfWeek.cjs +0 -1
  517. package/dist/DatePicker/utils/getDayOfWeek.js +0 -15
  518. package/dist/DatePicker/utils/getMonths.cjs +0 -1
  519. package/dist/DatePicker/utils/getMonths.js +0 -7
  520. package/dist/DatePicker/utils/getYears.cjs +0 -1
  521. package/dist/DatePicker/utils/getYears.js +0 -9
  522. package/dist/DatePicker/utils/index.cjs +0 -1
  523. package/dist/DatePicker/utils/index.js +0 -12
  524. package/dist/DismissibleLayer/DismissibleLayer.cjs +0 -1
  525. package/dist/DismissibleLayer/DismissibleLayer.js +0 -30
  526. package/dist/Grid/GridContext.cjs +0 -1
  527. package/dist/Grid/GridContext.js +0 -6
  528. package/dist/Select/SelectButton.cjs +0 -19
  529. package/dist/Select/SelectButton.js +0 -69
  530. package/dist/Select/SelectTags.cjs +0 -6
  531. package/dist/Select/SelectTags.js +0 -38
  532. package/dist/Select/components.cjs +0 -39
  533. package/dist/Select/components.js +0 -48
  534. package/dist/Select/constants.cjs +0 -1
  535. package/dist/Select/constants.js +0 -8
  536. package/dist/Select/hooks/useButtonRef.cjs +0 -1
  537. package/dist/Select/hooks/useButtonRef.js +0 -13
  538. package/dist/Select/hooks/useListRef.cjs +0 -1
  539. package/dist/Select/hooks/useListRef.js +0 -18
  540. package/dist/Select/utils.cjs +0 -1
  541. package/dist/Select/utils.js +0 -17
  542. package/dist/Tabs/useTabsFocus.cjs +0 -1
  543. package/dist/Tabs/useTabsFocus.js +0 -17
  544. package/dist/Textarea/TextareaInput.cjs +0 -30
  545. package/dist/Textarea/TextareaInput.js +0 -70
  546. package/dist/helpers/arrays.cjs +0 -1
  547. package/dist/helpers/arrays.js +0 -6
  548. package/dist/helpers/escapeSelector.cjs +0 -1
  549. package/dist/helpers/escapeSelector.js +0 -4
  550. package/dist/v2/SimpleMenu/utils.cjs +0 -12
  551. package/dist/v2/SimpleMenu/utils.js +0 -15
  552. /package/dist/BaseCheckbox/assets/{checkmark-black.cjs → checkmark-black.svg.cjs} +0 -0
  553. /package/dist/BaseCheckbox/assets/{checkmark-black.js → checkmark-black.svg.js} +0 -0
  554. /package/dist/BaseCheckbox/assets/{checkmark.cjs → checkmark.svg.cjs} +0 -0
  555. /package/dist/BaseCheckbox/assets/{checkmark.js → checkmark.svg.js} +0 -0
  556. /package/dist/Loader/assets/{loader.cjs → loader.svg.cjs} +0 -0
  557. /package/dist/Loader/assets/{loader.js → loader.svg.js} +0 -0
  558. /package/dist/Pagination/assets/{next.cjs → next.svg.cjs} +0 -0
  559. /package/dist/Pagination/assets/{next.js → next.svg.js} +0 -0
  560. /package/dist/Pagination/assets/{previous.cjs → previous.svg.cjs} +0 -0
  561. /package/dist/Pagination/assets/{previous.js → previous.svg.js} +0 -0
  562. /package/dist/v2/Pagination/assets/{next.cjs → next.svg.cjs} +0 -0
  563. /package/dist/v2/Pagination/assets/{next.js → next.svg.js} +0 -0
  564. /package/dist/v2/Pagination/assets/{previous.cjs → previous.svg.cjs} +0 -0
  565. /package/dist/v2/Pagination/assets/{previous.js → previous.svg.js} +0 -0
@@ -1,52 +1,45 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import { Box as i } from "../Box/Box.js";
3
2
  import { KeyboardKeys as o } from "../helpers/keyboardKeys.js";
4
- const v = ({
5
- tagName: s,
6
- attributeName: a = "",
7
- ...d
8
- }) => {
3
+ import { Box as i } from "../Box/Box.js";
4
+ const v = ({ tagName: s, attributeName: a = "", ...d }) => {
9
5
  const r = () => {
10
6
  const e = document.activeElement;
11
7
  return e ? s ? e.tagName.toLowerCase() === s : e.hasAttribute(a) : !1;
12
8
  }, l = (e) => s ? e.querySelectorAll(s) : e.querySelectorAll(`[${a}]`);
13
- return m(i, {
14
- onKeyDown: (e) => {
15
- switch (e.key) {
16
- case o.RIGHT:
17
- case o.DOWN: {
18
- if (r()) {
19
- e.preventDefault();
20
- const n = document.activeElement, t = [...l(e.currentTarget)], c = t.findIndex((f) => f === n), u = c + 1 < t.length ? c + 1 : 0;
21
- t[u].focus();
22
- }
23
- break;
24
- }
25
- case o.LEFT:
26
- case o.UP: {
27
- if (r()) {
28
- e.preventDefault();
29
- const n = document.activeElement, t = [...l(e.currentTarget)], c = t.findIndex((f) => f === n), u = c - 1 > -1 ? c - 1 : t.length - 1;
30
- t[u].focus();
31
- }
32
- break;
9
+ return m(i, { onKeyDown: (e) => {
10
+ switch (e.key) {
11
+ case o.RIGHT:
12
+ case o.DOWN: {
13
+ if (r()) {
14
+ e.preventDefault();
15
+ const n = document.activeElement, t = [...l(e.currentTarget)], c = t.findIndex((f) => f === n), u = c + 1 < t.length ? c + 1 : 0;
16
+ t[u].focus();
33
17
  }
34
- case o.HOME: {
35
- r() && (e.preventDefault(), l(e.currentTarget).item(0).focus());
36
- break;
18
+ break;
19
+ }
20
+ case o.LEFT:
21
+ case o.UP: {
22
+ if (r()) {
23
+ e.preventDefault();
24
+ const n = document.activeElement, t = [...l(e.currentTarget)], c = t.findIndex((f) => f === n), u = c - 1 > -1 ? c - 1 : t.length - 1;
25
+ t[u].focus();
37
26
  }
38
- case o.END: {
39
- if (r()) {
40
- e.preventDefault();
41
- const n = l(e.currentTarget);
42
- n.item(n.length - 1).focus();
43
- }
44
- break;
27
+ break;
28
+ }
29
+ case o.HOME: {
30
+ r() && (e.preventDefault(), l(e.currentTarget).item(0).focus());
31
+ break;
32
+ }
33
+ case o.END: {
34
+ if (r()) {
35
+ e.preventDefault();
36
+ const n = l(e.currentTarget);
37
+ n.item(n.length - 1).focus();
45
38
  }
39
+ break;
46
40
  }
47
- },
48
- ...d
49
- });
41
+ }
42
+ }, ...d });
50
43
  };
51
44
  export {
52
45
  v as KeyboardNavigable
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./KeyboardNavigable.cjs");exports.KeyboardNavigable=e.KeyboardNavigable;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./KeyboardNavigable.cjs");exports.KeyboardNavigable=e.KeyboardNavigable;
@@ -1,9 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react"),i=require("prop-types"),f=require("styled-components"),n=require("../Box/Box.cjs"),s=require("../Flex/Flex.cjs"),l=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=l(d),r=l(i),c=l(f),u=c.default(s.Flex)`
2
- & > * + * {
3
- margin-left: ${({theme:e})=>e.spaces[2]};
4
- }
5
-
6
- margin-left: ${({pullRight:e})=>e?"auto":void 0};
7
- `,p=c.default(u)`
8
- flex-shrink: 0;
9
- `,a=({startActions:e,endActions:o})=>e||o?t.default.createElement(n.Box,{paddingLeft:10,paddingRight:10},t.default.createElement(n.Box,{paddingBottom:4},t.default.createElement(s.Flex,{justifyContent:"space-between",alignItems:"flex-start"},e&&t.default.createElement(u,{wrap:"wrap"},e),o&&t.default.createElement(p,{pullRight:!0},o)))):null;a.defaultProps={endActions:void 0,startActions:void 0};a.propTypes={endActions:r.default.node,startActions:r.default.node};exports.ActionLayout=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../Flex/Flex.cjs"),i=({startActions:r,endActions:n})=>!r&&!n?null:e.jsxs(t.Flex,{justifyContent:"space-between",alignItems:"flex-start",paddingBottom:4,paddingLeft:10,paddingRight:10,children:[e.jsx(t.Flex,{gap:2,wrap:"wrap",children:r}),e.jsx(t.Flex,{gap:2,shrink:0,wrap:"wrap",children:n})]});exports.ActionLayout=i;
@@ -1,25 +1,6 @@
1
- import e from "react";
2
- import r from "prop-types";
3
- import a from "styled-components";
4
- import { Box as n } from "../Box/Box.js";
5
- import { Flex as i } from "../Flex/Flex.js";
6
- const l = a(i)`
7
- & > * + * {
8
- margin-left: ${({ theme: t }) => t.spaces[2]};
9
- }
10
-
11
- margin-left: ${({ pullRight: t }) => t ? "auto" : void 0};
12
- `, m = a(l)`
13
- flex-shrink: 0;
14
- `, p = ({ startActions: t, endActions: o }) => t || o ? /* @__PURE__ */ e.createElement(n, { paddingLeft: 10, paddingRight: 10 }, /* @__PURE__ */ e.createElement(n, { paddingBottom: 4 }, /* @__PURE__ */ e.createElement(i, { justifyContent: "space-between", alignItems: "flex-start" }, t && /* @__PURE__ */ e.createElement(l, { wrap: "wrap" }, t), o && /* @__PURE__ */ e.createElement(m, { pullRight: !0 }, o)))) : null;
15
- p.defaultProps = {
16
- endActions: void 0,
17
- startActions: void 0
18
- };
19
- p.propTypes = {
20
- endActions: r.node,
21
- startActions: r.node
22
- };
1
+ import { jsxs as p, jsx as n } from "react/jsx-runtime";
2
+ import { Flex as r } from "../Flex/Flex.js";
3
+ const o = ({ startActions: t, endActions: e }) => !t && !e ? null : p(r, { justifyContent: "space-between", alignItems: "flex-start", paddingBottom: 4, paddingLeft: 10, paddingRight: 10, children: [n(r, { gap: 2, wrap: "wrap", children: t }), n(r, { gap: 2, shrink: 0, wrap: "wrap", children: e })] });
23
4
  export {
24
- p as ActionLayout
5
+ o as ActionLayout
25
6
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),n=require("prop-types"),u=require("../Box/Box.cjs"),t=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},a=t(r),c=t(n),o=({children:e})=>a.default.createElement(u.Box,{paddingLeft:10,paddingRight:10},e);o.propTypes={children:c.default.node.isRequired};exports.ContentLayout=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../Box/Box.cjs"),o=({children:t})=>e.jsx(n.Box,{paddingLeft:10,paddingRight:10,children:t});exports.ContentLayout=o;
@@ -1,10 +1,6 @@
1
- import t from "react";
2
- import o from "prop-types";
1
+ import { jsx as o } from "react/jsx-runtime";
3
2
  import { Box as r } from "../Box/Box.js";
4
- const p = ({ children: e }) => /* @__PURE__ */ t.createElement(r, { paddingLeft: 10, paddingRight: 10 }, e);
5
- p.propTypes = {
6
- children: o.node.isRequired
7
- };
3
+ const d = ({ children: t }) => o(r, { paddingLeft: 10, paddingRight: 10, children: t });
8
4
  export {
9
- p as ContentLayout
5
+ d as ContentLayout
10
6
  };
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("prop-types"),s=require("styled-components"),t=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},d=t(r),a=t(s),o=a.default.div`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("styled-components"),a=t=>t&&t.__esModule?t:{default:t},d=a(e),i=d.default.div`
2
2
  display: grid;
3
3
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
4
- grid-gap: ${({theme:e})=>e.spaces[4]};
5
- `;o.propTypes={children:d.default.node.isRequired};exports.GridLayout=o;
4
+ grid-gap: ${({theme:t})=>t.spaces[4]};
5
+ `;exports.GridLayout=i;
@@ -1,13 +1,9 @@
1
- import p from "prop-types";
2
- import e from "styled-components";
3
- const i = e.div`
1
+ import i from "styled-components";
2
+ const a = i.div`
4
3
  display: grid;
5
4
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
6
- grid-gap: ${({ theme: r }) => r.spaces[4]};
5
+ grid-gap: ${({ theme: t }) => t.spaces[4]};
7
6
  `;
8
- i.propTypes = {
9
- children: p.node.isRequired
10
- };
11
7
  export {
12
- i as GridLayout
8
+ a as GridLayout
13
9
  };
@@ -1,3 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react"),E=require("prop-types"),v=require("styled-components"),d=require("../Box/Box.cjs"),i=require("../Flex/Flex.cjs"),B=require("../hooks/useElementOnScreen.cjs"),b=require("../hooks/useResizeObserver.cjs"),s=require("../Typography/Typography.cjs"),p=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},e=p(c),a=p(E),R=p(v),T=()=>{const t=c.useRef(null),[l,r]=c.useState(null),[n,o]=B.useElementOnScreen({root:null,rootMargin:"0px",threshold:0});return b.useResizeObserver(n,()=>{n.current&&r(n.current.getBoundingClientRect())}),c.useEffect(()=>{t.current&&r(t.current.getBoundingClientRect())},[t]),{containerRef:n,isVisible:o,baseHeaderLayoutRef:t,headerSize:l}},f=t=>{const{containerRef:l,isVisible:r,baseHeaderLayoutRef:n,headerSize:o}=T();return e.default.createElement(e.default.Fragment,null,e.default.createElement("div",{style:{height:o?.height},ref:l},r&&e.default.createElement(u,{ref:n,...t})),!r&&e.default.createElement(u,{...t,sticky:!0,width:o?.width}))};f.displayName="HeaderLayout";const L=R.default(d.Box)`
2
- width: ${t=>t.width}px;
3
- `,u=e.default.forwardRef(({navigationAction:t,primaryAction:l,secondaryAction:r,subtitle:n,title:o,sticky:m,width:h,...y},x)=>{const g=typeof n=="string";return m?e.default.createElement(L,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,position:"fixed",top:0,right:0,background:"neutral0",shadow:"tableShadow",width:h,zIndex:4,"data-strapi-header-sticky":!0},e.default.createElement(i.Flex,{justifyContent:"space-between"},e.default.createElement(i.Flex,null,t&&e.default.createElement(d.Box,{paddingRight:3},t),e.default.createElement(d.Box,null,e.default.createElement(s.Typography,{variant:"beta",as:"h1",...y},o),g?e.default.createElement(s.Typography,{variant:"pi",textColor:"neutral600"},n):n),r?e.default.createElement(d.Box,{paddingLeft:4},r):null),e.default.createElement(i.Flex,null,l?e.default.createElement(d.Box,{paddingLeft:2},l):void 0))):e.default.createElement(d.Box,{ref:x,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:t?6:8,background:"neutral100","data-strapi-header":!0},t?e.default.createElement(d.Box,{paddingBottom:2},t):null,e.default.createElement(i.Flex,{justifyContent:"space-between"},e.default.createElement(i.Flex,{minWidth:0},e.default.createElement(s.Typography,{as:"h1",variant:"alpha",...y},o),r?e.default.createElement(d.Box,{paddingLeft:4},r):null),l),g?e.default.createElement(s.Typography,{variant:"epsilon",textColor:"neutral600",as:"p"},n):n)});u.displayName="BaseHeaderLayout";u.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0,sticky:!1,width:void 0};u.propTypes={navigationAction:a.default.node,primaryAction:a.default.node,secondaryAction:a.default.node,sticky:a.default.bool,subtitle:a.default.oneOfType([a.default.string,a.default.node]),title:a.default.string.isRequired,width:a.default.number};f.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0};f.propTypes={navigationAction:a.default.node,primaryAction:a.default.node,secondaryAction:a.default.node,subtitle:a.default.oneOfType([a.default.string,a.default.node]),title:a.default.string.isRequired};exports.BaseHeaderLayout=u;exports.HeaderLayout=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),y=require("styled-components"),B=require("../hooks/useElementOnScreen.cjs"),R=require("../hooks/useResizeObserver.cjs"),d=require("../Box/Box.cjs"),a=require("../Flex/Flex.cjs"),o=require("../Typography/Typography.cjs"),p=t=>t&&t.__esModule?t:{default:t},L=p(u),S=p(y),g=t=>{const r=u.useRef(null),[s,n]=u.useState(null),[i,l]=B.useElementOnScreen({root:null,rootMargin:"0px",threshold:0});return R.useResizeObserver(i,()=>{i.current&&n(i.current.getBoundingClientRect())}),u.useEffect(()=>{r.current&&n(r.current.getBoundingClientRect())},[r]),e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{height:s?.height},ref:i,children:l&&e.jsx(c,{ref:r,...t})}),!l&&e.jsx(c,{...t,sticky:!0,width:s?.width})]})};g.displayName="HeaderLayout";const b=S.default(d.Box)`
2
+ width: ${({width:t})=>t?`${t/16}rem`:void 0};
3
+ z-index: ${({theme:t})=>t.zIndices[1]};
4
+ `,c=L.default.forwardRef(({navigationAction:t,primaryAction:r,secondaryAction:s,subtitle:n,title:i,sticky:l,width:f,...h},j)=>{const x=typeof n=="string";return l?e.jsx(b,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,position:"fixed",top:0,right:0,background:"neutral0",shadow:"tableShadow",width:f,"data-strapi-header-sticky":!0,children:e.jsxs(a.Flex,{justifyContent:"space-between",children:[e.jsxs(a.Flex,{children:[t&&e.jsx(d.Box,{paddingRight:3,children:t}),e.jsxs(d.Box,{children:[e.jsx(o.Typography,{variant:"beta",as:"h1",...h,children:i}),x?e.jsx(o.Typography,{variant:"pi",textColor:"neutral600",children:n}):n]}),s?e.jsx(d.Box,{paddingLeft:4,children:s}):null]}),e.jsx(a.Flex,{children:r?e.jsx(d.Box,{paddingLeft:2,children:r}):void 0})]})}):e.jsxs(d.Box,{ref:j,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:t?6:8,background:"neutral100","data-strapi-header":!0,children:[t?e.jsx(d.Box,{paddingBottom:2,children:t}):null,e.jsxs(a.Flex,{justifyContent:"space-between",children:[e.jsxs(a.Flex,{minWidth:0,children:[e.jsx(o.Typography,{as:"h1",variant:"alpha",...h,children:i}),s?e.jsx(d.Box,{paddingLeft:4,children:s}):null]}),r]}),x?e.jsx(o.Typography,{variant:"epsilon",textColor:"neutral600",as:"p",children:n}):n]})});exports.BaseHeaderLayout=c;exports.HeaderLayout=g;
@@ -1,103 +1,32 @@
1
- import e, { useRef as h, useState as E, useEffect as v } from "react";
2
- import t from "prop-types";
3
- import R from "styled-components";
4
- import { Box as i } from "../Box/Box.js";
5
- import { Flex as l } from "../Flex/Flex.js";
6
- import { useElementOnScreen as b } from "../hooks/useElementOnScreen.js";
7
- import { useResizeObserver as w } from "../hooks/useResizeObserver.js";
8
- import { Typography as c } from "../Typography/Typography.js";
9
- const L = () => {
10
- const n = h(null), [o, a] = E(null), [r, d] = b({
1
+ import { jsx as e, jsxs as l, Fragment as m } from "react/jsx-runtime";
2
+ import x, { useRef as R, useState as y, useEffect as L } from "react";
3
+ import w from "styled-components";
4
+ import { useElementOnScreen as B } from "../hooks/useElementOnScreen.js";
5
+ import { useResizeObserver as S } from "../hooks/useResizeObserver.js";
6
+ import { Box as n } from "../Box/Box.js";
7
+ import { Flex as o } from "../Flex/Flex.js";
8
+ import { Typography as u } from "../Typography/Typography.js";
9
+ const b = (r) => {
10
+ const t = R(null), [i, d] = y(null), [a, h] = B({
11
11
  root: null,
12
12
  rootMargin: "0px",
13
13
  threshold: 0
14
14
  });
15
- return w(r, () => {
16
- r.current && a(r.current.getBoundingClientRect());
17
- }), v(() => {
18
- n.current && a(n.current.getBoundingClientRect());
19
- }, [n]), {
20
- containerRef: r,
21
- isVisible: d,
22
- baseHeaderLayoutRef: n,
23
- headerSize: o
24
- };
25
- }, p = (n) => {
26
- const { containerRef: o, isVisible: a, baseHeaderLayoutRef: r, headerSize: d } = L();
27
- return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { style: { height: d?.height }, ref: o }, a && /* @__PURE__ */ e.createElement(s, { ref: r, ...n })), !a && /* @__PURE__ */ e.createElement(s, { ...n, sticky: !0, width: d?.width }));
28
- };
29
- p.displayName = "HeaderLayout";
30
- const x = R(i)`
31
- width: ${(n) => n.width}px;
32
- `, s = e.forwardRef(
33
- ({ navigationAction: n, primaryAction: o, secondaryAction: a, subtitle: r, title: d, sticky: f, width: g, ...u }, y) => {
34
- const m = typeof r == "string";
35
- return f ? /* @__PURE__ */ e.createElement(
36
- x,
37
- {
38
- paddingLeft: 6,
39
- paddingRight: 6,
40
- paddingTop: 3,
41
- paddingBottom: 3,
42
- position: "fixed",
43
- top: 0,
44
- right: 0,
45
- background: "neutral0",
46
- shadow: "tableShadow",
47
- width: g,
48
- zIndex: 4,
49
- "data-strapi-header-sticky": !0
50
- },
51
- /* @__PURE__ */ e.createElement(l, { justifyContent: "space-between" }, /* @__PURE__ */ e.createElement(l, null, n && /* @__PURE__ */ e.createElement(i, { paddingRight: 3 }, n), /* @__PURE__ */ e.createElement(i, null, /* @__PURE__ */ e.createElement(c, { variant: "beta", as: "h1", ...u }, d), m ? /* @__PURE__ */ e.createElement(c, { variant: "pi", textColor: "neutral600" }, r) : r), a ? /* @__PURE__ */ e.createElement(i, { paddingLeft: 4 }, a) : null), /* @__PURE__ */ e.createElement(l, null, o ? /* @__PURE__ */ e.createElement(i, { paddingLeft: 2 }, o) : void 0))
52
- ) : /* @__PURE__ */ e.createElement(
53
- i,
54
- {
55
- ref: y,
56
- paddingLeft: 10,
57
- paddingRight: 10,
58
- paddingBottom: 8,
59
- paddingTop: n ? 6 : 8,
60
- background: "neutral100",
61
- "data-strapi-header": !0
62
- },
63
- n ? /* @__PURE__ */ e.createElement(i, { paddingBottom: 2 }, n) : null,
64
- /* @__PURE__ */ e.createElement(l, { justifyContent: "space-between" }, /* @__PURE__ */ e.createElement(l, { minWidth: 0 }, /* @__PURE__ */ e.createElement(c, { as: "h1", variant: "alpha", ...u }, d), a ? /* @__PURE__ */ e.createElement(i, { paddingLeft: 4 }, a) : null), o),
65
- m ? /* @__PURE__ */ e.createElement(c, { variant: "epsilon", textColor: "neutral600", as: "p" }, r) : r
66
- );
67
- }
68
- );
69
- s.displayName = "BaseHeaderLayout";
70
- s.defaultProps = {
71
- navigationAction: void 0,
72
- primaryAction: void 0,
73
- secondaryAction: void 0,
74
- subtitle: void 0,
75
- sticky: !1,
76
- width: void 0
77
- };
78
- s.propTypes = {
79
- navigationAction: t.node,
80
- primaryAction: t.node,
81
- secondaryAction: t.node,
82
- sticky: t.bool,
83
- subtitle: t.oneOfType([t.string, t.node]),
84
- title: t.string.isRequired,
85
- width: t.number
86
- };
87
- p.defaultProps = {
88
- navigationAction: void 0,
89
- primaryAction: void 0,
90
- secondaryAction: void 0,
91
- subtitle: void 0
92
- };
93
- p.propTypes = {
94
- navigationAction: t.node,
95
- primaryAction: t.node,
96
- secondaryAction: t.node,
97
- subtitle: t.oneOfType([t.string, t.node]),
98
- title: t.string.isRequired
15
+ return S(a, () => {
16
+ a.current && d(a.current.getBoundingClientRect());
17
+ }), L(() => {
18
+ t.current && d(t.current.getBoundingClientRect());
19
+ }, [t]), l(m, { children: [e("div", { style: { height: i?.height }, ref: a, children: h && e(p, { ref: t, ...r }) }), !h && e(p, { ...r, sticky: !0, width: i?.width })] });
99
20
  };
21
+ b.displayName = "HeaderLayout";
22
+ const C = w(n)`
23
+ width: ${({ width: r }) => r ? `${r / 16}rem` : void 0};
24
+ z-index: ${({ theme: r }) => r.zIndices[1]};
25
+ `, p = x.forwardRef(({ navigationAction: r, primaryAction: t, secondaryAction: i, subtitle: d, title: a, sticky: h, width: c, ...s }, g) => {
26
+ const f = typeof d == "string";
27
+ return h ? e(C, { paddingLeft: 6, paddingRight: 6, paddingTop: 3, paddingBottom: 3, position: "fixed", top: 0, right: 0, background: "neutral0", shadow: "tableShadow", width: c, "data-strapi-header-sticky": !0, children: l(o, { justifyContent: "space-between", children: [l(o, { children: [r && e(n, { paddingRight: 3, children: r }), l(n, { children: [e(u, { variant: "beta", as: "h1", ...s, children: a }), f ? e(u, { variant: "pi", textColor: "neutral600", children: d }) : d] }), i ? e(n, { paddingLeft: 4, children: i }) : null] }), e(o, { children: t ? e(n, { paddingLeft: 2, children: t }) : void 0 })] }) }) : l(n, { ref: g, paddingLeft: 10, paddingRight: 10, paddingBottom: 8, paddingTop: r ? 6 : 8, background: "neutral100", "data-strapi-header": !0, children: [r ? e(n, { paddingBottom: 2, children: r }) : null, l(o, { justifyContent: "space-between", children: [l(o, { minWidth: 0, children: [e(u, { as: "h1", variant: "alpha", ...s, children: a }), i ? e(n, { paddingLeft: 4, children: i }) : null] }), t] }), f ? e(u, { variant: "epsilon", textColor: "neutral600", as: "p", children: d }) : d] });
28
+ });
100
29
  export {
101
- s as BaseHeaderLayout,
102
- p as HeaderLayout
30
+ p as BaseHeaderLayout,
31
+ b as HeaderLayout
103
32
  };
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react"),u=require("prop-types"),c=require("styled-components"),d=require("../Box/Box.cjs"),t=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=t(s),a=t(u),l=t(c),i=l.default(d.Box)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("styled-components"),o=require("../Box/Box.cjs"),l=t=>t&&t.__esModule?t:{default:t},r=l(d),s=r.default(o.Box)`
2
2
  display: grid;
3
- grid-template-columns: ${({hasSideNav:e})=>e?"auto 1fr":"1fr"};
4
- `,f=l.default(d.Box)`
3
+ grid-template-columns: ${({hasSideNav:t})=>t?"auto 1fr":"1fr"};
4
+ `,i=r.default(o.Box)`
5
5
  overflow-x: hidden;
6
- `,o=({sideNav:e,children:n})=>r.default.createElement(i,{hasSideNav:Boolean(e)},e,r.default.createElement(f,{paddingBottom:10},n));o.defaultProps={sideNav:void 0};o.propTypes={children:a.default.node.isRequired,sideNav:a.default.node};exports.Layout=o;
6
+ `,u=({sideNav:t,children:n})=>e.jsxs(s,{hasSideNav:!!t,children:[t,e.jsx(i,{paddingBottom:10,children:n})]});exports.Layout=u;
@@ -1,20 +1,12 @@
1
- import o from "react";
2
- import r from "prop-types";
3
- import t from "styled-components";
4
- import { Box as d } from "../Box/Box.js";
5
- const a = t(d)`
1
+ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
+ import r from "styled-components";
3
+ import { Box as t } from "../Box/Box.js";
4
+ const d = r(t)`
6
5
  display: grid;
7
- grid-template-columns: ${({ hasSideNav: e }) => e ? "auto 1fr" : "1fr"};
8
- `, m = t(d)`
6
+ grid-template-columns: ${({ hasSideNav: o }) => o ? "auto 1fr" : "1fr"};
7
+ `, m = r(t)`
9
8
  overflow-x: hidden;
10
- `, i = ({ sideNav: e, children: n }) => /* @__PURE__ */ o.createElement(a, { hasSideNav: Boolean(e) }, e, /* @__PURE__ */ o.createElement(m, { paddingBottom: 10 }, n));
11
- i.defaultProps = {
12
- sideNav: void 0
13
- };
14
- i.propTypes = {
15
- children: r.node.isRequired,
16
- sideNav: r.node
17
- };
9
+ `, f = ({ sideNav: o, children: e }) => i(d, { hasSideNav: !!o, children: [o, n(m, { paddingBottom: 10, children: e })] });
18
10
  export {
19
- i as Layout
11
+ f as Layout
20
12
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react"),c=require("prop-types"),r=require("../Box/Box.cjs"),i=require("../Grid/Grid.cjs"),o=require("../Grid/GridItem.cjs"),d=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=d(l),a=d(c),u=({startCol:e,endCol:s})=>t.default.createElement(i.Grid,{gap:4},t.default.createElement(o.GridItem,{col:9,s:12},t.default.createElement(r.Box,{hasRadius:!0,background:"neutral0",shadow:"tableShadow"},e)),t.default.createElement(o.GridItem,{col:3,s:12},t.default.createElement(r.Box,{hasRadius:!0,background:"neutral0",shadow:"tableShadow"},s)));u.propTypes={endCol:a.default.node.isRequired,startCol:a.default.node.isRequired};exports.TwoColsLayout=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../Grid/Grid.cjs"),r=require("../Grid/GridItem.cjs"),o=require("../Box/Box.cjs"),i=({startCol:s,endCol:t})=>e.jsxs(d.Grid,{gap:4,children:[e.jsx(r.GridItem,{col:9,s:12,children:e.jsx(o.Box,{hasRadius:!0,background:"neutral0",shadow:"tableShadow",children:s})}),e.jsx(r.GridItem,{col:3,s:12,children:e.jsx(o.Box,{hasRadius:!0,background:"neutral0",shadow:"tableShadow",children:t})})]});exports.TwoColsLayout=i;
@@ -1,13 +1,8 @@
1
- import e from "react";
2
- import r from "prop-types";
3
- import { Box as o } from "../Box/Box.js";
4
- import { Grid as m } from "../Grid/Grid.js";
5
- import { GridItem as t } from "../Grid/GridItem.js";
6
- const l = ({ startCol: a, endCol: d }) => /* @__PURE__ */ e.createElement(m, { gap: 4 }, /* @__PURE__ */ e.createElement(t, { col: 9, s: 12 }, /* @__PURE__ */ e.createElement(o, { hasRadius: !0, background: "neutral0", shadow: "tableShadow" }, a)), /* @__PURE__ */ e.createElement(t, { col: 3, s: 12 }, /* @__PURE__ */ e.createElement(o, { hasRadius: !0, background: "neutral0", shadow: "tableShadow" }, d)));
7
- l.propTypes = {
8
- endCol: r.node.isRequired,
9
- startCol: r.node.isRequired
10
- };
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
+ import { Grid as i } from "../Grid/Grid.js";
3
+ import { GridItem as o } from "../Grid/GridItem.js";
4
+ import { Box as a } from "../Box/Box.js";
5
+ const c = ({ startCol: d, endCol: t }) => e(i, { gap: 4, children: [r(o, { col: 9, s: 12, children: r(a, { hasRadius: !0, background: "neutral0", shadow: "tableShadow", children: d }) }), r(o, { col: 3, s: 12, children: r(a, { hasRadius: !0, background: "neutral0", shadow: "tableShadow", children: t }) })] });
11
6
  export {
12
- l as TwoColsLayout
7
+ c as TwoColsLayout
13
8
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./Layout.cjs"),e=require("./ActionLayout.cjs"),u=require("./ContentLayout.cjs"),o=require("./HeaderLayout.cjs"),a=require("./TwoColsLayout.cjs"),r=require("./GridLayout.cjs");exports.Layout=t.Layout;exports.ActionLayout=e.ActionLayout;exports.ContentLayout=u.ContentLayout;exports.BaseHeaderLayout=o.BaseHeaderLayout;exports.HeaderLayout=o.HeaderLayout;exports.TwoColsLayout=a.TwoColsLayout;exports.GridLayout=r.GridLayout;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Layout.cjs"),e=require("./ActionLayout.cjs"),a=require("./ContentLayout.cjs"),o=require("./HeaderLayout.cjs"),u=require("./TwoColsLayout.cjs"),r=require("./GridLayout.cjs");exports.Layout=t.Layout;exports.ActionLayout=e.ActionLayout;exports.ContentLayout=a.ContentLayout;exports.BaseHeaderLayout=o.BaseHeaderLayout;exports.HeaderLayout=o.HeaderLayout;exports.TwoColsLayout=u.TwoColsLayout;exports.GridLayout=r.GridLayout;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),y=require("react"),g=require("@strapi/icons"),j=require("react-router-dom"),m=require("styled-components"),x=require("../Box/Box.cjs"),h=require("../themes/utils.cjs"),c=require("../Typography/Typography.cjs"),_=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function b(e){if(e&&e.__esModule)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const v=b(y),l=_(m),q=l.default.a`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),g=require("react"),y=require("@strapi/icons"),m=require("react-router-dom"),x=require("styled-components"),j=require("../themes/utils.cjs"),c=require("../Typography/Typography.cjs"),_=require("../Box/Box.cjs"),h=e=>e&&e.__esModule?e:{default:e};function b(e){if(e&&e.__esModule)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const q=b(g),l=h(x),v=l.default.a`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  text-decoration: none;
@@ -27,7 +27,7 @@
27
27
  color: ${({theme:e})=>e.colors.primary700};
28
28
  }
29
29
 
30
- ${h.buttonFocusStyle};
31
- `,s=l.default(x.Box)`
30
+ ${j.buttonFocusStyle};
31
+ `,i=l.default(_.Box)`
32
32
  display: flex;
33
- `,L=v.forwardRef(({children:e,href:r,to:t,disabled:n=!1,startIcon:i,endIcon:a,...u},d)=>{const p=r?"_blank":void 0,f=r?"noreferrer noopener":void 0;return o.jsxs(q,{as:t&&!n?j.NavLink:"a",target:p,rel:f,to:n?void 0:t,href:n?"#":r,disabled:n,ref:d,...u,children:[i&&o.jsx(s,{as:"span","aria-hidden":!0,paddingRight:2,children:i}),o.jsx(c.Typography,{children:e}),a&&!r&&o.jsx(s,{as:"span","aria-hidden":!0,paddingLeft:2,children:a}),r&&o.jsx(s,{as:"span","aria-hidden":!0,paddingLeft:2,children:o.jsx(g.ExternalLink,{})})]})});exports.Link=L;
33
+ `,k=q.forwardRef(({children:e,href:r,to:t,disabled:n=!1,startIcon:a,endIcon:s,...u},d)=>{const p=r?"_blank":void 0,f=r?"noreferrer noopener":void 0;return o.jsxs(v,{as:t&&!n?m.NavLink:"a",target:p,rel:f,to:n?void 0:t,href:n?"#":r,disabled:n,ref:d,...u,children:[a&&o.jsx(i,{as:"span","aria-hidden":!0,paddingRight:2,children:a}),o.jsx(c.Typography,{children:e}),s&&!r&&o.jsx(i,{as:"span","aria-hidden":!0,paddingLeft:2,children:s}),r&&o.jsx(i,{as:"span","aria-hidden":!0,paddingLeft:2,children:o.jsx(y.ExternalLink,{})})]})});exports.Link=k;
package/dist/Link/Link.js CHANGED
@@ -3,20 +3,15 @@ import * as f from "react";
3
3
  import { ExternalLink as u } from "@strapi/icons";
4
4
  import { NavLink as g } from "react-router-dom";
5
5
  import s from "styled-components";
6
- import { Box as y } from "../Box/Box.js";
7
- import { buttonFocusStyle as h } from "../themes/utils.js";
6
+ import { buttonFocusStyle as y } from "../themes/utils.js";
8
7
  import { Typography as p } from "../Typography/Typography.js";
8
+ import { Box as h } from "../Box/Box.js";
9
9
  const x = s.a`
10
10
  display: inline-flex;
11
11
  align-items: center;
12
12
  text-decoration: none;
13
- pointer-events: ${({
14
- disabled: r
15
- }) => r ? "none" : void 0};
16
- color: ${({
17
- disabled: r,
18
- theme: o
19
- }) => r ? o.colors.neutral600 : o.colors.primary600};
13
+ pointer-events: ${({ disabled: r }) => r ? "none" : void 0};
14
+ color: ${({ disabled: r, theme: o }) => r ? o.colors.neutral600 : o.colors.primary600};
20
15
 
21
16
  svg path {
22
17
  transition: fill 150ms ease-out;
@@ -33,56 +28,17 @@ const x = s.a`
33
28
  }
34
29
 
35
30
  &:hover {
36
- color: ${({
37
- theme: r
38
- }) => r.colors.primary500};
31
+ color: ${({ theme: r }) => r.colors.primary500};
39
32
  }
40
33
 
41
34
  &:active {
42
- color: ${({
43
- theme: r
44
- }) => r.colors.primary700};
35
+ color: ${({ theme: r }) => r.colors.primary700};
45
36
  }
46
37
 
47
- ${h};
48
- `, t = s(y)`
38
+ ${y};
39
+ `, t = s(h)`
49
40
  display: flex;
50
- `, z = f.forwardRef(({
51
- children: r,
52
- href: o,
53
- to: i,
54
- disabled: n = !1,
55
- startIcon: a,
56
- endIcon: l,
57
- ...c
58
- }, d) => m(x, {
59
- as: i && !n ? g : "a",
60
- target: o ? "_blank" : void 0,
61
- rel: o ? "noreferrer noopener" : void 0,
62
- to: n ? void 0 : i,
63
- href: n ? "#" : o,
64
- disabled: n,
65
- ref: d,
66
- ...c,
67
- children: [a && e(t, {
68
- as: "span",
69
- "aria-hidden": !0,
70
- paddingRight: 2,
71
- children: a
72
- }), e(p, {
73
- children: r
74
- }), l && !o && e(t, {
75
- as: "span",
76
- "aria-hidden": !0,
77
- paddingLeft: 2,
78
- children: l
79
- }), o && e(t, {
80
- as: "span",
81
- "aria-hidden": !0,
82
- paddingLeft: 2,
83
- children: e(u, {})
84
- })]
85
- }));
41
+ `, z = f.forwardRef(({ children: r, href: o, to: i, disabled: n = !1, startIcon: a, endIcon: l, ...c }, d) => m(x, { as: i && !n ? g : "a", target: o ? "_blank" : void 0, rel: o ? "noreferrer noopener" : void 0, to: n ? void 0 : i, href: n ? "#" : o, disabled: n, ref: d, ...c, children: [a && e(t, { as: "span", "aria-hidden": !0, paddingRight: 2, children: a }), e(p, { children: r }), l && !o && e(t, { as: "span", "aria-hidden": !0, paddingLeft: 2, children: l }), o && e(t, { as: "span", "aria-hidden": !0, paddingLeft: 2, children: e(u, {}) })] }));
86
42
  export {
87
43
  z as Link
88
44
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Link.cjs");exports.Link=e.Link;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Link.cjs");exports.Link=e.Link;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),j=require("react"),h=require("react-router-dom"),m=require("styled-components"),x=require("../BaseButton/BaseButton.cjs"),o=require("../Button/utils.cjs"),l=require("../Flex/Flex.cjs"),v=require("../Typography/Typography.cjs"),B=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function S(e){if(e&&e.__esModule)return e;const n=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(n,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const _=S(j),q=B(m),k=q.default(x.BaseButtonWrapper)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),S=require("react"),h=require("react-router-dom"),v=require("styled-components"),o=require("../Button/utils.cjs"),_=require("../BaseButton/BaseButton.cjs"),c=require("../Flex/Flex.cjs"),j=require("../Typography/Typography.cjs"),m=e=>e&&e.__esModule?e:{default:e};function x(e){if(e&&e.__esModule)return e;const n=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(n,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const q=x(S),k=m(v),B=k.default(_.BaseButtonWrapper)`
2
2
  &[aria-disabled='true'] {
3
3
  ${o.getDisabledStyle}
4
4
  &:active {
@@ -12,4 +12,4 @@
12
12
  ${o.getActiveStyle}
13
13
  }
14
14
  ${o.getVariantStyle}
15
- `,R=_.forwardRef(({variant:e="default",startIcon:n,endIcon:r,disabled:t=!1,children:p,size:i="S",href:u,to:s,...g},f)=>{const y=u?"_blank":void 0,b=u?"noreferrer noopener":void 0,c=i==="S"?2:"10px",d=4;return a.jsxs(k,{ref:f,"aria-disabled":t,size:i,variant:e,target:y,rel:b,to:t?void 0:s,href:t?"#":u,background:"buttonPrimary600",borderColor:"buttonPrimary600",hasRadius:!0,gap:2,inline:!0,paddingBottom:c,paddingLeft:d,paddingRight:d,paddingTop:c,pointerEvents:t?"none":void 0,...g,as:s&&!t?h.NavLink:"a",children:[n&&a.jsx(l.Flex,{"aria-hidden":!0,children:n}),a.jsx(v.Typography,{variant:i==="S"?"pi":void 0,fontWeight:"bold",textColor:"buttonNeutral0",children:p}),r&&a.jsx(l.Flex,{"aria-hidden":!0,children:r})]})});exports.LinkButton=R;
15
+ `,R=q.forwardRef(({variant:e="default",startIcon:n,endIcon:r,disabled:t=!1,children:p,size:i="S",href:u,to:d,...f},g)=>{const y=u?"_blank":void 0,b=u?"noreferrer noopener":void 0,l=i==="S"?2:"10px",s=4;return a.jsxs(B,{ref:g,"aria-disabled":t,size:i,variant:e,target:y,rel:b,to:t?void 0:d,href:t?"#":u,background:"buttonPrimary600",borderColor:"buttonPrimary600",hasRadius:!0,gap:2,inline:!0,paddingBottom:l,paddingLeft:s,paddingRight:s,paddingTop:l,pointerEvents:t?"none":void 0,...f,as:d&&!t?h.NavLink:"a",children:[n&&a.jsx(c.Flex,{"aria-hidden":!0,children:n}),a.jsx(j.Typography,{variant:i==="S"?"pi":void 0,fontWeight:"bold",textColor:"buttonNeutral0",children:p}),r&&a.jsx(c.Flex,{"aria-hidden":!0,children:r})]})});exports.LinkButton=R;