@strapi/design-system 1.6.3 → 1.6.5

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 (317) hide show
  1. package/dist/Accordion/Accordion.cjs +5 -5
  2. package/dist/Accordion/Accordion.js +45 -44
  3. package/dist/Accordion/AccordionContent.cjs +1 -1
  4. package/dist/Accordion/AccordionContent.js +4 -4
  5. package/dist/Accordion/AccordionGroup.cjs +4 -4
  6. package/dist/Accordion/AccordionGroup.js +18 -18
  7. package/dist/Accordion/AccordionToggle.cjs +6 -6
  8. package/dist/Accordion/AccordionToggle.js +50 -53
  9. package/dist/Alert/Alert.cjs +1 -1
  10. package/dist/Alert/Alert.js +8 -8
  11. package/dist/Avatar/Avatar.cjs +5 -5
  12. package/dist/Avatar/Avatar.js +11 -11
  13. package/dist/Avatar/AvatarGroup.cjs +2 -2
  14. package/dist/Avatar/AvatarGroup.js +4 -4
  15. package/dist/BaseButton/BaseButton.cjs +5 -11
  16. package/dist/BaseButton/BaseButton.js +31 -38
  17. package/dist/BaseCheckbox/BaseCheckbox.cjs +3 -3
  18. package/dist/BaseCheckbox/BaseCheckbox.js +22 -22
  19. package/dist/BaseRadio/BaseRadio.cjs +2 -2
  20. package/dist/BaseRadio/BaseRadio.js +4 -4
  21. package/dist/BaseRadio/RadioGroup.cjs +1 -1
  22. package/dist/BaseRadio/RadioGroup.js +28 -26
  23. package/dist/Box/Box.cjs +3 -3
  24. package/dist/Box/Box.js +27 -27
  25. package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
  26. package/dist/Breadcrumbs/Breadcrumbs.js +12 -12
  27. package/dist/Button/Button.cjs +10 -27
  28. package/dist/Button/Button.js +65 -85
  29. package/dist/Button/utils.cjs +22 -22
  30. package/dist/Button/utils.js +2 -2
  31. package/dist/Card/Card.cjs +1 -1
  32. package/dist/Card/Card.js +15 -14
  33. package/dist/Card/CardAsset.js +4 -4
  34. package/dist/Card/CardBody.cjs +1 -1
  35. package/dist/Card/CardBody.js +4 -4
  36. package/dist/Card/CardCheckbox.cjs +1 -1
  37. package/dist/Card/CardCheckbox.js +6 -6
  38. package/dist/Card/CardTitle.cjs +1 -1
  39. package/dist/Card/CardTitle.js +1 -1
  40. package/dist/CarouselInput/Carousel.cjs +2 -2
  41. package/dist/CarouselInput/Carousel.js +19 -64
  42. package/dist/CarouselInput/CarouselActions.cjs +1 -1
  43. package/dist/CarouselInput/CarouselActions.js +16 -12
  44. package/dist/CarouselInput/CarouselImage.js +1 -10
  45. package/dist/CarouselInput/CarouselInput.cjs +1 -1
  46. package/dist/CarouselInput/CarouselInput.js +23 -28
  47. package/dist/CarouselInput/CarouselSlide.js +13 -9
  48. package/dist/Checkbox/Checkbox.cjs +2 -2
  49. package/dist/Checkbox/Checkbox.js +15 -34
  50. package/dist/Combobox/Combobox.cjs +1 -1
  51. package/dist/Combobox/Combobox.js +144 -159
  52. package/dist/Combobox/ComboboxOption.cjs +1 -1
  53. package/dist/Combobox/ComboboxOption.js +18 -17
  54. package/dist/DatePicker/DatePicker.cjs +1 -1
  55. package/dist/DatePicker/DatePicker.js +47 -46
  56. package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
  57. package/dist/DatePicker/DatePickerCalendar.js +30 -62
  58. package/dist/DatePicker/DatePickerTd.cjs +3 -3
  59. package/dist/DatePicker/DatePickerTd.js +8 -20
  60. package/dist/DatePicker/DatePickerTh.cjs +3 -3
  61. package/dist/DatePicker/DatePickerTh.js +10 -20
  62. package/dist/DatePicker/components.cjs +3 -3
  63. package/dist/DatePicker/components.js +6 -6
  64. package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
  65. package/dist/DateTimePicker/DateTimePicker.js +70 -67
  66. package/dist/DateTimePicker/DateTimePickerProps.js +1 -3
  67. package/dist/Dialog/Dialog.cjs +5 -5
  68. package/dist/Dialog/Dialog.js +26 -37
  69. package/dist/Dialog/DialogBody.cjs +1 -1
  70. package/dist/Dialog/DialogBody.js +2 -11
  71. package/dist/Dialog/DialogFooter.cjs +3 -3
  72. package/dist/Dialog/DialogFooter.js +3 -8
  73. package/dist/DismissibleLayer/DismissibleLayer.js +1 -4
  74. package/dist/Divider/Divider.js +1 -5
  75. package/dist/EmptyStateLayout/EmptyStateLayout.cjs +1 -1
  76. package/dist/EmptyStateLayout/EmptyStateLayout.js +2 -16
  77. package/dist/EmptyStateLayout/story-assets/Illo.js +60 -45
  78. package/dist/Field/Field.cjs +1 -1
  79. package/dist/Field/Field.js +31 -28
  80. package/dist/Field/FieldAction.cjs +2 -8
  81. package/dist/Field/FieldAction.js +26 -19
  82. package/dist/Field/FieldContext.cjs +1 -1
  83. package/dist/Field/FieldContext.js +2 -2
  84. package/dist/Field/FieldError.cjs +1 -1
  85. package/dist/Field/FieldError.js +11 -7
  86. package/dist/Field/FieldHint.cjs +1 -1
  87. package/dist/Field/FieldHint.js +15 -10
  88. package/dist/Field/FieldInput.cjs +14 -16
  89. package/dist/Field/FieldInput.js +105 -81
  90. package/dist/Field/FieldLabel.cjs +3 -3
  91. package/dist/Field/FieldLabel.js +43 -38
  92. package/dist/FocusTrap/FocusTrap.cjs +1 -1
  93. package/dist/FocusTrap/FocusTrap.js +33 -41
  94. package/dist/Grid/Grid.cjs +3 -3
  95. package/dist/Grid/Grid.js +12 -15
  96. package/dist/Grid/GridItem.cjs +2 -2
  97. package/dist/Grid/GridItem.js +5 -13
  98. package/dist/IconButton/IconButton.cjs +7 -12
  99. package/dist/IconButton/IconButton.js +88 -84
  100. package/dist/JSONInput/JSONInput.cjs +1 -1
  101. package/dist/JSONInput/JSONInput.js +88 -79
  102. package/dist/JSONInput/JSONInputContainer.cjs +10 -10
  103. package/dist/JSONInput/JSONInputContainer.js +22 -15
  104. package/dist/Layout/ActionLayout.js +1 -13
  105. package/dist/Layout/ContentLayout.js +1 -4
  106. package/dist/Layout/HeaderLayout.cjs +2 -2
  107. package/dist/Layout/HeaderLayout.js +37 -66
  108. package/dist/Layout/Layout.js +1 -5
  109. package/dist/Layout/TwoColsLayout.js +1 -17
  110. package/dist/Link/Link.cjs +5 -5
  111. package/dist/Link/Link.js +55 -57
  112. package/dist/LinkButton/LinkButton.cjs +7 -24
  113. package/dist/LinkButton/LinkButton.js +60 -87
  114. package/dist/LiveRegions/LiveRegions.cjs +1 -1
  115. package/dist/LiveRegions/LiveRegions.js +1 -1
  116. package/dist/Loader/Loader.cjs +4 -4
  117. package/dist/Loader/Loader.js +26 -24
  118. package/dist/Main/Main.js +1 -6
  119. package/dist/Main/SkipToContent.cjs +2 -2
  120. package/dist/Main/SkipToContent.js +17 -13
  121. package/dist/MainNav/MainNav.cjs +2 -2
  122. package/dist/MainNav/MainNav.js +21 -20
  123. package/dist/MainNav/NavBrand.cjs +2 -2
  124. package/dist/MainNav/NavBrand.js +4 -38
  125. package/dist/MainNav/NavCondense.cjs +2 -2
  126. package/dist/MainNav/NavCondense.js +10 -18
  127. package/dist/MainNav/NavFooter.js +1 -3
  128. package/dist/MainNav/NavLink.cjs +4 -4
  129. package/dist/MainNav/NavLink.js +8 -34
  130. package/dist/MainNav/NavSection.cjs +1 -1
  131. package/dist/MainNav/NavSection.js +31 -44
  132. package/dist/MainNav/NavSections.cjs +2 -2
  133. package/dist/MainNav/NavSections.js +20 -21
  134. package/dist/MainNav/NavUser.cjs +2 -2
  135. package/dist/MainNav/NavUser.js +6 -27
  136. package/dist/ModalLayout/ModalBody.js +1 -4
  137. package/dist/ModalLayout/ModalFooter.cjs +1 -1
  138. package/dist/ModalLayout/ModalFooter.js +2 -10
  139. package/dist/ModalLayout/ModalHeader.cjs +2 -2
  140. package/dist/ModalLayout/ModalHeader.js +8 -20
  141. package/dist/ModalLayout/ModalLayout.cjs +3 -3
  142. package/dist/ModalLayout/ModalLayout.js +23 -31
  143. package/dist/NumberInput/NumberInput.cjs +2 -2
  144. package/dist/NumberInput/NumberInput.js +75 -80
  145. package/dist/Pagination/Pagination.cjs +2 -2
  146. package/dist/Pagination/Pagination.js +11 -16
  147. package/dist/Pagination/components.cjs +3 -3
  148. package/dist/Pagination/components.js +31 -38
  149. package/dist/Popover/Popover.cjs +1 -1
  150. package/dist/Popover/Popover.js +5 -5
  151. package/dist/Portal/Portal.cjs +1 -1
  152. package/dist/Portal/Portal.js +10 -12
  153. package/dist/ProgressBar/ProgressBar.js +17 -14
  154. package/dist/Radio/Radio.cjs +2 -2
  155. package/dist/Radio/Radio.js +4 -11
  156. package/dist/RawTable/RawCell.cjs +1 -1
  157. package/dist/RawTable/RawCell.js +57 -72
  158. package/dist/RawTable/RawTable.cjs +1 -1
  159. package/dist/RawTable/RawTable.js +45 -42
  160. package/dist/RawTable/RawTbody.cjs +1 -1
  161. package/dist/RawTable/RawTbody.js +14 -13
  162. package/dist/RawTable/RawThead.cjs +1 -1
  163. package/dist/RawTable/RawThead.js +13 -10
  164. package/dist/RawTable/RawTr.cjs +1 -1
  165. package/dist/RawTable/RawTr.js +19 -15
  166. package/dist/Searchbar/SearchForm.js +1 -4
  167. package/dist/Searchbar/Searchbar.cjs +3 -3
  168. package/dist/Searchbar/Searchbar.js +25 -28
  169. package/dist/Select/MultiSelectNested.js +2 -14
  170. package/dist/Select/OptGroup.cjs +1 -1
  171. package/dist/Select/OptGroup.js +14 -10
  172. package/dist/Select/Option.cjs +3 -3
  173. package/dist/Select/Option.js +31 -33
  174. package/dist/Select/Select.cjs +2 -2
  175. package/dist/Select/Select.js +98 -119
  176. package/dist/Select/SelectButton.cjs +1 -1
  177. package/dist/Select/SelectButton.js +14 -11
  178. package/dist/Select/SelectList.cjs +1 -1
  179. package/dist/Select/SelectList.js +24 -18
  180. package/dist/Select/SelectTags.cjs +3 -3
  181. package/dist/Select/SelectTags.js +17 -15
  182. package/dist/SimpleMenu/SimpleMenu.cjs +3 -3
  183. package/dist/SimpleMenu/SimpleMenu.js +43 -67
  184. package/dist/Status/Status.js +15 -13
  185. package/dist/SubNav/SubNav.cjs +2 -2
  186. package/dist/SubNav/SubNav.js +5 -9
  187. package/dist/SubNav/SubNavHeader.cjs +2 -2
  188. package/dist/SubNav/SubNavHeader.js +31 -53
  189. package/dist/SubNav/SubNavLink.cjs +3 -3
  190. package/dist/SubNav/SubNavLink.js +18 -22
  191. package/dist/SubNav/SubNavLinkSection.cjs +3 -3
  192. package/dist/SubNav/SubNavLinkSection.js +5 -30
  193. package/dist/SubNav/SubNavSection.cjs +2 -2
  194. package/dist/SubNav/SubNavSection.js +27 -34
  195. package/dist/SubNav/SubNavSectionLabel.cjs +2 -2
  196. package/dist/SubNav/SubNavSectionLabel.js +15 -24
  197. package/dist/SubNav/SubNavSections.cjs +1 -1
  198. package/dist/SubNav/SubNavSections.js +17 -16
  199. package/dist/Switch/Switch.cjs +2 -2
  200. package/dist/Switch/Switch.js +16 -17
  201. package/dist/Table/Cell.cjs +1 -1
  202. package/dist/Table/Cell.js +3 -8
  203. package/dist/Table/TFooter.cjs +2 -2
  204. package/dist/Table/TFooter.js +3 -17
  205. package/dist/Table/Table.cjs +1 -1
  206. package/dist/Table/Table.js +2 -18
  207. package/dist/Table/Tbody.js +1 -3
  208. package/dist/Table/Thead.js +1 -3
  209. package/dist/Table/Tr.js +1 -3
  210. package/dist/Tabs/TabGroup.cjs +1 -1
  211. package/dist/Tabs/TabGroup.js +30 -27
  212. package/dist/Tabs/TabPanels.js +2 -10
  213. package/dist/Tabs/Tabs.cjs +1 -1
  214. package/dist/Tabs/Tabs.js +43 -51
  215. package/dist/Tag/Tag.cjs +8 -8
  216. package/dist/Tag/Tag.js +52 -52
  217. package/dist/TextButton/TextButton.cjs +6 -6
  218. package/dist/TextButton/TextButton.js +15 -15
  219. package/dist/TextInput/TextInput.cjs +1 -1
  220. package/dist/TextInput/TextInput.js +13 -31
  221. package/dist/Textarea/Textarea.cjs +2 -2
  222. package/dist/Textarea/Textarea.js +12 -28
  223. package/dist/Textarea/TextareaInput.cjs +4 -4
  224. package/dist/Textarea/TextareaInput.js +22 -21
  225. package/dist/TimePicker/TimePicker.cjs +2 -2
  226. package/dist/TimePicker/TimePicker.js +26 -25
  227. package/dist/ToggleCheckbox/ToggleCheckbox.cjs +5 -5
  228. package/dist/ToggleCheckbox/ToggleCheckbox.js +86 -60
  229. package/dist/ToggleInput/ToggleInput.cjs +3 -3
  230. package/dist/ToggleInput/ToggleInput.js +28 -47
  231. package/dist/Tooltip/Tooltip.cjs +2 -2
  232. package/dist/Tooltip/Tooltip.js +62 -53
  233. package/dist/Tooltip/hooks/useTooltipHandlers.cjs +1 -1
  234. package/dist/Tooltip/hooks/useTooltipHandlers.js +7 -7
  235. package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -1
  236. package/dist/Tooltip/hooks/useTooltipLayout.js +8 -5
  237. package/dist/Typography/Typography.cjs +3 -2
  238. package/dist/Typography/Typography.js +17 -14
  239. package/dist/helpers/deprecations.cjs +1 -1
  240. package/dist/helpers/deprecations.js +7 -7
  241. package/dist/helpers/objects.cjs +1 -1
  242. package/dist/helpers/objects.js +1 -1
  243. package/dist/helpers/useElementOnScreen.cjs +1 -1
  244. package/dist/helpers/useElementOnScreen.js +4 -13
  245. package/dist/helpers/useId.cjs +1 -1
  246. package/dist/helpers/useId.js +4 -11
  247. package/dist/helpers/useIntersection.cjs +1 -1
  248. package/dist/helpers/useIntersection.js +4 -21
  249. package/dist/helpers/useLockScroll.cjs +1 -1
  250. package/dist/helpers/useLockScroll.js +4 -7
  251. package/dist/helpers/usePrevious.cjs +1 -1
  252. package/dist/helpers/usePrevious.js +4 -8
  253. package/dist/helpers/useResizeObserver.cjs +1 -1
  254. package/dist/helpers/useResizeObserver.js +4 -14
  255. package/dist/hooks/useElementOnScreen.cjs +1 -0
  256. package/dist/hooks/useElementOnScreen.js +15 -0
  257. package/dist/hooks/useId.cjs +1 -0
  258. package/dist/hooks/useId.js +13 -0
  259. package/dist/hooks/useIntersection.cjs +1 -1
  260. package/dist/hooks/useIntersection.js +3 -3
  261. package/dist/hooks/useLockScroll.cjs +1 -0
  262. package/dist/hooks/useLockScroll.js +9 -0
  263. package/dist/hooks/usePrevious.cjs +1 -0
  264. package/dist/hooks/usePrevious.js +10 -0
  265. package/dist/hooks/useResizeObserver.cjs +1 -0
  266. package/dist/hooks/useResizeObserver.js +16 -0
  267. package/dist/themes/extendTheme.cjs +1 -1
  268. package/dist/themes/extendTheme.js +4 -4
  269. package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
  270. package/dist/v2/Breadcrumbs/Breadcrumbs.js +4 -13
  271. package/dist/v2/Breadcrumbs/Crumb.js +11 -12
  272. package/dist/v2/Breadcrumbs/CrumbLink.js +1 -3
  273. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
  274. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +5 -11
  275. package/dist/v2/Breadcrumbs/Divider.js +1 -8
  276. package/dist/v2/Link/Link.cjs +2 -2
  277. package/dist/v2/Link/Link.js +5 -24
  278. package/dist/v2/LinkButton/LinkButton.cjs +11 -24
  279. package/dist/v2/LinkButton/LinkButton.js +62 -84
  280. package/dist/v2/MainNav/MainNav.cjs +2 -2
  281. package/dist/v2/MainNav/MainNav.js +21 -20
  282. package/dist/v2/MainNav/NavBrand.cjs +2 -2
  283. package/dist/v2/MainNav/NavBrand.js +4 -38
  284. package/dist/v2/MainNav/NavCondense.cjs +2 -2
  285. package/dist/v2/MainNav/NavCondense.js +10 -18
  286. package/dist/v2/MainNav/NavFooter.js +1 -3
  287. package/dist/v2/MainNav/NavLink.cjs +4 -4
  288. package/dist/v2/MainNav/NavLink.js +10 -39
  289. package/dist/v2/MainNav/NavSection.cjs +1 -1
  290. package/dist/v2/MainNav/NavSection.js +31 -44
  291. package/dist/v2/MainNav/NavSections.cjs +2 -2
  292. package/dist/v2/MainNav/NavSections.js +20 -21
  293. package/dist/v2/MainNav/NavUser.cjs +2 -2
  294. package/dist/v2/MainNav/NavUser.js +6 -27
  295. package/dist/v2/Pagination/Pagination.cjs +2 -2
  296. package/dist/v2/Pagination/Pagination.js +11 -16
  297. package/dist/v2/Pagination/components.cjs +2 -2
  298. package/dist/v2/Pagination/components.js +11 -39
  299. package/dist/v2/SimpleMenu/SimpleMenu.cjs +4 -4
  300. package/dist/v2/SimpleMenu/SimpleMenu.js +42 -65
  301. package/dist/v2/SubNav/SubNav.cjs +2 -2
  302. package/dist/v2/SubNav/SubNav.js +5 -9
  303. package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
  304. package/dist/v2/SubNav/SubNavHeader.js +31 -53
  305. package/dist/v2/SubNav/SubNavLink.cjs +2 -2
  306. package/dist/v2/SubNav/SubNavLink.js +18 -22
  307. package/dist/v2/SubNav/SubNavLinkSection.cjs +3 -3
  308. package/dist/v2/SubNav/SubNavLinkSection.js +5 -30
  309. package/dist/v2/SubNav/SubNavSection.cjs +2 -2
  310. package/dist/v2/SubNav/SubNavSection.js +29 -36
  311. package/dist/v2/SubNav/SubNavSectionLabel.cjs +2 -2
  312. package/dist/v2/SubNav/SubNavSectionLabel.js +15 -24
  313. package/dist/v2/SubNav/SubNavSections.cjs +1 -1
  314. package/dist/v2/SubNav/SubNavSections.js +17 -16
  315. package/package.json +8 -4
  316. package/dist/Select/SingleSelect.cjs +0 -82
  317. package/dist/Select/SingleSelect.js +0 -285
