@vibe/core 3.62.0 → 3.63.0-alpha-7f1d0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (630) hide show
  1. package/dist/components/DropdownNew/Dropdown.types.d.ts +2 -2
  2. package/dist/components/DropdownNew/hooks/useDropdownCombobox.d.ts +2 -1
  3. package/dist/components/DropdownNew/hooks/useDropdownMultiCombobox.d.ts +2 -1
  4. package/dist/components/DropdownNew/hooks/useDropdownMultiSelect.d.ts +2 -1
  5. package/dist/components/DropdownNew/hooks/useDropdownSelect.d.ts +2 -1
  6. package/dist/hooks/useThrottledCallback.d.ts +1 -2
  7. package/dist/hooks/useTimeout/index.d.ts +2 -1
  8. package/dist/metadata.json +1 -1
  9. package/dist/mocked_classnames/components/DropdownNew/Dropdown.types.d.ts +2 -2
  10. package/dist/mocked_classnames/components/DropdownNew/hooks/useDropdownCombobox.d.ts +2 -1
  11. package/dist/mocked_classnames/components/DropdownNew/hooks/useDropdownMultiCombobox.d.ts +2 -1
  12. package/dist/mocked_classnames/components/DropdownNew/hooks/useDropdownMultiSelect.d.ts +2 -1
  13. package/dist/mocked_classnames/components/DropdownNew/hooks/useDropdownSelect.d.ts +2 -1
  14. package/dist/mocked_classnames/hooks/useThrottledCallback.d.ts +1 -2
  15. package/dist/mocked_classnames/hooks/useTimeout/index.d.ts +2 -1
  16. package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
  17. package/dist/mocked_classnames/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
  18. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
  19. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
  20. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
  21. package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.js +1 -1
  22. package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.js.map +1 -1
  23. package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
  24. package/dist/mocked_classnames/src/components/AttentionBox/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
  25. package/dist/mocked_classnames/src/components/Avatar/Avatar.js +1 -1
  26. package/dist/mocked_classnames/src/components/Avatar/Avatar.js.map +1 -1
  27. package/dist/mocked_classnames/src/components/Avatar/Avatar.module.scss.js +1 -1
  28. package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.js +1 -1
  29. package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.js.map +1 -1
  30. package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
  31. package/dist/mocked_classnames/src/components/Avatar/AvatarContent.js +1 -1
  32. package/dist/mocked_classnames/src/components/Avatar/AvatarContent.js.map +1 -1
  33. package/dist/mocked_classnames/src/components/Avatar/AvatarContent.module.scss.js +1 -1
  34. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
  35. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
  36. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
  37. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
  38. package/dist/mocked_classnames/src/components/Badge/Badge.js +1 -1
  39. package/dist/mocked_classnames/src/components/Badge/Badge.js.map +1 -1
  40. package/dist/mocked_classnames/src/components/Badge/Badge.module.scss.js +1 -1
  41. package/dist/mocked_classnames/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
  42. package/dist/mocked_classnames/src/components/BaseInput/BaseInput.module.scss.js +1 -1
  43. package/dist/mocked_classnames/src/components/BaseList/BaseList.module.scss.js +1 -1
  44. package/dist/mocked_classnames/src/components/BaseListItem/BaseListItem.module.scss.js +1 -1
  45. package/dist/mocked_classnames/src/components/Box/Box.js +1 -1
  46. package/dist/mocked_classnames/src/components/Box/Box.js.map +1 -1
  47. package/dist/mocked_classnames/src/components/Box/Box.module.scss.js +1 -1
  48. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
  49. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
  50. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
  51. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
  52. package/dist/mocked_classnames/src/components/Button/Button.js +1 -1
  53. package/dist/mocked_classnames/src/components/Button/Button.js.map +1 -1
  54. package/dist/mocked_classnames/src/components/Button/Button.module.scss.js +1 -1
  55. package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.js +1 -1
  56. package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.js.map +1 -1
  57. package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.module.scss.js +1 -1
  58. package/dist/mocked_classnames/src/components/ButtonGroup/ButtonWrapper.js +1 -1
  59. package/dist/mocked_classnames/src/components/ButtonGroup/ButtonWrapper.js.map +1 -1
  60. package/dist/mocked_classnames/src/components/Checkbox/Checkbox.js +1 -1
  61. package/dist/mocked_classnames/src/components/Checkbox/Checkbox.js.map +1 -1
  62. package/dist/mocked_classnames/src/components/Checkbox/Checkbox.module.scss.js +1 -1
  63. package/dist/mocked_classnames/src/components/Chips/Chips.module.scss.js +1 -1
  64. package/dist/mocked_classnames/src/components/Clickable/Clickable.js +1 -1
  65. package/dist/mocked_classnames/src/components/Clickable/Clickable.js.map +1 -1
  66. package/dist/mocked_classnames/src/components/Clickable/Clickable.module.scss.js +1 -1
  67. package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
  68. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
  69. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
  70. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js +1 -1
  71. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +1 -1
  72. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js +1 -1
  73. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js.map +1 -1
  74. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
  75. package/dist/mocked_classnames/src/components/Combobox/Combobox.js +1 -1
  76. package/dist/mocked_classnames/src/components/Combobox/Combobox.js.map +1 -1
  77. package/dist/mocked_classnames/src/components/Combobox/Combobox.module.scss.js +1 -1
  78. package/dist/mocked_classnames/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
  79. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
  80. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
  81. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
  82. package/dist/mocked_classnames/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
  83. package/dist/mocked_classnames/src/components/Counter/Counter.js +1 -1
  84. package/dist/mocked_classnames/src/components/Counter/Counter.js.map +1 -1
  85. package/dist/mocked_classnames/src/components/Counter/Counter.module.scss.js +1 -1
  86. package/dist/mocked_classnames/src/components/DatePicker/DateNavigationItem/DateNavigationItem.module.scss.js +1 -1
  87. package/dist/mocked_classnames/src/components/DatePicker/DatePicker.module.scss.js +1 -1
  88. package/dist/mocked_classnames/src/components/DatePicker/DatePickerHeader/DatePickerHeader.module.scss.js +1 -1
  89. package/dist/mocked_classnames/src/components/DatePicker/YearPicker/YearPicker.module.scss.js +1 -1
  90. package/dist/mocked_classnames/src/components/DatePicker/date-picker-utils.js +1 -1
  91. package/dist/mocked_classnames/src/components/DatePicker/date-picker-utils.js.map +1 -1
  92. package/dist/mocked_classnames/src/components/DatePicker/external_datepicker.scss.js +1 -1
  93. package/dist/mocked_classnames/src/components/Dialog/Dialog.js +1 -1
  94. package/dist/mocked_classnames/src/components/Dialog/Dialog.js.map +1 -1
  95. package/dist/mocked_classnames/src/components/Dialog/Dialog.module.scss.js +1 -1
  96. package/dist/mocked_classnames/src/components/Dialog/DialogContent/DialogContent.js +1 -1
  97. package/dist/mocked_classnames/src/components/Dialog/DialogContent/DialogContent.js.map +1 -1
  98. package/dist/mocked_classnames/src/components/Dialog/DialogContent/DialogContent.module.scss.js +1 -1
  99. package/dist/mocked_classnames/src/components/DialogContentContainer/DialogContentContainer.js +1 -1
  100. package/dist/mocked_classnames/src/components/DialogContentContainer/DialogContentContainer.js.map +1 -1
  101. package/dist/mocked_classnames/src/components/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
  102. package/dist/mocked_classnames/src/components/Divider/Divider.module.scss.js +1 -1
  103. package/dist/mocked_classnames/src/components/Dropdown/Dropdown.js +1 -1
  104. package/dist/mocked_classnames/src/components/Dropdown/Dropdown.js.map +1 -1
  105. package/dist/mocked_classnames/src/components/Dropdown/Dropdown.module.scss.js +1 -1
  106. package/dist/mocked_classnames/src/components/Dropdown/components/ChildrenContent/ChildrenContent.module.scss.js +1 -1
  107. package/dist/mocked_classnames/src/components/Dropdown/components/MultiValueContainer/MultiValueContainer.module.scss.js +1 -1
  108. package/dist/mocked_classnames/src/components/Dropdown/components/menu/menu.module.scss.js +1 -1
  109. package/dist/mocked_classnames/src/components/Dropdown/components/option/option.module.scss.js +1 -1
  110. package/dist/mocked_classnames/src/components/Dropdown/components/singleValue/singleValue.module.scss.js +1 -1
  111. package/dist/mocked_classnames/src/components/DropdownNew/components/DropdownBase/DropdownBase.module.scss.js +1 -1
  112. package/dist/mocked_classnames/src/components/DropdownNew/components/Menu/Menu.module.scss.js +1 -1
  113. package/dist/mocked_classnames/src/components/DropdownNew/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
  114. package/dist/mocked_classnames/src/components/DropdownNew/components/Trigger/Trigger.module.scss.js +1 -1
  115. package/dist/mocked_classnames/src/components/DropdownNew/hooks/useDropdownCombobox.js +1 -1
  116. package/dist/mocked_classnames/src/components/DropdownNew/hooks/useDropdownCombobox.js.map +1 -1
  117. package/dist/mocked_classnames/src/components/DropdownNew/hooks/useDropdownMultiCombobox.js +1 -1
  118. package/dist/mocked_classnames/src/components/DropdownNew/hooks/useDropdownMultiCombobox.js.map +1 -1
  119. package/dist/mocked_classnames/src/components/DropdownNew/hooks/useDropdownMultiSelect.js +1 -1
  120. package/dist/mocked_classnames/src/components/DropdownNew/hooks/useDropdownMultiSelect.js.map +1 -1
  121. package/dist/mocked_classnames/src/components/DropdownNew/hooks/useDropdownSelect.js +1 -1
  122. package/dist/mocked_classnames/src/components/DropdownNew/hooks/useDropdownSelect.js.map +1 -1
  123. package/dist/mocked_classnames/src/components/DropdownNew/modes/DropdownMultiSelectController.js +1 -1
  124. package/dist/mocked_classnames/src/components/DropdownNew/modes/DropdownMultiSelectController.js.map +1 -1
  125. package/dist/mocked_classnames/src/components/DropdownNew/modes/DropdownSelectController.js +1 -1
  126. package/dist/mocked_classnames/src/components/DropdownNew/modes/DropdownSelectController.js.map +1 -1
  127. package/dist/mocked_classnames/src/components/EditableHeading/EditableHeading.js +1 -1
  128. package/dist/mocked_classnames/src/components/EditableHeading/EditableHeading.js.map +1 -1
  129. package/dist/mocked_classnames/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
  130. package/dist/mocked_classnames/src/components/EditableText/EditableText.js +1 -1
  131. package/dist/mocked_classnames/src/components/EditableText/EditableText.js.map +1 -1
  132. package/dist/mocked_classnames/src/components/EditableText/EditableText.module.scss.js +1 -1
  133. package/dist/mocked_classnames/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
  134. package/dist/mocked_classnames/src/components/EmptyState/EmptyState.module.scss.js +1 -1
  135. package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
  136. package/dist/mocked_classnames/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
  137. package/dist/mocked_classnames/src/components/Flex/Flex.js +1 -1
  138. package/dist/mocked_classnames/src/components/Flex/Flex.js.map +1 -1
  139. package/dist/mocked_classnames/src/components/Flex/Flex.module.scss.js +1 -1
  140. package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumber.module.scss.js +1 -1
  141. package/dist/mocked_classnames/src/components/Heading/Heading.js +1 -1
  142. package/dist/mocked_classnames/src/components/Heading/Heading.js.map +1 -1
  143. package/dist/mocked_classnames/src/components/Heading/Heading.module.scss.js +1 -1
  144. package/dist/mocked_classnames/src/components/HiddenText/HiddenText.module.scss.js +1 -1
  145. package/dist/mocked_classnames/src/components/Icon/Icon.module.scss.js +1 -1
  146. package/dist/mocked_classnames/src/components/Icon/hooks/useIconProps.js +1 -1
  147. package/dist/mocked_classnames/src/components/Icon/hooks/useIconProps.js.map +1 -1
  148. package/dist/mocked_classnames/src/components/IconButton/IconButton.js +1 -1
  149. package/dist/mocked_classnames/src/components/IconButton/IconButton.js.map +1 -1
  150. package/dist/mocked_classnames/src/components/IconButton/IconButton.module.scss.js +1 -1
  151. package/dist/mocked_classnames/src/components/InfoText/InfoText.module.scss.js +1 -1
  152. package/dist/mocked_classnames/src/components/Label/Label.js +1 -1
  153. package/dist/mocked_classnames/src/components/Label/Label.js.map +1 -1
  154. package/dist/mocked_classnames/src/components/Label/Label.module.scss.js +1 -1
  155. package/dist/mocked_classnames/src/components/Label/LabelCelebrationAnimation.module.scss.js +1 -1
  156. package/dist/mocked_classnames/src/components/LegacyModal/LegacyModal.module.scss.js +1 -1
  157. package/dist/mocked_classnames/src/components/LegacyModal/LegacyModalContent/LegacyModalContent.module.scss.js +1 -1
  158. package/dist/mocked_classnames/src/components/LegacyModal/LegacyModalFooter/LegacyModalFooter.module.scss.js +1 -1
  159. package/dist/mocked_classnames/src/components/LegacyModal/LegacyModalHeader/LegacyModalHeader.module.scss.js +1 -1
  160. package/dist/mocked_classnames/src/components/Link/Link.js +1 -1
  161. package/dist/mocked_classnames/src/components/Link/Link.js.map +1 -1
  162. package/dist/mocked_classnames/src/components/Link/Link.module.scss.js +1 -1
  163. package/dist/mocked_classnames/src/components/List/List.module.scss.js +1 -1
  164. package/dist/mocked_classnames/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
  165. package/dist/mocked_classnames/src/components/ListItem/ListItem.js +1 -1
  166. package/dist/mocked_classnames/src/components/ListItem/ListItem.js.map +1 -1
  167. package/dist/mocked_classnames/src/components/ListItem/ListItem.module.scss.js +1 -1
  168. package/dist/mocked_classnames/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
  169. package/dist/mocked_classnames/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
  170. package/dist/mocked_classnames/src/components/ListTitle/ListTitle.module.scss.js +1 -1
  171. package/dist/mocked_classnames/src/components/Loader/Loader.module.scss.js +1 -1
  172. package/dist/mocked_classnames/src/components/Menu/Menu/Menu.module.scss.js +1 -1
  173. package/dist/mocked_classnames/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
  174. package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
  175. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
  176. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
  177. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
  178. package/dist/mocked_classnames/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
  179. package/dist/mocked_classnames/src/components/Menu/MenuTitle/MenuTitle.js +1 -1
  180. package/dist/mocked_classnames/src/components/Menu/MenuTitle/MenuTitle.js.map +1 -1
  181. package/dist/mocked_classnames/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
  182. package/dist/mocked_classnames/src/components/MenuButton/MenuButton.js +1 -1
  183. package/dist/mocked_classnames/src/components/MenuButton/MenuButton.js.map +1 -1
  184. package/dist/mocked_classnames/src/components/MenuButton/MenuButton.module.scss.js +1 -1
  185. package/dist/mocked_classnames/src/components/Modal/Modal/Modal.js +1 -1
  186. package/dist/mocked_classnames/src/components/Modal/Modal/Modal.js.map +1 -1
  187. package/dist/mocked_classnames/src/components/Modal/Modal/Modal.module.scss.js +1 -1
  188. package/dist/mocked_classnames/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
  189. package/dist/mocked_classnames/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
  190. package/dist/mocked_classnames/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
  191. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
  192. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
  193. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
  194. package/dist/mocked_classnames/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
  195. package/dist/mocked_classnames/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
  196. package/dist/mocked_classnames/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
  197. package/dist/mocked_classnames/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
  198. package/dist/mocked_classnames/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
  199. package/dist/mocked_classnames/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
  200. package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js +1 -1
  201. package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js.map +1 -1
  202. package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
  203. package/dist/mocked_classnames/src/components/NumberField/NumberField.module.scss.js +1 -1
  204. package/dist/mocked_classnames/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
  205. package/dist/mocked_classnames/src/components/ProgressBars/LinearProgressBar/Bar/Bar.js +1 -1
  206. package/dist/mocked_classnames/src/components/ProgressBars/LinearProgressBar/Bar/Bar.js.map +1 -1
  207. package/dist/mocked_classnames/src/components/ProgressBars/LinearProgressBar/Bar/Bar.module.scss.js +1 -1
  208. package/dist/mocked_classnames/src/components/ProgressBars/LinearProgressBar/LinearProgressBar.module.scss.js +1 -1
  209. package/dist/mocked_classnames/src/components/ProgressBars/LinearProgressBar/LinearProgressBarHelpers.js +1 -1
  210. package/dist/mocked_classnames/src/components/ProgressBars/LinearProgressBar/LinearProgressBarHelpers.js.map +1 -1
  211. package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +1 -1
  212. package/dist/mocked_classnames/src/components/RadioButton/RadioButton.module.scss.js +1 -1
  213. package/dist/mocked_classnames/src/components/Search/Search.module.scss.js +1 -1
  214. package/dist/mocked_classnames/src/components/Skeleton/Skeleton.js +1 -1
  215. package/dist/mocked_classnames/src/components/Skeleton/Skeleton.js.map +1 -1
  216. package/dist/mocked_classnames/src/components/Skeleton/Skeleton.module.scss.js +1 -1
  217. package/dist/mocked_classnames/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
  218. package/dist/mocked_classnames/src/components/Slider/SelectionIndicator.js +1 -1
  219. package/dist/mocked_classnames/src/components/Slider/SelectionIndicator.js.map +1 -1
  220. package/dist/mocked_classnames/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
  221. package/dist/mocked_classnames/src/components/Slider/Slider.js +1 -1
  222. package/dist/mocked_classnames/src/components/Slider/Slider.js.map +1 -1
  223. package/dist/mocked_classnames/src/components/Slider/Slider.module.scss.js +1 -1
  224. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
  225. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
  226. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
  227. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderThumb.js +1 -1
  228. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderThumb.js.map +1 -1
  229. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
  230. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
  231. package/dist/mocked_classnames/src/components/Slider/SliderInfix.module.scss.js +1 -1
  232. package/dist/mocked_classnames/src/components/SplitButton/SplitButton.js +1 -1
  233. package/dist/mocked_classnames/src/components/SplitButton/SplitButton.js.map +1 -1
  234. package/dist/mocked_classnames/src/components/SplitButton/SplitButton.module.scss.js +1 -1
  235. package/dist/mocked_classnames/src/components/Steps/Steps.module.scss.js +1 -1
  236. package/dist/mocked_classnames/src/components/Steps/StepsCommand.js +1 -1
  237. package/dist/mocked_classnames/src/components/Steps/StepsCommand.js.map +1 -1
  238. package/dist/mocked_classnames/src/components/Steps/StepsCommand.module.scss.js +1 -1
  239. package/dist/mocked_classnames/src/components/Steps/StepsDot.js +1 -1
  240. package/dist/mocked_classnames/src/components/Steps/StepsDot.js.map +1 -1
  241. package/dist/mocked_classnames/src/components/Steps/StepsDot.module.scss.js +1 -1
  242. package/dist/mocked_classnames/src/components/Steps/StepsGalleryHeader.js +1 -1
  243. package/dist/mocked_classnames/src/components/Steps/StepsGalleryHeader.js.map +1 -1
  244. package/dist/mocked_classnames/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
  245. package/dist/mocked_classnames/src/components/Steps/StepsHeader.module.scss.js +1 -1
  246. package/dist/mocked_classnames/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
  247. package/dist/mocked_classnames/src/components/Switch/Switch.module.scss.js +1 -1
  248. package/dist/mocked_classnames/src/components/Table/Table/Table.module.scss.js +1 -1
  249. package/dist/mocked_classnames/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
  250. package/dist/mocked_classnames/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
  251. package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.js +1 -1
  252. package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.js.map +1 -1
  253. package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
  254. package/dist/mocked_classnames/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
  255. package/dist/mocked_classnames/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
  256. package/dist/mocked_classnames/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
  257. package/dist/mocked_classnames/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
  258. package/dist/mocked_classnames/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
  259. package/dist/mocked_classnames/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
  260. package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.js +1 -1
  261. package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.js.map +1 -1
  262. package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
  263. package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.js +1 -1
  264. package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.js.map +1 -1
  265. package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
  266. package/dist/mocked_classnames/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
  267. package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.js +1 -1
  268. package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.js.map +1 -1
  269. package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
  270. package/dist/mocked_classnames/src/components/Text/Text.js +1 -1
  271. package/dist/mocked_classnames/src/components/Text/Text.js.map +1 -1
  272. package/dist/mocked_classnames/src/components/Text/Text.module.scss.js +1 -1
  273. package/dist/mocked_classnames/src/components/TextArea/TextArea.module.scss.js +1 -1
  274. package/dist/mocked_classnames/src/components/TextField/TextField.module.scss.js +1 -1
  275. package/dist/mocked_classnames/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
  276. package/dist/mocked_classnames/src/components/Tipseen/Tipseen.module.scss.js +1 -1
  277. package/dist/mocked_classnames/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
  278. package/dist/mocked_classnames/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
  279. package/dist/mocked_classnames/src/components/Tipseen/TipseenImage.module.scss.js +1 -1
  280. package/dist/mocked_classnames/src/components/Tipseen/TipseenMedia/TipseenMedia.js +1 -1
  281. package/dist/mocked_classnames/src/components/Tipseen/TipseenMedia/TipseenMedia.js.map +1 -1
  282. package/dist/mocked_classnames/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
  283. package/dist/mocked_classnames/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
  284. package/dist/mocked_classnames/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
  285. package/dist/mocked_classnames/src/components/Toast/Toast.js +1 -1
  286. package/dist/mocked_classnames/src/components/Toast/Toast.js.map +1 -1
  287. package/dist/mocked_classnames/src/components/Toast/Toast.module.scss.js +1 -1
  288. package/dist/mocked_classnames/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
  289. package/dist/mocked_classnames/src/components/Toggle/MockToggle.module.scss.js +1 -1
  290. package/dist/mocked_classnames/src/components/Toggle/Toggle.js +1 -1
  291. package/dist/mocked_classnames/src/components/Toggle/Toggle.js.map +1 -1
  292. package/dist/mocked_classnames/src/components/Toggle/Toggle.module.scss.js +1 -1
  293. package/dist/mocked_classnames/src/components/Toggle/ToggleText.module.scss.js +1 -1
  294. package/dist/mocked_classnames/src/components/Tooltip/Tooltip.js +1 -1
  295. package/dist/mocked_classnames/src/components/Tooltip/Tooltip.js.map +1 -1
  296. package/dist/mocked_classnames/src/components/Tooltip/Tooltip.module.scss.js +1 -1
  297. package/dist/mocked_classnames/src/components/TransitionView/TransitionView.module.scss.js +1 -1
  298. package/dist/mocked_classnames/src/components/Typography/Typography.module.scss.js +1 -1
  299. package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
  300. package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.js +1 -1
  301. package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.js.map +1 -1
  302. package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
  303. package/dist/mocked_classnames/src/helpers/screenReaderAccessHelper.js +1 -1
  304. package/dist/mocked_classnames/src/helpers/screenReaderAccessHelper.js.map +1 -1
  305. package/dist/mocked_classnames/src/hooks/useDebounceEvent/index.js +1 -1
  306. package/dist/mocked_classnames/src/hooks/useDebounceEvent/index.js.map +1 -1
  307. package/dist/mocked_classnames/src/hooks/useElementsOverflowingIndex.js +1 -1
  308. package/dist/mocked_classnames/src/hooks/useElementsOverflowingIndex.js.map +1 -1
  309. package/dist/mocked_classnames/src/hooks/useFullKeyboardListeners.js +1 -1
  310. package/dist/mocked_classnames/src/hooks/useFullKeyboardListeners.js.map +1 -1
  311. package/dist/mocked_classnames/src/hooks/useResizeObserver.js +1 -1
  312. package/dist/mocked_classnames/src/hooks/useResizeObserver.js.map +1 -1
  313. package/dist/mocked_classnames/src/hooks/useThrottledCallback.js +1 -1
  314. package/dist/mocked_classnames/src/hooks/useThrottledCallback.js.map +1 -1
  315. package/dist/mocked_classnames/src/hooks/useTimeout/index.js +1 -1
  316. package/dist/mocked_classnames/src/hooks/useTimeout/index.js.map +1 -1
  317. package/dist/mocked_classnames/src/utils/dom-utils.js +1 -1
  318. package/dist/mocked_classnames/src/utils/dom-utils.js.map +1 -1
  319. package/dist/mocked_classnames/src/utils/function-utils.js +1 -1
  320. package/dist/mocked_classnames/src/utils/function-utils.js.map +1 -1
  321. package/dist/mocked_classnames/style/dist/index.min.css.js +1 -1
  322. package/dist/mocked_classnames/utils/dom-utils.d.ts +1 -2
  323. package/dist/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
  324. package/dist/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
  325. package/dist/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
  326. package/dist/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
  327. package/dist/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
  328. package/dist/src/components/AttentionBox/AttentionBox.js +1 -1
  329. package/dist/src/components/AttentionBox/AttentionBox.js.map +1 -1
  330. package/dist/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
  331. package/dist/src/components/AttentionBox/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
  332. package/dist/src/components/Avatar/Avatar.js +1 -1
  333. package/dist/src/components/Avatar/Avatar.js.map +1 -1
  334. package/dist/src/components/Avatar/Avatar.module.scss.js +1 -1
  335. package/dist/src/components/Avatar/AvatarBadge.js +1 -1
  336. package/dist/src/components/Avatar/AvatarBadge.js.map +1 -1
  337. package/dist/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
  338. package/dist/src/components/Avatar/AvatarContent.js +1 -1
  339. package/dist/src/components/Avatar/AvatarContent.js.map +1 -1
  340. package/dist/src/components/Avatar/AvatarContent.module.scss.js +1 -1
  341. package/dist/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
  342. package/dist/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
  343. package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
  344. package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
  345. package/dist/src/components/Badge/Badge.js +1 -1
  346. package/dist/src/components/Badge/Badge.js.map +1 -1
  347. package/dist/src/components/Badge/Badge.module.scss.js +1 -1
  348. package/dist/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
  349. package/dist/src/components/BaseInput/BaseInput.module.scss.js +1 -1
  350. package/dist/src/components/BaseList/BaseList.module.scss.js +1 -1
  351. package/dist/src/components/BaseListItem/BaseListItem.module.scss.js +1 -1
  352. package/dist/src/components/Box/Box.js +1 -1
  353. package/dist/src/components/Box/Box.js.map +1 -1
  354. package/dist/src/components/Box/Box.module.scss.js +1 -1
  355. package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
  356. package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
  357. package/dist/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
  358. package/dist/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
  359. package/dist/src/components/Button/Button.js +1 -1
  360. package/dist/src/components/Button/Button.js.map +1 -1
  361. package/dist/src/components/Button/Button.module.scss.js +1 -1
  362. package/dist/src/components/ButtonGroup/ButtonGroup.js +1 -1
  363. package/dist/src/components/ButtonGroup/ButtonGroup.js.map +1 -1
  364. package/dist/src/components/ButtonGroup/ButtonGroup.module.scss.js +1 -1
  365. package/dist/src/components/ButtonGroup/ButtonWrapper.js +1 -1
  366. package/dist/src/components/ButtonGroup/ButtonWrapper.js.map +1 -1
  367. package/dist/src/components/Checkbox/Checkbox.js +1 -1
  368. package/dist/src/components/Checkbox/Checkbox.js.map +1 -1
  369. package/dist/src/components/Checkbox/Checkbox.module.scss.js +1 -1
  370. package/dist/src/components/Chips/Chips.module.scss.js +1 -1
  371. package/dist/src/components/Clickable/Clickable.js +1 -1
  372. package/dist/src/components/Clickable/Clickable.js.map +1 -1
  373. package/dist/src/components/Clickable/Clickable.module.scss.js +1 -1
  374. package/dist/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
  375. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
  376. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
  377. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js +1 -1
  378. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +1 -1
  379. package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js +1 -1
  380. package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js.map +1 -1
  381. package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
  382. package/dist/src/components/Combobox/Combobox.js +1 -1
  383. package/dist/src/components/Combobox/Combobox.js.map +1 -1
  384. package/dist/src/components/Combobox/Combobox.module.scss.js +1 -1
  385. package/dist/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
  386. package/dist/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
  387. package/dist/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
  388. package/dist/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
  389. package/dist/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
  390. package/dist/src/components/Counter/Counter.js +1 -1
  391. package/dist/src/components/Counter/Counter.js.map +1 -1
  392. package/dist/src/components/Counter/Counter.module.scss.js +1 -1
  393. package/dist/src/components/DatePicker/DateNavigationItem/DateNavigationItem.module.scss.js +1 -1
  394. package/dist/src/components/DatePicker/DatePicker.module.scss.js +1 -1
  395. package/dist/src/components/DatePicker/DatePickerHeader/DatePickerHeader.module.scss.js +1 -1
  396. package/dist/src/components/DatePicker/YearPicker/YearPicker.module.scss.js +1 -1
  397. package/dist/src/components/DatePicker/date-picker-utils.js +1 -1
  398. package/dist/src/components/DatePicker/date-picker-utils.js.map +1 -1
  399. package/dist/src/components/DatePicker/external_datepicker.scss.js +1 -1
  400. package/dist/src/components/Dialog/Dialog.js +1 -1
  401. package/dist/src/components/Dialog/Dialog.js.map +1 -1
  402. package/dist/src/components/Dialog/Dialog.module.scss.js +1 -1
  403. package/dist/src/components/Dialog/DialogContent/DialogContent.js +1 -1
  404. package/dist/src/components/Dialog/DialogContent/DialogContent.js.map +1 -1
  405. package/dist/src/components/Dialog/DialogContent/DialogContent.module.scss.js +1 -1
  406. package/dist/src/components/DialogContentContainer/DialogContentContainer.js +1 -1
  407. package/dist/src/components/DialogContentContainer/DialogContentContainer.js.map +1 -1
  408. package/dist/src/components/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
  409. package/dist/src/components/Divider/Divider.module.scss.js +1 -1
  410. package/dist/src/components/Dropdown/Dropdown.js +1 -1
  411. package/dist/src/components/Dropdown/Dropdown.js.map +1 -1
  412. package/dist/src/components/Dropdown/Dropdown.module.scss.js +1 -1
  413. package/dist/src/components/Dropdown/components/ChildrenContent/ChildrenContent.module.scss.js +1 -1
  414. package/dist/src/components/Dropdown/components/MultiValueContainer/MultiValueContainer.module.scss.js +1 -1
  415. package/dist/src/components/Dropdown/components/menu/menu.module.scss.js +1 -1
  416. package/dist/src/components/Dropdown/components/option/option.module.scss.js +1 -1
  417. package/dist/src/components/Dropdown/components/singleValue/singleValue.module.scss.js +1 -1
  418. package/dist/src/components/DropdownNew/components/DropdownBase/DropdownBase.module.scss.js +1 -1
  419. package/dist/src/components/DropdownNew/components/Menu/Menu.module.scss.js +1 -1
  420. package/dist/src/components/DropdownNew/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
  421. package/dist/src/components/DropdownNew/components/Trigger/Trigger.module.scss.js +1 -1
  422. package/dist/src/components/DropdownNew/hooks/useDropdownCombobox.js +1 -1
  423. package/dist/src/components/DropdownNew/hooks/useDropdownCombobox.js.map +1 -1
  424. package/dist/src/components/DropdownNew/hooks/useDropdownMultiCombobox.js +1 -1
  425. package/dist/src/components/DropdownNew/hooks/useDropdownMultiCombobox.js.map +1 -1
  426. package/dist/src/components/DropdownNew/hooks/useDropdownMultiSelect.js +1 -1
  427. package/dist/src/components/DropdownNew/hooks/useDropdownMultiSelect.js.map +1 -1
  428. package/dist/src/components/DropdownNew/hooks/useDropdownSelect.js +1 -1
  429. package/dist/src/components/DropdownNew/hooks/useDropdownSelect.js.map +1 -1
  430. package/dist/src/components/DropdownNew/modes/DropdownMultiSelectController.js +1 -1
  431. package/dist/src/components/DropdownNew/modes/DropdownMultiSelectController.js.map +1 -1
  432. package/dist/src/components/DropdownNew/modes/DropdownSelectController.js +1 -1
  433. package/dist/src/components/DropdownNew/modes/DropdownSelectController.js.map +1 -1
  434. package/dist/src/components/EditableHeading/EditableHeading.js +1 -1
  435. package/dist/src/components/EditableHeading/EditableHeading.js.map +1 -1
  436. package/dist/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
  437. package/dist/src/components/EditableText/EditableText.js +1 -1
  438. package/dist/src/components/EditableText/EditableText.js.map +1 -1
  439. package/dist/src/components/EditableText/EditableText.module.scss.js +1 -1
  440. package/dist/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
  441. package/dist/src/components/EmptyState/EmptyState.module.scss.js +1 -1
  442. package/dist/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
  443. package/dist/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
  444. package/dist/src/components/Flex/Flex.js +1 -1
  445. package/dist/src/components/Flex/Flex.js.map +1 -1
  446. package/dist/src/components/Flex/Flex.module.scss.js +1 -1
  447. package/dist/src/components/FormattedNumber/FormattedNumber.module.scss.js +1 -1
  448. package/dist/src/components/Heading/Heading.js +1 -1
  449. package/dist/src/components/Heading/Heading.js.map +1 -1
  450. package/dist/src/components/Heading/Heading.module.scss.js +1 -1
  451. package/dist/src/components/HiddenText/HiddenText.module.scss.js +1 -1
  452. package/dist/src/components/Icon/Icon.module.scss.js +1 -1
  453. package/dist/src/components/Icon/hooks/useIconProps.js +1 -1
  454. package/dist/src/components/Icon/hooks/useIconProps.js.map +1 -1
  455. package/dist/src/components/IconButton/IconButton.js +1 -1
  456. package/dist/src/components/IconButton/IconButton.js.map +1 -1
  457. package/dist/src/components/IconButton/IconButton.module.scss.js +1 -1
  458. package/dist/src/components/InfoText/InfoText.module.scss.js +1 -1
  459. package/dist/src/components/Label/Label.js +1 -1
  460. package/dist/src/components/Label/Label.js.map +1 -1
  461. package/dist/src/components/Label/Label.module.scss.js +1 -1
  462. package/dist/src/components/Label/LabelCelebrationAnimation.module.scss.js +1 -1
  463. package/dist/src/components/LegacyModal/LegacyModal.module.scss.js +1 -1
  464. package/dist/src/components/LegacyModal/LegacyModalContent/LegacyModalContent.module.scss.js +1 -1
  465. package/dist/src/components/LegacyModal/LegacyModalFooter/LegacyModalFooter.module.scss.js +1 -1
  466. package/dist/src/components/LegacyModal/LegacyModalHeader/LegacyModalHeader.module.scss.js +1 -1
  467. package/dist/src/components/Link/Link.js +1 -1
  468. package/dist/src/components/Link/Link.js.map +1 -1
  469. package/dist/src/components/Link/Link.module.scss.js +1 -1
  470. package/dist/src/components/List/List.module.scss.js +1 -1
  471. package/dist/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
  472. package/dist/src/components/ListItem/ListItem.js +1 -1
  473. package/dist/src/components/ListItem/ListItem.js.map +1 -1
  474. package/dist/src/components/ListItem/ListItem.module.scss.js +1 -1
  475. package/dist/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
  476. package/dist/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
  477. package/dist/src/components/ListTitle/ListTitle.module.scss.js +1 -1
  478. package/dist/src/components/Loader/Loader.module.scss.js +1 -1
  479. package/dist/src/components/Menu/Menu/Menu.module.scss.js +1 -1
  480. package/dist/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
  481. package/dist/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
  482. package/dist/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
  483. package/dist/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
  484. package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
  485. package/dist/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
  486. package/dist/src/components/Menu/MenuTitle/MenuTitle.js +1 -1
  487. package/dist/src/components/Menu/MenuTitle/MenuTitle.js.map +1 -1
  488. package/dist/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
  489. package/dist/src/components/MenuButton/MenuButton.js +1 -1
  490. package/dist/src/components/MenuButton/MenuButton.js.map +1 -1
  491. package/dist/src/components/MenuButton/MenuButton.module.scss.js +1 -1
  492. package/dist/src/components/Modal/Modal/Modal.js +1 -1
  493. package/dist/src/components/Modal/Modal/Modal.js.map +1 -1
  494. package/dist/src/components/Modal/Modal/Modal.module.scss.js +1 -1
  495. package/dist/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
  496. package/dist/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
  497. package/dist/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
  498. package/dist/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
  499. package/dist/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
  500. package/dist/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
  501. package/dist/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
  502. package/dist/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
  503. package/dist/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
  504. package/dist/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
  505. package/dist/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
  506. package/dist/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
  507. package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js +1 -1
  508. package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js.map +1 -1
  509. package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
  510. package/dist/src/components/NumberField/NumberField.module.scss.js +1 -1
  511. package/dist/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
  512. package/dist/src/components/ProgressBars/LinearProgressBar/Bar/Bar.js +1 -1
  513. package/dist/src/components/ProgressBars/LinearProgressBar/Bar/Bar.js.map +1 -1
  514. package/dist/src/components/ProgressBars/LinearProgressBar/Bar/Bar.module.scss.js +1 -1
  515. package/dist/src/components/ProgressBars/LinearProgressBar/LinearProgressBar.module.scss.js +1 -1
  516. package/dist/src/components/ProgressBars/LinearProgressBar/LinearProgressBarHelpers.js +1 -1
  517. package/dist/src/components/ProgressBars/LinearProgressBar/LinearProgressBarHelpers.js.map +1 -1
  518. package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +1 -1
  519. package/dist/src/components/RadioButton/RadioButton.module.scss.js +1 -1
  520. package/dist/src/components/Search/Search.module.scss.js +1 -1
  521. package/dist/src/components/Skeleton/Skeleton.js +1 -1
  522. package/dist/src/components/Skeleton/Skeleton.js.map +1 -1
  523. package/dist/src/components/Skeleton/Skeleton.module.scss.js +1 -1
  524. package/dist/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
  525. package/dist/src/components/Slider/SelectionIndicator.js +1 -1
  526. package/dist/src/components/Slider/SelectionIndicator.js.map +1 -1
  527. package/dist/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
  528. package/dist/src/components/Slider/Slider.js +1 -1
  529. package/dist/src/components/Slider/Slider.js.map +1 -1
  530. package/dist/src/components/Slider/Slider.module.scss.js +1 -1
  531. package/dist/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
  532. package/dist/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
  533. package/dist/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
  534. package/dist/src/components/Slider/SliderBase/SliderThumb.js +1 -1
  535. package/dist/src/components/Slider/SliderBase/SliderThumb.js.map +1 -1
  536. package/dist/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
  537. package/dist/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
  538. package/dist/src/components/Slider/SliderInfix.module.scss.js +1 -1
  539. package/dist/src/components/SplitButton/SplitButton.js +1 -1
  540. package/dist/src/components/SplitButton/SplitButton.js.map +1 -1
  541. package/dist/src/components/SplitButton/SplitButton.module.scss.js +1 -1
  542. package/dist/src/components/Steps/Steps.module.scss.js +1 -1
  543. package/dist/src/components/Steps/StepsCommand.js +1 -1
  544. package/dist/src/components/Steps/StepsCommand.js.map +1 -1
  545. package/dist/src/components/Steps/StepsCommand.module.scss.js +1 -1
  546. package/dist/src/components/Steps/StepsDot.js +1 -1
  547. package/dist/src/components/Steps/StepsDot.js.map +1 -1
  548. package/dist/src/components/Steps/StepsDot.module.scss.js +1 -1
  549. package/dist/src/components/Steps/StepsGalleryHeader.js +1 -1
  550. package/dist/src/components/Steps/StepsGalleryHeader.js.map +1 -1
  551. package/dist/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
  552. package/dist/src/components/Steps/StepsHeader.module.scss.js +1 -1
  553. package/dist/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
  554. package/dist/src/components/Switch/Switch.module.scss.js +1 -1
  555. package/dist/src/components/Table/Table/Table.module.scss.js +1 -1
  556. package/dist/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
  557. package/dist/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
  558. package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.js +1 -1
  559. package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.js.map +1 -1
  560. package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
  561. package/dist/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
  562. package/dist/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
  563. package/dist/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
  564. package/dist/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
  565. package/dist/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
  566. package/dist/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
  567. package/dist/src/components/Tabs/Tab/Tab.js +1 -1
  568. package/dist/src/components/Tabs/Tab/Tab.js.map +1 -1
  569. package/dist/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
  570. package/dist/src/components/Tabs/TabList/TabList.js +1 -1
  571. package/dist/src/components/Tabs/TabList/TabList.js.map +1 -1
  572. package/dist/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
  573. package/dist/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
  574. package/dist/src/components/Tabs/TabPanels/TabPanels.js +1 -1
  575. package/dist/src/components/Tabs/TabPanels/TabPanels.js.map +1 -1
  576. package/dist/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
  577. package/dist/src/components/Text/Text.js +1 -1
  578. package/dist/src/components/Text/Text.js.map +1 -1
  579. package/dist/src/components/Text/Text.module.scss.js +1 -1
  580. package/dist/src/components/TextArea/TextArea.module.scss.js +1 -1
  581. package/dist/src/components/TextField/TextField.module.scss.js +1 -1
  582. package/dist/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
  583. package/dist/src/components/Tipseen/Tipseen.module.scss.js +1 -1
  584. package/dist/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
  585. package/dist/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
  586. package/dist/src/components/Tipseen/TipseenImage.module.scss.js +1 -1
  587. package/dist/src/components/Tipseen/TipseenMedia/TipseenMedia.js +1 -1
  588. package/dist/src/components/Tipseen/TipseenMedia/TipseenMedia.js.map +1 -1
  589. package/dist/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
  590. package/dist/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
  591. package/dist/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
  592. package/dist/src/components/Toast/Toast.js +1 -1
  593. package/dist/src/components/Toast/Toast.js.map +1 -1
  594. package/dist/src/components/Toast/Toast.module.scss.js +1 -1
  595. package/dist/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
  596. package/dist/src/components/Toggle/MockToggle.module.scss.js +1 -1
  597. package/dist/src/components/Toggle/Toggle.js +1 -1
  598. package/dist/src/components/Toggle/Toggle.js.map +1 -1
  599. package/dist/src/components/Toggle/Toggle.module.scss.js +1 -1
  600. package/dist/src/components/Toggle/ToggleText.module.scss.js +1 -1
  601. package/dist/src/components/Tooltip/Tooltip.js +1 -1
  602. package/dist/src/components/Tooltip/Tooltip.js.map +1 -1
  603. package/dist/src/components/Tooltip/Tooltip.module.scss.js +1 -1
  604. package/dist/src/components/TransitionView/TransitionView.module.scss.js +1 -1
  605. package/dist/src/components/Typography/Typography.module.scss.js +1 -1
  606. package/dist/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
  607. package/dist/src/components/VirtualizedList/VirtualizedList.js +1 -1
  608. package/dist/src/components/VirtualizedList/VirtualizedList.js.map +1 -1
  609. package/dist/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
  610. package/dist/src/helpers/screenReaderAccessHelper.js +1 -1
  611. package/dist/src/helpers/screenReaderAccessHelper.js.map +1 -1
  612. package/dist/src/hooks/useDebounceEvent/index.js +1 -1
  613. package/dist/src/hooks/useDebounceEvent/index.js.map +1 -1
  614. package/dist/src/hooks/useElementsOverflowingIndex.js +1 -1
  615. package/dist/src/hooks/useElementsOverflowingIndex.js.map +1 -1
  616. package/dist/src/hooks/useFullKeyboardListeners.js +1 -1
  617. package/dist/src/hooks/useFullKeyboardListeners.js.map +1 -1
  618. package/dist/src/hooks/useResizeObserver.js +1 -1
  619. package/dist/src/hooks/useResizeObserver.js.map +1 -1
  620. package/dist/src/hooks/useThrottledCallback.js +1 -1
  621. package/dist/src/hooks/useThrottledCallback.js.map +1 -1
  622. package/dist/src/hooks/useTimeout/index.js +1 -1
  623. package/dist/src/hooks/useTimeout/index.js.map +1 -1
  624. package/dist/src/utils/dom-utils.js +1 -1
  625. package/dist/src/utils/dom-utils.js.map +1 -1
  626. package/dist/src/utils/function-utils.js +1 -1
  627. package/dist/src/utils/function-utils.js.map +1 -1
  628. package/dist/style/dist/index.min.css.js +1 -1
  629. package/dist/utils/dom-utils.d.ts +1 -2
  630. package/package.json +4 -7
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { camelCase, isFunction } from \"lodash-es\";\nimport cx from \"classnames\";\nimport React, { type CSSProperties, isValidElement, PureComponent, type ReactElement } from \"react\";\nimport { type Modifier } from \"react-popper\";\nimport Dialog from \"../Dialog/Dialog\";\nimport { type DialogAnimationType, type DialogTriggerEvent } from \"../Dialog/Dialog.types\";\nimport { HideShowEvent as HideShowEventEnum, AnimationType as AnimationTypeEnum } from \"../Dialog/DialogConstants\";\nimport type VibeComponentProps from \"../../types/VibeComponentProps\";\nimport { TooltipTheme as TooltipThemeEnum, TooltipPositions as TooltipPositionsEnum } from \"./TooltipConstants\";\nimport { type ElementContent } from \"../../types/ElementContent\";\nimport { type MoveBy } from \"../../types/MoveBy\";\nimport { getStyle } from \"../../helpers/typesciptCssModulesHelper\";\nimport styles from \"./Tooltip.module.scss\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport { type SubIcon } from \"../../types\";\nimport Icon from \"../Icon/Icon\";\nimport Flex from \"../Flex/Flex\";\nimport { type TooltipPositions, type TooltipTheme } from \"./Tooltip.types\";\n\nexport type TooltipProps = TooltipBaseProps & (TooltipWithChildrenProps | TooltipWithoutChildrenProps);\n\ninterface TooltipWithoutChildrenProps {\n /**\n * If true, the tooltip will be rendered even if there are no children.\n */\n forceRenderWithoutChildren: boolean;\n /**\n * The children elements that the tooltip is attached to.\n */\n children?: ReactElement | Array<ReactElement>;\n}\n\ninterface TooltipWithChildrenProps {\n /**\n * If true, the tooltip will be rendered even if there are no children.\n */\n forceRenderWithoutChildren?: boolean;\n /**\n * The children elements that the tooltip is attached to.\n */\n children: ReactElement | Array<ReactElement>;\n}\n\n// TODO TS-migration extend DialogProps, once Dialog is migrated to TS\ninterface TooltipBaseProps extends VibeComponentProps {\n /**\n * The content displayed inside the tooltip.\n */\n content: ElementContent;\n /**\n * Inline styles applied to the tooltip container.\n */\n style?: CSSProperties;\n /**\n * Class name applied to the tooltip arrow.\n */\n arrowClassName?: string;\n /**\n * Offset values for positioning adjustments.\n */\n moveBy?: MoveBy;\n /**\n * The theme of the tooltip.\n */\n theme?: TooltipTheme;\n /**\n * Function to get the container where the tooltip should be rendered.\n */\n getContainer?: () => HTMLElement;\n /**\n * Delay in milliseconds before hiding the tooltip.\n */\n hideDelay?: number;\n /**\n * Delay in milliseconds before showing the tooltip.\n */\n showDelay?: number;\n /**\n * If true, disables the slide animation of the tooltip.\n */\n disableDialogSlide?: boolean;\n /**\n * The animation type used for showing/hiding the tooltip.\n */\n animationType?: DialogAnimationType;\n /**\n * If true, renders the tooltip without a dialog.\n */\n withoutDialog?: boolean;\n /**\n * The CSS selector of the container where the tooltip should be rendered.\n */\n containerSelector?: string;\n /**\n * Delay in milliseconds before showing the tooltip immediately.\n */\n immediateShowDelay?: number;\n /**\n * If false, hides the arrow of the tooltip.\n */\n tip?: boolean;\n /**\n * If true, the tooltip is shown when the component mounts.\n */\n shouldShowOnMount?: boolean;\n /**\n * If true, hides the tooltip when the reference element is hidden.\n */\n hideWhenReferenceHidden?: boolean;\n /**\n * Callback fired when the tooltip is hidden.\n */\n onTooltipHide?: () => void;\n /**\n * Callback fired when the tooltip is shown.\n */\n onTooltipShow?: () => void;\n /**\n * Custom Popper.js modifiers.\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers?: Array<Modifier<unknown>>;\n /**\n * The placement of the tooltip relative to the reference element.\n */\n position?: TooltipPositions;\n /**\n * Events that trigger showing the tooltip.\n */\n showTrigger?: DialogTriggerEvent | Array<DialogTriggerEvent>;\n /**\n * Events that trigger hiding the tooltip.\n */\n hideTrigger?: DialogTriggerEvent | Array<DialogTriggerEvent>;\n /**\n * If true, prevents closing the tooltip when the mouse enters it.\n */\n showOnDialogEnter?: boolean;\n /**\n * Class name applied to the reference wrapper element.\n */\n referenceWrapperClassName?: string;\n /**\n * If true, keyboard focus/blur events behave like mouse enter/leave.\n */\n addKeyboardHideShowTriggersByDefault?: boolean;\n /**\n * If true, controls the open state of the tooltip.\n */\n open?: boolean;\n /**\n * The z-index applied to the tooltip.\n */\n zIndex?: number;\n /**\n * The title of the tooltip.\n */\n title?: string;\n /**\n * The image displayed inside the tooltip.\n */\n image?: string;\n /**\n * The icon displayed next to the title.\n */\n icon?: SubIcon;\n /**\n * The maximum width of the tooltip.\n */\n maxWidth?: number;\n /**\n * The text direction of the tooltip: \"ltr\", \"rtl\", or \"auto\".\n */\n dir?: \"ltr\" | \"rtl\" | \"auto\";\n}\n// When last tooltip was shown in the last 1.5 second - the next tooltip will be shown immediately\nconst IMMEDIATE_SHOW_THRESHOLD_MS = 1500;\n\n// Shared state across multiple tooltip instances (i.e last tooltip shown time)\nconst globalState: { lastTooltipHideTS: number; openTooltipsCount: number } = {\n lastTooltipHideTS: null,\n openTooltipsCount: 0\n};\n\nexport default class Tooltip extends PureComponent<TooltipProps> {\n wasShown: boolean;\n static positions = TooltipPositionsEnum;\n static hideShowTriggers = HideShowEventEnum;\n static themes = TooltipThemeEnum;\n static animationTypes = AnimationTypeEnum;\n static defaultProps = {\n moveBy: { main: 4, secondary: 0 },\n theme: \"dark\",\n position: \"top\",\n hideDelay: 100,\n showDelay: 300,\n disableDialogSlide: true,\n animationType: AnimationTypeEnum.EXPAND,\n withoutDialog: false,\n tip: true,\n hideWhenReferenceHidden: false,\n modifiers: new Array<Modifier<unknown>>(),\n showTrigger: Tooltip.hideShowTriggers.MOUSE_ENTER,\n hideTrigger: Tooltip.hideShowTriggers.MOUSE_LEAVE,\n showOnDialogEnter: true,\n referenceWrapperClassName: \"\",\n addKeyboardHideShowTriggersByDefault: true,\n open: false\n };\n constructor(props: TooltipProps) {\n super(props);\n this.renderTooltipContent = this.renderTooltipContent.bind(this);\n this.getShowDelay = this.getShowDelay.bind(this);\n this.onTooltipShow = this.onTooltipShow.bind(this);\n this.onTooltipHide = this.onTooltipHide.bind(this);\n\n this.wasShown = false;\n }\n\n renderTooltipContent() {\n const { theme, content, className, style, maxWidth, title, image, icon, dir } = this.props;\n if (!content) {\n // don't render empty tooltip\n return null;\n }\n let contentValue;\n if (isFunction(content)) {\n contentValue = content();\n } else if (isValidElement(content)) {\n contentValue = content;\n } else if (typeof content === \"string\" && content) {\n contentValue = content;\n } else if (Array.isArray(content) && content.length > 0) {\n // allow array of elements\n contentValue = content;\n }\n\n if (!contentValue) {\n return null;\n }\n\n return (\n <div\n style={maxWidth ? ({ ...style, \"--tooltip-max-width\": `${maxWidth}px` } as CSSProperties) : style}\n className={cx(styles.tooltip, getStyle(styles, camelCase(theme)), className)}\n dir={dir}\n >\n {image && <img className={styles.image} src={image} alt=\"\" />}\n <div className={cx(styles.content)}>\n {title && (\n <Flex gap=\"xs\">\n {icon && <Icon iconSize=\"20\" icon={icon} />}\n <div className={styles.title}>{title}</div>\n </Flex>\n )}\n {contentValue}\n </div>\n </div>\n );\n }\n\n onTooltipShow() {\n if (!this.wasShown) {\n const { onTooltipShow } = this.props;\n globalState.openTooltipsCount++;\n this.wasShown = true;\n onTooltipShow && onTooltipShow();\n }\n }\n\n onTooltipHide() {\n if (this.wasShown) {\n const { onTooltipHide } = this.props;\n globalState.lastTooltipHideTS = Date.now();\n globalState.openTooltipsCount--;\n this.wasShown = false;\n onTooltipHide && onTooltipHide();\n }\n }\n\n getTimeSinceLastTooltip() {\n if (globalState.openTooltipsCount > 0) {\n return 0;\n }\n return globalState.lastTooltipHideTS ? Date.now() - globalState.lastTooltipHideTS : Infinity;\n }\n\n getShowDelay() {\n const { showDelay, immediateShowDelay } = this.props;\n const timeSinceLastTooltip = this.getTimeSinceLastTooltip();\n if ((immediateShowDelay === 0 || immediateShowDelay) && timeSinceLastTooltip < IMMEDIATE_SHOW_THRESHOLD_MS) {\n // showing the tooltip immediately (without animation)\n return {\n showDelay: immediateShowDelay,\n preventAnimation: true\n };\n }\n return {\n showDelay,\n preventAnimation: false\n };\n }\n\n render() {\n const {\n withoutDialog,\n children,\n forceRenderWithoutChildren,\n theme,\n tip,\n arrowClassName,\n id,\n \"data-testid\": dataTestId,\n position\n } = this.props;\n\n if (!children && !forceRenderWithoutChildren) {\n return null;\n }\n\n if (withoutDialog) {\n return this.renderTooltipContent();\n }\n\n const content = this.renderTooltipContent;\n const dialogProps = {\n ...this.props,\n position: position,\n \"data-testid\": dataTestId || getTestId(ComponentDefaultTestId.TOOLTIP, id),\n tooltip: tip,\n content,\n tooltipClassName: cx(styles.arrow, getStyle(styles, theme), arrowClassName),\n onDialogDidHide: this.onTooltipHide,\n onDialogDidShow: this.onTooltipShow,\n getDynamicShowDelay: this.getShowDelay\n };\n return (\n <Dialog {...dialogProps} animationType=\"expand\">\n {children}\n </Dialog>\n );\n }\n}\n"],"names":["globalState","lastTooltipHideTS","openTooltipsCount","Tooltip","_PureComponent","props","_this","_classCallCheck","_callSuper","renderTooltipContent","bind","getShowDelay","onTooltipShow","onTooltipHide","wasShown","_inherits","PureComponent","_createClass","key","value","contentValue","_this$props","this","theme","content","className","style","maxWidth","title","image","icon","dir","isFunction","isValidElement","Array","isArray","length","React","Object","assign","concat","cx","styles","tooltip","getStyle","camelCase","createElement","src","alt","Flex","gap","Icon","iconSize","Date","now","Infinity","_this$props2","showDelay","immediateShowDelay","timeSinceLastTooltip","getTimeSinceLastTooltip","preventAnimation","_this$props3","children","tip","arrowClassName","id","dataTestId","position","forceRenderWithoutChildren","withoutDialog","dialogProps","getTestId","ComponentDefaultTestId","TOOLTIP","tooltipClassName","arrow","onDialogDidHide","onDialogDidShow","getDynamicShowDelay","Dialog","animationType","positions","TooltipPositionsEnum","hideShowTriggers","HideShowEventEnum","themes","TooltipThemeEnum","animationTypes","AnimationTypeEnum","defaultProps","moveBy","main","secondary","hideDelay","disableDialogSlide","EXPAND","hideWhenReferenceHidden","modifiers","showTrigger","MOUSE_ENTER","hideTrigger","MOUSE_LEAVE","showOnDialogEnter","referenceWrapperClassName","addKeyboardHideShowTriggersByDefault","open"],"mappings":"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"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { camelCase, isFunction } from \"es-toolkit/compat\";\nimport cx from \"classnames\";\nimport React, { type CSSProperties, isValidElement, PureComponent, type ReactElement } from \"react\";\nimport { type Modifier } from \"react-popper\";\nimport Dialog from \"../Dialog/Dialog\";\nimport { type DialogAnimationType, type DialogTriggerEvent } from \"../Dialog/Dialog.types\";\nimport { HideShowEvent as HideShowEventEnum, AnimationType as AnimationTypeEnum } from \"../Dialog/DialogConstants\";\nimport type VibeComponentProps from \"../../types/VibeComponentProps\";\nimport { TooltipTheme as TooltipThemeEnum, TooltipPositions as TooltipPositionsEnum } from \"./TooltipConstants\";\nimport { type ElementContent } from \"../../types/ElementContent\";\nimport { type MoveBy } from \"../../types/MoveBy\";\nimport { getStyle } from \"../../helpers/typesciptCssModulesHelper\";\nimport styles from \"./Tooltip.module.scss\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport { type SubIcon } from \"../../types\";\nimport Icon from \"../Icon/Icon\";\nimport Flex from \"../Flex/Flex\";\nimport { type TooltipPositions, type TooltipTheme } from \"./Tooltip.types\";\n\nexport type TooltipProps = TooltipBaseProps & (TooltipWithChildrenProps | TooltipWithoutChildrenProps);\n\ninterface TooltipWithoutChildrenProps {\n /**\n * If true, the tooltip will be rendered even if there are no children.\n */\n forceRenderWithoutChildren: boolean;\n /**\n * The children elements that the tooltip is attached to.\n */\n children?: ReactElement | Array<ReactElement>;\n}\n\ninterface TooltipWithChildrenProps {\n /**\n * If true, the tooltip will be rendered even if there are no children.\n */\n forceRenderWithoutChildren?: boolean;\n /**\n * The children elements that the tooltip is attached to.\n */\n children: ReactElement | Array<ReactElement>;\n}\n\n// TODO TS-migration extend DialogProps, once Dialog is migrated to TS\ninterface TooltipBaseProps extends VibeComponentProps {\n /**\n * The content displayed inside the tooltip.\n */\n content: ElementContent;\n /**\n * Inline styles applied to the tooltip container.\n */\n style?: CSSProperties;\n /**\n * Class name applied to the tooltip arrow.\n */\n arrowClassName?: string;\n /**\n * Offset values for positioning adjustments.\n */\n moveBy?: MoveBy;\n /**\n * The theme of the tooltip.\n */\n theme?: TooltipTheme;\n /**\n * Function to get the container where the tooltip should be rendered.\n */\n getContainer?: () => HTMLElement;\n /**\n * Delay in milliseconds before hiding the tooltip.\n */\n hideDelay?: number;\n /**\n * Delay in milliseconds before showing the tooltip.\n */\n showDelay?: number;\n /**\n * If true, disables the slide animation of the tooltip.\n */\n disableDialogSlide?: boolean;\n /**\n * The animation type used for showing/hiding the tooltip.\n */\n animationType?: DialogAnimationType;\n /**\n * If true, renders the tooltip without a dialog.\n */\n withoutDialog?: boolean;\n /**\n * The CSS selector of the container where the tooltip should be rendered.\n */\n containerSelector?: string;\n /**\n * Delay in milliseconds before showing the tooltip immediately.\n */\n immediateShowDelay?: number;\n /**\n * If false, hides the arrow of the tooltip.\n */\n tip?: boolean;\n /**\n * If true, the tooltip is shown when the component mounts.\n */\n shouldShowOnMount?: boolean;\n /**\n * If true, hides the tooltip when the reference element is hidden.\n */\n hideWhenReferenceHidden?: boolean;\n /**\n * Callback fired when the tooltip is hidden.\n */\n onTooltipHide?: () => void;\n /**\n * Callback fired when the tooltip is shown.\n */\n onTooltipShow?: () => void;\n /**\n * Custom Popper.js modifiers.\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers?: Array<Modifier<unknown>>;\n /**\n * The placement of the tooltip relative to the reference element.\n */\n position?: TooltipPositions;\n /**\n * Events that trigger showing the tooltip.\n */\n showTrigger?: DialogTriggerEvent | Array<DialogTriggerEvent>;\n /**\n * Events that trigger hiding the tooltip.\n */\n hideTrigger?: DialogTriggerEvent | Array<DialogTriggerEvent>;\n /**\n * If true, prevents closing the tooltip when the mouse enters it.\n */\n showOnDialogEnter?: boolean;\n /**\n * Class name applied to the reference wrapper element.\n */\n referenceWrapperClassName?: string;\n /**\n * If true, keyboard focus/blur events behave like mouse enter/leave.\n */\n addKeyboardHideShowTriggersByDefault?: boolean;\n /**\n * If true, controls the open state of the tooltip.\n */\n open?: boolean;\n /**\n * The z-index applied to the tooltip.\n */\n zIndex?: number;\n /**\n * The title of the tooltip.\n */\n title?: string;\n /**\n * The image displayed inside the tooltip.\n */\n image?: string;\n /**\n * The icon displayed next to the title.\n */\n icon?: SubIcon;\n /**\n * The maximum width of the tooltip.\n */\n maxWidth?: number;\n /**\n * The text direction of the tooltip: \"ltr\", \"rtl\", or \"auto\".\n */\n dir?: \"ltr\" | \"rtl\" | \"auto\";\n}\n// When last tooltip was shown in the last 1.5 second - the next tooltip will be shown immediately\nconst IMMEDIATE_SHOW_THRESHOLD_MS = 1500;\n\n// Shared state across multiple tooltip instances (i.e last tooltip shown time)\nconst globalState: { lastTooltipHideTS: number; openTooltipsCount: number } = {\n lastTooltipHideTS: null,\n openTooltipsCount: 0\n};\n\nexport default class Tooltip extends PureComponent<TooltipProps> {\n wasShown: boolean;\n static positions = TooltipPositionsEnum;\n static hideShowTriggers = HideShowEventEnum;\n static themes = TooltipThemeEnum;\n static animationTypes = AnimationTypeEnum;\n static defaultProps = {\n moveBy: { main: 4, secondary: 0 },\n theme: \"dark\",\n position: \"top\",\n hideDelay: 100,\n showDelay: 300,\n disableDialogSlide: true,\n animationType: AnimationTypeEnum.EXPAND,\n withoutDialog: false,\n tip: true,\n hideWhenReferenceHidden: false,\n modifiers: new Array<Modifier<unknown>>(),\n showTrigger: Tooltip.hideShowTriggers.MOUSE_ENTER,\n hideTrigger: Tooltip.hideShowTriggers.MOUSE_LEAVE,\n showOnDialogEnter: true,\n referenceWrapperClassName: \"\",\n addKeyboardHideShowTriggersByDefault: true,\n open: false\n };\n constructor(props: TooltipProps) {\n super(props);\n this.renderTooltipContent = this.renderTooltipContent.bind(this);\n this.getShowDelay = this.getShowDelay.bind(this);\n this.onTooltipShow = this.onTooltipShow.bind(this);\n this.onTooltipHide = this.onTooltipHide.bind(this);\n\n this.wasShown = false;\n }\n\n renderTooltipContent() {\n const { theme, content, className, style, maxWidth, title, image, icon, dir } = this.props;\n if (!content) {\n // don't render empty tooltip\n return null;\n }\n let contentValue;\n if (isFunction(content)) {\n contentValue = content();\n } else if (isValidElement(content)) {\n contentValue = content;\n } else if (typeof content === \"string\" && content) {\n contentValue = content;\n } else if (Array.isArray(content) && content.length > 0) {\n // allow array of elements\n contentValue = content;\n }\n\n if (!contentValue) {\n return null;\n }\n\n return (\n <div\n style={maxWidth ? ({ ...style, \"--tooltip-max-width\": `${maxWidth}px` } as CSSProperties) : style}\n className={cx(styles.tooltip, getStyle(styles, camelCase(theme)), className)}\n dir={dir}\n >\n {image && <img className={styles.image} src={image} alt=\"\" />}\n <div className={cx(styles.content)}>\n {title && (\n <Flex gap=\"xs\">\n {icon && <Icon iconSize=\"20\" icon={icon} />}\n <div className={styles.title}>{title}</div>\n </Flex>\n )}\n {contentValue}\n </div>\n </div>\n );\n }\n\n onTooltipShow() {\n if (!this.wasShown) {\n const { onTooltipShow } = this.props;\n globalState.openTooltipsCount++;\n this.wasShown = true;\n onTooltipShow && onTooltipShow();\n }\n }\n\n onTooltipHide() {\n if (this.wasShown) {\n const { onTooltipHide } = this.props;\n globalState.lastTooltipHideTS = Date.now();\n globalState.openTooltipsCount--;\n this.wasShown = false;\n onTooltipHide && onTooltipHide();\n }\n }\n\n getTimeSinceLastTooltip() {\n if (globalState.openTooltipsCount > 0) {\n return 0;\n }\n return globalState.lastTooltipHideTS ? Date.now() - globalState.lastTooltipHideTS : Infinity;\n }\n\n getShowDelay() {\n const { showDelay, immediateShowDelay } = this.props;\n const timeSinceLastTooltip = this.getTimeSinceLastTooltip();\n if ((immediateShowDelay === 0 || immediateShowDelay) && timeSinceLastTooltip < IMMEDIATE_SHOW_THRESHOLD_MS) {\n // showing the tooltip immediately (without animation)\n return {\n showDelay: immediateShowDelay,\n preventAnimation: true\n };\n }\n return {\n showDelay,\n preventAnimation: false\n };\n }\n\n render() {\n const {\n withoutDialog,\n children,\n forceRenderWithoutChildren,\n theme,\n tip,\n arrowClassName,\n id,\n \"data-testid\": dataTestId,\n position\n } = this.props;\n\n if (!children && !forceRenderWithoutChildren) {\n return null;\n }\n\n if (withoutDialog) {\n return this.renderTooltipContent();\n }\n\n const content = this.renderTooltipContent;\n const dialogProps = {\n ...this.props,\n position: position,\n \"data-testid\": dataTestId || getTestId(ComponentDefaultTestId.TOOLTIP, id),\n tooltip: tip,\n content,\n tooltipClassName: cx(styles.arrow, getStyle(styles, theme), arrowClassName),\n onDialogDidHide: this.onTooltipHide,\n onDialogDidShow: this.onTooltipShow,\n getDynamicShowDelay: this.getShowDelay\n };\n return (\n <Dialog {...dialogProps} animationType=\"expand\">\n {children}\n </Dialog>\n );\n }\n}\n"],"names":["globalState","lastTooltipHideTS","openTooltipsCount","Tooltip","_PureComponent","props","_this","_classCallCheck","_callSuper","renderTooltipContent","bind","getShowDelay","onTooltipShow","onTooltipHide","wasShown","_inherits","PureComponent","_createClass","key","value","contentValue","_this$props","this","theme","content","className","style","maxWidth","title","image","icon","dir","isFunction","isValidElement","Array","isArray","length","React","Object","assign","concat","cx","styles","tooltip","getStyle","camelCase","createElement","src","alt","Flex","gap","Icon","iconSize","Date","now","Infinity","_this$props2","showDelay","immediateShowDelay","timeSinceLastTooltip","getTimeSinceLastTooltip","preventAnimation","_this$props3","children","tip","arrowClassName","id","dataTestId","position","forceRenderWithoutChildren","withoutDialog","dialogProps","getTestId","ComponentDefaultTestId","TOOLTIP","tooltipClassName","arrow","onDialogDidHide","onDialogDidShow","getDynamicShowDelay","Dialog","animationType","positions","TooltipPositionsEnum","hideShowTriggers","HideShowEventEnum","themes","TooltipThemeEnum","animationTypes","AnimationTypeEnum","defaultProps","moveBy","main","secondary","hideDelay","disableDialogSlide","EXPAND","hideWhenReferenceHidden","modifiers","showTrigger","MOUSE_ENTER","hideTrigger","MOUSE_LEAVE","showOnDialogEnter","referenceWrapperClassName","addKeyboardHideShowTriggersByDefault","open"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- var r={tooltip:"tooltip_1d35197b12",image:"image_37106bdd56",title:"title_da8160bb7c",content:"content_a0c6a59801",paddingSizeMd:"paddingSizeMd_98ee86f4b5",tooltipWhiteLink:"tooltipWhiteLink_c5100768d1",arrow:"arrow_0ddbf9a93f",dark:"dark_21f25e42b5",primary:"primary_97d92d0402"};!function(r){const d="s_id-6a6e92472798_3_61_1";if("undefined"!=typeof document){const a=document.head||document.getElementsByTagName("head")[0];if(a.querySelector("#"+d))return;const o=document.createElement("style");o.id=d,a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.appendChild(document.createTextNode(r))}else globalThis.injectedStyles&&(globalThis.injectedStyles[d]=r)}(".tooltip_1d35197b12 {\n position: relative;\n display: inline-block;\n border-radius: var(--tooltip-border-radius, var(--border-radius-small));\n box-shadow: var(--box-shadow-medium);\n font: var(--font-text2-normal);\n max-width: var(--tooltip-max-width, 50vw);\n word-break: break-word;\n background-color: var(--inverted-color-background);\n color: var(--text-color-on-inverted);\n --tooltip-max-width: 240px;\n white-space: pre-wrap;\n}\n.tooltip_1d35197b12 .image_37106bdd56 {\n display: block;\n position: relative;\n border-top-right-radius: 2px;\n border-top-left-radius: 2px;\n padding: 2px 2px 0 2px;\n object-fit: cover;\n width: 100%;\n height: 100%;\n min-width: var(--tooltip-max-width);\n z-index: 1;\n}\n.tooltip_1d35197b12 .title_da8160bb7c {\n font: var(--font-text2-bold);\n}\n.tooltip_1d35197b12 .content_a0c6a59801 {\n word-break: break-word;\n display: inline-block;\n padding: var(--tooltip-padding, var(--spacing-small) var(--spacing-medium));\n}\n.tooltip_1d35197b12.paddingSizeMd_98ee86f4b5 {\n border-radius: var(--border-radius-medium);\n padding: var(--spacing-medium);\n font: var(--font-text2-normal);\n}\n.tooltip_1d35197b12 a.tooltipWhiteLink_c5100768d1 {\n color: #fff;\n}\n.arrow_0ddbf9a93f,\n.dark_21f25e42b5,\n.arrow_0ddbf9a93f.dark_21f25e42b5 {\n background-color: var(--inverted-color-background);\n color: var(--text-color-on-inverted);\n}\n.dark-app-theme .arrow_0ddbf9a93f.arrow_0ddbf9a93f.dark_21f25e42b5, .black-app-theme .arrow_0ddbf9a93f.arrow_0ddbf9a93f.dark_21f25e42b5, .hacker-app-theme .arrow_0ddbf9a93f.arrow_0ddbf9a93f.dark_21f25e42b5,\n.dark-app-theme .arrow_0ddbf9a93f.arrow_0ddbf9a93f.primary_97d92d0402,\n.black-app-theme .arrow_0ddbf9a93f.arrow_0ddbf9a93f.primary_97d92d0402,\n.hacker-app-theme .arrow_0ddbf9a93f.arrow_0ddbf9a93f.primary_97d92d0402 {\n box-shadow: none;\n}\n.primary_97d92d0402,\n.arrow_0ddbf9a93f.primary_97d92d0402 {\n background-color: var(--primary-color);\n color: var(--text-color-on-primary);\n}");export{r as default};
1
+ var a={tooltip:"tooltip_44ae36e81f",image:"image_4a8d81cac1",title:"title_6435c24562",content:"content_e20a3f5538",paddingSizeMd:"paddingSizeMd_87edd640c6",tooltipWhiteLink:"tooltipWhiteLink_f1ca0543d0",arrow:"arrow_b55230d506",dark:"dark_1045dd5faa",primary:"primary_3116e9a8b8"};!function(a){const r="s_id-6a6e92472798_3_62_0";if("undefined"!=typeof document){const e=document.head||document.getElementsByTagName("head")[0];if(e.querySelector("#"+r))return;const o=document.createElement("style");o.id=r,e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o),o.appendChild(document.createTextNode(a))}else globalThis.injectedStyles&&(globalThis.injectedStyles[r]=a)}(".tooltip_44ae36e81f {\n position: relative;\n display: inline-block;\n border-radius: var(--tooltip-border-radius, var(--border-radius-small));\n box-shadow: var(--box-shadow-medium);\n font: var(--font-text2-normal);\n max-width: var(--tooltip-max-width, 50vw);\n word-break: break-word;\n background-color: var(--inverted-color-background);\n color: var(--text-color-on-inverted);\n --tooltip-max-width: 240px;\n white-space: pre-wrap;\n}\n.tooltip_44ae36e81f .image_4a8d81cac1 {\n display: block;\n position: relative;\n border-top-right-radius: 2px;\n border-top-left-radius: 2px;\n padding: 2px 2px 0 2px;\n object-fit: cover;\n width: 100%;\n height: 100%;\n min-width: var(--tooltip-max-width);\n z-index: 1;\n}\n.tooltip_44ae36e81f .title_6435c24562 {\n font: var(--font-text2-bold);\n}\n.tooltip_44ae36e81f .content_e20a3f5538 {\n word-break: break-word;\n display: inline-block;\n padding: var(--tooltip-padding, var(--spacing-small) var(--spacing-medium));\n}\n.tooltip_44ae36e81f.paddingSizeMd_87edd640c6 {\n border-radius: var(--border-radius-medium);\n padding: var(--spacing-medium);\n font: var(--font-text2-normal);\n}\n.tooltip_44ae36e81f a.tooltipWhiteLink_f1ca0543d0 {\n color: #fff;\n}\n.arrow_b55230d506,\n.dark_1045dd5faa,\n.arrow_b55230d506.dark_1045dd5faa {\n background-color: var(--inverted-color-background);\n color: var(--text-color-on-inverted);\n}\n.dark-app-theme .arrow_b55230d506.arrow_b55230d506.dark_1045dd5faa, .black-app-theme .arrow_b55230d506.arrow_b55230d506.dark_1045dd5faa, .hacker-app-theme .arrow_b55230d506.arrow_b55230d506.dark_1045dd5faa,\n.dark-app-theme .arrow_b55230d506.arrow_b55230d506.primary_3116e9a8b8,\n.black-app-theme .arrow_b55230d506.arrow_b55230d506.primary_3116e9a8b8,\n.hacker-app-theme .arrow_b55230d506.arrow_b55230d506.primary_3116e9a8b8 {\n box-shadow: none;\n}\n.primary_3116e9a8b8,\n.arrow_b55230d506.primary_3116e9a8b8 {\n background-color: var(--primary-color);\n color: var(--text-color-on-primary);\n}");export{a as default};
2
2
  //# sourceMappingURL=Tooltip.module.scss.js.map
