@strapi/design-system 1.19.0-typescript.0 → 2.0.0-beta.0

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 (780) hide show
  1. package/README.md +2 -2
  2. package/dist/Accordion/AccordionContext.d.ts +2 -1
  3. package/dist/BaseLink/BaseLink.d.ts +1 -1
  4. package/dist/BaseRadio/BaseRadio.d.ts +1 -1
  5. package/dist/BaseRadio/RadioGroup.d.ts +4 -4
  6. package/dist/BaseRadio/context.d.ts +3 -3
  7. package/dist/Breadcrumbs/Breadcrumbs.d.ts +2 -11
  8. package/dist/{v2/Breadcrumbs → Breadcrumbs}/Crumb.d.ts +1 -1
  9. package/dist/{v2/Breadcrumbs → Breadcrumbs}/CrumbLink.d.ts +1 -1
  10. package/dist/{v2/Breadcrumbs → Breadcrumbs}/CrumbSimpleMenu.d.ts +2 -2
  11. package/dist/Breadcrumbs/index.d.ts +3 -0
  12. package/dist/Button/Button.d.ts +1 -1
  13. package/dist/Card/CardAction.d.ts +53 -6
  14. package/dist/Card/CardContext.d.ts +2 -1
  15. package/dist/CarouselInput/CarouselInput.d.ts +2 -1
  16. package/dist/Dialog/DialogBody.d.ts +1 -1
  17. package/dist/Dialog/DialogFooter.d.ts +1 -1
  18. package/dist/Field/Field.d.ts +4 -4
  19. package/dist/Field/FieldAction.d.ts +3 -3
  20. package/dist/Field/FieldContext.d.ts +3 -3
  21. package/dist/Field/FieldInput.d.ts +7 -7
  22. package/dist/Field/FieldLabel.d.ts +3 -3
  23. package/dist/FocusTrap/FocusTrap.d.ts +2 -2
  24. package/dist/Icon/Icon.d.ts +1 -1
  25. package/dist/JSONInput/JSONInput.d.ts +1 -1
  26. package/dist/Layout/HeaderLayout.d.ts +1 -1
  27. package/dist/Link/Link.d.ts +7 -15
  28. package/dist/LinkButton/LinkButton.d.ts +52 -14
  29. package/dist/MainNav/MainNav.d.ts +1 -1
  30. package/dist/MainNav/MainNavContext.d.ts +2 -1
  31. package/dist/MainNav/NavBrand.d.ts +5 -4
  32. package/dist/MainNav/NavCondense.d.ts +4 -4
  33. package/dist/MainNav/NavFooter.d.ts +1 -1
  34. package/dist/MainNav/NavLink.d.ts +7 -7
  35. package/dist/MainNav/NavSection.d.ts +5 -7
  36. package/dist/MainNav/NavSections.d.ts +4 -6
  37. package/dist/MainNav/NavUser.d.ts +4 -3
  38. package/dist/ModalLayout/ModalContext.d.ts +2 -1
  39. package/dist/NumberInput/NumberInput.d.ts +1 -1
  40. package/dist/Pagination/PaginationContext.d.ts +2 -1
  41. package/dist/Pagination/components.d.ts +6 -16
  42. package/dist/RawTable/RawCell.d.ts +2 -2
  43. package/dist/RawTable/RawTable.d.ts +2 -2
  44. package/dist/RawTable/RawTableContext.d.ts +2 -1
  45. package/dist/RawTable/RawTbody.d.ts +3 -3
  46. package/dist/RawTable/RawThead.d.ts +3 -3
  47. package/dist/Searchbar/Searchbar.d.ts +2 -2
  48. package/dist/Select/index.d.ts +0 -11
  49. package/dist/{v2/SimpleMenu → SimpleMenu}/Menu.d.ts +15 -15
  50. package/dist/SimpleMenu/SimpleMenu.d.ts +56 -29
  51. package/dist/Status/Status.d.ts +1 -1
  52. package/dist/SubNav/SubNav.d.ts +1 -1
  53. package/dist/SubNav/SubNavHeader.d.ts +7 -7
  54. package/dist/SubNav/SubNavLink.d.ts +6 -5
  55. package/dist/SubNav/SubNavLinkSection.d.ts +2 -2
  56. package/dist/SubNav/SubNavSection.d.ts +3 -3
  57. package/dist/SubNav/SubNavSectionLabel.d.ts +4 -3
  58. package/dist/SubNav/SubNavSections.d.ts +4 -6
  59. package/dist/Switch/Switch.d.ts +1 -1
  60. package/dist/Table/Cell.d.ts +1 -1
  61. package/dist/Table/TFooter.d.ts +1 -1
  62. package/dist/Table/Table.d.ts +1 -1
  63. package/dist/Tabs/TabPanels.d.ts +1 -1
  64. package/dist/Tabs/Tabs.d.ts +1 -1
  65. package/dist/Tabs/TabsContext.d.ts +2 -1
  66. package/dist/Tag/Tag.d.ts +1 -0
  67. package/dist/TextInput/TextInput.d.ts +4 -4
  68. package/dist/Textarea/Textarea.d.ts +1 -1
  69. package/dist/Tooltip/hooks/useTooltipLayout.d.ts +3 -2
  70. package/dist/helpers/handleResponsiveValues.d.ts +2 -2
  71. package/dist/hooks/useElementOnScreen.d.ts +1 -0
  72. package/dist/hooks/useIntersection.d.ts +2 -2
  73. package/dist/hooks/useResizeObserver.d.ts +2 -2
  74. package/dist/index.d.ts +0 -2
  75. package/dist/index.js +24566 -333
  76. package/dist/index.js.map +1 -0
  77. package/dist/index.mjs +24538 -144
  78. package/dist/index.mjs.map +1 -0
  79. package/dist/types.d.ts +2 -2
  80. package/package.json +8 -30
  81. package/dist/Accordion/Accordion.js +0 -83
  82. package/dist/Accordion/Accordion.mjs +0 -55
  83. package/dist/Accordion/AccordionContent.js +0 -20
  84. package/dist/Accordion/AccordionContent.mjs +0 -16
  85. package/dist/Accordion/AccordionContext.js +0 -17
  86. package/dist/Accordion/AccordionContext.mjs +0 -12
  87. package/dist/Accordion/AccordionGroup.js +0 -92
  88. package/dist/Accordion/AccordionGroup.mjs +0 -65
  89. package/dist/Accordion/AccordionToggle.js +0 -90
  90. package/dist/Accordion/AccordionToggle.mjs +0 -82
  91. package/dist/Accordion/index.js +0 -16
  92. package/dist/Accordion/index.mjs +0 -4
  93. package/dist/Accordion/utils.js +0 -19
  94. package/dist/Accordion/utils.mjs +0 -15
  95. package/dist/Alert/Alert.js +0 -62
  96. package/dist/Alert/Alert.mjs +0 -54
  97. package/dist/Alert/index.js +0 -9
  98. package/dist/Alert/index.mjs +0 -1
  99. package/dist/Alert/utils.js +0 -36
  100. package/dist/Alert/utils.mjs +0 -30
  101. package/dist/Avatar/Avatar.js +0 -69
  102. package/dist/Avatar/Avatar.mjs +0 -41
  103. package/dist/Avatar/AvatarGroup.js +0 -19
  104. package/dist/Avatar/AvatarGroup.mjs +0 -11
  105. package/dist/Avatar/__tests__/Avatar.spec.d.ts +0 -1
  106. package/dist/Avatar/constants.js +0 -9
  107. package/dist/Avatar/constants.mjs +0 -4
  108. package/dist/Avatar/index.js +0 -12
  109. package/dist/Avatar/index.mjs +0 -2
  110. package/dist/Badge/Badge.js +0 -23
  111. package/dist/Badge/Badge.mjs +0 -15
  112. package/dist/Badge/index.js +0 -9
  113. package/dist/Badge/index.mjs +0 -1
  114. package/dist/BaseButton/BaseButton.js +0 -57
  115. package/dist/BaseButton/BaseButton.mjs +0 -29
  116. package/dist/BaseButton/index.js +0 -10
  117. package/dist/BaseButton/index.mjs +0 -1
  118. package/dist/BaseCheckbox/BaseCheckbox.js +0 -119
  119. package/dist/BaseCheckbox/BaseCheckbox.mjs +0 -92
  120. package/dist/BaseCheckbox/assets/checkmark-black.svg.js +0 -5
  121. package/dist/BaseCheckbox/assets/checkmark-black.svg.mjs +0 -3
  122. package/dist/BaseCheckbox/assets/checkmark.svg.js +0 -5
  123. package/dist/BaseCheckbox/assets/checkmark.svg.mjs +0 -3
  124. package/dist/BaseCheckbox/index.js +0 -9
  125. package/dist/BaseCheckbox/index.mjs +0 -1
  126. package/dist/BaseCheckbox/utils.js +0 -16
  127. package/dist/BaseCheckbox/utils.mjs +0 -12
  128. package/dist/BaseLink/BaseLink.js +0 -18
  129. package/dist/BaseLink/BaseLink.mjs +0 -10
  130. package/dist/BaseLink/__tests__/BaseLink.spec.d.ts +0 -1
  131. package/dist/BaseLink/index.js +0 -9
  132. package/dist/BaseLink/index.mjs +0 -1
  133. package/dist/BaseRadio/BaseRadio.js +0 -58
  134. package/dist/BaseRadio/BaseRadio.mjs +0 -49
  135. package/dist/BaseRadio/RadioGroup.js +0 -21
  136. package/dist/BaseRadio/RadioGroup.mjs +0 -17
  137. package/dist/BaseRadio/context.js +0 -14
  138. package/dist/BaseRadio/context.mjs +0 -10
  139. package/dist/BaseRadio/index.js +0 -11
  140. package/dist/BaseRadio/index.mjs +0 -2
  141. package/dist/BaseRadio/utils.js +0 -34
  142. package/dist/BaseRadio/utils.mjs +0 -28
  143. package/dist/Box/Box.js +0 -111
  144. package/dist/Box/Box.mjs +0 -103
  145. package/dist/Box/__tests__/Box.spec.d.ts +0 -1
  146. package/dist/Box/index.js +0 -9
  147. package/dist/Box/index.mjs +0 -1
  148. package/dist/Breadcrumbs/Breadcrumbs.js +0 -41
  149. package/dist/Breadcrumbs/Breadcrumbs.mjs +0 -32
  150. package/dist/Breadcrumbs/index.js +0 -10
  151. package/dist/Breadcrumbs/index.mjs +0 -1
  152. package/dist/Button/Button.js +0 -71
  153. package/dist/Button/Button.mjs +0 -61
  154. package/dist/Button/__tests__/utils.spec.d.ts +0 -1
  155. package/dist/Button/constants.js +0 -27
  156. package/dist/Button/constants.mjs +0 -13
  157. package/dist/Button/index.js +0 -10
  158. package/dist/Button/index.mjs +0 -1
  159. package/dist/Button/utils.js +0 -161
  160. package/dist/Button/utils.mjs +0 -153
  161. package/dist/Card/Card.js +0 -17
  162. package/dist/Card/Card.mjs +0 -13
  163. package/dist/Card/CardAction.js +0 -34
  164. package/dist/Card/CardAction.mjs +0 -26
  165. package/dist/Card/CardAsset.js +0 -41
  166. package/dist/Card/CardAsset.mjs +0 -33
  167. package/dist/Card/CardBadge.js +0 -22
  168. package/dist/Card/CardBadge.mjs +0 -14
  169. package/dist/Card/CardBody.js +0 -13
  170. package/dist/Card/CardBody.mjs +0 -9
  171. package/dist/Card/CardCheckbox.js +0 -17
  172. package/dist/Card/CardCheckbox.mjs +0 -13
  173. package/dist/Card/CardContent.js +0 -20
  174. package/dist/Card/CardContent.mjs +0 -12
  175. package/dist/Card/CardContext.js +0 -11
  176. package/dist/Card/CardContext.mjs +0 -6
  177. package/dist/Card/CardHeader.js +0 -20
  178. package/dist/Card/CardHeader.mjs +0 -12
  179. package/dist/Card/CardTimer.js +0 -11
  180. package/dist/Card/CardTimer.mjs +0 -7
  181. package/dist/Card/CardTitle.js +0 -18
  182. package/dist/Card/CardTitle.mjs +0 -13
  183. package/dist/Card/index.js +0 -28
  184. package/dist/Card/index.mjs +0 -10
  185. package/dist/CarouselInput/Carousel.js +0 -81
  186. package/dist/CarouselInput/Carousel.mjs +0 -54
  187. package/dist/CarouselInput/CarouselActions.js +0 -10
  188. package/dist/CarouselInput/CarouselActions.mjs +0 -6
  189. package/dist/CarouselInput/CarouselImage.js +0 -30
  190. package/dist/CarouselInput/CarouselImage.mjs +0 -22
  191. package/dist/CarouselInput/CarouselInput.js +0 -20
  192. package/dist/CarouselInput/CarouselInput.mjs +0 -16
  193. package/dist/CarouselInput/CarouselSlide.js +0 -10
  194. package/dist/CarouselInput/CarouselSlide.mjs +0 -6
  195. package/dist/CarouselInput/index.js +0 -17
  196. package/dist/CarouselInput/index.mjs +0 -5
  197. package/dist/Checkbox/Checkbox.js +0 -64
  198. package/dist/Checkbox/Checkbox.mjs +0 -37
  199. package/dist/Checkbox/index.js +0 -9
  200. package/dist/Checkbox/index.mjs +0 -1
  201. package/dist/Combobox/Combobox.js +0 -249
  202. package/dist/Combobox/Combobox.mjs +0 -218
  203. package/dist/Combobox/ComboboxList.js +0 -18
  204. package/dist/Combobox/ComboboxList.mjs +0 -14
  205. package/dist/Combobox/ComboboxOption.js +0 -9
  206. package/dist/Combobox/ComboboxOption.mjs +0 -5
  207. package/dist/Combobox/__tests__/Combobox.spec.d.ts +0 -1
  208. package/dist/Combobox/index.js +0 -12
  209. package/dist/Combobox/index.mjs +0 -2
  210. package/dist/DatePicker/DatePicker.js +0 -755
  211. package/dist/DatePicker/DatePicker.mjs +0 -727
  212. package/dist/DatePicker/__tests__/DatePicker.spec.d.ts +0 -1
  213. package/dist/DatePicker/index.js +0 -9
  214. package/dist/DatePicker/index.mjs +0 -1
  215. package/dist/DateTimePicker/DateTimePicker.js +0 -165
  216. package/dist/DateTimePicker/DateTimePicker.mjs +0 -137
  217. package/dist/DateTimePicker/__tests__/DateTimePicker.spec.d.ts +0 -1
  218. package/dist/DateTimePicker/index.js +0 -10
  219. package/dist/DateTimePicker/index.mjs +0 -1
  220. package/dist/DesignSystemProvider.js +0 -27
  221. package/dist/DesignSystemProvider.mjs +0 -22
  222. package/dist/Dialog/Dialog.js +0 -44
  223. package/dist/Dialog/Dialog.mjs +0 -36
  224. package/dist/Dialog/DialogBody.js +0 -28
  225. package/dist/Dialog/DialogBody.mjs +0 -20
  226. package/dist/Dialog/DialogFooter.js +0 -27
  227. package/dist/Dialog/DialogFooter.mjs +0 -19
  228. package/dist/Dialog/__tests__/Dialog.spec.d.ts +0 -1
  229. package/dist/Dialog/index.js +0 -13
  230. package/dist/Dialog/index.mjs +0 -3
  231. package/dist/DismissibleLayer/index.js +0 -29
  232. package/dist/DismissibleLayer/index.mjs +0 -5
  233. package/dist/Divider/Divider.js +0 -24
  234. package/dist/Divider/Divider.mjs +0 -16
  235. package/dist/Divider/index.js +0 -9
  236. package/dist/Divider/index.mjs +0 -1
  237. package/dist/EmptyStateLayout/EmptyStateLayout.js +0 -24
  238. package/dist/EmptyStateLayout/EmptyStateLayout.mjs +0 -16
  239. package/dist/EmptyStateLayout/index.js +0 -9
  240. package/dist/EmptyStateLayout/index.mjs +0 -1
  241. package/dist/EmptyStateLayout/story-assets/Illo.js +0 -9
  242. package/dist/EmptyStateLayout/story-assets/Illo.mjs +0 -5
  243. package/dist/Field/Field.js +0 -17
  244. package/dist/Field/Field.mjs +0 -13
  245. package/dist/Field/FieldAction.js +0 -24
  246. package/dist/Field/FieldAction.mjs +0 -16
  247. package/dist/Field/FieldContext.js +0 -11
  248. package/dist/Field/FieldContext.mjs +0 -6
  249. package/dist/Field/FieldError.js +0 -17
  250. package/dist/Field/FieldError.mjs +0 -13
  251. package/dist/Field/FieldHint.js +0 -17
  252. package/dist/Field/FieldHint.mjs +0 -13
  253. package/dist/Field/FieldInput.js +0 -85
  254. package/dist/Field/FieldInput.mjs +0 -76
  255. package/dist/Field/FieldLabel.js +0 -48
  256. package/dist/Field/FieldLabel.mjs +0 -40
  257. package/dist/Field/__tests__/Field.spec.d.ts +0 -1
  258. package/dist/Field/index.js +0 -23
  259. package/dist/Field/index.mjs +0 -7
  260. package/dist/Flex/Flex.js +0 -31
  261. package/dist/Flex/Flex.mjs +0 -23
  262. package/dist/Flex/index.js +0 -9
  263. package/dist/Flex/index.mjs +0 -1
  264. package/dist/FocusTrap/FocusTrap.js +0 -69
  265. package/dist/FocusTrap/FocusTrap.mjs +0 -65
  266. package/dist/FocusTrap/index.js +0 -9
  267. package/dist/FocusTrap/index.mjs +0 -1
  268. package/dist/Grid/Grid.js +0 -24
  269. package/dist/Grid/Grid.mjs +0 -16
  270. package/dist/Grid/GridItem.js +0 -25
  271. package/dist/Grid/GridItem.mjs +0 -17
  272. package/dist/Grid/index.js +0 -11
  273. package/dist/Grid/index.mjs +0 -2
  274. package/dist/Icon/Icon.js +0 -27
  275. package/dist/Icon/Icon.mjs +0 -18
  276. package/dist/Icon/index.js +0 -9
  277. package/dist/Icon/index.mjs +0 -1
  278. package/dist/IconButton/IconButton.js +0 -155
  279. package/dist/IconButton/IconButton.mjs +0 -127
  280. package/dist/IconButton/index.js +0 -10
  281. package/dist/IconButton/index.mjs +0 -1
  282. package/dist/JSONInput/JSONInput.js +0 -150
  283. package/dist/JSONInput/JSONInput.mjs +0 -142
  284. package/dist/JSONInput/__tests__/JSONInput.spec.d.ts +0 -1
  285. package/dist/JSONInput/index.js +0 -9
  286. package/dist/JSONInput/index.mjs +0 -1
  287. package/dist/JSONInput/utils/decorationExtension.js +0 -43
  288. package/dist/JSONInput/utils/decorationExtension.mjs +0 -36
  289. package/dist/KeyboardNavigable/KeyboardNavigable.js +0 -75
  290. package/dist/KeyboardNavigable/KeyboardNavigable.mjs +0 -71
  291. package/dist/KeyboardNavigable/index.js +0 -9
  292. package/dist/KeyboardNavigable/index.mjs +0 -1
  293. package/dist/Layout/ActionLayout.js +0 -15
  294. package/dist/Layout/ActionLayout.mjs +0 -11
  295. package/dist/Layout/ContentLayout.js +0 -12
  296. package/dist/Layout/ContentLayout.mjs +0 -8
  297. package/dist/Layout/GridLayout.js +0 -17
  298. package/dist/Layout/GridLayout.mjs +0 -9
  299. package/dist/Layout/HeaderLayout.js +0 -53
  300. package/dist/Layout/HeaderLayout.mjs +0 -43
  301. package/dist/Layout/Layout.js +0 -24
  302. package/dist/Layout/Layout.mjs +0 -16
  303. package/dist/Layout/TwoColsLayout.js +0 -14
  304. package/dist/Layout/TwoColsLayout.mjs +0 -10
  305. package/dist/Layout/index.js +0 -20
  306. package/dist/Layout/index.mjs +0 -6
  307. package/dist/Link/Link.js +0 -77
  308. package/dist/Link/Link.mjs +0 -50
  309. package/dist/Link/index.js +0 -9
  310. package/dist/Link/index.mjs +0 -1
  311. package/dist/LinkButton/LinkButton.js +0 -60
  312. package/dist/LinkButton/LinkButton.mjs +0 -33
  313. package/dist/LinkButton/index.js +0 -9
  314. package/dist/LinkButton/index.mjs +0 -1
  315. package/dist/LiveRegions/LiveRegions.js +0 -13
  316. package/dist/LiveRegions/LiveRegions.mjs +0 -9
  317. package/dist/LiveRegions/__tests__/LiveRegions.spec.d.ts +0 -1
  318. package/dist/LiveRegions/constants.js +0 -11
  319. package/dist/LiveRegions/constants.mjs +0 -7
  320. package/dist/LiveRegions/index.js +0 -11
  321. package/dist/LiveRegions/index.mjs +0 -2
  322. package/dist/LiveRegions/useNotifyAT.js +0 -37
  323. package/dist/LiveRegions/useNotifyAT.mjs +0 -33
  324. package/dist/Loader/Loader.js +0 -51
  325. package/dist/Loader/Loader.mjs +0 -24
  326. package/dist/Loader/assets/loader.svg.js +0 -5
  327. package/dist/Loader/assets/loader.svg.mjs +0 -3
  328. package/dist/Loader/index.js +0 -9
  329. package/dist/Loader/index.mjs +0 -1
  330. package/dist/Main/Main.js +0 -23
  331. package/dist/Main/Main.mjs +0 -15
  332. package/dist/Main/SkipToContent.js +0 -25
  333. package/dist/Main/SkipToContent.mjs +0 -17
  334. package/dist/Main/index.js +0 -11
  335. package/dist/Main/index.mjs +0 -2
  336. package/dist/MainNav/MainNav.js +0 -22
  337. package/dist/MainNav/MainNav.mjs +0 -14
  338. package/dist/MainNav/MainNavContext.js +0 -11
  339. package/dist/MainNav/MainNavContext.mjs +0 -6
  340. package/dist/MainNav/NavBrand.js +0 -39
  341. package/dist/MainNav/NavBrand.mjs +0 -31
  342. package/dist/MainNav/NavCondense.js +0 -41
  343. package/dist/MainNav/NavCondense.mjs +0 -33
  344. package/dist/MainNav/NavFooter.js +0 -12
  345. package/dist/MainNav/NavFooter.mjs +0 -8
  346. package/dist/MainNav/NavLink.js +0 -100
  347. package/dist/MainNav/NavLink.mjs +0 -92
  348. package/dist/MainNav/NavSection.js +0 -32
  349. package/dist/MainNav/NavSection.mjs +0 -24
  350. package/dist/MainNav/NavSections.js +0 -27
  351. package/dist/MainNav/NavSections.mjs +0 -18
  352. package/dist/MainNav/NavUser.js +0 -28
  353. package/dist/MainNav/NavUser.mjs +0 -19
  354. package/dist/MainNav/index.js +0 -23
  355. package/dist/MainNav/index.mjs +0 -8
  356. package/dist/ModalLayout/ModalBody.js +0 -21
  357. package/dist/ModalLayout/ModalBody.mjs +0 -13
  358. package/dist/ModalLayout/ModalContext.js +0 -11
  359. package/dist/ModalLayout/ModalContext.mjs +0 -6
  360. package/dist/ModalLayout/ModalFooter.js +0 -22
  361. package/dist/ModalLayout/ModalFooter.mjs +0 -14
  362. package/dist/ModalLayout/ModalHeader.js +0 -26
  363. package/dist/ModalLayout/ModalHeader.mjs +0 -18
  364. package/dist/ModalLayout/ModalLayout.js +0 -28
  365. package/dist/ModalLayout/ModalLayout.mjs +0 -20
  366. package/dist/ModalLayout/__tests__/ModalLayout.spec.d.ts +0 -1
  367. package/dist/ModalLayout/index.js +0 -15
  368. package/dist/ModalLayout/index.mjs +0 -4
  369. package/dist/NumberInput/NumberInput.js +0 -130
  370. package/dist/NumberInput/NumberInput.mjs +0 -121
  371. package/dist/NumberInput/index.js +0 -9
  372. package/dist/NumberInput/index.mjs +0 -1
  373. package/dist/Pagination/Pagination.js +0 -39
  374. package/dist/Pagination/Pagination.mjs +0 -15
  375. package/dist/Pagination/PaginationContext.js +0 -11
  376. package/dist/Pagination/PaginationContext.mjs +0 -6
  377. package/dist/Pagination/assets/next.svg.js +0 -5
  378. package/dist/Pagination/assets/next.svg.mjs +0 -3
  379. package/dist/Pagination/assets/previous.svg.js +0 -5
  380. package/dist/Pagination/assets/previous.svg.mjs +0 -3
  381. package/dist/Pagination/components.js +0 -84
  382. package/dist/Pagination/components.mjs +0 -73
  383. package/dist/Pagination/index.js +0 -14
  384. package/dist/Pagination/index.mjs +0 -2
  385. package/dist/Popover/Popover.js +0 -166
  386. package/dist/Popover/Popover.mjs +0 -136
  387. package/dist/Popover/__tests__/Popover.spec.d.ts +0 -1
  388. package/dist/Popover/index.js +0 -12
  389. package/dist/Popover/index.mjs +0 -3
  390. package/dist/Popover/primitives.js +0 -10
  391. package/dist/Popover/primitives.mjs +0 -1
  392. package/dist/Portal/Portal.js +0 -35
  393. package/dist/Portal/Portal.mjs +0 -11
  394. package/dist/Portal/index.js +0 -9
  395. package/dist/Portal/index.mjs +0 -1
  396. package/dist/ProgressBar/ProgressBar.js +0 -28
  397. package/dist/ProgressBar/ProgressBar.mjs +0 -20
  398. package/dist/ProgressBar/index.js +0 -9
  399. package/dist/ProgressBar/index.mjs +0 -1
  400. package/dist/Radio/Radio.js +0 -14
  401. package/dist/Radio/Radio.mjs +0 -10
  402. package/dist/Radio/__tests__/Radio.spec.d.ts +0 -1
  403. package/dist/Radio/index.js +0 -11
  404. package/dist/Radio/index.mjs +0 -2
  405. package/dist/RawTable/RawCell.js +0 -149
  406. package/dist/RawTable/RawCell.mjs +0 -144
  407. package/dist/RawTable/RawTable.js +0 -85
  408. package/dist/RawTable/RawTable.mjs +0 -81
  409. package/dist/RawTable/RawTableContext.js +0 -17
  410. package/dist/RawTable/RawTableContext.mjs +0 -12
  411. package/dist/RawTable/RawTbody.js +0 -22
  412. package/dist/RawTable/RawTbody.mjs +0 -18
  413. package/dist/RawTable/RawThead.js +0 -21
  414. package/dist/RawTable/RawThead.mjs +0 -17
  415. package/dist/RawTable/RawTr.js +0 -22
  416. package/dist/RawTable/RawTr.mjs +0 -18
  417. package/dist/RawTable/focusFocusable.js +0 -12
  418. package/dist/RawTable/focusFocusable.mjs +0 -8
  419. package/dist/RawTable/index.js +0 -18
  420. package/dist/RawTable/index.mjs +0 -5
  421. package/dist/Searchbar/SearchForm.js +0 -9
  422. package/dist/Searchbar/SearchForm.mjs +0 -5
  423. package/dist/Searchbar/Searchbar.js +0 -62
  424. package/dist/Searchbar/Searchbar.mjs +0 -54
  425. package/dist/Searchbar/index.js +0 -11
  426. package/dist/Searchbar/index.mjs +0 -2
  427. package/dist/Select/MultiSelect.js +0 -167
  428. package/dist/Select/MultiSelect.mjs +0 -138
  429. package/dist/Select/MultiSelectNested.js +0 -25
  430. package/dist/Select/MultiSelectNested.mjs +0 -17
  431. package/dist/Select/OptGroup.d.ts +0 -9
  432. package/dist/Select/OptGroup.js +0 -14
  433. package/dist/Select/OptGroup.mjs +0 -10
  434. package/dist/Select/Option.d.ts +0 -13
  435. package/dist/Select/Option.js +0 -20
  436. package/dist/Select/Option.mjs +0 -16
  437. package/dist/Select/Select.d.ts +0 -18
  438. package/dist/Select/Select.js +0 -44
  439. package/dist/Select/Select.mjs +0 -19
  440. package/dist/Select/SelectList.d.ts +0 -25
  441. package/dist/Select/SelectList.js +0 -150
  442. package/dist/Select/SelectList.mjs +0 -126
  443. package/dist/Select/SelectParts.js +0 -169
  444. package/dist/Select/SelectParts.mjs +0 -133
  445. package/dist/Select/SingleSelect.js +0 -111
  446. package/dist/Select/SingleSelect.mjs +0 -85
  447. package/dist/Select/__tests__/MultiSelect.spec.d.ts +0 -1
  448. package/dist/Select/__tests__/MultiSelectNested.spec.d.ts +0 -1
  449. package/dist/Select/__tests__/Select.spec.d.ts +0 -1
  450. package/dist/Select/__tests__/SingleSelect.spec.d.ts +0 -1
  451. package/dist/Select/index.js +0 -24
  452. package/dist/Select/index.mjs +0 -7
  453. package/dist/SimpleMenu/SimpleMenu.js +0 -188
  454. package/dist/SimpleMenu/SimpleMenu.mjs +0 -178
  455. package/dist/SimpleMenu/__tests__/SimpleMenu.spec.d.ts +0 -1
  456. package/dist/SimpleMenu/index.js +0 -10
  457. package/dist/SimpleMenu/index.mjs +0 -1
  458. package/dist/SimpleMenu/utils.d.ts +0 -3
  459. package/dist/SimpleMenu/utils.js +0 -18
  460. package/dist/SimpleMenu/utils.mjs +0 -14
  461. package/dist/Stack/Stack.d.ts +0 -20
  462. package/dist/Stack/Stack.js +0 -57
  463. package/dist/Stack/Stack.mjs +0 -49
  464. package/dist/Stack/index.d.ts +0 -1
  465. package/dist/Stack/index.js +0 -9
  466. package/dist/Stack/index.mjs +0 -1
  467. package/dist/Status/Status.js +0 -37
  468. package/dist/Status/Status.mjs +0 -29
  469. package/dist/Status/__tests__/Status.spec.d.ts +0 -1
  470. package/dist/Status/index.js +0 -9
  471. package/dist/Status/index.mjs +0 -1
  472. package/dist/SubNav/SubNav.js +0 -29
  473. package/dist/SubNav/SubNav.mjs +0 -20
  474. package/dist/SubNav/SubNavHeader.js +0 -67
  475. package/dist/SubNav/SubNavHeader.mjs +0 -59
  476. package/dist/SubNav/SubNavLink.js +0 -64
  477. package/dist/SubNav/SubNavLink.mjs +0 -56
  478. package/dist/SubNav/SubNavLinkSection.js +0 -52
  479. package/dist/SubNav/SubNavLinkSection.mjs +0 -43
  480. package/dist/SubNav/SubNavSection.js +0 -39
  481. package/dist/SubNav/SubNavSection.mjs +0 -30
  482. package/dist/SubNav/SubNavSectionLabel.js +0 -35
  483. package/dist/SubNav/SubNavSectionLabel.mjs +0 -27
  484. package/dist/SubNav/SubNavSections.js +0 -21
  485. package/dist/SubNav/SubNavSections.mjs +0 -13
  486. package/dist/SubNav/index.js +0 -20
  487. package/dist/SubNav/index.mjs +0 -6
  488. package/dist/Switch/Switch.js +0 -63
  489. package/dist/Switch/Switch.mjs +0 -54
  490. package/dist/Switch/index.js +0 -9
  491. package/dist/Switch/index.mjs +0 -1
  492. package/dist/Table/Cell.js +0 -40
  493. package/dist/Table/Cell.mjs +0 -31
  494. package/dist/Table/TFooter.js +0 -44
  495. package/dist/Table/TFooter.mjs +0 -36
  496. package/dist/Table/Table.js +0 -77
  497. package/dist/Table/Table.mjs +0 -69
  498. package/dist/Table/Tbody.js +0 -22
  499. package/dist/Table/Tbody.mjs +0 -14
  500. package/dist/Table/Thead.js +0 -20
  501. package/dist/Table/Thead.mjs +0 -12
  502. package/dist/Table/Tr.js +0 -37
  503. package/dist/Table/Tr.mjs +0 -29
  504. package/dist/Table/index.js +0 -20
  505. package/dist/Table/index.mjs +0 -6
  506. package/dist/Tabs/TabGroup.js +0 -47
  507. package/dist/Tabs/TabGroup.mjs +0 -23
  508. package/dist/Tabs/TabPanels.js +0 -23
  509. package/dist/Tabs/TabPanels.mjs +0 -18
  510. package/dist/Tabs/Tabs.js +0 -153
  511. package/dist/Tabs/Tabs.mjs +0 -144
  512. package/dist/Tabs/TabsContext.js +0 -18
  513. package/dist/Tabs/TabsContext.mjs +0 -13
  514. package/dist/Tabs/components.js +0 -73
  515. package/dist/Tabs/components.mjs +0 -62
  516. package/dist/Tabs/index.js +0 -15
  517. package/dist/Tabs/index.mjs +0 -3
  518. package/dist/Tag/Tag.js +0 -38
  519. package/dist/Tag/Tag.mjs +0 -30
  520. package/dist/Tag/__tests__/Tag.spec.d.ts +0 -1
  521. package/dist/Tag/index.js +0 -9
  522. package/dist/Tag/index.mjs +0 -1
  523. package/dist/TextButton/TextButton.js +0 -71
  524. package/dist/TextButton/TextButton.mjs +0 -44
  525. package/dist/TextButton/index.js +0 -9
  526. package/dist/TextButton/index.mjs +0 -1
  527. package/dist/TextInput/TextInput.js +0 -33
  528. package/dist/TextInput/TextInput.mjs +0 -29
  529. package/dist/TextInput/__tests__/TextInput.spec.d.ts +0 -1
  530. package/dist/TextInput/index.js +0 -9
  531. package/dist/TextInput/index.mjs +0 -1
  532. package/dist/Textarea/Textarea.js +0 -55
  533. package/dist/Textarea/Textarea.mjs +0 -46
  534. package/dist/Textarea/index.js +0 -9
  535. package/dist/Textarea/index.mjs +0 -1
  536. package/dist/ThemeProvider/ThemeProvider.js +0 -187
  537. package/dist/ThemeProvider/ThemeProvider.mjs +0 -183
  538. package/dist/ThemeProvider/hooks.js +0 -11
  539. package/dist/ThemeProvider/hooks.mjs +0 -7
  540. package/dist/ThemeProvider/index.js +0 -11
  541. package/dist/ThemeProvider/index.mjs +0 -2
  542. package/dist/TimePicker/TimePicker.js +0 -139
  543. package/dist/TimePicker/TimePicker.mjs +0 -111
  544. package/dist/TimePicker/__tests__/TimePicker.spec.d.ts +0 -1
  545. package/dist/TimePicker/index.js +0 -10
  546. package/dist/TimePicker/index.mjs +0 -1
  547. package/dist/ToggleCheckbox/ToggleCheckbox.d.ts +0 -10
  548. package/dist/ToggleCheckbox/ToggleCheckbox.js +0 -99
  549. package/dist/ToggleCheckbox/ToggleCheckbox.mjs +0 -90
  550. package/dist/ToggleCheckbox/index.d.ts +0 -1
  551. package/dist/ToggleCheckbox/index.js +0 -9
  552. package/dist/ToggleCheckbox/index.mjs +0 -1
  553. package/dist/ToggleInput/ToggleInput.js +0 -96
  554. package/dist/ToggleInput/ToggleInput.mjs +0 -69
  555. package/dist/ToggleInput/__tests__/ToggleInput.spec.d.ts +0 -1
  556. package/dist/ToggleInput/index.js +0 -9
  557. package/dist/ToggleInput/index.mjs +0 -1
  558. package/dist/Tooltip/Tooltip.js +0 -58
  559. package/dist/Tooltip/Tooltip.mjs +0 -31
  560. package/dist/Tooltip/__tests__/Tooltip.spec.d.ts +0 -1
  561. package/dist/Tooltip/hooks/useTooltipHandlers.js +0 -39
  562. package/dist/Tooltip/hooks/useTooltipHandlers.mjs +0 -35
  563. package/dist/Tooltip/hooks/useTooltipLayout.js +0 -25
  564. package/dist/Tooltip/hooks/useTooltipLayout.mjs +0 -21
  565. package/dist/Tooltip/index.js +0 -9
  566. package/dist/Tooltip/index.mjs +0 -1
  567. package/dist/Tooltip/utils/__tests__/positionTooltip.spec.d.ts +0 -1
  568. package/dist/Tooltip/utils/positionTooltip.js +0 -74
  569. package/dist/Tooltip/utils/positionTooltip.mjs +0 -70
  570. package/dist/Typography/Typography.js +0 -34
  571. package/dist/Typography/Typography.mjs +0 -26
  572. package/dist/Typography/__tests__/Typography.spec.d.ts +0 -1
  573. package/dist/Typography/constants.js +0 -21
  574. package/dist/Typography/constants.mjs +0 -10
  575. package/dist/Typography/index.js +0 -9
  576. package/dist/Typography/index.mjs +0 -1
  577. package/dist/Typography/utils.js +0 -72
  578. package/dist/Typography/utils.mjs +0 -67
  579. package/dist/VisuallyHidden/VisuallyHidden.js +0 -22
  580. package/dist/VisuallyHidden/VisuallyHidden.mjs +0 -14
  581. package/dist/VisuallyHidden/index.js +0 -9
  582. package/dist/VisuallyHidden/index.mjs +0 -1
  583. package/dist/helpers/__tests__/deprecations.spec.d.ts +0 -1
  584. package/dist/helpers/context.js +0 -50
  585. package/dist/helpers/context.mjs +0 -26
  586. package/dist/helpers/deprecations.js +0 -21
  587. package/dist/helpers/deprecations.mjs +0 -16
  588. package/dist/helpers/getDefaultLocale.js +0 -36
  589. package/dist/helpers/getDefaultLocale.mjs +0 -32
  590. package/dist/helpers/getFocusableNodes.js +0 -36
  591. package/dist/helpers/getFocusableNodes.mjs +0 -31
  592. package/dist/helpers/handleResponsiveValues.js +0 -34
  593. package/dist/helpers/handleResponsiveValues.mjs +0 -32
  594. package/dist/helpers/keyboardKeys.js +0 -23
  595. package/dist/helpers/keyboardKeys.mjs +0 -19
  596. package/dist/helpers/objects.js +0 -22
  597. package/dist/helpers/objects.mjs +0 -17
  598. package/dist/helpers/setOpacity.js +0 -9
  599. package/dist/helpers/setOpacity.mjs +0 -5
  600. package/dist/helpers/setTabIndexOnFirstItem.js +0 -12
  601. package/dist/helpers/setTabIndexOnFirstItem.mjs +0 -8
  602. package/dist/helpers/strings.js +0 -7
  603. package/dist/helpers/strings.mjs +0 -3
  604. package/dist/helpers/theme.js +0 -14
  605. package/dist/helpers/theme.mjs +0 -10
  606. package/dist/helpers/useElementOnScreen.d.ts +0 -6
  607. package/dist/helpers/useElementOnScreen.js +0 -18
  608. package/dist/helpers/useElementOnScreen.mjs +0 -14
  609. package/dist/helpers/useId.d.ts +0 -6
  610. package/dist/helpers/useId.js +0 -18
  611. package/dist/helpers/useId.mjs +0 -14
  612. package/dist/helpers/useIntersection.d.ts +0 -6
  613. package/dist/helpers/useIntersection.js +0 -18
  614. package/dist/helpers/useIntersection.mjs +0 -14
  615. package/dist/helpers/useLockScroll.d.ts +0 -7
  616. package/dist/helpers/useLockScroll.js +0 -16
  617. package/dist/helpers/useLockScroll.mjs +0 -14
  618. package/dist/helpers/usePrevious.d.ts +0 -6
  619. package/dist/helpers/usePrevious.js +0 -18
  620. package/dist/helpers/usePrevious.mjs +0 -14
  621. package/dist/helpers/useResizeObserver.d.ts +0 -6
  622. package/dist/helpers/useResizeObserver.js +0 -18
  623. package/dist/helpers/useResizeObserver.mjs +0 -14
  624. package/dist/hooks/__tests__/useId.spec.d.ts +0 -1
  625. package/dist/hooks/useComposeRefs.js +0 -72
  626. package/dist/hooks/useComposeRefs.mjs +0 -47
  627. package/dist/hooks/useControllableState.js +0 -63
  628. package/dist/hooks/useControllableState.mjs +0 -39
  629. package/dist/hooks/useDateFormatter.js +0 -78
  630. package/dist/hooks/useDateFormatter.mjs +0 -54
  631. package/dist/hooks/useElementOnScreen.js +0 -28
  632. package/dist/hooks/useElementOnScreen.mjs +0 -24
  633. package/dist/hooks/useId.js +0 -25
  634. package/dist/hooks/useId.mjs +0 -17
  635. package/dist/hooks/useIntersection.js +0 -41
  636. package/dist/hooks/useIntersection.mjs +0 -37
  637. package/dist/hooks/useLockScroll.js +0 -16
  638. package/dist/hooks/useLockScroll.mjs +0 -14
  639. package/dist/hooks/usePrevious.js +0 -15
  640. package/dist/hooks/usePrevious.mjs +0 -11
  641. package/dist/hooks/useResizeObserver.js +0 -28
  642. package/dist/hooks/useResizeObserver.mjs +0 -24
  643. package/dist/themes/__tests__/extendTheme.spec.d.ts +0 -1
  644. package/dist/themes/colors.js +0 -2
  645. package/dist/themes/colors.mjs +0 -1
  646. package/dist/themes/common-theme.js +0 -25
  647. package/dist/themes/common-theme.mjs +0 -21
  648. package/dist/themes/darkTheme/dark-colors.js +0 -55
  649. package/dist/themes/darkTheme/dark-colors.mjs +0 -51
  650. package/dist/themes/darkTheme/dark-shadows.js +0 -15
  651. package/dist/themes/darkTheme/dark-shadows.mjs +0 -11
  652. package/dist/themes/darkTheme/index.js +0 -15
  653. package/dist/themes/darkTheme/index.mjs +0 -11
  654. package/dist/themes/extendTheme.js +0 -47
  655. package/dist/themes/extendTheme.mjs +0 -43
  656. package/dist/themes/index.js +0 -17
  657. package/dist/themes/index.mjs +0 -4
  658. package/dist/themes/lightTheme/index.js +0 -15
  659. package/dist/themes/lightTheme/index.mjs +0 -11
  660. package/dist/themes/lightTheme/light-colors.js +0 -55
  661. package/dist/themes/lightTheme/light-colors.mjs +0 -51
  662. package/dist/themes/lightTheme/light-shadows.js +0 -15
  663. package/dist/themes/lightTheme/light-shadows.mjs +0 -11
  664. package/dist/themes/sizes.js +0 -25
  665. package/dist/themes/sizes.mjs +0 -21
  666. package/dist/themes/utils.js +0 -55
  667. package/dist/themes/utils.mjs +0 -49
  668. package/dist/types.js +0 -2
  669. package/dist/types.mjs +0 -1
  670. package/dist/v2/Breadcrumbs/Breadcrumbs.d.ts +0 -8
  671. package/dist/v2/Breadcrumbs/Breadcrumbs.js +0 -34
  672. package/dist/v2/Breadcrumbs/Breadcrumbs.mjs +0 -26
  673. package/dist/v2/Breadcrumbs/Crumb.js +0 -12
  674. package/dist/v2/Breadcrumbs/Crumb.mjs +0 -8
  675. package/dist/v2/Breadcrumbs/CrumbLink.js +0 -30
  676. package/dist/v2/Breadcrumbs/CrumbLink.mjs +0 -22
  677. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +0 -26
  678. package/dist/v2/Breadcrumbs/CrumbSimpleMenu.mjs +0 -18
  679. package/dist/v2/Breadcrumbs/Divider.js +0 -14
  680. package/dist/v2/Breadcrumbs/Divider.mjs +0 -10
  681. package/dist/v2/Breadcrumbs/__tests__/Breadcrumbs.spec.d.ts +0 -1
  682. package/dist/v2/Breadcrumbs/index.d.ts +0 -4
  683. package/dist/v2/Breadcrumbs/index.js +0 -15
  684. package/dist/v2/Breadcrumbs/index.mjs +0 -4
  685. package/dist/v2/Link/Link.d.ts +0 -11
  686. package/dist/v2/Link/Link.js +0 -48
  687. package/dist/v2/Link/Link.mjs +0 -39
  688. package/dist/v2/Link/index.d.ts +0 -1
  689. package/dist/v2/Link/index.js +0 -9
  690. package/dist/v2/Link/index.mjs +0 -1
  691. package/dist/v2/LinkButton/LinkButton.d.ts +0 -61
  692. package/dist/v2/LinkButton/LinkButton.js +0 -46
  693. package/dist/v2/LinkButton/LinkButton.mjs +0 -37
  694. package/dist/v2/LinkButton/index.d.ts +0 -1
  695. package/dist/v2/LinkButton/index.js +0 -9
  696. package/dist/v2/LinkButton/index.mjs +0 -1
  697. package/dist/v2/MainNav/MainNav.d.ts +0 -5
  698. package/dist/v2/MainNav/MainNav.js +0 -22
  699. package/dist/v2/MainNav/MainNav.mjs +0 -14
  700. package/dist/v2/MainNav/MainNavContext.d.ts +0 -2
  701. package/dist/v2/MainNav/MainNavContext.js +0 -11
  702. package/dist/v2/MainNav/MainNavContext.mjs +0 -6
  703. package/dist/v2/MainNav/NavBrand.d.ts +0 -9
  704. package/dist/v2/MainNav/NavBrand.js +0 -46
  705. package/dist/v2/MainNav/NavBrand.mjs +0 -37
  706. package/dist/v2/MainNav/NavCondense.d.ts +0 -5
  707. package/dist/v2/MainNav/NavCondense.js +0 -42
  708. package/dist/v2/MainNav/NavCondense.mjs +0 -34
  709. package/dist/v2/MainNav/NavFooter.d.ts +0 -5
  710. package/dist/v2/MainNav/NavFooter.js +0 -12
  711. package/dist/v2/MainNav/NavFooter.mjs +0 -8
  712. package/dist/v2/MainNav/NavLink.d.ts +0 -9
  713. package/dist/v2/MainNav/NavLink.js +0 -102
  714. package/dist/v2/MainNav/NavLink.mjs +0 -93
  715. package/dist/v2/MainNav/NavSection.d.ts +0 -9
  716. package/dist/v2/MainNav/NavSection.js +0 -28
  717. package/dist/v2/MainNav/NavSection.mjs +0 -24
  718. package/dist/v2/MainNav/NavSections.d.ts +0 -8
  719. package/dist/v2/MainNav/NavSections.js +0 -26
  720. package/dist/v2/MainNav/NavSections.mjs +0 -18
  721. package/dist/v2/MainNav/NavUser.d.ts +0 -8
  722. package/dist/v2/MainNav/NavUser.js +0 -28
  723. package/dist/v2/MainNav/NavUser.mjs +0 -19
  724. package/dist/v2/MainNav/index.d.ts +0 -8
  725. package/dist/v2/MainNav/index.js +0 -23
  726. package/dist/v2/MainNav/index.mjs +0 -8
  727. package/dist/v2/Pagination/Pagination.d.ts +0 -8
  728. package/dist/v2/Pagination/Pagination.js +0 -39
  729. package/dist/v2/Pagination/Pagination.mjs +0 -15
  730. package/dist/v2/Pagination/PaginationContext.d.ts +0 -6
  731. package/dist/v2/Pagination/PaginationContext.js +0 -11
  732. package/dist/v2/Pagination/PaginationContext.mjs +0 -6
  733. package/dist/v2/Pagination/assets/next.svg.js +0 -5
  734. package/dist/v2/Pagination/assets/next.svg.mjs +0 -3
  735. package/dist/v2/Pagination/assets/previous.svg.js +0 -5
  736. package/dist/v2/Pagination/assets/previous.svg.mjs +0 -3
  737. package/dist/v2/Pagination/components.d.ts +0 -16
  738. package/dist/v2/Pagination/components.js +0 -83
  739. package/dist/v2/Pagination/components.mjs +0 -71
  740. package/dist/v2/Pagination/index.d.ts +0 -2
  741. package/dist/v2/Pagination/index.js +0 -14
  742. package/dist/v2/Pagination/index.mjs +0 -2
  743. package/dist/v2/SimpleMenu/Menu.js +0 -146
  744. package/dist/v2/SimpleMenu/Menu.mjs +0 -112
  745. package/dist/v2/SimpleMenu/SimpleMenu.d.ts +0 -62
  746. package/dist/v2/SimpleMenu/SimpleMenu.js +0 -48
  747. package/dist/v2/SimpleMenu/SimpleMenu.mjs +0 -44
  748. package/dist/v2/SimpleMenu/__tests__/Menu.spec.d.ts +0 -1
  749. package/dist/v2/SimpleMenu/__tests__/SimpleMenu.spec.d.ts +0 -1
  750. package/dist/v2/SimpleMenu/index.d.ts +0 -1
  751. package/dist/v2/SimpleMenu/index.js +0 -12
  752. package/dist/v2/SimpleMenu/index.mjs +0 -3
  753. package/dist/v2/SubNav/SubNav.d.ts +0 -6
  754. package/dist/v2/SubNav/SubNav.js +0 -29
  755. package/dist/v2/SubNav/SubNav.mjs +0 -20
  756. package/dist/v2/SubNav/SubNavHeader.d.ts +0 -13
  757. package/dist/v2/SubNav/SubNavHeader.js +0 -65
  758. package/dist/v2/SubNav/SubNavHeader.mjs +0 -57
  759. package/dist/v2/SubNav/SubNavLink.d.ts +0 -9
  760. package/dist/v2/SubNav/SubNavLink.js +0 -66
  761. package/dist/v2/SubNav/SubNavLink.mjs +0 -57
  762. package/dist/v2/SubNav/SubNavLinkSection.d.ts +0 -7
  763. package/dist/v2/SubNav/SubNavLinkSection.js +0 -51
  764. package/dist/v2/SubNav/SubNavLinkSection.mjs +0 -43
  765. package/dist/v2/SubNav/SubNavSection.d.ts +0 -9
  766. package/dist/v2/SubNav/SubNavSection.js +0 -38
  767. package/dist/v2/SubNav/SubNavSection.mjs +0 -30
  768. package/dist/v2/SubNav/SubNavSectionLabel.d.ts +0 -9
  769. package/dist/v2/SubNav/SubNavSectionLabel.js +0 -33
  770. package/dist/v2/SubNav/SubNavSectionLabel.mjs +0 -25
  771. package/dist/v2/SubNav/SubNavSections.d.ts +0 -8
  772. package/dist/v2/SubNav/SubNavSections.js +0 -17
  773. package/dist/v2/SubNav/SubNavSections.mjs +0 -13
  774. package/dist/v2/SubNav/index.d.ts +0 -6
  775. package/dist/v2/SubNav/index.js +0 -20
  776. package/dist/v2/SubNav/index.mjs +0 -6
  777. package/dist/v2/index.d.ts +0 -7
  778. package/dist/v2/index.js +0 -60
  779. package/dist/v2/index.mjs +0 -25
  780. /package/dist/{v2/Breadcrumbs → Breadcrumbs}/Divider.d.ts +0 -0