@@ -1,60 +1,69 @@
1
- import e from "react";
2
- import o from "prop-types";
3
- import v from "styled-components";
4
- import { Box as x } from "../Box/Box.js";
5
- import { Typography as E } from "../Typography/Typography.js";
6
- import { Portal as T } from "../Portal/Portal.js";
7
- import { useTooltipHandlers as h } from "./hooks/useTooltipHandlers.js";
8
- import { useTooltipLayout as R } from "./hooks/useTooltipLayout.js";
9
- import { useId as p } from "../helpers/useId.js";
10
- import { VisuallyHidden as I } from "../VisuallyHidden/VisuallyHidden.js";
11
- const H = v(x)`
1
+ import { jsxs as l, Fragment as x, jsx as o } from "react/jsx-runtime";
2
+ import * as y from "react";
3
+ import g from "styled-components";
4
+ import { useTooltipHandlers as T } from "./hooks/useTooltipHandlers.js";
5
+ import { useTooltipLayout as v } from "./hooks/useTooltipLayout.js";
6
+ import { Box as I } from "../Box/Box.js";
7
+ import { useId as d } from "../hooks/useId.js";
8
+ import { Portal as R } from "../Portal/Portal.js";
9
+ import { Typography as H } from "../Typography/Typography.js";
10
+ import { VisuallyHidden as W } from "../VisuallyHidden/VisuallyHidden.js";
11
+ const j = g(I)`
12
12
  /* z-index exist because of its position inside Modals */