@@ -1,2 +1,2 @@
1
- var e={slideshow:"slideshow_1597c0c065"};!function(e){const t="s_id-1d828e3be878_3_61_1";if("undefined"!=typeof document){const d=document.head||document.getElementsByTagName("head")[0];if(d.querySelector("#"+t))return;const n=document.createElement("style");n.id=t,d.firstChild?d.insertBefore(n,d.firstChild):d.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".slideshow_1597c0c065 {\n width: 100%;\n height: 100%;\n min-height: 0;\n}");export{e as default};
1
+ var e={slideshow:"slideshow_bb80fc9abf"};!function(e){const t="s_id-1d828e3be878_3_62_0";if("undefined"!=typeof document){const d=document.head||document.getElementsByTagName("head")[0];if(d.querySelector("#"+t))return;const n=document.createElement("style");n.id=t,d.firstChild?d.insertBefore(n,d.firstChild):d.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".slideshow_bb80fc9abf {\n width: 100%;\n height: 100%;\n min-height: 0;\n}");export{e as default};
2
2
  //# sourceMappingURL=TransitionView.module.scss.js.map
@@ -1,2 +1,2 @@
1
- var e={typography:"typography_2e7e3517a0","focus-visible":"focus-visible_d78c6951bc",primary:"primary_ebcac49cdb",secondary:"secondary_ec973632a6",negative:"negative_e8590c802d",onPrimary:"onPrimary_322e1629c8",onInverted:"onInverted_e761b4f10c",fixedLight:"fixedLight_429c64fd88",fixedDark:"fixedDark_cf96cf6371",inherit:"inherit_a2561beccb",alignInherit:"alignInherit_9c5dc0ee8a",start:"start_c839ec228a",center:"center_5c0aafe8ef",end:"end_a043889661",singleLineEllipsis:"singleLineEllipsis_d421c56f0f",multiLineEllipsis:"multiLineEllipsis_e65086a588"};!function(e){const n="s_id-1a3a21ac499a_3_61_1";if("undefined"!=typeof document){const r=document.head||document.getElementsByTagName("head")[0];if(r.querySelector("#"+n))return;const i=document.createElement("style");i.id=n,r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}("/* stylelint-disable selector-class-pattern */\n.typography_2e7e3517a0 > a {\n text-decoration: none;\n color: var(--link-color);\n}\n.typography_2e7e3517a0 > a:focus-visible, .typography_2e7e3517a0 > a.focus-visible_d78c6951bc {\n outline: none;\n z-index: 11;\n border-radius: 4px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.typography_2e7e3517a0 > a:focus:not(.focus-visible_d78c6951bc) {\n outline: none;\n}\n.typography_2e7e3517a0 > a:hover {\n text-decoration: underline;\n}\n.typography_2e7e3517a0:disabled, .typography_2e7e3517a0[aria-disabled=true] {\n color: var(--disabled-text-color);\n}\n.primary_ebcac49cdb {\n color: var(--primary-text-color);\n}\n.secondary_ec973632a6 {\n color: var(--secondary-text-color);\n}\n.negative_e8590c802d {\n color: var(--color-error);\n}\n.onPrimary_322e1629c8 {\n color: var(--text-color-on-primary);\n}\n.onPrimary_322e1629c8 a {\n color: var(--text-color-on-primary);\n text-decoration: underline;\n}\n.onInverted_e761b4f10c {\n color: var(--text-color-on-inverted);\n}\n.onInverted_e761b4f10c a {\n color: var(--text-color-on-inverted);\n text-decoration: underline;\n}\n.fixedLight_429c64fd88 {\n color: var(--fixed-light-color);\n}\n.fixedLight_429c64fd88 a {\n color: var(--fixed-light-color);\n text-decoration: underline;\n}\n.fixedDark_cf96cf6371 {\n color: var(--fixed-dark-color);\n}\n.fixedDark_cf96cf6371 a {\n color: var(--fixed-dark-color);\n text-decoration: underline;\n}\n.inherit_a2561beccb {\n color: inherit;\n}\n.inherit_a2561beccb a {\n color: inherit;\n text-decoration: underline;\n}\n.alignInherit_9c5dc0ee8a {\n text-align: inherit;\n}\n.start_c839ec228a {\n text-align: start;\n}\n.center_5c0aafe8ef {\n text-align: center;\n}\n.end_a043889661 {\n text-align: end;\n}\n.singleLineEllipsis_d421c56f0f {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.multiLineEllipsis_e65086a588 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: var(--text-clamp-lines);\n -webkit-box-orient: vertical;\n white-space: initial;\n}");export{e as default};
1
+ var e={typography:"typography_25fbecdf58","focus-visible":"focus-visible_be1f2838e0",primary:"primary_26d0db93e3",secondary:"secondary_2643633957",negative:"negative_aade43a7ae",onPrimary:"onPrimary_ce55bfc2e4",onInverted:"onInverted_e92172a74e",fixedLight:"fixedLight_ed105d9453",fixedDark:"fixedDark_5e22b68e96",inherit:"inherit_ee625b77ad",alignInherit:"alignInherit_2d68dc8269",start:"start_f3761804b4",center:"center_ae05b0bcae",end:"end_b960e8de8d",singleLineEllipsis:"singleLineEllipsis_172a58563d",multiLineEllipsis:"multiLineEllipsis_8e1d9cb65d"};!function(e){const n="s_id-1a3a21ac499a_3_62_0";if("undefined"!=typeof document){const r=document.head||document.getElementsByTagName("head")[0];if(r.querySelector("#"+n))return;const i=document.createElement("style");i.id=n,r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}("/* stylelint-disable selector-class-pattern */\n.typography_25fbecdf58 > a {\n text-decoration: none;\n color: var(--link-color);\n}\n.typography_25fbecdf58 > a:focus-visible, .typography_25fbecdf58 > a.focus-visible_be1f2838e0 {\n outline: none;\n z-index: 11;\n border-radius: 4px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.typography_25fbecdf58 > a:focus:not(.focus-visible_be1f2838e0) {\n outline: none;\n}\n.typography_25fbecdf58 > a:hover {\n text-decoration: underline;\n}\n.typography_25fbecdf58:disabled, .typography_25fbecdf58[aria-disabled=true] {\n color: var(--disabled-text-color);\n}\n.primary_26d0db93e3 {\n color: var(--primary-text-color);\n}\n.secondary_2643633957 {\n color: var(--secondary-text-color);\n}\n.negative_aade43a7ae {\n color: var(--color-error);\n}\n.onPrimary_ce55bfc2e4 {\n color: var(--text-color-on-primary);\n}\n.onPrimary_ce55bfc2e4 a {\n color: var(--text-color-on-primary);\n text-decoration: underline;\n}\n.onInverted_e92172a74e {\n color: var(--text-color-on-inverted);\n}\n.onInverted_e92172a74e a {\n color: var(--text-color-on-inverted);\n text-decoration: underline;\n}\n.fixedLight_ed105d9453 {\n color: var(--fixed-light-color);\n}\n.fixedLight_ed105d9453 a {\n color: var(--fixed-light-color);\n text-decoration: underline;\n}\n.fixedDark_5e22b68e96 {\n color: var(--fixed-dark-color);\n}\n.fixedDark_5e22b68e96 a {\n color: var(--fixed-dark-color);\n text-decoration: underline;\n}\n.inherit_ee625b77ad {\n color: inherit;\n}\n.inherit_ee625b77ad a {\n color: inherit;\n text-decoration: underline;\n}\n.alignInherit_2d68dc8269 {\n text-align: inherit;\n}\n.start_f3761804b4 {\n text-align: start;\n}\n.center_ae05b0bcae {\n text-align: center;\n}\n.end_b960e8de8d {\n text-align: end;\n}\n.singleLineEllipsis_172a58563d {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.multiLineEllipsis_8e1d9cb65d {\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: var(--text-clamp-lines);\n -webkit-box-orient: vertical;\n white-space: initial;\n}");export{e as default};
2
2
  //# sourceMappingURL=Typography.module.scss.js.map
@@ -1,2 +1,2 @@
1
- var e={virtualizedGridWrapper:"virtualizedGridWrapper_a1b9ee239a"};!function(e){const t="s_id-03a8eed790d8_3_61_1";if("undefined"!=typeof document){const d=document.head||document.getElementsByTagName("head")[0];if(d.querySelector("#"+t))return;const i=document.createElement("style");i.id=t,d.firstChild?d.insertBefore(i,d.firstChild):d.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".virtualizedGridWrapper_a1b9ee239a {\n height: 100%;\n width: 100%;\n}");export{e as default};
1
+ var e={virtualizedGridWrapper:"virtualizedGridWrapper_41291ce4dd"};!function(e){const d="s_id-03a8eed790d8_3_62_0";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+d))return;const i=document.createElement("style");i.id=d,t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[d]=e)}(".virtualizedGridWrapper_41291ce4dd {\n height: 100%;\n width: 100%;\n}");export{e as default};
2
2
  //# sourceMappingURL=VirtualizedGrid.module.scss.js.map
@@ -1,2 +1,2 @@
1
- import{slicedToArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import e from"classnames";import i,{forwardRef as r,useState as o,useMemo as n,useRef as l,useCallback as a,useEffect as s}from"react";import{noop as c}from"lodash-es";import{VariableSizeList as u}from"react-window";import f from"react-virtualized-auto-sizer";import d from"../../hooks/usePrevious/index.js";import m from"../../hooks/useThrottledCallback.js";import v from"../../hooks/useMergeRef.js";import{getNormalizedItems as h,getMaxOffset as p,easeInOutQuint as I,getOnItemsRenderedData as S,isLayoutDirectionScrollbarVisible as g}from"../../services/virtualized-service.js";import{getTestId as T}from"../../tests/testIds.js";import{ComponentDefaultTestId as O}from"../../tests/constants.js";import z from"./VirtualizedList.module.scss.js";var b=r((function(r,b){var y=r.className,C=r.id,j=r.items,R=void 0===j?[]:j,w=r.itemRenderer,F=void 0===w?function(t,e,i){return t}:w,L=r.getItemHeight,x=void 0===L?function(t,e){return t.height}:L,V=r.getItemSize,k=void 0===V?null:V,A=r.layout,D=void 0===A?"vertical":A,E=r.onScroll,M=r.overscanCount,N=void 0===M?0:M,U=r.getItemId,_=void 0===U?function(t,e){return t.id}:U,q=r.scrollToId,H=r.scrollDuration,P=void 0===H?200:H,W=r.onScrollToFinished,B=void 0===W?c:W,Z=r.onItemsRendered,G=r.onItemsRenderedThrottleMs,J=void 0===G?200:G,K=r.onSizeUpdate,Q=void 0===K?c:K,X=r.onVerticalScrollbarVisiblityChange,Y=void 0===X?null:X,$=r.onLayoutDirectionScrollbarVisibilityChange,tt=void 0===$?null:$,et=r.virtualListRef,it=r.scrollableClassName,rt=r.role,ot=r.ariaLabel,nt=r.style,lt=r["data-testid"],at=o(0),st=t(at,2),ct=st[0],ut=st[1],ft=o(0),dt=t(ft,2),mt=dt[0],vt=dt[1],ht="horizontal"!==D,pt=n((function(){return ht?ct:mt}),[ht,ct,mt]),It=d(q),St=l(null),gt=l(null),Tt=l(null),Ot=l(0),zt=l({initialized:!1,scrollOffsetInitial:0,scrollOffsetFinal:0,animationStartTime:0}),bt=v(b,St),yt=v(et,Tt),Ct=zt.current;Ct.initialized||(Ct.initialized=!0,Ct.scrollOffsetInitial=0,Ct.scrollOffsetFinal=0,Ct.animationStartTime=0);var jt=a((function(t,e){var i=(k||x)(t,e);return void 0===i&&console.error("Couldn't get height for item: ",t),i}),[x,k]),Rt=a((function(t,e){var i=_(t,e);return void 0===i&&console.error("Couldn't get id for item: ",t),i}),[_]),wt=n((function(){return h(R,Rt,jt)}),[R,Rt,jt]),Ft=n((function(){return p(pt,wt)}),[pt,wt]),Lt=a((function(t){var e=t.scrollDirection,i=t.scrollOffset,r=t.scrollUpdateWasRequested;Ot.current=i,r||(Ct.scrollOffsetInitial=i),E&&E(e,i,r)}),[E,Ot,Ct]),xt=a((function(){requestAnimationFrame((function(){var t,e=performance.now()-Ct.animationStartTime,i=Ct.scrollOffsetFinal-Ct.scrollOffsetInitial,r=I(Math.min(1,e/P)),o=Math.min(Ft,Ct.scrollOffsetInitial+i*r);Ot.current=o,null===(t=Tt.current)||void 0===t||t.scrollTo(o),P>e?xt():(Ct.animationStartTime=void 0,B&&B())}))}),[P,Ct,Tt,Ft,B]),Vt=a((function(t){var e,i,r,o,n=t.offsetTop;Ct.animationStartTime?Ct.scrollOffsetFinal=n:(null!==(null===(i=null===(e=Tt.current)||void 0===e?void 0:e.state)||void 0===i?void 0:i.scrollOffset)&&(Ct.scrollOffsetInitial=null===(o=null===(r=Tt.current)||void 0===r?void 0:r.state)||void 0===o?void 0:o.scrollOffset),Ct.scrollOffsetInitial!==n?(Ct.scrollOffsetFinal=n,Ct.animationStartTime=performance.now(),xt()):B&&B())}),[Ct,xt,B]),kt=a((function(t){var e=t.index;return F(R[e],e,t.style)}),[R,F]),At=a((function(t){return jt(R[t],t)}),[R,jt]),Dt=a((function(t,e){e===ct&&t===mt||setTimeout((function(){ut(e),vt(t),Q(t,e)}),0)}),[ct,mt,Q]),Et=m((function(t){if(Z){var e=S(R,wt,Rt,t.visibleStartIndex,t.visibleStopIndex,pt,Ot.current);Z(e)}}),{wait:J,trailing:!0},[Z,R,wt,Rt,pt]);return s((function(){if(q&&It!==q){var t=g(R,wt,Rt,pt),e=wt[q];t&&e&&Vt(e)}}),[It,q,Vt,wt,R,Rt,pt]),s((function(){Tt.current&&Tt.current.resetAfterIndex(0)}),[wt]),s((function(){var t=tt||Y;if(t){var e=g(R,wt,Rt,pt);gt.current!==e&&(gt.current=e,t(e))}}),[tt,Y,R,wt,pt,Rt]),i.createElement("div",{ref:bt,className:e(z.virtualizedListWrapper,y),id:C,role:rt,"aria-label":ot,"data-testid":lt||T(O.VIRTUALIZED_LIST,C),style:nt},i.createElement(f,null,(function(t){var e=t.height,r=t.width;return Dt(r,e),i.createElement(u,{ref:yt,height:e,width:r,itemCount:R.length,itemSize:At,onScroll:Lt,layout:D,overscanCount:N,onItemsRendered:Et,className:it},kt)})))}));export{b as default};
1
+ import{slicedToArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import i from"classnames";import e,{forwardRef as r,useState as o,useMemo as n,useRef as l,useCallback as a,useEffect as s}from"react";import{noop as c}from"es-toolkit/compat";import{VariableSizeList as u}from"react-window";import f from"react-virtualized-auto-sizer";import d from"../../hooks/usePrevious/index.js";import m from"../../hooks/useThrottledCallback.js";import v from"../../hooks/useMergeRef.js";import{getNormalizedItems as p,getMaxOffset as h,easeInOutQuint as I,getOnItemsRenderedData as S,isLayoutDirectionScrollbarVisible as g}from"../../services/virtualized-service.js";import{getTestId as T}from"../../tests/testIds.js";import{ComponentDefaultTestId as O}from"../../tests/constants.js";import z from"./VirtualizedList.module.scss.js";var b=r((function(r,b){var y=r.className,C=r.id,j=r.items,R=void 0===j?[]:j,w=r.itemRenderer,F=void 0===w?function(t,i,e){return t}:w,L=r.getItemHeight,x=void 0===L?function(t,i){return t.height}:L,k=r.getItemSize,V=void 0===k?null:k,A=r.layout,D=void 0===A?"vertical":A,E=r.onScroll,M=r.overscanCount,N=void 0===M?0:M,U=r.getItemId,_=void 0===U?function(t,i){return t.id}:U,q=r.scrollToId,H=r.scrollDuration,P=void 0===H?200:H,W=r.onScrollToFinished,B=void 0===W?c:W,Z=r.onItemsRendered,G=r.onItemsRenderedThrottleMs,J=void 0===G?200:G,K=r.onSizeUpdate,Q=void 0===K?c:K,X=r.onVerticalScrollbarVisiblityChange,Y=void 0===X?null:X,$=r.onLayoutDirectionScrollbarVisibilityChange,tt=void 0===$?null:$,it=r.virtualListRef,et=r.scrollableClassName,rt=r.role,ot=r.ariaLabel,nt=r.style,lt=r["data-testid"],at=o(0),st=t(at,2),ct=st[0],ut=st[1],ft=o(0),dt=t(ft,2),mt=dt[0],vt=dt[1],pt="horizontal"!==D,ht=n((function(){return pt?ct:mt}),[pt,ct,mt]),It=d(q),St=l(null),gt=l(null),Tt=l(null),Ot=l(0),zt=l({initialized:!1,scrollOffsetInitial:0,scrollOffsetFinal:0,animationStartTime:0}),bt=v(b,St),yt=v(it,Tt),Ct=zt.current;Ct.initialized||(Ct.initialized=!0,Ct.scrollOffsetInitial=0,Ct.scrollOffsetFinal=0,Ct.animationStartTime=0);var jt=a((function(t,i){var e=(V||x)(t,i);return void 0===e&&console.error("Couldn't get height for item: ",t),e}),[x,V]),Rt=a((function(t,i){var e=_(t,i);return void 0===e&&console.error("Couldn't get id for item: ",t),e}),[_]),wt=n((function(){return p(R,Rt,jt)}),[R,Rt,jt]),Ft=n((function(){return h(ht,wt)}),[ht,wt]),Lt=a((function(t){var i=t.scrollDirection,e=t.scrollOffset,r=t.scrollUpdateWasRequested;Ot.current=e,r||(Ct.scrollOffsetInitial=e),E&&E(i,e,r)}),[E,Ot,Ct]),xt=a((function(){requestAnimationFrame((function(){var t,i=performance.now()-Ct.animationStartTime,e=Ct.scrollOffsetFinal-Ct.scrollOffsetInitial,r=I(Math.min(1,i/P)),o=Math.min(Ft,Ct.scrollOffsetInitial+e*r);Ot.current=o,null===(t=Tt.current)||void 0===t||t.scrollTo(o),P>i?xt():(Ct.animationStartTime=void 0,B&&B())}))}),[P,Ct,Tt,Ft,B]),kt=a((function(t){var i,e,r,o,n=t.offsetTop;Ct.animationStartTime?Ct.scrollOffsetFinal=n:(null!==(null===(e=null===(i=Tt.current)||void 0===i?void 0:i.state)||void 0===e?void 0:e.scrollOffset)&&(Ct.scrollOffsetInitial=null===(o=null===(r=Tt.current)||void 0===r?void 0:r.state)||void 0===o?void 0:o.scrollOffset),Ct.scrollOffsetInitial!==n?(Ct.scrollOffsetFinal=n,Ct.animationStartTime=performance.now(),xt()):B&&B())}),[Ct,xt,B]),Vt=a((function(t){var i=t.index;return F(R[i],i,t.style)}),[R,F]),At=a((function(t){return jt(R[t],t)}),[R,jt]),Dt=a((function(t,i){i===ct&&t===mt||setTimeout((function(){ut(i),vt(t),Q(t,i)}),0)}),[ct,mt,Q]),Et=m((function(t){if(Z){var i=S(R,wt,Rt,t.visibleStartIndex,t.visibleStopIndex,ht,Ot.current);Z(i)}}),{wait:J,trailing:!0},[Z,R,wt,Rt,ht]);return s((function(){if(q&&It!==q){var t=g(R,wt,Rt,ht),i=wt[q];t&&i&&kt(i)}}),[It,q,kt,wt,R,Rt,ht]),s((function(){Tt.current&&Tt.current.resetAfterIndex(0)}),[wt]),s((function(){var t=tt||Y;if(t){var i=g(R,wt,Rt,ht);gt.current!==i&&(gt.current=i,t(i))}}),[tt,Y,R,wt,ht,Rt]),e.createElement("div",{ref:bt,className:i(z.virtualizedListWrapper,y),id:C,role:rt,"aria-label":ot,"data-testid":lt||T(O.VIRTUALIZED_LIST,C),style:nt},e.createElement(f,null,(function(t){var i=t.height,r=t.width;return Dt(r,i),e.createElement(u,{ref:yt,height:i,width:r,itemCount:R.length,itemSize:At,onScroll:Lt,layout:D,overscanCount:N,onItemsRendered:Et,className:et},Vt)})))}));export{b as default};
2
2
  //# sourceMappingURL=VirtualizedList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedList.js","sources":["../../../../src/components/VirtualizedList/VirtualizedList.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, {\n type CSSProperties,\n type ForwardedRef,\n forwardRef,\n type LegacyRef,\n type ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport { noop as NOOP } from \"lodash-es\";\nimport {\n type ScrollDirection,\n VariableSizeList as List,\n type ListOnItemsRenderedProps,\n type ListChildComponentProps,\n type VariableSizeList\n} from \"react-window\";\nimport AutoSizer from \"react-virtualized-auto-sizer\";\nimport usePrevious from \"../../hooks/usePrevious\";\nimport useThrottledCallback from \"../../hooks/useThrottledCallback\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport {\n easeInOutQuint,\n getMaxOffset,\n getNormalizedItems,\n getOnItemsRenderedData,\n isLayoutDirectionScrollbarVisible\n} from \"../../services/virtualized-service\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId } from \"../../tests/constants\";\nimport { type VibeComponent, type VibeComponentProps } from \"../../types\";\nimport styles from \"./VirtualizedList.module.scss\";\nimport {\n type VirtualizedListItem,\n type VirtualizedListLayout,\n type VirtualizedListScrollDirection\n} from \"./VirtualizedList.types\";\n\nexport interface VirtualizedListProps extends VibeComponentProps {\n /**\n * Class name applied to the scrollable container.\n */\n scrollableClassName?: string;\n /**\n * The orientation of the list.\n */\n layout?: VirtualizedListLayout;\n /**\n * The list of items to be rendered.\n */\n items: VirtualizedListItem[];\n /**\n * Function to render each item in the list.\n */\n itemRenderer: (item: VirtualizedListItem, index: number, style: CSSProperties) => ReactElement | JSX.Element;\n /**\n * @deprecated - use `getItemSize`.\n */\n getItemHeight?: (item: VirtualizedListItem, index: number) => number;\n /**\n * Function to get the size (height/width) of each item, based on layout.\n */\n getItemSize?: (item: VirtualizedListItem, index: number) => number;\n /**\n * Function to get the unique ID of an item.\n */\n getItemId?: (item: VirtualizedListItem, index: number) => string;\n /**\n * Callback fired when the scroll animation is finished.\n */\n onScrollToFinished?: () => void;\n /**\n * Number of items to render above and below the visible portion.\n */\n overscanCount?: number;\n /**\n * The duration of the scroll animation in milliseconds.\n */\n scrollDuration?: number;\n /**\n * Callback fired when items are rendered.\n */\n onItemsRendered?: ({\n firstItemId,\n secondItemId,\n lastItemId,\n centerItemId,\n firstItemOffsetEnd,\n currentOffsetTop\n }: {\n firstItemId: string;\n secondItemId: string;\n lastItemId: string;\n centerItemId: string;\n firstItemOffsetEnd: number;\n currentOffsetTop: number;\n }) => void;\n /**\n * The delay (in ms) for throttling the `onItemsRendered` callback.\n */\n onItemsRenderedThrottleMs?: number;\n /**\n * Callback fired when the list size changes.\n */\n onSizeUpdate?: (width: number, height: number) => void;\n /**\n * @deprecated - use `onLayoutDirectionScrollbarVisibilityChange`.\n */\n onVerticalScrollbarVisiblityChange?: (value: boolean) => void;\n /**\n * Callback fired when the vertical or horizontal scrollbar visibility changes.\n */\n onLayoutDirectionScrollbarVisibilityChange?: (value: boolean) => void;\n /**\n * The ARIA role attribute applied to the list.\n */\n role?: string;\n /**\n * The ARIA label for the list.\n */\n ariaLabel?: string;\n /**\n * Custom inline styles applied to the list.\n */\n style?: CSSProperties;\n /**\n * The ID of the item to scroll to.\n */\n scrollToId?: string;\n /**\n * Reference to the virtualized list component.\n */\n virtualListRef?: ForwardedRef<HTMLElement>;\n /**\n * Callback fired when the list is scrolled.\n */\n onScroll?: (\n horizontalScrollDirection: VirtualizedListScrollDirection,\n scrollTop: number,\n scrollUpdateWasRequested: boolean\n ) => void;\n}\n\nconst VirtualizedList = forwardRef(\n (\n {\n className,\n id,\n items = [],\n itemRenderer = (item: VirtualizedListItem, _index: number, _style: CSSProperties) => item as ReactElement,\n getItemHeight = (item: VirtualizedListItem, _index: number) => item.height,\n getItemSize = null, // must be null for backward compatibility\n layout = \"vertical\",\n onScroll,\n overscanCount = 0,\n getItemId = (item: VirtualizedListItem, _index: number) => item.id,\n scrollToId,\n scrollDuration = 200,\n onScrollToFinished = NOOP,\n onItemsRendered,\n onItemsRenderedThrottleMs = 200,\n onSizeUpdate = NOOP,\n onVerticalScrollbarVisiblityChange = null,\n onLayoutDirectionScrollbarVisibilityChange = null,\n virtualListRef,\n scrollableClassName,\n role,\n ariaLabel,\n style,\n \"data-testid\": dataTestId\n }: VirtualizedListProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n // states\n const [listHeight, setListHeight] = useState(0);\n const [listWidth, setListWidth] = useState(0);\n\n const isVerticalList = layout !== \"horizontal\";\n const listSizeByLayout = useMemo(() => {\n return isVerticalList ? listHeight : listWidth;\n }, [isVerticalList, listHeight, listWidth]);\n\n // prevs\n const prevScrollToId = usePrevious(scrollToId);\n\n // Refs\n const componentRef = useRef(null);\n const isVerticalScrollbarVisibleRef = useRef(null);\n const listRef = useRef(null);\n const scrollTopRef = useRef(0);\n const animationDataRef = useRef({\n initialized: false,\n scrollOffsetInitial: 0,\n scrollOffsetFinal: 0,\n animationStartTime: 0\n });\n const mergedRef = useMergeRef(ref, componentRef);\n const mergedListRef = useMergeRef(virtualListRef, listRef);\n\n const animationData = animationDataRef.current;\n if (!animationData.initialized) {\n animationData.initialized = true;\n animationData.scrollOffsetInitial = 0;\n animationData.scrollOffsetFinal = 0;\n animationData.animationStartTime = 0;\n }\n\n // Callbacks\n const sizeGetter = useCallback(\n (item: VirtualizedListItem, index: number) => {\n const getSize = getItemSize || getItemHeight;\n const height = getSize(item, index);\n if (height === undefined) {\n console.error(\"Couldn't get height for item: \", item);\n }\n return height;\n },\n [getItemHeight, getItemSize]\n );\n\n const idGetter = useCallback(\n (item: VirtualizedListItem, index: number) => {\n const itemId = getItemId(item, index);\n if (itemId === undefined) {\n console.error(\"Couldn't get id for item: \", item);\n }\n return itemId;\n },\n [getItemId]\n );\n\n // Memos\n // Creates object of itemId => { item, index, size, offsetTop}\n const normalizedItems = useMemo(() => {\n return getNormalizedItems(items, idGetter, sizeGetter);\n }, [items, idGetter, sizeGetter]);\n\n const maxListOffset = useMemo(() => {\n return getMaxOffset(listSizeByLayout, normalizedItems);\n }, [listSizeByLayout, normalizedItems]);\n\n // Callbacks\n const onScrollCB = useCallback(\n ({\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested\n }: {\n scrollDirection: ScrollDirection;\n scrollOffset: number;\n scrollUpdateWasRequested: boolean;\n }) => {\n scrollTopRef.current = scrollOffset;\n if (!scrollUpdateWasRequested) {\n animationData.scrollOffsetInitial = scrollOffset;\n }\n onScroll && onScroll(scrollDirection, scrollOffset, scrollUpdateWasRequested);\n },\n [onScroll, scrollTopRef, animationData]\n );\n\n const animateScroll = useCallback(() => {\n requestAnimationFrame(() => {\n const now = performance.now();\n const ellapsed = now - animationData.animationStartTime;\n const scrollDelta = animationData.scrollOffsetFinal - animationData.scrollOffsetInitial;\n const easedTime = easeInOutQuint(Math.min(1, ellapsed / scrollDuration));\n const scrollOffset = animationData.scrollOffsetInitial + scrollDelta * easedTime;\n const finalOffsetValue = Math.min(maxListOffset, scrollOffset);\n scrollTopRef.current = finalOffsetValue;\n listRef.current?.scrollTo(finalOffsetValue);\n\n if (ellapsed < scrollDuration) {\n animateScroll();\n } else {\n animationData.animationStartTime = undefined;\n onScrollToFinished && onScrollToFinished();\n }\n });\n }, [scrollDuration, animationData, listRef, maxListOffset, onScrollToFinished]);\n\n const startScrollAnimation = useCallback(\n (item: VirtualizedListItem) => {\n const { offsetTop } = item;\n\n if (animationData.animationStartTime) {\n // animation already in progress\n animationData.scrollOffsetFinal = offsetTop;\n return;\n }\n\n // Update the initial scroll offset with the current scroll position for react 18 batching behavior\n if (listRef.current?.state?.scrollOffset !== null) {\n animationData.scrollOffsetInitial = listRef.current?.state?.scrollOffset;\n }\n\n if (animationData.scrollOffsetInitial === offsetTop) {\n // offset already equals to item offset\n onScrollToFinished && onScrollToFinished();\n return;\n }\n\n animationData.scrollOffsetFinal = offsetTop;\n animationData.animationStartTime = performance.now();\n animateScroll();\n },\n [animationData, animateScroll, onScrollToFinished]\n );\n\n const rowRenderer = useCallback(\n ({ index, style }: { index: number; style: CSSProperties }) => {\n const item = items[index];\n return itemRenderer(item, index, style);\n },\n [items, itemRenderer]\n );\n\n const calcItemSize = useCallback(\n (index: number) => {\n const item = items[index];\n return sizeGetter(item, index);\n },\n [items, sizeGetter]\n );\n\n const updateListSize = useCallback(\n (width: number, height: number) => {\n if (height !== listHeight || width !== listWidth) {\n setTimeout(() => {\n setListHeight(height);\n setListWidth(width);\n onSizeUpdate(width, height);\n }, 0);\n }\n },\n [listHeight, listWidth, onSizeUpdate]\n );\n\n const onItemsRenderedCB = useThrottledCallback(\n ({ visibleStartIndex, visibleStopIndex }: ListOnItemsRenderedProps) => {\n if (!onItemsRendered) return;\n const data = getOnItemsRenderedData(\n items,\n normalizedItems,\n idGetter,\n visibleStartIndex,\n visibleStopIndex,\n listSizeByLayout,\n scrollTopRef.current\n );\n onItemsRendered(data);\n },\n { wait: onItemsRenderedThrottleMs, trailing: true },\n [onItemsRendered, items, normalizedItems, idGetter, listSizeByLayout]\n );\n\n // Effects\n useEffect(() => {\n // scroll to specific item\n if (scrollToId && prevScrollToId !== scrollToId) {\n const hasScrollbar = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, listSizeByLayout);\n const item = normalizedItems[scrollToId as keyof typeof normalizedItems];\n hasScrollbar && item && startScrollAnimation(item);\n }\n }, [prevScrollToId, scrollToId, startScrollAnimation, normalizedItems, items, idGetter, listSizeByLayout]);\n\n useEffect(() => {\n // recalculate row heights\n if (listRef.current) {\n listRef.current.resetAfterIndex(0);\n }\n }, [normalizedItems]);\n\n useEffect(() => {\n // update vertical scrollbar visibility\n const callback = onLayoutDirectionScrollbarVisibilityChange || onVerticalScrollbarVisiblityChange;\n if (callback) {\n const isVisible = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, listSizeByLayout);\n if (isVerticalScrollbarVisibleRef.current !== isVisible) {\n isVerticalScrollbarVisibleRef.current = isVisible;\n callback(isVisible);\n }\n }\n }, [\n onLayoutDirectionScrollbarVisibilityChange,\n onVerticalScrollbarVisiblityChange,\n items,\n normalizedItems,\n listSizeByLayout,\n idGetter\n ]);\n\n return (\n <div\n ref={mergedRef}\n className={cx(styles.virtualizedListWrapper, className)}\n id={id}\n role={role}\n aria-label={ariaLabel}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.VIRTUALIZED_LIST, id)}\n style={style}\n >\n <AutoSizer>\n {({ height, width }: { height: number; width: number }) => {\n updateListSize(width, height);\n return (\n <List\n ref={mergedListRef as unknown as LegacyRef<VariableSizeList<unknown>>}\n height={height}\n width={width}\n itemCount={items.length}\n itemSize={calcItemSize}\n onScroll={onScrollCB}\n layout={layout}\n overscanCount={overscanCount}\n onItemsRendered={onItemsRenderedCB}\n className={scrollableClassName}\n >\n {rowRenderer as VibeComponent<ListChildComponentProps>}\n </List>\n );\n }}\n </AutoSizer>\n </div>\n );\n }\n);\n\nexport default VirtualizedList;\n"],"names":["VirtualizedList","forwardRef","_ref","ref","className","id","_ref$items","items","_ref$itemRenderer","itemRenderer","item","_index","_style","_ref$getItemHeight","getItemHeight","height","_ref$getItemSize","getItemSize","_ref$layout","layout","onScroll","_ref$overscanCount","overscanCount","_ref$getItemId","getItemId","scrollToId","_ref$scrollDuration","scrollDuration","_ref$onScrollToFinish","onScrollToFinished","NOOP","onItemsRendered","_ref$onItemsRenderedT","onItemsRenderedThrottleMs","_ref$onSizeUpdate","onSizeUpdate","_ref$onVerticalScroll","onVerticalScrollbarVisiblityChange","_ref$onLayoutDirectio","onLayoutDirectionScrollbarVisibilityChange","virtualListRef","scrollableClassName","role","ariaLabel","style","dataTestId","_useState","useState","_useState2","_slicedToArray","listHeight","setListHeight","_useState3","_useState4","listWidth","setListWidth","isVerticalList","listSizeByLayout","useMemo","prevScrollToId","usePrevious","componentRef","useRef","isVerticalScrollbarVisibleRef","listRef","scrollTopRef","animationDataRef","initialized","scrollOffsetInitial","scrollOffsetFinal","animationStartTime","mergedRef","useMergeRef","mergedListRef","animationData","current","sizeGetter","useCallback","index","undefined","console","error","idGetter","itemId","normalizedItems","getNormalizedItems","maxListOffset","getMaxOffset","onScrollCB","_ref2","scrollDirection","scrollOffset","scrollUpdateWasRequested","animateScroll","requestAnimationFrame","ellapsed","performance","now","scrollDelta","easedTime","easeInOutQuint","Math","min","finalOffsetValue","_a","scrollTo","startScrollAnimation","offsetTop","_b","state","_d","_c","rowRenderer","_ref3","calcItemSize","updateListSize","width","setTimeout","onItemsRenderedCB","useThrottledCallback","_ref4","data","getOnItemsRenderedData","visibleStartIndex","visibleStopIndex","wait","trailing","useEffect","hasScrollbar","isLayoutDirectionScrollbarVisible","resetAfterIndex","callback","isVisible","React","createElement","cx","styles","virtualizedListWrapper","getTestId","ComponentDefaultTestId","VIRTUALIZED_LIST","AutoSizer","_ref5","List","itemCount","length","itemSize"],"mappings":"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"}
1
+ {"version":3,"file":"VirtualizedList.js","sources":["../../../../src/components/VirtualizedList/VirtualizedList.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, {\n type CSSProperties,\n type ForwardedRef,\n forwardRef,\n type LegacyRef,\n type ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport { noop as NOOP } from \"es-toolkit/compat\";\nimport {\n type ScrollDirection,\n VariableSizeList as List,\n type ListOnItemsRenderedProps,\n type ListChildComponentProps,\n type VariableSizeList\n} from \"react-window\";\nimport AutoSizer from \"react-virtualized-auto-sizer\";\nimport usePrevious from \"../../hooks/usePrevious\";\nimport useThrottledCallback from \"../../hooks/useThrottledCallback\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport {\n easeInOutQuint,\n getMaxOffset,\n getNormalizedItems,\n getOnItemsRenderedData,\n isLayoutDirectionScrollbarVisible\n} from \"../../services/virtualized-service\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId } from \"../../tests/constants\";\nimport { type VibeComponent, type VibeComponentProps } from \"../../types\";\nimport styles from \"./VirtualizedList.module.scss\";\nimport {\n type VirtualizedListItem,\n type VirtualizedListLayout,\n type VirtualizedListScrollDirection\n} from \"./VirtualizedList.types\";\n\nexport interface VirtualizedListProps extends VibeComponentProps {\n /**\n * Class name applied to the scrollable container.\n */\n scrollableClassName?: string;\n /**\n * The orientation of the list.\n */\n layout?: VirtualizedListLayout;\n /**\n * The list of items to be rendered.\n */\n items: VirtualizedListItem[];\n /**\n * Function to render each item in the list.\n */\n itemRenderer: (item: VirtualizedListItem, index: number, style: CSSProperties) => ReactElement | JSX.Element;\n /**\n * @deprecated - use `getItemSize`.\n */\n getItemHeight?: (item: VirtualizedListItem, index: number) => number;\n /**\n * Function to get the size (height/width) of each item, based on layout.\n */\n getItemSize?: (item: VirtualizedListItem, index: number) => number;\n /**\n * Function to get the unique ID of an item.\n */\n getItemId?: (item: VirtualizedListItem, index: number) => string;\n /**\n * Callback fired when the scroll animation is finished.\n */\n onScrollToFinished?: () => void;\n /**\n * Number of items to render above and below the visible portion.\n */\n overscanCount?: number;\n /**\n * The duration of the scroll animation in milliseconds.\n */\n scrollDuration?: number;\n /**\n * Callback fired when items are rendered.\n */\n onItemsRendered?: ({\n firstItemId,\n secondItemId,\n lastItemId,\n centerItemId,\n firstItemOffsetEnd,\n currentOffsetTop\n }: {\n firstItemId: string;\n secondItemId: string;\n lastItemId: string;\n centerItemId: string;\n firstItemOffsetEnd: number;\n currentOffsetTop: number;\n }) => void;\n /**\n * The delay (in ms) for throttling the `onItemsRendered` callback.\n */\n onItemsRenderedThrottleMs?: number;\n /**\n * Callback fired when the list size changes.\n */\n onSizeUpdate?: (width: number, height: number) => void;\n /**\n * @deprecated - use `onLayoutDirectionScrollbarVisibilityChange`.\n */\n onVerticalScrollbarVisiblityChange?: (value: boolean) => void;\n /**\n * Callback fired when the vertical or horizontal scrollbar visibility changes.\n */\n onLayoutDirectionScrollbarVisibilityChange?: (value: boolean) => void;\n /**\n * The ARIA role attribute applied to the list.\n */\n role?: string;\n /**\n * The ARIA label for the list.\n */\n ariaLabel?: string;\n /**\n * Custom inline styles applied to the list.\n */\n style?: CSSProperties;\n /**\n * The ID of the item to scroll to.\n */\n scrollToId?: string;\n /**\n * Reference to the virtualized list component.\n */\n virtualListRef?: ForwardedRef<HTMLElement>;\n /**\n * Callback fired when the list is scrolled.\n */\n onScroll?: (\n horizontalScrollDirection: VirtualizedListScrollDirection,\n scrollTop: number,\n scrollUpdateWasRequested: boolean\n ) => void;\n}\n\nconst VirtualizedList = forwardRef(\n (\n {\n className,\n id,\n items = [],\n itemRenderer = (item: VirtualizedListItem, _index: number, _style: CSSProperties) => item as ReactElement,\n getItemHeight = (item: VirtualizedListItem, _index: number) => item.height,\n getItemSize = null, // must be null for backward compatibility\n layout = \"vertical\",\n onScroll,\n overscanCount = 0,\n getItemId = (item: VirtualizedListItem, _index: number) => item.id,\n scrollToId,\n scrollDuration = 200,\n onScrollToFinished = NOOP,\n onItemsRendered,\n onItemsRenderedThrottleMs = 200,\n onSizeUpdate = NOOP,\n onVerticalScrollbarVisiblityChange = null,\n onLayoutDirectionScrollbarVisibilityChange = null,\n virtualListRef,\n scrollableClassName,\n role,\n ariaLabel,\n style,\n \"data-testid\": dataTestId\n }: VirtualizedListProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n // states\n const [listHeight, setListHeight] = useState(0);\n const [listWidth, setListWidth] = useState(0);\n\n const isVerticalList = layout !== \"horizontal\";\n const listSizeByLayout = useMemo(() => {\n return isVerticalList ? listHeight : listWidth;\n }, [isVerticalList, listHeight, listWidth]);\n\n // prevs\n const prevScrollToId = usePrevious(scrollToId);\n\n // Refs\n const componentRef = useRef(null);\n const isVerticalScrollbarVisibleRef = useRef(null);\n const listRef = useRef(null);\n const scrollTopRef = useRef(0);\n const animationDataRef = useRef({\n initialized: false,\n scrollOffsetInitial: 0,\n scrollOffsetFinal: 0,\n animationStartTime: 0\n });\n const mergedRef = useMergeRef(ref, componentRef);\n const mergedListRef = useMergeRef(virtualListRef, listRef);\n\n const animationData = animationDataRef.current;\n if (!animationData.initialized) {\n animationData.initialized = true;\n animationData.scrollOffsetInitial = 0;\n animationData.scrollOffsetFinal = 0;\n animationData.animationStartTime = 0;\n }\n\n // Callbacks\n const sizeGetter = useCallback(\n (item: VirtualizedListItem, index: number) => {\n const getSize = getItemSize || getItemHeight;\n const height = getSize(item, index);\n if (height === undefined) {\n console.error(\"Couldn't get height for item: \", item);\n }\n return height;\n },\n [getItemHeight, getItemSize]\n );\n\n const idGetter = useCallback(\n (item: VirtualizedListItem, index: number) => {\n const itemId = getItemId(item, index);\n if (itemId === undefined) {\n console.error(\"Couldn't get id for item: \", item);\n }\n return itemId;\n },\n [getItemId]\n );\n\n // Memos\n // Creates object of itemId => { item, index, size, offsetTop}\n const normalizedItems = useMemo(() => {\n return getNormalizedItems(items, idGetter, sizeGetter);\n }, [items, idGetter, sizeGetter]);\n\n const maxListOffset = useMemo(() => {\n return getMaxOffset(listSizeByLayout, normalizedItems);\n }, [listSizeByLayout, normalizedItems]);\n\n // Callbacks\n const onScrollCB = useCallback(\n ({\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested\n }: {\n scrollDirection: ScrollDirection;\n scrollOffset: number;\n scrollUpdateWasRequested: boolean;\n }) => {\n scrollTopRef.current = scrollOffset;\n if (!scrollUpdateWasRequested) {\n animationData.scrollOffsetInitial = scrollOffset;\n }\n onScroll && onScroll(scrollDirection, scrollOffset, scrollUpdateWasRequested);\n },\n [onScroll, scrollTopRef, animationData]\n );\n\n const animateScroll = useCallback(() => {\n requestAnimationFrame(() => {\n const now = performance.now();\n const ellapsed = now - animationData.animationStartTime;\n const scrollDelta = animationData.scrollOffsetFinal - animationData.scrollOffsetInitial;\n const easedTime = easeInOutQuint(Math.min(1, ellapsed / scrollDuration));\n const scrollOffset = animationData.scrollOffsetInitial + scrollDelta * easedTime;\n const finalOffsetValue = Math.min(maxListOffset, scrollOffset);\n scrollTopRef.current = finalOffsetValue;\n listRef.current?.scrollTo(finalOffsetValue);\n\n if (ellapsed < scrollDuration) {\n animateScroll();\n } else {\n animationData.animationStartTime = undefined;\n onScrollToFinished && onScrollToFinished();\n }\n });\n }, [scrollDuration, animationData, listRef, maxListOffset, onScrollToFinished]);\n\n const startScrollAnimation = useCallback(\n (item: VirtualizedListItem) => {\n const { offsetTop } = item;\n\n if (animationData.animationStartTime) {\n // animation already in progress\n animationData.scrollOffsetFinal = offsetTop;\n return;\n }\n\n // Update the initial scroll offset with the current scroll position for react 18 batching behavior\n if (listRef.current?.state?.scrollOffset !== null) {\n animationData.scrollOffsetInitial = listRef.current?.state?.scrollOffset;\n }\n\n if (animationData.scrollOffsetInitial === offsetTop) {\n // offset already equals to item offset\n onScrollToFinished && onScrollToFinished();\n return;\n }\n\n animationData.scrollOffsetFinal = offsetTop;\n animationData.animationStartTime = performance.now();\n animateScroll();\n },\n [animationData, animateScroll, onScrollToFinished]\n );\n\n const rowRenderer = useCallback(\n ({ index, style }: { index: number; style: CSSProperties }) => {\n const item = items[index];\n return itemRenderer(item, index, style);\n },\n [items, itemRenderer]\n );\n\n const calcItemSize = useCallback(\n (index: number) => {\n const item = items[index];\n return sizeGetter(item, index);\n },\n [items, sizeGetter]\n );\n\n const updateListSize = useCallback(\n (width: number, height: number) => {\n if (height !== listHeight || width !== listWidth) {\n setTimeout(() => {\n setListHeight(height);\n setListWidth(width);\n onSizeUpdate(width, height);\n }, 0);\n }\n },\n [listHeight, listWidth, onSizeUpdate]\n );\n\n const onItemsRenderedCB = useThrottledCallback(\n ({ visibleStartIndex, visibleStopIndex }: ListOnItemsRenderedProps) => {\n if (!onItemsRendered) return;\n const data = getOnItemsRenderedData(\n items,\n normalizedItems,\n idGetter,\n visibleStartIndex,\n visibleStopIndex,\n listSizeByLayout,\n scrollTopRef.current\n );\n onItemsRendered(data);\n },\n { wait: onItemsRenderedThrottleMs, trailing: true },\n [onItemsRendered, items, normalizedItems, idGetter, listSizeByLayout]\n );\n\n // Effects\n useEffect(() => {\n // scroll to specific item\n if (scrollToId && prevScrollToId !== scrollToId) {\n const hasScrollbar = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, listSizeByLayout);\n const item = normalizedItems[scrollToId as keyof typeof normalizedItems];\n hasScrollbar && item && startScrollAnimation(item);\n }\n }, [prevScrollToId, scrollToId, startScrollAnimation, normalizedItems, items, idGetter, listSizeByLayout]);\n\n useEffect(() => {\n // recalculate row heights\n if (listRef.current) {\n listRef.current.resetAfterIndex(0);\n }\n }, [normalizedItems]);\n\n useEffect(() => {\n // update vertical scrollbar visibility\n const callback = onLayoutDirectionScrollbarVisibilityChange || onVerticalScrollbarVisiblityChange;\n if (callback) {\n const isVisible = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, listSizeByLayout);\n if (isVerticalScrollbarVisibleRef.current !== isVisible) {\n isVerticalScrollbarVisibleRef.current = isVisible;\n callback(isVisible);\n }\n }\n }, [\n onLayoutDirectionScrollbarVisibilityChange,\n onVerticalScrollbarVisiblityChange,\n items,\n normalizedItems,\n listSizeByLayout,\n idGetter\n ]);\n\n return (\n <div\n ref={mergedRef}\n className={cx(styles.virtualizedListWrapper, className)}\n id={id}\n role={role}\n aria-label={ariaLabel}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.VIRTUALIZED_LIST, id)}\n style={style}\n >\n <AutoSizer>\n {({ height, width }: { height: number; width: number }) => {\n updateListSize(width, height);\n return (\n <List\n ref={mergedListRef as unknown as LegacyRef<VariableSizeList<unknown>>}\n height={height}\n width={width}\n itemCount={items.length}\n itemSize={calcItemSize}\n onScroll={onScrollCB}\n layout={layout}\n overscanCount={overscanCount}\n onItemsRendered={onItemsRenderedCB}\n className={scrollableClassName}\n >\n {rowRenderer as VibeComponent<ListChildComponentProps>}\n </List>\n );\n }}\n </AutoSizer>\n </div>\n );\n }\n);\n\nexport default VirtualizedList;\n"],"names":["VirtualizedList","forwardRef","_ref","ref","className","id","_ref$items","items","_ref$itemRenderer","itemRenderer","item","_index","_style","_ref$getItemHeight","getItemHeight","height","_ref$getItemSize","getItemSize","_ref$layout","layout","onScroll","_ref$overscanCount","overscanCount","_ref$getItemId","getItemId","scrollToId","_ref$scrollDuration","scrollDuration","_ref$onScrollToFinish","onScrollToFinished","NOOP","onItemsRendered","_ref$onItemsRenderedT","onItemsRenderedThrottleMs","_ref$onSizeUpdate","onSizeUpdate","_ref$onVerticalScroll","onVerticalScrollbarVisiblityChange","_ref$onLayoutDirectio","onLayoutDirectionScrollbarVisibilityChange","virtualListRef","scrollableClassName","role","ariaLabel","style","dataTestId","_useState","useState","_useState2","_slicedToArray","listHeight","setListHeight","_useState3","_useState4","listWidth","setListWidth","isVerticalList","listSizeByLayout","useMemo","prevScrollToId","usePrevious","componentRef","useRef","isVerticalScrollbarVisibleRef","listRef","scrollTopRef","animationDataRef","initialized","scrollOffsetInitial","scrollOffsetFinal","animationStartTime","mergedRef","useMergeRef","mergedListRef","animationData","current","sizeGetter","useCallback","index","undefined","console","error","idGetter","itemId","normalizedItems","getNormalizedItems","maxListOffset","getMaxOffset","onScrollCB","_ref2","scrollDirection","scrollOffset","scrollUpdateWasRequested","animateScroll","requestAnimationFrame","ellapsed","performance","now","scrollDelta","easedTime","easeInOutQuint","Math","min","finalOffsetValue","_a","scrollTo","startScrollAnimation","offsetTop","_b","state","_d","_c","rowRenderer","_ref3","calcItemSize","updateListSize","width","setTimeout","onItemsRenderedCB","useThrottledCallback","_ref4","data","getOnItemsRenderedData","visibleStartIndex","visibleStopIndex","wait","trailing","useEffect","hasScrollbar","isLayoutDirectionScrollbarVisible","resetAfterIndex","callback","isVisible","React","createElement","cx","styles","virtualizedListWrapper","getTestId","ComponentDefaultTestId","VIRTUALIZED_LIST","AutoSizer","_ref5","List","itemCount","length","itemSize"],"mappings":"i0BAmJMA,IAAAA,EAAkBC,GACtB,SAAAC,EA2BEC,GACE,IA1BAC,EAASF,EAATE,UACAC,EAAEH,EAAFG,GAAEC,EAAAJ,EACFK,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EAAAE,EAAAN,EACVO,aAAAA,OAAe,IAAHD,EAAG,SAACE,EAA2BC,EAAgBC,GAAqB,OAAKF,CAAoB,EAAAF,EAAAK,EAAAX,EACzGY,cAAAA,OAAa,IAAAD,EAAG,SAACH,EAA2BC,GAAc,OAAKD,EAAKK,MAAM,EAAAF,EAAAG,EAAAd,EAC1Ee,YAAAA,OAAc,IAAHD,EAAG,KAAIA,EAAAE,EAAAhB,EAClBiB,OAAAA,OAAS,IAAHD,EAAG,WAAUA,EACnBE,EAAQlB,EAARkB,SAAQC,EAAAnB,EACRoB,cAAAA,OAAgB,IAAHD,EAAG,EAACA,EAAAE,EAAArB,EACjBsB,UAAAA,OAAS,IAAAD,EAAG,SAACb,EAA2BC,GAAc,OAAKD,EAAKL,EAAE,EAAAkB,EAClEE,EAAUvB,EAAVuB,WAAUC,EAAAxB,EACVyB,eAAAA,OAAiB,IAAHD,EAAG,IAAGA,EAAAE,EAAA1B,EACpB2B,mBAAAA,OAAqBC,IAAHF,EAAGE,EAAIF,EACzBG,EAAe7B,EAAf6B,gBAAeC,EAAA9B,EACf+B,0BAAAA,OAA4B,IAAHD,EAAG,IAAGA,EAAAE,EAAAhC,EAC/BiC,aAAAA,OAAeL,IAAHI,EAAGJ,EAAII,EAAAE,EAAAlC,EACnBmC,mCAAAA,OAAqC,IAAHD,EAAG,KAAIA,EAAAE,EAAApC,EACzCqC,2CAAAA,QAA6C,IAAHD,EAAG,KAAIA,EACjDE,GAActC,EAAdsC,eACAC,GAAmBvC,EAAnBuC,oBACAC,GAAIxC,EAAJwC,KACAC,GAASzC,EAATyC,UACAC,GAAK1C,EAAL0C,MACeC,GAAU3C,EAAzB,eAKF4C,GAAoCC,EAAS,GAAEC,GAAAC,EAAAH,GAAA,GAAxCI,GAAUF,GAAA,GAAEG,GAAaH,GAAA,GAChCI,GAAkCL,EAAS,GAAEM,GAAAJ,EAAAG,GAAA,GAAtCE,GAASD,GAAA,GAAEE,GAAYF,GAAA,GAExBG,GAA4B,eAAXrC,EACjBsC,GAAmBC,GAAQ,WAC/B,OAAOF,GAAiBN,GAAaI,EACtC,GAAE,CAACE,GAAgBN,GAAYI,KAG1BK,GAAiBC,EAAYnC,GAG7BoC,GAAeC,EAAO,MACtBC,GAAgCD,EAAO,MACvCE,GAAUF,EAAO,MACjBG,GAAeH,EAAO,GACtBI,GAAmBJ,EAAO,CAC9BK,aAAa,EACbC,oBAAqB,EACrBC,kBAAmB,EACnBC,mBAAoB,IAEhBC,GAAYC,EAAYrE,EAAK0D,IAC7BY,GAAgBD,EAAYhC,GAAgBwB,IAE5CU,GAAgBR,GAAiBS,QAClCD,GAAcP,cACjBO,GAAcP,aAAc,EAC5BO,GAAcN,oBAAsB,EACpCM,GAAcL,kBAAoB,EAClCK,GAAcJ,mBAAqB,GAIrC,IAAMM,GAAaC,GACjB,SAACnE,EAA2BoE,GAC1B,IACM/D,GADUE,GAAeH,GACRJ,EAAMoE,GAI7B,YAHeC,IAAXhE,GACFiE,QAAQC,MAAM,iCAAkCvE,GAE3CK,CACT,GACA,CAACD,EAAeG,IAGZiE,GAAWL,GACf,SAACnE,EAA2BoE,GAC1B,IAAMK,EAAS3D,EAAUd,EAAMoE,GAI/B,YAHeC,IAAXI,GACFH,QAAQC,MAAM,6BAA8BvE,GAEvCyE,CACT,GACA,CAAC3D,IAKG4D,GAAkB1B,GAAQ,WAC9B,OAAO2B,EAAmB9E,EAAO2E,GAAUN,GAC5C,GAAE,CAACrE,EAAO2E,GAAUN,KAEfU,GAAgB5B,GAAQ,WAC5B,OAAO6B,EAAa9B,GAAkB2B,GACxC,GAAG,CAAC3B,GAAkB2B,KAGhBI,GAAaX,GACjB,SAAAY,GAQK,IAPHC,EAAeD,EAAfC,gBACAC,EAAYF,EAAZE,aACAC,EAAwBH,EAAxBG,yBAMA3B,GAAaU,QAAUgB,EAClBC,IACHlB,GAAcN,oBAAsBuB,GAEtCvE,GAAYA,EAASsE,EAAiBC,EAAcC,EACrD,GACD,CAACxE,EAAU6C,GAAcS,KAGrBmB,GAAgBhB,GAAY,WAChCiB,uBAAsB,iBAEdC,EADMC,YAAYC,MACDvB,GAAcJ,mBAC/B4B,EAAcxB,GAAcL,kBAAoBK,GAAcN,oBAC9D+B,EAAYC,EAAeC,KAAKC,IAAI,EAAGP,EAAWpE,IAElD4E,EAAmBF,KAAKC,IAAIhB,GADbZ,GAAcN,oBAAsB8B,EAAcC,GAEvElC,GAAaU,QAAU4B,EACR,QAAfC,EAAAxC,GAAQW,eAAO,IAAA6B,GAAAA,EAAEC,SAASF,GAEX5E,EAAXoE,EACFF,MAEAnB,GAAcJ,wBAAqBS,EACnClD,GAAsBA,IAE1B,GACF,GAAG,CAACF,EAAgB+C,GAAeV,GAASsB,GAAezD,IAErD6E,GAAuB7B,GAC3B,SAACnE,eACSiG,EAAcjG,EAAdiG,UAEJjC,GAAcJ,mBAEhBI,GAAcL,kBAAoBsC,GAKS,QAAjB,QAAxBC,EAAiB,QAAjBJ,EAAAxC,GAAQW,eAAS,IAAA6B,OAAA,EAAAA,EAAAK,aAAO,IAAAD,OAAA,EAAAA,EAAAjB,gBAC1BjB,GAAcN,oBAA8C,QAAxB0C,EAAiB,QAAjBC,EAAA/C,GAAQW,eAAS,IAAAoC,OAAA,EAAAA,EAAAF,aAAO,IAAAC,OAAA,EAAAA,EAAAnB,cAG1DjB,GAAcN,sBAAwBuC,GAM1CjC,GAAcL,kBAAoBsC,EAClCjC,GAAcJ,mBAAqB0B,YAAYC,MAC/CJ,MANEhE,GAAsBA,IAOzB,GACD,CAAC6C,GAAemB,GAAehE,IAG3BmF,GAAcnC,GAClB,SAAAoC,GAA8D,IAA3DnC,EAAKmC,EAALnC,MAED,OAAOrE,EADMF,EAAMuE,GACOA,EAFbmC,EAALrE,MAGV,GACA,CAACrC,EAAOE,IAGJyG,GAAerC,GACnB,SAACC,GAEC,OAAOF,GADMrE,EAAMuE,GACKA,EAC1B,GACA,CAACvE,EAAOqE,KAGJuC,GAAiBtC,GACrB,SAACuC,EAAerG,GACVA,IAAWmC,IAAckE,IAAU9D,IACrC+D,YAAW,WACTlE,GAAcpC,GACdwC,GAAa6D,GACbjF,EAAaiF,EAAOrG,EACrB,GAAE,EAEN,GACD,CAACmC,GAAYI,GAAWnB,IAGpBmF,GAAoBC,GACxB,SAAAC,GACE,GAAKzF,EAAL,CACA,IAAM0F,EAAOC,EACXnH,EACA6E,GACAF,GALgBsC,EAAjBG,kBAAmCH,EAAhBI,iBAQlBnE,GACAQ,GAAaU,SAEf5C,EAAgB0F,EAVM,CAWxB,GACA,CAAEI,KAAM5F,EAA2B6F,UAAU,GAC7C,CAAC/F,EAAiBxB,EAAO6E,GAAiBF,GAAUzB,KAuCtD,OAnCAsE,GAAU,WAER,GAAItG,GAAckC,KAAmBlC,EAAY,CAC/C,IAAMuG,EAAeC,EAAkC1H,EAAO6E,GAAiBF,GAAUzB,IACnF/C,EAAO0E,GAAgB3D,GAC7BuG,GAAgBtH,GAAQgG,GAAqBhG,EAC9C,CACH,GAAG,CAACiD,GAAgBlC,EAAYiF,GAAsBtB,GAAiB7E,EAAO2E,GAAUzB,KAExFsE,GAAU,WAEJ/D,GAAQW,SACVX,GAAQW,QAAQuD,gBAAgB,EAEpC,GAAG,CAAC9C,KAEJ2C,GAAU,WAER,IAAMI,EAAW5F,IAA8CF,EAC/D,GAAI8F,EAAU,CACZ,IAAMC,EAAYH,EAAkC1H,EAAO6E,GAAiBF,GAAUzB,IAClFM,GAA8BY,UAAYyD,IAC5CrE,GAA8BY,QAAUyD,EACxCD,EAASC,GAEZ,CACH,GAAG,CACD7F,GACAF,EACA9B,EACA6E,GACA3B,GACAyB,KAIAmD,EACEC,cAAA,MAAA,CAAAnI,IAAKoE,GACLnE,UAAWmI,EAAGC,EAAOC,uBAAwBrI,GAC7CC,GAAIA,EACJqC,KAAMA,GAAI,aACEC,GACC,cAAAE,IAAc6F,EAAUC,EAAuBC,iBAAkBvI,GAC9EuC,MAAOA,IAEPyF,EAACC,cAAAO,QACE,SAAAC,GAAyD,IAAtD/H,EAAM+H,EAAN/H,OAAQqG,EAAK0B,EAAL1B,MAEV,OADAD,GAAeC,EAAOrG,GAEpBsH,gBAACU,EAAI,CACH5I,IAAKsE,GACL1D,OAAQA,EACRqG,MAAOA,EACP4B,UAAWzI,EAAM0I,OACjBC,SAAUhC,GACV9F,SAAUoE,GACVrE,OAAQA,EACRG,cAAeA,EACfS,gBAAiBuF,GACjBlH,UAAWqC,IAEVuE,GAGN,IAIT"}
@@ -1,2 +1,2 @@
1
- var e={virtualizedListWrapper:"virtualizedListWrapper_a1b9ee239a"};!function(e){const t="s_id-9250e4cf6c59_3_61_1";if("undefined"!=typeof document){const i=document.head||document.getElementsByTagName("head")[0];if(i.querySelector("#"+t))return;const d=document.createElement("style");d.id=t,i.firstChild?i.insertBefore(d,i.firstChild):i.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".virtualizedListWrapper_a1b9ee239a {\n height: 100%;\n width: 100%;\n}");export{e as default};
1
+ var e={virtualizedListWrapper:"virtualizedListWrapper_41291ce4dd"};!function(e){const t="s_id-9250e4cf6c59_3_62_0";if("undefined"!=typeof document){const d=document.head||document.getElementsByTagName("head")[0];if(d.querySelector("#"+t))return;const i=document.createElement("style");i.id=t,d.firstChild?d.insertBefore(i,d.firstChild):d.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".virtualizedListWrapper_41291ce4dd {\n height: 100%;\n width: 100%;\n}");export{e as default};
2
2
  //# sourceMappingURL=VirtualizedList.module.scss.js.map
@@ -1,2 +1,2 @@
1
- import{isNil as i}from"lodash-es";function e(e){var o=e.isClickable,r=e.isDecorationOnly,s=e.isKeyboardAccessible,n=e.label,l=i(r)?!o&&!n:r;return o||n?a({label:n,isDecorationOnly:l,isKeyboardAccessible:s,isHoverOnly:!o&&!!n}):{role:l?void 0:"img","aria-hidden":l,tabIndex:void 0,"aria-label":r?void 0:n}}function o(i){var e=i.isKeyboardAccessible,o=i.isDecorationOnly,a=i.isHoverOnly;return{role:void 0!==a&&a?"img":"button",tabIndex:void 0===e||e?0:-1,"aria-hidden":void 0!==o&&o}}function a(i){var e=i.label,a=i.isDecorationOnly,r=i.isKeyboardAccessible,s=i.isHoverOnly;return Object.assign(Object.assign({},o({isDecorationOnly:void 0!==a&&a,isKeyboardAccessible:void 0===r||r,isHoverOnly:void 0!==s&&s})),{"aria-label":e})}export{a as getClickableIconScreenReaderAccessProps,o as getClickableScreenReaderAccessProps,e as getIconScreenReaderAccessProps};
1
+ import{isNil as i}from"es-toolkit/compat";function e(e){var o=e.isClickable,r=e.isDecorationOnly,n=e.isKeyboardAccessible,s=e.label,l=i(r)?!o&&!s:r;return o||s?a({label:s,isDecorationOnly:l,isKeyboardAccessible:n,isHoverOnly:!o&&!!s}):{role:l?void 0:"img","aria-hidden":l,tabIndex:void 0,"aria-label":r?void 0:s}}function o(i){var e=i.isKeyboardAccessible,o=i.isDecorationOnly,a=i.isHoverOnly;return{role:void 0!==a&&a?"img":"button",tabIndex:void 0===e||e?0:-1,"aria-hidden":void 0!==o&&o}}function a(i){var e=i.label,a=i.isDecorationOnly,r=i.isKeyboardAccessible,n=i.isHoverOnly;return Object.assign(Object.assign({},o({isDecorationOnly:void 0!==a&&a,isKeyboardAccessible:void 0===r||r,isHoverOnly:void 0!==n&&n})),{"aria-label":e})}export{a as getClickableIconScreenReaderAccessProps,o as getClickableScreenReaderAccessProps,e as getIconScreenReaderAccessProps};
2
2
  //# sourceMappingURL=screenReaderAccessHelper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"screenReaderAccessHelper.js","sources":["../../../src/helpers/screenReaderAccessHelper.ts"],"sourcesContent":["import { isNil } from \"lodash-es\";\n\nexport function getIconScreenReaderAccessProps({\n isClickable,\n isDecorationOnly,\n isKeyboardAccessible,\n label\n}: {\n isClickable: boolean;\n isDecorationOnly: boolean;\n isKeyboardAccessible?: boolean;\n label: string;\n}) {\n const overrideIsDecorationOnly = isNil(isDecorationOnly) ? !isClickable && !label : isDecorationOnly;\n if (isClickable || label) {\n return getClickableIconScreenReaderAccessProps({\n label,\n isDecorationOnly: overrideIsDecorationOnly,\n isKeyboardAccessible,\n isHoverOnly: !isClickable && !!label\n });\n }\n return {\n role: overrideIsDecorationOnly ? undefined : \"img\",\n \"aria-hidden\": overrideIsDecorationOnly,\n tabIndex: undefined,\n \"aria-label\": isDecorationOnly ? undefined : label\n };\n}\n\nexport function getClickableScreenReaderAccessProps({\n isKeyboardAccessible = true,\n isDecorationOnly = false,\n isHoverOnly = false\n}: {\n isKeyboardAccessible?: boolean;\n isDecorationOnly?: boolean;\n isHoverOnly: boolean;\n}) {\n return {\n role: isHoverOnly ? \"img\" : \"button\",\n tabIndex: isKeyboardAccessible ? 0 : -1,\n \"aria-hidden\": isDecorationOnly\n };\n}\n\nexport function getClickableIconScreenReaderAccessProps({\n label,\n isDecorationOnly = false,\n isKeyboardAccessible = true,\n isHoverOnly = false\n}: {\n label: string;\n isDecorationOnly?: boolean;\n isKeyboardAccessible?: boolean;\n isHoverOnly?: boolean;\n}) {\n return {\n ...getClickableScreenReaderAccessProps({ isDecorationOnly, isKeyboardAccessible, isHoverOnly }),\n \"aria-label\": label\n };\n}\n"],"names":["getIconScreenReaderAccessProps","_ref","isClickable","isDecorationOnly","isKeyboardAccessible","label","overrideIsDecorationOnly","isNil","getClickableIconScreenReaderAccessProps","isHoverOnly","role","undefined","tabIndex","getClickableScreenReaderAccessProps","_ref2","_ref2$isKeyboardAcces","_ref2$isDecorationOnl","_ref2$isHoverOnly","_ref3","_ref3$isDecorationOnl","_ref3$isKeyboardAcces","_ref3$isHoverOnly","Object","assign"],"mappings":"kCAEM,SAAUA,EAA8BC,GAU7C,IATCC,EAAWD,EAAXC,YACAC,EAAgBF,EAAhBE,iBACAC,EAAoBH,EAApBG,qBACAC,EAAKJ,EAALI,MAOMC,EAA2BC,EAAMJ,IAAqBD,IAAgBG,EAAQF,EACpF,OAAID,GAAeG,EACVG,EAAwC,CAC7CH,MAAAA,EACAF,iBAAkBG,EAClBF,qBAAAA,EACAK,aAAcP,KAAiBG,IAG5B,CACLK,KAAMJ,OAA2BK,EAAY,MAC7C,cAAeL,EACfM,cAAUD,EACV,aAAcR,OAAmBQ,EAAYN,EAEjD,CAEgB,SAAAQ,EAAmCC,GAQlD,IAAAC,EAAAD,EAPCV,qBAA2BY,EAAAF,EAC3BX,iBAAwBc,EAAAH,EACxBL,YAMA,MAAO,CACLC,UAPY,IAAHO,GAAQA,EAOG,MAAQ,SAC5BL,cAVqB,IAAHG,GAAOA,EAUQ,GAAK,EACtC,mBAViB,IAAHC,GAAQA,EAY1B,UAEgBR,EAAuCU,GAUtD,IATCb,EAAKa,EAALb,MAAKc,EAAAD,EACLf,iBAAwBiB,EAAAF,EACxBd,qBAA2BiB,EAAAH,EAC3BT,YAOA,OAAAa,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACKV,EAAoC,CAAEV,sBAVxB,IAAHgB,GAAQA,EAUqCf,0BATtC,IAAHgB,GAAOA,EASwDX,iBARrE,IAAHY,GAAQA,KAQ8E,CAC/F,aAAchB,GAElB"}
1
+ {"version":3,"file":"screenReaderAccessHelper.js","sources":["../../../src/helpers/screenReaderAccessHelper.ts"],"sourcesContent":["import { isNil } from \"es-toolkit/compat\";\n\nexport function getIconScreenReaderAccessProps({\n isClickable,\n isDecorationOnly,\n isKeyboardAccessible,\n label\n}: {\n isClickable: boolean;\n isDecorationOnly: boolean;\n isKeyboardAccessible?: boolean;\n label: string;\n}) {\n const overrideIsDecorationOnly = isNil(isDecorationOnly) ? !isClickable && !label : isDecorationOnly;\n if (isClickable || label) {\n return getClickableIconScreenReaderAccessProps({\n label,\n isDecorationOnly: overrideIsDecorationOnly,\n isKeyboardAccessible,\n isHoverOnly: !isClickable && !!label\n });\n }\n return {\n role: overrideIsDecorationOnly ? undefined : \"img\",\n \"aria-hidden\": overrideIsDecorationOnly,\n tabIndex: undefined,\n \"aria-label\": isDecorationOnly ? undefined : label\n };\n}\n\nexport function getClickableScreenReaderAccessProps({\n isKeyboardAccessible = true,\n isDecorationOnly = false,\n isHoverOnly = false\n}: {\n isKeyboardAccessible?: boolean;\n isDecorationOnly?: boolean;\n isHoverOnly: boolean;\n}) {\n return {\n role: isHoverOnly ? \"img\" : \"button\",\n tabIndex: isKeyboardAccessible ? 0 : -1,\n \"aria-hidden\": isDecorationOnly\n };\n}\n\nexport function getClickableIconScreenReaderAccessProps({\n label,\n isDecorationOnly = false,\n isKeyboardAccessible = true,\n isHoverOnly = false\n}: {\n label: string;\n isDecorationOnly?: boolean;\n isKeyboardAccessible?: boolean;\n isHoverOnly?: boolean;\n}) {\n return {\n ...getClickableScreenReaderAccessProps({ isDecorationOnly, isKeyboardAccessible, isHoverOnly }),\n \"aria-label\": label\n };\n}\n"],"names":["getIconScreenReaderAccessProps","_ref","isClickable","isDecorationOnly","isKeyboardAccessible","label","overrideIsDecorationOnly","isNil","getClickableIconScreenReaderAccessProps","isHoverOnly","role","undefined","tabIndex","getClickableScreenReaderAccessProps","_ref2","_ref2$isKeyboardAcces","_ref2$isDecorationOnl","_ref2$isHoverOnly","_ref3","_ref3$isDecorationOnl","_ref3$isKeyboardAcces","_ref3$isHoverOnly","Object","assign"],"mappings":"0CAEM,SAAUA,EAA8BC,GAU7C,IATCC,EAAWD,EAAXC,YACAC,EAAgBF,EAAhBE,iBACAC,EAAoBH,EAApBG,qBACAC,EAAKJ,EAALI,MAOMC,EAA2BC,EAAMJ,IAAqBD,IAAgBG,EAAQF,EACpF,OAAID,GAAeG,EACVG,EAAwC,CAC7CH,MAAAA,EACAF,iBAAkBG,EAClBF,qBAAAA,EACAK,aAAcP,KAAiBG,IAG5B,CACLK,KAAMJ,OAA2BK,EAAY,MAC7C,cAAeL,EACfM,cAAUD,EACV,aAAcR,OAAmBQ,EAAYN,EAEjD,CAEgB,SAAAQ,EAAmCC,GAQlD,IAAAC,EAAAD,EAPCV,qBAA2BY,EAAAF,EAC3BX,iBAAwBc,EAAAH,EACxBL,YAMA,MAAO,CACLC,UAPY,IAAHO,GAAQA,EAOG,MAAQ,SAC5BL,cAVqB,IAAHG,GAAOA,EAUQ,GAAK,EACtC,mBAViB,IAAHC,GAAQA,EAY1B,UAEgBR,EAAuCU,GAUtD,IATCb,EAAKa,EAALb,MAAKc,EAAAD,EACLf,iBAAwBiB,EAAAF,EACxBd,qBAA2BiB,EAAAH,EAC3BT,YAOA,OAAAa,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACKV,EAAoC,CAAEV,sBAVxB,IAAHgB,GAAQA,EAUqCf,0BATtC,IAAHgB,GAAOA,EASwDX,iBARrE,IAAHY,GAAQA,KAQ8E,CAC/F,aAAchB,GAElB"}
@@ -1,2 +1,2 @@
1
- import{slicedToArray as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{useState as t,useRef as e,useEffect as a,useMemo as n,useCallback as u}from"react";import{noop as i,debounce as l}from"lodash-es";function o(o){var c=o.delay,f=void 0===c?0:c,d=o.onChange,m=o.initialStateValue,p=void 0===m?"":m,v=o.trim,s=t(p),g=r(s,2),V=g[0],h=g[1],y=e(null);a((function(){y.current=p}));var C=n((function(){return f?d?l(d,f):i:d}),[d,f]),_=u((function(r){var t=r.target.value,e=v?t.trim():t;h(e),C(e)}),[C,h,v]),b=u((function(){h(""),d&&d("")}),[h,d]);return p!==y.current&&p!==V&&h(p),{inputValue:V,onEventChanged:_,clearValue:b,updateValue:h}}export{o as default};
1
+ import{slicedToArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{useState as r,useRef as e,useEffect as a,useMemo as n,useCallback as o}from"react";import{noop as u,debounce as i}from"es-toolkit/compat";function l(l){var c=l.delay,f=void 0===c?0:c,m=l.onChange,p=l.initialStateValue,v=void 0===p?"":p,d=l.trim,s=r(v),g=t(s,2),V=g[0],h=g[1],y=e(null);a((function(){y.current=v}));var C=n((function(){return f?m?i(m,f):u:m}),[m,f]),_=o((function(t){var r=t.target.value,e=d?r.trim():r;h(e),C(e)}),[C,h,d]),b=o((function(){h(""),m&&m("")}),[h,m]);return v!==y.current&&v!==V&&h(v),{inputValue:V,onEventChanged:_,clearValue:b,updateValue:h}}export{l as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/hooks/useDebounceEvent/index.ts"],"sourcesContent":["import {\n useMemo,\n useCallback,\n useState,\n useRef,\n useEffect,\n type ChangeEvent,\n type Dispatch,\n type SetStateAction\n} from \"react\";\nimport { noop, debounce } from \"lodash-es\";\n\nexport type UseDebounceResult = {\n inputValue: string;\n onEventChanged: (event: ChangeEvent<Partial<HTMLInputElement> | Partial<HTMLTextAreaElement>>) => void;\n clearValue: () => void;\n updateValue: Dispatch<SetStateAction<string>>;\n};\n\nexport default function useDebounceEvent({\n delay = 0,\n onChange,\n initialStateValue = \"\",\n trim\n}: {\n onChange: (value: string) => void;\n initialStateValue?: string;\n delay?: number;\n trim?: boolean;\n}) {\n const [inputValue, setValue] = useState<string>(initialStateValue);\n const previousValue = useRef<string>(null);\n\n useEffect(() => {\n previousValue.current = initialStateValue;\n });\n\n const debounceCallback = useMemo(() => {\n if (!delay) {\n return onChange;\n }\n\n if (!onChange) {\n return noop;\n }\n\n return debounce(onChange, delay);\n }, [onChange, delay]);\n\n const onEventChanged = useCallback(\n (event: ChangeEvent<Partial<HTMLInputElement> | Partial<HTMLTextAreaElement>>) => {\n const { value } = event.target;\n const finalValue = trim ? value.trim() : value;\n setValue(finalValue);\n debounceCallback(finalValue);\n },\n [debounceCallback, setValue, trim]\n );\n\n const clearValue = useCallback(() => {\n setValue(\"\");\n if (onChange) {\n onChange(\"\");\n }\n }, [setValue, onChange]);\n\n if (initialStateValue !== previousValue.current && initialStateValue !== inputValue) {\n setValue(initialStateValue);\n }\n\n return { inputValue, onEventChanged, clearValue, updateValue: setValue };\n}\n"],"names":["useDebounceEvent","_ref","_ref$delay","delay","onChange","_ref$initialStateValu","initialStateValue","trim","_useState","useState","_useState2","_slicedToArray","inputValue","setValue","previousValue","useRef","useEffect","current","debounceCallback","useMemo","debounce","noop","onEventChanged","useCallback","event","value","target","finalValue","clearValue","updateValue"],"mappings":"wNAmBc,SAAUA,EAAgBC,GAUvC,IAAAC,EAAAD,EATCE,MAAAA,OAAQ,IAAHD,EAAG,EAACA,EACTE,EAAQH,EAARG,SAAQC,EAAAJ,EACRK,kBAAAA,OAAoB,IAAHD,EAAG,GAAEA,EACtBE,EAAIN,EAAJM,KAOAC,EAA+BC,EAAiBH,GAAkBI,EAAAC,EAAAH,EAAA,GAA3DI,EAAUF,EAAA,GAAEG,EAAQH,EAAA,GACrBI,EAAgBC,EAAe,MAErCC,GAAU,WACRF,EAAcG,QAAUX,CAC1B,IAEA,IAAMY,EAAmBC,GAAQ,WAC/B,OAAKhB,EAIAC,EAIEgB,EAAShB,EAAUD,GAHjBkB,EAJAjB,CAQX,GAAG,CAACA,EAAUD,IAERmB,EAAiBC,GACrB,SAACC,GACC,IAAQC,EAAUD,EAAME,OAAhBD,MACFE,EAAapB,EAAOkB,EAAMlB,OAASkB,EACzCZ,EAASc,GACTT,EAAiBS,EAClB,GACD,CAACT,EAAkBL,EAAUN,IAGzBqB,EAAaL,GAAY,WAC7BV,EAAS,IACLT,GACFA,EAAS,GAEb,GAAG,CAACS,EAAUT,IAMd,OAJIE,IAAsBQ,EAAcG,SAAWX,IAAsBM,GACvEC,EAASP,GAGJ,CAAEM,WAAAA,EAAYU,eAAAA,EAAgBM,WAAAA,EAAYC,YAAahB,EAChE"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/hooks/useDebounceEvent/index.ts"],"sourcesContent":["import {\n useMemo,\n useCallback,\n useState,\n useRef,\n useEffect,\n type ChangeEvent,\n type Dispatch,\n type SetStateAction\n} from \"react\";\nimport { noop, debounce } from \"es-toolkit/compat\";\n\nexport type UseDebounceResult = {\n inputValue: string;\n onEventChanged: (event: ChangeEvent<Partial<HTMLInputElement> | Partial<HTMLTextAreaElement>>) => void;\n clearValue: () => void;\n updateValue: Dispatch<SetStateAction<string>>;\n};\n\nexport default function useDebounceEvent({\n delay = 0,\n onChange,\n initialStateValue = \"\",\n trim\n}: {\n onChange: (value: string) => void;\n initialStateValue?: string;\n delay?: number;\n trim?: boolean;\n}) {\n const [inputValue, setValue] = useState<string>(initialStateValue);\n const previousValue = useRef<string>(null);\n\n useEffect(() => {\n previousValue.current = initialStateValue;\n });\n\n const debounceCallback = useMemo(() => {\n if (!delay) {\n return onChange;\n }\n\n if (!onChange) {\n return noop;\n }\n\n return debounce(onChange, delay);\n }, [onChange, delay]);\n\n const onEventChanged = useCallback(\n (event: ChangeEvent<Partial<HTMLInputElement> | Partial<HTMLTextAreaElement>>) => {\n const { value } = event.target;\n const finalValue = trim ? value.trim() : value;\n setValue(finalValue);\n debounceCallback(finalValue);\n },\n [debounceCallback, setValue, trim]\n );\n\n const clearValue = useCallback(() => {\n setValue(\"\");\n if (onChange) {\n onChange(\"\");\n }\n }, [setValue, onChange]);\n\n if (initialStateValue !== previousValue.current && initialStateValue !== inputValue) {\n setValue(initialStateValue);\n }\n\n return { inputValue, onEventChanged, clearValue, updateValue: setValue };\n}\n"],"names":["useDebounceEvent","_ref","_ref$delay","delay","onChange","_ref$initialStateValu","initialStateValue","trim","_useState","useState","_useState2","_slicedToArray","inputValue","setValue","previousValue","useRef","useEffect","current","debounceCallback","useMemo","debounce","noop","onEventChanged","useCallback","event","value","target","finalValue","clearValue","updateValue"],"mappings":"gOAmBc,SAAUA,EAAgBC,GAUvC,IAAAC,EAAAD,EATCE,MAAAA,OAAQ,IAAHD,EAAG,EAACA,EACTE,EAAQH,EAARG,SAAQC,EAAAJ,EACRK,kBAAAA,OAAoB,IAAHD,EAAG,GAAEA,EACtBE,EAAIN,EAAJM,KAOAC,EAA+BC,EAAiBH,GAAkBI,EAAAC,EAAAH,EAAA,GAA3DI,EAAUF,EAAA,GAAEG,EAAQH,EAAA,GACrBI,EAAgBC,EAAe,MAErCC,GAAU,WACRF,EAAcG,QAAUX,CAC1B,IAEA,IAAMY,EAAmBC,GAAQ,WAC/B,OAAKhB,EAIAC,EAIEgB,EAAShB,EAAUD,GAHjBkB,EAJAjB,CAQX,GAAG,CAACA,EAAUD,IAERmB,EAAiBC,GACrB,SAACC,GACC,IAAQC,EAAUD,EAAME,OAAhBD,MACFE,EAAapB,EAAOkB,EAAMlB,OAASkB,EACzCZ,EAASc,GACTT,EAAiBS,EAClB,GACD,CAACT,EAAkBL,EAAUN,IAGzBqB,EAAaL,GAAY,WAC7BV,EAAS,IACLT,GACFA,EAAS,GAEb,GAAG,CAACS,EAAUT,IAMd,OAJIE,IAAsBQ,EAAcG,SAAWX,IAAsBM,GACvEC,EAASP,GAGJ,CAAEM,WAAAA,EAAYU,eAAAA,EAAgBM,WAAAA,EAAYC,YAAahB,EAChE"}
@@ -1,2 +1,2 @@
1
- import{slicedToArray as e}from"../../_virtual/_rollupPluginBabelHelpers.js";import{useState as n,useCallback as r,useEffect as t}from"react";import{last as i}from"lodash-es";import o from"./useResizeObserver.js";function l(l){var u=l.ref,c=l.children,a=l.paddingSize,f=l.resizeDebounceTime,d=l.ignoreLast,s=n(null),h=e(s,2),g=h[0],m=h[1],p=r((function(e){m(e.borderBoxSize.inlineSize)}),[m]);o({ref:u,callback:p,debounceTime:f});var v=n([]),L=e(v,2),b=L[0],z=L[1],x=n(null),S=e(x,2),T=S[0],j=S[1];return t((function(){if(d)if(!b.slice(0,-1).find((function(e){return e.totalLength>g-a})))j(-1);else{var e=b.length>0?i(b).childLength:0;j(b.findIndex((function(n){return n.totalLength>g-a-e})))}else j(b.findIndex((function(e){return e.totalLength>g-a})))}),[b,g,j,a,d]),t((function(){if(u.current){var e=[],n=0;u.current.childNodes.forEach((function(r){var t=r.clientWidth;e.push({childLength:t,totalLength:n+=t})})),z(e)}}),[c,u,z]),T}export{l as default};
1
+ import{slicedToArray as e}from"../../_virtual/_rollupPluginBabelHelpers.js";import{useState as n,useCallback as t,useEffect as r}from"react";import{last as i}from"es-toolkit/compat";import o from"./useResizeObserver.js";function l(l){var c=l.ref,u=l.children,a=l.paddingSize,f=l.resizeDebounceTime,d=l.ignoreLast,s=n(null),h=e(s,2),m=h[0],g=h[1],p=t((function(e){g(e.borderBoxSize.inlineSize)}),[g]);o({ref:c,callback:p,debounceTime:f});var v=n([]),L=e(v,2),b=L[0],z=L[1],x=n(null),S=e(x,2),T=S[0],j=S[1];return r((function(){if(d)if(!b.slice(0,-1).find((function(e){return e.totalLength>m-a})))j(-1);else{var e=b.length>0?i(b).childLength:0;j(b.findIndex((function(n){return n.totalLength>m-a-e})))}else j(b.findIndex((function(e){return e.totalLength>m-a})))}),[b,m,j,a,d]),r((function(){if(c.current){var e=[],n=0;c.current.childNodes.forEach((function(t){var r=t.clientWidth;e.push({childLength:r,totalLength:n+=r})})),z(e)}}),[u,c,z]),T}export{l as default};
2
2
  //# sourceMappingURL=useElementsOverflowingIndex.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useElementsOverflowingIndex.js","sources":["../../../src/hooks/useElementsOverflowingIndex.ts"],"sourcesContent":["import { type ReactNode, type RefObject, useCallback, useEffect, useState } from \"react\";\nimport { last } from \"lodash-es\";\nimport useResizeObserver from \"./useResizeObserver\";\n\n// Use this hook when you want to get the index of the child which should be hidden from\ntype AggregatedChildResult = { childLength: number; totalLength: number };\n\nfunction useElementsOverflowingIndex({\n ref,\n children,\n paddingSize,\n resizeDebounceTime,\n ignoreLast\n}: {\n ref: RefObject<HTMLElement>;\n children: ReactNode;\n paddingSize: number;\n resizeDebounceTime: number;\n ignoreLast: boolean;\n}) {\n const [size, setSize] = useState<number>(null);\n\n const onResize = useCallback(\n ({ borderBoxSize }: { borderBoxSize: ResizeObserverSize }) => {\n setSize(borderBoxSize.inlineSize);\n },\n [setSize]\n );\n useResizeObserver({\n ref,\n callback: onResize,\n debounceTime: resizeDebounceTime\n });\n\n const [aggregatedChildLengths, setAggregatedChildLengths] = useState<Array<AggregatedChildResult>>([]);\n const [indexToSplit, setIndexToSplit] = useState<number | null>(null);\n\n useEffect(() => {\n if (ignoreLast) {\n const withoutLast = aggregatedChildLengths.slice(0, -1);\n const allInWithoutLast = !withoutLast.find(({ totalLength }) => totalLength > size - paddingSize);\n if (allInWithoutLast) {\n setIndexToSplit(-1);\n } else {\n const lastSize = aggregatedChildLengths.length > 0 ? last(aggregatedChildLengths).childLength : 0;\n setIndexToSplit(\n aggregatedChildLengths.findIndex(({ totalLength }) => totalLength > size - paddingSize - lastSize)\n );\n }\n } else {\n setIndexToSplit(aggregatedChildLengths.findIndex(({ totalLength }) => totalLength > size - paddingSize));\n }\n }, [aggregatedChildLengths, size, setIndexToSplit, paddingSize, ignoreLast]);\n\n useEffect(() => {\n if (!ref.current) return;\n const childLengthsArray: Array<AggregatedChildResult> = [];\n let totalLength = 0;\n ref.current.childNodes.forEach((node: HTMLElement) => {\n const childLength = node.clientWidth;\n totalLength += childLength;\n childLengthsArray.push({ childLength, totalLength });\n });\n setAggregatedChildLengths(childLengthsArray);\n }, [children, ref, setAggregatedChildLengths]);\n\n return indexToSplit;\n}\n\nexport default useElementsOverflowingIndex;\n"],"names":["useElementsOverflowingIndex","_ref","ref","children","paddingSize","resizeDebounceTime","ignoreLast","_useState","useState","_useState2","_slicedToArray","size","setSize","onResize","useCallback","_ref2","borderBoxSize","inlineSize","useResizeObserver","callback","debounceTime","_useState3","_useState4","aggregatedChildLengths","setAggregatedChildLengths","_useState5","_useState6","indexToSplit","setIndexToSplit","useEffect","slice","find","_ref3","totalLength","lastSize","length","last","childLength","findIndex","_ref4","_ref5","current","childLengthsArray","childNodes","forEach","node","clientWidth","push"],"mappings":"oNAOA,SAASA,EAA2BC,GAYnC,IAXCC,EAAGD,EAAHC,IACAC,EAAQF,EAARE,SACAC,EAAWH,EAAXG,YACAC,EAAkBJ,EAAlBI,mBACAC,EAAUL,EAAVK,WAQAC,EAAwBC,EAAiB,MAAKC,EAAAC,EAAAH,EAAA,GAAvCI,EAAIF,EAAA,GAAEG,EAAOH,EAAA,GAEdI,EAAWC,GACf,SAAAC,GACEH,EADcG,EAAbC,cACqBC,WACxB,GACA,CAACL,IAEHM,EAAkB,CAChBhB,IAAAA,EACAiB,SAAUN,EACVO,aAAcf,IAGhB,IAAAgB,EAA4Db,EAAuC,IAAGc,EAAAZ,EAAAW,EAAA,GAA/FE,EAAsBD,EAAA,GAAEE,EAAyBF,EAAA,GACxDG,EAAwCjB,EAAwB,MAAKkB,EAAAhB,EAAAe,EAAA,GAA9DE,EAAYD,EAAA,GAAEE,EAAeF,EAAA,GA+BpC,OA7BAG,GAAU,WACR,GAAIvB,EAGF,IAFoBiB,EAAuBO,MAAM,GAAI,GACfC,MAAK,SAAAC,GAAc,OAAAA,EAAXC,YAAgCtB,EAAOP,KAEnFwB,GAAiB,OACZ,CACL,IAAMM,EAAWX,EAAuBY,OAAS,EAAIC,EAAKb,GAAwBc,YAAc,EAChGT,EACEL,EAAuBe,WAAU,SAAAC,GAAc,OAAAA,EAAXN,YAAgCtB,EAAOP,EAAc8B,CAAQ,IAEpG,MAEDN,EAAgBL,EAAuBe,WAAU,SAAAE,GAAc,OAAAA,EAAXP,YAAgCtB,EAAOP,CAAW,IAE1G,GAAG,CAACmB,EAAwBZ,EAAMiB,EAAiBxB,EAAaE,IAEhEuB,GAAU,WACR,GAAK3B,EAAIuC,QAAT,CACA,IAAMC,EAAkD,GACpDT,EAAc,EAClB/B,EAAIuC,QAAQE,WAAWC,SAAQ,SAACC,GAC9B,IAAMR,EAAcQ,EAAKC,YAEzBJ,EAAkBK,KAAK,CAAEV,YAAAA,EAAaJ,YADtCA,GAAeI,GAEjB,IACAb,EAA0BkB,EARR,CASnB,GAAE,CAACvC,EAAUD,EAAKsB,IAEZG,CACT"}
1
+ {"version":3,"file":"useElementsOverflowingIndex.js","sources":["../../../src/hooks/useElementsOverflowingIndex.ts"],"sourcesContent":["import { type ReactNode, type RefObject, useCallback, useEffect, useState } from \"react\";\nimport { last } from \"es-toolkit/compat\";\nimport useResizeObserver from \"./useResizeObserver\";\n\n// Use this hook when you want to get the index of the child which should be hidden from\ntype AggregatedChildResult = { childLength: number; totalLength: number };\n\nfunction useElementsOverflowingIndex({\n ref,\n children,\n paddingSize,\n resizeDebounceTime,\n ignoreLast\n}: {\n ref: RefObject<HTMLElement>;\n children: ReactNode;\n paddingSize: number;\n resizeDebounceTime: number;\n ignoreLast: boolean;\n}) {\n const [size, setSize] = useState<number>(null);\n\n const onResize = useCallback(\n ({ borderBoxSize }: { borderBoxSize: ResizeObserverSize }) => {\n setSize(borderBoxSize.inlineSize);\n },\n [setSize]\n );\n useResizeObserver({\n ref,\n callback: onResize,\n debounceTime: resizeDebounceTime\n });\n\n const [aggregatedChildLengths, setAggregatedChildLengths] = useState<Array<AggregatedChildResult>>([]);\n const [indexToSplit, setIndexToSplit] = useState<number | null>(null);\n\n useEffect(() => {\n if (ignoreLast) {\n const withoutLast = aggregatedChildLengths.slice(0, -1);\n const allInWithoutLast = !withoutLast.find(({ totalLength }) => totalLength > size - paddingSize);\n if (allInWithoutLast) {\n setIndexToSplit(-1);\n } else {\n const lastSize = aggregatedChildLengths.length > 0 ? last(aggregatedChildLengths).childLength : 0;\n setIndexToSplit(\n aggregatedChildLengths.findIndex(({ totalLength }) => totalLength > size - paddingSize - lastSize)\n );\n }\n } else {\n setIndexToSplit(aggregatedChildLengths.findIndex(({ totalLength }) => totalLength > size - paddingSize));\n }\n }, [aggregatedChildLengths, size, setIndexToSplit, paddingSize, ignoreLast]);\n\n useEffect(() => {\n if (!ref.current) return;\n const childLengthsArray: Array<AggregatedChildResult> = [];\n let totalLength = 0;\n ref.current.childNodes.forEach((node: HTMLElement) => {\n const childLength = node.clientWidth;\n totalLength += childLength;\n childLengthsArray.push({ childLength, totalLength });\n });\n setAggregatedChildLengths(childLengthsArray);\n }, [children, ref, setAggregatedChildLengths]);\n\n return indexToSplit;\n}\n\nexport default useElementsOverflowingIndex;\n"],"names":["useElementsOverflowingIndex","_ref","ref","children","paddingSize","resizeDebounceTime","ignoreLast","_useState","useState","_useState2","_slicedToArray","size","setSize","onResize","useCallback","_ref2","borderBoxSize","inlineSize","useResizeObserver","callback","debounceTime","_useState3","_useState4","aggregatedChildLengths","setAggregatedChildLengths","_useState5","_useState6","indexToSplit","setIndexToSplit","useEffect","slice","find","_ref3","totalLength","lastSize","length","last","childLength","findIndex","_ref4","_ref5","current","childLengthsArray","childNodes","forEach","node","clientWidth","push"],"mappings":"4NAOA,SAASA,EAA2BC,GAYnC,IAXCC,EAAGD,EAAHC,IACAC,EAAQF,EAARE,SACAC,EAAWH,EAAXG,YACAC,EAAkBJ,EAAlBI,mBACAC,EAAUL,EAAVK,WAQAC,EAAwBC,EAAiB,MAAKC,EAAAC,EAAAH,EAAA,GAAvCI,EAAIF,EAAA,GAAEG,EAAOH,EAAA,GAEdI,EAAWC,GACf,SAAAC,GACEH,EADcG,EAAbC,cACqBC,WACxB,GACA,CAACL,IAEHM,EAAkB,CAChBhB,IAAAA,EACAiB,SAAUN,EACVO,aAAcf,IAGhB,IAAAgB,EAA4Db,EAAuC,IAAGc,EAAAZ,EAAAW,EAAA,GAA/FE,EAAsBD,EAAA,GAAEE,EAAyBF,EAAA,GACxDG,EAAwCjB,EAAwB,MAAKkB,EAAAhB,EAAAe,EAAA,GAA9DE,EAAYD,EAAA,GAAEE,EAAeF,EAAA,GA+BpC,OA7BAG,GAAU,WACR,GAAIvB,EAGF,IAFoBiB,EAAuBO,MAAM,GAAI,GACfC,MAAK,SAAAC,GAAc,OAAAA,EAAXC,YAAgCtB,EAAOP,KAEnFwB,GAAiB,OACZ,CACL,IAAMM,EAAWX,EAAuBY,OAAS,EAAIC,EAAKb,GAAwBc,YAAc,EAChGT,EACEL,EAAuBe,WAAU,SAAAC,GAAc,OAAAA,EAAXN,YAAgCtB,EAAOP,EAAc8B,CAAQ,IAEpG,MAEDN,EAAgBL,EAAuBe,WAAU,SAAAE,GAAc,OAAAA,EAAXP,YAAgCtB,EAAOP,CAAW,IAE1G,GAAG,CAACmB,EAAwBZ,EAAMiB,EAAiBxB,EAAaE,IAEhEuB,GAAU,WACR,GAAK3B,EAAIuC,QAAT,CACA,IAAMC,EAAkD,GACpDT,EAAc,EAClB/B,EAAIuC,QAAQE,WAAWC,SAAQ,SAACC,GAC9B,IAAMR,EAAcQ,EAAKC,YAEzBJ,EAAkBK,KAAK,CAAEV,YAAAA,EAAaJ,YADtCA,GAAeI,GAEjB,IACAb,EAA0BkB,EARR,CASnB,GAAE,CAACvC,EAAUD,EAAKsB,IAEZG,CACT"}
@@ -1,2 +1,2 @@
1
- import{useMemo as n,useCallback as e,useEffect as o}from"react";import{noop as t}from"lodash-es";import r from"./useKeyEvent/index.js";var c;!function(n){n.UP="up",n.DOWN="down",n.LEFT="left",n.RIGHT="right"}(c||(c={}));var a=["ArrowDown"],i=["ArrowUp"],s=["ArrowRight"],l=["ArrowLeft"],u=["Enter"," "],f=["Enter"],v=["Escape"],b=["End"],k=["Home"];function d(f){var d=f.ref,g=f.onSelectionKey,p=void 0===g?t:g,O=f.onArrowNavigation,y=void 0===O?t:O,E=f.onEscape,j=void 0===E?t:E,m=f.onHome,w=void 0===m?t:m,A=f.onEnd,D=void 0===A?t:A,H=f.useDocumentEventListeners,L=void 0!==H&&H,T=f.focusOnMount,h=void 0!==T&&T,N=n((function(){if(!L)return{ref:d,preventDefault:!0,stopPropagation:!0}}),[L,d]),P=e((function(){return y(c.DOWN)}),[y]),R=e((function(){return y(c.UP)}),[y]),U=e((function(){return y(c.RIGHT)}),[y]),x=e((function(){return y(c.LEFT)}),[y]);r(Object.assign({keys:a,callback:P},N)),r(Object.assign({keys:i,callback:R},N)),r(Object.assign({keys:s,callback:U},N)),r(Object.assign({keys:l,callback:x},N)),r(Object.assign({keys:u,callback:p},N)),r(Object.assign({keys:v,callback:j},N)),r(Object.assign({keys:k,callback:w},N)),r(Object.assign({keys:b,callback:D},N)),o((function(){var n;h&&!L&&(null===(n=null==d?void 0:d.current)||void 0===n||n.focus())}),[h,d,L])}export{a as ARROW_DOWN_KEYS,l as ARROW_LEFT_KEYS,s as ARROW_RIGHT_KEYS,i as ARROW_UP_KEYS,b as END_KEYS,f as ENTER_KEYS,v as ESCAPE_KEYS,k as HOME_KEYS,c as NavDirections,u as SELECTION_KEYS,d as default};
1
+ import{useMemo as n,useCallback as e,useEffect as o}from"react";import{noop as t}from"es-toolkit/compat";import r from"./useKeyEvent/index.js";var c;!function(n){n.UP="up",n.DOWN="down",n.LEFT="left",n.RIGHT="right"}(c||(c={}));var a=["ArrowDown"],i=["ArrowUp"],s=["ArrowRight"],l=["ArrowLeft"],u=["Enter"," "],f=["Enter"],k=["Escape"],v=["End"],b=["Home"];function d(f){var d=f.ref,g=f.onSelectionKey,p=void 0===g?t:g,O=f.onArrowNavigation,m=void 0===O?t:O,y=f.onEscape,E=void 0===y?t:y,j=f.onHome,w=void 0===j?t:j,A=f.onEnd,D=void 0===A?t:A,H=f.useDocumentEventListeners,L=void 0!==H&&H,T=f.focusOnMount,N=void 0!==T&&T,P=n((function(){if(!L)return{ref:d,preventDefault:!0,stopPropagation:!0}}),[L,d]),R=e((function(){return m(c.DOWN)}),[m]),U=e((function(){return m(c.UP)}),[m]),h=e((function(){return m(c.RIGHT)}),[m]),x=e((function(){return m(c.LEFT)}),[m]);r(Object.assign({keys:a,callback:R},P)),r(Object.assign({keys:i,callback:U},P)),r(Object.assign({keys:s,callback:h},P)),r(Object.assign({keys:l,callback:x},P)),r(Object.assign({keys:u,callback:p},P)),r(Object.assign({keys:k,callback:E},P)),r(Object.assign({keys:b,callback:w},P)),r(Object.assign({keys:v,callback:D},P)),o((function(){var n;N&&!L&&(null===(n=null==d?void 0:d.current)||void 0===n||n.focus())}),[N,d,L])}export{a as ARROW_DOWN_KEYS,l as ARROW_LEFT_KEYS,s as ARROW_RIGHT_KEYS,i as ARROW_UP_KEYS,v as END_KEYS,f as ENTER_KEYS,k as ESCAPE_KEYS,b as HOME_KEYS,c as NavDirections,u as SELECTION_KEYS,d as default};
2
2
  //# sourceMappingURL=useFullKeyboardListeners.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFullKeyboardListeners.js","sources":["../../../src/hooks/useFullKeyboardListeners.ts"],"sourcesContent":["import { type MutableRefObject, useCallback, useEffect, useMemo } from \"react\";\nimport { noop } from \"lodash-es\";\nimport useKeyEvent from \"./useKeyEvent\";\nimport { type KeyboardEventCallback } from \"../types/events\";\n\nexport enum NavDirections {\n UP = \"up\",\n DOWN = \"down\",\n LEFT = \"left\",\n RIGHT = \"right\"\n}\n\nexport const ARROW_DOWN_KEYS = [\"ArrowDown\"];\nexport const ARROW_UP_KEYS = [\"ArrowUp\"];\nexport const ARROW_RIGHT_KEYS = [\"ArrowRight\"];\nexport const ARROW_LEFT_KEYS = [\"ArrowLeft\"];\nexport const SELECTION_KEYS = [\"Enter\", \" \"];\nexport const ENTER_KEYS = [\"Enter\"];\nexport const ESCAPE_KEYS = [\"Escape\"];\nexport const END_KEYS = [\"End\"];\nexport const HOME_KEYS = [\"Home\"];\n\nexport default function useFullKeyboardListeners({\n ref, // the reference for the component that listens to keyboard\n onSelectionKey = noop,\n onArrowNavigation = noop,\n onEscape = noop,\n onHome = noop,\n onEnd = noop,\n useDocumentEventListeners = false,\n focusOnMount = false\n}: {\n ref: MutableRefObject<HTMLElement>;\n onSelectionKey: KeyboardEventCallback;\n onArrowNavigation: (type: NavDirections) => void;\n onEscape: KeyboardEventCallback;\n onHome?: KeyboardEventCallback;\n onEnd?: KeyboardEventCallback;\n useDocumentEventListeners?: boolean;\n focusOnMount: boolean;\n}) {\n const listenerOptions = useMemo(() => {\n if (useDocumentEventListeners) return undefined;\n\n return {\n ref,\n preventDefault: true,\n stopPropagation: true\n };\n }, [useDocumentEventListeners, ref]);\n\n const onArrowDown = useCallback(() => onArrowNavigation(NavDirections.DOWN), [onArrowNavigation]);\n const onArrowUp = useCallback(() => onArrowNavigation(NavDirections.UP), [onArrowNavigation]);\n const onArrowRight = useCallback(() => onArrowNavigation(NavDirections.RIGHT), [onArrowNavigation]);\n const onArrowLeft = useCallback(() => onArrowNavigation(NavDirections.LEFT), [onArrowNavigation]);\n\n useKeyEvent({\n keys: ARROW_DOWN_KEYS,\n callback: onArrowDown,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ARROW_UP_KEYS,\n callback: onArrowUp,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ARROW_RIGHT_KEYS,\n callback: onArrowRight,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ARROW_LEFT_KEYS,\n callback: onArrowLeft,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: SELECTION_KEYS,\n callback: onSelectionKey,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ESCAPE_KEYS,\n callback: onEscape,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: HOME_KEYS,\n callback: onHome,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: END_KEYS,\n callback: onEnd,\n ...listenerOptions\n });\n\n useEffect(() => {\n if (!focusOnMount || useDocumentEventListeners) return;\n ref?.current?.focus();\n }, [focusOnMount, ref, useDocumentEventListeners]);\n}\n"],"names":["NavDirections","ARROW_DOWN_KEYS","ARROW_UP_KEYS","ARROW_RIGHT_KEYS","ARROW_LEFT_KEYS","SELECTION_KEYS","ENTER_KEYS","ESCAPE_KEYS","END_KEYS","HOME_KEYS","useFullKeyboardListeners","_ref","ref","_ref$onSelectionKey","onSelectionKey","noop","_ref$onArrowNavigatio","onArrowNavigation","_ref$onEscape","onEscape","_ref$onHome","onHome","_ref$onEnd","onEnd","_ref$useDocumentEvent","useDocumentEventListeners","_ref$focusOnMount","focusOnMount","listenerOptions","useMemo","preventDefault","stopPropagation","onArrowDown","useCallback","DOWN","onArrowUp","UP","onArrowRight","RIGHT","onArrowLeft","LEFT","useKeyEvent","Object","assign","keys","callback","useEffect","_a","current","focus"],"mappings":"2IAKYA,GAAZ,SAAYA,GACVA,EAAA,GAAA,KACAA,EAAA,KAAA,OACAA,EAAA,KAAA,OACAA,EAAA,MAAA,OACD,CALD,CAAYA,IAAAA,EAKX,CAAA,IAEYC,IAAAA,EAAkB,CAAC,aACnBC,EAAgB,CAAC,WACjBC,EAAmB,CAAC,cACpBC,EAAkB,CAAC,aACnBC,EAAiB,CAAC,QAAS,KAC3BC,EAAa,CAAC,SACdC,EAAc,CAAC,UACfC,EAAW,CAAC,OACZC,EAAY,CAAC,QAEF,SAAAC,EAAwBC,GAkB/C,IAjBCC,EAAGD,EAAHC,IAAGC,EAAAF,EACHG,eAAAA,OAAiBC,IAAHF,EAAGE,EAAIF,EAAAG,EAAAL,EACrBM,kBAAAA,OAAoBF,IAAHC,EAAGD,EAAIC,EAAAE,EAAAP,EACxBQ,SAAAA,OAAWJ,IAAHG,EAAGH,EAAIG,EAAAE,EAAAT,EACfU,OAAAA,OAASN,IAAHK,EAAGL,EAAIK,EAAAE,EAAAX,EACbY,MAAAA,OAAQR,IAAHO,EAAGP,EAAIO,EAAAE,EAAAb,EACZc,0BAAAA,OAA4B,IAAHD,GAAQA,EAAAE,EAAAf,EACjCgB,aAAAA,OAAe,IAAHD,GAAQA,EAWdE,EAAkBC,GAAQ,WAC9B,IAAIJ,EAEJ,MAAO,CACLb,IAAAA,EACAkB,gBAAgB,EAChBC,iBAAiB,EAErB,GAAG,CAACN,EAA2Bb,IAEzBoB,EAAcC,GAAY,WAAA,OAAMhB,EAAkBjB,EAAckC,QAAO,CAACjB,IACxEkB,EAAYF,GAAY,WAAA,OAAMhB,EAAkBjB,EAAcoC,MAAK,CAACnB,IACpEoB,EAAeJ,GAAY,WAAA,OAAMhB,EAAkBjB,EAAcsC,SAAQ,CAACrB,IAC1EsB,EAAcN,GAAY,WAAA,OAAMhB,EAAkBjB,EAAcwC,QAAO,CAACvB,IAE9EwB,EAAWC,OAAAC,OAAA,CACTC,KAAM3C,EACN4C,SAAUb,GACPJ,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAM1C,EACN2C,SAAUV,GACPP,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMzC,EACN0C,SAAUR,GACPT,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMxC,EACNyC,SAAUN,GACPX,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMvC,EACNwC,SAAU/B,GACPc,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMrC,EACNsC,SAAU1B,GACPS,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMnC,EACNoC,SAAUxB,GACPO,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMpC,EACNqC,SAAUtB,GACPK,IAGLkB,GAAU,iBACHnB,IAAgBF,IACT,QAAZsB,EAAAnC,aAAA,EAAAA,EAAKoC,eAAO,IAAAD,GAAAA,EAAEE,QACf,GAAE,CAACtB,EAAcf,EAAKa,GACzB"}
1
+ {"version":3,"file":"useFullKeyboardListeners.js","sources":["../../../src/hooks/useFullKeyboardListeners.ts"],"sourcesContent":["import { type MutableRefObject, useCallback, useEffect, useMemo } from \"react\";\nimport { noop } from \"es-toolkit/compat\";\nimport useKeyEvent from \"./useKeyEvent\";\nimport { type KeyboardEventCallback } from \"../types/events\";\n\nexport enum NavDirections {\n UP = \"up\",\n DOWN = \"down\",\n LEFT = \"left\",\n RIGHT = \"right\"\n}\n\nexport const ARROW_DOWN_KEYS = [\"ArrowDown\"];\nexport const ARROW_UP_KEYS = [\"ArrowUp\"];\nexport const ARROW_RIGHT_KEYS = [\"ArrowRight\"];\nexport const ARROW_LEFT_KEYS = [\"ArrowLeft\"];\nexport const SELECTION_KEYS = [\"Enter\", \" \"];\nexport const ENTER_KEYS = [\"Enter\"];\nexport const ESCAPE_KEYS = [\"Escape\"];\nexport const END_KEYS = [\"End\"];\nexport const HOME_KEYS = [\"Home\"];\n\nexport default function useFullKeyboardListeners({\n ref, // the reference for the component that listens to keyboard\n onSelectionKey = noop,\n onArrowNavigation = noop,\n onEscape = noop,\n onHome = noop,\n onEnd = noop,\n useDocumentEventListeners = false,\n focusOnMount = false\n}: {\n ref: MutableRefObject<HTMLElement>;\n onSelectionKey: KeyboardEventCallback;\n onArrowNavigation: (type: NavDirections) => void;\n onEscape: KeyboardEventCallback;\n onHome?: KeyboardEventCallback;\n onEnd?: KeyboardEventCallback;\n useDocumentEventListeners?: boolean;\n focusOnMount: boolean;\n}) {\n const listenerOptions = useMemo(() => {\n if (useDocumentEventListeners) return undefined;\n\n return {\n ref,\n preventDefault: true,\n stopPropagation: true\n };\n }, [useDocumentEventListeners, ref]);\n\n const onArrowDown = useCallback(() => onArrowNavigation(NavDirections.DOWN), [onArrowNavigation]);\n const onArrowUp = useCallback(() => onArrowNavigation(NavDirections.UP), [onArrowNavigation]);\n const onArrowRight = useCallback(() => onArrowNavigation(NavDirections.RIGHT), [onArrowNavigation]);\n const onArrowLeft = useCallback(() => onArrowNavigation(NavDirections.LEFT), [onArrowNavigation]);\n\n useKeyEvent({\n keys: ARROW_DOWN_KEYS,\n callback: onArrowDown,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ARROW_UP_KEYS,\n callback: onArrowUp,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ARROW_RIGHT_KEYS,\n callback: onArrowRight,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ARROW_LEFT_KEYS,\n callback: onArrowLeft,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: SELECTION_KEYS,\n callback: onSelectionKey,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ESCAPE_KEYS,\n callback: onEscape,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: HOME_KEYS,\n callback: onHome,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: END_KEYS,\n callback: onEnd,\n ...listenerOptions\n });\n\n useEffect(() => {\n if (!focusOnMount || useDocumentEventListeners) return;\n ref?.current?.focus();\n }, [focusOnMount, ref, useDocumentEventListeners]);\n}\n"],"names":["NavDirections","ARROW_DOWN_KEYS","ARROW_UP_KEYS","ARROW_RIGHT_KEYS","ARROW_LEFT_KEYS","SELECTION_KEYS","ENTER_KEYS","ESCAPE_KEYS","END_KEYS","HOME_KEYS","useFullKeyboardListeners","_ref","ref","_ref$onSelectionKey","onSelectionKey","noop","_ref$onArrowNavigatio","onArrowNavigation","_ref$onEscape","onEscape","_ref$onHome","onHome","_ref$onEnd","onEnd","_ref$useDocumentEvent","useDocumentEventListeners","_ref$focusOnMount","focusOnMount","listenerOptions","useMemo","preventDefault","stopPropagation","onArrowDown","useCallback","DOWN","onArrowUp","UP","onArrowRight","RIGHT","onArrowLeft","LEFT","useKeyEvent","Object","assign","keys","callback","useEffect","_a","current","focus"],"mappings":"mJAKYA,GAAZ,SAAYA,GACVA,EAAA,GAAA,KACAA,EAAA,KAAA,OACAA,EAAA,KAAA,OACAA,EAAA,MAAA,OACD,CALD,CAAYA,IAAAA,EAKX,CAAA,IAEYC,IAAAA,EAAkB,CAAC,aACnBC,EAAgB,CAAC,WACjBC,EAAmB,CAAC,cACpBC,EAAkB,CAAC,aACnBC,EAAiB,CAAC,QAAS,KAC3BC,EAAa,CAAC,SACdC,EAAc,CAAC,UACfC,EAAW,CAAC,OACZC,EAAY,CAAC,QAEF,SAAAC,EAAwBC,GAkB/C,IAjBCC,EAAGD,EAAHC,IAAGC,EAAAF,EACHG,eAAAA,OAAiBC,IAAHF,EAAGE,EAAIF,EAAAG,EAAAL,EACrBM,kBAAAA,OAAoBF,IAAHC,EAAGD,EAAIC,EAAAE,EAAAP,EACxBQ,SAAAA,OAAWJ,IAAHG,EAAGH,EAAIG,EAAAE,EAAAT,EACfU,OAAAA,OAASN,IAAHK,EAAGL,EAAIK,EAAAE,EAAAX,EACbY,MAAAA,OAAQR,IAAHO,EAAGP,EAAIO,EAAAE,EAAAb,EACZc,0BAAAA,OAA4B,IAAHD,GAAQA,EAAAE,EAAAf,EACjCgB,aAAAA,OAAe,IAAHD,GAAQA,EAWdE,EAAkBC,GAAQ,WAC9B,IAAIJ,EAEJ,MAAO,CACLb,IAAAA,EACAkB,gBAAgB,EAChBC,iBAAiB,EAErB,GAAG,CAACN,EAA2Bb,IAEzBoB,EAAcC,GAAY,WAAA,OAAMhB,EAAkBjB,EAAckC,QAAO,CAACjB,IACxEkB,EAAYF,GAAY,WAAA,OAAMhB,EAAkBjB,EAAcoC,MAAK,CAACnB,IACpEoB,EAAeJ,GAAY,WAAA,OAAMhB,EAAkBjB,EAAcsC,SAAQ,CAACrB,IAC1EsB,EAAcN,GAAY,WAAA,OAAMhB,EAAkBjB,EAAcwC,QAAO,CAACvB,IAE9EwB,EAAWC,OAAAC,OAAA,CACTC,KAAM3C,EACN4C,SAAUb,GACPJ,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAM1C,EACN2C,SAAUV,GACPP,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMzC,EACN0C,SAAUR,GACPT,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMxC,EACNyC,SAAUN,GACPX,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMvC,EACNwC,SAAU/B,GACPc,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMrC,EACNsC,SAAU1B,GACPS,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMnC,EACNoC,SAAUxB,GACPO,IAGLa,EAAWC,OAAAC,OAAA,CACTC,KAAMpC,EACNqC,SAAUtB,GACPK,IAGLkB,GAAU,iBACHnB,IAAgBF,IACT,QAAZsB,EAAAnC,aAAA,EAAAA,EAAKoC,eAAO,IAAAD,GAAAA,EAAEE,QACf,GAAE,CAACtB,EAAcf,EAAKa,GACzB"}
@@ -1,2 +1,2 @@
1
- import{useCallback as e,useEffect as r}from"react";import{debounce as n}from"lodash-es";function i(i){var o=i.ref,t=i.callback,c=i.debounceTime,l=void 0===c?200:c,a=e(n(t,l),[t,l]);r((function(){if(window.ResizeObserver&&(null==o?void 0:o.current)){var e=null,r=new ResizeObserver((function(r){var i,o=r[0];if(o&&o.borderBoxSize){if(Array.isArray(o.borderBoxSize))e=n(o.borderBoxSize[0]);else e=n(o.borderBoxSize)}else{if(!o.contentRect)return;var t={blockSize:o.contentRect.height,inlineSize:(null===(i=null==o?void 0:o.contentRect)||void 0===i?void 0:i.width)||0};e=n(t)}}));return r.observe(null==o?void 0:o.current),function(){0!==l&&a.cancel(),e&&window.cancelAnimationFrame(e),r.disconnect()}}function n(e){var r=Array.isArray(e)?e[0]:e;return window.requestAnimationFrame((function(){a({borderBoxSize:r})}))}}),[null==o?void 0:o.current,t,l,a])}export{i as default};
1
+ import{useCallback as e,useEffect as r}from"react";import{debounce as n}from"es-toolkit/compat";function i(i){var o=i.ref,t=i.callback,c=i.debounceTime,l=void 0===c?200:c,a=e(n(t,l),[t,l]);r((function(){if(window.ResizeObserver&&(null==o?void 0:o.current)){var e=null,r=new ResizeObserver((function(r){var i,o=r[0];if(o&&o.borderBoxSize){if(Array.isArray(o.borderBoxSize))e=n(o.borderBoxSize[0]);else e=n(o.borderBoxSize)}else{if(!o.contentRect)return;var t={blockSize:o.contentRect.height,inlineSize:(null===(i=null==o?void 0:o.contentRect)||void 0===i?void 0:i.width)||0};e=n(t)}}));return r.observe(null==o?void 0:o.current),function(){0!==l&&a.cancel(),e&&window.cancelAnimationFrame(e),r.disconnect()}}function n(e){var r=Array.isArray(e)?e[0]:e;return window.requestAnimationFrame((function(){a({borderBoxSize:r})}))}}),[null==o?void 0:o.current,t,l,a])}export{i as default};
2
2
  //# sourceMappingURL=useResizeObserver.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useResizeObserver.js","sources":["../../../src/hooks/useResizeObserver.ts"],"sourcesContent":["import { type RefObject, useCallback, useEffect } from \"react\";\nimport { debounce } from \"lodash-es\";\n\ntype ResizeCallback = ({ borderBoxSize }: { borderBoxSize: ResizeObserverSize }) => void;\n\nexport default function useResizeObserver({\n ref,\n callback,\n debounceTime = 200\n}: {\n ref: RefObject<HTMLElement>;\n callback: ResizeCallback;\n debounceTime?: number;\n}) {\n const debouncedCallback = useCallback(debounce<ResizeCallback>(callback, debounceTime), [callback, debounceTime]);\n\n useEffect(() => {\n if (!window.ResizeObserver) {\n return;\n }\n if (!ref?.current) return;\n\n function borderBoxSizeCallback(borderBoxSize: ResizeObserverSize | ReadonlyArray<ResizeObserverSize>): number {\n const value = Array.isArray(borderBoxSize) ? borderBoxSize[0] : borderBoxSize;\n return window.requestAnimationFrame(() => {\n debouncedCallback({ borderBoxSize: value });\n });\n }\n\n let animationFrameId: number | null = null;\n\n const resizeObserver = new ResizeObserver(entries => {\n const entry = entries[0];\n if (entry && entry.borderBoxSize) {\n // handle chrome (entry.borderBoxSize[0])\n // handle ff (entry.borderBoxSize)\n if (!Array.isArray(entry.borderBoxSize)) {\n animationFrameId = borderBoxSizeCallback(entry.borderBoxSize);\n } else {\n const borderBoxEntry = entry.borderBoxSize[0];\n animationFrameId = borderBoxSizeCallback(borderBoxEntry);\n }\n } else if (entry.contentRect) {\n // handle safari (entry.contentRect)\n const borderBoxSize = { blockSize: entry.contentRect.height, inlineSize: entry?.contentRect?.width || 0 };\n animationFrameId = borderBoxSizeCallback(borderBoxSize);\n } else {\n return;\n }\n });\n\n resizeObserver.observe(ref?.current);\n\n return () => {\n if (debounceTime !== 0) {\n debouncedCallback.cancel();\n }\n\n if (animationFrameId) {\n window.cancelAnimationFrame(animationFrameId);\n }\n\n resizeObserver.disconnect();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [ref?.current, callback, debounceTime, debouncedCallback]);\n}\n"],"names":["useResizeObserver","_ref","ref","callback","_ref$debounceTime","debounceTime","debouncedCallback","useCallback","debounce","useEffect","window","ResizeObserver","current","animationFrameId","resizeObserver","entries","entry","borderBoxSize","Array","isArray","borderBoxSizeCallback","contentRect","blockSize","height","inlineSize","_a","width","observe","cancel","cancelAnimationFrame","disconnect","value","requestAnimationFrame"],"mappings":"wFAKwB,SAAAA,EAAiBC,GAQxC,IAPCC,EAAGD,EAAHC,IACAC,EAAQF,EAARE,SAAQC,EAAAH,EACRI,aAAAA,OAAe,IAAHD,EAAG,IAAGA,EAMZE,EAAoBC,EAAYC,EAAyBL,EAAUE,GAAe,CAACF,EAAUE,IAEnGI,GAAU,WACR,GAAKC,OAAOC,iBAGPT,aAAA,EAAAA,EAAKU,SAAV,CASA,IAAIC,EAAkC,KAEhCC,EAAiB,IAAIH,gBAAe,SAAAI,SAClCC,EAAQD,EAAQ,GACtB,GAAIC,GAASA,EAAMC,cAAe,CAGhC,GAAKC,MAAMC,QAAQH,EAAMC,eAIvBJ,EAAmBO,EADIJ,EAAMC,cAAc,SAF3CJ,EAAmBO,EAAsBJ,EAAMC,cAKlD,KAAM,KAAID,EAAMK,YAKf,OAHA,IAAMJ,EAAgB,CAAEK,UAAWN,EAAMK,YAAYE,OAAQC,YAA8B,QAAlBC,EAAAT,aAAK,EAALA,EAAOK,mBAAW,IAAAI,OAAA,EAAAA,EAAEC,QAAS,GACtGb,EAAmBO,EAAsBH,EAG1C,CACH,IAIA,OAFAH,EAAea,QAAQzB,aAAG,EAAHA,EAAKU,SAErB,WACgB,IAAjBP,GACFC,EAAkBsB,SAGhBf,GACFH,OAAOmB,qBAAqBhB,GAG9BC,EAAegB,aA1CE,CAEnB,SAASV,EAAsBH,GAC7B,IAAMc,EAAQb,MAAMC,QAAQF,GAAiBA,EAAc,GAAKA,EAChE,OAAOP,OAAOsB,uBAAsB,WAClC1B,EAAkB,CAAEW,cAAec,GACrC,GACF,CAsCD,GAAE,CAAC7B,eAAAA,EAAKU,QAAST,EAAUE,EAAcC,GAC5C"}
1
+ {"version":3,"file":"useResizeObserver.js","sources":["../../../src/hooks/useResizeObserver.ts"],"sourcesContent":["import { type RefObject, useCallback, useEffect } from \"react\";\nimport { debounce } from \"es-toolkit/compat\";\n\ntype ResizeCallback = ({ borderBoxSize }: { borderBoxSize: ResizeObserverSize }) => void;\n\nexport default function useResizeObserver({\n ref,\n callback,\n debounceTime = 200\n}: {\n ref: RefObject<HTMLElement>;\n callback: ResizeCallback;\n debounceTime?: number;\n}) {\n const debouncedCallback = useCallback(debounce<ResizeCallback>(callback, debounceTime), [callback, debounceTime]);\n\n useEffect(() => {\n if (!window.ResizeObserver) {\n return;\n }\n if (!ref?.current) return;\n\n function borderBoxSizeCallback(borderBoxSize: ResizeObserverSize | ReadonlyArray<ResizeObserverSize>): number {\n const value = Array.isArray(borderBoxSize) ? borderBoxSize[0] : borderBoxSize;\n return window.requestAnimationFrame(() => {\n debouncedCallback({ borderBoxSize: value });\n });\n }\n\n let animationFrameId: number | null = null;\n\n const resizeObserver = new ResizeObserver(entries => {\n const entry = entries[0];\n if (entry && entry.borderBoxSize) {\n // handle chrome (entry.borderBoxSize[0])\n // handle ff (entry.borderBoxSize)\n if (!Array.isArray(entry.borderBoxSize)) {\n animationFrameId = borderBoxSizeCallback(entry.borderBoxSize);\n } else {\n const borderBoxEntry = entry.borderBoxSize[0];\n animationFrameId = borderBoxSizeCallback(borderBoxEntry);\n }\n } else if (entry.contentRect) {\n // handle safari (entry.contentRect)\n const borderBoxSize = { blockSize: entry.contentRect.height, inlineSize: entry?.contentRect?.width || 0 };\n animationFrameId = borderBoxSizeCallback(borderBoxSize);\n } else {\n return;\n }\n });\n\n resizeObserver.observe(ref?.current);\n\n return () => {\n if (debounceTime !== 0) {\n debouncedCallback.cancel();\n }\n\n if (animationFrameId) {\n window.cancelAnimationFrame(animationFrameId);\n }\n\n resizeObserver.disconnect();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [ref?.current, callback, debounceTime, debouncedCallback]);\n}\n"],"names":["useResizeObserver","_ref","ref","callback","_ref$debounceTime","debounceTime","debouncedCallback","useCallback","debounce","useEffect","window","ResizeObserver","current","animationFrameId","resizeObserver","entries","entry","borderBoxSize","Array","isArray","borderBoxSizeCallback","contentRect","blockSize","height","inlineSize","_a","width","observe","cancel","cancelAnimationFrame","disconnect","value","requestAnimationFrame"],"mappings":"gGAKwB,SAAAA,EAAiBC,GAQxC,IAPCC,EAAGD,EAAHC,IACAC,EAAQF,EAARE,SAAQC,EAAAH,EACRI,aAAAA,OAAe,IAAHD,EAAG,IAAGA,EAMZE,EAAoBC,EAAYC,EAAyBL,EAAUE,GAAe,CAACF,EAAUE,IAEnGI,GAAU,WACR,GAAKC,OAAOC,iBAGPT,aAAA,EAAAA,EAAKU,SAAV,CASA,IAAIC,EAAkC,KAEhCC,EAAiB,IAAIH,gBAAe,SAAAI,SAClCC,EAAQD,EAAQ,GACtB,GAAIC,GAASA,EAAMC,cAAe,CAGhC,GAAKC,MAAMC,QAAQH,EAAMC,eAIvBJ,EAAmBO,EADIJ,EAAMC,cAAc,SAF3CJ,EAAmBO,EAAsBJ,EAAMC,cAKlD,KAAM,KAAID,EAAMK,YAKf,OAHA,IAAMJ,EAAgB,CAAEK,UAAWN,EAAMK,YAAYE,OAAQC,YAA8B,QAAlBC,EAAAT,aAAK,EAALA,EAAOK,mBAAW,IAAAI,OAAA,EAAAA,EAAEC,QAAS,GACtGb,EAAmBO,EAAsBH,EAG1C,CACH,IAIA,OAFAH,EAAea,QAAQzB,aAAG,EAAHA,EAAKU,SAErB,WACgB,IAAjBP,GACFC,EAAkBsB,SAGhBf,GACFH,OAAOmB,qBAAqBhB,GAG9BC,EAAegB,aA1CE,CAEnB,SAASV,EAAsBH,GAC7B,IAAMc,EAAQb,MAAMC,QAAQF,GAAiBA,EAAc,GAAKA,EAChE,OAAOP,OAAOsB,uBAAsB,WAClC1B,EAAkB,CAAEW,cAAec,GACrC,GACF,CAsCD,GAAE,CAAC7B,eAAAA,EAAKU,QAAST,EAAUE,EAAcC,GAC5C"}
@@ -1,2 +1,2 @@
1
- import{toConsumableArray as r}from"../../_virtual/_rollupPluginBabelHelpers.js";import{useMemo as t,useCallback as o}from"react";import{throttle as a}from"lodash-es";function i(i,l,n){var e=l.wait,u=l.trailing,m=void 0===u||u,s=t((function(){return a(i,e,{trailing:m})}),[e,m].concat(r(n)));return o(s,[s])}export{i as default};
1
+ import{toConsumableArray as r}from"../../_virtual/_rollupPluginBabelHelpers.js";import{useMemo as t,useCallback as o}from"react";import{throttle as a}from"es-toolkit/compat";function i(i,l,n){var e=l.wait,u=l.trailing,m=void 0===u||u,p=t((function(){return a(i,e,{trailing:m})}),[e,m].concat(r(n)));return o(p,[p])}export{i as default};
2
2
  //# sourceMappingURL=useThrottledCallback.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useThrottledCallback.js","sources":["../../../src/hooks/useThrottledCallback.ts"],"sourcesContent":["import { useMemo, useCallback } from \"react\";\nimport { throttle } from \"lodash-es\";\n\nexport default function useThrottledCallback(\n callback: (...args: Array<unknown>) => void,\n { wait, trailing = true }: { wait: number; trailing: boolean },\n dependencies: Array<unknown>\n) {\n const throttledFunction = useMemo(() => {\n return throttle(callback, wait, { trailing });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [wait, trailing, ...dependencies]);\n\n const throttledCallback = useCallback(throttledFunction, [throttledFunction]);\n\n return throttledCallback;\n}\n"],"names":["useThrottledCallback","callback","_ref","dependencies","wait","_ref$trailing","trailing","throttledFunction","useMemo","throttle","concat","_toConsumableArray","useCallback"],"mappings":"sKAGwB,SAAAA,EACtBC,EAA2CC,EAE3CC,GAA4B,IAD1BC,EAAIF,EAAJE,KAAIC,EAAAH,EAAEI,SAAAA,OAAW,IAAHD,GAAOA,EAGjBE,EAAoBC,GAAQ,WAChC,OAAOC,EAASR,EAAUG,EAAM,CAAEE,SAAAA,MAEnC,CAAGF,EAAME,GAAQI,OAAAC,EAAKR,KAIvB,OAF0BS,EAAYL,EAAmB,CAACA,GAG5D"}
1
+ {"version":3,"file":"useThrottledCallback.js","sources":["../../../src/hooks/useThrottledCallback.ts"],"sourcesContent":["import { useMemo, useCallback } from \"react\";\nimport { throttle } from \"es-toolkit/compat\";\n\nexport default function useThrottledCallback(\n callback: (...args: Array<unknown>) => void,\n { wait, trailing = true }: { wait: number; trailing: boolean },\n dependencies: Array<unknown>\n) {\n const throttledFunction = useMemo(() => {\n return throttle(callback, wait, { trailing });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [wait, trailing, ...dependencies]);\n\n const throttledCallback = useCallback(throttledFunction, [throttledFunction]);\n\n return throttledCallback;\n}\n"],"names":["useThrottledCallback","callback","_ref","dependencies","wait","_ref$trailing","trailing","throttledFunction","useMemo","throttle","concat","_toConsumableArray","useCallback"],"mappings":"8KAGwB,SAAAA,EACtBC,EAA2CC,EAE3CC,GAA4B,IAD1BC,EAAIF,EAAJE,KAAIC,EAAAH,EAAEI,SAAAA,OAAW,IAAHD,GAAOA,EAGjBE,EAAoBC,GAAQ,WAChC,OAAOC,EAASR,EAAUG,EAAM,CAAEE,SAAAA,MAEnC,CAAGF,EAAME,GAAQI,OAAAC,EAAKR,KAIvB,OAF0BS,EAAYL,EAAmB,CAACA,GAG5D"}
@@ -1,2 +1,2 @@
1
- import{useRef as r,useCallback as e,useEffect as t}from"react";import{noop as o}from"lodash-es";function n(n){var i=n.time,u=void 0===i?0:i,c=n.callback,a=n.ignoreZeroTime,m=0===u&&(void 0!==a&&a),f=r(null),l=e((function(){f.current&&clearTimeout(f.current)}),[f]);return t((function(){if(!m)return f.current=setTimeout(c,u),function(){clearTimeout(f.current)}}),[c,u,f,m]),m?[o]:[l]}export{n as default};
1
+ import{useRef as r,useCallback as t,useEffect as e}from"react";import{noop as o}from"es-toolkit/compat";function i(i){var n=i.time,u=void 0===n?0:n,c=i.callback,m=i.ignoreZeroTime,a=0===u&&(void 0!==m&&m),f=r(null),l=t((function(){f.current&&clearTimeout(f.current)}),[f]);return e((function(){if(!a)return f.current=setTimeout(c,u),function(){clearTimeout(f.current)}}),[c,u,f,a]),a?[o]:[l]}export{i as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/hooks/useTimeout/index.ts"],"sourcesContent":["import { useEffect, useRef, useCallback } from \"react\";\nimport { noop } from \"lodash-es\";\n\nexport default function useTimeout({\n time = 0,\n callback,\n ignoreZeroTime = false\n}: {\n callback: () => void;\n time?: number;\n ignoreZeroTime?: boolean;\n}) {\n const ignoreTimeout = time === 0 && ignoreZeroTime;\n const timeoutId = useRef(null);\n const cancelTimeout = useCallback(() => {\n if (!timeoutId.current) {\n return;\n }\n clearTimeout(timeoutId.current);\n }, [timeoutId]);\n\n useEffect(() => {\n if (ignoreTimeout) {\n return;\n }\n\n timeoutId.current = setTimeout(callback, time);\n return () => {\n clearTimeout(timeoutId.current);\n };\n }, [callback, time, timeoutId, ignoreTimeout]);\n\n if (ignoreTimeout) {\n return [noop];\n }\n return [cancelTimeout];\n}\n"],"names":["useTimeout","_ref","_ref$time","time","callback","_ref$ignoreZeroTime","ignoreZeroTime","ignoreTimeout","timeoutId","useRef","cancelTimeout","useCallback","current","clearTimeout","useEffect","setTimeout","noop"],"mappings":"gGAGwB,SAAAA,EAAUC,GAQjC,IAAAC,EAAAD,EAPCE,KAAAA,OAAO,IAAHD,EAAG,EAACA,EACRE,EAAQH,EAARG,SAAQC,EAAAJ,EACRK,eAMMC,EAAyB,IAATJ,SANL,IAAHE,GAAQA,GAOhBG,EAAYC,EAAO,MACnBC,EAAgBC,GAAY,WAC3BH,EAAUI,SAGfC,aAAaL,EAAUI,QACzB,GAAG,CAACJ,IAaJ,OAXAM,GAAU,WACR,IAAIP,EAKJ,OADAC,EAAUI,QAAUG,WAAWX,EAAUD,GAClC,WACLU,aAAaL,EAAUI,SAE1B,GAAE,CAACR,EAAUD,EAAMK,EAAWD,IAE3BA,EACK,CAACS,GAEH,CAACN,EACV"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/hooks/useTimeout/index.ts"],"sourcesContent":["import { useEffect, useRef, useCallback } from \"react\";\nimport { noop } from \"es-toolkit/compat\";\n\nexport default function useTimeout({\n time = 0,\n callback,\n ignoreZeroTime = false\n}: {\n callback: () => void;\n time?: number;\n ignoreZeroTime?: boolean;\n}) {\n const ignoreTimeout = time === 0 && ignoreZeroTime;\n const timeoutId = useRef(null);\n const cancelTimeout = useCallback(() => {\n if (!timeoutId.current) {\n return;\n }\n clearTimeout(timeoutId.current);\n }, [timeoutId]);\n\n useEffect(() => {\n if (ignoreTimeout) {\n return;\n }\n\n timeoutId.current = setTimeout(callback, time);\n return () => {\n clearTimeout(timeoutId.current);\n };\n }, [callback, time, timeoutId, ignoreTimeout]);\n\n if (ignoreTimeout) {\n return [noop];\n }\n return [cancelTimeout];\n}\n"],"names":["useTimeout","_ref","_ref$time","time","callback","_ref$ignoreZeroTime","ignoreZeroTime","ignoreTimeout","timeoutId","useRef","cancelTimeout","useCallback","current","clearTimeout","useEffect","setTimeout","noop"],"mappings":"wGAGwB,SAAAA,EAAUC,GAQjC,IAAAC,EAAAD,EAPCE,KAAAA,OAAO,IAAHD,EAAG,EAACA,EACRE,EAAQH,EAARG,SAAQC,EAAAJ,EACRK,eAMMC,EAAyB,IAATJ,SANL,IAAHE,GAAQA,GAOhBG,EAAYC,EAAO,MACnBC,EAAgBC,GAAY,WAC3BH,EAAUI,SAGfC,aAAaL,EAAUI,QACzB,GAAG,CAACJ,IAaJ,OAXAM,GAAU,WACR,IAAIP,EAKJ,OADAC,EAAUI,QAAUG,WAAWX,EAAUD,GAClC,WACLU,aAAaL,EAAUI,SAE1B,GAAE,CAACR,EAAUD,EAAMK,EAAWD,IAE3BA,EACK,CAACS,GAEH,CAACN,EACV"}
@@ -1,2 +1,2 @@
1
- import{memoize as e}from"lodash-es";function t(e,t){return!!t&&(r=Array.isArray(t)?t.map((function(e){return".".concat(e)})).join(","):".".concat(t),!!e.parentElement.closest(r));var r}var r=e((function(e){if(!e)return null;for(;e.parentElement;){if(n(e.parentElement))return e.parentElement;e=e.parentElement}return document.body}),(function(e){return e.outerHTML})),n=function(e){return["auto","scroll"].includes(getComputedStyle(e).getPropertyValue("overflow-y"))};export{r as getScrollableParent,t as isInsideClass};
1
+ import{memoize as t}from"es-toolkit/compat";function e(t,e){return!!e&&(r=Array.isArray(e)?e.map((function(t){return".".concat(t)})).join(","):".".concat(e),!!t.parentElement.closest(r));var r}var r=t((function(t){if(!t)return null;for(;t.parentElement;){if(n(t.parentElement))return t.parentElement;t=t.parentElement}return document.body}),(function(t){return t.outerHTML})),n=function(t){return["auto","scroll"].includes(getComputedStyle(t).getPropertyValue("overflow-y"))};export{r as getScrollableParent,e as isInsideClass};
2
2
  //# sourceMappingURL=dom-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dom-utils.js","sources":["../../../src/utils/dom-utils.ts"],"sourcesContent":["import { memoize as _memoize } from \"lodash-es\";\n\nexport function isInsideClass(domElement: HTMLElement, classOrClassesName: Array<string> | string) {\n if (!classOrClassesName) return false;\n let selector;\n\n if (Array.isArray(classOrClassesName)) {\n selector = classOrClassesName.map(c => `.${c}`).join(\",\");\n } else {\n selector = `.${classOrClassesName}`;\n }\n\n return !!domElement.parentElement.closest(selector);\n}\n\nexport const getScrollableParent = _memoize(\n (node: HTMLElement): HTMLElement => {\n if (!node) {\n return null;\n }\n while (node.parentElement) {\n if (isNodeVerticallyScrollable(node.parentElement)) {\n return node.parentElement;\n }\n node = node.parentElement;\n }\n return document.body;\n },\n (node: HTMLElement) => node.outerHTML\n);\n\nconst isNodeVerticallyScrollable = (node: HTMLElement): boolean => {\n return [\"auto\", \"scroll\"].includes(getComputedStyle(node).getPropertyValue(\"overflow-y\"));\n};\n"],"names":["isInsideClass","domElement","classOrClassesName","selector","Array","isArray","map","c","concat","join","parentElement","closest","getScrollableParent","_memoize","node","isNodeVerticallyScrollable","document","body","outerHTML","includes","getComputedStyle","getPropertyValue"],"mappings":"oCAEgB,SAAAA,EAAcC,EAAyBC,GACrD,QAAKA,IAIHC,EADEC,MAAMC,QAAQH,GACLA,EAAmBI,KAAI,SAAAC,GAAC,MAAAC,IAAAA,OAAQD,EAAC,IAAIE,KAAK,KAE7CD,IAAAA,OAAON,KAGRD,EAAWS,cAAcC,QAAQR,IAR1C,IAAIA,CASN,KAEaS,EAAsBC,GACjC,SAACC,GACC,IAAKA,EACH,OAAO,KAET,KAAOA,EAAKJ,eAAe,CACzB,GAAIK,EAA2BD,EAAKJ,eAClC,OAAOI,EAAKJ,cAEdI,EAAOA,EAAKJ,aACb,CACD,OAAOM,SAASC,IAClB,IACA,SAACH,GAAiB,OAAKA,EAAKI,SAAS,IAGjCH,EAA6B,SAACD,GAClC,MAAO,CAAC,OAAQ,UAAUK,SAASC,iBAAiBN,GAAMO,iBAAiB,cAC7E"}
1
+ {"version":3,"file":"dom-utils.js","sources":["../../../src/utils/dom-utils.ts"],"sourcesContent":["import { memoize as _memoize } from \"es-toolkit/compat\";\n\nexport function isInsideClass(domElement: HTMLElement, classOrClassesName: Array<string> | string) {\n if (!classOrClassesName) return false;\n let selector;\n\n if (Array.isArray(classOrClassesName)) {\n selector = classOrClassesName.map(c => `.${c}`).join(\",\");\n } else {\n selector = `.${classOrClassesName}`;\n }\n\n return !!domElement.parentElement.closest(selector);\n}\n\nconst _getScrollableParent = _memoize(\n (node: HTMLElement): HTMLElement => {\n if (!node) {\n return null;\n }\n while (node.parentElement) {\n if (isNodeVerticallyScrollable(node.parentElement)) {\n return node.parentElement;\n }\n node = node.parentElement;\n }\n return document.body;\n },\n (node: HTMLElement) => node.outerHTML\n);\n\nexport const getScrollableParent: (node: HTMLElement) => HTMLElement = _getScrollableParent;\n\nconst isNodeVerticallyScrollable = (node: HTMLElement): boolean => {\n return [\"auto\", \"scroll\"].includes(getComputedStyle(node).getPropertyValue(\"overflow-y\"));\n};\n"],"names":["isInsideClass","domElement","classOrClassesName","selector","Array","isArray","map","c","concat","join","parentElement","closest","getScrollableParent","_memoize","node","isNodeVerticallyScrollable","document","body","outerHTML","includes","getComputedStyle","getPropertyValue"],"mappings":"4CAEgB,SAAAA,EAAcC,EAAyBC,GACrD,QAAKA,IAIHC,EADEC,MAAMC,QAAQH,GACLA,EAAmBI,KAAI,SAAAC,GAAC,MAAAC,IAAAA,OAAQD,EAAC,IAAIE,KAAK,KAE7CD,IAAAA,OAAON,KAGRD,EAAWS,cAAcC,QAAQR,IAR1C,IAAIA,CASN,CAEA,IAgBaS,EAhBgBC,GAC3B,SAACC,GACC,IAAKA,EACH,OAAO,KAET,KAAOA,EAAKJ,eAAe,CACzB,GAAIK,EAA2BD,EAAKJ,eAClC,OAAOI,EAAKJ,cAEdI,EAAOA,EAAKJ,aACb,CACD,OAAOM,SAASC,IAClB,IACA,SAACH,GAAiB,OAAKA,EAAKI,SAAS,IAKjCH,EAA6B,SAACD,GAClC,MAAO,CAAC,OAAQ,UAAUK,SAASC,iBAAiBN,GAAMO,iBAAiB,cAC7E"}
@@ -1,2 +1,2 @@
1
- import{isArray as r,isFunction as n}from"lodash-es";function t(r){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(o){for(var e=0;r.length>e;e++){var i=r[e];try{var u=void 0;if(n(i)?u=i(o):i&&(i.current=o),!1===u&&t)return}catch(r){return void console.error(r)}}}}function o(r){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(t){for(var o=0;r.length>o;o++){var e=r[o];try{if(!1===(e&&e(t))&&n)return}catch(r){return void console.error(r)}}}}function e(n){return r(n)?n:[n]}function i(){}export{i as NOOP,o as chainFunctions,t as chainRefFunctions,e as convertToArray};
1
+ import{isArray as r,isFunction as t}from"es-toolkit/compat";function n(r){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(o){for(var e=0;r.length>e;e++){var i=r[e];try{var c=void 0;if(t(i)?c=i(o):i&&(i.current=o),!1===c&&n)return}catch(r){return void console.error(r)}}}}function o(r){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){for(var o=0;r.length>o;o++){var e=r[o];try{if(!1===(e&&e(n))&&t)return}catch(r){return void console.error(r)}}}}function e(t){return r(t)?t:[t]}function i(){}export{i as NOOP,o as chainFunctions,n as chainRefFunctions,e as convertToArray};
2
2
  //# sourceMappingURL=function-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"function-utils.js","sources":["../../../src/utils/function-utils.ts"],"sourcesContent":["import { isArray, isFunction } from \"lodash-es\";\nimport { type MutableRefObject } from \"react\";\n\nexport function chainRefFunctions(\n funcsOrRefs: Array<MutableRefObject<HTMLElement> | ((element: HTMLElement) => void | boolean)>,\n allowBreak = false\n) {\n return (args: HTMLElement) => {\n for (let i = 0; i < funcsOrRefs.length; i++) {\n const funcOrRef = funcsOrRefs[i];\n try {\n let result;\n if (isFunction(funcOrRef)) {\n result = funcOrRef(args);\n } else if (funcOrRef) {\n funcOrRef.current = args;\n }\n if (result === false && allowBreak) {\n return;\n }\n } catch (e) {\n console.error(e);\n return;\n }\n }\n };\n}\n\nexport function chainFunctions(funcs: Array<(args: any) => void | boolean>, allowBreak = false) {\n return (args: any) => {\n for (let i = 0; i < funcs.length; i++) {\n const func = funcs[i];\n try {\n const result = func && func(args);\n if (result === false && allowBreak) {\n return;\n }\n } catch (e) {\n console.error(e);\n return;\n }\n }\n };\n}\n\nexport function convertToArray<T>(input: T | Array<T>): Array<T> {\n return isArray(input) ? input : [input];\n}\n\nexport function NOOP() {}\n"],"names":["chainRefFunctions","funcsOrRefs","allowBreak","arguments","length","undefined","args","i","funcOrRef","result","isFunction","current","e","console","error","chainFunctions","funcs","func","convertToArray","input","isArray","NOOP"],"mappings":"6DAGgBA,EACdC,GACkB,IAAlBC,EAAUC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GAEV,OAAO,SAACG,GACN,IAAK,IAAIC,EAAI,EAAON,EAAYG,OAAhBG,EAAwBA,IAAK,CAC3C,IAAMC,EAAYP,EAAYM,GAC9B,IACE,IAAIE,OAAM,EAMV,GALIC,EAAWF,GACbC,EAASD,EAAUF,GACVE,IACTA,EAAUG,QAAUL,IAEP,IAAXG,GAAoBP,EACtB,MAEH,CAAC,MAAOU,GAEP,YADAC,QAAQC,MAAMF,EAEf,CACF,EAEL,UAEgBG,EAAeC,GAA+D,IAAlBd,EAAUC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GACpF,OAAO,SAACG,GACN,IAAK,IAAIC,EAAI,EAAOS,EAAMZ,OAAVG,EAAkBA,IAAK,CACrC,IAAMU,EAAOD,EAAMT,GACnB,IAEE,IAAe,KADAU,GAAQA,EAAKX,KACJJ,EACtB,MAEH,CAAC,MAAOU,GAEP,YADAC,QAAQC,MAAMF,EAEf,CACF,EAEL,CAEM,SAAUM,EAAkBC,GAChC,OAAOC,EAAQD,GAASA,EAAQ,CAACA,EACnC,CAEM,SAAUE,IAAI"}
1
+ {"version":3,"file":"function-utils.js","sources":["../../../src/utils/function-utils.ts"],"sourcesContent":["import { isArray, isFunction } from \"es-toolkit/compat\";\nimport { type MutableRefObject } from \"react\";\n\nexport function chainRefFunctions(\n funcsOrRefs: Array<MutableRefObject<HTMLElement> | ((element: HTMLElement) => void | boolean)>,\n allowBreak = false\n) {\n return (args: HTMLElement) => {\n for (let i = 0; i < funcsOrRefs.length; i++) {\n const funcOrRef = funcsOrRefs[i];\n try {\n let result;\n if (isFunction(funcOrRef)) {\n result = funcOrRef(args);\n } else if (funcOrRef) {\n funcOrRef.current = args;\n }\n if (result === false && allowBreak) {\n return;\n }\n } catch (e) {\n console.error(e);\n return;\n }\n }\n };\n}\n\nexport function chainFunctions(funcs: Array<(args: any) => void | boolean>, allowBreak = false) {\n return (args: any) => {\n for (let i = 0; i < funcs.length; i++) {\n const func = funcs[i];\n try {\n const result = func && func(args);\n if (result === false && allowBreak) {\n return;\n }\n } catch (e) {\n console.error(e);\n return;\n }\n }\n };\n}\n\nexport function convertToArray<T>(input: T | Array<T>): Array<T> {\n return isArray(input) ? input : [input];\n}\n\nexport function NOOP() {}\n"],"names":["chainRefFunctions","funcsOrRefs","allowBreak","arguments","length","undefined","args","i","funcOrRef","result","isFunction","current","e","console","error","chainFunctions","funcs","func","convertToArray","input","isArray","NOOP"],"mappings":"qEAGgBA,EACdC,GACkB,IAAlBC,EAAUC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GAEV,OAAO,SAACG,GACN,IAAK,IAAIC,EAAI,EAAON,EAAYG,OAAhBG,EAAwBA,IAAK,CAC3C,IAAMC,EAAYP,EAAYM,GAC9B,IACE,IAAIE,OAAM,EAMV,GALIC,EAAWF,GACbC,EAASD,EAAUF,GACVE,IACTA,EAAUG,QAAUL,IAEP,IAAXG,GAAoBP,EACtB,MAEH,CAAC,MAAOU,GAEP,YADAC,QAAQC,MAAMF,EAEf,CACF,EAEL,UAEgBG,EAAeC,GAA+D,IAAlBd,EAAUC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GACpF,OAAO,SAACG,GACN,IAAK,IAAIC,EAAI,EAAOS,EAAMZ,OAAVG,EAAkBA,IAAK,CACrC,IAAMU,EAAOD,EAAMT,GACnB,IAEE,IAAe,KADAU,GAAQA,EAAKX,KACJJ,EACtB,MAEH,CAAC,MAAOU,GAEP,YADAC,QAAQC,MAAMF,EAEf,CACF,EAEL,CAEM,SAAUM,EAAkBC,GAChC,OAAOC,EAAQD,GAASA,EAAQ,CAACA,EACnC,CAEM,SAAUE,IAAI"}