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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (669) hide show
  1. package/.eslintrc.js +38 -0
  2. package/.prettierrc.js +7 -0
  3. package/.storybook/{main.cjs → main.js} +0 -0
  4. package/babel.config.js +5 -0
  5. package/createIndexFiles.js +34 -0
  6. package/global-setup.js +1 -1
  7. package/jest.config.js +3 -1
  8. package/package.json +22 -28
  9. package/playwright.config.js +4 -2
  10. package/src/Accordion/Accordion.js +1 -0
  11. package/src/BaseCheckbox/BaseCheckbox.js +14 -9
  12. package/src/BaseCheckbox/BaseCheckbox.stories.mdx +1 -1
  13. package/src/Checkbox/Checkbox.stories.mdx +1 -1
  14. package/src/DatePicker/__tests__/DatePicker.spec.js +1 -0
  15. package/src/DateTimePicker/__tests__/DateTimePicker.e2e.js +1 -1
  16. package/src/DismissibleLayer/DismissibleLayer.js +15 -1
  17. package/src/DismissibleLayer/__test__/DimissibleLayer.spec.js +4 -2
  18. package/src/IconButton/IconButton.js +62 -22
  19. package/src/IconButton/IconButton.stories.mdx +69 -16
  20. package/src/ModalLayout/__tests__/ModalLayout.spec.js +7 -1
  21. package/src/Portal/Portal.js +0 -5
  22. package/src/Status/Status.stories.mdx +9 -4
  23. package/src/Switch/Switch.stories.mdx +23 -2
  24. package/webpack.config.js +84 -0
  25. package/.eslintrc +0 -34
  26. package/.prettierrc +0 -7
  27. package/dist/Accordion/Accordion.cjs +0 -23
  28. package/dist/Accordion/Accordion.js +0 -87
  29. package/dist/Accordion/AccordionContent.cjs +0 -1
  30. package/dist/Accordion/AccordionContent.js +0 -23
  31. package/dist/Accordion/AccordionContext.cjs +0 -1
  32. package/dist/Accordion/AccordionContext.js +0 -6
  33. package/dist/Accordion/AccordionGroup.cjs +0 -47
  34. package/dist/Accordion/AccordionGroup.js +0 -91
  35. package/dist/Accordion/AccordionToggle.cjs +0 -28
  36. package/dist/Accordion/AccordionToggle.js +0 -127
  37. package/dist/Accordion/index.cjs +0 -1
  38. package/dist/Accordion/index.js +0 -11
  39. package/dist/Accordion/utils.cjs +0 -1
  40. package/dist/Accordion/utils.js +0 -7
  41. package/dist/Alert/Alert.cjs +0 -35
  42. package/dist/Alert/Alert.js +0 -111
  43. package/dist/Alert/index.cjs +0 -1
  44. package/dist/Alert/index.js +0 -4
  45. package/dist/Alert/utils.cjs +0 -1
  46. package/dist/Alert/utils.js +0 -6
  47. package/dist/Avatar/Avatar.cjs +0 -29
  48. package/dist/Avatar/Avatar.js +0 -79
  49. package/dist/Avatar/AvatarGroup.cjs +0 -5
  50. package/dist/Avatar/AvatarGroup.js +0 -11
  51. package/dist/Avatar/constants.cjs +0 -1
  52. package/dist/Avatar/constants.js +0 -5
  53. package/dist/Avatar/index.cjs +0 -1
  54. package/dist/Avatar/index.js +0 -7
  55. package/dist/Badge/Badge.cjs +0 -1
  56. package/dist/Badge/Badge.js +0 -33
  57. package/dist/Badge/index.cjs +0 -1
  58. package/dist/Badge/index.js +0 -4
  59. package/dist/BaseButton/BaseButton.cjs +0 -23
  60. package/dist/BaseButton/BaseButton.js +0 -45
  61. package/dist/BaseButton/index.cjs +0 -1
  62. package/dist/BaseButton/index.js +0 -5
  63. package/dist/BaseCheckbox/BaseCheckbox.cjs +0 -62
  64. package/dist/BaseCheckbox/BaseCheckbox.js +0 -104
  65. package/dist/BaseCheckbox/assets/checkmark-black.cjs +0 -1
  66. package/dist/BaseCheckbox/assets/checkmark-black.js +0 -4
  67. package/dist/BaseCheckbox/assets/checkmark.cjs +0 -1
  68. package/dist/BaseCheckbox/assets/checkmark.js +0 -4
  69. package/dist/BaseCheckbox/index.cjs +0 -1
  70. package/dist/BaseCheckbox/index.js +0 -4
  71. package/dist/BaseCheckbox/utils.cjs +0 -1
  72. package/dist/BaseCheckbox/utils.js +0 -4
  73. package/dist/BaseLink/BaseLink.cjs +0 -3
  74. package/dist/BaseLink/BaseLink.js +0 -31
  75. package/dist/BaseLink/index.cjs +0 -1
  76. package/dist/BaseLink/index.js +0 -4
  77. package/dist/BaseRadio/BaseRadio.cjs +0 -31
  78. package/dist/BaseRadio/BaseRadio.js +0 -62
  79. package/dist/BaseRadio/RadioGroup.cjs +0 -1
  80. package/dist/BaseRadio/RadioGroup.js +0 -32
  81. package/dist/BaseRadio/context.cjs +0 -1
  82. package/dist/BaseRadio/context.js +0 -6
  83. package/dist/BaseRadio/index.cjs +0 -1
  84. package/dist/BaseRadio/index.js +0 -6
  85. package/dist/BaseRadio/utils.cjs +0 -1
  86. package/dist/BaseRadio/utils.js +0 -6
  87. package/dist/Box/Box.cjs +0 -80
  88. package/dist/Box/Box.js +0 -95
  89. package/dist/Box/BoxProps.cjs +0 -1
  90. package/dist/Box/BoxProps.js +0 -51
  91. package/dist/Box/index.cjs +0 -1
  92. package/dist/Box/index.js +0 -4
  93. package/dist/Breadcrumbs/Breadcrumbs.cjs +0 -16
  94. package/dist/Breadcrumbs/Breadcrumbs.js +0 -52
  95. package/dist/Breadcrumbs/index.cjs +0 -1
  96. package/dist/Breadcrumbs/index.js +0 -5
  97. package/dist/Button/Button.cjs +0 -43
  98. package/dist/Button/Button.js +0 -105
  99. package/dist/Button/constants.cjs +0 -1
  100. package/dist/Button/constants.js +0 -14
  101. package/dist/Button/index.cjs +0 -1
  102. package/dist/Button/index.js +0 -5
  103. package/dist/Button/utils.cjs +0 -87
  104. package/dist/Button/utils.js +0 -112
  105. package/dist/Card/Card.cjs +0 -1
  106. package/dist/Card/Card.js +0 -32
  107. package/dist/Card/CardAction.cjs +0 -6
  108. package/dist/Card/CardAction.js +0 -14
  109. package/dist/Card/CardAsset.cjs +0 -19
  110. package/dist/Card/CardAsset.js +0 -42
  111. package/dist/Card/CardBadge.cjs +0 -6
  112. package/dist/Card/CardBadge.js +0 -14
  113. package/dist/Card/CardBody.cjs +0 -1
  114. package/dist/Card/CardBody.js +0 -15
  115. package/dist/Card/CardCheckbox.cjs +0 -1
  116. package/dist/Card/CardCheckbox.js +0 -16
  117. package/dist/Card/CardContent.cjs +0 -3
  118. package/dist/Card/CardContent.js +0 -15
  119. package/dist/Card/CardContext.cjs +0 -1
  120. package/dist/Card/CardContext.js +0 -6
  121. package/dist/Card/CardHeader.cjs +0 -4
  122. package/dist/Card/CardHeader.js +0 -13
  123. package/dist/Card/CardTimer.cjs +0 -5
  124. package/dist/Card/CardTimer.js +0 -26
  125. package/dist/Card/CardTitle.cjs +0 -1
  126. package/dist/Card/CardTitle.js +0 -23
  127. package/dist/Card/index.cjs +0 -1
  128. package/dist/Card/index.js +0 -23
  129. package/dist/CarouselInput/Carousel.cjs +0 -14
  130. package/dist/CarouselInput/Carousel.js +0 -131
  131. package/dist/CarouselInput/CarouselActions.cjs +0 -1
  132. package/dist/CarouselInput/CarouselActions.js +0 -14
  133. package/dist/CarouselInput/CarouselImage.cjs +0 -4
  134. package/dist/CarouselInput/CarouselImage.js +0 -35
  135. package/dist/CarouselInput/CarouselInput.cjs +0 -1
  136. package/dist/CarouselInput/CarouselInput.js +0 -79
  137. package/dist/CarouselInput/CarouselSlide.cjs +0 -3
  138. package/dist/CarouselInput/CarouselSlide.js +0 -26
  139. package/dist/CarouselInput/index.cjs +0 -1
  140. package/dist/CarouselInput/index.js +0 -12
  141. package/dist/Checkbox/Checkbox.cjs +0 -7
  142. package/dist/Checkbox/Checkbox.js +0 -64
  143. package/dist/Checkbox/index.cjs +0 -1
  144. package/dist/Checkbox/index.js +0 -4
  145. package/dist/Combobox/Combobox.cjs +0 -1
  146. package/dist/Combobox/Combobox.js +0 -285
  147. package/dist/Combobox/ComboboxList.cjs +0 -1
  148. package/dist/Combobox/ComboboxList.js +0 -15
  149. package/dist/Combobox/ComboboxOption.cjs +0 -1
  150. package/dist/Combobox/ComboboxOption.js +0 -30
  151. package/dist/Combobox/components.cjs +0 -53
  152. package/dist/Combobox/components.js +0 -64
  153. package/dist/Combobox/index.cjs +0 -1
  154. package/dist/Combobox/index.js +0 -7
  155. package/dist/Combobox/utils.cjs +0 -1
  156. package/dist/Combobox/utils.js +0 -78
  157. package/dist/DatePicker/DatePicker.cjs +0 -1
  158. package/dist/DatePicker/DatePicker.js +0 -104
  159. package/dist/DatePicker/DatePickerCalendar.cjs +0 -1
  160. package/dist/DatePicker/DatePickerCalendar.js +0 -102
  161. package/dist/DatePicker/DatePickerTd.cjs +0 -19
  162. package/dist/DatePicker/DatePickerTd.js +0 -55
  163. package/dist/DatePicker/DatePickerTh.cjs +0 -9
  164. package/dist/DatePicker/DatePickerTh.js +0 -35
  165. package/dist/DatePicker/compareDates.cjs +0 -1
  166. package/dist/DatePicker/compareDates.js +0 -4
  167. package/dist/DatePicker/components.cjs +0 -31
  168. package/dist/DatePicker/components.js +0 -41
  169. package/dist/DatePicker/index.cjs +0 -1
  170. package/dist/DatePicker/index.js +0 -4
  171. package/dist/DatePicker/utils/formatDate.cjs +0 -1
  172. package/dist/DatePicker/utils/formatDate.js +0 -4
  173. package/dist/DatePicker/utils/generateWeeks.cjs +0 -1
  174. package/dist/DatePicker/utils/generateWeeks.js +0 -17
  175. package/dist/DatePicker/utils/getDayOfWeek.cjs +0 -1
  176. package/dist/DatePicker/utils/getDayOfWeek.js +0 -15
  177. package/dist/DatePicker/utils/getMonths.cjs +0 -1
  178. package/dist/DatePicker/utils/getMonths.js +0 -7
  179. package/dist/DatePicker/utils/getYears.cjs +0 -1
  180. package/dist/DatePicker/utils/getYears.js +0 -9
  181. package/dist/DatePicker/utils/index.cjs +0 -1
  182. package/dist/DatePicker/utils/index.js +0 -12
  183. package/dist/DateTimePicker/DateTimePicker.cjs +0 -1
  184. package/dist/DateTimePicker/DateTimePicker.js +0 -108
  185. package/dist/DateTimePicker/DateTimePickerProps.cjs +0 -1
  186. package/dist/DateTimePicker/DateTimePickerProps.js +0 -42
  187. package/dist/DateTimePicker/__tests__/parseDate.test.cjs +0 -1
  188. package/dist/DateTimePicker/__tests__/parseDate.test.js +0 -8
  189. package/dist/DateTimePicker/index.cjs +0 -1
  190. package/dist/DateTimePicker/index.js +0 -4
  191. package/dist/DateTimePicker/parseDate.cjs +0 -1
  192. package/dist/DateTimePicker/parseDate.js +0 -7
  193. package/dist/Dialog/Dialog.cjs +0 -14
  194. package/dist/Dialog/Dialog.js +0 -66
  195. package/dist/Dialog/DialogBody.cjs +0 -10
  196. package/dist/Dialog/DialogBody.js +0 -32
  197. package/dist/Dialog/DialogFooter.cjs +0 -9
  198. package/dist/Dialog/DialogFooter.js +0 -31
  199. package/dist/Dialog/index.cjs +0 -1
  200. package/dist/Dialog/index.js +0 -8
  201. package/dist/DismissibleLayer/DismissibleLayer.cjs +0 -1
  202. package/dist/DismissibleLayer/DismissibleLayer.js +0 -37
  203. package/dist/DismissibleLayer/index.cjs +0 -1
  204. package/dist/DismissibleLayer/index.js +0 -4
  205. package/dist/Divider/Divider.cjs +0 -5
  206. package/dist/Divider/Divider.js +0 -24
  207. package/dist/Divider/index.cjs +0 -1
  208. package/dist/Divider/index.js +0 -4
  209. package/dist/EmptyStateLayout/EmptyStateLayout.cjs +0 -10
  210. package/dist/EmptyStateLayout/EmptyStateLayout.js +0 -44
  211. package/dist/EmptyStateLayout/index.cjs +0 -1
  212. package/dist/EmptyStateLayout/index.js +0 -4
  213. package/dist/EmptyStateLayout/story-assets/Illo.cjs +0 -1
  214. package/dist/EmptyStateLayout/story-assets/Illo.js +0 -49
  215. package/dist/Field/Field.cjs +0 -1
  216. package/dist/Field/Field.js +0 -28
  217. package/dist/Field/FieldAction.cjs +0 -10
  218. package/dist/Field/FieldAction.js +0 -24
  219. package/dist/Field/FieldContext.cjs +0 -1
  220. package/dist/Field/FieldContext.js +0 -6
  221. package/dist/Field/FieldError.cjs +0 -1
  222. package/dist/Field/FieldError.js +0 -16
  223. package/dist/Field/FieldHint.cjs +0 -1
  224. package/dist/Field/FieldHint.js +0 -15
  225. package/dist/Field/FieldInput.cjs +0 -43
  226. package/dist/Field/FieldInput.js +0 -105
  227. package/dist/Field/FieldLabel.cjs +0 -9
  228. package/dist/Field/FieldLabel.js +0 -44
  229. package/dist/Field/index.cjs +0 -1
  230. package/dist/Field/index.js +0 -18
  231. package/dist/Flex/Flex.cjs +0 -9
  232. package/dist/Flex/Flex.js +0 -22
  233. package/dist/Flex/FlexProps.cjs +0 -1
  234. package/dist/Flex/FlexProps.js +0 -40
  235. package/dist/Flex/index.cjs +0 -1
  236. package/dist/Flex/index.js +0 -4
  237. package/dist/FocusTrap/ExampleComponent.cjs +0 -1
  238. package/dist/FocusTrap/ExampleComponent.js +0 -70
  239. package/dist/FocusTrap/FocusTrap.cjs +0 -1
  240. package/dist/FocusTrap/FocusTrap.js +0 -48
  241. package/dist/FocusTrap/index.cjs +0 -1
  242. package/dist/FocusTrap/index.js +0 -4
  243. package/dist/Grid/Grid.cjs +0 -5
  244. package/dist/Grid/Grid.js +0 -28
  245. package/dist/Grid/GridContext.cjs +0 -1
  246. package/dist/Grid/GridContext.js +0 -6
  247. package/dist/Grid/GridItem.cjs +0 -12
  248. package/dist/Grid/GridItem.js +0 -41
  249. package/dist/Grid/index.cjs +0 -1
  250. package/dist/Grid/index.js +0 -6
  251. package/dist/Icon/Icon.cjs +0 -6
  252. package/dist/Icon/Icon.js +0 -26
  253. package/dist/Icon/index.cjs +0 -1
  254. package/dist/Icon/index.js +0 -4
  255. package/dist/IconButton/IconButton.cjs +0 -86
  256. package/dist/IconButton/IconButton.js +0 -129
  257. package/dist/IconButton/index.cjs +0 -1
  258. package/dist/IconButton/index.js +0 -5
  259. package/dist/KeyboardNavigable/KeyboardNavigable.cjs +0 -1
  260. package/dist/KeyboardNavigable/KeyboardNavigable.js +0 -58
  261. package/dist/KeyboardNavigable/index.cjs +0 -1
  262. package/dist/KeyboardNavigable/index.js +0 -4
  263. package/dist/Layout/ActionLayout.cjs +0 -9
  264. package/dist/Layout/ActionLayout.js +0 -37
  265. package/dist/Layout/ContentLayout.cjs +0 -1
  266. package/dist/Layout/ContentLayout.js +0 -13
  267. package/dist/Layout/GridLayout.cjs +0 -5
  268. package/dist/Layout/GridLayout.js +0 -13
  269. package/dist/Layout/HeaderLayout.cjs +0 -8
  270. package/dist/Layout/HeaderLayout.js +0 -132
  271. package/dist/Layout/Layout.cjs +0 -6
  272. package/dist/Layout/Layout.js +0 -24
  273. package/dist/Layout/TwoColsLayout.cjs +0 -1
  274. package/dist/Layout/TwoColsLayout.js +0 -29
  275. package/dist/Layout/index.cjs +0 -1
  276. package/dist/Layout/index.js +0 -15
  277. package/dist/Link/Link.cjs +0 -33
  278. package/dist/Link/Link.js +0 -87
  279. package/dist/Link/index.cjs +0 -1
  280. package/dist/Link/index.js +0 -4
  281. package/dist/LinkButton/LinkButton.cjs +0 -32
  282. package/dist/LinkButton/LinkButton.js +0 -99
  283. package/dist/LinkButton/index.cjs +0 -1
  284. package/dist/LinkButton/index.js +0 -4
  285. package/dist/LiveRegions/LiveRegions.cjs +0 -1
  286. package/dist/LiveRegions/LiveRegions.js +0 -22
  287. package/dist/LiveRegions/StoryComponent.cjs +0 -1
  288. package/dist/LiveRegions/StoryComponent.js +0 -18
  289. package/dist/LiveRegions/constants.cjs +0 -1
  290. package/dist/LiveRegions/constants.js +0 -8
  291. package/dist/LiveRegions/index.cjs +0 -1
  292. package/dist/LiveRegions/index.js +0 -4
  293. package/dist/LiveRegions/useNotifyAT.cjs +0 -1
  294. package/dist/LiveRegions/useNotifyAT.js +0 -17
  295. package/dist/Loader/Loader.cjs +0 -12
  296. package/dist/Loader/Loader.js +0 -37
  297. package/dist/Loader/assets/loader.cjs +0 -1
  298. package/dist/Loader/assets/loader.js +0 -4
  299. package/dist/Loader/index.cjs +0 -1
  300. package/dist/Loader/index.js +0 -4
  301. package/dist/Main/Main.cjs +0 -6
  302. package/dist/Main/Main.js +0 -26
  303. package/dist/Main/SkipToContent.cjs +0 -12
  304. package/dist/Main/SkipToContent.js +0 -29
  305. package/dist/Main/index.cjs +0 -1
  306. package/dist/Main/index.js +0 -6
  307. package/dist/MainNav/MainNav.cjs +0 -9
  308. package/dist/MainNav/MainNav.js +0 -30
  309. package/dist/MainNav/MainNavContext.cjs +0 -1
  310. package/dist/MainNav/MainNavContext.js +0 -6
  311. package/dist/MainNav/NavBrand.cjs +0 -12
  312. package/dist/MainNav/NavBrand.js +0 -67
  313. package/dist/MainNav/NavCondense.cjs +0 -20
  314. package/dist/MainNav/NavCondense.js +0 -45
  315. package/dist/MainNav/NavLink.cjs +0 -69
  316. package/dist/MainNav/NavLink.js +0 -119
  317. package/dist/MainNav/NavSection.cjs +0 -1
  318. package/dist/MainNav/NavSection.js +0 -49
  319. package/dist/MainNav/NavSections.cjs +0 -1
  320. package/dist/MainNav/NavSections.js +0 -21
  321. package/dist/MainNav/NavUser.cjs +0 -7
  322. package/dist/MainNav/NavUser.js +0 -54
  323. package/dist/MainNav/index.cjs +0 -1
  324. package/dist/MainNav/index.js +0 -16
  325. package/dist/ModalLayout/ModalBody.cjs +0 -4
  326. package/dist/ModalLayout/ModalBody.js +0 -13
  327. package/dist/ModalLayout/ModalContext.cjs +0 -1
  328. package/dist/ModalLayout/ModalContext.js +0 -6
  329. package/dist/ModalLayout/ModalFooter.cjs +0 -8
  330. package/dist/ModalLayout/ModalFooter.js +0 -32
  331. package/dist/ModalLayout/ModalHeader.cjs +0 -4
  332. package/dist/ModalLayout/ModalHeader.js +0 -37
  333. package/dist/ModalLayout/ModalLayout.cjs +0 -12
  334. package/dist/ModalLayout/ModalLayout.js +0 -42
  335. package/dist/ModalLayout/index.cjs +0 -1
  336. package/dist/ModalLayout/index.js +0 -10
  337. package/dist/NumberInput/NumberInput.cjs +0 -12
  338. package/dist/NumberInput/NumberInput.js +0 -179
  339. package/dist/NumberInput/index.cjs +0 -1
  340. package/dist/NumberInput/index.js +0 -4
  341. package/dist/Pagination/Pagination.cjs +0 -5
  342. package/dist/Pagination/Pagination.js +0 -30
  343. package/dist/Pagination/PaginationContext.cjs +0 -1
  344. package/dist/Pagination/PaginationContext.js +0 -6
  345. package/dist/Pagination/assets/next.cjs +0 -1
  346. package/dist/Pagination/assets/next.js +0 -4
  347. package/dist/Pagination/assets/previous.cjs +0 -1
  348. package/dist/Pagination/assets/previous.js +0 -4
  349. package/dist/Pagination/components.cjs +0 -36
  350. package/dist/Pagination/components.js +0 -111
  351. package/dist/Pagination/index.cjs +0 -1
  352. package/dist/Pagination/index.js +0 -9
  353. package/dist/Popover/Popover.cjs +0 -26
  354. package/dist/Popover/Popover.js +0 -122
  355. package/dist/Popover/index.cjs +0 -1
  356. package/dist/Popover/index.js +0 -5
  357. package/dist/Portal/Portal.cjs +0 -1
  358. package/dist/Portal/Portal.js +0 -15
  359. package/dist/Portal/index.cjs +0 -1
  360. package/dist/Portal/index.js +0 -4
  361. package/dist/ProgressBar/ProgressBar.cjs +0 -21
  362. package/dist/ProgressBar/ProgressBar.js +0 -58
  363. package/dist/ProgressBar/index.cjs +0 -1
  364. package/dist/ProgressBar/index.js +0 -4
  365. package/dist/Radio/Radio.cjs +0 -4
  366. package/dist/Radio/Radio.js +0 -24
  367. package/dist/Radio/index.cjs +0 -1
  368. package/dist/Radio/index.js +0 -6
  369. package/dist/RawTable/RawCell.cjs +0 -1
  370. package/dist/RawTable/RawCell.js +0 -80
  371. package/dist/RawTable/RawTable.cjs +0 -1
  372. package/dist/RawTable/RawTable.js +0 -73
  373. package/dist/RawTable/RawTableContext.cjs +0 -1
  374. package/dist/RawTable/RawTableContext.js +0 -12
  375. package/dist/RawTable/RawTbody.cjs +0 -1
  376. package/dist/RawTable/RawTbody.js +0 -16
  377. package/dist/RawTable/RawThead.cjs +0 -1
  378. package/dist/RawTable/RawThead.js +0 -14
  379. package/dist/RawTable/RawTr.cjs +0 -1
  380. package/dist/RawTable/RawTr.js +0 -19
  381. package/dist/RawTable/focusFocusable.cjs +0 -1
  382. package/dist/RawTable/focusFocusable.js +0 -7
  383. package/dist/RawTable/index.cjs +0 -1
  384. package/dist/RawTable/index.js +0 -13
  385. package/dist/Searchbar/SearchForm.cjs +0 -1
  386. package/dist/Searchbar/SearchForm.js +0 -8
  387. package/dist/Searchbar/Searchbar.cjs +0 -29
  388. package/dist/Searchbar/Searchbar.js +0 -79
  389. package/dist/Searchbar/index.cjs +0 -1
  390. package/dist/Searchbar/index.js +0 -6
  391. package/dist/Select/MultiSelectNested.cjs +0 -1
  392. package/dist/Select/MultiSelectNested.js +0 -26
  393. package/dist/Select/OptGroup.cjs +0 -1
  394. package/dist/Select/OptGroup.js +0 -20
  395. package/dist/Select/Option.cjs +0 -49
  396. package/dist/Select/Option.js +0 -104
  397. package/dist/Select/Select.cjs +0 -3
  398. package/dist/Select/Select.js +0 -232
  399. package/dist/Select/SelectButton.cjs +0 -19
  400. package/dist/Select/SelectButton.js +0 -64
  401. package/dist/Select/SelectList.cjs +0 -1
  402. package/dist/Select/SelectList.js +0 -81
  403. package/dist/Select/SelectTags.cjs +0 -8
  404. package/dist/Select/SelectTags.js +0 -36
  405. package/dist/Select/components.cjs +0 -39
  406. package/dist/Select/components.js +0 -48
  407. package/dist/Select/constants.cjs +0 -1
  408. package/dist/Select/constants.js +0 -8
  409. package/dist/Select/hooks/useButtonRef.cjs +0 -1
  410. package/dist/Select/hooks/useButtonRef.js +0 -13
  411. package/dist/Select/hooks/useListRef.cjs +0 -1
  412. package/dist/Select/hooks/useListRef.js +0 -18
  413. package/dist/Select/index.cjs +0 -1
  414. package/dist/Select/index.js +0 -12
  415. package/dist/Select/utils.cjs +0 -1
  416. package/dist/Select/utils.js +0 -17
  417. package/dist/SimpleMenu/SimpleMenu.cjs +0 -19
  418. package/dist/SimpleMenu/SimpleMenu.js +0 -164
  419. package/dist/SimpleMenu/index.cjs +0 -1
  420. package/dist/SimpleMenu/index.js +0 -5
  421. package/dist/SimpleMenu/utils.cjs +0 -12
  422. package/dist/SimpleMenu/utils.js +0 -15
  423. package/dist/Stack/Stack.cjs +0 -19
  424. package/dist/Stack/Stack.js +0 -55
  425. package/dist/Stack/index.cjs +0 -1
  426. package/dist/Stack/index.js +0 -4
  427. package/dist/Status/Status.cjs +0 -11
  428. package/dist/Status/Status.js +0 -46
  429. package/dist/Status/index.cjs +0 -1
  430. package/dist/Status/index.js +0 -4
  431. package/dist/SubNav/SubNav.cjs +0 -10
  432. package/dist/SubNav/SubNav.js +0 -26
  433. package/dist/SubNav/SubNavHeader.cjs +0 -4
  434. package/dist/SubNav/SubNavHeader.js +0 -98
  435. package/dist/SubNav/SubNavLink.cjs +0 -39
  436. package/dist/SubNav/SubNavLink.js +0 -80
  437. package/dist/SubNav/SubNavLinkSection.cjs +0 -19
  438. package/dist/SubNav/SubNavLinkSection.js +0 -68
  439. package/dist/SubNav/SubNavSection.cjs +0 -8
  440. package/dist/SubNav/SubNavSection.js +0 -63
  441. package/dist/SubNav/SubNavSectionLabel.cjs +0 -9
  442. package/dist/SubNav/SubNavSectionLabel.js +0 -53
  443. package/dist/SubNav/SubNavSections.cjs +0 -1
  444. package/dist/SubNav/SubNavSections.js +0 -20
  445. package/dist/SubNav/index.cjs +0 -1
  446. package/dist/SubNav/index.js +0 -15
  447. package/dist/Switch/Switch.cjs +0 -42
  448. package/dist/Switch/Switch.js +0 -80
  449. package/dist/Switch/index.cjs +0 -1
  450. package/dist/Switch/index.js +0 -4
  451. package/dist/Table/Cell.cjs +0 -17
  452. package/dist/Table/Cell.js +0 -39
  453. package/dist/Table/TFooter.cjs +0 -22
  454. package/dist/Table/TFooter.js +0 -50
  455. package/dist/Table/Table.cjs +0 -36
  456. package/dist/Table/Table.js +0 -80
  457. package/dist/Table/Tbody.cjs +0 -5
  458. package/dist/Table/Tbody.js +0 -13
  459. package/dist/Table/Thead.cjs +0 -3
  460. package/dist/Table/Thead.js +0 -11
  461. package/dist/Table/Tr.cjs +0 -20
  462. package/dist/Table/Tr.js +0 -28
  463. package/dist/Table/index.cjs +0 -1
  464. package/dist/Table/index.js +0 -15
  465. package/dist/Tabs/TabGroup.cjs +0 -1
  466. package/dist/Tabs/TabGroup.js +0 -36
  467. package/dist/Tabs/TabPanels.cjs +0 -1
  468. package/dist/Tabs/TabPanels.js +0 -32
  469. package/dist/Tabs/Tabs.cjs +0 -5
  470. package/dist/Tabs/Tabs.js +0 -134
  471. package/dist/Tabs/TabsContext.cjs +0 -1
  472. package/dist/Tabs/TabsContext.js +0 -6
  473. package/dist/Tabs/components.cjs +0 -43
  474. package/dist/Tabs/components.js +0 -52
  475. package/dist/Tabs/index.cjs +0 -1
  476. package/dist/Tabs/index.js +0 -10
  477. package/dist/Tabs/useTabsFocus.cjs +0 -1
  478. package/dist/Tabs/useTabsFocus.js +0 -16
  479. package/dist/Tag/Tag.cjs +0 -14
  480. package/dist/Tag/Tag.js +0 -60
  481. package/dist/Tag/index.cjs +0 -1
  482. package/dist/Tag/index.js +0 -4
  483. package/dist/TextButton/TextButton.cjs +0 -32
  484. package/dist/TextButton/TextButton.js +0 -82
  485. package/dist/TextButton/index.cjs +0 -1
  486. package/dist/TextButton/index.js +0 -4
  487. package/dist/TextInput/TextInput.cjs +0 -1
  488. package/dist/TextInput/TextInput.js +0 -69
  489. package/dist/TextInput/index.cjs +0 -1
  490. package/dist/TextInput/index.js +0 -4
  491. package/dist/Textarea/Textarea.cjs +0 -15
  492. package/dist/Textarea/Textarea.js +0 -74
  493. package/dist/Textarea/TextareaInput.cjs +0 -30
  494. package/dist/Textarea/TextareaInput.js +0 -68
  495. package/dist/Textarea/index.cjs +0 -1
  496. package/dist/Textarea/index.js +0 -4
  497. package/dist/ThemeProvider/ThemeProvider.cjs +0 -173
  498. package/dist/ThemeProvider/ThemeProvider.js +0 -186
  499. package/dist/ThemeProvider/hooks.cjs +0 -1
  500. package/dist/ThemeProvider/hooks.js +0 -5
  501. package/dist/ThemeProvider/index.cjs +0 -1
  502. package/dist/ThemeProvider/index.js +0 -6
  503. package/dist/TimePicker/TimePicker.cjs +0 -12
  504. package/dist/TimePicker/TimePicker.js +0 -104
  505. package/dist/TimePicker/index.cjs +0 -1
  506. package/dist/TimePicker/index.js +0 -4
  507. package/dist/ToggleCheckbox/ToggleCheckbox.cjs +0 -36
  508. package/dist/ToggleCheckbox/ToggleCheckbox.js +0 -119
  509. package/dist/ToggleCheckbox/index.cjs +0 -1
  510. package/dist/ToggleCheckbox/index.js +0 -4
  511. package/dist/ToggleInput/ToggleInput.cjs +0 -6
  512. package/dist/ToggleInput/ToggleInput.js +0 -90
  513. package/dist/ToggleInput/index.cjs +0 -1
  514. package/dist/ToggleInput/index.js +0 -4
  515. package/dist/Tooltip/Tooltip.cjs +0 -6
  516. package/dist/Tooltip/Tooltip.js +0 -60
  517. package/dist/Tooltip/hooks/useTooltipHandlers.cjs +0 -1
  518. package/dist/Tooltip/hooks/useTooltipHandlers.js +0 -22
  519. package/dist/Tooltip/hooks/useTooltipLayout.cjs +0 -1
  520. package/dist/Tooltip/hooks/useTooltipLayout.js +0 -14
  521. package/dist/Tooltip/index.cjs +0 -1
  522. package/dist/Tooltip/index.js +0 -4
  523. package/dist/Tooltip/utils/positionTooltip.cjs +0 -1
  524. package/dist/Tooltip/utils/positionTooltip.js +0 -27
  525. package/dist/Typography/Typography.cjs +0 -10
  526. package/dist/Typography/Typography.js +0 -23
  527. package/dist/Typography/TypographyProps.cjs +0 -1
  528. package/dist/Typography/TypographyProps.js +0 -31
  529. package/dist/Typography/constants.cjs +0 -1
  530. package/dist/Typography/constants.js +0 -11
  531. package/dist/Typography/index.cjs +0 -1
  532. package/dist/Typography/index.js +0 -4
  533. package/dist/Typography/utils.cjs +0 -34
  534. package/dist/Typography/utils.js +0 -59
  535. package/dist/VisuallyHidden/VisuallyHidden.cjs +0 -10
  536. package/dist/VisuallyHidden/VisuallyHidden.js +0 -14
  537. package/dist/VisuallyHidden/index.cjs +0 -1
  538. package/dist/VisuallyHidden/index.js +0 -4
  539. package/dist/helpers/escapeSelector.cjs +0 -1
  540. package/dist/helpers/escapeSelector.js +0 -4
  541. package/dist/helpers/genId.cjs +0 -1
  542. package/dist/helpers/genId.js +0 -5
  543. package/dist/helpers/getDefaultLocale.cjs +0 -1
  544. package/dist/helpers/getDefaultLocale.js +0 -4
  545. package/dist/helpers/getFocusableNodes.cjs +0 -1
  546. package/dist/helpers/getFocusableNodes.js +0 -7
  547. package/dist/helpers/handleResponsiveValues.cjs +0 -5
  548. package/dist/helpers/handleResponsiveValues.js +0 -19
  549. package/dist/helpers/keyboardKeys.cjs +0 -1
  550. package/dist/helpers/keyboardKeys.js +0 -20
  551. package/dist/helpers/setOpacity.cjs +0 -1
  552. package/dist/helpers/setOpacity.js +0 -4
  553. package/dist/helpers/setTabIndexOnFirstItem.cjs +0 -1
  554. package/dist/helpers/setTabIndexOnFirstItem.js +0 -7
  555. package/dist/helpers/useElementOnScreen.cjs +0 -1
  556. package/dist/helpers/useElementOnScreen.js +0 -15
  557. package/dist/helpers/useId.cjs +0 -1
  558. package/dist/helpers/useId.js +0 -6
  559. package/dist/helpers/useIntersection.cjs +0 -1
  560. package/dist/helpers/useIntersection.js +0 -21
  561. package/dist/helpers/useLockScroll.cjs +0 -1
  562. package/dist/helpers/useLockScroll.js +0 -9
  563. package/dist/helpers/usePrevious.cjs +0 -1
  564. package/dist/helpers/usePrevious.js +0 -10
  565. package/dist/helpers/useResizeObserver.cjs +0 -1
  566. package/dist/helpers/useResizeObserver.js +0 -14
  567. package/dist/index.cjs +0 -1
  568. package/dist/index.js +0 -290
  569. package/dist/themes/ColorButton.cjs +0 -3
  570. package/dist/themes/ColorButton.js +0 -25
  571. package/dist/themes/colors.cjs +0 -1
  572. package/dist/themes/colors.js +0 -49
  573. package/dist/themes/common-theme.cjs +0 -1
  574. package/dist/themes/common-theme.js +0 -21
  575. package/dist/themes/darkTheme/dark-colors.cjs +0 -1
  576. package/dist/themes/darkTheme/dark-colors.js +0 -52
  577. package/dist/themes/darkTheme/dark-shadows.cjs +0 -1
  578. package/dist/themes/darkTheme/dark-shadows.js +0 -12
  579. package/dist/themes/darkTheme/index.cjs +0 -1
  580. package/dist/themes/darkTheme/index.js +0 -11
  581. package/dist/themes/extendTheme.cjs +0 -13
  582. package/dist/themes/extendTheme.js +0 -36
  583. package/dist/themes/index.cjs +0 -1
  584. package/dist/themes/index.js +0 -12
  585. package/dist/themes/lightTheme/index.cjs +0 -1
  586. package/dist/themes/lightTheme/index.js +0 -11
  587. package/dist/themes/lightTheme/light-colors.cjs +0 -1
  588. package/dist/themes/lightTheme/light-colors.js +0 -52
  589. package/dist/themes/lightTheme/light-shadows.cjs +0 -1
  590. package/dist/themes/lightTheme/light-shadows.js +0 -12
  591. package/dist/themes/sizes.cjs +0 -1
  592. package/dist/themes/sizes.js +0 -13
  593. package/dist/themes/utils.cjs +0 -41
  594. package/dist/themes/utils.js +0 -46
  595. package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +0 -9
  596. package/dist/v2/Breadcrumbs/Breadcrumbs.js +0 -38
  597. package/dist/v2/Breadcrumbs/Crumb.cjs +0 -1
  598. package/dist/v2/Breadcrumbs/Crumb.js +0 -27
  599. package/dist/v2/Breadcrumbs/CrumbLink.cjs +0 -14
  600. package/dist/v2/Breadcrumbs/CrumbLink.js +0 -31
  601. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +0 -8
  602. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +0 -28
  603. package/dist/v2/Breadcrumbs/Divider.cjs +0 -1
  604. package/dist/v2/Breadcrumbs/Divider.js +0 -15
  605. package/dist/v2/Breadcrumbs/index.cjs +0 -1
  606. package/dist/v2/Breadcrumbs/index.js +0 -10
  607. package/dist/v2/Link/Link.cjs +0 -23
  608. package/dist/v2/Link/Link.js +0 -69
  609. package/dist/v2/Link/index.cjs +0 -1
  610. package/dist/v2/Link/index.js +0 -4
  611. package/dist/v2/LinkButton/LinkButton.cjs +0 -33
  612. package/dist/v2/LinkButton/LinkButton.js +0 -95
  613. package/dist/v2/LinkButton/index.cjs +0 -1
  614. package/dist/v2/LinkButton/index.js +0 -4
  615. package/dist/v2/MainNav/MainNav.cjs +0 -9
  616. package/dist/v2/MainNav/MainNav.js +0 -30
  617. package/dist/v2/MainNav/MainNavContext.cjs +0 -1
  618. package/dist/v2/MainNav/MainNavContext.js +0 -6
  619. package/dist/v2/MainNav/NavBrand.cjs +0 -12
  620. package/dist/v2/MainNav/NavBrand.js +0 -68
  621. package/dist/v2/MainNav/NavCondense.cjs +0 -20
  622. package/dist/v2/MainNav/NavCondense.js +0 -45
  623. package/dist/v2/MainNav/NavLink.cjs +0 -69
  624. package/dist/v2/MainNav/NavLink.js +0 -122
  625. package/dist/v2/MainNav/NavSection.cjs +0 -1
  626. package/dist/v2/MainNav/NavSection.js +0 -49
  627. package/dist/v2/MainNav/NavSections.cjs +0 -1
  628. package/dist/v2/MainNav/NavSections.js +0 -21
  629. package/dist/v2/MainNav/NavUser.cjs +0 -7
  630. package/dist/v2/MainNav/NavUser.js +0 -54
  631. package/dist/v2/MainNav/index.cjs +0 -1
  632. package/dist/v2/MainNav/index.js +0 -16
  633. package/dist/v2/Pagination/Pagination.cjs +0 -5
  634. package/dist/v2/Pagination/Pagination.js +0 -30
  635. package/dist/v2/Pagination/PaginationContext.cjs +0 -1
  636. package/dist/v2/Pagination/PaginationContext.js +0 -6
  637. package/dist/v2/Pagination/assets/next.cjs +0 -1
  638. package/dist/v2/Pagination/assets/next.js +0 -4
  639. package/dist/v2/Pagination/assets/previous.cjs +0 -1
  640. package/dist/v2/Pagination/assets/previous.js +0 -4
  641. package/dist/v2/Pagination/components.cjs +0 -36
  642. package/dist/v2/Pagination/components.js +0 -111
  643. package/dist/v2/Pagination/index.cjs +0 -1
  644. package/dist/v2/Pagination/index.js +0 -9
  645. package/dist/v2/SimpleMenu/SimpleMenu.cjs +0 -19
  646. package/dist/v2/SimpleMenu/SimpleMenu.js +0 -164
  647. package/dist/v2/SimpleMenu/index.cjs +0 -1
  648. package/dist/v2/SimpleMenu/index.js +0 -5
  649. package/dist/v2/SimpleMenu/utils.cjs +0 -12
  650. package/dist/v2/SimpleMenu/utils.js +0 -15
  651. package/dist/v2/SubNav/SubNav.cjs +0 -10
  652. package/dist/v2/SubNav/SubNav.js +0 -26
  653. package/dist/v2/SubNav/SubNavHeader.cjs +0 -4
  654. package/dist/v2/SubNav/SubNavHeader.js +0 -98
  655. package/dist/v2/SubNav/SubNavLink.cjs +0 -39
  656. package/dist/v2/SubNav/SubNavLink.js +0 -83
  657. package/dist/v2/SubNav/SubNavLinkSection.cjs +0 -19
  658. package/dist/v2/SubNav/SubNavLinkSection.js +0 -68
  659. package/dist/v2/SubNav/SubNavSection.cjs +0 -8
  660. package/dist/v2/SubNav/SubNavSection.js +0 -63
  661. package/dist/v2/SubNav/SubNavSectionLabel.cjs +0 -9
  662. package/dist/v2/SubNav/SubNavSectionLabel.js +0 -53
  663. package/dist/v2/SubNav/SubNavSections.cjs +0 -1
  664. package/dist/v2/SubNav/SubNavSections.js +0 -20
  665. package/dist/v2/SubNav/index.cjs +0 -1
  666. package/dist/v2/SubNav/index.js +0 -15
  667. package/dist/v2/index.cjs +0 -1
  668. package/dist/v2/index.js +0 -51
  669. package/vite.config.js +0 -35