13
13
  z-index: 4;
14
- display: ${({ visible: t }) => t ? "revert" : "none"};
15
- `, a = ({ children: t, label: n, description: r, delay: d, position: s, id: m, ...c }) => {
16
- const i = p(m), f = p(), { visible: l, ...u } = h(d), { tooltipWrapperRef: b, toggleSourceRef: y } = R(l, s), g = e.cloneElement(t, {
14
+ display: ${({
15
+ visible: e
16
+ }) => e ? "revert" : "none"};
17
+ `, S = ({
18
+ children: e,
19
+ label: n,
20
+ description: r,
21
+ delay: s = 500,
22
+ position: p = "top",
23
+ id: a,
24
+ ...m
25
+ }) => {
26
+ const t = d(a), c = d(), {
27
+ visible: i,
28
+ ...f
29
+ } = T(s), {
30
+ tooltipWrapperRef: u,
31
+ toggleSourceRef: b
32
+ } = v(i, p), h = y.cloneElement(e, {
17
33
  tabIndex: 0,
18
- "aria-labelledby": n ? i : void 0,
19
- "aria-describedby": r ? i : void 0,
20
- ...u
34
+ "aria-labelledby": n ? t : void 0,
35
+ "aria-describedby": r ? t : void 0,
36
+ ...f
37
+ });
38
+ return l(x, {
39
+ children: [o(R, {
40
+ children: l(j, {
41
+ id: t,
42
+ background: "neutral900",
43
+ hasRadius: !0,
44
+ padding: 2,
45
+ role: "tooltip",
46
+ ref: u,
47
+ visible: i,
48
+ position: "absolute",
49
+ ...m,
50
+ children: [i && o(W, {
51
+ id: c,
52
+ children: r
53
+ }), o(H, {
54
+ as: "p",
55
+ variant: "pi",
56
+ fontWeight: "bold",
57
+ textColor: "neutral0",
58
+ children: n || r
59
+ })]
60
+ })
61
+ }), o("span", {
62
+ ref: b,
63
+ children: h
64
+ })]
21
65
  });
22
- return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(T, null, /* @__PURE__ */ e.createElement(H, {
23
- id: i,
24
- background: "neutral900",
25
- hasRadius: !0,
26
- padding: 2,
27
- role: "tooltip",
28
- ref: b,
29
- visible: l,
30
- position: "absolute",
31
- ...c
32
- }, l && /* @__PURE__ */ e.createElement(I, {
33
- id: f
34
- }, r), /* @__PURE__ */ e.createElement(E, {
35
- as: "p",
36
- variant: "pi",
37
- fontWeight: "bold",
38
- textColor: "neutral0"
39
- }, n || r))), /* @__PURE__ */ e.createElement("span", {
40
- ref: y
41
- }, g));
42
- };
43
- a.defaultProps = {
44
- delay: 500,
45
- id: void 0,
46
- position: "top",
47
- label: void 0,
48
- description: void 0
49
- };
50
- a.propTypes = {
51
- children: o.node.isRequired,
52
- delay: o.number,
53
- description: o.string,
54
- id: o.string,
55
- label: o.string,
56
- position: o.oneOf(["top", "left", "bottom", "right"])
57
66
  };
