@vibe/core 4.5.11 → 4.5.12

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 (384) hide show
  1. package/dist/components/Menu/MenuGridItem/useMenuGridItemNavContext.d.ts +2 -2
  2. package/dist/components/a11y/dist/GridKeyboardNavigationContext/GridKeyboardNavigationContext.js +2 -0
  3. package/dist/components/a11y/dist/GridKeyboardNavigationContext/GridKeyboardNavigationContext.js.map +1 -0
  4. package/dist/components/a11y/dist/GridKeyboardNavigationContext/helper.js +2 -0
  5. package/dist/components/a11y/dist/GridKeyboardNavigationContext/helper.js.map +1 -0
  6. package/dist/components/a11y/dist/HiddenText/HiddenText.js +2 -0
  7. package/dist/components/a11y/dist/HiddenText/HiddenText.js.map +1 -0
  8. package/dist/components/a11y/dist/HiddenText/HiddenText.module.scss.js +2 -0
  9. package/dist/components/avatar/dist/Avatar/Avatar.module.scss.js +1 -1
  10. package/dist/components/avatar/dist/Avatar/AvatarBadge.module.scss.js +1 -1
  11. package/dist/components/avatar/dist/Avatar/AvatarContent.module.scss.js +1 -1
  12. package/dist/components/button-group/dist/ButtonGroup/ButtonGroup.module.scss.js +1 -1
  13. package/dist/components/checkbox/dist/Checkbox/Checkbox.module.scss.js +1 -1
  14. package/dist/components/dialog/dist/Dialog/Dialog.module.scss.js +1 -1
  15. package/dist/components/dialog/dist/Dialog/components/DialogContent/DialogContent.module.scss.js +1 -1
  16. package/dist/components/dialog/dist/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
  17. package/dist/components/editable/dist/EditableHeading/EditableHeading.module.scss.js +1 -1
  18. package/dist/components/editable/dist/EditableText/EditableText.module.scss.js +1 -1
  19. package/dist/components/editable/dist/EditableTypography/EditableTypography.module.scss.js +1 -1
  20. package/dist/components/expand-collapse/dist/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
  21. package/dist/components/icon-button/dist/IconButton/IconButton.module.scss.js +1 -1
  22. package/dist/components/index.d.ts +1 -2
  23. package/dist/components/label/dist/Label/Label.module.scss.js +1 -1
  24. package/dist/components/label/dist/Label/LabelCelebrationAnimation.module.scss.js +1 -1
  25. package/dist/components/radio-button/dist/RadioButton/RadioButton.module.scss.js +1 -1
  26. package/dist/components/tooltip/dist/Tooltip/Tooltip.module.scss.js +1 -1
  27. package/dist/components/typography/dist/Heading/Heading.module.scss.js +1 -1
  28. package/dist/components/typography/dist/Text/Text.module.scss.js +1 -1
  29. package/dist/components/typography/dist/Typography/Typography.module.scss.js +1 -1
  30. package/dist/hooks/useFullKeyboardListeners.d.ts +2 -10
  31. package/dist/metadata/components.json +56 -56
  32. package/dist/metadata.json +56 -56
  33. package/dist/mocked_classnames/components/Menu/MenuGridItem/useMenuGridItemNavContext.d.ts +2 -2
  34. package/dist/mocked_classnames/components/index.d.ts +1 -2
  35. package/dist/mocked_classnames/hooks/useFullKeyboardListeners.d.ts +2 -10
  36. package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
  37. package/dist/mocked_classnames/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
  38. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
  39. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
  40. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
  41. package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
  42. package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
  43. package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
  44. package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
  45. package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
  46. package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
  47. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
  48. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
  49. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
  50. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
  51. package/dist/mocked_classnames/src/components/Badge/Badge.module.scss.js +1 -1
  52. package/dist/mocked_classnames/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
  53. package/dist/mocked_classnames/src/components/BaseItem/BaseItem.module.scss.js +1 -1
  54. package/dist/mocked_classnames/src/components/BaseList/BaseList.module.scss.js +1 -1
  55. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
  56. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
  57. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
  58. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
  59. package/dist/mocked_classnames/src/components/Chips/Chips.module.scss.js +1 -1
  60. package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
  61. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
  62. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
  63. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js +1 -1
  64. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +1 -1
  65. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
  66. package/dist/mocked_classnames/src/components/Combobox/Combobox.module.scss.js +1 -1
  67. package/dist/mocked_classnames/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
  68. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
  69. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
  70. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
  71. package/dist/mocked_classnames/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
  72. package/dist/mocked_classnames/src/components/DatePicker/DatePicker.module.scss.js +1 -1
  73. package/dist/mocked_classnames/src/components/DatePicker/DatePickerHeader.module.scss.js +1 -1
  74. package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
  75. package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.module.scss.js +1 -1
  76. package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
  77. package/dist/mocked_classnames/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
  78. package/dist/mocked_classnames/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
  79. package/dist/mocked_classnames/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +1 -1
  80. package/dist/mocked_classnames/src/components/EmptyState/EmptyState.module.scss.js +1 -1
  81. package/dist/mocked_classnames/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
  82. package/dist/mocked_classnames/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
  83. package/dist/mocked_classnames/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
  84. package/dist/mocked_classnames/src/components/InfoText/InfoText.module.scss.js +1 -1
  85. package/dist/mocked_classnames/src/components/List/List.module.scss.js +1 -1
  86. package/dist/mocked_classnames/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
  87. package/dist/mocked_classnames/src/components/ListItem/ListItem.js +1 -1
  88. package/dist/mocked_classnames/src/components/ListItem/ListItem.js.map +1 -1
  89. package/dist/mocked_classnames/src/components/ListItem/ListItem.module.scss.js +1 -1
  90. package/dist/mocked_classnames/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
  91. package/dist/mocked_classnames/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
  92. package/dist/mocked_classnames/src/components/ListTitle/ListTitle.module.scss.js +1 -1
  93. package/dist/mocked_classnames/src/components/Menu/Menu/Menu.module.scss.js +1 -1
  94. package/dist/mocked_classnames/src/components/Menu/Menu/hooks/useMenuKeyboardNavigation.js +1 -1
  95. package/dist/mocked_classnames/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
  96. package/dist/mocked_classnames/src/components/Menu/MenuGridItem/MenuGridItem.js +1 -1
  97. package/dist/mocked_classnames/src/components/Menu/MenuGridItem/MenuGridItem.js.map +1 -1
  98. package/dist/mocked_classnames/src/components/Menu/MenuGridItem/useFocusGridItemByActiveStatus.js +1 -1
  99. package/dist/mocked_classnames/src/components/Menu/MenuGridItem/useFocusGridItemByActiveStatus.js.map +1 -1
  100. package/dist/mocked_classnames/src/components/Menu/MenuGridItem/useMenuGridItemNavContext.js +1 -1
  101. package/dist/mocked_classnames/src/components/Menu/MenuGridItem/useMenuGridItemNavContext.js.map +1 -1
  102. package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
  103. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
  104. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
  105. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
  106. package/dist/mocked_classnames/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
  107. package/dist/mocked_classnames/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
  108. package/dist/mocked_classnames/src/components/MenuButton/MenuButton.module.scss.js +1 -1
  109. package/dist/mocked_classnames/src/components/Modal/Modal/Modal.module.scss.js +1 -1
  110. package/dist/mocked_classnames/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
  111. package/dist/mocked_classnames/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
  112. package/dist/mocked_classnames/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
  113. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
  114. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
  115. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
  116. package/dist/mocked_classnames/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
  117. package/dist/mocked_classnames/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
  118. package/dist/mocked_classnames/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
  119. package/dist/mocked_classnames/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
  120. package/dist/mocked_classnames/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
  121. package/dist/mocked_classnames/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
  122. package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js +1 -1
  123. package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js.map +1 -1
  124. package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
  125. package/dist/mocked_classnames/src/components/NumberField/NumberField.module.scss.js +1 -1
  126. package/dist/mocked_classnames/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
  127. package/dist/mocked_classnames/src/components/Search/Search.module.scss.js +1 -1
  128. package/dist/mocked_classnames/src/components/Skeleton/Skeleton.module.scss.js +1 -1
  129. package/dist/mocked_classnames/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
  130. package/dist/mocked_classnames/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
  131. package/dist/mocked_classnames/src/components/Slider/Slider.module.scss.js +1 -1
  132. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
  133. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
  134. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
  135. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
  136. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
  137. package/dist/mocked_classnames/src/components/Slider/SliderInfix.module.scss.js +1 -1
  138. package/dist/mocked_classnames/src/components/SplitButton/SplitButton.module.scss.js +1 -1
  139. package/dist/mocked_classnames/src/components/Steps/Steps.module.scss.js +1 -1
  140. package/dist/mocked_classnames/src/components/Steps/StepsCommand.module.scss.js +1 -1
  141. package/dist/mocked_classnames/src/components/Steps/StepsDot.module.scss.js +1 -1
  142. package/dist/mocked_classnames/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
  143. package/dist/mocked_classnames/src/components/Steps/StepsHeader.module.scss.js +1 -1
  144. package/dist/mocked_classnames/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
  145. package/dist/mocked_classnames/src/components/Switch/Switch.module.scss.js +1 -1
  146. package/dist/mocked_classnames/src/components/Table/Table/Table.module.scss.js +1 -1
  147. package/dist/mocked_classnames/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
  148. package/dist/mocked_classnames/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
  149. package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
  150. package/dist/mocked_classnames/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
  151. package/dist/mocked_classnames/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
  152. package/dist/mocked_classnames/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
  153. package/dist/mocked_classnames/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
  154. package/dist/mocked_classnames/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
  155. package/dist/mocked_classnames/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
  156. package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
  157. package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
  158. package/dist/mocked_classnames/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
  159. package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
  160. package/dist/mocked_classnames/src/components/TextArea/TextArea.js +1 -1
  161. package/dist/mocked_classnames/src/components/TextArea/TextArea.js.map +1 -1
  162. package/dist/mocked_classnames/src/components/TextArea/TextArea.module.scss.js +1 -1
  163. package/dist/mocked_classnames/src/components/TextField/TextField.js +1 -1
  164. package/dist/mocked_classnames/src/components/TextField/TextField.js.map +1 -1
  165. package/dist/mocked_classnames/src/components/TextField/TextField.module.scss.js +1 -1
  166. package/dist/mocked_classnames/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
  167. package/dist/mocked_classnames/src/components/Tipseen/Tipseen.module.scss.js +1 -1
  168. package/dist/mocked_classnames/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
  169. package/dist/mocked_classnames/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
  170. package/dist/mocked_classnames/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
  171. package/dist/mocked_classnames/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
  172. package/dist/mocked_classnames/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
  173. package/dist/mocked_classnames/src/components/Toast/Toast.module.scss.js +1 -1
  174. package/dist/mocked_classnames/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
  175. package/dist/mocked_classnames/src/components/Toggle/MockToggle.module.scss.js +1 -1
  176. package/dist/mocked_classnames/src/components/Toggle/Toggle.module.scss.js +1 -1
  177. package/dist/mocked_classnames/src/components/Toggle/ToggleText.module.scss.js +1 -1
  178. package/dist/mocked_classnames/src/components/TransitionView/TransitionView.module.scss.js +1 -1
  179. package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
  180. package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
  181. package/dist/mocked_classnames/src/components/next/List/List.module.scss.js +1 -1
  182. package/dist/mocked_classnames/src/components/next/List/ListTitle/ListTitle.module.scss.js +1 -1
  183. package/dist/mocked_classnames/src/hooks/useFullKeyboardListeners.js +1 -1
  184. package/dist/mocked_classnames/src/hooks/useFullKeyboardListeners.js.map +1 -1
  185. package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js +1 -1
  186. package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js.map +1 -1
  187. package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js +1 -1
  188. package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js.map +1 -1
  189. package/dist/mocked_classnames/src/index.js +1 -1
  190. package/dist/shared/dist/constants/navDirections.js +2 -0
  191. package/dist/shared/dist/constants/navDirections.js.map +1 -0
  192. package/dist/shared/dist/hooks/useLastNavigationDirection.js +2 -0
  193. package/dist/shared/dist/hooks/useLastNavigationDirection.js.map +1 -0
  194. package/dist/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
  195. package/dist/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
  196. package/dist/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
  197. package/dist/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
  198. package/dist/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
  199. package/dist/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
  200. package/dist/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
  201. package/dist/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
  202. package/dist/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
  203. package/dist/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
  204. package/dist/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
  205. package/dist/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
  206. package/dist/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
  207. package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
  208. package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
  209. package/dist/src/components/Badge/Badge.module.scss.js +1 -1
  210. package/dist/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
  211. package/dist/src/components/BaseItem/BaseItem.module.scss.js +1 -1
  212. package/dist/src/components/BaseList/BaseList.module.scss.js +1 -1
  213. package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
  214. package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
  215. package/dist/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
  216. package/dist/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
  217. package/dist/src/components/Chips/Chips.module.scss.js +1 -1
  218. package/dist/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
  219. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
  220. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
  221. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js +1 -1
  222. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +1 -1
  223. package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
  224. package/dist/src/components/Combobox/Combobox.module.scss.js +1 -1
  225. package/dist/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
  226. package/dist/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
  227. package/dist/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
  228. package/dist/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
  229. package/dist/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
  230. package/dist/src/components/DatePicker/DatePicker.module.scss.js +1 -1
  231. package/dist/src/components/DatePicker/DatePickerHeader.module.scss.js +1 -1
  232. package/dist/src/components/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
  233. package/dist/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.module.scss.js +1 -1
  234. package/dist/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
  235. package/dist/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
  236. package/dist/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
  237. package/dist/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +1 -1
  238. package/dist/src/components/EmptyState/EmptyState.module.scss.js +1 -1
  239. package/dist/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
  240. package/dist/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
  241. package/dist/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
  242. package/dist/src/components/InfoText/InfoText.module.scss.js +1 -1
  243. package/dist/src/components/List/List.module.scss.js +1 -1
  244. package/dist/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
  245. package/dist/src/components/ListItem/ListItem.js +1 -1
  246. package/dist/src/components/ListItem/ListItem.js.map +1 -1
  247. package/dist/src/components/ListItem/ListItem.module.scss.js +1 -1
  248. package/dist/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
  249. package/dist/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
  250. package/dist/src/components/ListTitle/ListTitle.module.scss.js +1 -1
  251. package/dist/src/components/Menu/Menu/Menu.module.scss.js +1 -1
  252. package/dist/src/components/Menu/Menu/hooks/useMenuKeyboardNavigation.js +1 -1
  253. package/dist/src/components/Menu/Menu/hooks/useMenuKeyboardNavigation.js.map +1 -1
  254. package/dist/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
  255. package/dist/src/components/Menu/MenuGridItem/MenuGridItem.js +1 -1
  256. package/dist/src/components/Menu/MenuGridItem/MenuGridItem.js.map +1 -1
  257. package/dist/src/components/Menu/MenuGridItem/useFocusGridItemByActiveStatus.js +1 -1
  258. package/dist/src/components/Menu/MenuGridItem/useFocusGridItemByActiveStatus.js.map +1 -1
  259. package/dist/src/components/Menu/MenuGridItem/useMenuGridItemNavContext.js +1 -1
  260. package/dist/src/components/Menu/MenuGridItem/useMenuGridItemNavContext.js.map +1 -1
  261. package/dist/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
  262. package/dist/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
  263. package/dist/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
  264. package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
  265. package/dist/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
  266. package/dist/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
  267. package/dist/src/components/MenuButton/MenuButton.module.scss.js +1 -1
  268. package/dist/src/components/Modal/Modal/Modal.module.scss.js +1 -1
  269. package/dist/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
  270. package/dist/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
  271. package/dist/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
  272. package/dist/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
  273. package/dist/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
  274. package/dist/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
  275. package/dist/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
  276. package/dist/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
  277. package/dist/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
  278. package/dist/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
  279. package/dist/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
  280. package/dist/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
  281. package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js +1 -1
  282. package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js.map +1 -1
  283. package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
  284. package/dist/src/components/NumberField/NumberField.module.scss.js +1 -1
  285. package/dist/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
  286. package/dist/src/components/Search/Search.module.scss.js +1 -1
  287. package/dist/src/components/Skeleton/Skeleton.module.scss.js +1 -1
  288. package/dist/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
  289. package/dist/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
  290. package/dist/src/components/Slider/Slider.module.scss.js +1 -1
  291. package/dist/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
  292. package/dist/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
  293. package/dist/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
  294. package/dist/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
  295. package/dist/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
  296. package/dist/src/components/Slider/SliderInfix.module.scss.js +1 -1
  297. package/dist/src/components/SplitButton/SplitButton.module.scss.js +1 -1
  298. package/dist/src/components/Steps/Steps.module.scss.js +1 -1
  299. package/dist/src/components/Steps/StepsCommand.module.scss.js +1 -1
  300. package/dist/src/components/Steps/StepsDot.module.scss.js +1 -1
  301. package/dist/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
  302. package/dist/src/components/Steps/StepsHeader.module.scss.js +1 -1
  303. package/dist/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
  304. package/dist/src/components/Switch/Switch.module.scss.js +1 -1
  305. package/dist/src/components/Table/Table/Table.module.scss.js +1 -1
  306. package/dist/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
  307. package/dist/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
  308. package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
  309. package/dist/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
  310. package/dist/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
  311. package/dist/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
  312. package/dist/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
  313. package/dist/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
  314. package/dist/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
  315. package/dist/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
  316. package/dist/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
  317. package/dist/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
  318. package/dist/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
  319. package/dist/src/components/TextArea/TextArea.js +1 -1
  320. package/dist/src/components/TextArea/TextArea.js.map +1 -1
  321. package/dist/src/components/TextArea/TextArea.module.scss.js +1 -1
  322. package/dist/src/components/TextField/TextField.js +1 -1
  323. package/dist/src/components/TextField/TextField.js.map +1 -1
  324. package/dist/src/components/TextField/TextField.module.scss.js +1 -1
  325. package/dist/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
  326. package/dist/src/components/Tipseen/Tipseen.module.scss.js +1 -1
  327. package/dist/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
  328. package/dist/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
  329. package/dist/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
  330. package/dist/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
  331. package/dist/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
  332. package/dist/src/components/Toast/Toast.module.scss.js +1 -1
  333. package/dist/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
  334. package/dist/src/components/Toggle/MockToggle.module.scss.js +1 -1
  335. package/dist/src/components/Toggle/Toggle.module.scss.js +1 -1
  336. package/dist/src/components/Toggle/ToggleText.module.scss.js +1 -1
  337. package/dist/src/components/TransitionView/TransitionView.module.scss.js +1 -1
  338. package/dist/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
  339. package/dist/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
  340. package/dist/src/components/next/List/List.module.scss.js +1 -1
  341. package/dist/src/components/next/List/ListTitle/ListTitle.module.scss.js +1 -1
  342. package/dist/src/hooks/useFullKeyboardListeners.js +1 -1
  343. package/dist/src/hooks/useFullKeyboardListeners.js.map +1 -1
  344. package/dist/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js +1 -1
  345. package/dist/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js.map +1 -1
  346. package/dist/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js +1 -1
  347. package/dist/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js.map +1 -1
  348. package/dist/src/index.js +1 -1
  349. package/dist/style/dist/index.min.css.js +1 -1
  350. package/package.json +28 -27
  351. package/dist/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.d.ts +0 -15
  352. package/dist/components/GridKeyboardNavigationContext/GridKeyboardNavigationContextConstants.d.ts +0 -25
  353. package/dist/components/GridKeyboardNavigationContext/helper.d.ts +0 -6
  354. package/dist/components/GridKeyboardNavigationContext/index.d.ts +0 -1
  355. package/dist/components/HiddenText/HiddenText.d.ts +0 -10
  356. package/dist/components/HiddenText/index.d.ts +0 -1
  357. package/dist/components/Menu/Menu/hooks/useLastNavigationDirection.d.ts +0 -4
  358. package/dist/mocked_classnames/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.d.ts +0 -15
  359. package/dist/mocked_classnames/components/GridKeyboardNavigationContext/GridKeyboardNavigationContextConstants.d.ts +0 -25
  360. package/dist/mocked_classnames/components/GridKeyboardNavigationContext/helper.d.ts +0 -6
  361. package/dist/mocked_classnames/components/GridKeyboardNavigationContext/index.d.ts +0 -1
  362. package/dist/mocked_classnames/components/HiddenText/HiddenText.d.ts +0 -10
  363. package/dist/mocked_classnames/components/HiddenText/index.d.ts +0 -1
  364. package/dist/mocked_classnames/components/Menu/Menu/hooks/useLastNavigationDirection.d.ts +0 -4
  365. package/dist/mocked_classnames/src/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.js +0 -2
  366. package/dist/mocked_classnames/src/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.js.map +0 -1
  367. package/dist/mocked_classnames/src/components/GridKeyboardNavigationContext/helper.js +0 -2
  368. package/dist/mocked_classnames/src/components/GridKeyboardNavigationContext/helper.js.map +0 -1
  369. package/dist/mocked_classnames/src/components/HiddenText/HiddenText.js +0 -2
  370. package/dist/mocked_classnames/src/components/HiddenText/HiddenText.js.map +0 -1
  371. package/dist/mocked_classnames/src/components/HiddenText/HiddenText.module.scss.js +0 -2
  372. package/dist/mocked_classnames/src/components/Menu/Menu/hooks/useLastNavigationDirection.js +0 -2
  373. package/dist/mocked_classnames/src/components/Menu/Menu/hooks/useLastNavigationDirection.js.map +0 -1
  374. package/dist/src/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.js +0 -2
  375. package/dist/src/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.js.map +0 -1
  376. package/dist/src/components/GridKeyboardNavigationContext/helper.js +0 -2
  377. package/dist/src/components/GridKeyboardNavigationContext/helper.js.map +0 -1
  378. package/dist/src/components/HiddenText/HiddenText.js +0 -2
  379. package/dist/src/components/HiddenText/HiddenText.js.map +0 -1
  380. package/dist/src/components/HiddenText/HiddenText.module.scss.js +0 -2
  381. package/dist/src/components/HiddenText/HiddenText.module.scss.js.map +0 -1
  382. package/dist/src/components/Menu/Menu/hooks/useLastNavigationDirection.js +0 -2
  383. package/dist/src/components/Menu/Menu/hooks/useLastNavigationDirection.js.map +0 -1
  384. /package/dist/{mocked_classnames/src/components → components/a11y/dist}/HiddenText/HiddenText.module.scss.js.map +0 -0
