@lumx/react 4.17.1-alpha.2 → 4.17.1-alpha.3

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 (748) hide show
  1. package/_internal/_virtual/_rolldown/runtime.js +34 -0
  2. package/_internal/components/alert-dialog/AlertDialog.d.ts +30 -0
  3. package/_internal/components/alert-dialog/AlertDialog.js +49 -0
  4. package/_internal/components/alert-dialog/index.d.ts +1 -0
  5. package/_internal/components/autocomplete/Autocomplete.d.ts +181 -0
  6. package/_internal/components/autocomplete/Autocomplete.js +92 -0
  7. package/_internal/components/autocomplete/AutocompleteMultiple.d.ts +28 -0
  8. package/_internal/components/autocomplete/AutocompleteMultiple.js +95 -0
  9. package/_internal/components/autocomplete/index.d.ts +2 -0
  10. package/_internal/components/avatar/Avatar.d.ts +39 -0
  11. package/_internal/components/avatar/Avatar.js +46 -0
  12. package/_internal/components/avatar/index.d.ts +2 -0
  13. package/_internal/components/badge/Badge.d.ts +24 -0
  14. package/_internal/components/badge/Badge.js +21 -0
  15. package/_internal/components/badge/BadgeWrapper.d.ts +16 -0
  16. package/_internal/components/badge/BadgeWrapper.js +13 -0
  17. package/_internal/components/badge/index.d.ts +2 -0
  18. package/_internal/components/button/Button.d.ts +22 -0
  19. package/_internal/components/button/Button.js +49 -0
  20. package/_internal/components/button/ButtonGroup.d.ts +17 -0
  21. package/_internal/components/button/ButtonGroup.js +21 -0
  22. package/_internal/components/button/ButtonRoot.d.ts +1 -0
  23. package/_internal/components/button/IconButton.d.ts +30 -0
  24. package/_internal/components/button/IconButton.js +40 -0
  25. package/_internal/components/button/index.d.ts +5 -0
  26. package/_internal/components/checkbox/Checkbox.d.ts +24 -0
  27. package/_internal/components/checkbox/Checkbox.js +58 -0
  28. package/_internal/components/checkbox/index.d.ts +1 -0
  29. package/_internal/components/chip/Chip.d.ts +34 -0
  30. package/_internal/components/chip/Chip.js +43 -0
  31. package/_internal/components/chip/ChipGroup.d.ts +20 -0
  32. package/_internal/components/chip/ChipGroup.js +25 -0
  33. package/_internal/components/chip/SelectionChipGroup.d.ts +43 -0
  34. package/_internal/components/chip/SelectionChipGroup.js +78 -0
  35. package/_internal/components/chip/index.d.ts +3 -0
  36. package/_internal/components/combobox/ComboboxButton.d.ts +17 -0
  37. package/_internal/components/combobox/ComboboxButton.js +59 -0
  38. package/_internal/components/combobox/ComboboxInput.d.ts +19 -0
  39. package/_internal/components/combobox/ComboboxInput.js +79 -0
  40. package/_internal/components/combobox/ComboboxList.d.ts +8 -0
  41. package/_internal/components/combobox/ComboboxList.js +64 -0
  42. package/_internal/components/combobox/ComboboxOption.d.ts +36 -0
  43. package/_internal/components/combobox/ComboboxOption.js +76 -0
  44. package/_internal/components/combobox/ComboboxOptionAction.d.ts +18 -0
  45. package/_internal/components/combobox/ComboboxOptionAction.js +38 -0
  46. package/_internal/components/combobox/ComboboxOptionMoreInfo.d.ts +19 -0
  47. package/_internal/components/combobox/ComboboxOptionMoreInfo.js +49 -0
  48. package/_internal/components/combobox/ComboboxOptionSkeleton.d.ts +19 -0
  49. package/_internal/components/combobox/ComboboxOptionSkeleton.js +38 -0
  50. package/_internal/components/combobox/ComboboxPopover.d.ts +18 -0
  51. package/_internal/components/combobox/ComboboxPopover.js +32 -0
  52. package/_internal/components/combobox/ComboboxProvider.d.ts +27 -0
  53. package/_internal/components/combobox/ComboboxProvider.js +41 -0
  54. package/_internal/components/combobox/ComboboxSection.d.ts +15 -0
  55. package/_internal/components/combobox/ComboboxSection.js +47 -0
  56. package/_internal/components/combobox/ComboboxState.d.ts +14 -0
  57. package/_internal/components/combobox/ComboboxState.js +70 -0
  58. package/_internal/components/combobox/context/ComboboxContext.js +15 -0
  59. package/_internal/components/combobox/context/ComboboxListContext.js +12 -0
  60. package/_internal/components/combobox/context/ComboboxOptionContext.js +16 -0
  61. package/_internal/components/combobox/context/useComboboxEvent.d.ts +10 -0
  62. package/_internal/components/combobox/context/useComboboxEvent.js +17 -0
  63. package/_internal/components/combobox/context/useComboboxOpen.js +13 -0
  64. package/_internal/components/combobox/index.d.ts +73 -0
  65. package/_internal/components/combobox/index.js +47 -0
  66. package/_internal/components/combobox/wrapRenderOption.js +38 -0
  67. package/_internal/components/comment-block/CommentBlock.d.ts +68 -0
  68. package/_internal/components/comment-block/CommentBlock.js +109 -0
  69. package/_internal/components/comment-block/index.d.ts +1 -0
  70. package/_internal/components/date-picker/DatePicker.d.ts +14 -0
  71. package/_internal/components/date-picker/DatePicker.js +45 -0
  72. package/_internal/components/date-picker/DatePickerControlled.d.ts +26 -0
  73. package/_internal/components/date-picker/DatePickerControlled.js +177 -0
  74. package/_internal/components/date-picker/DatePickerField.d.ts +38 -0
  75. package/_internal/components/date-picker/DatePickerField.js +83 -0
  76. package/_internal/components/date-picker/constants.js +11 -0
  77. package/_internal/components/date-picker/index.d.ts +4 -0
  78. package/_internal/components/date-picker/types.d.ts +30 -0
  79. package/_internal/components/dialog/Dialog.d.ts +47 -0
  80. package/_internal/components/dialog/Dialog.js +110 -0
  81. package/_internal/components/dialog/index.d.ts +2 -0
  82. package/_internal/components/divider/Divider.d.ts +20 -0
  83. package/_internal/components/divider/Divider.js +30 -0
  84. package/_internal/components/divider/index.d.ts +1 -0
  85. package/_internal/components/drag-handle/DragHandle.d.ts +20 -0
  86. package/_internal/components/drag-handle/DragHandle.js +29 -0
  87. package/_internal/components/drag-handle/index.d.ts +1 -0
  88. package/_internal/components/dropdown/Dropdown.d.ts +89 -0
  89. package/_internal/components/dropdown/Dropdown.js +89 -0
  90. package/_internal/components/dropdown/index.d.ts +1 -0
  91. package/_internal/components/expansion-panel/ExpansionPanel.d.ts +31 -0
  92. package/_internal/components/expansion-panel/ExpansionPanel.js +80 -0
  93. package/_internal/components/expansion-panel/index.d.ts +1 -0
  94. package/_internal/components/flag/Flag.d.ts +20 -0
  95. package/_internal/components/flag/Flag.js +28 -0
  96. package/_internal/components/flag/index.d.ts +1 -0
  97. package/_internal/components/flex-box/FlexBox.d.ts +25 -0
  98. package/_internal/components/flex-box/FlexBox.js +24 -0
  99. package/_internal/components/flex-box/index.d.ts +2 -0
  100. package/_internal/components/generic-block/GenericBlock.d.ts +51 -0
  101. package/_internal/components/generic-block/GenericBlock.js +90 -0
  102. package/_internal/components/generic-block/index.d.ts +2 -0
  103. package/_internal/components/grid/Grid.d.ts +33 -0
  104. package/_internal/components/grid/Grid.js +48 -0
  105. package/_internal/components/grid/GridItem.d.ts +29 -0
  106. package/_internal/components/grid/GridItem.js +37 -0
  107. package/_internal/components/grid/index.d.ts +2 -0
  108. package/_internal/components/grid-column/GridColumn.d.ts +24 -0
  109. package/_internal/components/grid-column/GridColumn.js +27 -0
  110. package/_internal/components/grid-column/index.d.ts +2 -0
  111. package/_internal/components/heading/Heading.d.ts +14 -0
  112. package/_internal/components/heading/Heading.js +25 -0
  113. package/_internal/components/heading/HeadingLevelProvider.d.ts +15 -0
  114. package/_internal/components/heading/HeadingLevelProvider.js +22 -0
  115. package/_internal/components/heading/context.js +6 -0
  116. package/_internal/components/heading/index.d.ts +3 -0
  117. package/_internal/components/heading/useHeadingLevel.d.ts +7 -0
  118. package/_internal/components/heading/useHeadingLevel.js +12 -0
  119. package/_internal/components/icon/Icon.d.ts +17 -0
  120. package/_internal/components/icon/Icon.js +24 -0
  121. package/_internal/components/icon/index.d.ts +2 -0
  122. package/_internal/components/image-block/ImageBlock.d.ts +29 -0
  123. package/_internal/components/image-block/ImageBlock.js +30 -0
  124. package/_internal/components/image-block/ImageCaption.d.ts +13 -0
  125. package/_internal/components/image-block/ImageCaption.js +18 -0
  126. package/_internal/components/image-block/index.d.ts +2 -0
  127. package/_internal/components/image-lightbox/ImageLightbox.d.ts +17 -0
  128. package/_internal/components/image-lightbox/ImageLightbox.js +66 -0
  129. package/_internal/components/image-lightbox/constants.js +11 -0
  130. package/_internal/components/image-lightbox/index.d.ts +2 -0
  131. package/_internal/components/image-lightbox/internal/ImageSlide.js +81 -0
  132. package/_internal/components/image-lightbox/internal/ImageSlideshow.js +112 -0
  133. package/_internal/components/image-lightbox/internal/useAnimateScroll.js +40 -0
  134. package/_internal/components/image-lightbox/internal/usePointerZoom.js +98 -0
  135. package/_internal/components/image-lightbox/types.d.ts +33 -0
  136. package/_internal/components/image-lightbox/useImageLightbox.d.ts +29 -0
  137. package/_internal/components/image-lightbox/useImageLightbox.js +102 -0
  138. package/_internal/components/inline-list/InlineList.d.ts +25 -0
  139. package/_internal/components/inline-list/InlineList.js +24 -0
  140. package/_internal/components/inline-list/index.d.ts +1 -0
  141. package/_internal/components/input-helper/InputHelper.d.ts +17 -0
  142. package/_internal/components/input-helper/InputHelper.js +25 -0
  143. package/_internal/components/input-helper/index.d.ts +1 -0
  144. package/_internal/components/input-label/InputLabel.d.ts +17 -0
  145. package/_internal/components/input-label/InputLabel.js +25 -0
  146. package/_internal/components/input-label/index.d.ts +1 -0
  147. package/_internal/components/lightbox/Lightbox.d.ts +33 -0
  148. package/_internal/components/lightbox/Lightbox.js +69 -0
  149. package/_internal/components/lightbox/index.d.ts +1 -0
  150. package/_internal/components/link/Link.d.ts +35 -0
  151. package/_internal/components/link/Link.js +45 -0
  152. package/_internal/components/link/index.d.ts +1 -0
  153. package/_internal/components/link-preview/LinkPreview.d.ts +25 -0
  154. package/_internal/components/link-preview/LinkPreview.js +31 -0
  155. package/_internal/components/link-preview/index.d.ts +1 -0
  156. package/_internal/components/list/List.d.ts +27 -0
  157. package/_internal/components/list/List.js +28 -0
  158. package/_internal/components/list/ListDivider.d.ts +21 -0
  159. package/_internal/components/list/ListDivider.js +22 -0
  160. package/_internal/components/list/ListItem.d.ts +47 -0
  161. package/_internal/components/list/ListItem.js +39 -0
  162. package/_internal/components/list/ListItemAction.js +30 -0
  163. package/_internal/components/list/ListSection.d.ts +24 -0
  164. package/_internal/components/list/ListSection.js +26 -0
  165. package/_internal/components/list/ListSubheader.d.ts +23 -0
  166. package/_internal/components/list/ListSubheader.js +33 -0
  167. package/_internal/components/list/index.d.ts +6 -0
  168. package/_internal/components/menu-button/MenuButton.d.ts +34 -0
  169. package/_internal/components/menu-button/MenuButton.js +48 -0
  170. package/_internal/components/menu-button/MenuItem.d.ts +46 -0
  171. package/_internal/components/menu-button/MenuItem.js +62 -0
  172. package/_internal/components/menu-button/MenuList.js +39 -0
  173. package/_internal/components/menu-button/MenuPopover.d.ts +13 -0
  174. package/_internal/components/menu-button/MenuPopover.js +31 -0
  175. package/_internal/components/menu-button/MenuProvider.js +45 -0
  176. package/_internal/components/menu-button/MenuTrigger.js +40 -0
  177. package/_internal/components/menu-button/context/MenuContext.js +11 -0
  178. package/_internal/components/menu-button/context/useMenuEvent.js +21 -0
  179. package/_internal/components/menu-button/context/useMenuOpen.js +15 -0
  180. package/_internal/components/menu-button/index.d.ts +3 -0
  181. package/_internal/components/message/Message.d.ts +17 -0
  182. package/_internal/components/message/Message.js +20 -0
  183. package/_internal/components/message/index.d.ts +1 -0
  184. package/_internal/components/mosaic/Mosaic.d.ts +25 -0
  185. package/_internal/components/mosaic/Mosaic.js +29 -0
  186. package/_internal/components/mosaic/index.d.ts +1 -0
  187. package/_internal/components/navigation/Navigation.d.ts +18 -0
  188. package/_internal/components/navigation/Navigation.js +51 -0
  189. package/_internal/components/navigation/NavigationItem.d.ts +23 -0
  190. package/_internal/components/navigation/NavigationItem.js +52 -0
  191. package/_internal/components/navigation/NavigationSection.d.ts +15 -0
  192. package/_internal/components/navigation/NavigationSection.js +100 -0
  193. package/_internal/components/navigation/constants.js +11 -0
  194. package/_internal/components/navigation/context.js +6 -0
  195. package/_internal/components/navigation/index.d.ts +1 -0
  196. package/_internal/components/notification/Notification.d.ts +36 -0
  197. package/_internal/components/notification/Notification.js +97 -0
  198. package/_internal/components/notification/constants.js +28 -0
  199. package/_internal/components/notification/index.d.ts +1 -0
  200. package/_internal/components/popover/Popover.d.ts +43 -0
  201. package/_internal/components/popover/Popover.js +86 -0
  202. package/_internal/components/popover/index.d.ts +3 -0
  203. package/_internal/components/popover/usePopoverStyle.js +82 -0
  204. package/_internal/components/popover-dialog/PopoverDialog.d.ts +22 -0
  205. package/_internal/components/popover-dialog/PopoverDialog.js +42 -0
  206. package/_internal/components/popover-dialog/index.d.ts +1 -0
  207. package/_internal/components/post-block/PostBlock.d.ts +44 -0
  208. package/_internal/components/post-block/PostBlock.js +92 -0
  209. package/_internal/components/post-block/index.d.ts +1 -0
  210. package/_internal/components/progress/Progress.d.ts +30 -0
  211. package/_internal/components/progress/Progress.js +54 -0
  212. package/_internal/components/progress/ProgressCircular.d.ts +20 -0
  213. package/_internal/components/progress/ProgressCircular.js +31 -0
  214. package/_internal/components/progress/ProgressLinear.d.ts +20 -0
  215. package/_internal/components/progress/ProgressLinear.js +26 -0
  216. package/_internal/components/progress/index.d.ts +4 -0
  217. package/_internal/components/progress-tracker/ProgressTracker.d.ts +26 -0
  218. package/_internal/components/progress-tracker/ProgressTracker.js +75 -0
  219. package/_internal/components/progress-tracker/ProgressTrackerProvider.d.ts +29 -0
  220. package/_internal/components/progress-tracker/ProgressTrackerProvider.js +45 -0
  221. package/_internal/components/progress-tracker/ProgressTrackerStep.d.ts +37 -0
  222. package/_internal/components/progress-tracker/ProgressTrackerStep.js +107 -0
  223. package/_internal/components/progress-tracker/ProgressTrackerStepPanel.d.ts +27 -0
  224. package/_internal/components/progress-tracker/ProgressTrackerStepPanel.js +47 -0
  225. package/_internal/components/progress-tracker/index.d.ts +4 -0
  226. package/_internal/components/radio-button/RadioButton.d.ts +23 -0
  227. package/_internal/components/radio-button/RadioButton.js +50 -0
  228. package/_internal/components/radio-button/RadioGroup.d.ts +20 -0
  229. package/_internal/components/radio-button/RadioGroup.js +23 -0
  230. package/_internal/components/radio-button/index.d.ts +2 -0
  231. package/_internal/components/select/Select.d.ts +20 -0
  232. package/_internal/components/select/Select.js +130 -0
  233. package/_internal/components/select/SelectMultiple.d.ts +24 -0
  234. package/_internal/components/select/SelectMultiple.js +128 -0
  235. package/_internal/components/select/WithSelectContext.js +96 -0
  236. package/_internal/components/select/constants.d.ts +59 -0
  237. package/_internal/components/select/constants.js +10 -0
  238. package/_internal/components/select/index.d.ts +3 -0
  239. package/_internal/components/select-button/SelectButton.d.ts +93 -0
  240. package/_internal/components/select-button/SelectButton.js +73 -0
  241. package/_internal/components/select-button/index.d.ts +18 -0
  242. package/_internal/components/select-button/index.js +11 -0
  243. package/_internal/components/select-text-field/SelectTextField.d.ts +80 -0
  244. package/_internal/components/select-text-field/SelectTextField.js +167 -0
  245. package/_internal/components/select-text-field/index.d.ts +33 -0
  246. package/_internal/components/select-text-field/index.js +24 -0
  247. package/_internal/components/side-navigation/SideNavigation.d.ts +22 -0
  248. package/_internal/components/side-navigation/SideNavigation.js +39 -0
  249. package/_internal/components/side-navigation/SideNavigationItem.d.ts +44 -0
  250. package/_internal/components/side-navigation/SideNavigationItem.js +111 -0
  251. package/_internal/components/side-navigation/index.d.ts +2 -0
  252. package/_internal/components/skeleton/SkeletonCircle.d.ts +19 -0
  253. package/_internal/components/skeleton/SkeletonCircle.js +30 -0
  254. package/_internal/components/skeleton/SkeletonRectangle.d.ts +19 -0
  255. package/_internal/components/skeleton/SkeletonRectangle.js +33 -0
  256. package/_internal/components/skeleton/SkeletonTypography.d.ts +19 -0
  257. package/_internal/components/skeleton/SkeletonTypography.js +31 -0
  258. package/_internal/components/skeleton/index.d.ts +4 -0
  259. package/_internal/components/slider/Slider.d.ts +44 -0
  260. package/_internal/components/slider/Slider.js +232 -0
  261. package/_internal/components/slider/index.d.ts +2 -0
  262. package/_internal/components/slideshow/Slides.d.ts +49 -0
  263. package/_internal/components/slideshow/Slides.js +86 -0
  264. package/_internal/components/slideshow/Slideshow.d.ts +35 -0
  265. package/_internal/components/slideshow/Slideshow.js +104 -0
  266. package/_internal/components/slideshow/SlideshowControls.d.ts +65 -0
  267. package/_internal/components/slideshow/SlideshowControls.js +139 -0
  268. package/_internal/components/slideshow/SlideshowItem.d.ts +23 -0
  269. package/_internal/components/slideshow/SlideshowItem.js +32 -0
  270. package/_internal/components/slideshow/SlideshowItemGroup.js +44 -0
  271. package/_internal/components/slideshow/constants.d.ts +13 -0
  272. package/_internal/components/slideshow/constants.js +16 -0
  273. package/_internal/components/slideshow/index.d.ts +4 -0
  274. package/_internal/components/slideshow/usePaginationVisibleRange.js +41 -0
  275. package/_internal/components/slideshow/useSlideFocusManagement.js +64 -0
  276. package/_internal/components/slideshow/useSlideScroll.js +57 -0
  277. package/_internal/components/slideshow/useSwipeNavigate.js +21 -0
  278. package/_internal/components/switch/Switch.d.ts +24 -0
  279. package/_internal/components/switch/Switch.js +54 -0
  280. package/_internal/components/switch/index.d.ts +1 -0
  281. package/_internal/components/table/Table.d.ts +20 -0
  282. package/_internal/components/table/Table.js +28 -0
  283. package/_internal/components/table/TableBody.d.ts +20 -0
  284. package/_internal/components/table/TableBody.js +22 -0
  285. package/_internal/components/table/TableCell.d.ts +23 -0
  286. package/_internal/components/table/TableCell.js +23 -0
  287. package/_internal/components/table/TableHeader.d.ts +20 -0
  288. package/_internal/components/table/TableHeader.js +23 -0
  289. package/_internal/components/table/TableRow.d.ts +23 -0
  290. package/_internal/components/table/TableRow.js +28 -0
  291. package/_internal/components/table/index.d.ts +6 -0
  292. package/_internal/components/tabs/Tab.d.ts +39 -0
  293. package/_internal/components/tabs/Tab.js +39 -0
  294. package/_internal/components/tabs/TabList.d.ts +22 -0
  295. package/_internal/components/tabs/TabList.js +37 -0
  296. package/_internal/components/tabs/TabPanel.d.ts +25 -0
  297. package/_internal/components/tabs/TabPanel.js +30 -0
  298. package/_internal/components/tabs/TabProvider.d.ts +27 -0
  299. package/_internal/components/tabs/TabProvider.js +51 -0
  300. package/_internal/components/tabs/index.d.ts +5 -0
  301. package/_internal/components/tabs/state.js +55 -0
  302. package/_internal/components/text/Text.d.ts +17 -0
  303. package/_internal/components/text/Text.js +33 -0
  304. package/_internal/components/text/index.d.ts +1 -0
  305. package/_internal/components/text-field/RawInputText.d.ts +20 -0
  306. package/_internal/components/text-field/RawInputText.js +23 -0
  307. package/_internal/components/text-field/RawInputTextarea.d.ts +21 -0
  308. package/_internal/components/text-field/RawInputTextarea.js +34 -0
  309. package/_internal/components/text-field/TextField.d.ts +46 -0
  310. package/_internal/components/text-field/TextField.js +122 -0
  311. package/_internal/components/text-field/index.d.ts +3 -0
  312. package/_internal/components/text-field/useFitRowsToContent.js +27 -0
  313. package/_internal/components/thumbnail/Thumbnail.d.ts +31 -0
  314. package/_internal/components/thumbnail/Thumbnail.js +45 -0
  315. package/_internal/components/thumbnail/index.d.ts +3 -0
  316. package/_internal/components/thumbnail/types.d.ts +49 -0
  317. package/_internal/components/thumbnail/types.js +23 -0
  318. package/_internal/components/thumbnail/useFocusPointStyle.d.ts +15 -0
  319. package/_internal/components/thumbnail/useFocusPointStyle.js +53 -0
  320. package/_internal/components/thumbnail/useImageLoad.js +23 -0
  321. package/_internal/components/time-picker-field/TimePickerField.d.ts +38 -0
  322. package/_internal/components/time-picker-field/TimePickerField.js +103 -0
  323. package/_internal/components/time-picker-field/index.d.ts +2 -0
  324. package/_internal/components/toolbar/Toolbar.d.ts +28 -0
  325. package/_internal/components/toolbar/Toolbar.js +21 -0
  326. package/_internal/components/toolbar/index.d.ts +1 -0
  327. package/_internal/components/tooltip/Tooltip.d.ts +23 -0
  328. package/_internal/components/tooltip/Tooltip.js +69 -0
  329. package/_internal/components/tooltip/context.js +15 -0
  330. package/_internal/components/tooltip/index.d.ts +2 -0
  331. package/_internal/components/tooltip/useInjectTooltipRef.js +43 -0
  332. package/_internal/components/tooltip/useTooltipOpen.js +36 -0
  333. package/_internal/components/uploader/Uploader.d.ts +29 -0
  334. package/_internal/components/uploader/Uploader.js +71 -0
  335. package/_internal/components/uploader/index.d.ts +2 -0
  336. package/_internal/components/user-block/UserBlock.d.ts +33 -0
  337. package/_internal/components/user-block/UserBlock.js +88 -0
  338. package/_internal/components/user-block/index.d.ts +2 -0
  339. package/_internal/constants.js +2 -0
  340. package/_internal/hooks/useBooleanState.js +13 -0
  341. package/_internal/hooks/useCallbackOnEscape.js +30 -0
  342. package/_internal/hooks/useChipGroupNavigation.d.ts +12 -0
  343. package/_internal/hooks/useChipGroupNavigation.js +49 -0
  344. package/_internal/hooks/useClickAway.d.ts +16 -0
  345. package/_internal/hooks/useClickAway.js +20 -0
  346. package/_internal/hooks/useDisableBodyScroll.js +25 -0
  347. package/_internal/hooks/useEventCallback.js +21 -0
  348. package/_internal/hooks/useFocus.js +19 -0
  349. package/_internal/hooks/useFocusTrap.js +28 -0
  350. package/_internal/hooks/useFocusWithin.js +27 -0
  351. package/_internal/hooks/useId.js +16 -0
  352. package/_internal/hooks/useImageSize.js +19 -0
  353. package/_internal/hooks/useInfiniteScroll.js +36 -0
  354. package/_internal/hooks/useIntersectionObserver.js +24 -0
  355. package/_internal/hooks/useInterval.js +26 -0
  356. package/_internal/hooks/useIsomorphicLayoutEffect.js +9 -0
  357. package/_internal/hooks/useKeyboardListNavigation.d.ts +17 -0
  358. package/_internal/hooks/useKeyboardListNavigation.js +136 -0
  359. package/_internal/hooks/useListenFocus.js +23 -0
  360. package/_internal/hooks/useOverflowTooltipLabel.js +27 -0
  361. package/_internal/hooks/usePreviousValue.js +15 -0
  362. package/_internal/hooks/useRestoreFocusOnClose.js +47 -0
  363. package/_internal/hooks/useRovingTabIndexContainer.js +31 -0
  364. package/_internal/hooks/useSizeOnWindowResize.js +26 -0
  365. package/_internal/hooks/useSlideshowControls.d.ts +63 -0
  366. package/_internal/hooks/useSlideshowControls.js +105 -0
  367. package/_internal/hooks/useStopPropagation.js +18 -0
  368. package/_internal/hooks/useTransitionVisibility.js +41 -0
  369. package/_internal/node_modules/@floating-ui/core/dist/floating-ui.core.js +536 -0
  370. package/_internal/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +528 -0
  371. package/_internal/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +209 -0
  372. package/_internal/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +144 -0
  373. package/_internal/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +135 -0
  374. package/_internal/node_modules/body-scroll-lock/lib/bodyScrollLock.esm.js +114 -0
  375. package/_internal/node_modules/classnames/index.js +45 -0
  376. package/_internal/packages/lumx-core/src/js/components/AlertDialog/index.d.ts +15 -0
  377. package/_internal/packages/lumx-core/src/js/components/AlertDialog/index.js +116 -0
  378. package/_internal/packages/lumx-core/src/js/components/Avatar/index.d.ts +27 -0
  379. package/_internal/packages/lumx-core/src/js/components/Avatar/index.js +49 -0
  380. package/_internal/packages/lumx-core/src/js/components/Badge/BadgeWrapper.d.ts +14 -0
  381. package/_internal/packages/lumx-core/src/js/components/Badge/BadgeWrapper.js +21 -0
  382. package/_internal/packages/lumx-core/src/js/components/Badge/index.d.ts +18 -0
  383. package/_internal/packages/lumx-core/src/js/components/Badge/index.js +38 -0
  384. package/_internal/packages/lumx-core/src/js/components/Button/Button.d.ts +41 -0
  385. package/_internal/packages/lumx-core/src/js/components/Button/Button.js +46 -0
  386. package/_internal/packages/lumx-core/src/js/components/Button/ButtonGroup.d.ts +17 -0
  387. package/_internal/packages/lumx-core/src/js/components/Button/ButtonGroup.js +34 -0
  388. package/_internal/packages/lumx-core/src/js/components/Button/ButtonRoot.d.ts +46 -0
  389. package/_internal/packages/lumx-core/src/js/components/Button/ButtonRoot.js +75 -0
  390. package/_internal/packages/lumx-core/src/js/components/Button/IconButton.d.ts +24 -0
  391. package/_internal/packages/lumx-core/src/js/components/Button/IconButton.js +46 -0
  392. package/_internal/packages/lumx-core/src/js/components/Checkbox/index.d.ts +35 -0
  393. package/_internal/packages/lumx-core/src/js/components/Checkbox/index.js +83 -0
  394. package/_internal/packages/lumx-core/src/js/components/Chip/ChipGroup.d.ts +21 -0
  395. package/_internal/packages/lumx-core/src/js/components/Chip/ChipGroup.js +32 -0
  396. package/_internal/packages/lumx-core/src/js/components/Chip/SelectionChipGroup.d.ts +29 -0
  397. package/_internal/packages/lumx-core/src/js/components/Chip/SelectionChipGroup.js +66 -0
  398. package/_internal/packages/lumx-core/src/js/components/Chip/index.d.ts +63 -0
  399. package/_internal/packages/lumx-core/src/js/components/Chip/index.js +78 -0
  400. package/_internal/packages/lumx-core/src/js/components/Chip/setupSelectionChipGroupEvents.js +97 -0
  401. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxButton.d.ts +34 -0
  402. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxButton.js +51 -0
  403. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxInput.d.ts +34 -0
  404. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxInput.js +56 -0
  405. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxList.d.ts +36 -0
  406. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxList.js +34 -0
  407. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOption.d.ts +53 -0
  408. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOption.js +73 -0
  409. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionAction.js +33 -0
  410. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionMoreInfo.d.ts +29 -0
  411. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionMoreInfo.js +53 -0
  412. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionSkeleton.d.ts +32 -0
  413. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionSkeleton.js +44 -0
  414. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxPopover.js +47 -0
  415. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxSection.d.ts +36 -0
  416. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxSection.js +36 -0
  417. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxState.d.ts +64 -0
  418. package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxState.js +86 -0
  419. package/_internal/packages/lumx-core/src/js/components/Combobox/constants.js +4 -0
  420. package/_internal/packages/lumx-core/src/js/components/Combobox/setupCombobox.js +350 -0
  421. package/_internal/packages/lumx-core/src/js/components/Combobox/setupComboboxButton.js +84 -0
  422. package/_internal/packages/lumx-core/src/js/components/Combobox/setupComboboxInput.js +95 -0
  423. package/_internal/packages/lumx-core/src/js/components/Combobox/setupListbox.js +84 -0
  424. package/_internal/packages/lumx-core/src/js/components/Combobox/subscribeComboboxState.js +43 -0
  425. package/_internal/packages/lumx-core/src/js/components/Combobox/types.d.ts +59 -0
  426. package/_internal/packages/lumx-core/src/js/components/Combobox/utils.js +63 -0
  427. package/_internal/packages/lumx-core/src/js/components/Dialog/index.d.ts +20 -0
  428. package/_internal/packages/lumx-core/src/js/components/Dialog/index.js +93 -0
  429. package/_internal/packages/lumx-core/src/js/components/Divider/index.d.ts +13 -0
  430. package/_internal/packages/lumx-core/src/js/components/Divider/index.js +29 -0
  431. package/_internal/packages/lumx-core/src/js/components/DragHandle/index.d.ts +13 -0
  432. package/_internal/packages/lumx-core/src/js/components/DragHandle/index.js +37 -0
  433. package/_internal/packages/lumx-core/src/js/components/ExpansionPanel/index.d.ts +51 -0
  434. package/_internal/packages/lumx-core/src/js/components/ExpansionPanel/index.js +92 -0
  435. package/_internal/packages/lumx-core/src/js/components/Flag/index.d.ts +24 -0
  436. package/_internal/packages/lumx-core/src/js/components/Flag/index.js +41 -0
  437. package/_internal/packages/lumx-core/src/js/components/FlexBox/index.d.ts +34 -0
  438. package/_internal/packages/lumx-core/src/js/components/FlexBox/index.js +39 -0
  439. package/_internal/packages/lumx-core/src/js/components/FlexBox/types.d.ts +9 -0
  440. package/_internal/packages/lumx-core/src/js/components/GenericBlock/constants.d.ts +22 -0
  441. package/_internal/packages/lumx-core/src/js/components/GenericBlock/constants.js +15 -0
  442. package/_internal/packages/lumx-core/src/js/components/GenericBlock/index.d.ts +66 -0
  443. package/_internal/packages/lumx-core/src/js/components/GenericBlock/index.js +63 -0
  444. package/_internal/packages/lumx-core/src/js/components/GridColumn/GridColumn.d.ts +27 -0
  445. package/_internal/packages/lumx-core/src/js/components/GridColumn/GridColumn.js +44 -0
  446. package/_internal/packages/lumx-core/src/js/components/GridColumn/index.d.ts +1 -0
  447. package/_internal/packages/lumx-core/src/js/components/Heading/constants.js +19 -0
  448. package/_internal/packages/lumx-core/src/js/components/Heading/index.d.ts +14 -0
  449. package/_internal/packages/lumx-core/src/js/components/Heading/index.js +34 -0
  450. package/_internal/packages/lumx-core/src/js/components/Heading/utils.js +14 -0
  451. package/_internal/packages/lumx-core/src/js/components/Icon/constants.d.ts +4 -0
  452. package/_internal/packages/lumx-core/src/js/components/Icon/index.d.ts +34 -0
  453. package/_internal/packages/lumx-core/src/js/components/Icon/index.js +66 -0
  454. package/_internal/packages/lumx-core/src/js/components/ImageBlock/ImageCaption.d.ts +19 -0
  455. package/_internal/packages/lumx-core/src/js/components/ImageBlock/ImageCaption.js +61 -0
  456. package/_internal/packages/lumx-core/src/js/components/ImageBlock/index.d.ts +52 -0
  457. package/_internal/packages/lumx-core/src/js/components/ImageBlock/index.js +80 -0
  458. package/_internal/packages/lumx-core/src/js/components/InlineList/index.d.ts +34 -0
  459. package/_internal/packages/lumx-core/src/js/components/InlineList/index.js +48 -0
  460. package/_internal/packages/lumx-core/src/js/components/InputHelper/constants.js +9 -0
  461. package/_internal/packages/lumx-core/src/js/components/InputHelper/index.d.ts +21 -0
  462. package/_internal/packages/lumx-core/src/js/components/InputHelper/index.js +34 -0
  463. package/_internal/packages/lumx-core/src/js/components/InputLabel/index.d.ts +24 -0
  464. package/_internal/packages/lumx-core/src/js/components/InputLabel/index.js +31 -0
  465. package/_internal/packages/lumx-core/src/js/components/Lightbox/index.d.ts +14 -0
  466. package/_internal/packages/lumx-core/src/js/components/Lightbox/index.js +70 -0
  467. package/_internal/packages/lumx-core/src/js/components/Link/index.d.ts +34 -0
  468. package/_internal/packages/lumx-core/src/js/components/Link/index.js +40 -0
  469. package/_internal/packages/lumx-core/src/js/components/LinkPreview/index.d.ts +36 -0
  470. package/_internal/packages/lumx-core/src/js/components/LinkPreview/index.js +94 -0
  471. package/_internal/packages/lumx-core/src/js/components/List/ListDivider.d.ts +12 -0
  472. package/_internal/packages/lumx-core/src/js/components/List/ListDivider.js +36 -0
  473. package/_internal/packages/lumx-core/src/js/components/List/ListItem.d.ts +41 -0
  474. package/_internal/packages/lumx-core/src/js/components/List/ListItem.js +66 -0
  475. package/_internal/packages/lumx-core/src/js/components/List/ListItemAction.d.ts +10 -0
  476. package/_internal/packages/lumx-core/src/js/components/List/ListItemAction.js +36 -0
  477. package/_internal/packages/lumx-core/src/js/components/List/ListSection.d.ts +27 -0
  478. package/_internal/packages/lumx-core/src/js/components/List/ListSection.js +51 -0
  479. package/_internal/packages/lumx-core/src/js/components/List/index.d.ts +20 -0
  480. package/_internal/packages/lumx-core/src/js/components/List/index.js +37 -0
  481. package/_internal/packages/lumx-core/src/js/components/Menu/MenuButton.d.ts +28 -0
  482. package/_internal/packages/lumx-core/src/js/components/Menu/MenuButton.js +29 -0
  483. package/_internal/packages/lumx-core/src/js/components/Menu/MenuItem.d.ts +30 -0
  484. package/_internal/packages/lumx-core/src/js/components/Menu/MenuItem.js +34 -0
  485. package/_internal/packages/lumx-core/src/js/components/Menu/MenuList.js +20 -0
  486. package/_internal/packages/lumx-core/src/js/components/Menu/MenuPopover.d.ts +12 -0
  487. package/_internal/packages/lumx-core/src/js/components/Menu/MenuPopover.js +32 -0
  488. package/_internal/packages/lumx-core/src/js/components/Menu/MenuTrigger.js +20 -0
  489. package/_internal/packages/lumx-core/src/js/components/Menu/setupMenu.js +256 -0
  490. package/_internal/packages/lumx-core/src/js/components/Menu/utils.js +16 -0
  491. package/_internal/packages/lumx-core/src/js/components/Message/index.d.ts +31 -0
  492. package/_internal/packages/lumx-core/src/js/components/Message/index.js +85 -0
  493. package/_internal/packages/lumx-core/src/js/components/Mosaic/index.d.ts +18 -0
  494. package/_internal/packages/lumx-core/src/js/components/Mosaic/index.js +70 -0
  495. package/_internal/packages/lumx-core/src/js/components/Popover/constants.d.ts +39 -0
  496. package/_internal/packages/lumx-core/src/js/components/Popover/constants.js +37 -0
  497. package/_internal/packages/lumx-core/src/js/components/Popover/index.d.ts +65 -0
  498. package/_internal/packages/lumx-core/src/js/components/Popover/index.js +74 -0
  499. package/_internal/packages/lumx-core/src/js/components/Popover/types.d.ts +39 -0
  500. package/_internal/packages/lumx-core/src/js/components/Popover/utils/buildPopoverMiddleware.js +53 -0
  501. package/_internal/packages/lumx-core/src/js/components/Popover/utils/computeArrowStyles.js +13 -0
  502. package/_internal/packages/lumx-core/src/js/components/Popover/utils/getFloatingPlacement.js +10 -0
  503. package/_internal/packages/lumx-core/src/js/components/Popover/utils/parseAutoPlacement.js +21 -0
  504. package/_internal/packages/lumx-core/src/js/components/Popover/utils/parseFitWidth.js +12 -0
  505. package/_internal/packages/lumx-core/src/js/components/PopoverDialog/index.d.ts +13 -0
  506. package/_internal/packages/lumx-core/src/js/components/PopoverDialog/index.js +15 -0
  507. package/_internal/packages/lumx-core/src/js/components/ProgressCircular/index.d.ts +32 -0
  508. package/_internal/packages/lumx-core/src/js/components/ProgressCircular/index.js +57 -0
  509. package/_internal/packages/lumx-core/src/js/components/ProgressLinear/index.d.ts +13 -0
  510. package/_internal/packages/lumx-core/src/js/components/ProgressLinear/index.js +34 -0
  511. package/_internal/packages/lumx-core/src/js/components/RadioButton/index.d.ts +35 -0
  512. package/_internal/packages/lumx-core/src/js/components/RadioButton/index.js +71 -0
  513. package/_internal/packages/lumx-core/src/js/components/RadioGroup/index.d.ts +15 -0
  514. package/_internal/packages/lumx-core/src/js/components/RadioGroup/index.js +35 -0
  515. package/_internal/packages/lumx-core/src/js/components/RawClickable/index.d.ts +17 -0
  516. package/_internal/packages/lumx-core/src/js/components/RawClickable/index.js +34 -0
  517. package/_internal/packages/lumx-core/src/js/components/SelectButton/index.d.ts +58 -0
  518. package/_internal/packages/lumx-core/src/js/components/SelectButton/index.js +85 -0
  519. package/_internal/packages/lumx-core/src/js/components/SelectTextField/index.js +78 -0
  520. package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonCircle.d.ts +18 -0
  521. package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonCircle.js +33 -0
  522. package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonRectangle.d.ts +34 -0
  523. package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonRectangle.js +49 -0
  524. package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonTypography.d.ts +24 -0
  525. package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonTypography.js +38 -0
  526. package/_internal/packages/lumx-core/src/js/components/Skeleton/index.d.ts +3 -0
  527. package/_internal/packages/lumx-core/src/js/components/Switch/index.d.ts +37 -0
  528. package/_internal/packages/lumx-core/src/js/components/Switch/index.js +78 -0
  529. package/_internal/packages/lumx-core/src/js/components/Table/TableBody.d.ts +15 -0
  530. package/_internal/packages/lumx-core/src/js/components/Table/TableBody.js +29 -0
  531. package/_internal/packages/lumx-core/src/js/components/Table/TableCell.d.ts +42 -0
  532. package/_internal/packages/lumx-core/src/js/components/Table/TableCell.js +101 -0
  533. package/_internal/packages/lumx-core/src/js/components/Table/TableHeader.d.ts +15 -0
  534. package/_internal/packages/lumx-core/src/js/components/Table/TableHeader.js +33 -0
  535. package/_internal/packages/lumx-core/src/js/components/Table/TableRow.d.ts +22 -0
  536. package/_internal/packages/lumx-core/src/js/components/Table/TableRow.js +42 -0
  537. package/_internal/packages/lumx-core/src/js/components/Table/constants.d.ts +1 -0
  538. package/_internal/packages/lumx-core/src/js/components/Table/constants.js +11 -0
  539. package/_internal/packages/lumx-core/src/js/components/Table/index.d.ts +20 -0
  540. package/_internal/packages/lumx-core/src/js/components/Table/index.js +31 -0
  541. package/_internal/packages/lumx-core/src/js/components/Tabs/Tab.d.ts +54 -0
  542. package/_internal/packages/lumx-core/src/js/components/Tabs/Tab.js +69 -0
  543. package/_internal/packages/lumx-core/src/js/components/Tabs/TabList.d.ts +27 -0
  544. package/_internal/packages/lumx-core/src/js/components/Tabs/TabList.js +52 -0
  545. package/_internal/packages/lumx-core/src/js/components/Tabs/TabPanel.d.ts +26 -0
  546. package/_internal/packages/lumx-core/src/js/components/Tabs/TabPanel.js +41 -0
  547. package/_internal/packages/lumx-core/src/js/components/Tabs/constants.js +7 -0
  548. package/_internal/packages/lumx-core/src/js/components/Tabs/state.js +53 -0
  549. package/_internal/packages/lumx-core/src/js/components/Text/index.d.ts +55 -0
  550. package/_internal/packages/lumx-core/src/js/components/Text/index.js +50 -0
  551. package/_internal/packages/lumx-core/src/js/components/TextField/RawInputText.d.ts +21 -0
  552. package/_internal/packages/lumx-core/src/js/components/TextField/RawInputText.js +40 -0
  553. package/_internal/packages/lumx-core/src/js/components/TextField/RawInputTextarea.d.ts +19 -0
  554. package/_internal/packages/lumx-core/src/js/components/TextField/RawInputTextarea.js +40 -0
  555. package/_internal/packages/lumx-core/src/js/components/TextField/TextField.d.ts +70 -0
  556. package/_internal/packages/lumx-core/src/js/components/TextField/TextField.js +143 -0
  557. package/_internal/packages/lumx-core/src/js/components/TextField/constants.js +15 -0
  558. package/_internal/packages/lumx-core/src/js/components/Thumbnail/index.d.ts +60 -0
  559. package/_internal/packages/lumx-core/src/js/components/Thumbnail/index.js +114 -0
  560. package/_internal/packages/lumx-core/src/js/components/Thumbnail/types.d.ts +39 -0
  561. package/_internal/packages/lumx-core/src/js/components/Thumbnail/utils.d.ts +1 -0
  562. package/_internal/packages/lumx-core/src/js/components/Thumbnail/utils.js +76 -0
  563. package/_internal/packages/lumx-core/src/js/components/TimePickerField/index.d.ts +70 -0
  564. package/_internal/packages/lumx-core/src/js/components/TimePickerField/index.js +53 -0
  565. package/_internal/packages/lumx-core/src/js/components/Toolbar/index.d.ts +19 -0
  566. package/_internal/packages/lumx-core/src/js/components/Toolbar/index.js +51 -0
  567. package/_internal/packages/lumx-core/src/js/components/Tooltip/constants.d.ts +4 -0
  568. package/_internal/packages/lumx-core/src/js/components/Tooltip/constants.js +8 -0
  569. package/_internal/packages/lumx-core/src/js/components/Tooltip/index.d.ts +25 -0
  570. package/_internal/packages/lumx-core/src/js/components/Tooltip/index.js +55 -0
  571. package/_internal/packages/lumx-core/src/js/components/Tooltip/tooltipOpenManager.js +93 -0
  572. package/_internal/packages/lumx-core/src/js/components/Uploader/index.d.ts +59 -0
  573. package/_internal/packages/lumx-core/src/js/components/Uploader/index.js +79 -0
  574. package/_internal/packages/lumx-core/src/js/components/UserBlock/index.d.ts +124 -0
  575. package/_internal/packages/lumx-core/src/js/components/UserBlock/index.js +101 -0
  576. package/_internal/packages/lumx-core/src/js/constants/browser/index.js +7 -0
  577. package/_internal/packages/lumx-core/src/js/constants/components/index.js +19 -0
  578. package/_internal/packages/lumx-core/src/js/constants/enums/index.d.ts +184 -0
  579. package/_internal/packages/lumx-core/src/js/constants/enums/index.js +140 -0
  580. package/_internal/packages/lumx-core/src/js/constants/index.d.ts +1 -0
  581. package/_internal/packages/lumx-core/src/js/types/AriaAttributes.d.ts +32 -0
  582. package/_internal/packages/lumx-core/src/js/types/Booleanish.d.ts +4 -0
  583. package/_internal/packages/lumx-core/src/js/types/CommonRef.d.ts +4 -0
  584. package/_internal/packages/lumx-core/src/js/types/GenericProps.d.ts +14 -0
  585. package/_internal/packages/lumx-core/src/js/types/HasAriaDisabled.d.ts +9 -0
  586. package/_internal/packages/lumx-core/src/js/types/HasAriaLabelOrLabelledBy.d.ts +19 -0
  587. package/_internal/packages/lumx-core/src/js/types/HasChecked.d.ts +9 -0
  588. package/_internal/packages/lumx-core/src/js/types/HasClassName.d.ts +9 -0
  589. package/_internal/packages/lumx-core/src/js/types/HasCloseMode.d.ts +10 -0
  590. package/_internal/packages/lumx-core/src/js/types/HasDisabled.d.ts +9 -0
  591. package/_internal/packages/lumx-core/src/js/types/HasPolymorphicAs.d.ts +12 -0
  592. package/_internal/packages/lumx-core/src/js/types/HasRequiredLinkHref.d.ts +6 -0
  593. package/_internal/packages/lumx-core/src/js/types/HasTheme.d.ts +10 -0
  594. package/_internal/packages/lumx-core/src/js/types/HeadingElement.d.ts +5 -0
  595. package/_internal/packages/lumx-core/src/js/types/JSXElement.d.ts +13 -0
  596. package/_internal/packages/lumx-core/src/js/types/KebabCase.d.ts +5 -0
  597. package/_internal/packages/lumx-core/src/js/types/LumxClassName.d.ts +7 -0
  598. package/_internal/packages/lumx-core/src/js/types/Selector.d.ts +11 -0
  599. package/_internal/packages/lumx-core/src/js/types/TextElement.d.ts +7 -0
  600. package/_internal/packages/lumx-core/src/js/types/ValueOf.d.ts +5 -0
  601. package/_internal/packages/lumx-core/src/js/types/index.d.ts +18 -0
  602. package/_internal/packages/lumx-core/src/js/utils/ClickAway/index.js +37 -0
  603. package/_internal/packages/lumx-core/src/js/utils/InfiniteScroll/index.d.ts +9 -0
  604. package/_internal/packages/lumx-core/src/js/utils/InfiniteScroll/index.js +21 -0
  605. package/_internal/packages/lumx-core/src/js/utils/InfiniteScroll/setupInfiniteScrollObserver.js +18 -0
  606. package/_internal/packages/lumx-core/src/js/utils/Portal/index.d.ts +28 -0
  607. package/_internal/packages/lumx-core/src/js/utils/_internal/color/resolveColorWithVariants.js +9 -0
  608. package/_internal/packages/lumx-core/src/js/utils/browser/createSelectorTreeWalker.js +20 -0
  609. package/_internal/packages/lumx-core/src/js/utils/browser/css/combineSize.js +14 -0
  610. package/_internal/packages/lumx-core/src/js/utils/browser/css/resolveCssSize.js +8 -0
  611. package/_internal/packages/lumx-core/src/js/utils/browser/css/types.d.ts +7 -0
  612. package/_internal/packages/lumx-core/src/js/utils/browser/isFocusVisible.js +11 -0
  613. package/_internal/packages/lumx-core/src/js/utils/browser/isHoverNotSupported.js +5 -0
  614. package/_internal/packages/lumx-core/src/js/utils/browser/isPrintableKey.js +12 -0
  615. package/_internal/packages/lumx-core/src/js/utils/browser/lastDescendant.js +9 -0
  616. package/_internal/packages/lumx-core/src/js/utils/browser/querySelectorInclusive.js +18 -0
  617. package/_internal/packages/lumx-core/src/js/utils/browser/trackContainerFocus.js +28 -0
  618. package/_internal/packages/lumx-core/src/js/utils/classNames/action-area/index.js +22 -0
  619. package/_internal/packages/lumx-core/src/js/utils/classNames/bem/block.js +18 -0
  620. package/_internal/packages/lumx-core/src/js/utils/classNames/bem/element.js +7 -0
  621. package/_internal/packages/lumx-core/src/js/utils/classNames/bem/index.js +22 -0
  622. package/_internal/packages/lumx-core/src/js/utils/classNames/bem/modifier.js +19 -0
  623. package/_internal/packages/lumx-core/src/js/utils/classNames/color/index.js +38 -0
  624. package/_internal/packages/lumx-core/src/js/utils/classNames/index.js +12 -0
  625. package/_internal/packages/lumx-core/src/js/utils/classNames/spacing/index.js +31 -0
  626. package/_internal/packages/lumx-core/src/js/utils/classNames/typography/index.js +10 -0
  627. package/_internal/packages/lumx-core/src/js/utils/classNames/visually-hidden/index.js +9 -0
  628. package/_internal/packages/lumx-core/src/js/utils/disabledState/index.js +13 -0
  629. package/_internal/packages/lumx-core/src/js/utils/events/keyboard.js +15 -0
  630. package/_internal/packages/lumx-core/src/js/utils/focus/constants.js +13 -0
  631. package/_internal/packages/lumx-core/src/js/utils/focus/getFirstAndLastFocusable.js +20 -0
  632. package/_internal/packages/lumx-core/src/js/utils/focus/getFocusableElements.js +8 -0
  633. package/_internal/packages/lumx-core/src/js/utils/focus/setupFocusTrap.js +83 -0
  634. package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createActiveItemState.js +38 -0
  635. package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createGridFocusNavigation.js +182 -0
  636. package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createListFocusNavigation.js +151 -0
  637. package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createPendingNavigation.js +23 -0
  638. package/_internal/packages/lumx-core/src/js/utils/focusNavigation/setupRovingTabIndex.js +167 -0
  639. package/_internal/packages/lumx-core/src/js/utils/function/listenerTower.js +25 -0
  640. package/_internal/packages/lumx-core/src/js/utils/iterable/first.js +8 -0
  641. package/_internal/packages/lumx-core/src/js/utils/locale/getCurrentLocale.js +10 -0
  642. package/_internal/packages/lumx-core/src/js/utils/select/findOptionById.js +19 -0
  643. package/_internal/packages/lumx-core/src/js/utils/select/getOptionDisplayName.js +19 -0
  644. package/_internal/packages/lumx-core/src/js/utils/select/renderSelectOptions.js +51 -0
  645. package/_internal/packages/lumx-core/src/js/utils/select/toggleSelection.js +39 -0
  646. package/_internal/packages/lumx-core/src/js/utils/select/types.d.ts +203 -0
  647. package/_internal/packages/lumx-core/src/js/utils/selectors/getWithSelector.js +9 -0
  648. package/_internal/packages/lumx-core/src/js/utils/selectors/groupBySelector.js +21 -0
  649. package/_internal/packages/lumx-core/src/js/utils/time/buildTimeList.d.ts +20 -0
  650. package/_internal/packages/lumx-core/src/js/utils/time/buildTimeList.js +36 -0
  651. package/_internal/packages/lumx-core/src/js/utils/time/formatTime.js +14 -0
  652. package/_internal/packages/lumx-core/src/js/utils/time/getDateAtTime.js +12 -0
  653. package/_internal/packages/lumx-core/src/js/utils/time/isDateOnTime.js +10 -0
  654. package/_internal/packages/lumx-core/src/js/utils/time/parseTimeInput.js +46 -0
  655. package/_internal/packages/lumx-core/src/js/utils/time/snapTimeToBounds.js +21 -0
  656. package/_internal/packages/lumx-core/src/js/utils/time/timeOfDayMinutes.js +9 -0
  657. package/_internal/packages/lumx-core/src/js/utils/typeahead/index.js +77 -0
  658. package/_internal/utils/A11YLiveMessage/index.d.ts +50 -0
  659. package/_internal/utils/A11YLiveMessage/index.js +28 -0
  660. package/_internal/utils/ClickAwayProvider/ClickAwayProvider.d.ts +23 -0
  661. package/_internal/utils/ClickAwayProvider/ClickAwayProvider.js +46 -0
  662. package/_internal/utils/ClickAwayProvider/index.d.ts +1 -0
  663. package/_internal/utils/InfiniteScroll/InfiniteScroll.d.ts +10 -0
  664. package/_internal/utils/InfiniteScroll/InfiniteScroll.js +18 -0
  665. package/_internal/utils/InfiniteScroll/index.d.ts +2 -0
  666. package/_internal/utils/Portal/Portal.d.ts +15 -0
  667. package/_internal/utils/Portal/Portal.js +23 -0
  668. package/_internal/utils/Portal/PortalProvider.d.ts +14 -0
  669. package/_internal/utils/Portal/PortalProvider.js +9 -0
  670. package/_internal/utils/Portal/index.d.ts +3 -0
  671. package/_internal/utils/browser/DOM/findImage.js +5 -0
  672. package/_internal/utils/browser/DOM/startViewTransition.js +47 -0
  673. package/_internal/utils/browser/isReducedMotion.js +8 -0
  674. package/_internal/utils/browser/isScrollSnapSupported.js +8 -0
  675. package/_internal/utils/browser/onScrollEnd.js +25 -0
  676. package/_internal/utils/date/addMonthResetDay.js +12 -0
  677. package/_internal/utils/date/formatDayNumber.js +8 -0
  678. package/_internal/utils/date/getFirstDayOfWeek.js +42 -0
  679. package/_internal/utils/date/getMonthCalendar.js +43 -0
  680. package/_internal/utils/date/getWeekDays.js +25 -0
  681. package/_internal/utils/date/getYearDisplayName.js +12 -0
  682. package/_internal/utils/date/isDateValid.js +7 -0
  683. package/_internal/utils/date/isSameDay.js +8 -0
  684. package/_internal/utils/disabled/DisabledStateContext.d.ts +21 -0
  685. package/_internal/utils/disabled/DisabledStateContext.js +22 -0
  686. package/_internal/utils/disabled/index.d.ts +1 -0
  687. package/_internal/utils/disabled/useDisableStateProps.d.ts +1 -0
  688. package/_internal/utils/disabled/useDisableStateProps.js +29 -0
  689. package/_internal/utils/locale/parseLocale.js +26 -0
  690. package/_internal/utils/moving-focus/components/MovingFocusProvider/context.d.ts +14 -0
  691. package/_internal/utils/moving-focus/components/MovingFocusProvider/context.js +10 -0
  692. package/_internal/utils/moving-focus/components/MovingFocusProvider/index.d.ts +21 -0
  693. package/_internal/utils/moving-focus/components/MovingFocusProvider/index.js +58 -0
  694. package/_internal/utils/moving-focus/constants.d.ts +19 -0
  695. package/_internal/utils/moving-focus/constants.js +25 -0
  696. package/_internal/utils/moving-focus/ducks/keyboard-navigation.js +453 -0
  697. package/_internal/utils/moving-focus/ducks/slice.js +50 -0
  698. package/_internal/utils/moving-focus/ducks/tab-stop.js +109 -0
  699. package/_internal/utils/moving-focus/hooks/useRovingTabIndex/index.d.ts +1 -0
  700. package/_internal/utils/moving-focus/hooks/useRovingTabIndex/useRovingTabIndex.d.ts +19 -0
  701. package/_internal/utils/moving-focus/hooks/useRovingTabIndex/useRovingTabIndex.js +81 -0
  702. package/_internal/utils/moving-focus/hooks/useVirtualFocus/index.d.ts +2 -0
  703. package/_internal/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocus.d.ts +15 -0
  704. package/_internal/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocus.js +83 -0
  705. package/_internal/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocusParent.d.ts +10 -0
  706. package/_internal/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocusParent.js +47 -0
  707. package/_internal/utils/moving-focus/index.d.ts +5 -0
  708. package/_internal/utils/moving-focus/types.d.ts +177 -0
  709. package/_internal/utils/moving-focus/utils/buildLoopAroundObject.js +22 -0
  710. package/_internal/utils/moving-focus/utils/createGridMap.js +17 -0
  711. package/_internal/utils/moving-focus/utils/getCell.js +94 -0
  712. package/_internal/utils/moving-focus/utils/getCellCoordinates.js +16 -0
  713. package/_internal/utils/moving-focus/utils/getPointerTypeFromEvent.js +11 -0
  714. package/_internal/utils/moving-focus/utils/shouldLoopListHorizontally.js +7 -0
  715. package/_internal/utils/moving-focus/utils/shouldLoopListVertically.js +7 -0
  716. package/_internal/utils/moving-focus/utils/tabStopIsEnabled.js +5 -0
  717. package/_internal/utils/number/clamp.d.ts +12 -0
  718. package/_internal/utils/number/clamp.js +16 -0
  719. package/_internal/utils/object/isEqual.js +14 -0
  720. package/_internal/utils/partitionMulti.js +24 -0
  721. package/_internal/utils/react/OnBeforeUnmount.js +17 -0
  722. package/_internal/utils/react/forwardRef.js +8 -0
  723. package/_internal/utils/react/forwardRefPolymorphic.js +6 -0
  724. package/_internal/utils/react/mergeRefs.js +22 -0
  725. package/_internal/utils/react/skipRender.js +19 -0
  726. package/_internal/utils/react/unref.js +8 -0
  727. package/_internal/utils/react/wrapChildrenIconWithSpaces.js +19 -0
  728. package/_internal/utils/theme/ThemeContext.d.ts +14 -0
  729. package/_internal/utils/theme/ThemeContext.js +11 -0
  730. package/_internal/utils/type/Comp.d.ts +15 -0
  731. package/_internal/utils/type/ComponentRef.d.ts +15 -0
  732. package/_internal/utils/type/HasPolymorphicAs.d.ts +9 -0
  733. package/_internal/utils/type/MaybeElementOrRef.d.ts +9 -0
  734. package/_internal/utils/type/ReactToJSX.d.ts +13 -0
  735. package/_internal/utils/type/index.d.ts +15 -0
  736. package/_internal/utils/type/isComponent.d.ts +13 -0
  737. package/_internal/utils/type/isComponent.js +27 -0
  738. package/_internal/utils/type/isComponentType.d.ts +9 -0
  739. package/_internal/utils/type/isComponentType.js +8 -0
  740. package/index.d.ts +150 -5788
  741. package/index.js +247 -22493
  742. package/package.json +8 -21
  743. package/utils/index.d.ts +14 -413
  744. package/utils/index.js +12 -1440
  745. package/_internal/BvaFEHZn.js +0 -262
  746. package/_internal/BvaFEHZn.js.map +0 -1
  747. package/index.js.map +0 -1
  748. package/utils/index.js.map +0 -1