58
67
  export {
59
- a as Tooltip
68
+ S as Tooltip
60
69
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react"),n=r=>{const[u,e]=o.useState(!1),t=o.useRef(),s=()=>{t.current&&clearTimeout(t.current)};return o.useEffect(()=>()=>{s()},[]),{visible:u,onFocus:()=>{e(!0)},onBlur:()=>{e(!1)},onMouseEnter:()=>{t.current=setTimeout(()=>{e(!0)},r)},onMouseLeave:()=>{s(),e(!1)}}};exports.useTooltipHandlers=n;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react"),n=s=>{const[u,e]=o.useState(!1),t=o.useRef(null),r=()=>{typeof t.current=="number"&&(clearTimeout(t.current),t.current=null)};return o.useEffect(()=>()=>{r()},[]),{visible:u,onFocus:()=>{e(!0)},onBlur:()=>{e(!1)},onMouseEnter:()=>{t.current=setTimeout(()=>{e(!0)},s)},onMouseLeave:()=>{r(),e(!1)}}};exports.useTooltipHandlers=n;
@@ -1,22 +1,22 @@
1
- import { useState as r, useRef as u, useEffect as c } from "react";
2
- const M = (s) => {
3
- const [n, e] = r(!1), o = u(), t = () => {
4
- o.current && clearTimeout(o.current);
1
+ import { useState as s, useRef as u, useEffect as c } from "react";
2
+ const p = (n) => {
3
+ const [r, e] = s(!1), o = u(null), t = () => {
4
+ typeof o.current == "number" && (clearTimeout(o.current), o.current = null);
5
5
  };
6
6
  return c(() => () => {
7
7
  t();
8
- }, []), { visible: n, onFocus: () => {
8
+ }, []), { visible: r, onFocus: () => {
9
9
  e(!0);
10
10
  }, onBlur: () => {
11
11
  e(!1);
12
12
  }, onMouseEnter: () => {
13
13
  o.current = setTimeout(() => {
14
14
  e(!0);
15
- }, s);
15
+ }, n);
16
16
  }, onMouseLeave: () => {
17
17
  t(), e(!1);
18
18
  } };
19
19
  };