@@ -1,25 +0,0 @@
1
- import { type MutableRefObject } from "react";
2
- import { type NavDirections } from "../../hooks/useFullKeyboardListeners";
3
- export type GridElementRef = MutableRefObject<HTMLElement> & {
4
- current?: HTMLElement & {
5
- disabled?: boolean;
6
- };
7
- };
8
- export type DirectionMap = Map<GridElementRef, GridElementRef>;
9
- export type DirectionMaps = Record<NavDirections, DirectionMap>;
10
- export type Position = VerticalPosition & HorizontalPosition;
11
- type VerticalPosition = {
12
- topElement?: GridElementRef;
13
- bottomElement?: GridElementRef;
14
- };
15
- type HorizontalPosition = {
16
- leftElement?: GridElementRef;
17
- rightElement?: GridElementRef;
18
- };
19
- export interface GridKeyboardNavigationContextType {
20
- /**
21
- * Callback fired when navigation moves beyond the bounds of the grid.
22
- */
23
- onOutboundNavigation?: (ref: GridElementRef, direction: NavDirections) => void;
24
- }
25
- export {};
@@ -1,6 +0,0 @@
1
- import { NavDirections } from "../../hooks/useFullKeyboardListeners";
2
- import { type DirectionMap, type DirectionMaps, type GridElementRef, type Position } from "./GridKeyboardNavigationContextConstants";
3
- export declare const getDirectionMaps: (positions: Position[]) => DirectionMaps;
4
- export declare const getOppositeDirection: (direction: NavDirections) => NavDirections;
5
- export declare const getOutmostElementInDirection: (directionMaps: DirectionMaps, direction: NavDirections) => GridElementRef;
6
- export declare const getNextElementToFocusInDirection: (directionMap: DirectionMap, elementRef: GridElementRef) => null | GridElementRef;
@@ -1 +0,0 @@
1
- export { useGridKeyboardNavigationContext, GridKeyboardNavigationContext } from "./GridKeyboardNavigationContext";
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- import type VibeComponentProps from "../../types/VibeComponentProps";
3
- export interface HiddenTextProps extends VibeComponentProps {
4
- /**
5
- * The text content that is hidden but available for assistive technologies.
6
- */
7
- text: string;
8
- }
9
- declare const HiddenText: React.ForwardRefExoticComponent<HiddenTextProps & React.RefAttributes<HTMLSpanElement>>;
10
- export default HiddenText;
@@ -1 +0,0 @@
1
- export { default as HiddenText, type HiddenTextProps } from "./HiddenText";
@@ -1,4 +0,0 @@
1
- import { NavDirections } from "../../../../hooks/useFullKeyboardListeners";
2
- export declare const useLastNavigationDirection: () => {
3
- lastNavigationDirectionRef: import("react").MutableRefObject<NavDirections>;
4
- };
@@ -1,2 +0,0 @@
1
- import r,{useMemo as n,useContext as i,useCallback as o}from"react";import{useEventListener as e}from"@vibe/shared";import{useLastNavigationDirection as t}from"../Menu/Menu/hooks/useLastNavigationDirection.js";import{getDirectionMaps as u,getOppositeDirection as a,getOutmostElementInDirection as l,getNextElementToFocusInDirection as d}from"./helper.js";var v=r.createContext(null),c=function(r,c){var f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{disabled:!1},s=n((function(){return u(r)}),[r]),b=i(v),m=t().lastNavigationDirectionRef,p=o((function(){var r,n=m.current;if(n&&!f.disabled){var i=a(n),o=l(s,i);null===(r=null==o?void 0:o.current)||void 0===r||r.focus()}}),[s,f.disabled,m]);return e({eventName:"focus",callback:p,ref:c}),{onOutboundNavigation:o((function(r,n){var i,o;if(!f.disabled){var e=d(s[n],r);if(e)return null===(i=r.current)||void 0===i||i.blur(),void(null===(o=e.current)||void 0===o||o.focus());null==b||b.onOutboundNavigation(c,n)}}),[s,b,c,f.disabled])}};export{v as GridKeyboardNavigationContext,c as useGridKeyboardNavigationContext};
2
- //# sourceMappingURL=GridKeyboardNavigationContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridKeyboardNavigationContext.js","sources":["../../../../../src/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.ts"],"sourcesContent":["import React, { useContext, useCallback, useMemo } from \"react\";\nimport useEventListener from \"../../hooks/useEventListener\";\nimport { useLastNavigationDirection } from \"../Menu/Menu/hooks/useLastNavigationDirection\";\nimport {\n getDirectionMaps,\n getNextElementToFocusInDirection,\n getOppositeDirection,\n getOutmostElementInDirection\n} from \"./helper\";\nimport { type NavDirections } from \"../../hooks/useFullKeyboardListeners\";\nimport {\n type GridElementRef,\n type GridKeyboardNavigationContextType,\n type Position\n} from \"./GridKeyboardNavigationContextConstants\";\n\nexport const GridKeyboardNavigationContext = React.createContext<GridKeyboardNavigationContextType>(null);\n\n/**\n * @param {({topElement: MutableRefObject, bottomElement: MutableRefObject}|\n * {leftElement: MutableRefObject, rightElement: MutableRefObject})[]} positions - the positions of the navigable items\n * @param {*} wrapperRef - a reference for a wrapper element which contains all the referenced elements\n * @param options - { disabled: boolean }\n */\nexport const useGridKeyboardNavigationContext = (\n positions: Position[],\n wrapperRef: GridElementRef,\n options: { disabled: boolean } = { disabled: false }\n) => {\n const directionMaps = useMemo(() => getDirectionMaps(positions), [positions]);\n const upperContext = useContext(GridKeyboardNavigationContext);\n const { lastNavigationDirectionRef } = useLastNavigationDirection();\n\n const onWrapperFocus = useCallback(() => {\n const keyboardDirection = lastNavigationDirectionRef.current;\n if (!keyboardDirection || options.disabled) {\n return;\n }\n const oppositeDirection = getOppositeDirection(keyboardDirection);\n const refToFocus = getOutmostElementInDirection(directionMaps, oppositeDirection);\n refToFocus?.current?.focus();\n }, [directionMaps, options.disabled, lastNavigationDirectionRef]);\n useEventListener({ eventName: \"focus\", callback: onWrapperFocus, ref: wrapperRef });\n\n const onOutboundNavigation = useCallback(\n (elementRef: GridElementRef, direction: NavDirections) => {\n if (options.disabled) return;\n const maybeNextElement = getNextElementToFocusInDirection(directionMaps[direction], elementRef);\n if (maybeNextElement) {\n elementRef.current?.blur();\n maybeNextElement.current?.focus();\n return;\n }\n // nothing on that direction - try updating the upper context\n upperContext?.onOutboundNavigation(wrapperRef, direction);\n },\n [directionMaps, upperContext, wrapperRef, options.disabled]\n );\n return { onOutboundNavigation };\n};\n"],"names":["GridKeyboardNavigationContext","React","createContext","useGridKeyboardNavigationContext","positions","wrapperRef","options","arguments","length","undefined","disabled","directionMaps","useMemo","getDirectionMaps","upperContext","useContext","lastNavigationDirectionRef","useLastNavigationDirection","onWrapperFocus","useCallback","keyboardDirection","current","oppositeDirection","getOppositeDirection","refToFocus","getOutmostElementInDirection","_a","focus","useEventListener","eventName","callback","ref","onOutboundNavigation","elementRef","direction","maybeNextElement","getNextElementToFocusInDirection","blur","_b"],"mappings":"mWAgBO,IAAMA,EAAgCC,EAAMC,cAAiD,MAQvFC,EAAmC,SAC9CC,EACAC,GAEE,IADFC,EAAAC,UAAAC,OAAAD,QAAAE,IAAAF,UAAAE,GAAAF,UAAiC,GAAA,CAAEG,UAAU,GAEvCC,EAAgBC,GAAQ,WAAA,OAAMC,EAAiBT,KAAY,CAACA,IAC5DU,EAAeC,EAAWf,GACxBgB,EAA+BC,IAA/BD,2BAEFE,EAAiBC,GAAY,iBAC3BC,EAAoBJ,EAA2BK,QACrD,GAAKD,IAAqBd,EAAQI,SAAlC,CAGA,IAAMY,EAAoBC,EAAqBH,GACzCI,EAAaC,EAA6Bd,EAAeW,GAC5C,QAAnBI,EAAAF,aAAA,EAAAA,EAAYH,eAAO,IAAAK,GAAAA,EAAEC,OAHrB,CAID,GAAE,CAAChB,EAAeL,EAAQI,SAAUM,IAiBrC,OAhBAY,EAAiB,CAAEC,UAAW,QAASC,SAAUZ,EAAgBa,IAAK1B,IAgB/D,CAAE2B,qBAdoBb,GAC3B,SAACc,EAA4BC,WAC3B,IAAI5B,EAAQI,SAAZ,CACA,IAAMyB,EAAmBC,EAAiCzB,EAAcuB,GAAYD,GACpF,GAAIE,EAGF,OAFoB,QAApBT,EAAAO,EAAWZ,eAAS,IAAAK,GAAAA,EAAAW,YACM,QAA1BC,EAAAH,EAAiBd,eAAS,IAAAiB,GAAAA,EAAAX,SAI5Bb,SAAAA,EAAckB,qBAAqB3B,EAAY6B,EARzB,CASxB,GACA,CAACvB,EAAeG,EAAcT,EAAYC,EAAQI,WAGtD"}
@@ -1,2 +0,0 @@
1
- import{defineProperty as e,toConsumableArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{NavDirections as r}from"../../hooks/useFullKeyboardListeners.js";var n=function(t){var n=e(e(e(e({},r.RIGHT,new Map),r.LEFT,new Map),r.UP,new Map),r.DOWN,new Map);return t.forEach((function(e){!function(e,t){var n=t.topElement,o=t.bottomElement,a=t.leftElement,l=t.rightElement;function i(e,t){throw Error("Circular positioning detected: the ".concat(e," element is already positioned to the ").concat(t," of the ").concat(t," element. This probably means the layout isn't ordered correctly."))}n&&o&&(e[r.UP].get(n)===o&&i("BOTTOM","TOP"),e[r.DOWN].get(o)===n&&i("TOP","BOTTOM")),a&&l&&(e[r.LEFT].get(a)===l&&i("RIGHT","LEFT"),e[r.RIGHT].get(l)===a&&i("LEFT","RIGHT"))}(n,e);var t=e.topElement,o=e.bottomElement,a=e.leftElement,l=e.rightElement;t&&o&&(n[r.UP].set(o,t),n[r.DOWN].set(t,o)),a&&l&&(n[r.LEFT].set(l,a),n[r.RIGHT].set(a,l))})),n},o=function(e){switch(e){case r.LEFT:return r.RIGHT;case r.RIGHT:return r.LEFT;case r.UP:return r.DOWN;case r.DOWN:return r.UP;default:throw Error("Unexpected direction: ".concat(e))}},a=function e(n,o){var a=n[o],i=t(a)[0];return i?function(e,t){var r=!1,n=t;for(;!r;){var o=l(e,n);o?n=o:r=!0}return n}(a,i[0]):e(n,[r.LEFT,r.RIGHT].includes(o)?r.UP:r.LEFT)},l=function e(t,r){var n,o=t.get(r);return o?!o.current||o.current.disabled||"true"===(null===(n=o.current.dataset)||void 0===n?void 0:n.disabled)?e(t,o):o:null};export{n as getDirectionMaps,l as getNextElementToFocusInDirection,o as getOppositeDirection,a as getOutmostElementInDirection};
2
- //# sourceMappingURL=helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helper.js","sources":["../../../../../src/components/GridKeyboardNavigationContext/helper.ts"],"sourcesContent":["import { NavDirections } from \"../../hooks/useFullKeyboardListeners\";\nimport {\n type DirectionMap,\n type DirectionMaps,\n type GridElementRef,\n type Position\n} from \"./GridKeyboardNavigationContextConstants\";\n\nfunction throwIfCausingCircularDependency(directionMaps: DirectionMaps, newPosition: Position) {\n const { topElement, bottomElement, leftElement, rightElement } = newPosition;\n if (topElement && bottomElement) {\n if (directionMaps[NavDirections.UP].get(topElement) === bottomElement) {\n throwMessage(\"BOTTOM\", \"TOP\");\n }\n if (directionMaps[NavDirections.DOWN].get(bottomElement) === topElement) {\n throwMessage(\"TOP\", \"BOTTOM\");\n }\n }\n if (leftElement && rightElement) {\n if (directionMaps[NavDirections.LEFT].get(leftElement) === rightElement) {\n throwMessage(\"RIGHT\", \"LEFT\");\n }\n if (directionMaps[NavDirections.RIGHT].get(rightElement) === leftElement) {\n throwMessage(\"LEFT\", \"RIGHT\");\n }\n }\n\n function throwMessage(directionFrom: string, directionTo: string) {\n throw new Error(\n `Circular positioning detected: the ${directionFrom} element is already positioned to the ${directionTo} of the ${directionTo} element. This probably means the layout isn't ordered correctly.`\n );\n }\n}\n\nexport const getDirectionMaps = (positions: Position[]) => {\n const directionMaps: DirectionMaps = {\n [NavDirections.RIGHT]: new Map(),\n [NavDirections.LEFT]: new Map(),\n [NavDirections.UP]: new Map(),\n [NavDirections.DOWN]: new Map()\n };\n positions.forEach(position => {\n throwIfCausingCircularDependency(directionMaps, position);\n\n const { topElement, bottomElement, leftElement, rightElement } = position;\n if (topElement && bottomElement) {\n directionMaps[NavDirections.UP].set(bottomElement, topElement);\n directionMaps[NavDirections.DOWN].set(topElement, bottomElement);\n }\n if (leftElement && rightElement) {\n directionMaps[NavDirections.LEFT].set(rightElement, leftElement);\n directionMaps[NavDirections.RIGHT].set(leftElement, rightElement);\n }\n });\n return directionMaps;\n};\n\nexport const getOppositeDirection = (direction: NavDirections) => {\n switch (direction) {\n case NavDirections.LEFT:\n return NavDirections.RIGHT;\n case NavDirections.RIGHT:\n return NavDirections.LEFT;\n case NavDirections.UP:\n return NavDirections.DOWN;\n case NavDirections.DOWN:\n return NavDirections.UP;\n default:\n throw new Error(`Unexpected direction: ${direction}`);\n }\n};\n\nexport const getOutmostElementInDirection = (\n directionMaps: DirectionMaps,\n direction: NavDirections\n): GridElementRef => {\n const directionMap = directionMaps[direction];\n const firstEntry = [...directionMap][0]; // start with any element\n if (!firstEntry) {\n // no relations were registered for this direction - fallback to a different direction\n if ([NavDirections.LEFT, NavDirections.RIGHT].includes(direction)) {\n // there are no registered horizontal relations registered, try vertical relations. Get the top-most element.\n return getOutmostElementInDirection(directionMaps, NavDirections.UP);\n }\n // there are no registered vertical relations registered, try horizontal relations. Get the left-most element.\n return getOutmostElementInDirection(directionMaps, NavDirections.LEFT);\n }\n const firstRef = firstEntry[0];\n return getLastFocusableElementFromElementInDirection(directionMap, firstRef);\n};\n\nexport const getNextElementToFocusInDirection = (\n directionMap: DirectionMap,\n elementRef: GridElementRef\n): null | GridElementRef => {\n const next = directionMap.get(elementRef);\n if (!next) {\n // this is the last element on the direction map - there' nothing next\n return null;\n }\n if (!next.current || next.current.disabled || next.current.dataset?.disabled === \"true\") {\n // the next element is not mounted or disabled - try the next one\n return getNextElementToFocusInDirection(directionMap, next);\n }\n return next;\n};\n\nfunction getLastFocusableElementFromElementInDirection(directionMap: DirectionMap, initialRef: GridElementRef) {\n let done = false;\n let currentRef = initialRef;\n\n while (!done) {\n // as long as there's a mounted element which in that direction, take it.\n const nextEligible = getNextElementToFocusInDirection(directionMap, currentRef);\n if (!nextEligible) {\n done = true;\n } else {\n currentRef = nextEligible;\n }\n }\n\n return currentRef;\n}\n"],"names":["getDirectionMaps","positions","directionMaps","_defineProperty","NavDirections","RIGHT","Map","LEFT","UP","DOWN","forEach","position","newPosition","topElement","bottomElement","leftElement","rightElement","throwMessage","directionFrom","directionTo","Error","concat","get","throwIfCausingCircularDependency","set","getOppositeDirection","direction","getOutmostElementInDirection","directionMap","firstEntry","_toConsumableArray","initialRef","done","currentRef","nextEligible","getNextElementToFocusInDirection","getLastFocusableElementFromElementInDirection","includes","elementRef","next","current","disabled","_a","dataset"],"mappings":"mLAkCaA,EAAmB,SAACC,GAC/B,IAAMC,EAAaC,EAAAA,EAAAA,EAAAA,EAAA,GAChBC,EAAcC,MAAQ,IAAIC,KAC1BF,EAAcG,KAAO,IAAID,KACzBF,EAAcI,GAAK,IAAIF,KACvBF,EAAcK,KAAO,IAAIH,KAe5B,OAbAL,EAAUS,SAAQ,SAAAC,IAjCpB,SAA0CT,EAA8BU,GACtE,IAAQC,EAAyDD,EAAzDC,WAAYC,EAA6CF,EAA7CE,cAAeC,EAA8BH,EAA9BG,YAAaC,EAAiBJ,EAAjBI,aAkBhD,SAASC,EAAaC,EAAuBC,GAC3C,MAAUC,MAAKC,sCAAAA,OACyBH,EAAa,0CAAAG,OAAyCF,EAAWE,YAAAA,OAAWF,uEAEtH,CArBIN,GAAcC,IACZZ,EAAcE,EAAcI,IAAIc,IAAIT,KAAgBC,GACtDG,EAAa,SAAU,OAErBf,EAAcE,EAAcK,MAAMa,IAAIR,KAAmBD,GAC3DI,EAAa,MAAO,WAGpBF,GAAeC,IACbd,EAAcE,EAAcG,MAAMe,IAAIP,KAAiBC,GACzDC,EAAa,QAAS,QAEpBf,EAAcE,EAAcC,OAAOiB,IAAIN,KAAkBD,GAC3DE,EAAa,OAAQ,SAS3B,CAUIM,CAAiCrB,EAAeS,GAEhD,IAAQE,EAAyDF,EAAzDE,WAAYC,EAA6CH,EAA7CG,cAAeC,EAA8BJ,EAA9BI,YAAaC,EAAiBL,EAAjBK,aAC5CH,GAAcC,IAChBZ,EAAcE,EAAcI,IAAIgB,IAAIV,EAAeD,GACnDX,EAAcE,EAAcK,MAAMe,IAAIX,EAAYC,IAEhDC,GAAeC,IACjBd,EAAcE,EAAcG,MAAMiB,IAAIR,EAAcD,GACpDb,EAAcE,EAAcC,OAAOmB,IAAIT,EAAaC,GAExD,IACOd,CACT,EAEauB,EAAuB,SAACC,GACnC,OAAQA,GACN,KAAKtB,EAAcG,KACjB,OAAOH,EAAcC,MACvB,KAAKD,EAAcC,MACjB,OAAOD,EAAcG,KACvB,KAAKH,EAAcI,GACjB,OAAOJ,EAAcK,KACvB,KAAKL,EAAcK,KACjB,OAAOL,EAAcI,GACvB,QACE,MAAUY,MAAK,yBAAAC,OAA0BK,IAE/C,EAEaC,EAA+B,SAA/BA,EACXzB,EACAwB,GAEA,IAAME,EAAe1B,EAAcwB,GAC7BG,EAAaC,EAAIF,GAAc,GACrC,OAAKC,EA6BP,SAAuDD,EAA4BG,GACjF,IAAIC,GAAO,EACPC,EAAaF,EAEjB,MAAQC,GAAM,CAEZ,IAAME,EAAeC,EAAiCP,EAAcK,GAC/DC,EAGHD,EAAaC,EAFbF,GAAO,CAIX,CAEA,OAAOC,CACT,CAlCSG,CAA8CR,EADpCC,EAAW,IALjBF,EAA6BzB,EAFlC,CAACE,EAAcG,KAAMH,EAAcC,OAAOgC,SAASX,GAEFtB,EAAcI,GAGhBJ,EAAcG,KAIrE,EAEa4B,EAAmC,SAAnCA,EACXP,EACAU,SAEMC,EAAOX,EAAaN,IAAIgB,GAC9B,OAAKC,GAIAA,EAAKC,SAAWD,EAAKC,QAAQC,UAA+C,kBAAnCC,EAAAH,EAAKC,QAAQG,8BAASF,UAE3DN,EAAiCP,EAAcW,GAEjDA,EANE,IAOX"}
@@ -1,2 +0,0 @@
1
- import e from"classnames";import t,{forwardRef as r,useRef as s}from"react";import{useMergeRef as a}from"@vibe/shared";import{getTestId as d,ComponentDefaultTestId as i}from"../../tests/testIds.js";import m from"./HiddenText.module.scss.js";var o=r((function(r,o){var n=r.text,p=r.className,f=void 0===p?"":p,l=r.id,c=void 0===l?"hiddenText":l,u=r["data-testid"],v=s(null),x=a(o,v);return t.createElement("span",{ref:x,id:c,"data-testid":u||d(i.HIDDEN_TEXT,c),className:e(m.hiddenTextWrapper,f)},n)}));export{o as default};
2
- //# sourceMappingURL=HiddenText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HiddenText.js","sources":["../../../../../src/components/HiddenText/HiddenText.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { useRef, forwardRef } from \"react\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport type VibeComponentProps from \"../../types/VibeComponentProps\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./HiddenText.module.scss\";\n\nexport interface HiddenTextProps extends VibeComponentProps {\n /**\n * The text content that is hidden but available for assistive technologies.\n */\n text: string;\n}\n\nconst HiddenText = forwardRef<HTMLSpanElement, HiddenTextProps>(\n ({ text, className = \"\", id = \"hiddenText\", \"data-testid\": dataTestId }, ref) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n\n return (\n <span\n ref={mergedRef}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.HIDDEN_TEXT, id)}\n className={cx(styles.hiddenTextWrapper, className)}\n >\n {text}\n </span>\n );\n }\n);\n\nexport default HiddenText;\n"],"names":["HiddenText","forwardRef","_ref","ref","text","_ref$className","className","_ref$id","id","dataTestId","componentRef","useRef","mergedRef","useMergeRef","React","createElement","getTestId","ComponentDefaultTestId","HIDDEN_TEXT","cx","styles","hiddenTextWrapper"],"mappings":"iPAcMA,IAAAA,EAAaC,GACjB,SAAAC,EAAyEC,GAAO,IAA7EC,EAAIF,EAAJE,KAAIC,EAAAH,EAAEI,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAAE,EAAAL,EAAEM,GAAAA,OAAK,IAAHD,EAAG,aAAYA,EAAiBE,EAAUP,EAAzB,eACpCQ,EAAeC,EAAO,MACtBC,EAAYC,EAAYV,EAAKO,GAEnC,OACEI,EAAAC,cAAA,OAAA,CACEZ,IAAKS,EACLJ,GAAIA,gBACSC,GAAcO,EAAUC,EAAuBC,YAAaV,GACzEF,UAAWa,EAAGC,EAAOC,kBAAmBf,IAEvCF,EAGP"}
@@ -1,2 +0,0 @@
1
- var e={hiddenTextWrapper:"hiddenTextWrapper"};!function(e){const t="s_id-5ac012179a41_4_5_10";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const i=document.createElement("style");i.id=t,n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.hiddenTextWrapper {\n /* clip pattern taken from https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/. */\n clip: rect(0, 0, 0, 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}");export{e as default};
2
- //# sourceMappingURL=HiddenText.module.scss.js.map
@@ -1,2 +0,0 @@
1
- import{toConsumableArray as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{useRef as r,useCallback as o}from"react";import{useKeyEvent as n,useEventListener as t}from"@vibe/shared";import{ARROW_UP_KEYS as a,NavDirections as c,ARROW_RIGHT_KEYS as i,ARROW_DOWN_KEYS as u,ARROW_LEFT_KEYS as l}from"../../../../hooks/useFullKeyboardListeners.js";var s=[].concat(e(a),e(i),e(u),e(l)),m=function(){var e=r(document),m=r(),f=o((function(e){m.current=e}),[]),d=o((function(e){var r=e.key;a.includes(r)?f(c.UP):i.includes(r)?f(c.RIGHT):u.includes(r)?f(c.DOWN):l.includes(r)&&f(c.LEFT)}),[f]),p=o((function(){m.current=void 0}),[m]);return n({ref:e,capture:!0,keys:s,callback:d}),t({eventName:"mousedown",ref:e,capture:!0,callback:p}),{lastNavigationDirectionRef:m}};export{m as useLastNavigationDirection};
2
- //# sourceMappingURL=useLastNavigationDirection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLastNavigationDirection.js","sources":["../../../../../../../src/components/Menu/Menu/hooks/useLastNavigationDirection.tsx"],"sourcesContent":["import { useCallback, useRef } from \"react\";\nimport useEventListener from \"../../../../hooks/useEventListener\";\nimport {\n ARROW_DOWN_KEYS,\n ARROW_LEFT_KEYS,\n ARROW_RIGHT_KEYS,\n ARROW_UP_KEYS,\n NavDirections\n} from \"../../../../hooks/useFullKeyboardListeners\";\nimport useKeyEvent from \"../../../../hooks/useKeyEvent\";\n\nconst NAVIGATION_KEYS = [...ARROW_UP_KEYS, ...ARROW_RIGHT_KEYS, ...ARROW_DOWN_KEYS, ...ARROW_LEFT_KEYS];\n\nexport const useLastNavigationDirection = () => {\n const documentRef = useRef(document);\n\n const lastNavigationDirectionRef = useRef<NavDirections>();\n\n const setLastNavigationDirection = useCallback((dir: NavDirections) => {\n lastNavigationDirectionRef.current = dir;\n }, []);\n\n const onKeyEvent = useCallback(\n ({ key }: KeyboardEvent) => {\n if (ARROW_UP_KEYS.includes(key)) {\n setLastNavigationDirection(NavDirections.UP);\n } else if (ARROW_RIGHT_KEYS.includes(key)) {\n setLastNavigationDirection(NavDirections.RIGHT);\n } else if (ARROW_DOWN_KEYS.includes(key)) {\n setLastNavigationDirection(NavDirections.DOWN);\n } else if (ARROW_LEFT_KEYS.includes(key)) {\n setLastNavigationDirection(NavDirections.LEFT);\n }\n },\n [setLastNavigationDirection]\n );\n\n const onMousedownAnywhere = useCallback(() => {\n lastNavigationDirectionRef.current = undefined;\n }, [lastNavigationDirectionRef]);\n\n useKeyEvent({ ref: documentRef, capture: true, keys: NAVIGATION_KEYS, callback: onKeyEvent });\n useEventListener({ eventName: \"mousedown\", ref: documentRef, capture: true, callback: onMousedownAnywhere });\n\n return { lastNavigationDirectionRef };\n};\n"],"names":["NAVIGATION_KEYS","concat","_toConsumableArray","ARROW_UP_KEYS","ARROW_RIGHT_KEYS","ARROW_DOWN_KEYS","ARROW_LEFT_KEYS","useLastNavigationDirection","documentRef","useRef","document","lastNavigationDirectionRef","setLastNavigationDirection","useCallback","dir","current","onKeyEvent","_ref","key","includes","NavDirections","UP","RIGHT","DOWN","LEFT","onMousedownAnywhere","undefined","useKeyEvent","ref","capture","keys","callback","useEventListener","eventName"],"mappings":"2WAWA,IAAMA,EAAeC,GAAAA,OAAAC,EAAOC,GAAaD,EAAKE,GAAgBF,EAAKG,GAAeH,EAAKI,IAE1EC,EAA6B,WACxC,IAAMC,EAAcC,EAAOC,UAErBC,EAA6BF,IAE7BG,EAA6BC,GAAY,SAACC,GAC9CH,EAA2BI,QAAUD,CACtC,GAAE,IAEGE,EAAaH,GACjB,SAAAI,GAA2B,IAAxBC,EAAGD,EAAHC,IACGf,EAAcgB,SAASD,GACzBN,EAA2BQ,EAAcC,IAChCjB,EAAiBe,SAASD,GACnCN,EAA2BQ,EAAcE,OAChCjB,EAAgBc,SAASD,GAClCN,EAA2BQ,EAAcG,MAChCjB,EAAgBa,SAASD,IAClCN,EAA2BQ,EAAcI,KAE7C,GACA,CAACZ,IAGGa,EAAsBZ,GAAY,WACtCF,EAA2BI,aAAUW,CACvC,GAAG,CAACf,IAKJ,OAHAgB,EAAY,CAAEC,IAAKpB,EAAaqB,SAAS,EAAMC,KAAM9B,EAAiB+B,SAAUf,IAChFgB,EAAiB,CAAEC,UAAW,YAAaL,IAAKpB,EAAaqB,SAAS,EAAME,SAAUN,IAE/E,CAAEd,2BAAAA,EACX"}
@@ -1,2 +0,0 @@
1
- import n,{useMemo as r,useContext as o,useCallback as i}from"react";import{useLastNavigationDirection as e}from"../Menu/Menu/hooks/useLastNavigationDirection.js";import{getDirectionMaps as t,getOppositeDirection as u,getOutmostElementInDirection as a,getNextElementToFocusInDirection as l}from"./helper.js";import{useEventListener as d}from"../../../shared/dist/hooks/useEventListener.js";var s=n.createContext(null),v=function(n,v){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{disabled:!1},f=r((function(){return t(n)}),[n]),b=o(s),m=e().lastNavigationDirectionRef,p=i((function(){var n,r=m.current;if(r&&!c.disabled){var o=u(r),i=a(f,o);null===(n=null==i?void 0:i.current)||void 0===n||n.focus()}}),[f,c.disabled,m]);return d({eventName:"focus",callback:p,ref:v}),{onOutboundNavigation:i((function(n,r){var o,i;if(!c.disabled){var e=l(f[r],n);if(e)return null===(o=n.current)||void 0===o||o.blur(),void(null===(i=e.current)||void 0===i||i.focus());null==b||b.onOutboundNavigation(v,r)}}),[f,b,v,c.disabled])}};export{s as GridKeyboardNavigationContext,v as useGridKeyboardNavigationContext};
2
- //# sourceMappingURL=GridKeyboardNavigationContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridKeyboardNavigationContext.js","sources":["../../../../src/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.ts"],"sourcesContent":["import React, { useContext, useCallback, useMemo } from \"react\";\nimport useEventListener from \"../../hooks/useEventListener\";\nimport { useLastNavigationDirection } from \"../Menu/Menu/hooks/useLastNavigationDirection\";\nimport {\n getDirectionMaps,\n getNextElementToFocusInDirection,\n getOppositeDirection,\n getOutmostElementInDirection\n} from \"./helper\";\nimport { type NavDirections } from \"../../hooks/useFullKeyboardListeners\";\nimport {\n type GridElementRef,\n type GridKeyboardNavigationContextType,\n type Position\n} from \"./GridKeyboardNavigationContextConstants\";\n\nexport const GridKeyboardNavigationContext = React.createContext<GridKeyboardNavigationContextType>(null);\n\n/**\n * @param {({topElement: MutableRefObject, bottomElement: MutableRefObject}|\n * {leftElement: MutableRefObject, rightElement: MutableRefObject})[]} positions - the positions of the navigable items\n * @param {*} wrapperRef - a reference for a wrapper element which contains all the referenced elements\n * @param options - { disabled: boolean }\n */\nexport const useGridKeyboardNavigationContext = (\n positions: Position[],\n wrapperRef: GridElementRef,\n options: { disabled: boolean } = { disabled: false }\n) => {\n const directionMaps = useMemo(() => getDirectionMaps(positions), [positions]);\n const upperContext = useContext(GridKeyboardNavigationContext);\n const { lastNavigationDirectionRef } = useLastNavigationDirection();\n\n const onWrapperFocus = useCallback(() => {\n const keyboardDirection = lastNavigationDirectionRef.current;\n if (!keyboardDirection || options.disabled) {\n return;\n }\n const oppositeDirection = getOppositeDirection(keyboardDirection);\n const refToFocus = getOutmostElementInDirection(directionMaps, oppositeDirection);\n refToFocus?.current?.focus();\n }, [directionMaps, options.disabled, lastNavigationDirectionRef]);\n useEventListener({ eventName: \"focus\", callback: onWrapperFocus, ref: wrapperRef });\n\n const onOutboundNavigation = useCallback(\n (elementRef: GridElementRef, direction: NavDirections) => {\n if (options.disabled) return;\n const maybeNextElement = getNextElementToFocusInDirection(directionMaps[direction], elementRef);\n if (maybeNextElement) {\n elementRef.current?.blur();\n maybeNextElement.current?.focus();\n return;\n }\n // nothing on that direction - try updating the upper context\n upperContext?.onOutboundNavigation(wrapperRef, direction);\n },\n [directionMaps, upperContext, wrapperRef, options.disabled]\n );\n return { onOutboundNavigation };\n};\n"],"names":["GridKeyboardNavigationContext","React","createContext","useGridKeyboardNavigationContext","positions","wrapperRef","options","arguments","length","undefined","disabled","directionMaps","useMemo","getDirectionMaps","upperContext","useContext","lastNavigationDirectionRef","useLastNavigationDirection","onWrapperFocus","useCallback","keyboardDirection","current","oppositeDirection","getOppositeDirection","refToFocus","getOutmostElementInDirection","_a","focus","useEventListener","eventName","callback","ref","onOutboundNavigation","elementRef","direction","maybeNextElement","getNextElementToFocusInDirection","blur","_b"],"mappings":"qYAgBO,IAAMA,EAAgCC,EAAMC,cAAiD,MAQvFC,EAAmC,SAC9CC,EACAC,GAEE,IADFC,EAAAC,UAAAC,OAAAD,QAAAE,IAAAF,UAAAE,GAAAF,UAAiC,GAAA,CAAEG,UAAU,GAEvCC,EAAgBC,GAAQ,WAAA,OAAMC,EAAiBT,KAAY,CAACA,IAC5DU,EAAeC,EAAWf,GACxBgB,EAA+BC,IAA/BD,2BAEFE,EAAiBC,GAAY,iBAC3BC,EAAoBJ,EAA2BK,QACrD,GAAKD,IAAqBd,EAAQI,SAAlC,CAGA,IAAMY,EAAoBC,EAAqBH,GACzCI,EAAaC,EAA6Bd,EAAeW,GAC5C,QAAnBI,EAAAF,aAAA,EAAAA,EAAYH,eAAO,IAAAK,GAAAA,EAAEC,OAHrB,CAID,GAAE,CAAChB,EAAeL,EAAQI,SAAUM,IAiBrC,OAhBAY,EAAiB,CAAEC,UAAW,QAASC,SAAUZ,EAAgBa,IAAK1B,IAgB/D,CAAE2B,qBAdoBb,GAC3B,SAACc,EAA4BC,WAC3B,IAAI5B,EAAQI,SAAZ,CACA,IAAMyB,EAAmBC,EAAiCzB,EAAcuB,GAAYD,GACpF,GAAIE,EAGF,OAFoB,QAApBT,EAAAO,EAAWZ,eAAS,IAAAK,GAAAA,EAAAW,YACM,QAA1BC,EAAAH,EAAiBd,eAAS,IAAAiB,GAAAA,EAAAX,SAI5Bb,SAAAA,EAAckB,qBAAqB3B,EAAY6B,EARzB,CASxB,GACA,CAACvB,EAAeG,EAAcT,EAAYC,EAAQI,WAGtD"}
@@ -1,2 +0,0 @@
1
- import{defineProperty as e,toConsumableArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{NavDirections as r}from"../../hooks/useFullKeyboardListeners.js";var n=function(t){var n=e(e(e(e({},r.RIGHT,new Map),r.LEFT,new Map),r.UP,new Map),r.DOWN,new Map);return t.forEach((function(e){!function(e,t){var n=t.topElement,o=t.bottomElement,a=t.leftElement,l=t.rightElement;function i(e,t){throw Error("Circular positioning detected: the ".concat(e," element is already positioned to the ").concat(t," of the ").concat(t," element. This probably means the layout isn't ordered correctly."))}n&&o&&(e[r.UP].get(n)===o&&i("BOTTOM","TOP"),e[r.DOWN].get(o)===n&&i("TOP","BOTTOM")),a&&l&&(e[r.LEFT].get(a)===l&&i("RIGHT","LEFT"),e[r.RIGHT].get(l)===a&&i("LEFT","RIGHT"))}(n,e);var t=e.topElement,o=e.bottomElement,a=e.leftElement,l=e.rightElement;t&&o&&(n[r.UP].set(o,t),n[r.DOWN].set(t,o)),a&&l&&(n[r.LEFT].set(l,a),n[r.RIGHT].set(a,l))})),n},o=function(e){switch(e){case r.LEFT:return r.RIGHT;case r.RIGHT:return r.LEFT;case r.UP:return r.DOWN;case r.DOWN:return r.UP;default:throw Error("Unexpected direction: ".concat(e))}},a=function e(n,o){var a=n[o],i=t(a)[0];return i?function(e,t){var r=!1,n=t;for(;!r;){var o=l(e,n);o?n=o:r=!0}return n}(a,i[0]):e(n,[r.LEFT,r.RIGHT].includes(o)?r.UP:r.LEFT)},l=function e(t,r){var n,o=t.get(r);return o?!o.current||o.current.disabled||"true"===(null===(n=o.current.dataset)||void 0===n?void 0:n.disabled)?e(t,o):o:null};export{n as getDirectionMaps,l as getNextElementToFocusInDirection,o as getOppositeDirection,a as getOutmostElementInDirection};
2
- //# sourceMappingURL=helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helper.js","sources":["../../../../src/components/GridKeyboardNavigationContext/helper.ts"],"sourcesContent":["import { NavDirections } from \"../../hooks/useFullKeyboardListeners\";\nimport {\n type DirectionMap,\n type DirectionMaps,\n type GridElementRef,\n type Position\n} from \"./GridKeyboardNavigationContextConstants\";\n\nfunction throwIfCausingCircularDependency(directionMaps: DirectionMaps, newPosition: Position) {\n const { topElement, bottomElement, leftElement, rightElement } = newPosition;\n if (topElement && bottomElement) {\n if (directionMaps[NavDirections.UP].get(topElement) === bottomElement) {\n throwMessage(\"BOTTOM\", \"TOP\");\n }\n if (directionMaps[NavDirections.DOWN].get(bottomElement) === topElement) {\n throwMessage(\"TOP\", \"BOTTOM\");\n }\n }\n if (leftElement && rightElement) {\n if (directionMaps[NavDirections.LEFT].get(leftElement) === rightElement) {\n throwMessage(\"RIGHT\", \"LEFT\");\n }\n if (directionMaps[NavDirections.RIGHT].get(rightElement) === leftElement) {\n throwMessage(\"LEFT\", \"RIGHT\");\n }\n }\n\n function throwMessage(directionFrom: string, directionTo: string) {\n throw new Error(\n `Circular positioning detected: the ${directionFrom} element is already positioned to the ${directionTo} of the ${directionTo} element. This probably means the layout isn't ordered correctly.`\n );\n }\n}\n\nexport const getDirectionMaps = (positions: Position[]) => {\n const directionMaps: DirectionMaps = {\n [NavDirections.RIGHT]: new Map(),\n [NavDirections.LEFT]: new Map(),\n [NavDirections.UP]: new Map(),\n [NavDirections.DOWN]: new Map()\n };\n positions.forEach(position => {\n throwIfCausingCircularDependency(directionMaps, position);\n\n const { topElement, bottomElement, leftElement, rightElement } = position;\n if (topElement && bottomElement) {\n directionMaps[NavDirections.UP].set(bottomElement, topElement);\n directionMaps[NavDirections.DOWN].set(topElement, bottomElement);\n }\n if (leftElement && rightElement) {\n directionMaps[NavDirections.LEFT].set(rightElement, leftElement);\n directionMaps[NavDirections.RIGHT].set(leftElement, rightElement);\n }\n });\n return directionMaps;\n};\n\nexport const getOppositeDirection = (direction: NavDirections) => {\n switch (direction) {\n case NavDirections.LEFT:\n return NavDirections.RIGHT;\n case NavDirections.RIGHT:\n return NavDirections.LEFT;\n case NavDirections.UP:\n return NavDirections.DOWN;\n case NavDirections.DOWN:\n return NavDirections.UP;\n default:\n throw new Error(`Unexpected direction: ${direction}`);\n }\n};\n\nexport const getOutmostElementInDirection = (\n directionMaps: DirectionMaps,\n direction: NavDirections\n): GridElementRef => {\n const directionMap = directionMaps[direction];\n const firstEntry = [...directionMap][0]; // start with any element\n if (!firstEntry) {\n // no relations were registered for this direction - fallback to a different direction\n if ([NavDirections.LEFT, NavDirections.RIGHT].includes(direction)) {\n // there are no registered horizontal relations registered, try vertical relations. Get the top-most element.\n return getOutmostElementInDirection(directionMaps, NavDirections.UP);\n }\n // there are no registered vertical relations registered, try horizontal relations. Get the left-most element.\n return getOutmostElementInDirection(directionMaps, NavDirections.LEFT);\n }\n const firstRef = firstEntry[0];\n return getLastFocusableElementFromElementInDirection(directionMap, firstRef);\n};\n\nexport const getNextElementToFocusInDirection = (\n directionMap: DirectionMap,\n elementRef: GridElementRef\n): null | GridElementRef => {\n const next = directionMap.get(elementRef);\n if (!next) {\n // this is the last element on the direction map - there' nothing next\n return null;\n }\n if (!next.current || next.current.disabled || next.current.dataset?.disabled === \"true\") {\n // the next element is not mounted or disabled - try the next one\n return getNextElementToFocusInDirection(directionMap, next);\n }\n return next;\n};\n\nfunction getLastFocusableElementFromElementInDirection(directionMap: DirectionMap, initialRef: GridElementRef) {\n let done = false;\n let currentRef = initialRef;\n\n while (!done) {\n // as long as there's a mounted element which in that direction, take it.\n const nextEligible = getNextElementToFocusInDirection(directionMap, currentRef);\n if (!nextEligible) {\n done = true;\n } else {\n currentRef = nextEligible;\n }\n }\n\n return currentRef;\n}\n"],"names":["getDirectionMaps","positions","directionMaps","_defineProperty","NavDirections","RIGHT","Map","LEFT","UP","DOWN","forEach","position","newPosition","topElement","bottomElement","leftElement","rightElement","throwMessage","directionFrom","directionTo","Error","concat","get","throwIfCausingCircularDependency","set","getOppositeDirection","direction","getOutmostElementInDirection","directionMap","firstEntry","_toConsumableArray","initialRef","done","currentRef","nextEligible","getNextElementToFocusInDirection","getLastFocusableElementFromElementInDirection","includes","elementRef","next","current","disabled","_a","dataset"],"mappings":"mLAkCaA,EAAmB,SAACC,GAC/B,IAAMC,EAAaC,EAAAA,EAAAA,EAAAA,EAAA,GAChBC,EAAcC,MAAQ,IAAIC,KAC1BF,EAAcG,KAAO,IAAID,KACzBF,EAAcI,GAAK,IAAIF,KACvBF,EAAcK,KAAO,IAAIH,KAe5B,OAbAL,EAAUS,SAAQ,SAAAC,IAjCpB,SAA0CT,EAA8BU,GACtE,IAAQC,EAAyDD,EAAzDC,WAAYC,EAA6CF,EAA7CE,cAAeC,EAA8BH,EAA9BG,YAAaC,EAAiBJ,EAAjBI,aAkBhD,SAASC,EAAaC,EAAuBC,GAC3C,MAAUC,MAAKC,sCAAAA,OACyBH,EAAa,0CAAAG,OAAyCF,EAAWE,YAAAA,OAAWF,uEAEtH,CArBIN,GAAcC,IACZZ,EAAcE,EAAcI,IAAIc,IAAIT,KAAgBC,GACtDG,EAAa,SAAU,OAErBf,EAAcE,EAAcK,MAAMa,IAAIR,KAAmBD,GAC3DI,EAAa,MAAO,WAGpBF,GAAeC,IACbd,EAAcE,EAAcG,MAAMe,IAAIP,KAAiBC,GACzDC,EAAa,QAAS,QAEpBf,EAAcE,EAAcC,OAAOiB,IAAIN,KAAkBD,GAC3DE,EAAa,OAAQ,SAS3B,CAUIM,CAAiCrB,EAAeS,GAEhD,IAAQE,EAAyDF,EAAzDE,WAAYC,EAA6CH,EAA7CG,cAAeC,EAA8BJ,EAA9BI,YAAaC,EAAiBL,EAAjBK,aAC5CH,GAAcC,IAChBZ,EAAcE,EAAcI,IAAIgB,IAAIV,EAAeD,GACnDX,EAAcE,EAAcK,MAAMe,IAAIX,EAAYC,IAEhDC,GAAeC,IACjBd,EAAcE,EAAcG,MAAMiB,IAAIR,EAAcD,GACpDb,EAAcE,EAAcC,OAAOmB,IAAIT,EAAaC,GAExD,IACOd,CACT,EAEauB,EAAuB,SAACC,GACnC,OAAQA,GACN,KAAKtB,EAAcG,KACjB,OAAOH,EAAcC,MACvB,KAAKD,EAAcC,MACjB,OAAOD,EAAcG,KACvB,KAAKH,EAAcI,GACjB,OAAOJ,EAAcK,KACvB,KAAKL,EAAcK,KACjB,OAAOL,EAAcI,GACvB,QACE,MAAUY,MAAK,yBAAAC,OAA0BK,IAE/C,EAEaC,EAA+B,SAA/BA,EACXzB,EACAwB,GAEA,IAAME,EAAe1B,EAAcwB,GAC7BG,EAAaC,EAAIF,GAAc,GACrC,OAAKC,EA6BP,SAAuDD,EAA4BG,GACjF,IAAIC,GAAO,EACPC,EAAaF,EAEjB,MAAQC,GAAM,CAEZ,IAAME,EAAeC,EAAiCP,EAAcK,GAC/DC,EAGHD,EAAaC,EAFbF,GAAO,CAIX,CAEA,OAAOC,CACT,CAlCSG,CAA8CR,EADpCC,EAAW,IALjBF,EAA6BzB,EAFlC,CAACE,EAAcG,KAAMH,EAAcC,OAAOgC,SAASX,GAEFtB,EAAcI,GAGhBJ,EAAcG,KAIrE,EAEa4B,EAAmC,SAAnCA,EACXP,EACAU,SAEMC,EAAOX,EAAaN,IAAIgB,GAC9B,OAAKC,GAIAA,EAAKC,SAAWD,EAAKC,QAAQC,UAA+C,kBAAnCC,EAAAH,EAAKC,QAAQG,8BAASF,UAE3DN,EAAiCP,EAAcW,GAEjDA,EANE,IAOX"}
@@ -1,2 +0,0 @@
1
- import e from"classnames";import t,{forwardRef as s,useRef as r}from"react";import{getTestId as a,ComponentDefaultTestId as d}from"../../tests/testIds.js";import o from"./HiddenText.module.scss.js";import{useMergeRef as i}from"../../../shared/dist/hooks/useMergeRef.js";var m=s((function(s,m){var n=s.text,f=s.className,p=void 0===f?"":f,l=s.id,c=void 0===l?"hiddenText":l,u=s["data-testid"],x=r(null),T=i(m,x);return t.createElement("span",{ref:T,id:c,"data-testid":u||a(d.HIDDEN_TEXT,c),className:e(o.hiddenTextWrapper,p)},n)}));export{m as default};
2
- //# sourceMappingURL=HiddenText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HiddenText.js","sources":["../../../../src/components/HiddenText/HiddenText.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { useRef, forwardRef } from \"react\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport type VibeComponentProps from \"../../types/VibeComponentProps\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./HiddenText.module.scss\";\n\nexport interface HiddenTextProps extends VibeComponentProps {\n /**\n * The text content that is hidden but available for assistive technologies.\n */\n text: string;\n}\n\nconst HiddenText = forwardRef<HTMLSpanElement, HiddenTextProps>(\n ({ text, className = \"\", id = \"hiddenText\", \"data-testid\": dataTestId }, ref) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n\n return (\n <span\n ref={mergedRef}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.HIDDEN_TEXT, id)}\n className={cx(styles.hiddenTextWrapper, className)}\n >\n {text}\n </span>\n );\n }\n);\n\nexport default HiddenText;\n"],"names":["HiddenText","forwardRef","_ref","ref","text","_ref$className","className","_ref$id","id","dataTestId","componentRef","useRef","mergedRef","useMergeRef","React","createElement","getTestId","ComponentDefaultTestId","HIDDEN_TEXT","cx","styles","hiddenTextWrapper"],"mappings":"8QAcMA,IAAAA,EAAaC,GACjB,SAAAC,EAAyEC,GAAO,IAA7EC,EAAIF,EAAJE,KAAIC,EAAAH,EAAEI,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAAE,EAAAL,EAAEM,GAAAA,OAAK,IAAHD,EAAG,aAAYA,EAAiBE,EAAUP,EAAzB,eACpCQ,EAAeC,EAAO,MACtBC,EAAYC,EAAYV,EAAKO,GAEnC,OACEI,EAAAC,cAAA,OAAA,CACEZ,IAAKS,EACLJ,GAAIA,gBACSC,GAAcO,EAAUC,EAAuBC,YAAaV,GACzEF,UAAWa,EAAGC,EAAOC,kBAAmBf,IAEvCF,EAGP"}
@@ -1,2 +0,0 @@
1
- var e={hiddenTextWrapper:"hiddenTextWrapper_9d085f6d3d"};!function(e){const t="s_id-5ac012179a41_4_5_10";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const d=document.createElement("style");d.id=t,n.firstChild?n.insertBefore(d,n.firstChild):n.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.hiddenTextWrapper_9d085f6d3d {\n /* clip pattern taken from https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/. */\n clip: rect(0, 0, 0, 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}");export{e as default};
2
- //# sourceMappingURL=HiddenText.module.scss.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HiddenText.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{toConsumableArray as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{useRef as r,useCallback as o}from"react";import{ARROW_UP_KEYS as t,NavDirections as n,ARROW_RIGHT_KEYS as s,ARROW_DOWN_KEYS as i,ARROW_LEFT_KEYS as a}from"../../../../hooks/useFullKeyboardListeners.js";import{useKeyEvent as u}from"../../../../../shared/dist/hooks/useKeyEvent.js";import{useEventListener as c}from"../../../../../shared/dist/hooks/useEventListener.js";var l=[].concat(e(t),e(s),e(i),e(a)),m=function(){var e=r(document),m=r(),d=o((function(e){m.current=e}),[]),f=o((function(e){var r=e.key;t.includes(r)?d(n.UP):s.includes(r)?d(n.RIGHT):i.includes(r)?d(n.DOWN):a.includes(r)&&d(n.LEFT)}),[d]),p=o((function(){m.current=void 0}),[m]);return u({ref:e,capture:!0,keys:l,callback:f}),c({eventName:"mousedown",ref:e,capture:!0,callback:p}),{lastNavigationDirectionRef:m}};export{m as useLastNavigationDirection};
2
- //# sourceMappingURL=useLastNavigationDirection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLastNavigationDirection.js","sources":["../../../../../../src/components/Menu/Menu/hooks/useLastNavigationDirection.tsx"],"sourcesContent":["import { useCallback, useRef } from \"react\";\nimport useEventListener from \"../../../../hooks/useEventListener\";\nimport {\n ARROW_DOWN_KEYS,\n ARROW_LEFT_KEYS,\n ARROW_RIGHT_KEYS,\n ARROW_UP_KEYS,\n NavDirections\n} from \"../../../../hooks/useFullKeyboardListeners\";\nimport useKeyEvent from \"../../../../hooks/useKeyEvent\";\n\nconst NAVIGATION_KEYS = [...ARROW_UP_KEYS, ...ARROW_RIGHT_KEYS, ...ARROW_DOWN_KEYS, ...ARROW_LEFT_KEYS];\n\nexport const useLastNavigationDirection = () => {\n const documentRef = useRef(document);\n\n const lastNavigationDirectionRef = useRef<NavDirections>();\n\n const setLastNavigationDirection = useCallback((dir: NavDirections) => {\n lastNavigationDirectionRef.current = dir;\n }, []);\n\n const onKeyEvent = useCallback(\n ({ key }: KeyboardEvent) => {\n if (ARROW_UP_KEYS.includes(key)) {\n setLastNavigationDirection(NavDirections.UP);\n } else if (ARROW_RIGHT_KEYS.includes(key)) {\n setLastNavigationDirection(NavDirections.RIGHT);\n } else if (ARROW_DOWN_KEYS.includes(key)) {\n setLastNavigationDirection(NavDirections.DOWN);\n } else if (ARROW_LEFT_KEYS.includes(key)) {\n setLastNavigationDirection(NavDirections.LEFT);\n }\n },\n [setLastNavigationDirection]\n );\n\n const onMousedownAnywhere = useCallback(() => {\n lastNavigationDirectionRef.current = undefined;\n }, [lastNavigationDirectionRef]);\n\n useKeyEvent({ ref: documentRef, capture: true, keys: NAVIGATION_KEYS, callback: onKeyEvent });\n useEventListener({ eventName: \"mousedown\", ref: documentRef, capture: true, callback: onMousedownAnywhere });\n\n return { lastNavigationDirectionRef };\n};\n"],"names":["NAVIGATION_KEYS","concat","_toConsumableArray","ARROW_UP_KEYS","ARROW_RIGHT_KEYS","ARROW_DOWN_KEYS","ARROW_LEFT_KEYS","useLastNavigationDirection","documentRef","useRef","document","lastNavigationDirectionRef","setLastNavigationDirection","useCallback","dir","current","onKeyEvent","_ref","key","includes","NavDirections","UP","RIGHT","DOWN","LEFT","onMousedownAnywhere","undefined","useKeyEvent","ref","capture","keys","callback","useEventListener","eventName"],"mappings":"gdAWA,IAAMA,EAAeC,GAAAA,OAAAC,EAAOC,GAAaD,EAAKE,GAAgBF,EAAKG,GAAeH,EAAKI,IAE1EC,EAA6B,WACxC,IAAMC,EAAcC,EAAOC,UAErBC,EAA6BF,IAE7BG,EAA6BC,GAAY,SAACC,GAC9CH,EAA2BI,QAAUD,CACtC,GAAE,IAEGE,EAAaH,GACjB,SAAAI,GAA2B,IAAxBC,EAAGD,EAAHC,IACGf,EAAcgB,SAASD,GACzBN,EAA2BQ,EAAcC,IAChCjB,EAAiBe,SAASD,GACnCN,EAA2BQ,EAAcE,OAChCjB,EAAgBc,SAASD,GAClCN,EAA2BQ,EAAcG,MAChCjB,EAAgBa,SAASD,IAClCN,EAA2BQ,EAAcI,KAE7C,GACA,CAACZ,IAGGa,EAAsBZ,GAAY,WACtCF,EAA2BI,aAAUW,CACvC,GAAG,CAACf,IAKJ,OAHAgB,EAAY,CAAEC,IAAKpB,EAAaqB,SAAS,EAAMC,KAAM9B,EAAiB+B,SAAUf,IAChFgB,EAAiB,CAAEC,UAAW,YAAaL,IAAKpB,EAAaqB,SAAS,EAAME,SAAUN,IAE/E,CAAEd,2BAAAA,EACX"}