@@ -0,0 +1,81 @@
1
+ import { getPointerTypeFromEvent } from "../../utils/getPointerTypeFromEvent.js";
2
+ import { NAV_KEYS } from "../../ducks/keyboard-navigation.js";
3
+ import { MovingFocusContext } from "../../components/MovingFocusProvider/context.js";
4
+ import React from "react";
5
+ import isNil from "lodash/isNil.js";
6
+ import uniqueId from "lodash/uniqueId.js";
7
+ //#region src/utils/moving-focus/hooks/useRovingTabIndex/useRovingTabIndex.ts
8
+ /**
9
+ * Includes the given DOM element in the current roving tabindex.
10
+ */
11
+ var useRovingTabIndex = (ref, disabled = false, rowKey = null, autofocus = false) => {
12
+ const idRef = React.useRef(null);
13
+ function getId() {
14
+ if (!idRef.current) idRef.current = uniqueId("rti_");
15
+ return idRef.current;
16
+ }
17
+ const isMounted = React.useRef(false);
18
+ const { dispatch, state } = React.useContext(MovingFocusContext);
19
+ const { direction } = state;
20
+ React.useEffect(() => {
21
+ const id = getId();
22
+ dispatch({
23
+ type: "REGISTER_TAB_STOP",
24
+ payload: {
25
+ id,
26
+ domElementRef: ref,
27
+ rowKey,
28
+ disabled,
29
+ autofocus
30
+ }
31
+ });
32
+ return () => {
33
+ dispatch({
34
+ type: "UNREGISTER_TAB_STOP",
35
+ payload: { id }
36
+ });
37
+ };
38
+ }, [state.listKey]);
39
+ React.useEffect(() => {
40
+ if (isMounted.current) dispatch({
41
+ type: "UPDATE_TAB_STOP",
42
+ payload: {
43
+ id: getId(),
44
+ rowKey,
45
+ disabled
46
+ }
47
+ });
48
+ else isMounted.current = true;
49
+ }, [rowKey, disabled]);
50
+ const handleKeyDown = React.useCallback((evt) => {
51
+ if (!NAV_KEYS[!isNil(rowKey) ? "both" : direction].includes(evt.key)) return;
52
+ dispatch({
53
+ type: "KEY_NAV",
54
+ payload: {
55
+ id: getId(),
56
+ key: evt.key,
57
+ ctrlKey: evt.ctrlKey
58
+ }
59
+ });
60
+ evt.preventDefault();
61
+ evt.stopPropagation();
62
+ }, []);
63
+ const handleClick = React.useCallback((event) => {
64
+ dispatch({
65
+ type: "SELECT_TAB_STOP",
66
+ payload: {
67
+ id: getId(),
68
+ type: getPointerTypeFromEvent(event)
69
+ }
70
+ });
71
+ }, []);
72
+ const selected = getId() === state.selectedId;
73
+ return [
74
+ selected ? 0 : -1,
75
+ selected && state.allowFocusing,
76
+ handleKeyDown,
77
+ handleClick
78
+ ];
79
+ };
80
+ //#endregion
81
+ export { useRovingTabIndex };
@@ -0,0 +1,2 @@
1
+ import { useVirtualFocus } from "./useVirtualFocus.js";
2
+ import { useVirtualFocusParent } from "./useVirtualFocusParent.js";
@@ -0,0 +1,15 @@
1
+ import { BaseHookOptions } from "../../types.js";
2
+
3
+ //#region src/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocus.d.ts
4
+ /**
5
+ * Hook options
6
+ */
7
+ type Options = [/** The DOM id of the tab stop. */id: string, ...baseOptions: BaseHookOptions];
8
+ /**
9
+ * Hook to use in tab stop element of a virtual focus (ex: options of a listbox in a combobox).
10
+ *
11
+ * @returns true if the current tab stop has virtual focus
12
+ */
13
+ declare const useVirtualFocus: (...args: Options) => boolean;
14
+ //#endregion
15
+ export { useVirtualFocus };
@@ -0,0 +1,83 @@
1
+ import { getPointerTypeFromEvent } from "../../utils/getPointerTypeFromEvent.js";
2
+ import { MovingFocusContext } from "../../components/MovingFocusProvider/context.js";
3
+ import React, { useEffect } from "react";
4
+ //#region src/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocus.ts
5
+ /**
6
+ * Hook to use in tab stop element of a virtual focus (ex: options of a listbox in a combobox).
7
+ *
8
+ * @returns true if the current tab stop has virtual focus
9
+ */
10
+ var useVirtualFocus = (id, domElementRef, disabled = false, rowKey = null, autofocus = false) => {
11
+ const isMounted = React.useRef(false);
12
+ const { state, dispatch } = React.useContext(MovingFocusContext);
13
+ React.useEffect(
14
+ () => {
15
+ const { current: domElement } = domElementRef;
16
+ if (!domElement) return;
17
+ const onClick = (event) => {
18
+ dispatch({
19
+ type: "SELECT_TAB_STOP",
20
+ payload: {
21
+ id,
22
+ type: getPointerTypeFromEvent(event)
23
+ }
24
+ });
25
+ };
26
+ domElement.addEventListener("click", onClick);
27
+ dispatch({
28
+ type: "REGISTER_TAB_STOP",
29
+ payload: {
30
+ id,
31
+ domElementRef,
32
+ rowKey,
33
+ disabled,
34
+ autofocus
35
+ }
36
+ });
37
+ return () => {
38
+ domElement.removeEventListener("click", onClick);
39
+ dispatch({
40
+ type: "UNREGISTER_TAB_STOP",
41
+ payload: { id }
42
+ });
43
+ };
44
+ },
45
+ /**
46
+ * Pass the list key as dependency to make tab stops
47
+ * re-register when it changes.
48
+ */
49
+ [state.listKey]
50
+ );
51
+ React.useEffect(() => {
52
+ if (isMounted.current) dispatch({
53
+ type: "UPDATE_TAB_STOP",
54
+ payload: {
55
+ id,
56
+ rowKey,
57
+ disabled
58
+ }
59
+ });
60
+ else isMounted.current = true;
61
+ }, [disabled, rowKey]);
62
+ const isActive = id === state.selectedId;
63
+ useEffect(() => {
64
+ const { current } = domElementRef;
65
+ if (isActive && current && current.scrollIntoView) {
66
+ /**
67
+ * In some cases, the selected item is contained in a popover
68
+ * that won't be immediately set in the correct position.
69
+ * Setting a small timeout before scroll the item into view
70
+ * leaves it time to settle at the correct position.
71
+ */
72
+ const timeout = setTimeout(() => {
73
+ current.scrollIntoView({ block: "nearest" });
74
+ }, 10);
75
+ return () => {
76
+ clearTimeout(timeout);
77
+ };
78
+ }
79
+ }, [domElementRef, isActive]);
80
+ return isActive && state.allowFocusing;
81
+ };
82
+ //#endregion
83
+ export { useVirtualFocus };
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+
3
+ //#region src/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocusParent.d.ts
4
+ /**
5
+ * Hook to use in a virtual focus parent (ex: `aria-activedescendant` on the input of a combobox).
6
+ * * @returns the id of the currently active tab stop (virtual focus)
7
+ */
8
+ declare const useVirtualFocusParent: (ref: React.RefObject<HTMLElement>) => string | undefined;
9
+ //#endregion
10
+ export { useVirtualFocusParent };
@@ -0,0 +1,47 @@
1
+ import { NAV_KEYS } from "../../ducks/keyboard-navigation.js";
2
+ import { MovingFocusContext } from "../../components/MovingFocusProvider/context.js";
3
+ import React from "react";
4
+ //#region src/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocusParent.ts
5
+ /**
6
+ * Hook to use in a virtual focus parent (ex: `aria-activedescendant` on the input of a combobox).
7
+ * * @returns the id of the currently active tab stop (virtual focus)
8
+ */
9
+ var useVirtualFocusParent = (ref) => {
10
+ const { state, dispatch } = React.useContext(MovingFocusContext);
11
+ React.useEffect(() => {
12
+ const { current: element } = ref;
13
+ if (!element) return;
14
+ function handleKeyDown(evt) {
15
+ const eventKey = evt.key;
16
+ if (!NAV_KEYS[state.direction].includes(eventKey) || evt.altKey || !state.allowFocusing && state.firstFocusDirection && !NAV_KEYS[state.firstFocusDirection].includes(eventKey)) return;
17
+ if (!state.allowFocusing && eventKey === "ArrowDown") dispatch({
18
+ type: "SET_ALLOW_FOCUSING",
19
+ payload: {
20
+ allow: true,
21
+ isKeyboardNavigation: true
22
+ }
23
+ });
24
+ else dispatch({
25
+ type: "KEY_NAV",
26
+ payload: {
27
+ key: eventKey,
28
+ ctrlKey: evt.ctrlKey
29
+ }
30
+ });
31
+ evt.preventDefault();
32
+ }
33
+ element.addEventListener("keydown", handleKeyDown);
34
+ return () => {
35
+ element.removeEventListener("keydown", handleKeyDown);
36
+ };
37
+ }, [
38
+ dispatch,
39
+ ref,
40
+ state.allowFocusing,
41
+ state.direction,
42
+ state.firstFocusDirection
43
+ ]);
44
+ return state.allowFocusing && state.selectedId || void 0;
45
+ };
46
+ //#endregion
47
+ export { useVirtualFocusParent };
@@ -0,0 +1,5 @@
1
+ import { MovingFocusProvider } from "./components/MovingFocusProvider/index.js";
2
+ import { MovingFocusContext } from "./components/MovingFocusProvider/context.js";
3
+ import { useVirtualFocus } from "./hooks/useVirtualFocus/useVirtualFocus.js";
4
+ import { useVirtualFocusParent } from "./hooks/useVirtualFocus/useVirtualFocusParent.js";
5
+ import { useRovingTabIndex } from "./hooks/useRovingTabIndex/useRovingTabIndex.js";
@@ -0,0 +1,177 @@
1
+ import { LOOP_AROUND_TYPES } from "./constants.js";
2
+ import { ObjectValues } from "@lumx/core/js/types";
3
+
4
+ //#region src/utils/moving-focus/types.d.ts
5
+ /**
6
+ * Base hook options
7
+ */
8
+ type BaseHookOptions = [
9
+ /**
10
+ * The DOM element to include.
11
+ * This must be the same DOM element for the lifetime of the containing component.
12
+ */
13
+ ref: React.RefObject<Element>,
14
+ /**
15
+ * Whether or not the DOM element is currently enabled. This value can be updated as appropriate throughout the
16
+ * lifetime of the containing component.
17
+ */
18
+ disabled?: boolean,
19
+ /**
20
+ * An optional string value that must be populated if the roving tabindex is being used in a grid. In that case,
21
+ * set it to a unique key for all tabStops part of the same row that the given DOM element is currently part of. You can update this
22
+ * row key as appropriate throughout the lifetime of the containing component, for example if the shape of the
23
+ * grid can change dynamically.
24
+ */
25
+ rowKey?: string | number | null, /** Whether the tab stop should be set as selected by default */autofocus?: boolean];
26
+ type KeyDirection = 'horizontal' | 'vertical' | 'both';
27
+ type LoopTypes = ObjectValues<typeof LOOP_AROUND_TYPES>;
28
+ /**
29
+ * The behavior to set when the end of a column or row is reached
30
+ */
31
+ type LoopAroundByAxis = {
32
+ col: LoopTypes;
33
+ row: LoopTypes;
34
+ };
35
+ /**
36
+ * The LoopAround behavior to have.
37
+ * Can be a boolean as a shortcut
38
+ *
39
+ * * true => { row: 'next-loop', col: 'next-loop' }
40
+ * * false => { row: 'next-end', col: 'next-end' }
41
+ */
42
+ type LoopAround = LoopAroundByAxis | boolean;
43
+ interface MovingFocusOptions {
44
+ /**
45
+ * An optional direction value that only applies when the roving tabindex is not being used within a grid.
46
+ * This value specifies the arrow key behaviour.
47
+ * The default value is 'horizontal'.
48
+ * When set to 'horizontal' then only the ArrowLeft and ArrowRight keys move to the previous and next tab stop
49
+ * respectively.
50
+ * When set to 'vertical' then only the ArrowUp and ArrowDown keys move to the previous and next tab stop
51
+ * respectively.
52
+ * When set to 'both' then both the ArrowLeft and ArrowUp keys can be used to move to the previous tab stop, and
53
+ * both the ArrowRight and ArrowDown keys can be used to move to the next tab stop.
54
+ * If you do not pass an explicit value then the 'horizontal' behaviour applies.
55
+ */
56
+ direction: KeyDirection;
57
+ /**
58
+ * Direction in which initial virtual focus must be set focused on the virtual focus parent.
59
+ * Ex: With `firstFocusDirection: vertical`, pressing "left" and "right" arrows while virtual focus is
60
+ * not enabled yet will do nothing.
61
+ * /!\ Only used with `virtualFocus` hooks.
62
+ */
63
+ firstFocusDirection?: KeyDirection;
64
+ /**
65
+ * An optional flag that, when set to `true`, will loop the tabindex around when the user tries to tab to the
66
+ * first or last elements in the roving tabindex, rather than stopping.
67
+ * The default value is `false` (no looping).
68
+ * Note that this option does not apply if the roving tabindex is being used on a grid.
69
+ */
70
+ loopAround: LoopAround;
71
+ /**
72
+ * Id of the tab stop should accept focus if selectedId is undefined.
73
+ */
74
+ defaultSelectedId: string | null;
75
+ /**
76
+ * Autofocus first or last item after the list/grid is mounted.
77
+ */
78
+ autofocus?: 'first' | 'last';
79
+ /**
80
+ * The axis on which the "skip" shortcuts (home / end) must function.
81
+ */
82
+ gridJumpToShortcutDirection?: 'vertical' | 'horizontal';
83
+ /**
84
+ * Enable default selected item focusing
85
+ *
86
+ * Note: The `allowFocusing` state property is set at "false" by default until an interaction is made.
87
+ * This is required to delay focusing of the selected tab stop DOM element
88
+ * until the user has started interacting with the roving tabindex's controls.
89
+ * If this delay did not occur, the selected control would be focused as soon as it was mounted, which is
90
+ * unlikely to be the desired behaviour for the page.
91
+ */
92
+ allowFocusing: boolean;
93
+ /**
94
+ * An optional an unique key.
95
+ * If this key is set, tab stops will be re-registered each time the key changes.
96
+ * If this key is unset, tab stops will only be registered on mount and unregistered on unmount.
97
+ *
98
+ * This can be useful to set if you have cases where your tab stops might be reordered without being unmounted.
99
+ */
100
+ listKey?: string;
101
+ }
102
+ type TabStopRowKey = string | number;
103
+ type BaseTypeStop = {
104
+ id: string;
105
+ domElementRef: React.RefObject<Element>;
106
+ disabled: boolean;
107
+ rowKey: TabStopRowKey | null;
108
+ autofocus?: boolean;
109
+ };
110
+ type TabStop = Readonly<BaseTypeStop>;
111
+ type GridMap = {
112
+ tabStopsByRowKey: Record<TabStopRowKey, TabStop[]>;
113
+ rowKeys: Array<TabStopRowKey>;
114
+ };
115
+ type State = Readonly<{
116
+ /**
117
+ * Id of the tab stop that can currently accept focus.
118
+ */
119
+ selectedId: string | null; /** Whether the user is currently using keyboard navigation */
120
+ isUsingKeyboard: boolean;
121
+ /**
122
+ * Array of tab stops
123
+ */
124
+ tabStops: readonly TabStop[];
125
+ /**
126
+ * Note: The gridMap is only created if row-related navigation occurs (e.g., move to row start or end).
127
+ * The map gets cleared if registering, unregistering, or updating.
128
+ */
129
+ gridMap: GridMap | null; /** The loop behavior to apply to the columns and rows */
130
+ loopAround: LoopAroundByAxis;
131
+ } & Omit<MovingFocusOptions, 'loopAround'>>;
132
+ type RegisterAction = {
133
+ type: 'REGISTER_TAB_STOP';
134
+ payload: TabStop;
135
+ };
136
+ type UnregisterAction = {
137
+ type: 'UNREGISTER_TAB_STOP';
138
+ payload: {
139
+ id: TabStop['id'];
140
+ };
141
+ };
142
+ type UpdateTabStopAction = {
143
+ type: 'UPDATE_TAB_STOP';
144
+ payload: Pick<TabStop, 'id' | 'rowKey' | 'disabled'>;
145
+ };
146
+ type KeyNavAction = {
147
+ type: 'KEY_NAV';
148
+ payload: {
149
+ id?: TabStop['id'];
150
+ key: string;
151
+ ctrlKey: boolean;
152
+ };
153
+ };
154
+ type SetAllowFocusingAction = {
155
+ type: 'SET_ALLOW_FOCUSING';
156
+ payload: {
157
+ allow: boolean;
158
+ isKeyboardNavigation?: boolean;
159
+ };
160
+ };
161
+ type ResetSelectedTabStopAction = {
162
+ type: 'RESET_SELECTED_TAB_STOP';
163
+ };
164
+ type SelectTabStopAction = {
165
+ type: 'SELECT_TAB_STOP';
166
+ payload: {
167
+ id: TabStop['id'];
168
+ type?: 'pointer' | 'keyboard';
169
+ };
170
+ };
171
+ type OptionsUpdatedAction = {
172
+ type: 'OPTIONS_UPDATED';
173
+ payload: MovingFocusOptions;
174
+ };
175
+ type Action = RegisterAction | UnregisterAction | UpdateTabStopAction | KeyNavAction | SelectTabStopAction | OptionsUpdatedAction | SetAllowFocusingAction | ResetSelectedTabStopAction;
176
+ //#endregion
177
+ export { Action, BaseHookOptions, MovingFocusOptions, State };
@@ -0,0 +1,22 @@
1
+ import { LOOP_AROUND_TYPES } from "../constants.js";
2
+ //#region src/utils/moving-focus/utils/buildLoopAroundObject.ts
3
+ /**
4
+ * Build a loopAround configuration to ensure both row and col behavior are set.
5
+ *
6
+ * Setting a boolean will set the following behaviors:
7
+ *
8
+ * * true => { row: 'next-loop', col: 'next-loop' }
9
+ * * false => { row: 'next-end', col: 'next-end' }
10
+ */
11
+ function buildLoopAroundObject(loopAround) {
12
+ if (typeof loopAround === "boolean" || loopAround === void 0) return loopAround ? {
13
+ row: LOOP_AROUND_TYPES.nextLoop,
14
+ col: LOOP_AROUND_TYPES.nextLoop
15
+ } : {
16
+ row: LOOP_AROUND_TYPES.nextEnd,
17
+ col: LOOP_AROUND_TYPES.nextEnd
18
+ };
19
+ return loopAround;
20
+ }
21
+ //#endregion
22
+ export { buildLoopAroundObject };
@@ -0,0 +1,17 @@
1
+ import groupBy from "lodash/groupBy.js";
2
+ import isNil from "lodash/isNil.js";
3
+ //#region src/utils/moving-focus/utils/createGridMap.ts
4
+ /**
5
+ * Create a map from the given tab stop to sort them by rowKey;
6
+ */
7
+ function createGridMap(tabStops) {
8
+ return {
9
+ tabStopsByRowKey: groupBy(tabStops, "rowKey"),
10
+ rowKeys: tabStops.reduce((acc, { rowKey }) => {
11
+ if (!isNil(rowKey) && !acc.includes(rowKey)) return [...acc, rowKey];
12
+ return acc;
13
+ }, [])
14
+ };
15
+ }
16
+ //#endregion
17
+ export { createGridMap };
@@ -0,0 +1,94 @@
1
+ import { tabStopIsEnabled } from "./tabStopIsEnabled.js";
2
+ import { CELL_SEARCH_DIRECTION } from "../constants.js";
3
+ import findLast from "lodash/findLast.js";
4
+ import find from "lodash/find.js";
5
+ //#region src/utils/moving-focus/utils/getCell.ts
6
+ /**
7
+ * Check that the given coordinate is a simple number
8
+ */
9
+ var isNumberCoords = (coords) => typeof coords === "number";
10
+ /**
11
+ * Check that the given coordinate is a direction
12
+ */
13
+ function isDirectionCoords(coords) {
14
+ return Boolean(typeof coords !== "number" && typeof coords?.from === "number");
15
+ }
16
+ /**
17
+ * Search the given column of a grid map for a cell.
18
+ */
19
+ function findCellInCol(gridMap, col, rowCoords, cellSelector = tabStopIsEnabled) {
20
+ /** The rowIndex might not be strictly successive, so we need to use the actual row index keys. */
21
+ const { rowKeys, tabStopsByRowKey } = gridMap;
22
+ const lastIndex = rowKeys.length - 1;
23
+ /**
24
+ * If the rowCoords.from is set at -1, it means we should search from the start/end.
25
+ */
26
+ let searchIndex = rowCoords.from;
27
+ if (searchIndex === -1) searchIndex = rowCoords.direction === CELL_SEARCH_DIRECTION.desc ? lastIndex : 0;
28
+ const rowKeyWithEnabledCell = (rowCoords.direction === CELL_SEARCH_DIRECTION.desc ? findLast : find)(rowKeys, (rowKey, index) => {
29
+ const cell = tabStopsByRowKey[rowKey][col];
30
+ const hasCell = Boolean(cell);
31
+ const cellRowIndex = index;
32
+ /** Check that the target row index is in the right direction of the search */
33
+ const correctRowIndex = rowCoords.direction === CELL_SEARCH_DIRECTION.desc ? cellRowIndex <= searchIndex : cellRowIndex >= searchIndex;
34
+ if (cell && correctRowIndex) return cellSelector ? hasCell && cellSelector(cell) : hasCell;
35
+ return false;
36
+ });
37
+ return (rowKeyWithEnabledCell !== void 0 ? tabStopsByRowKey[rowKeyWithEnabledCell] : void 0)?.[col];
38
+ }
39
+ /**
40
+ * Search the given column of a grid map for a cell.
41
+ */
42
+ function findCellInRow(gridMap, row, colCoords, cellSelector = tabStopIsEnabled) {
43
+ const { direction, from } = colCoords || {};
44
+ const { rowKeys, tabStopsByRowKey } = gridMap;
45
+ const currentRow = tabStopsByRowKey[rowKeys[row]];
46
+ if (!currentRow) return;
47
+ return (direction === CELL_SEARCH_DIRECTION.desc ? findLast : find)(currentRow, cellSelector, from);
48
+ }
49
+ /**
50
+ * Parse each column of the given gridMap to find the first cell matching the selector.
51
+ * The direction and starting point of the search can be set using the coordinates attribute.
52
+ */
53
+ function parseColsForCell(gridMap, { direction = CELL_SEARCH_DIRECTION.asc, from }, cellSelector = tabStopIsEnabled) {
54
+ if (from === void 0) return;
55
+ const { rowKeys, tabStopsByRowKey } = gridMap;
56
+ /** As we cannot know for certain when to stop, we need to know which column is the last column */
57
+ const maxColIndex = rowKeys.reduce((maxLength, rowIndex) => {
58
+ const rowLength = tabStopsByRowKey[rowIndex].length;
59
+ return rowLength > maxLength ? rowLength - 1 : maxLength;
60
+ }, 0);
61
+ /** If "from" is set as -1, start from the end. */
62
+ const fromIndex = from === -1 ? maxColIndex : from || 0;
63
+ for (let index = fromIndex; direction === CELL_SEARCH_DIRECTION.desc ? index > -1 : index <= maxColIndex; direction === CELL_SEARCH_DIRECTION.desc ? index -= 1 : index += 1) {
64
+ const rowWithEnabledCed = findCellInCol(gridMap, index, {
65
+ direction,
66
+ from: direction === CELL_SEARCH_DIRECTION.desc ? -1 : 0
67
+ }, cellSelector);
68
+ if (rowWithEnabledCed) return rowWithEnabledCed;
69
+ }
70
+ }
71
+ /**
72
+ * Search for a cell in a gridMap
73
+ *
74
+ * This allows you to
75
+ * * Select a cell at a specific coordinate
76
+ * * Search for a cell from a specific column in any direction
77
+ * * Search for a cell from a specific row in any direction
78
+ *
79
+ * If no cell is found, returns undefined
80
+ */
81
+ function getCell(gridMap, coords, cellSelector = tabStopIsEnabled) {
82
+ const { row, col } = coords || {};
83
+ const { rowKeys, tabStopsByRowKey } = gridMap || {};
84
+ /** Defined row and col */
85
+ if (isNumberCoords(row) && isNumberCoords(col)) return tabStopsByRowKey[rowKeys[row]][col];
86
+ /** Defined row but variable col */
87
+ if (isDirectionCoords(col) && isNumberCoords(row)) return findCellInRow(gridMap, row, col, cellSelector);
88
+ if (isDirectionCoords(row)) {
89
+ if (isDirectionCoords(col)) return parseColsForCell(gridMap, col, cellSelector);
90
+ return findCellInCol(gridMap, col, row, cellSelector);
91
+ }
92
+ }
93
+ //#endregion
94
+ export { getCell };
@@ -0,0 +1,16 @@
1
+ import isNil from "lodash/isNil.js";
2
+ //#region src/utils/moving-focus/utils/getCellCoordinates.ts
3
+ function getCellCoordinates(gridMap, tabStop) {
4
+ const currentRowKey = tabStop.rowKey;
5
+ if (isNil(currentRowKey)) return;
6
+ const { rowKeys, tabStopsByRowKey } = gridMap;
7
+ const rowIndex = rowKeys.findIndex((rowKey) => rowKey === currentRowKey);
8
+ const row = tabStopsByRowKey[currentRowKey];
9
+ return {
10
+ rowIndex,
11
+ row,
12
+ columnOffset: row.findIndex((ts) => ts.id === tabStop.id)
13
+ };
14
+ }
15
+ //#endregion
16
+ export { getCellCoordinates };
@@ -0,0 +1,11 @@
1
+ //#region src/utils/moving-focus/utils/getPointerTypeFromEvent.ts
2
+ /**
3
+ * Get the correct pointer type from the given event.
4
+ * This is used when a tab stop is selected, to check if is has been selected using a keyboard or a pointer
5
+ * (pen / mouse / touch)
6
+ */
7
+ function getPointerTypeFromEvent(event) {
8
+ return event && "pointerType" in event && Boolean(event.pointerType) ? "pointer" : "keyboard";
9
+ }
10
+ //#endregion
11
+ export { getPointerTypeFromEvent };
@@ -0,0 +1,7 @@
1
+ //#region src/utils/moving-focus/utils/shouldLoopListHorizontally.ts
2
+ /** Check whether the list should horizontally loop with the given configuration */
3
+ function shouldLoopListHorizontally(direction, loopAround) {
4
+ return direction === "horizontal" && loopAround?.row !== "next-end" || direction === "both" && loopAround?.row !== "next-end";
5
+ }
6
+ //#endregion
7
+ export { shouldLoopListHorizontally };
@@ -0,0 +1,7 @@
1
+ //#region src/utils/moving-focus/utils/shouldLoopListVertically.ts
2
+ /** Check whether the list should vertically loop with the given configuration */
3
+ function shouldLoopListVertically(direction, loopAround) {
4
+ return direction === "vertical" && loopAround?.col !== "next-end" || direction === "both" && loopAround?.col !== "next-end";
5
+ }
6
+ //#endregion
7
+ export { shouldLoopListVertically };
@@ -0,0 +1,5 @@
1
+ //#region src/utils/moving-focus/utils/tabStopIsEnabled.ts
2
+ /** Check if the given tab stop is enabled */
3
+ var tabStopIsEnabled = (tabStop) => !tabStop.disabled;
4
+ //#endregion
5
+ export { tabStopIsEnabled };
@@ -0,0 +1,12 @@
1
+ //#region src/utils/number/clamp.d.ts
2
+ /**
3
+ * Clamp value in range.
4
+ *
5
+ * @param value Value to clamp.
6
+ * @param min Minimum value.
7
+ * @param max Maximum value.
8
+ * @return Clamped value.
9
+ */
10
+ declare const clamp: (value: number, min: number, max: number) => number;
11
+ //#endregion
12
+ export { clamp };
@@ -0,0 +1,16 @@
1
+ //#region src/utils/number/clamp.ts
2
+ /**
3
+ * Clamp value in range.
4
+ *
5
+ * @param value Value to clamp.
6
+ * @param min Minimum value.
7
+ * @param max Maximum value.
8
+ * @return Clamped value.
9
+ */
10
+ var clamp = (value, min, max) => {
11
+ if (value < min) return min;
12
+ if (value > max) return max;
13
+ return value;
14
+ };
15
+ //#endregion
16
+ export { clamp };
@@ -0,0 +1,14 @@
1
+ //#region src/utils/object/isEqual.ts
2
+ /** Minimal recursive deep equal of JS values */
3
+ function isEqual(obj1, obj2) {
4
+ if (obj1 === obj2) return true;
5
+ if (typeof obj1 === "object" && typeof obj2 === "object") {
6
+ const keys1 = Object.keys(obj1);
7
+ const keys2 = Object.keys(obj2);
8
+ if (keys1.length !== keys2.length) return false;
9
+ return keys1.every((key1) => isEqual(obj1[key1], obj2[key1]));
10
+ }
11
+ return false;
12
+ }
13
+ //#endregion
14
+ export { isEqual };