20
20
  export {
21
- M as useTooltipHandlers
21
+ p as useTooltipHandlers
22
22
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react"),c=require("../utils/positionTooltip.cjs"),n=(e,u)=>{const l=o.useRef(null),s=o.useRef(null);return o.useLayoutEffect(()=>{if(e){const t=l.current,r=s.current,i=c.positionTooltip(t,r,u);t.style.left=`${i.left}px`,t.style.top=`${i.top}px`}},[u,e]),{tooltipWrapperRef:l,toggleSourceRef:s}};exports.useTooltipLayout=n;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react"),c=require("../utils/positionTooltip.cjs"),n=(e,u)=>{const l=o.useRef(null),s=o.useRef(null);return o.useLayoutEffect(()=>{if(e){const t=l.current,i=s.current;if(t&&i){const r=c.positionTooltip(t,i,u);t.style.left=`${r.left}px`,t.style.top=`${r.top}px`}}},[u,e]),{tooltipWrapperRef:l,toggleSourceRef:s}};exports.useTooltipLayout=n;
@@ -1,11 +1,14 @@
1
- import { useRef as n, useLayoutEffect as c } from "react";
2
- import { positionTooltip as s } from "../utils/positionTooltip.js";
1
+ import { useRef as u, useLayoutEffect as c } from "react";
2
+ import { positionTooltip as f } from "../utils/positionTooltip.js";
3
3
  const g = (o, e) => {
4
- const r = n(null), l = n(null);
4
+ const r = u(null), l = u(null);
5
5
  return c(() => {
6
6
  if (o) {
7
- const t = r.current, u = l.current, p = s(t, u, e);
8
- t.style.left = `${p.left}px`, t.style.top = `${p.top}px`;
7
+ const t = r.current, p = l.current;
8
+ if (t && p) {
9
+ const n = f(t, p, e);
10
+ t.style.left = `${n.left}px`, t.style.top = `${n.top}px`;
11
+ }
9
12
  }
10
13
  }, [e, o]), { tooltipWrapperRef: r, toggleSourceRef: l };
11
14
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("styled-components"),o=require("./utils.cjs"),r=require("../helpers/theme.cjs"),i=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},s=i(n),l={fontSize:!0,fontWeight:!0},a=s.default.span.withConfig({shouldForwardProp:(e,t)=>!l[e]&&t(e)})`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("styled-components"),o=require("./utils.cjs"),r=require("../helpers/theme.cjs"),i=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},s=i(n),a={fontSize:!0,fontWeight:!0},l=s.default.span.withConfig({shouldForwardProp:(e,t)=>!a[e]&&t(e)})`
2
2
  ${o.variantStyle}
3
3
  ${o.ellipsisStyle}
4
4
 
@@ -9,5 +9,6 @@
9
9
  line-height: ${({theme:e,lineHeight:t})=>r.extractStyleFromTheme(e.lineHeights,t,void 0)};
10
10
  color: ${o.handleColor};
11
11
  text-align: ${({textAlign:e})=>e};
12
+ text-decoration: ${({textDecoration:e})=>e};
12
13
  text-transform: ${({textTransform:e})=>e};
13
- `;exports.Typography=a;
14
+ `;exports.Typography=l;
@@ -5,7 +5,7 @@ const s = {
5
5
  fontSize: !0,
6
6
  fontWeight: !0
7
7
  }, d = i.span.withConfig({
8
- shouldForwardProp: (e, t) => !s[e] && t(e)
8
+ shouldForwardProp: (t, e) => !s[t] && e(t)
9
9
  })`
10
10
  ${r}
11
11
  ${n}
@@ -13,24 +13,27 @@ const s = {
13
13
  // These properties need to come after {variantStyle}, because they might
14
14
  // overwrite a variant attribute
15
15
  font-weight: ${({
16
- theme: e,
17
- fontWeight: t
18
- }) => o(e.fontWeights, t, void 0)};
16
+ theme: t,
17
+ fontWeight: e
18
+ }) => o(t.fontWeights, e, void 0)};
19
19
  font-size: ${({
20
- theme: e,
21
- fontSize: t
22
- }) => o(e.fontSizes, t, void 0)};
20
+ theme: t,
21
+ fontSize: e
22
+ }) => o(t.fontSizes, e, void 0)};
23
23
  line-height: ${({
24
- theme: e,
25
- lineHeight: t
26
- }) => o(e.lineHeights, t, void 0)};
24
+ theme: t,
25
+ lineHeight: e
26
+ }) => o(t.lineHeights, e, void 0)};
27
27
  color: ${a};
28
28
  text-align: ${({
29
- textAlign: e
30
- }) => e};
29
+ textAlign: t
30
+ }) => t};
31
+ text-decoration: ${({
32
+ textDecoration: t
33
+ }) => t};
31
34
  text-transform: ${({
32
- textTransform: e
33
- }) => e};
35
+ textTransform: t
36
+ }) => t};
34
37
  `;