@@ -1,179 +0,0 @@
1
- import t, { useState as j, useRef as x } from "react";
2
- import e from "prop-types";
3
- import E from "@strapi/icons/CarretDown";
4
- import H from "styled-components";
5
- import { sizes as M } from "../themes/sizes.js";
6
- import { NumberParser as W, NumberFormatter as X } from "@internationalized/number";
7
- import { Field as Y } from "../Field/Field.js";
8
- import { FieldLabel as G } from "../Field/FieldLabel.js";
9
- import { FieldInput as J } from "../Field/FieldInput.js";
10
- import { FieldHint as Q } from "../Field/FieldHint.js";
11
- import { FieldError as Z } from "../Field/FieldError.js";
12
- import "../Field/FieldContext.js";
13
- import "../Field/FieldAction.js";
14
- import { Stack as C } from "../Stack/Stack.js";
15
- import { Icon as w } from "../Icon/Icon.js";
16
- import { useId as ee } from "../helpers/useId.js";
17
- import { KeyboardKeys as I } from "../helpers/keyboardKeys.js";
18
- import { getDefaultLocale as F } from "../helpers/getDefaultLocale.js";
19
- const A = H.button`
20
- display: flex;
21
- height: 1rem;
22
- align-items: ${({ reverse: i }) => i ? "flex-end" : "flex-start"};
23
- transform: translateY(${({ reverse: i }) => i ? "-2px" : "2px"});
24
- cursor: ${({ disabled: i }) => i ? "not-allowed" : void 0};
25
- svg {
26
- display: block;
27
- height: ${4 / 16}rem;
28
- transform: ${({ reverse: i }) => i ? "rotateX(180deg)" : void 0};
29
- }
30
- `, V = "", g = t.forwardRef(
31
- ({
32
- size: i,
33
- startAction: h,
34
- name: D,
35
- hint: S,
36
- error: k,
37
- label: v,
38
- labelAction: R,
39
- locale: P,
40
- id: O,
41
- onValueChange: s,
42
- value: a,
43
- step: r,
44
- required: $,
45
- disabled: d,
46
- ...q
47
- }, K) => {
48
- const [m, o] = j(a == null ? V : String(a)), L = ee("numberinput", O), T = P || F(), f = x(new W(T)), p = x(new X(F(), { maximumFractionDigits: 20 })), z = (n) => {
49
- const l = n.target.value;
50
- if (f.current.isValidPartialNumber(l)) {
51
- const u = l === "" ? void 0 : f.current.parse(l);
52
- u === void 0 || isNaN(u) ? s(void 0) : s(u), o(n.target.value);
53
- }
54
- }, N = (n) => {
55
- if (m === void 0) {
56
- s(r), o(String(r));
57
- return;
58
- }
59
- if (isNaN(m)) {
60
- const l = f.current.parse(m), c = (isNaN(l) ? 0 : l) + r, b = p.current.format(c);
61
- s(c), o(n ? String(c) : b);
62
- return;
63
- }
64
- s(a + r), o(String(a + r));
65
- }, y = (n) => {
66
- if (m === void 0) {
67
- s(-r), o(String(-r));
68
- return;
69
- }
70
- if (isNaN(m)) {
71
- const l = f.current.parse(m), c = (isNaN(l) ? 0 : l) - r, b = p.current.format(c);
72
- s(c), o(n ? String(c) : b);
73
- return;
74
- }
75
- s(a - r), o(String(a - r));
76
- }, B = (n) => {
77
- if (!d)
78
- switch (n.key) {
79
- case I.DOWN: {
80
- n.preventDefault(), y(!0);
81
- break;
82
- }
83
- case I.UP: {
84
- n.preventDefault(), N(!0);
85
- break;
86
- }
87
- }
88
- }, U = () => {
89
- o(m ?? V);
90
- }, _ = () => {
91
- o(a === void 0 ? void 0 : p.current.format(a));
92
- };
93
- return /* @__PURE__ */ t.createElement(Y, {
94
- name: D,
95
- hint: S,
96
- error: k,
97
- id: L
98
- }, /* @__PURE__ */ t.createElement(C, {
99
- spacing: 1
100
- }, v && /* @__PURE__ */ t.createElement(G, {
101
- required: $,
102
- action: R
103
- }, v), /* @__PURE__ */ t.createElement(J, {
104
- ref: K,
105
- startAction: h,
106
- disabled: d,
107
- type: "text",
108
- inputmode: "decimal",
109
- onChange: z,
110
- onKeyDown: B,
111
- onBlur: _,
112
- onFocus: U,
113
- value: m ?? "",
114
- size: i,
115
- endAction: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(A, {
116
- disabled: d,
117
- "aria-hidden": !0,
118
- reverse: !0,
119
- onClick: () => {
120
- N();
121
- },
122
- tabIndex: -1,
123
- type: "button",
124
- "data-testid": "ArrowUp"
125
- }, /* @__PURE__ */ t.createElement(w, {
126
- as: E,
127
- color: "neutral500"
128
- })), /* @__PURE__ */ t.createElement(A, {
129
- disabled: d,
130
- "aria-hidden": !0,
131
- onClick: () => {
132
- y();
133
- },
134
- tabIndex: -1,
135
- type: "button",
136
- "data-testid": "ArrowDown"
137
- }, /* @__PURE__ */ t.createElement(w, {
138
- as: E,
139
- color: "neutral500"
140
- }))),
141
- ...q
142
- }), /* @__PURE__ */ t.createElement(Q, null), /* @__PURE__ */ t.createElement(Z, null)));
143
- }
144
- );
145
- g.displayName = "NumberInput";
146
- g.defaultProps = {
147
- "aria-label": void 0,
148
- disabled: !1,
149
- error: void 0,
150
- hint: void 0,
151
- id: void 0,
152
- label: void 0,
153
- labelAction: void 0,
154
- required: !1,
155
- size: "M",
156
- startAction: void 0,
157
- step: 1,
158
- value: void 0
159
- };
160
- g.propTypes = {
161
- "aria-label": e.string,
162
- disabled: e.bool,
163
- error: e.string,
164
- hint: e.oneOfType([e.string, e.node, e.arrayOf(e.node)]),
165
- id: e.string,
166
- label: e.string,
167
- labelAction: e.element,
168
- locale: e.string,
169
- name: e.string.isRequired,
170
- onValueChange: e.func.isRequired,
171
- required: e.bool,
172
- size: e.oneOf(Object.keys(M.input)),
173
- startAction: e.element,
174
- step: e.number,
175
- value: e.number
176
- };
177
- export {
178
- g as NumberInput
179
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./NumberInput.cjs");exports.NumberInput=e.NumberInput;
@@ -1,4 +0,0 @@
1
- import { NumberInput as m } from "./NumberInput.js";
2
- export {
3
- m as NumberInput
4
- };
@@ -1,5 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),p=require("styled-components"),f=require("prop-types"),g=require("../Flex/Flex.cjs"),P=require("./PaginationContext.cjs"),n=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=n(r),i=n(p),a=n(f),y=i.default.nav``,m=i.default(g.Flex)`
2
- & > * + * {
3
- margin-left: ${({theme:e})=>e.spaces[1]};
4
- }
5
- `,l=({children:e,label:o,activePage:u,pageCount:s})=>t.default.createElement(P.PaginationContext.Provider,{value:{activePage:u,pageCount:s}},t.default.createElement(y,{"aria-label":o},t.default.createElement(m,{as:"ul"},r.Children.map(e,(c,d)=>t.default.createElement("li",{key:d},c)))));l.defaultProps={label:"pagination"};l.propTypes={activePage:a.default.number.isRequired,children:a.default.node.isRequired,label:a.default.string,pageCount:a.default.number.isRequired};exports.Pagination=l;
@@ -1,30 +0,0 @@
1
- import e, { Children as s } from "react";
2
- import a from "styled-components";
3
- import r from "prop-types";
4
- import { Flex as u } from "../Flex/Flex.js";
5
- import { PaginationContext as c } from "./PaginationContext.js";
6
- const d = a.nav``, g = a(u)`
7
- & > * + * {
8
- margin-left: ${({ theme: t }) => t.spaces[1]};
9
- }
10
- `, i = ({ children: t, label: n, activePage: o, pageCount: l }) => /* @__PURE__ */ e.createElement(c.Provider, {
11
- value: { activePage: o, pageCount: l }
12
- }, /* @__PURE__ */ e.createElement(d, {
13
- "aria-label": n
14
- }, /* @__PURE__ */ e.createElement(g, {
15
- as: "ul"
16
- }, s.map(t, (m, p) => /* @__PURE__ */ e.createElement("li", {
17
- key: p
18
- }, m)))));
19
- i.defaultProps = {
20
- label: "pagination"
21
- };
22
- i.propTypes = {
23
- activePage: r.number.isRequired,
24
- children: r.node.isRequired,
25
- label: r.string,
26
- pageCount: r.number.isRequired
27
- };
28
- export {
29
- i as Pagination
30
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react"),t=e.createContext({activePage:1,pageCount:1}),n=()=>e.useContext(t);exports.PaginationContext=t;exports.usePagination=n;
@@ -1,6 +0,0 @@
1
- import { createContext as t, useContext as e } from "react";
2
- const o = t({ activePage: 1, pageCount: 1 }), a = () => e(o);
3
- export {
4
- o as PaginationContext,
5
- a as usePagination
6
- };
@@ -1 +0,0 @@
1
- "use strict";const M="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0tMC4wMDAxOTU1MDMgMS4xNzVMMy44MTY0NyA1TC0wLjAwMDE5NTUwMyA4LjgyNUwxLjE3NDggMTBMNi4xNzQ4IDVMMS4xNzQ4IDBMLTAuMDAwMTk1NTAzIDEuMTc1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";module.exports=M;
@@ -1,4 +0,0 @@
1
- const M = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0tMC4wMDAxOTU1MDMgMS4xNzVMMy44MTY0NyA1TC0wLjAwMDE5NTUwMyA4LjgyNUwxLjE3NDggMTBMNi4xNzQ4IDVMMS4xNzQ4IDBMLTAuMDAwMTk1NTAzIDEuMTc1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";
2
- export {
3
- M as default
4
- };
@@ -1 +0,0 @@
1
- "use strict";const I="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02LjE3NSA4LjgyNUwyLjM1ODMzIDVMNi4xNzUgMS4xNzVMNSAwTDAgNUw1IDEwTDYuMTc1IDguODI1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";module.exports=I;
@@ -1,4 +0,0 @@
1
- const I = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02LjE3NSA4LjgyNUwyLjM1ODMzIDVMNi4xNzUgMS4xNzVMNSAwTDAgNUw1IDEwTDYuMTc1IDguODI1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";
2
- export {
3
- I as default
4
- };
@@ -1,36 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("react"),L=require("styled-components"),q=require("prop-types"),k=require("@strapi/icons/ChevronLeft"),T=require("@strapi/icons/ChevronRight"),_=require("react-router-dom"),d=require("../VisuallyHidden/VisuallyHidden.cjs"),c=require("./PaginationContext.cjs"),x=require("../Typography/Typography.cjs"),E=require("../themes/utils.cjs"),s=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},a=s(b),l=s(L),i=s(q),R=s(k),$=s(T),g=l.default(x.Typography)`
2
- line-height: revert;
3
- `,C={active:!0},p=l.default(_.NavLink).withConfig({shouldForwardProp:(e,t)=>!C[e]&&t(e)})`
4
- padding: ${({theme:e})=>e.spaces[3]};
5
- border-radius: ${({theme:e})=>e.borderRadius};
6
- box-shadow: ${({active:e,theme:t})=>e?t.shadows.filterShadow:void 0};
7
- text-decoration: none;
8
- display: flex;
9
-
10
- ${E.buttonFocusStyle}
11
- `,w=l.default(p)`
12
- color: ${({theme:e,active:t})=>t?e.colors.primary700:e.colors.neutral800};
13
- background: ${({theme:e,active:t})=>t?e.colors.neutral0:void 0};
14
-
15
- &:hover {
16
- box-shadow: ${({theme:e})=>e.shadows.filterShadow};
17
- }
18
- `,v=l.default(p)`
19
- font-size: 0.7rem;
20
- svg path {
21
- fill: ${e=>e["aria-disabled"]?e.theme.colors.neutral300:e.theme.colors.neutral600};
22
- }
23
-
24
- &:focus,
25
- &:hover {
26
- svg path {
27
- fill: ${e=>e["aria-disabled"]?e.theme.colors.neutral300:e.theme.colors.neutral700};
28
- }
29
- }
30
-
31
- ${e=>e["aria-disabled"]?`
32
- pointer-events: none;
33
- `:void 0}
34
- `,H=l.default(p)`
35
- color: ${({theme:e})=>e.colors.neutral800};
36
- `,f=({children:e,to:t,...n})=>{const{activePage:o}=c.usePagination(),r=o===1;return a.default.createElement(v,{to:r?"#":t,"aria-disabled":r,tabIndex:r?-1:void 0,...n},a.default.createElement(d.VisuallyHidden,null,e),a.default.createElement(R.default,{"aria-hidden":!0}))};f.displayName="PreviousLink";const h=({children:e,to:t,...n})=>{const{activePage:o,pageCount:r}=c.usePagination(),u=o===r;return a.default.createElement(v,{to:u?"#":t,"aria-disabled":u,tabIndex:u?-1:void 0,...n},a.default.createElement(d.VisuallyHidden,null,e),a.default.createElement($.default,{"aria-hidden":!0}))};h.displayName="NextLink";const y=({number:e,children:t,...n})=>{const{activePage:o}=c.usePagination(),r=o===e;return a.default.createElement(w,{...n,active:r},a.default.createElement(d.VisuallyHidden,null,t),a.default.createElement(g,{"aria-hidden":!0,variant:"pi",fontWeight:r?"bold":null},e))};y.displayName="PageLink";const m=({children:e,...t})=>a.default.createElement(H,{...t,as:"div"},a.default.createElement(d.VisuallyHidden,null,e),a.default.createElement(g,{"aria-hidden":!0,variant:"pi"},"\u2026"));y.propTypes={children:i.default.node.isRequired,number:i.default.number.isRequired};const P={children:i.default.node.isRequired,to:i.default.string.isRequired};h.propTypes=P;f.propTypes=P;m.propTypes={children:i.default.node.isRequired};exports.Dots=m;exports.NextLink=h;exports.PageLink=y;exports.PreviousLink=f;
@@ -1,111 +0,0 @@
1
- import t from "react";
2
- import s from "styled-components";
3
- import n from "prop-types";
4
- import b from "@strapi/icons/ChevronLeft";
5
- import y from "@strapi/icons/ChevronRight";
6
- import { NavLink as P } from "react-router-dom";
7
- import { VisuallyHidden as l } from "../VisuallyHidden/VisuallyHidden.js";
8
- import { usePagination as c } from "./PaginationContext.js";
9
- import { Typography as E } from "../Typography/Typography.js";
10
- import { buttonFocusStyle as k } from "../themes/utils.js";
11
- const m = s(E)`
12
- line-height: revert;
13
- `, L = {
14
- active: !0
15
- }, p = s(P).withConfig({
16
- shouldForwardProp: (e, r) => !L[e] && r(e)
17
- })`
18
- padding: ${({ theme: e }) => e.spaces[3]};
19
- border-radius: ${({ theme: e }) => e.borderRadius};
20
- box-shadow: ${({ active: e, theme: r }) => e ? r.shadows.filterShadow : void 0};
21
- text-decoration: none;
22
- display: flex;
23
-
24
- ${k}
25
- `, $ = s(p)`
26
- color: ${({ theme: e, active: r }) => r ? e.colors.primary700 : e.colors.neutral800};
27
- background: ${({ theme: e, active: r }) => r ? e.colors.neutral0 : void 0};
28
-
29
- &:hover {
30
- box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
31
- }
32
- `, u = s(p)`
33
- font-size: 0.7rem;
34
- svg path {
35
- fill: ${(e) => e["aria-disabled"] ? e.theme.colors.neutral300 : e.theme.colors.neutral600};
36
- }
37
-
38
- &:focus,
39
- &:hover {
40
- svg path {
41
- fill: ${(e) => e["aria-disabled"] ? e.theme.colors.neutral300 : e.theme.colors.neutral700};
42
- }
43
- }
44
-
45
- ${(e) => e["aria-disabled"] ? `
46
- pointer-events: none;
47
- ` : void 0}
48
- `, x = s(p)`
49
- color: ${({ theme: e }) => e.colors.neutral800};
50
- `, h = ({ children: e, to: r, ...i }) => {
51
- const { activePage: a } = c(), o = a === 1;
52
- return /* @__PURE__ */ t.createElement(u, {
53
- to: o ? "#" : r,
54
- "aria-disabled": o,
55
- tabIndex: o ? -1 : void 0,
56
- ...i
57
- }, /* @__PURE__ */ t.createElement(l, null, e), /* @__PURE__ */ t.createElement(b, {
58
- "aria-hidden": !0
59
- }));
60
- };
61
- h.displayName = "PreviousLink";
62
- const v = ({ children: e, to: r, ...i }) => {
63
- const { activePage: a, pageCount: o } = c(), d = a === o;
64
- return /* @__PURE__ */ t.createElement(u, {
65
- to: d ? "#" : r,
66
- "aria-disabled": d,
67
- tabIndex: d ? -1 : void 0,
68
- ...i
69
- }, /* @__PURE__ */ t.createElement(l, null, e), /* @__PURE__ */ t.createElement(y, {
70
- "aria-hidden": !0
71
- }));
72
- };
73
- v.displayName = "NextLink";
74
- const f = ({ number: e, children: r, ...i }) => {
75
- const { activePage: a } = c(), o = a === e;
76
- return /* @__PURE__ */ t.createElement($, {
77
- ...i,
78
- active: o
79
- }, /* @__PURE__ */ t.createElement(l, null, r), /* @__PURE__ */ t.createElement(m, {
80
- "aria-hidden": !0,
81
- variant: "pi",
82
- fontWeight: o ? "bold" : null
83
- }, e));
84
- };
85
- f.displayName = "PageLink";
86
- const w = ({ children: e, ...r }) => /* @__PURE__ */ t.createElement(x, {
87
- ...r,
88
- as: "div"
89
- }, /* @__PURE__ */ t.createElement(l, null, e), /* @__PURE__ */ t.createElement(m, {
90
- "aria-hidden": !0,
91
- variant: "pi"
92
- }, "\u2026"));
93
- f.propTypes = {
94
- children: n.node.isRequired,
95
- number: n.number.isRequired
96
- };
97
- const g = {
98
- children: n.node.isRequired,
99
- to: n.string.isRequired
100
- };
101
- v.propTypes = g;
102
- h.propTypes = g;
103
- w.propTypes = {
104
- children: n.node.isRequired
105
- };
106
- export {
107
- w as Dots,
108
- v as NextLink,
109
- f as PageLink,
110
- h as PreviousLink
111
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./Pagination.cjs"),e=require("./components.cjs");exports.Pagination=i.Pagination;exports.Dots=e.Dots;exports.NextLink=e.NextLink;exports.PageLink=e.PageLink;exports.PreviousLink=e.PreviousLink;
@@ -1,9 +0,0 @@
1
- import { Pagination as e } from "./Pagination.js";
2
- import { Dots as r, NextLink as t, PageLink as a, PreviousLink as k } from "./components.js";
3
- export {
4
- r as Dots,
5
- t as NextLink,
6
- a as PageLink,
7
- e as Pagination,
8
- k as PreviousLink
9
- };
@@ -1,26 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const q=require("react"),j=require("prop-types"),S=require("styled-components"),a=require("@floating-ui/react-dom"),u=require("../Box/Box.cjs"),T=require("../Portal/Portal.cjs"),$=require("../helpers/useIntersection.cjs"),b=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function M(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 s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const o=M(q),t=b(j),m=b(S),h=["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"],B=m.default(u.Box)`
2
- box-shadow: ${({theme:e})=>e.shadows.filterShadow};
3
- z-index: 4;
4
- border: 1px solid ${({theme:e})=>e.colors.neutral150};
5
- background: ${({theme:e})=>e.colors.neutral0};
6
- `,W=m.default(u.Box)`
7
- // 16 is base base size, 3 is the factor to get closer to 40px and 5 is the number of elements visible in the list
8
- max-height: ${3*5}rem;
9
- overflow-y: auto;
10
- overflow-x: hidden;
11
-
12
- &::-webkit-scrollbar {
13
- -webkit-appearance: none;
14
- width: 4px;
15
- }
16
-
17
- &::-webkit-scrollbar-track {
18
- background: ${({theme:e})=>e.colors.neutral0};
19
- }
20
-
21
- &::-webkit-scrollbar-thumb {
22
- background: ${({theme:e})=>e.colors.neutral150};
23
- border-radius: ${({theme:e})=>e.borderRadius};
24
- margin-right: 10px;
25
- }
26
- `,c=({source:e,children:n,spacing:r,fullWidth:s,placement:y,onReachEnd:i,intersectionId:l,centered:v,...x})=>{const f=o.useRef(null),[p,w]=o.useState(void 0),{x:E,y:_,reference:O,floating:k,strategy:R}=a.useFloating({strategy:"fixed",placement:v?"bottom":y,middleware:[a.offset({mainAxis:r}),a.shift(),a.flip()],whileElementsMounted:a.autoUpdate});return o.useLayoutEffect(()=>{O(e.current)},[e]),o.useLayoutEffect(()=>{s&&w(e.current.offsetWidth)},[s]),$.useIntersection(f,i,{selectorToWatch:`#${l}`,skipWhen:!l||!i}),o.createElement(B,{ref:k,style:{left:E,top:_,position:R,width:p||void 0},hasRadius:!0,background:"neutral0",padding:1},o.createElement(W,{ref:f,...x},n,l&&i&&o.createElement(u.Box,{id:l,width:"100%",height:"1px"})))},d=e=>o.createElement(T.Portal,null,o.createElement(c,{...e})),g={fullWidth:!1,intersectionId:void 0,onReachEnd:void 0,centered:!1,placement:"bottom-start"},P={centered:t.default.bool,children:t.default.node.isRequired,fullWidth:t.default.bool,intersectionId:t.default.string,onReachEnd:t.default.func,placement:t.default.oneOf(h),source:t.default.shape({current:(typeof Element>"u"?t.default.any:t.default.instanceOf(Element)).isRequired}).isRequired,spacing:t.default.number};c.propTypes=P;c.defaultProps=g;d.propTypes=P;d.defaultProps=g;exports.POPOVER_PLACEMENTS=h;exports.Popover=d;
@@ -1,122 +0,0 @@
1
- import * as o from "react";
2
- import t from "prop-types";
3
- import d from "styled-components";
4
- import { useFloating as R, offset as $, shift as W, flip as T, autoUpdate as O } from "@floating-ui/react-dom";
5
- import { Box as s } from "../Box/Box.js";
6
- import { Portal as S } from "../Portal/Portal.js";
7
- import { useIntersection as q } from "../helpers/useIntersection.js";
8
- const L = [
9
- "top",
10
- "top-start",
11
- "top-end",
12
- "right",
13
- "right-start",
14
- "right-end",
15
- "bottom",
16
- "bottom-start",
17
- "bottom-end",
18
- "left",
19
- "left-start",
20
- "left-end"
21
- ], z = d(s)`
22
- box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
23
- z-index: 4;
24
- border: 1px solid ${({ theme: e }) => e.colors.neutral150};
25
- background: ${({ theme: e }) => e.colors.neutral0};
26
- `, A = d(s)`
27
- // 16 is base base size, 3 is the factor to get closer to 40px and 5 is the number of elements visible in the list
28
- max-height: ${3 * 5}rem;
29
- overflow-y: auto;
30
- overflow-x: hidden;
31
-
32
- &::-webkit-scrollbar {
33
- -webkit-appearance: none;
34
- width: 4px;
35
- }
36
-
37
- &::-webkit-scrollbar-track {
38
- background: ${({ theme: e }) => e.colors.neutral0};
39
- }
40
-
41
- &::-webkit-scrollbar-thumb {
42
- background: ${({ theme: e }) => e.colors.neutral150};
43
- border-radius: ${({ theme: e }) => e.borderRadius};
44
- margin-right: 10px;
45
- }
46
- `, a = ({
47
- source: e,
48
- children: m,
49
- spacing: h,
50
- fullWidth: i,
51
- placement: b,
52
- onReachEnd: n,
53
- intersectionId: r,
54
- centered: g,
55
- ...w
56
- }) => {
57
- const l = o.useRef(null), [p, v] = o.useState(void 0), { x, y, reference: E, floating: P, strategy: k } = R({
58
- strategy: "fixed",
59
- placement: g ? "bottom" : b,
60
- middleware: [
61
- $({
62
- mainAxis: h
63
- }),
64
- W(),
65
- T()
66
- ],
67
- whileElementsMounted: O
68
- });
69
- return o.useLayoutEffect(() => {
70
- E(e.current);
71
- }, [e]), o.useLayoutEffect(() => {
72
- i && v(e.current.offsetWidth);
73
- }, [i]), q(l, n, {
74
- selectorToWatch: `#${r}`,
75
- skipWhen: !r || !n
76
- }), /* @__PURE__ */ o.createElement(z, {
77
- ref: P,
78
- style: {
79
- left: x,
80
- top: y,
81
- position: k,
82
- width: p || void 0
83
- },
84
- hasRadius: !0,
85
- background: "neutral0",
86
- padding: 1
87
- }, /* @__PURE__ */ o.createElement(A, {
88
- ref: l,
89
- ...w
90
- }, m, r && n && /* @__PURE__ */ o.createElement(s, {
91
- id: r,
92
- width: "100%",
93
- height: "1px"
94
- })));
95
- }, c = (e) => /* @__PURE__ */ o.createElement(S, null, /* @__PURE__ */ o.createElement(a, {
96
- ...e
97
- })), f = {
98
- fullWidth: !1,
99
- intersectionId: void 0,
100
- onReachEnd: void 0,
101
- centered: !1,
102
- placement: "bottom-start"
103
- }, u = {
104
- centered: t.bool,
105
- children: t.node.isRequired,
106
- fullWidth: t.bool,
107
- intersectionId: t.string,
108
- onReachEnd: t.func,
109
- placement: t.oneOf(L),
110
- source: t.shape({
111
- current: (typeof Element > "u" ? t.any : t.instanceOf(Element)).isRequired
112
- }).isRequired,
113
- spacing: t.number
114
- };
115
- a.propTypes = u;
116
- a.defaultProps = f;
117
- c.propTypes = u;
118
- c.defaultProps = f;
119
- export {
120
- L as POPOVER_PLACEMENTS,
121
- c as Popover
122
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Popover.cjs");exports.POPOVER_PLACEMENTS=e.POPOVER_PLACEMENTS;exports.Popover=e.Popover;
@@ -1,5 +0,0 @@
1
- import { POPOVER_PLACEMENTS as r, Popover as E } from "./Popover.js";
2
- export {
3
- r as POPOVER_PLACEMENTS,
4
- E as Popover
5
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),c=require("react-dom"),a=require("prop-types"),s=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=s(a),u=({children:e})=>{const t=r.useRef(null),[o,n]=r.useState(!1);return r.useLayoutEffect(()=>(t.current=document.createElement("div"),t.current.setAttribute("data-react-portal","true"),document.body.appendChild(t.current),n(!0),()=>{t.current?.remove()}),[]),!o||!t.current?null:c.createPortal(e,t.current)};u.propTypes={children:l.default.node.isRequired};exports.Portal=u;
@@ -1,15 +0,0 @@
1
- import { useRef as u, useState as n, useLayoutEffect as c } from "react";
2
- import { createPortal as a } from "react-dom";
3
- import d from "prop-types";
4
- const p = ({ children: r }) => {
5
- const e = u(null), [t, o] = n(!1);
6
- return c(() => (e.current = document.createElement("div"), e.current.setAttribute("data-react-portal", "true"), document.body.appendChild(e.current), o(!0), () => {
7
- e.current?.remove();
8
- }), []), !t || !e.current ? null : a(r, e.current);
9
- };
10
- p.propTypes = {
11
- children: d.node.isRequired
12
- };
13
- export {
14
- p as Portal
15
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Portal.cjs");exports.Portal=e.Portal;
@@ -1,4 +0,0 @@
1
- import { Portal as t } from "./Portal.js";
2
- export {
3
- t as Portal
4
- };
@@ -1,21 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react"),b=require("prop-types"),m=require("styled-components"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},d=a(f),r=a(b),i=a(m),n=i.default.div`
2
- background: ${({theme:e})=>e.colors.neutral600};
3
- border-radius: ${({theme:e})=>e.borderRadius};
4
- position: relative;
5
-
6
- width: 78px;
7
- height: ${({theme:e})=>e.spaces[1]};
8
-
9
- &:before {
10
- content: '';
11
- position: absolute;
12
- top: 0;
13
- bottom: 0;
14
- border-radius: ${({theme:e})=>e.borderRadius};
15
- width: ${({value:e})=>`${e}%`};
16
- background: ${({theme:e})=>e.colors.neutral150};
17
- }
18
- `,g=i.default(n)`
19
- width: 102px;
20
- height: ${({theme:e})=>e.spaces[2]};
21
- `,o=({min:e,max:c,value:t,children:s,size:p,...u})=>{const l={role:"progressbar","aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":c};return p==="M"?d.default.createElement(g,{...l,value:t,"aria-label":s,...u}):d.default.createElement(n,{...l,value:t,"aria-label":s,...u})};o.defaultProps={min:0,max:100,value:0,size:"M"};o.propTypes={children:r.default.node.isRequired,max:r.default.number,min:r.default.number,size:r.default.oneOf(["S","M"]),value:r.default.number};exports.ProgressBar=o;