@@ -1,11 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import * as React from 'react';
3
- import { createPortal } from 'react-dom';
4
- import { Box } from '../Box/Box.mjs';
5
-
6
- const Portal = React.forwardRef(({ container = globalThis?.document?.body, ...portalProps }, forwardedRef) => {
7
- return container ? createPortal(jsx(Box, { ref: forwardedRef, ...portalProps }), container) : null;
8
- });
9
- Portal.displayName = 'Portal';
10
-
11
- export { Portal };
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const Portal = require('./Portal.js');
6
-
7
-
8
-
9
- exports.Portal = Portal.Portal;
@@ -1 +0,0 @@
1
- export { Portal } from './Portal.mjs';
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const jsxRuntime = require('react/jsx-runtime');
6
- const styled = require('styled-components');
7
- const Box = require('../Box/Box.js');
8
-
9
- const _interopDefault = e => e && e.__esModule ? e : { default: e };
10
-
11
- const styled__default = /*#__PURE__*/_interopDefault(styled);
12
-
13
- const ProgressbarBase = styled__default.default(Box.Box) `
14
- &:before {
15
- background-color: ${({ theme }) => theme.colors.neutral0};
16
- border-radius: ${({ theme }) => theme.borderRadius};
17
- bottom: 0;
18
- content: '';
19
- position: absolute;
20
- top: 0;
21
- width: ${({ value }) => `${value}%`};
22
- }
23
- `;
24
- const ProgressBar = ({ min = 0, max = 100, value = 0, children, size = 'M', ...props }) => {
25
- return (jsxRuntime.jsx(ProgressbarBase, { background: "neutral600", hasRadius: true, "aria-label": children, "aria-valuemax": max, "aria-valuemin": min, "aria-valuenow": value, height: size === 'S' ? 1 : 2, position: "relative", role: "progressbar", value: value, width: size === 'S' ? '78px' : '102px', ...props }));
26
- };
27
-
28
- exports.ProgressBar = ProgressBar;
@@ -1,20 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import styled from 'styled-components';
3
- import { Box } from '../Box/Box.mjs';
4
-
5
- const ProgressbarBase = styled(Box) `
6
- &:before {
7
- background-color: ${({ theme }) => theme.colors.neutral0};
8
- border-radius: ${({ theme }) => theme.borderRadius};
9
- bottom: 0;
10
- content: '';
11
- position: absolute;
12
- top: 0;
13
- width: ${({ value }) => `${value}%`};
14
- }
15
- `;
16
- const ProgressBar = ({ min = 0, max = 100, value = 0, children, size = 'M', ...props }) => {
17
- return (jsx(ProgressbarBase, { background: "neutral600", hasRadius: true, "aria-label": children, "aria-valuemax": max, "aria-valuemin": min, "aria-valuenow": value, height: size === 'S' ? 1 : 2, position: "relative", role: "progressbar", value: value, width: size === 'S' ? '78px' : '102px', ...props }));
18
- };
19
-
20
- export { ProgressBar };
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const ProgressBar = require('./ProgressBar.js');
6
-
7
-
8
-
9
- exports.ProgressBar = ProgressBar.ProgressBar;
@@ -1 +0,0 @@
1
- export { ProgressBar } from './ProgressBar.mjs';
@@ -1,14 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const jsxRuntime = require('react/jsx-runtime');
6
- const BaseRadio = require('../BaseRadio/BaseRadio.js');
7
- const Flex = require('../Flex/Flex.js');
8
- const Typography = require('../Typography/Typography.js');
9
-
10
- const Radio = ({ children, ...props }) => {
11
- return (jsxRuntime.jsxs(Flex.Flex, { alignItems: "center", as: "label", gap: 2, children: [jsxRuntime.jsx(BaseRadio.BaseRadio, { ...props }), jsxRuntime.jsx(Typography.Typography, { textColor: "neutral800", children: children })] }));
12
- };
13
-
14
- exports.Radio = Radio;
@@ -1,10 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { BaseRadio } from '../BaseRadio/BaseRadio.mjs';
3
- import { Flex } from '../Flex/Flex.mjs';
4
- import { Typography } from '../Typography/Typography.mjs';
5
-
6
- const Radio = ({ children, ...props }) => {
7
- return (jsxs(Flex, { alignItems: "center", as: "label", gap: 2, children: [jsx(BaseRadio, { ...props }), jsx(Typography, { textColor: "neutral800", children: children })] }));
8
- };
9
-
10
- export { Radio };
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const Radio = require('./Radio.js');
6
- const RadioGroup = require('../BaseRadio/RadioGroup.js');
7
-
8
-
9
-
10
- exports.Radio = Radio.Radio;
11
- exports.RadioGroup = RadioGroup.RadioGroup;
@@ -1,2 +0,0 @@
1
- export { Radio } from './Radio.mjs';
2
- export { RadioGroup } from '../BaseRadio/RadioGroup.mjs';
@@ -1,149 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const jsxRuntime = require('react/jsx-runtime');
6
- const React = require('react');
7
- const RawTableContext = require('./RawTableContext.js');
8
- const getFocusableNodes = require('../helpers/getFocusableNodes.js');
9
- const keyboardKeys = require('../helpers/keyboardKeys.js');
10
- const Box = require('../Box/Box.js');
11
-
12
- const RawTh = (props) => jsxRuntime.jsx(RawTd, { ...props, as: "th" });
13
- const RawTd = ({ coords = { col: 0, row: 0 }, as = 'td', ...props }) => {
14
- const tdRef = React.useRef(null);
15
- const { rowIndex, colIndex, setTableValues } = RawTableContext.useTable();
16
- const [isActive, setIsActive] = React.useState(false);
17
- const handleKeyDown = (e) => {
18
- const focusableNodes = getFocusableNodes.getFocusableNodes(tdRef.current, true);
19
- /**
20
- * If the cell does not have focusable children or if it has focusable children
21
- * without keyboard navigation, we should not run the handler.
22
- */
23
- if (focusableNodes.length === 0 ||
24
- (focusableNodes.length === 1 && getFocusableNodes.getFocusableNodesWithKeyboardNav(focusableNodes).length === 0)) {
25
- return;
26
- /**
27
- * This allows cells that **only** have buttons in them to still be
28
- * navigable with the keyboard arrow keys (left / right) as if they were grid cells.
29
- *
30
- * If there are nextNodes (next child node) then we stop the table's keyboard navigation
31
- * handlers from happening.
32
- */
33
- }
34
- if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== 'BUTTON')) {
35
- e.preventDefault();
36
- const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
37
- if (e.key === keyboardKeys.KeyboardKeys.RIGHT) {
38
- const nextNode = focusableNodes[focussedButtonIndex + 1];
39
- if (nextNode) {
40
- e.stopPropagation();
41
- nextNode.focus();
42
- }
43
- }
44
- else if (e.key === keyboardKeys.KeyboardKeys.LEFT) {
45
- const nextNode = focusableNodes[focussedButtonIndex - 1];
46
- if (nextNode) {
47
- e.stopPropagation();
48
- nextNode.focus();
49
- }
50
- }
51
- return;
52
- }
53
- const isEnterKey = e.key === keyboardKeys.KeyboardKeys.ENTER;
54
- if (isEnterKey && !isActive) {
55
- setIsActive(true);
56
- /**
57
- * Cells should be "escapeable" with the escape key or enter key
58
- */
59
- }
60
- else if ((e.key === keyboardKeys.KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
61
- /**
62
- * It's expected behaviour that the cell can't be escaped with `enter` if
63
- * the element that is focussed is an anchor tag.
64
- */
65
- if (isEnterKey && document.activeElement?.tagName === 'A') {
66
- return;
67
- }
68
- setIsActive(false);
69
- tdRef.current.focus();
70
- }
71
- else if (isActive) {
72
- /**
73
- * This stops the table navigation from working
74
- */
75
- e.stopPropagation();
76
- }
77
- };
78
- const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
79
- /**
80
- * Handles tabindex of the rendered cell element
81
- */
82
- React.useLayoutEffect(() => {
83
- const focusableNodes = getFocusableNodes.getFocusableNodes(tdRef.current, true);
84
- /**
85
- * We should focus the cell if there are no focussable children inside
86
- * If there is only one focusable child and it has it's own keyboard navigation
87
- * Or if there is more than one focusable child unless those children
88
- * are exclusively buttons.
89
- */
90
- if (focusableNodes.length === 0 ||
91
- (focusableNodes.length === 1 && getFocusableNodes.getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0) ||
92
- (focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== 'BUTTON')))) {
93
- tdRef.current.setAttribute('tabIndex', !isActive && isFocused ? '0' : '-1');
94
- focusableNodes.forEach((node, index) => {
95
- node.setAttribute('tabIndex', isActive ? '0' : '-1');
96
- /**
97
- * When a cell is active we want to focus the
98
- * first focusable element simulating a focus trap
99
- */
100
- if (isActive && index === 0) {
101
- node.focus();
102
- }
103
- });
104
- }
105
- else {
106
- focusableNodes.forEach((node) => {
107
- node.setAttribute('tabIndex', isFocused ? '0' : '-1');
108
- });
109
- }
110
- }, [isActive, isFocused]);
111
- const handleFocusableNodeFocus = React.useCallback(() => {
112
- const focusableNodes = getFocusableNodes.getFocusableNodes(tdRef.current, true);
113
- /**
114
- * If there's 1 or more focusable children and at least one has keyboard navigation
115
- * or the children are exclusively button elements the cell should be using the "active" system
116
- */
117
- if (focusableNodes.length >= 1 &&
118
- (getFocusableNodes.getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 ||
119
- !focusableNodes.find((node) => node.tagName !== 'BUTTON'))) {
120
- setIsActive(true);
121
- }
122
- /**
123
- * This function is wrapped in `useCallback` so we can safely
124
- * assume that the reference will not change
125
- */
126
- setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
127
- }, [coords, setTableValues]);
128
- /**
129
- * This handles the case where you click on a focusable
130
- * node that has it's own keyboard nav (e.g. Input)
131
- */
132
- React.useLayoutEffect(() => {
133
- const cell = tdRef.current;
134
- const focusableNodes = getFocusableNodes.getFocusableNodes(cell, true);
135
- focusableNodes.forEach((node) => {
136
- node.addEventListener('focus', handleFocusableNodeFocus);
137
- });
138
- return () => {
139
- const focusableNodes = getFocusableNodes.getFocusableNodes(cell, true);
140
- focusableNodes.forEach((node) => {
141
- node.removeEventListener('focus', handleFocusableNodeFocus);
142
- });
143
- };
144
- }, [handleFocusableNodeFocus]);
145
- return jsxRuntime.jsx(Box.Box, { role: "gridcell", as: as, ref: tdRef, onKeyDown: handleKeyDown, ...props });
146
- };
147
-
148
- exports.RawTd = RawTd;
149
- exports.RawTh = RawTh;
@@ -1,144 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { useRef, useState, useLayoutEffect, useCallback } from 'react';
3
- import { useTable } from './RawTableContext.mjs';
4
- import { getFocusableNodes, getFocusableNodesWithKeyboardNav } from '../helpers/getFocusableNodes.mjs';
5
- import { KeyboardKeys } from '../helpers/keyboardKeys.mjs';
6
- import { Box } from '../Box/Box.mjs';
7
-
8
- const RawTh = (props) => jsx(RawTd, { ...props, as: "th" });
9
- const RawTd = ({ coords = { col: 0, row: 0 }, as = 'td', ...props }) => {
10
- const tdRef = useRef(null);
11
- const { rowIndex, colIndex, setTableValues } = useTable();
12
- const [isActive, setIsActive] = useState(false);
13
- const handleKeyDown = (e) => {
14
- const focusableNodes = getFocusableNodes(tdRef.current, true);
15
- /**
16
- * If the cell does not have focusable children or if it has focusable children
17
- * without keyboard navigation, we should not run the handler.
18
- */
19
- if (focusableNodes.length === 0 ||
20
- (focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0)) {
21
- return;
22
- /**
23
- * This allows cells that **only** have buttons in them to still be
24
- * navigable with the keyboard arrow keys (left / right) as if they were grid cells.
25
- *
26
- * If there are nextNodes (next child node) then we stop the table's keyboard navigation
27
- * handlers from happening.
28
- */
29
- }
30
- if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== 'BUTTON')) {
31
- e.preventDefault();
32
- const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
33
- if (e.key === KeyboardKeys.RIGHT) {
34
- const nextNode = focusableNodes[focussedButtonIndex + 1];
35
- if (nextNode) {
36
- e.stopPropagation();
37
- nextNode.focus();
38
- }
39
- }
40
- else if (e.key === KeyboardKeys.LEFT) {
41
- const nextNode = focusableNodes[focussedButtonIndex - 1];
42
- if (nextNode) {
43
- e.stopPropagation();
44
- nextNode.focus();
45
- }
46
- }
47
- return;
48
- }
49
- const isEnterKey = e.key === KeyboardKeys.ENTER;
50
- if (isEnterKey && !isActive) {
51
- setIsActive(true);
52
- /**
53
- * Cells should be "escapeable" with the escape key or enter key
54
- */
55
- }
56
- else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
57
- /**
58
- * It's expected behaviour that the cell can't be escaped with `enter` if
59
- * the element that is focussed is an anchor tag.
60
- */
61
- if (isEnterKey && document.activeElement?.tagName === 'A') {
62
- return;
63
- }
64
- setIsActive(false);
65
- tdRef.current.focus();
66
- }
67
- else if (isActive) {
68
- /**
69
- * This stops the table navigation from working
70
- */
71
- e.stopPropagation();
72
- }
73
- };
74
- const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
75
- /**
76
- * Handles tabindex of the rendered cell element
77
- */
78
- useLayoutEffect(() => {
79
- const focusableNodes = getFocusableNodes(tdRef.current, true);
80
- /**
81
- * We should focus the cell if there are no focussable children inside
82
- * If there is only one focusable child and it has it's own keyboard navigation
83
- * Or if there is more than one focusable child unless those children
84
- * are exclusively buttons.
85
- */
86
- if (focusableNodes.length === 0 ||
87
- (focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0) ||
88
- (focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== 'BUTTON')))) {
89
- tdRef.current.setAttribute('tabIndex', !isActive && isFocused ? '0' : '-1');
90
- focusableNodes.forEach((node, index) => {
91
- node.setAttribute('tabIndex', isActive ? '0' : '-1');
92
- /**
93
- * When a cell is active we want to focus the
94
- * first focusable element simulating a focus trap
95
- */
96
- if (isActive && index === 0) {
97
- node.focus();
98
- }
99
- });
100
- }
101
- else {
102
- focusableNodes.forEach((node) => {
103
- node.setAttribute('tabIndex', isFocused ? '0' : '-1');
104
- });
105
- }
106
- }, [isActive, isFocused]);
107
- const handleFocusableNodeFocus = useCallback(() => {
108
- const focusableNodes = getFocusableNodes(tdRef.current, true);
109
- /**
110
- * If there's 1 or more focusable children and at least one has keyboard navigation
111
- * or the children are exclusively button elements the cell should be using the "active" system
112
- */
113
- if (focusableNodes.length >= 1 &&
114
- (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 ||
115
- !focusableNodes.find((node) => node.tagName !== 'BUTTON'))) {
116
- setIsActive(true);
117
- }
118
- /**
119
- * This function is wrapped in `useCallback` so we can safely
120
- * assume that the reference will not change
121
- */
122
- setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
123
- }, [coords, setTableValues]);
124
- /**
125
- * This handles the case where you click on a focusable
126
- * node that has it's own keyboard nav (e.g. Input)
127
- */
128
- useLayoutEffect(() => {
129
- const cell = tdRef.current;
130
- const focusableNodes = getFocusableNodes(cell, true);
131
- focusableNodes.forEach((node) => {
132
- node.addEventListener('focus', handleFocusableNodeFocus);
133
- });
134
- return () => {
135
- const focusableNodes = getFocusableNodes(cell, true);
136
- focusableNodes.forEach((node) => {
137
- node.removeEventListener('focus', handleFocusableNodeFocus);
138
- });
139
- };
140
- }, [handleFocusableNodeFocus]);
141
- return jsx(Box, { role: "gridcell", as: as, ref: tdRef, onKeyDown: handleKeyDown, ...props });
142
- };
143
-
144
- export { RawTd, RawTh };
@@ -1,85 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const jsxRuntime = require('react/jsx-runtime');
6
- const React = require('react');
7
- const focusFocusable = require('./focusFocusable.js');
8
- const RawTableContext = require('./RawTableContext.js');
9
- const keyboardKeys = require('../helpers/keyboardKeys.js');
10
-
11
- const RawTable = ({ colCount, rowCount, jumpStep = 3, initialCol = 0, initialRow = 0, ...props }) => {
12
- const tableRef = React.useRef(null);
13
- const mountedRef = React.useRef(false);
14
- /**
15
- * Rows will always have n+1 line because of the <tr><th></th></tr> elements
16
- */
17
- const [rowIndex, setRowIndex] = React.useState(initialRow);
18
- const [colIndex, setColIndex] = React.useState(initialCol);
19
- const setTableValues = React.useCallback(({ colIndex, rowIndex }) => {
20
- setColIndex(colIndex);
21
- setRowIndex(rowIndex);
22
- }, []);
23
- React.useEffect(() => {
24
- if (mountedRef.current) {
25
- focusFocusable.focusFocusable(tableRef.current);
26
- }
27
- if (!mountedRef.current) {
28
- mountedRef.current = true;
29
- }
30
- }, [colIndex, rowIndex]);
31
- const handleKeyDown = (e) => {
32
- switch (e.key) {
33
- case keyboardKeys.KeyboardKeys.RIGHT: {
34
- e.preventDefault();
35
- setColIndex((prevColIndex) => (prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex));
36
- break;
37
- }
38
- case keyboardKeys.KeyboardKeys.LEFT: {
39
- e.preventDefault();
40
- setColIndex((prevColIndex) => (prevColIndex > 0 ? prevColIndex - 1 : prevColIndex));
41
- break;
42
- }
43
- case keyboardKeys.KeyboardKeys.UP: {
44
- e.preventDefault();
45
- setRowIndex((prevRowIndex) => (prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex));
46
- break;
47
- }
48
- case keyboardKeys.KeyboardKeys.DOWN: {
49
- e.preventDefault();
50
- setRowIndex((prevRowIndex) => (prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex));
51
- break;
52
- }
53
- case keyboardKeys.KeyboardKeys.HOME: {
54
- e.preventDefault();
55
- if (e.ctrlKey) {
56
- setRowIndex(0);
57
- }
58
- setColIndex(0);
59
- break;
60
- }
61
- case keyboardKeys.KeyboardKeys.END: {
62
- e.preventDefault();
63
- if (e.ctrlKey) {
64
- setRowIndex(rowCount - 1);
65
- }
66
- setColIndex(colCount - 1);
67
- break;
68
- }
69
- case keyboardKeys.KeyboardKeys.PAGE_DOWN: {
70
- e.preventDefault();
71
- setRowIndex((prevRowIndex) => (prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1));
72
- break;
73
- }
74
- case keyboardKeys.KeyboardKeys.PAGE_UP: {
75
- e.preventDefault();
76
- setRowIndex((prevRowIndex) => (prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0));
77
- break;
78
- }
79
- }
80
- };
81
- const context = React.useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);
82
- return (jsxRuntime.jsx(RawTableContext.RawTableContext.Provider, { value: context, children: jsxRuntime.jsx("table", { role: "grid", ref: tableRef, "aria-rowcount": rowCount, "aria-colcount": colCount, onKeyDown: handleKeyDown, ...props }) }));
83
- };
84
-
85
- exports.RawTable = RawTable;
@@ -1,81 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { useRef, useState, useCallback, useEffect, useMemo } from 'react';
3
- import { focusFocusable } from './focusFocusable.mjs';
4
- import { RawTableContext } from './RawTableContext.mjs';
5
- import { KeyboardKeys } from '../helpers/keyboardKeys.mjs';
6
-
7
- const RawTable = ({ colCount, rowCount, jumpStep = 3, initialCol = 0, initialRow = 0, ...props }) => {
8
- const tableRef = useRef(null);
9
- const mountedRef = useRef(false);
10
- /**
11
- * Rows will always have n+1 line because of the <tr><th></th></tr> elements
12
- */
13
- const [rowIndex, setRowIndex] = useState(initialRow);
14
- const [colIndex, setColIndex] = useState(initialCol);
15
- const setTableValues = useCallback(({ colIndex, rowIndex }) => {
16
- setColIndex(colIndex);
17
- setRowIndex(rowIndex);
18
- }, []);
19
- useEffect(() => {
20
- if (mountedRef.current) {
21
- focusFocusable(tableRef.current);
22
- }
23
- if (!mountedRef.current) {
24
- mountedRef.current = true;
25
- }
26
- }, [colIndex, rowIndex]);
27
- const handleKeyDown = (e) => {
28
- switch (e.key) {
29
- case KeyboardKeys.RIGHT: {
30
- e.preventDefault();
31
- setColIndex((prevColIndex) => (prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex));
32
- break;
33
- }
34
- case KeyboardKeys.LEFT: {
35
- e.preventDefault();
36
- setColIndex((prevColIndex) => (prevColIndex > 0 ? prevColIndex - 1 : prevColIndex));
37
- break;
38
- }
39
- case KeyboardKeys.UP: {
40
- e.preventDefault();
41
- setRowIndex((prevRowIndex) => (prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex));
42
- break;
43
- }
44
- case KeyboardKeys.DOWN: {
45
- e.preventDefault();
46
- setRowIndex((prevRowIndex) => (prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex));
47
- break;
48
- }
49
- case KeyboardKeys.HOME: {
50
- e.preventDefault();
51
- if (e.ctrlKey) {
52
- setRowIndex(0);
53
- }
54
- setColIndex(0);
55
- break;
56
- }
57
- case KeyboardKeys.END: {
58
- e.preventDefault();
59
- if (e.ctrlKey) {
60
- setRowIndex(rowCount - 1);
61
- }
62
- setColIndex(colCount - 1);
63
- break;
64
- }
65
- case KeyboardKeys.PAGE_DOWN: {
66
- e.preventDefault();
67
- setRowIndex((prevRowIndex) => (prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1));
68
- break;
69
- }
70
- case KeyboardKeys.PAGE_UP: {
71
- e.preventDefault();
72
- setRowIndex((prevRowIndex) => (prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0));
73
- break;
74
- }
75
- }
76
- };
77
- const context = useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);
78
- return (jsx(RawTableContext.Provider, { value: context, children: jsx("table", { role: "grid", ref: tableRef, "aria-rowcount": rowCount, "aria-colcount": colCount, onKeyDown: handleKeyDown, ...props }) }));
79
- };
80
-
81
- export { RawTable };
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const React = require('react');
6
-
7
- const RawTableContext = React.createContext({
8
- rowIndex: 0,
9
- colIndex: 0,
10
- setTableValues() {
11
- throw new Error('setTableValues must be initialized via the RawTableContext.Provider');
12
- },
13
- });
14
- const useTable = () => React.useContext(RawTableContext);
15
-
16
- exports.RawTableContext = RawTableContext;
17
- exports.useTable = useTable;
@@ -1,12 +0,0 @@
1
- import { createContext, useContext } from 'react';
2
-
3
- const RawTableContext = createContext({
4
- rowIndex: 0,
5
- colIndex: 0,
6
- setTableValues() {
7
- throw new Error('setTableValues must be initialized via the RawTableContext.Provider');
8
- },
9
- });
10
- const useTable = () => useContext(RawTableContext);
11
-
12
- export { RawTableContext, useTable };
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const jsxRuntime = require('react/jsx-runtime');
6
- const React = require('react');
7
-
8
- const RawTbody = ({ children, ...props }) => {
9
- /**
10
- * aria-rowindex is 1-based: we have to start from 1
11
- * since the <tr><th></th></tr> elements count as 1 row, we have to increment the index by 2 (because of the base 1 AND the th)
12
- */
13
- const childrenClone = React.Children.toArray(children).map((child, index) => {
14
- if (React.isValidElement(child)) {
15
- return React.cloneElement(child, { 'aria-rowindex': index + 2 });
16
- }
17
- return child;
18
- });
19
- return jsxRuntime.jsx("tbody", { ...props, children: childrenClone });
20
- };
21
-
22
- exports.RawTbody = RawTbody;