35
38
  export {
36
39
  d as Typography
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r="[@strapi/design-system]:",i=n=>{const e=n;let t=!1;if(typeof e!="function")throw new TypeError(`${r} once requires a function parameter`);return(...o)=>{t||(e(...o),t=!0)}};exports.once=i;exports.prefix=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r="[@strapi/design-system]:",s=n=>{const e=n;let t=!1;if(typeof e!="function")throw new TypeError(`${r} once requires a function parameter`);return(...o)=>{t||(e(...o),t=!0)}};exports.PREFIX=r;exports.once=s;
@@ -1,13 +1,13 @@
1
- const o = "[@strapi/design-system]:", c = (t) => {
2
- const e = t;
3
- let r = !1;
1
+ const o = "[@strapi/design-system]:", c = (n) => {
2
+ const e = n;
3
+ let t = !1;
4
4
  if (typeof e != "function")
5
5
  throw new TypeError(`${o} once requires a function parameter`);
6
- return (...n) => {
7
- r || (e(...n), r = !0);
6
+ return (...r) => {
7
+ t || (e(...r), t = !0);
8
8
  };
9
9
  };
10
10
  export {
11
- c as once,
12
- o as prefix
11
+ o as PREFIX,
12
+ c as once
13
13
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./arrays.cjs");function b(e,i){return typeof e=="string"?!1:i in e}function n(e){return e&&typeof e=="object"&&!Array.isArray(e)}function o(e,...i){if(!i.length)return e;const r=i.shift();if(r==null)return e;const c=n(e)&&n(r),t=f.isArray(e)&&f.isArray(r);if(c||t)for(const s of Object.keys(r)){const u=n(r[s]),y=f.isArray(r[s]);u||y?(e[s]||Object.assign(e,{[s]:u?{}:[]}),o(e[s],r[s])):c?Object.assign(e,{[s]:r[s]}):e.push(r[s])}return o(e,...i)}exports.isKeyOf=b;exports.isObject=n;exports.mergeDeep=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./arrays.cjs");function b(e,i){return typeof e=="string"?!1:i in e}function n(e){return e&&typeof e=="object"&&!Array.isArray(e)}function o(e,...i){if(!i.length)return e;const r=i.shift();if(r===void 0)return e;const c=n(e)&&n(r),t=f.isArray(e)&&f.isArray(r);if(c||t)for(const s of Object.keys(r)){const u=n(r[s]),y=f.isArray(r[s]);u||y?(e[s]||Object.assign(e,{[s]:u?{}:[]}),o(e[s],r[s])):c?Object.assign(e,{[s]:r[s]}):e.push(r[s])}return o(e,...i)}exports.isKeyOf=b;exports.isObject=n;exports.mergeDeep=o;
@@ -9,7 +9,7 @@ function u(n, ...s) {
9
9
  if (!s.length)
10
10
  return n;
11
11
  const i = s.shift();
12
- if (i == null)
12
+ if (i === void 0)
13
13
  return n;
14
14
  const o = f(n) && f(i), b = e(n) && e(i);
15
15
  if (o || b)
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react"),o=r=>{const e=n.useRef(null),[c,u]=n.useState(!0),i=([t])=>{u(t.isIntersecting)};return n.useEffect(()=>{const t=e.current,s=new IntersectionObserver(i,r);return t&&s.observe(e.current),()=>{t&&s.disconnect()}},[e,r]),[e,c]};exports.useElementOnScreen=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./deprecations.cjs"),s=require("../hooks/useElementOnScreen.cjs"),r=e.once(console.warn),t=(...n)=>(r(`${e.PREFIX} useElementOnScreen has moved. Please import it from "@strapi/design-system/hooks/useElementOnScreen"`),s.useElementOnScreen(...n));exports.useElementOnScreen=t;
@@ -1,15 +1,6 @@
1
- import { useRef as o, useState as u, useEffect as l } from "react";
2
- const b = (t) => {
3
- const e = o(null), [s, c] = u(!0), i = ([n]) => {
4
- c(n.isIntersecting);
5
- };
6
- return l(() => {
7
- const n = e.current, r = new IntersectionObserver(i, t);
8
- return n && r.observe(e.current), () => {
9
- n && r.disconnect();
10
- };
11
- }, [e, t]), [e, s];
12
- };
1
+ import { once as n, PREFIX as r } from "./deprecations.js";
2
+ import { useElementOnScreen as s } from "../hooks/useElementOnScreen.js";
3
+ const t = n(console.warn), c = (...e) => (t(`${r} useElementOnScreen has moved. Please import it from "@strapi/design-system/hooks/useElementOnScreen"`), s(...e));
13
4
  export {
14
- b as useElementOnScreen
5
+ c as useElementOnScreen
15
6
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react"),c=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},n=c(t),r=n.default["useId".toString()]||(()=>{});let a=0;const d=e=>{const[u,o]=t.useState(r());return t.useLayoutEffect(()=>{e||o(s=>s??String(a++))},[e]),e?.toString()??(u||"")};exports.useId=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./deprecations.cjs"),o=require("../hooks/useId.cjs"),r=e.once(console.warn),t=(...s)=>(r(`${e.PREFIX} useId has moved. Please import it from "@strapi/design-system/hooks/useId"`),o.useId(...s));exports.useId=t;
@@ -1,13 +1,6 @@
1
- import s, { useState as n, useLayoutEffect as r } from "react";
2
- const c = s["useId".toString()] || (() => {
3
- });
4
- let d = 0;
5
- const S = (t) => {
6
- const [e, o] = n(c());
7
- return r(() => {
8
- t || o((u) => u ?? String(d++));
9
- }, [t]), t?.toString() ?? (e || "");
10
- };
1
+ import { once as s, PREFIX as o } from "./deprecations.js";
2
+ import { useId as r } from "../hooks/useId.js";
3
+ const t = s(console.warn), n = (...e) => (t(`${o} useId has moved. Please import it from "@strapi/design-system/hooks/useId"`), r(...e));
11
4
  export {
12
- S as useId
5
+ n as useId
13
6
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react"),d=require("@radix-ui/react-use-callback-ref"),v=(e,i,{selectorToWatch:t,skipWhen:r=!1})=>{const n=d.useCallbackRef(i);g.useEffect(()=>{if(r)return;const u={root:e.current,rootMargin:"0px"},a=f=>{f.forEach(s=>{s.isIntersecting&&e.current.scrollHeight>e.current.clientHeight&&n(s)})},c=new IntersectionObserver(a,u),o=e.current.querySelector(t);return o&&c.observe(o),()=>{c.disconnect()}},[r,n,t,e])};exports.useIntersection=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./deprecations.cjs"),t=require("../hooks/useIntersection.cjs"),n=e.once(console.warn),o=(...s)=>(n(`${e.PREFIX} useIntersection has moved. Please import it from "@strapi/design-system/hooks/useIntersection"`),t.useIntersection(...s));exports.useIntersection=o;
@@ -1,23 +1,6 @@
1
- import { useEffect as m } from "react";
2
- import { useCallbackRef as p } from "@radix-ui/react-use-callback-ref";
3
- const E = (t, s, { selectorToWatch: n, skipWhen: r = !1 }) => {
4
- const e = p(s);
5
- m(() => {
6
- if (r)
7
- return;
8
- const u = {
9
- root: t.current,
10
- rootMargin: "0px"
11
- }, f = (g) => {
12
- g.forEach((i) => {
13
- i.isIntersecting && t.current.scrollHeight > t.current.clientHeight && e(i);
14
- });
15
- }, o = new IntersectionObserver(f, u), c = t.current.querySelector(n);
16
- return c && o.observe(c), () => {
17
- o.disconnect();
18
- };
19
- }, [r, e, n, t]);
20
- };
1
+ import { once as s, PREFIX as t } from "./deprecations.js";
2
+ import { useIntersection as o } from "../hooks/useIntersection.js";
3
+ const n = s(console.warn), c = (...e) => (n(`${t} useIntersection has moved. Please import it from "@strapi/design-system/hooks/useIntersection"`), o(...e));
21
4
  export {
22
- E as useIntersection
5
+ c as useIntersection
23
6
  };
@@ -1 +1 @@
1
- "use strict";const c=require("react"),e=s=>{c.useEffect(()=>(s&&document.body.classList.add("lock-body-scroll"),()=>{document.body.classList.remove("lock-body-scroll")}),[s])};module.exports=e;
1
+ "use strict";const o=require("./deprecations.cjs"),s=require("../hooks/useLockScroll.cjs"),c=o.once(console.warn),r=(...e)=>(c(`${o.PREFIX} useLockScroll has moved. Please import it from "@strapi/design-system/hooks/useLockScroll"`),s(...e));module.exports=r;
@@ -1,9 +1,6 @@
1
- import { useEffect as s } from "react";
2
- const e = (o) => {
3
- s(() => (o && document.body.classList.add("lock-body-scroll"), () => {
4
- document.body.classList.remove("lock-body-scroll");
5
- }), [o]);
6
- };
1
+ import { once as e, PREFIX as r } from "./deprecations.js";
2
+ import s from "../hooks/useLockScroll.js";
3
+ const c = e(console.warn), a = (...o) => (c(`${r} useLockScroll has moved. Please import it from "@strapi/design-system/hooks/useLockScroll"`), s(...o));
7
4
  export {
8
- e as default
5
+ a as default
9
6
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),u=t=>{const e=r.useRef();return r.useEffect(()=>{e.current=t}),e.current};exports.usePrevious=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./deprecations.cjs"),o=require("../hooks/usePrevious.cjs"),r=e.once(console.warn),u=(...s)=>(r(`${e.PREFIX} usePrevious has moved. Please import it from "@strapi/design-system/hooks/usePrevious"`),o.usePrevious(...s));exports.usePrevious=u;
@@ -1,10 +1,6 @@
1
- import { useRef as t, useEffect as u } from "react";
2
- const s = (r) => {
3
- const e = t();
4
- return u(() => {
5
- e.current = r;
6
- }), e.current;
7
- };
1
+ import { once as s, PREFIX as o } from "./deprecations.js";
2
+ import { usePrevious as r } from "../hooks/usePrevious.js";
3
+ const i = s(console.warn), m = (...e) => (i(`${o} usePrevious has moved. Please import it from "@strapi/design-system/hooks/usePrevious"`), r(...e));
8
4
  export {
9
- s as usePrevious
5
+ m as usePrevious
10
6
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react"),i=require("@radix-ui/react-use-callback-ref"),n=(e,a)=>{const t=i.useCallbackRef(a);c.useLayoutEffect(()=>{const r=new ResizeObserver(t);return Array.isArray(e)?e.forEach(s=>{s.current&&r.observe(s.current)}):e.current&&r.observe(e.current),()=>{r.disconnect()}},[e,t])};exports.useResizeObserver=n;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./deprecations.cjs"),r=require("../hooks/useResizeObserver.cjs"),o=e.once(console.warn),i=(...s)=>(o(`${e.PREFIX} useResizeObserver has moved. Please import it from "@strapi/design-system/hooks/useResizeObserver"`),r.useResizeObserver(...s));exports.useResizeObserver=i;
@@ -1,16 +1,6 @@
1
- import { useLayoutEffect as f } from "react";
2
- import { useCallbackRef as s } from "@radix-ui/react-use-callback-ref";
3
- const c = (e, i) => {
4
- const t = s(i);
5
- f(() => {
6
- const r = new ResizeObserver(t);
7
- return Array.isArray(e) ? e.forEach((n) => {
8
- n.current && r.observe(n.current);
9
- }) : e.current && r.observe(e.current), () => {
10
- r.disconnect();
11
- };
12
- }, [e, t]);
13
- };
1
+ import { once as s, PREFIX as r } from "./deprecations.js";
2
+ import { useResizeObserver as o } from "../hooks/useResizeObserver.js";
3
+ const i = s(console.warn), n = (...e) => (i(`${r} useResizeObserver has moved. Please import it from "@strapi/design-system/hooks/useResizeObserver"`), o(...e));
14
4
  export {
15
- c as useResizeObserver
5
+ n as useResizeObserver
16
6
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react"),o=r=>{const e=n.useRef(null),[c,u]=n.useState(!0),i=([t])=>{u(t.isIntersecting)};return n.useEffect(()=>{const t=e.current,s=new IntersectionObserver(i,r);return t&&s.observe(e.current),()=>{t&&s.disconnect()}},[e,r]),[e,c]};exports.useElementOnScreen=o;
@@ -0,0 +1,15 @@
1
+ import { useRef as o, useState as u, useEffect as l } from "react";
2
+ const b = (t) => {
3
+ const e = o(null), [s, c] = u(!0), i = ([n]) => {
4
+ c(n.isIntersecting);
5
+ };
6
+ return l(() => {
7
+ const n = e.current, r = new IntersectionObserver(i, t);
8
+ return n && r.observe(e.current), () => {
9
+ n && r.disconnect();
10
+ };
11
+ }, [e, t]), [e, s];
12
+ };
13
+ export {
14
+ b as useElementOnScreen
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react"),c=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},n=c(t),r=n.default["useId".toString()]||(()=>{});let a=0;const d=e=>{const[u,o]=t.useState(r());return t.useLayoutEffect(()=>{e||o(s=>s??String(a++))},[e]),e?.toString()??(u||"")};exports.useId=d;
@@ -0,0 +1,13 @@
1
+ import s, { useState as n, useLayoutEffect as r } from "react";
2
+ const c = s["useId".toString()] || (() => {
3
+ });
4
+ let d = 0;
5
+ const S = (t) => {
6
+ const [e, o] = n(c());
7
+ return r(() => {
8
+ t || o((u) => u ?? String(d++));
9
+ }, [t]), t?.toString() ?? (e || "");
10
+ };
11
+ export {
12
+ S as useId
13
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react"),d=require("@radix-ui/react-use-callback-ref"),v=(e,i,{selectorToWatch:t,skipWhen:r=!1})=>{const n=d.useCallbackRef(i);g.useEffect(()=>{if(r||!e.current)return;const u={root:e.current,rootMargin:"0px"},a=f=>{f.forEach(s=>{s.isIntersecting&&e.current&&e.current.scrollHeight>e.current.clientHeight&&n(s)})},c=new IntersectionObserver(a,u),o=e.current.querySelector(t);return o&&c.observe(o),()=>{c.disconnect()}},[r,n,t])};exports.useIntersection=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react"),d=require("@radix-ui/react-use-callback-ref"),v=(e,i,{selectorToWatch:t,skipWhen:r=!1})=>{const n=d.useCallbackRef(i);g.useEffect(()=>{if(r)return;const u={root:e.current,rootMargin:"0px"},a=f=>{f.forEach(s=>{s.isIntersecting&&e.current.scrollHeight>e.current.clientHeight&&n(s)})},c=new IntersectionObserver(a,u),o=e.current.querySelector(t);return o&&c.observe(o),()=>{c.disconnect()}},[r,n,t,e])};exports.useIntersection=v;
@@ -3,20 +3,20 @@ import { useCallbackRef as p } from "@radix-ui/react-use-callback-ref";
3
3
  const E = (t, s, { selectorToWatch: n, skipWhen: r = !1 }) => {
4
4
  const e = p(s);
5
5
  m(() => {
6
- if (r || !t.current)
6
+ if (r)
7
7
  return;
8
8
  const u = {
9
9
  root: t.current,
10
10
  rootMargin: "0px"
11
11
  }, f = (g) => {
12
12
  g.forEach((i) => {
13
- i.isIntersecting && t.current && t.current.scrollHeight > t.current.clientHeight && e(i);
13
+ i.isIntersecting && t.current.scrollHeight > t.current.clientHeight && e(i);
14
14
  });
15
15
  }, o = new IntersectionObserver(f, u), c = t.current.querySelector(n);
16
16
  return c && o.observe(c), () => {
17
17
  o.disconnect();
18
18
  };
19
- }, [r, e, n]);
19
+ }, [r, e, n, t]);
20
20
  };
21
21
  export {
22
22
  E as useIntersection
@@ -0,0 +1 @@
1
+ "use strict";const c=require("react"),e=s=>{c.useEffect(()=>(s&&document.body.classList.add("lock-body-scroll"),()=>{document.body.classList.remove("lock-body-scroll")}),[s])};module.exports=e;
@@ -0,0 +1,9 @@
1
+ import { useEffect as s } from "react";
2
+ const e = (o) => {
3
+ s(() => (o && document.body.classList.add("lock-body-scroll"), () => {
4
+ document.body.classList.remove("lock-body-scroll");
5
+ }), [o]);
6
+ };
7
+ export {
8
+ e as default
9
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),u=t=>{const e=r.useRef();return r.useEffect(()=>{e.current=t}),e.current};exports.usePrevious=u;
@@ -0,0 +1,10 @@
1
+ import { useRef as t, useEffect as u } from "react";
2
+ const s = (r) => {
3
+ const e = t();
4
+ return u(() => {
5
+ e.current = r;
6
+ }), e.current;
7
+ };
8
+ export {
9
+ s as usePrevious
10
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react"),i=require("@radix-ui/react-use-callback-ref"),n=(e,a)=>{const t=i.useCallbackRef(a);c.useLayoutEffect(()=>{const r=new ResizeObserver(t);return Array.isArray(e)?e.forEach(s=>{s.current&&r.observe(s.current)}):e.current&&r.observe(e.current),()=>{r.disconnect()}},[e,t])};exports.useResizeObserver=n;
@@ -0,0 +1,16 @@
1
+ import { useLayoutEffect as f } from "react";
2
+ import { useCallbackRef as s } from "@radix-ui/react-use-callback-ref";
3
+ const c = (e, i) => {
4
+ const t = s(i);
5
+ f(() => {
6
+ const r = new ResizeObserver(t);
7
+ return Array.isArray(e) ? e.forEach((n) => {
8
+ n.current && r.observe(n.current);
9
+ }) : e.current && r.observe(e.current), () => {
10
+ r.disconnect();
11
+ };
12
+ }, [e, t]);
13
+ };
14
+ export {
15
+ c as useResizeObserver
16
+ };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../helpers/objects.cjs"),s=require("./lightTheme/index.cjs"),n=t=>`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./lightTheme/index.cjs"),r=require("../helpers/objects.cjs"),n=t=>`
2
2
  ${t}
3
3
 
4
4
  The following is an example:
@@ -1,5 +1,5 @@
1
- import { isObject as r, mergeDeep as h } from "../helpers/objects.js";
2
- import { lightTheme as m } from "./lightTheme/index.js";
1
+ import { lightTheme as h } from "./lightTheme/index.js";
2
+ import { isObject as r, mergeDeep as m } from "../helpers/objects.js";
3
3
  const n = (t) => `
4
4
  ${t}
5
5
 
@@ -9,7 +9,7 @@ The following is an example:
9
9
  import { lightTheme, extendTheme } from '@strapi/design-system';
10
10
 
11
11
  const myCustomTheme = extendTheme(lightTheme, {
12
- ${Object.keys(m).map((e) => `${e}: /* put the overrides for the ${e} key */,`).join(`
12
+ ${Object.keys(h).map((e) => `${e}: /* put the overrides for the ${e} key */,`).join(`
13
13
  `)}
14
14
  })
15
15
  `, a = (t, e) => {
@@ -21,7 +21,7 @@ const myCustomTheme = extendTheme(lightTheme, {
21
21
  const o = n("The second argument should be an object and corresponds to the keys of the theme you want to override.");
22
22
  throw new Error(o);
23
23
  }
24
- return h(t ?? {}, e ?? {});
24
+ return m(t ?? {}, e ?? {});
25
25
  };
26
26
  export {
27
27
  a as extendTheme
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react"),h=require("prop-types"),p=require("styled-components"),m=require("../../Box/Box.cjs"),y=require("./Divider.cjs"),s=require("../../Flex/Flex.cjs"),i=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=i(l),t=i(h),b=i(p),g=b.default(s.Flex)`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react"),h=require("prop-types"),p=require("styled-components"),m=require("./Divider.cjs"),y=require("../../Box/Box.cjs"),s=require("../../Flex/Flex.cjs"),i=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=i(l),t=i(h),b=i(p),g=b.default(s.Flex)`
2
2
  // CrumbLinks do have padding-x, because they need to have a
3
3
  // interaction effect, which mis-aligns the breadcrumbs on the left.
4
4
  // This normalizes the behavior by moving the first item to left by
@@ -6,4 +6,4 @@
6
6
  :first-child {
7
7
  margin-left: ${({theme:e})=>`calc(-1*${e.spaces[2]})`};
8
8
  }
9
- `,n=({label:e,children:o,...d})=>{const a=l.Children.toArray(o);return r.default.createElement(m.Box,{"aria-label":e,...d},r.default.createElement(g,{as:"ol",horizontal:!0},l.Children.map(a,(c,u)=>{const f=a.length>1&&u+1<a.length;return r.default.createElement(s.Flex,{inline:!0,as:"li"},c,f&&r.default.createElement(y.Divider,null))})))};n.displayName="Breadcrumbs";n.propTypes={children:t.default.oneOfType([t.default.arrayOf(t.default.node),t.default.node]).isRequired,label:t.default.string.isRequired};exports.Breadcrumbs=n;
9
+ `,n=({label:e,children:o,...d})=>{const a=l.Children.toArray(o);return r.default.createElement(y.Box,{"aria-label":e,...d},r.default.createElement(g,{as:"ol",horizontal:!0},l.Children.map(a,(c,u)=>{const f=a.length>1&&u+1<a.length;return r.default.createElement(s.Flex,{inline:!0,as:"li"},c,f&&r.default.createElement(m.Divider,null))})))};n.displayName="Breadcrumbs";n.propTypes={children:t.default.oneOfType([t.default.arrayOf(t.default.node),t.default.node]).isRequired,label:t.default.string.isRequired};exports.Breadcrumbs=n;