@vibe/core 3.70.2-alpha-96f20.0 → 3.70.2

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 (757) hide show
  1. package/dist/components/AlertBanner/AlertBannerButton/AlertBannerButton.d.ts +1 -1
  2. package/dist/components/AttentionBox/AttentionBox.d.ts +3 -3
  3. package/dist/components/AttentionBox/AttentionBoxConstants.d.ts +8 -0
  4. package/dist/components/Avatar/Avatar.d.ts +2 -1
  5. package/dist/components/Avatar/AvatarBadge.d.ts +2 -1
  6. package/dist/components/Avatar/AvatarContent.d.ts +2 -1
  7. package/dist/components/BaseListItem/BaseListItem.types.d.ts +2 -1
  8. package/dist/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.d.ts +2 -1
  9. package/dist/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.d.ts +2 -1
  10. package/dist/components/ButtonGroup/ButtonGroup.d.ts +4 -4
  11. package/dist/components/ButtonGroup/ButtonGroupConstants.d.ts +8 -0
  12. package/dist/components/ButtonGroup/ButtonWrapper.d.ts +1 -1
  13. package/dist/components/Chips/Chips.d.ts +2 -1
  14. package/dist/components/ColorPicker/ColorPicker.d.ts +2 -1
  15. package/dist/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.d.ts +2 -1
  16. package/dist/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.d.ts +2 -1
  17. package/dist/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.d.ts +2 -1
  18. package/dist/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.d.ts +2 -1
  19. package/dist/components/Combobox/Combobox.d.ts +2 -1
  20. package/dist/components/Combobox/components/ComboboxConstants.d.ts +1 -1
  21. package/dist/components/EmptyState/EmptyState.types.d.ts +1 -1
  22. package/dist/components/IconButton/IconButton.d.ts +5 -4
  23. package/dist/components/LegacyModal/LegacyModalHeader/LegacyModalHeader.d.ts +2 -1
  24. package/dist/components/Link/Link.d.ts +2 -1
  25. package/dist/components/ListItemIcon/ListItemIcon.d.ts +2 -1
  26. package/dist/components/Menu/MenuItem/MenuItem.d.ts +3 -3
  27. package/dist/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.types.d.ts +1 -2
  28. package/dist/components/Menu/MenuItemButton/MenuItemButton.d.ts +4 -3
  29. package/dist/components/Modal/Modal/Modal.types.d.ts +6 -28
  30. package/dist/components/Modal/ModalHeader/ModalHeader.types.d.ts +2 -1
  31. package/dist/components/Modal/ModalTopActions/ModalTopActions.types.d.ts +1 -1
  32. package/dist/components/Modal/footers/ModalFooterBase/ModalFooterBase.types.d.ts +1 -1
  33. package/dist/components/Modal/footers/utils/getPropsForButton.d.ts +6 -6
  34. package/dist/components/MultiStepIndicator/MultiStepIndicator.d.ts +2 -1
  35. package/dist/components/MultiStepIndicator/components/StepIndicator/StepIndicator.d.ts +2 -1
  36. package/dist/components/NumberField/NumberField.types.d.ts +1 -1
  37. package/dist/components/Search/Search.types.d.ts +2 -1
  38. package/dist/components/Slider/Slider.d.ts +1 -1
  39. package/dist/components/Slider/SliderConstants.d.ts +1 -1
  40. package/dist/components/Slider/SliderContext.d.ts +1 -1
  41. package/dist/components/SplitButton/SplitButton.d.ts +4 -4
  42. package/dist/components/Steps/Steps.d.ts +1 -1
  43. package/dist/components/Steps/StepsCommand.d.ts +1 -1
  44. package/dist/components/Steps/StepsHeader.d.ts +1 -1
  45. package/dist/components/Table/Table/Table.d.ts +2 -1
  46. package/dist/components/Table/TableHeaderCell/TableHeaderCell.d.ts +2 -1
  47. package/dist/components/Tabs/Tab/Tab.d.ts +1 -2
  48. package/dist/components/Tipseen/TipseenContent.d.ts +1 -1
  49. package/dist/components/Toast/Toast.d.ts +1 -1
  50. package/dist/components/Toast/ToastButton/ToastButton.d.ts +1 -1
  51. package/dist/components/Toast/ToastHelpers.d.ts +1 -1
  52. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  53. package/dist/components/button/dist/Button/Button.js +2 -0
  54. package/dist/components/button/dist/Button/Button.js.map +1 -0
  55. package/dist/components/button/dist/Button/Button.module.scss.js +2 -0
  56. package/dist/components/button/dist/Button/ButtonConstants.js +2 -0
  57. package/dist/components/button/dist/Button/ButtonConstants.js.map +1 -0
  58. package/dist/components/button/dist/Button/helper/dom-helpers.js.map +1 -0
  59. package/dist/components/button/dist/Button/helper/useButtonLoading.js +2 -0
  60. package/dist/components/button/dist/Button/helper/useButtonLoading.js.map +1 -0
  61. package/dist/components/icon/dist/Icon/CustomSvgIcon/CustomSvgIcon.js +2 -0
  62. package/dist/components/icon/dist/Icon/CustomSvgIcon/CustomSvgIcon.js.map +1 -0
  63. package/dist/components/icon/dist/Icon/FontIcon/FontIcon.js +2 -0
  64. package/dist/components/icon/dist/Icon/FontIcon/FontIcon.js.map +1 -0
  65. package/dist/components/icon/dist/Icon/Icon.js +2 -0
  66. package/dist/components/icon/dist/Icon/Icon.js.map +1 -0
  67. package/dist/components/icon/dist/Icon/Icon.module.scss.js +2 -0
  68. package/dist/components/icon/dist/Icon/constants.js +2 -0
  69. package/dist/components/icon/dist/Icon/constants.js.map +1 -0
  70. package/dist/components/icon/dist/Icon/hooks/useIconProps.js +2 -0
  71. package/dist/components/icon/dist/Icon/hooks/useIconProps.js.map +1 -0
  72. package/dist/components/icon/dist/Icon/hooks/useIconScreenReaderAccessProps.js +2 -0
  73. package/dist/components/icon/dist/Icon/hooks/useIconScreenReaderAccessProps.js.map +1 -0
  74. package/dist/components/index.d.ts +3 -3
  75. package/dist/components/loader/dist/Loader/Loader.js +2 -0
  76. package/dist/components/loader/dist/Loader/Loader.js.map +1 -0
  77. package/dist/components/loader/dist/Loader/Loader.module.scss.js +2 -0
  78. package/dist/components/loader/dist/Loader/LoaderConstants.js.map +1 -0
  79. package/dist/components/next/AttentionBox/AttentionBox.types.d.ts +2 -2
  80. package/dist/components/next/AttentionBox/components/AttentionBoxButton/AttentionBoxButton.d.ts +1 -1
  81. package/dist/components/next/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.d.ts +1 -2
  82. package/dist/components/next/AttentionBox/consts/icons.d.ts +1 -1
  83. package/dist/components/next/AttentionBox/utils/iconUtils.d.ts +1 -1
  84. package/dist/metadata.json +119 -1012
  85. package/dist/mocked_classnames/components/AlertBanner/AlertBannerButton/AlertBannerButton.d.ts +1 -1
  86. package/dist/mocked_classnames/components/AttentionBox/AttentionBox.d.ts +3 -3
  87. package/dist/mocked_classnames/components/AttentionBox/AttentionBoxConstants.d.ts +8 -0
  88. package/dist/mocked_classnames/components/Avatar/Avatar.d.ts +2 -1
  89. package/dist/mocked_classnames/components/Avatar/AvatarBadge.d.ts +2 -1
  90. package/dist/mocked_classnames/components/Avatar/AvatarContent.d.ts +2 -1
  91. package/dist/mocked_classnames/components/BaseListItem/BaseListItem.types.d.ts +2 -1
  92. package/dist/mocked_classnames/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.d.ts +2 -1
  93. package/dist/mocked_classnames/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.d.ts +2 -1
  94. package/dist/mocked_classnames/components/ButtonGroup/ButtonGroup.d.ts +4 -4
  95. package/dist/mocked_classnames/components/ButtonGroup/ButtonGroupConstants.d.ts +8 -0
  96. package/dist/mocked_classnames/components/ButtonGroup/ButtonWrapper.d.ts +1 -1
  97. package/dist/mocked_classnames/components/Chips/Chips.d.ts +2 -1
  98. package/dist/mocked_classnames/components/ColorPicker/ColorPicker.d.ts +2 -1
  99. package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.d.ts +2 -1
  100. package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.d.ts +2 -1
  101. package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.d.ts +2 -1
  102. package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.d.ts +2 -1
  103. package/dist/mocked_classnames/components/Combobox/Combobox.d.ts +2 -1
  104. package/dist/mocked_classnames/components/Combobox/components/ComboboxConstants.d.ts +1 -1
  105. package/dist/mocked_classnames/components/EmptyState/EmptyState.types.d.ts +1 -1
  106. package/dist/mocked_classnames/components/IconButton/IconButton.d.ts +5 -4
  107. package/dist/mocked_classnames/components/LegacyModal/LegacyModalHeader/LegacyModalHeader.d.ts +2 -1
  108. package/dist/mocked_classnames/components/Link/Link.d.ts +2 -1
  109. package/dist/mocked_classnames/components/ListItemIcon/ListItemIcon.d.ts +2 -1
  110. package/dist/mocked_classnames/components/Menu/MenuItem/MenuItem.d.ts +3 -3
  111. package/dist/mocked_classnames/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.types.d.ts +1 -2
  112. package/dist/mocked_classnames/components/Menu/MenuItemButton/MenuItemButton.d.ts +4 -3
  113. package/dist/mocked_classnames/components/Modal/Modal/Modal.types.d.ts +6 -28
  114. package/dist/mocked_classnames/components/Modal/ModalHeader/ModalHeader.types.d.ts +2 -1
  115. package/dist/mocked_classnames/components/Modal/ModalTopActions/ModalTopActions.types.d.ts +1 -1
  116. package/dist/mocked_classnames/components/Modal/footers/ModalFooterBase/ModalFooterBase.types.d.ts +1 -1
  117. package/dist/mocked_classnames/components/Modal/footers/utils/getPropsForButton.d.ts +6 -6
  118. package/dist/mocked_classnames/components/MultiStepIndicator/MultiStepIndicator.d.ts +2 -1
  119. package/dist/mocked_classnames/components/MultiStepIndicator/components/StepIndicator/StepIndicator.d.ts +2 -1
  120. package/dist/mocked_classnames/components/NumberField/NumberField.types.d.ts +1 -1
  121. package/dist/mocked_classnames/components/Search/Search.types.d.ts +2 -1
  122. package/dist/mocked_classnames/components/Slider/Slider.d.ts +1 -1
  123. package/dist/mocked_classnames/components/Slider/SliderConstants.d.ts +1 -1
  124. package/dist/mocked_classnames/components/Slider/SliderContext.d.ts +1 -1
  125. package/dist/mocked_classnames/components/SplitButton/SplitButton.d.ts +4 -4
  126. package/dist/mocked_classnames/components/Steps/Steps.d.ts +1 -1
  127. package/dist/mocked_classnames/components/Steps/StepsCommand.d.ts +1 -1
  128. package/dist/mocked_classnames/components/Steps/StepsHeader.d.ts +1 -1
  129. package/dist/mocked_classnames/components/Table/Table/Table.d.ts +2 -1
  130. package/dist/mocked_classnames/components/Table/TableHeaderCell/TableHeaderCell.d.ts +2 -1
  131. package/dist/mocked_classnames/components/Tabs/Tab/Tab.d.ts +1 -2
  132. package/dist/mocked_classnames/components/Tipseen/TipseenContent.d.ts +1 -1
  133. package/dist/mocked_classnames/components/Toast/Toast.d.ts +1 -1
  134. package/dist/mocked_classnames/components/Toast/ToastButton/ToastButton.d.ts +1 -1
  135. package/dist/mocked_classnames/components/Toast/ToastHelpers.d.ts +1 -1
  136. package/dist/mocked_classnames/components/Tooltip/Tooltip.d.ts +1 -1
  137. package/dist/mocked_classnames/components/button/dist/Button/Button.js +2 -0
  138. package/dist/mocked_classnames/components/button/dist/Button/Button.js.map +1 -0
  139. package/dist/mocked_classnames/components/button/dist/Button/Button.module.scss.js +2 -0
  140. package/dist/mocked_classnames/components/button/dist/Button/ButtonConstants.js +2 -0
  141. package/dist/mocked_classnames/components/button/dist/Button/ButtonConstants.js.map +1 -0
  142. package/dist/mocked_classnames/components/button/dist/Button/helper/dom-helpers.js.map +1 -0
  143. package/dist/mocked_classnames/components/button/dist/Button/helper/useButtonLoading.js +2 -0
  144. package/dist/mocked_classnames/components/button/dist/Button/helper/useButtonLoading.js.map +1 -0
  145. package/dist/mocked_classnames/components/icon/dist/Icon/CustomSvgIcon/CustomSvgIcon.js +2 -0
  146. package/dist/mocked_classnames/components/icon/dist/Icon/CustomSvgIcon/CustomSvgIcon.js.map +1 -0
  147. package/dist/mocked_classnames/components/icon/dist/Icon/FontIcon/FontIcon.js +2 -0
  148. package/dist/mocked_classnames/components/icon/dist/Icon/FontIcon/FontIcon.js.map +1 -0
  149. package/dist/mocked_classnames/components/icon/dist/Icon/Icon.js +2 -0
  150. package/dist/mocked_classnames/components/icon/dist/Icon/Icon.js.map +1 -0
  151. package/dist/mocked_classnames/components/icon/dist/Icon/Icon.module.scss.js +2 -0
  152. package/dist/mocked_classnames/components/icon/dist/Icon/constants.js +2 -0
  153. package/dist/mocked_classnames/components/icon/dist/Icon/constants.js.map +1 -0
  154. package/dist/mocked_classnames/components/icon/dist/Icon/hooks/useIconProps.js +2 -0
  155. package/dist/mocked_classnames/components/icon/dist/Icon/hooks/useIconProps.js.map +1 -0
  156. package/dist/mocked_classnames/components/icon/dist/Icon/hooks/useIconScreenReaderAccessProps.js +2 -0
  157. package/dist/mocked_classnames/components/icon/dist/Icon/hooks/useIconScreenReaderAccessProps.js.map +1 -0
  158. package/dist/mocked_classnames/components/index.d.ts +3 -3
  159. package/dist/mocked_classnames/components/loader/dist/Loader/Loader.js +2 -0
  160. package/dist/mocked_classnames/components/loader/dist/Loader/Loader.js.map +1 -0
  161. package/dist/mocked_classnames/components/loader/dist/Loader/Loader.module.scss.js +2 -0
  162. package/dist/mocked_classnames/components/loader/dist/Loader/LoaderConstants.js.map +1 -0
  163. package/dist/mocked_classnames/components/next/AttentionBox/AttentionBox.types.d.ts +2 -2
  164. package/dist/mocked_classnames/components/next/AttentionBox/components/AttentionBoxButton/AttentionBoxButton.d.ts +1 -1
  165. package/dist/mocked_classnames/components/next/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.d.ts +1 -2
  166. package/dist/mocked_classnames/components/next/AttentionBox/consts/icons.d.ts +1 -1
  167. package/dist/mocked_classnames/components/next/AttentionBox/utils/iconUtils.d.ts +1 -1
  168. package/dist/mocked_classnames/packages/icons/dist/_virtual/_tslib.js.map +1 -0
  169. package/dist/mocked_classnames/packages/icons/dist/react/AddSmall.js.map +1 -0
  170. package/dist/mocked_classnames/packages/icons/dist/react/Alert.js.map +1 -0
  171. package/dist/mocked_classnames/packages/icons/dist/react/Check.js.map +1 -0
  172. package/dist/mocked_classnames/packages/icons/dist/react/CloseMedium.js.map +1 -0
  173. package/dist/mocked_classnames/packages/icons/dist/react/CloseSmall.js.map +1 -0
  174. package/dist/mocked_classnames/packages/icons/dist/react/DropdownChevronDown.js.map +1 -0
  175. package/dist/mocked_classnames/packages/icons/dist/react/DropdownChevronRight.js.map +1 -0
  176. package/dist/mocked_classnames/packages/icons/dist/react/DropdownChevronUp.js.map +1 -0
  177. package/dist/mocked_classnames/packages/icons/dist/react/Favorite.js.map +1 -0
  178. package/dist/mocked_classnames/packages/icons/dist/react/Info.js.map +1 -0
  179. package/dist/mocked_classnames/packages/icons/dist/react/Menu.js.map +1 -0
  180. package/dist/mocked_classnames/packages/icons/dist/react/MoveArrowLeft.js.map +1 -0
  181. package/dist/mocked_classnames/packages/icons/dist/react/MoveArrowRight.js.map +1 -0
  182. package/dist/mocked_classnames/packages/icons/dist/react/NavigationChevronLeft.js.map +1 -0
  183. package/dist/mocked_classnames/packages/icons/dist/react/NavigationChevronRight.js.map +1 -0
  184. package/dist/mocked_classnames/packages/icons/dist/react/NoColor.js.map +1 -0
  185. package/dist/mocked_classnames/packages/icons/dist/react/Remove.js.map +1 -0
  186. package/dist/mocked_classnames/packages/icons/dist/react/Search.js.map +1 -0
  187. package/dist/mocked_classnames/packages/icons/dist/react/Sort.js.map +1 -0
  188. package/dist/mocked_classnames/packages/icons/dist/react/SortAscending.js.map +1 -0
  189. package/dist/mocked_classnames/packages/icons/dist/react/SortDescending.js.map +1 -0
  190. package/dist/mocked_classnames/packages/icons/dist/react/Warning.js.map +1 -0
  191. package/dist/mocked_classnames/packages/shared/dist/constants/keyCodes.js +2 -0
  192. package/dist/mocked_classnames/packages/shared/dist/constants/keyCodes.js.map +1 -0
  193. package/dist/mocked_classnames/packages/shared/dist/constants/sizes.js +2 -0
  194. package/dist/mocked_classnames/packages/shared/dist/constants/sizes.js.map +1 -0
  195. package/dist/mocked_classnames/packages/shared/dist/hooks/ssr/useIsMounted.js +2 -0
  196. package/dist/mocked_classnames/packages/shared/dist/hooks/ssr/useIsMounted.js.map +1 -0
  197. package/dist/mocked_classnames/packages/shared/dist/hooks/ssr/useIsomorphicLayoutEffect.js +2 -0
  198. package/dist/mocked_classnames/packages/shared/dist/hooks/ssr/useIsomorphicLayoutEffect.js.map +1 -0
  199. package/dist/mocked_classnames/packages/shared/dist/hooks/useEventListener.js +2 -0
  200. package/dist/mocked_classnames/packages/shared/dist/hooks/useEventListener.js.map +1 -0
  201. package/dist/mocked_classnames/packages/shared/dist/hooks/useKeyEvent.js +2 -0
  202. package/dist/mocked_classnames/packages/shared/dist/hooks/useKeyEvent.js.map +1 -0
  203. package/dist/mocked_classnames/packages/shared/dist/hooks/useMergeRef.js +2 -0
  204. package/dist/mocked_classnames/packages/shared/dist/hooks/useMergeRef.js.map +1 -0
  205. package/dist/mocked_classnames/packages/shared/dist/tests/constants.js +2 -0
  206. package/dist/mocked_classnames/packages/shared/dist/tests/constants.js.map +1 -0
  207. package/dist/mocked_classnames/packages/shared/dist/tests/test-ids-utils.js +2 -0
  208. package/dist/mocked_classnames/packages/shared/dist/tests/test-ids-utils.js.map +1 -0
  209. package/dist/mocked_classnames/packages/shared/dist/types/withStaticProps.js +2 -0
  210. package/dist/mocked_classnames/packages/shared/dist/types/withStaticProps.js.map +1 -0
  211. package/dist/mocked_classnames/packages/shared/dist/utils/function-utils.js +2 -0
  212. package/dist/mocked_classnames/packages/shared/dist/utils/function-utils.js.map +1 -0
  213. package/dist/mocked_classnames/packages/shared/dist/utils/screenReaderAccessHelper.js +2 -0
  214. package/dist/mocked_classnames/packages/shared/dist/utils/screenReaderAccessHelper.js.map +1 -0
  215. package/dist/mocked_classnames/packages/shared/dist/utils/ssr-utils.js +2 -0
  216. package/dist/mocked_classnames/packages/shared/dist/utils/ssr-utils.js.map +1 -0
  217. package/dist/mocked_classnames/packages/shared/dist/utils/typesciptCssModulesHelper.js +2 -0
  218. package/dist/mocked_classnames/packages/shared/dist/utils/typesciptCssModulesHelper.js.map +1 -0
  219. package/dist/mocked_classnames/src/components/AlertBanner/AlertBanner.js +1 -1
  220. package/dist/mocked_classnames/src/components/AlertBanner/AlertBanner.js.map +1 -1
  221. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.js +1 -1
  222. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.js.map +1 -1
  223. package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.js +1 -1
  224. package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.js.map +1 -1
  225. package/dist/mocked_classnames/src/components/AttentionBox/AttentionBoxConstants.js +1 -1
  226. package/dist/mocked_classnames/src/components/AttentionBox/AttentionBoxConstants.js.map +1 -1
  227. package/dist/mocked_classnames/src/components/Avatar/Avatar.js.map +1 -1
  228. package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.js +1 -1
  229. package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.js.map +1 -1
  230. package/dist/mocked_classnames/src/components/Avatar/AvatarContent.js +1 -1
  231. package/dist/mocked_classnames/src/components/Avatar/AvatarContent.js.map +1 -1
  232. package/dist/mocked_classnames/src/components/BaseListItem/utils.js +1 -1
  233. package/dist/mocked_classnames/src/components/BaseListItem/utils.js.map +1 -1
  234. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.js.map +1 -1
  235. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.js.map +1 -1
  236. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbsBar.js +1 -1
  237. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbsBar.js.map +1 -1
  238. package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.js +1 -1
  239. package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.js.map +1 -1
  240. package/dist/mocked_classnames/src/components/ButtonGroup/ButtonWrapper.js +1 -1
  241. package/dist/mocked_classnames/src/components/ButtonGroup/ButtonWrapper.js.map +1 -1
  242. package/dist/mocked_classnames/src/components/Checkbox/Checkbox.js +1 -1
  243. package/dist/mocked_classnames/src/components/Checkbox/Checkbox.js.map +1 -1
  244. package/dist/mocked_classnames/src/components/Chips/Chips.js +1 -1
  245. package/dist/mocked_classnames/src/components/Chips/Chips.js.map +1 -1
  246. package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.js +1 -1
  247. package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.js.map +1 -1
  248. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js +1 -1
  249. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js.map +1 -1
  250. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.js.map +1 -1
  251. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js +1 -1
  252. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +1 -1
  253. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js +1 -1
  254. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js.map +1 -1
  255. package/dist/mocked_classnames/src/components/Combobox/Combobox.js +1 -1
  256. package/dist/mocked_classnames/src/components/Combobox/Combobox.js.map +1 -1
  257. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxConstants.js.map +1 -1
  258. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxOption/ComboboxOption.js +1 -1
  259. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxOption/ComboboxOption.js.map +1 -1
  260. package/dist/mocked_classnames/src/components/DatePicker/DateNavigationItem/DateNavigationItem.js +1 -1
  261. package/dist/mocked_classnames/src/components/DatePicker/DateNavigationItem/DateNavigationItem.js.map +1 -1
  262. package/dist/mocked_classnames/src/components/DatePicker/DatePickerHeader/DatePickerHeader.js +1 -1
  263. package/dist/mocked_classnames/src/components/DatePicker/DatePickerHeader/DatePickerHeader.js.map +1 -1
  264. package/dist/mocked_classnames/src/components/DatePicker/YearPicker/YearsList.js +1 -1
  265. package/dist/mocked_classnames/src/components/DatePicker/YearPicker/YearsList.js.map +1 -1
  266. package/dist/mocked_classnames/src/components/Dialog/DialogContent/DialogContent.js +1 -1
  267. package/dist/mocked_classnames/src/components/Dialog/DialogContent/DialogContent.js.map +1 -1
  268. package/dist/mocked_classnames/src/components/Dropdown/components/ChildrenContent/ChildrenContent.js +1 -1
  269. package/dist/mocked_classnames/src/components/Dropdown/components/ChildrenContent/ChildrenContent.js.map +1 -1
  270. package/dist/mocked_classnames/src/components/Dropdown/components/ClearIndicator/ClearIndicator.js +1 -1
  271. package/dist/mocked_classnames/src/components/Dropdown/components/ClearIndicator/ClearIndicator.js.map +1 -1
  272. package/dist/mocked_classnames/src/components/Dropdown/components/DropdownIndicator/DropdownIndicator.js +1 -1
  273. package/dist/mocked_classnames/src/components/Dropdown/components/DropdownIndicator/DropdownIndicator.js.map +1 -1
  274. package/dist/mocked_classnames/src/components/EmptyState/EmptyState.js +1 -1
  275. package/dist/mocked_classnames/src/components/EmptyState/EmptyState.js.map +1 -1
  276. package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.js +1 -1
  277. package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.js.map +1 -1
  278. package/dist/mocked_classnames/src/components/FieldLabel/FieldLabel.js +1 -1
  279. package/dist/mocked_classnames/src/components/FieldLabel/FieldLabel.js.map +1 -1
  280. package/dist/mocked_classnames/src/components/IconButton/IconButton.js +1 -1
  281. package/dist/mocked_classnames/src/components/IconButton/IconButton.js.map +1 -1
  282. package/dist/mocked_classnames/src/components/Info/Info.js +1 -1
  283. package/dist/mocked_classnames/src/components/Info/Info.js.map +1 -1
  284. package/dist/mocked_classnames/src/components/LegacyModal/LegacyModalFooter/LegacyModalFooterButtons/LegacyModalFooterButtons.js +1 -1
  285. package/dist/mocked_classnames/src/components/LegacyModal/LegacyModalFooter/LegacyModalFooterButtons/LegacyModalFooterButtons.js.map +1 -1
  286. package/dist/mocked_classnames/src/components/LegacyModal/LegacyModalHeader/LegacyModalHeader.js +1 -1
  287. package/dist/mocked_classnames/src/components/LegacyModal/LegacyModalHeader/LegacyModalHeader.js.map +1 -1
  288. package/dist/mocked_classnames/src/components/Link/Link.js +1 -1
  289. package/dist/mocked_classnames/src/components/Link/Link.js.map +1 -1
  290. package/dist/mocked_classnames/src/components/ListItemIcon/ListItemIcon.js +1 -1
  291. package/dist/mocked_classnames/src/components/ListItemIcon/ListItemIcon.js.map +1 -1
  292. package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.js +1 -1
  293. package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.js.map +1 -1
  294. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.js +1 -1
  295. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.js.map +1 -1
  296. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.js +1 -1
  297. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.js.map +1 -1
  298. package/dist/mocked_classnames/src/components/Menu/MenuItemButton/MenuItemButton.js +1 -1
  299. package/dist/mocked_classnames/src/components/Menu/MenuItemButton/MenuItemButton.js.map +1 -1
  300. package/dist/mocked_classnames/src/components/MenuButton/MenuButton.js +1 -1
  301. package/dist/mocked_classnames/src/components/MenuButton/MenuButton.js.map +1 -1
  302. package/dist/mocked_classnames/src/components/Modal/Modal/Modal.js +1 -1
  303. package/dist/mocked_classnames/src/components/Modal/Modal/Modal.js.map +1 -1
  304. package/dist/mocked_classnames/src/components/Modal/ModalHeader/ModalHeader.js +1 -1
  305. package/dist/mocked_classnames/src/components/Modal/ModalHeader/ModalHeader.js.map +1 -1
  306. package/dist/mocked_classnames/src/components/Modal/ModalTopActions/ModalTopActions.js +1 -1
  307. package/dist/mocked_classnames/src/components/Modal/ModalTopActions/ModalTopActions.js.map +1 -1
  308. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.js +1 -1
  309. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.js.map +1 -1
  310. package/dist/mocked_classnames/src/components/MultiStepIndicator/MultiStepIndicator.js +1 -1
  311. package/dist/mocked_classnames/src/components/MultiStepIndicator/MultiStepIndicator.js.map +1 -1
  312. package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js +1 -1
  313. package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js.map +1 -1
  314. package/dist/mocked_classnames/src/components/NumberField/NumberField.js +1 -1
  315. package/dist/mocked_classnames/src/components/NumberField/NumberField.js.map +1 -1
  316. package/dist/mocked_classnames/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.js +1 -1
  317. package/dist/mocked_classnames/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.js.map +1 -1
  318. package/dist/mocked_classnames/src/components/Search/Search.js +1 -1
  319. package/dist/mocked_classnames/src/components/Search/Search.js.map +1 -1
  320. package/dist/mocked_classnames/src/components/Slider/Slider.js.map +1 -1
  321. package/dist/mocked_classnames/src/components/Slider/SliderConstants.js.map +1 -1
  322. package/dist/mocked_classnames/src/components/Slider/SliderContext.js.map +1 -1
  323. package/dist/mocked_classnames/src/components/Slider/SliderInfixHooks.js +1 -1
  324. package/dist/mocked_classnames/src/components/Slider/SliderInfixHooks.js.map +1 -1
  325. package/dist/mocked_classnames/src/components/SplitButton/SplitButton.js +1 -1
  326. package/dist/mocked_classnames/src/components/SplitButton/SplitButton.js.map +1 -1
  327. package/dist/mocked_classnames/src/components/Steps/Steps.js.map +1 -1
  328. package/dist/mocked_classnames/src/components/Steps/StepsCommand.js +1 -1
  329. package/dist/mocked_classnames/src/components/Steps/StepsCommand.js.map +1 -1
  330. package/dist/mocked_classnames/src/components/Steps/StepsHeader.js +1 -1
  331. package/dist/mocked_classnames/src/components/Steps/StepsHeader.js.map +1 -1
  332. package/dist/mocked_classnames/src/components/Table/Table/Table.js.map +1 -1
  333. package/dist/mocked_classnames/src/components/Table/Table/tableHelpers.js +1 -1
  334. package/dist/mocked_classnames/src/components/Table/Table/tableHelpers.js.map +1 -1
  335. package/dist/mocked_classnames/src/components/Table/TableHeaderCell/TableHeaderCell.js +1 -1
  336. package/dist/mocked_classnames/src/components/Table/TableHeaderCell/TableHeaderCell.js.map +1 -1
  337. package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.js +1 -1
  338. package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.js.map +1 -1
  339. package/dist/mocked_classnames/src/components/TextField/TextField.js +1 -1
  340. package/dist/mocked_classnames/src/components/TextField/TextField.js.map +1 -1
  341. package/dist/mocked_classnames/src/components/Tipseen/Tipseen.js +1 -1
  342. package/dist/mocked_classnames/src/components/Tipseen/Tipseen.js.map +1 -1
  343. package/dist/mocked_classnames/src/components/Tipseen/TipseenContent.js +1 -1
  344. package/dist/mocked_classnames/src/components/Tipseen/TipseenContent.js.map +1 -1
  345. package/dist/mocked_classnames/src/components/Tipseen/TipseenWizard.js.map +1 -1
  346. package/dist/mocked_classnames/src/components/Toast/Toast.js +1 -1
  347. package/dist/mocked_classnames/src/components/Toast/Toast.js.map +1 -1
  348. package/dist/mocked_classnames/src/components/Toast/ToastButton/ToastButton.js +1 -1
  349. package/dist/mocked_classnames/src/components/Toast/ToastButton/ToastButton.js.map +1 -1
  350. package/dist/mocked_classnames/src/components/Toast/ToastConstants.js +1 -1
  351. package/dist/mocked_classnames/src/components/Toast/ToastConstants.js.map +1 -1
  352. package/dist/mocked_classnames/src/components/Toast/ToastHelpers.js +1 -1
  353. package/dist/mocked_classnames/src/components/Toast/ToastHelpers.js.map +1 -1
  354. package/dist/mocked_classnames/src/components/Tooltip/Tooltip.js +1 -1
  355. package/dist/mocked_classnames/src/components/Tooltip/Tooltip.js.map +1 -1
  356. package/dist/mocked_classnames/src/components/next/AttentionBox/components/AttentionBoxButton/AttentionBoxButton.js +1 -1
  357. package/dist/mocked_classnames/src/components/next/AttentionBox/components/AttentionBoxButton/AttentionBoxButton.js.map +1 -1
  358. package/dist/mocked_classnames/src/components/next/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.js +1 -1
  359. package/dist/mocked_classnames/src/components/next/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.js.map +1 -1
  360. package/dist/mocked_classnames/src/components/next/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.js +1 -1
  361. package/dist/mocked_classnames/src/components/next/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.js.map +1 -1
  362. package/dist/mocked_classnames/src/components/next/AttentionBox/consts/icons.js +1 -1
  363. package/dist/mocked_classnames/src/components/next/AttentionBox/consts/icons.js.map +1 -1
  364. package/dist/mocked_classnames/src/components/next/AttentionBox/utils/iconUtils.js.map +1 -1
  365. package/dist/mocked_classnames/src/components/next/Dropdown/components/Trigger/TriggerActions.js +1 -1
  366. package/dist/mocked_classnames/src/components/next/Dropdown/components/Trigger/TriggerActions.js.map +1 -1
  367. package/dist/mocked_classnames/src/index.js +1 -1
  368. package/dist/mocked_classnames/types/index.d.ts +0 -1
  369. package/dist/packages/shared/dist/constants/keyCodes.js +2 -0
  370. package/dist/packages/shared/dist/constants/keyCodes.js.map +1 -0
  371. package/dist/packages/shared/dist/constants/sizes.js +2 -0
  372. package/dist/packages/shared/dist/constants/sizes.js.map +1 -0
  373. package/dist/packages/shared/dist/hooks/ssr/useIsMounted.js +2 -0
  374. package/dist/packages/shared/dist/hooks/ssr/useIsMounted.js.map +1 -0
  375. package/dist/packages/shared/dist/hooks/ssr/useIsomorphicLayoutEffect.js +2 -0
  376. package/dist/packages/shared/dist/hooks/ssr/useIsomorphicLayoutEffect.js.map +1 -0
  377. package/dist/packages/shared/dist/hooks/useEventListener.js +2 -0
  378. package/dist/packages/shared/dist/hooks/useEventListener.js.map +1 -0
  379. package/dist/packages/shared/dist/hooks/useKeyEvent.js +2 -0
  380. package/dist/packages/shared/dist/hooks/useKeyEvent.js.map +1 -0
  381. package/dist/packages/shared/dist/hooks/useMergeRef.js +2 -0
  382. package/dist/packages/shared/dist/hooks/useMergeRef.js.map +1 -0
  383. package/dist/packages/shared/dist/tests/constants.js +2 -0
  384. package/dist/packages/shared/dist/tests/constants.js.map +1 -0
  385. package/dist/packages/shared/dist/tests/test-ids-utils.js +2 -0
  386. package/dist/packages/shared/dist/tests/test-ids-utils.js.map +1 -0
  387. package/dist/packages/shared/dist/types/withStaticProps.js +2 -0
  388. package/dist/packages/shared/dist/types/withStaticProps.js.map +1 -0
  389. package/dist/packages/shared/dist/utils/function-utils.js +2 -0
  390. package/dist/packages/shared/dist/utils/function-utils.js.map +1 -0
  391. package/dist/packages/shared/dist/utils/screenReaderAccessHelper.js +2 -0
  392. package/dist/packages/shared/dist/utils/screenReaderAccessHelper.js.map +1 -0
  393. package/dist/packages/shared/dist/utils/ssr-utils.js +2 -0
  394. package/dist/packages/shared/dist/utils/ssr-utils.js.map +1 -0
  395. package/dist/packages/shared/dist/utils/typesciptCssModulesHelper.js +2 -0
  396. package/dist/packages/shared/dist/utils/typesciptCssModulesHelper.js.map +1 -0
  397. package/dist/src/components/AlertBanner/AlertBanner.js +1 -1
  398. package/dist/src/components/AlertBanner/AlertBanner.js.map +1 -1
  399. package/dist/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.js +1 -1
  400. package/dist/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.js.map +1 -1
  401. package/dist/src/components/AttentionBox/AttentionBox.js +1 -1
  402. package/dist/src/components/AttentionBox/AttentionBox.js.map +1 -1
  403. package/dist/src/components/AttentionBox/AttentionBoxConstants.js +1 -1
  404. package/dist/src/components/AttentionBox/AttentionBoxConstants.js.map +1 -1
  405. package/dist/src/components/Avatar/Avatar.js.map +1 -1
  406. package/dist/src/components/Avatar/AvatarBadge.js +1 -1
  407. package/dist/src/components/Avatar/AvatarBadge.js.map +1 -1
  408. package/dist/src/components/Avatar/AvatarContent.js +1 -1
  409. package/dist/src/components/Avatar/AvatarContent.js.map +1 -1
  410. package/dist/src/components/BaseListItem/utils.js +1 -1
  411. package/dist/src/components/BaseListItem/utils.js.map +1 -1
  412. package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.js.map +1 -1
  413. package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.js.map +1 -1
  414. package/dist/src/components/BreadcrumbsBar/BreadcrumbsBar.js +1 -1
  415. package/dist/src/components/BreadcrumbsBar/BreadcrumbsBar.js.map +1 -1
  416. package/dist/src/components/ButtonGroup/ButtonGroup.js +1 -1
  417. package/dist/src/components/ButtonGroup/ButtonGroup.js.map +1 -1
  418. package/dist/src/components/ButtonGroup/ButtonWrapper.js +1 -1
  419. package/dist/src/components/ButtonGroup/ButtonWrapper.js.map +1 -1
  420. package/dist/src/components/Checkbox/Checkbox.js +1 -1
  421. package/dist/src/components/Checkbox/Checkbox.js.map +1 -1
  422. package/dist/src/components/Chips/Chips.js +1 -1
  423. package/dist/src/components/Chips/Chips.js.map +1 -1
  424. package/dist/src/components/ColorPicker/ColorPicker.js +1 -1
  425. package/dist/src/components/ColorPicker/ColorPicker.js.map +1 -1
  426. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js +1 -1
  427. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js.map +1 -1
  428. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.js.map +1 -1
  429. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js +1 -1
  430. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +1 -1
  431. package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js +1 -1
  432. package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js.map +1 -1
  433. package/dist/src/components/Combobox/Combobox.js +1 -1
  434. package/dist/src/components/Combobox/Combobox.js.map +1 -1
  435. package/dist/src/components/Combobox/components/ComboboxConstants.js.map +1 -1
  436. package/dist/src/components/Combobox/components/ComboboxOption/ComboboxOption.js +1 -1
  437. package/dist/src/components/Combobox/components/ComboboxOption/ComboboxOption.js.map +1 -1
  438. package/dist/src/components/DatePicker/DateNavigationItem/DateNavigationItem.js +1 -1
  439. package/dist/src/components/DatePicker/DateNavigationItem/DateNavigationItem.js.map +1 -1
  440. package/dist/src/components/DatePicker/DatePickerHeader/DatePickerHeader.js +1 -1
  441. package/dist/src/components/DatePicker/DatePickerHeader/DatePickerHeader.js.map +1 -1
  442. package/dist/src/components/DatePicker/YearPicker/YearsList.js +1 -1
  443. package/dist/src/components/DatePicker/YearPicker/YearsList.js.map +1 -1
  444. package/dist/src/components/Dialog/DialogContent/DialogContent.js +1 -1
  445. package/dist/src/components/Dialog/DialogContent/DialogContent.js.map +1 -1
  446. package/dist/src/components/Dropdown/components/ChildrenContent/ChildrenContent.js +1 -1
  447. package/dist/src/components/Dropdown/components/ChildrenContent/ChildrenContent.js.map +1 -1
  448. package/dist/src/components/Dropdown/components/ClearIndicator/ClearIndicator.js +1 -1
  449. package/dist/src/components/Dropdown/components/ClearIndicator/ClearIndicator.js.map +1 -1
  450. package/dist/src/components/Dropdown/components/DropdownIndicator/DropdownIndicator.js +1 -1
  451. package/dist/src/components/Dropdown/components/DropdownIndicator/DropdownIndicator.js.map +1 -1
  452. package/dist/src/components/EmptyState/EmptyState.js +1 -1
  453. package/dist/src/components/EmptyState/EmptyState.js.map +1 -1
  454. package/dist/src/components/ExpandCollapse/ExpandCollapse.js +1 -1
  455. package/dist/src/components/ExpandCollapse/ExpandCollapse.js.map +1 -1
  456. package/dist/src/components/FieldLabel/FieldLabel.js +1 -1
  457. package/dist/src/components/FieldLabel/FieldLabel.js.map +1 -1
  458. package/dist/src/components/IconButton/IconButton.js +1 -1
  459. package/dist/src/components/IconButton/IconButton.js.map +1 -1
  460. package/dist/src/components/Info/Info.js +1 -1
  461. package/dist/src/components/Info/Info.js.map +1 -1
  462. package/dist/src/components/LegacyModal/LegacyModalFooter/LegacyModalFooterButtons/LegacyModalFooterButtons.js +1 -1
  463. package/dist/src/components/LegacyModal/LegacyModalFooter/LegacyModalFooterButtons/LegacyModalFooterButtons.js.map +1 -1
  464. package/dist/src/components/LegacyModal/LegacyModalHeader/LegacyModalHeader.js +1 -1
  465. package/dist/src/components/LegacyModal/LegacyModalHeader/LegacyModalHeader.js.map +1 -1
  466. package/dist/src/components/Link/Link.js +1 -1
  467. package/dist/src/components/Link/Link.js.map +1 -1
  468. package/dist/src/components/ListItemIcon/ListItemIcon.js +1 -1
  469. package/dist/src/components/ListItemIcon/ListItemIcon.js.map +1 -1
  470. package/dist/src/components/Menu/MenuItem/MenuItem.js +1 -1
  471. package/dist/src/components/Menu/MenuItem/MenuItem.js.map +1 -1
  472. package/dist/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.js +1 -1
  473. package/dist/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.js.map +1 -1
  474. package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.js +1 -1
  475. package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.js.map +1 -1
  476. package/dist/src/components/Menu/MenuItemButton/MenuItemButton.js +1 -1
  477. package/dist/src/components/Menu/MenuItemButton/MenuItemButton.js.map +1 -1
  478. package/dist/src/components/MenuButton/MenuButton.js +1 -1
  479. package/dist/src/components/MenuButton/MenuButton.js.map +1 -1
  480. package/dist/src/components/Modal/Modal/Modal.js +1 -1
  481. package/dist/src/components/Modal/Modal/Modal.js.map +1 -1
  482. package/dist/src/components/Modal/ModalHeader/ModalHeader.js +1 -1
  483. package/dist/src/components/Modal/ModalHeader/ModalHeader.js.map +1 -1
  484. package/dist/src/components/Modal/ModalTopActions/ModalTopActions.js +1 -1
  485. package/dist/src/components/Modal/ModalTopActions/ModalTopActions.js.map +1 -1
  486. package/dist/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.js +1 -1
  487. package/dist/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.js.map +1 -1
  488. package/dist/src/components/MultiStepIndicator/MultiStepIndicator.js +1 -1
  489. package/dist/src/components/MultiStepIndicator/MultiStepIndicator.js.map +1 -1
  490. package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js +1 -1
  491. package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js.map +1 -1
  492. package/dist/src/components/NumberField/NumberField.js +1 -1
  493. package/dist/src/components/NumberField/NumberField.js.map +1 -1
  494. package/dist/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.js +1 -1
  495. package/dist/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.js.map +1 -1
  496. package/dist/src/components/Search/Search.js +1 -1
  497. package/dist/src/components/Search/Search.js.map +1 -1
  498. package/dist/src/components/Slider/Slider.js.map +1 -1
  499. package/dist/src/components/Slider/SliderConstants.js.map +1 -1
  500. package/dist/src/components/Slider/SliderContext.js.map +1 -1
  501. package/dist/src/components/Slider/SliderInfixHooks.js +1 -1
  502. package/dist/src/components/Slider/SliderInfixHooks.js.map +1 -1
  503. package/dist/src/components/SplitButton/SplitButton.js +1 -1
  504. package/dist/src/components/SplitButton/SplitButton.js.map +1 -1
  505. package/dist/src/components/Steps/Steps.js.map +1 -1
  506. package/dist/src/components/Steps/StepsCommand.js +1 -1
  507. package/dist/src/components/Steps/StepsCommand.js.map +1 -1
  508. package/dist/src/components/Steps/StepsHeader.js +1 -1
  509. package/dist/src/components/Steps/StepsHeader.js.map +1 -1
  510. package/dist/src/components/Table/Table/Table.js.map +1 -1
  511. package/dist/src/components/Table/Table/tableHelpers.js +1 -1
  512. package/dist/src/components/Table/Table/tableHelpers.js.map +1 -1
  513. package/dist/src/components/Table/TableHeaderCell/TableHeaderCell.js +1 -1
  514. package/dist/src/components/Table/TableHeaderCell/TableHeaderCell.js.map +1 -1
  515. package/dist/src/components/Tabs/Tab/Tab.js +1 -1
  516. package/dist/src/components/Tabs/Tab/Tab.js.map +1 -1
  517. package/dist/src/components/TextField/TextField.js +1 -1
  518. package/dist/src/components/TextField/TextField.js.map +1 -1
  519. package/dist/src/components/Tipseen/Tipseen.js +1 -1
  520. package/dist/src/components/Tipseen/Tipseen.js.map +1 -1
  521. package/dist/src/components/Tipseen/TipseenContent.js +1 -1
  522. package/dist/src/components/Tipseen/TipseenContent.js.map +1 -1
  523. package/dist/src/components/Tipseen/TipseenWizard.js.map +1 -1
  524. package/dist/src/components/Toast/Toast.js +1 -1
  525. package/dist/src/components/Toast/Toast.js.map +1 -1
  526. package/dist/src/components/Toast/ToastButton/ToastButton.js +1 -1
  527. package/dist/src/components/Toast/ToastButton/ToastButton.js.map +1 -1
  528. package/dist/src/components/Toast/ToastConstants.js +1 -1
  529. package/dist/src/components/Toast/ToastConstants.js.map +1 -1
  530. package/dist/src/components/Toast/ToastHelpers.js +1 -1
  531. package/dist/src/components/Toast/ToastHelpers.js.map +1 -1
  532. package/dist/src/components/Tooltip/Tooltip.js +1 -1
  533. package/dist/src/components/Tooltip/Tooltip.js.map +1 -1
  534. package/dist/src/components/next/AttentionBox/components/AttentionBoxButton/AttentionBoxButton.js +1 -1
  535. package/dist/src/components/next/AttentionBox/components/AttentionBoxButton/AttentionBoxButton.js.map +1 -1
  536. package/dist/src/components/next/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.js +1 -1
  537. package/dist/src/components/next/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.js.map +1 -1
  538. package/dist/src/components/next/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.js +1 -1
  539. package/dist/src/components/next/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.js.map +1 -1
  540. package/dist/src/components/next/AttentionBox/consts/icons.js +1 -1
  541. package/dist/src/components/next/AttentionBox/consts/icons.js.map +1 -1
  542. package/dist/src/components/next/AttentionBox/utils/iconUtils.js.map +1 -1
  543. package/dist/src/components/next/Dropdown/components/Trigger/TriggerActions.js +1 -1
  544. package/dist/src/components/next/Dropdown/components/Trigger/TriggerActions.js.map +1 -1
  545. package/dist/src/index.js +1 -1
  546. package/dist/types/index.d.ts +0 -1
  547. package/package.json +8 -4
  548. package/dist/components/Button/Button.d.ts +0 -98
  549. package/dist/components/Button/Button.types.d.ts +0 -4
  550. package/dist/components/Button/ButtonConstants.d.ts +0 -37
  551. package/dist/components/Button/helper/useButtonLoading.d.ts +0 -5
  552. package/dist/components/Button/index.d.ts +0 -2
  553. package/dist/components/Icon/CustomSvgIcon/CustomSvgIcon.d.ts +0 -46
  554. package/dist/components/Icon/FontIcon/FontIcon.d.ts +0 -30
  555. package/dist/components/Icon/Icon.d.ts +0 -76
  556. package/dist/components/Icon/Icon.types.d.ts +0 -1
  557. package/dist/components/Icon/IconConstants.d.ts +0 -8
  558. package/dist/components/Icon/hooks/useIconProps.d.ts +0 -21
  559. package/dist/components/Icon/index.d.ts +0 -3
  560. package/dist/components/Loader/Loader.d.ts +0 -27
  561. package/dist/components/Loader/Loader.types.d.ts +0 -3
  562. package/dist/components/Loader/LoaderConstants.d.ts +0 -18
  563. package/dist/components/Loader/index.d.ts +0 -2
  564. package/dist/components/Modal/hooks/useFocusEscapeTargets/index.d.ts +0 -2
  565. package/dist/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.d.ts +0 -10
  566. package/dist/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.types.d.ts +0 -2
  567. package/dist/hooks/useIconScreenReaderAccessProps.d.ts +0 -10
  568. package/dist/icons/dist/_virtual/_tslib.js.map +0 -1
  569. package/dist/icons/dist/react/AddSmall.js.map +0 -1
  570. package/dist/icons/dist/react/Alert.js.map +0 -1
  571. package/dist/icons/dist/react/Check.js.map +0 -1
  572. package/dist/icons/dist/react/CloseMedium.js.map +0 -1
  573. package/dist/icons/dist/react/CloseSmall.js.map +0 -1
  574. package/dist/icons/dist/react/DropdownChevronDown.js.map +0 -1
  575. package/dist/icons/dist/react/DropdownChevronRight.js.map +0 -1
  576. package/dist/icons/dist/react/DropdownChevronUp.js.map +0 -1
  577. package/dist/icons/dist/react/Favorite.js.map +0 -1
  578. package/dist/icons/dist/react/Info.js.map +0 -1
  579. package/dist/icons/dist/react/Menu.js.map +0 -1
  580. package/dist/icons/dist/react/MoveArrowLeft.js.map +0 -1
  581. package/dist/icons/dist/react/MoveArrowRight.js.map +0 -1
  582. package/dist/icons/dist/react/NavigationChevronLeft.js.map +0 -1
  583. package/dist/icons/dist/react/NavigationChevronRight.js.map +0 -1
  584. package/dist/icons/dist/react/NoColor.js.map +0 -1
  585. package/dist/icons/dist/react/Remove.js.map +0 -1
  586. package/dist/icons/dist/react/Search.js.map +0 -1
  587. package/dist/icons/dist/react/Sort.js.map +0 -1
  588. package/dist/icons/dist/react/SortAscending.js.map +0 -1
  589. package/dist/icons/dist/react/SortDescending.js.map +0 -1
  590. package/dist/icons/dist/react/Warning.js.map +0 -1
  591. package/dist/mocked_classnames/components/Button/Button.d.ts +0 -98
  592. package/dist/mocked_classnames/components/Button/Button.types.d.ts +0 -4
  593. package/dist/mocked_classnames/components/Button/ButtonConstants.d.ts +0 -37
  594. package/dist/mocked_classnames/components/Button/helper/useButtonLoading.d.ts +0 -5
  595. package/dist/mocked_classnames/components/Button/index.d.ts +0 -2
  596. package/dist/mocked_classnames/components/Icon/CustomSvgIcon/CustomSvgIcon.d.ts +0 -46
  597. package/dist/mocked_classnames/components/Icon/FontIcon/FontIcon.d.ts +0 -30
  598. package/dist/mocked_classnames/components/Icon/Icon.d.ts +0 -76
  599. package/dist/mocked_classnames/components/Icon/Icon.types.d.ts +0 -1
  600. package/dist/mocked_classnames/components/Icon/IconConstants.d.ts +0 -8
  601. package/dist/mocked_classnames/components/Icon/hooks/useIconProps.d.ts +0 -21
  602. package/dist/mocked_classnames/components/Icon/index.d.ts +0 -3
  603. package/dist/mocked_classnames/components/Loader/Loader.d.ts +0 -27
  604. package/dist/mocked_classnames/components/Loader/Loader.types.d.ts +0 -3
  605. package/dist/mocked_classnames/components/Loader/LoaderConstants.d.ts +0 -18
  606. package/dist/mocked_classnames/components/Loader/index.d.ts +0 -2
  607. package/dist/mocked_classnames/components/Modal/hooks/useFocusEscapeTargets/index.d.ts +0 -2
  608. package/dist/mocked_classnames/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.d.ts +0 -10
  609. package/dist/mocked_classnames/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.types.d.ts +0 -2
  610. package/dist/mocked_classnames/hooks/useIconScreenReaderAccessProps.d.ts +0 -10
  611. package/dist/mocked_classnames/src/components/Button/Button.js +0 -2
  612. package/dist/mocked_classnames/src/components/Button/Button.js.map +0 -1
  613. package/dist/mocked_classnames/src/components/Button/Button.module.scss.js +0 -2
  614. package/dist/mocked_classnames/src/components/Button/ButtonConstants.js +0 -2
  615. package/dist/mocked_classnames/src/components/Button/ButtonConstants.js.map +0 -1
  616. package/dist/mocked_classnames/src/components/Button/helper/dom-helpers.js.map +0 -1
  617. package/dist/mocked_classnames/src/components/Button/helper/useButtonLoading.js +0 -2
  618. package/dist/mocked_classnames/src/components/Button/helper/useButtonLoading.js.map +0 -1
  619. package/dist/mocked_classnames/src/components/Icon/CustomSvgIcon/CustomSvgIcon.js +0 -2
  620. package/dist/mocked_classnames/src/components/Icon/CustomSvgIcon/CustomSvgIcon.js.map +0 -1
  621. package/dist/mocked_classnames/src/components/Icon/FontIcon/FontIcon.js +0 -2
  622. package/dist/mocked_classnames/src/components/Icon/FontIcon/FontIcon.js.map +0 -1
  623. package/dist/mocked_classnames/src/components/Icon/Icon.js +0 -2
  624. package/dist/mocked_classnames/src/components/Icon/Icon.js.map +0 -1
  625. package/dist/mocked_classnames/src/components/Icon/Icon.module.scss.js +0 -2
  626. package/dist/mocked_classnames/src/components/Icon/IconConstants.js +0 -2
  627. package/dist/mocked_classnames/src/components/Icon/IconConstants.js.map +0 -1
  628. package/dist/mocked_classnames/src/components/Icon/hooks/useIconProps.js +0 -2
  629. package/dist/mocked_classnames/src/components/Icon/hooks/useIconProps.js.map +0 -1
  630. package/dist/mocked_classnames/src/components/Loader/Loader.js +0 -2
  631. package/dist/mocked_classnames/src/components/Loader/Loader.js.map +0 -1
  632. package/dist/mocked_classnames/src/components/Loader/Loader.module.scss.js +0 -2
  633. package/dist/mocked_classnames/src/components/Loader/LoaderConstants.js.map +0 -1
  634. package/dist/mocked_classnames/src/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.js +0 -2
  635. package/dist/mocked_classnames/src/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.js.map +0 -1
  636. package/dist/mocked_classnames/src/helpers/screenReaderAccessHelper.js +0 -2
  637. package/dist/mocked_classnames/src/helpers/screenReaderAccessHelper.js.map +0 -1
  638. package/dist/mocked_classnames/src/hooks/ssr/useIsMounted.js +0 -2
  639. package/dist/mocked_classnames/src/hooks/ssr/useIsMounted.js.map +0 -1
  640. package/dist/mocked_classnames/src/hooks/useIconScreenReaderAccessProps.js +0 -2
  641. package/dist/mocked_classnames/src/hooks/useIconScreenReaderAccessProps.js.map +0 -1
  642. package/dist/mocked_classnames/types/SubIcon.d.ts +0 -3
  643. package/dist/src/components/Button/Button.js +0 -2
  644. package/dist/src/components/Button/Button.js.map +0 -1
  645. package/dist/src/components/Button/Button.module.scss.js +0 -2
  646. package/dist/src/components/Button/ButtonConstants.js +0 -2
  647. package/dist/src/components/Button/ButtonConstants.js.map +0 -1
  648. package/dist/src/components/Button/helper/dom-helpers.js.map +0 -1
  649. package/dist/src/components/Button/helper/useButtonLoading.js +0 -2
  650. package/dist/src/components/Button/helper/useButtonLoading.js.map +0 -1
  651. package/dist/src/components/Icon/CustomSvgIcon/CustomSvgIcon.js +0 -2
  652. package/dist/src/components/Icon/CustomSvgIcon/CustomSvgIcon.js.map +0 -1
  653. package/dist/src/components/Icon/FontIcon/FontIcon.js +0 -2
  654. package/dist/src/components/Icon/FontIcon/FontIcon.js.map +0 -1
  655. package/dist/src/components/Icon/Icon.js +0 -2
  656. package/dist/src/components/Icon/Icon.js.map +0 -1
  657. package/dist/src/components/Icon/Icon.module.scss.js +0 -2
  658. package/dist/src/components/Icon/IconConstants.js +0 -2
  659. package/dist/src/components/Icon/IconConstants.js.map +0 -1
  660. package/dist/src/components/Icon/hooks/useIconProps.js +0 -2
  661. package/dist/src/components/Icon/hooks/useIconProps.js.map +0 -1
  662. package/dist/src/components/Loader/Loader.js +0 -2
  663. package/dist/src/components/Loader/Loader.js.map +0 -1
  664. package/dist/src/components/Loader/Loader.module.scss.js +0 -2
  665. package/dist/src/components/Loader/LoaderConstants.js.map +0 -1
  666. package/dist/src/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.js +0 -2
  667. package/dist/src/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.js.map +0 -1
  668. package/dist/src/helpers/screenReaderAccessHelper.js +0 -2
  669. package/dist/src/helpers/screenReaderAccessHelper.js.map +0 -1
  670. package/dist/src/hooks/ssr/useIsMounted.js +0 -2
  671. package/dist/src/hooks/ssr/useIsMounted.js.map +0 -1
  672. package/dist/src/hooks/useIconScreenReaderAccessProps.js +0 -2
  673. package/dist/src/hooks/useIconScreenReaderAccessProps.js.map +0 -1
  674. package/dist/types/SubIcon.d.ts +0 -3
  675. /package/dist/{mocked_classnames/src/components → components/button/dist}/Button/Button.module.scss.js.map +0 -0
  676. /package/dist/{mocked_classnames/src/components → components/button/dist}/Button/helper/dom-helpers.js +0 -0
  677. /package/dist/{mocked_classnames/src/components → components/icon/dist}/Icon/Icon.module.scss.js.map +0 -0
  678. /package/dist/{mocked_classnames/src/components → components/loader/dist}/Loader/Loader.module.scss.js.map +0 -0
  679. /package/dist/{mocked_classnames/src/components → components/loader/dist}/Loader/LoaderConstants.js +0 -0
  680. /package/dist/{src/components → mocked_classnames/components/button/dist}/Button/Button.module.scss.js.map +0 -0
  681. /package/dist/{src/components → mocked_classnames/components/button/dist}/Button/helper/dom-helpers.js +0 -0
  682. /package/dist/{src/components → mocked_classnames/components/icon/dist}/Icon/Icon.module.scss.js.map +0 -0
  683. /package/dist/{src/components → mocked_classnames/components/loader/dist}/Loader/Loader.module.scss.js.map +0 -0
  684. /package/dist/{src/components → mocked_classnames/components/loader/dist}/Loader/LoaderConstants.js +0 -0
  685. /package/dist/{icons → mocked_classnames/packages/icons}/dist/_virtual/_tslib.js +0 -0
  686. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/AddSmall.js +0 -0
  687. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/Alert.js +0 -0
  688. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/Check.js +0 -0
  689. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/CloseMedium.js +0 -0
  690. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/CloseSmall.js +0 -0
  691. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/DropdownChevronDown.js +0 -0
  692. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/DropdownChevronRight.js +0 -0
  693. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/DropdownChevronUp.js +0 -0
  694. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/Favorite.js +0 -0
  695. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/Info.js +0 -0
  696. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/Menu.js +0 -0
  697. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/MoveArrowLeft.js +0 -0
  698. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/MoveArrowRight.js +0 -0
  699. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/NavigationChevronLeft.js +0 -0
  700. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/NavigationChevronRight.js +0 -0
  701. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/NoColor.js +0 -0
  702. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/Remove.js +0 -0
  703. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/Search.js +0 -0
  704. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/Sort.js +0 -0
  705. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/SortAscending.js +0 -0
  706. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/SortDescending.js +0 -0
  707. /package/dist/{icons → mocked_classnames/packages/icons}/dist/react/Warning.js +0 -0
  708. /package/dist/mocked_classnames/{style → packages/style}/dist/index.min.css.js +0 -0
  709. /package/dist/mocked_classnames/{style → packages/style}/dist/index.min.css.js.map +0 -0
  710. /package/dist/{mocked_classnames → packages}/icons/dist/_virtual/_tslib.js +0 -0
  711. /package/dist/{mocked_classnames → packages}/icons/dist/_virtual/_tslib.js.map +0 -0
  712. /package/dist/{mocked_classnames → packages}/icons/dist/react/AddSmall.js +0 -0
  713. /package/dist/{mocked_classnames → packages}/icons/dist/react/AddSmall.js.map +0 -0
  714. /package/dist/{mocked_classnames → packages}/icons/dist/react/Alert.js +0 -0
  715. /package/dist/{mocked_classnames → packages}/icons/dist/react/Alert.js.map +0 -0
  716. /package/dist/{mocked_classnames → packages}/icons/dist/react/Check.js +0 -0
  717. /package/dist/{mocked_classnames → packages}/icons/dist/react/Check.js.map +0 -0
  718. /package/dist/{mocked_classnames → packages}/icons/dist/react/CloseMedium.js +0 -0
  719. /package/dist/{mocked_classnames → packages}/icons/dist/react/CloseMedium.js.map +0 -0
  720. /package/dist/{mocked_classnames → packages}/icons/dist/react/CloseSmall.js +0 -0
  721. /package/dist/{mocked_classnames → packages}/icons/dist/react/CloseSmall.js.map +0 -0
  722. /package/dist/{mocked_classnames → packages}/icons/dist/react/DropdownChevronDown.js +0 -0
  723. /package/dist/{mocked_classnames → packages}/icons/dist/react/DropdownChevronDown.js.map +0 -0
  724. /package/dist/{mocked_classnames → packages}/icons/dist/react/DropdownChevronRight.js +0 -0
  725. /package/dist/{mocked_classnames → packages}/icons/dist/react/DropdownChevronRight.js.map +0 -0
  726. /package/dist/{mocked_classnames → packages}/icons/dist/react/DropdownChevronUp.js +0 -0
  727. /package/dist/{mocked_classnames → packages}/icons/dist/react/DropdownChevronUp.js.map +0 -0
  728. /package/dist/{mocked_classnames → packages}/icons/dist/react/Favorite.js +0 -0
  729. /package/dist/{mocked_classnames → packages}/icons/dist/react/Favorite.js.map +0 -0
  730. /package/dist/{mocked_classnames → packages}/icons/dist/react/Info.js +0 -0
  731. /package/dist/{mocked_classnames → packages}/icons/dist/react/Info.js.map +0 -0
  732. /package/dist/{mocked_classnames → packages}/icons/dist/react/Menu.js +0 -0
  733. /package/dist/{mocked_classnames → packages}/icons/dist/react/Menu.js.map +0 -0
  734. /package/dist/{mocked_classnames → packages}/icons/dist/react/MoveArrowLeft.js +0 -0
  735. /package/dist/{mocked_classnames → packages}/icons/dist/react/MoveArrowLeft.js.map +0 -0
  736. /package/dist/{mocked_classnames → packages}/icons/dist/react/MoveArrowRight.js +0 -0
  737. /package/dist/{mocked_classnames → packages}/icons/dist/react/MoveArrowRight.js.map +0 -0
  738. /package/dist/{mocked_classnames → packages}/icons/dist/react/NavigationChevronLeft.js +0 -0
  739. /package/dist/{mocked_classnames → packages}/icons/dist/react/NavigationChevronLeft.js.map +0 -0
  740. /package/dist/{mocked_classnames → packages}/icons/dist/react/NavigationChevronRight.js +0 -0
  741. /package/dist/{mocked_classnames → packages}/icons/dist/react/NavigationChevronRight.js.map +0 -0
  742. /package/dist/{mocked_classnames → packages}/icons/dist/react/NoColor.js +0 -0
  743. /package/dist/{mocked_classnames → packages}/icons/dist/react/NoColor.js.map +0 -0
  744. /package/dist/{mocked_classnames → packages}/icons/dist/react/Remove.js +0 -0
  745. /package/dist/{mocked_classnames → packages}/icons/dist/react/Remove.js.map +0 -0
  746. /package/dist/{mocked_classnames → packages}/icons/dist/react/Search.js +0 -0
  747. /package/dist/{mocked_classnames → packages}/icons/dist/react/Search.js.map +0 -0
  748. /package/dist/{mocked_classnames → packages}/icons/dist/react/Sort.js +0 -0
  749. /package/dist/{mocked_classnames → packages}/icons/dist/react/Sort.js.map +0 -0
  750. /package/dist/{mocked_classnames → packages}/icons/dist/react/SortAscending.js +0 -0
  751. /package/dist/{mocked_classnames → packages}/icons/dist/react/SortAscending.js.map +0 -0
  752. /package/dist/{mocked_classnames → packages}/icons/dist/react/SortDescending.js +0 -0
  753. /package/dist/{mocked_classnames → packages}/icons/dist/react/SortDescending.js.map +0 -0
  754. /package/dist/{mocked_classnames → packages}/icons/dist/react/Warning.js +0 -0
  755. /package/dist/{mocked_classnames → packages}/icons/dist/react/Warning.js.map +0 -0
  756. /package/dist/{style → packages/style}/dist/index.min.css.js +0 -0
  757. /package/dist/{style → packages/style}/dist/index.min.css.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","sources":["../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, {\n ChangeEvent,\n type ChangeEventHandler,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport useDebounceEvent from \"../../hooks/useDebounceEvent\";\nimport Icon from \"../Icon/Icon\";\nimport Loader from \"../Loader/Loader\";\nimport Text from \"../Text/Text\";\nimport FieldLabel from \"../FieldLabel/FieldLabel\";\nimport {\n FEEDBACK_CLASSES,\n SIZE_MAPPER,\n TextFieldAriaLabel,\n TextFieldFeedbackState as TextFieldFeedbackStateEnum,\n TextFieldTextType as TextFieldTextTypeEnum\n} from \"./TextFieldConstants\";\nimport { type TextFieldType, type TextFieldSize } from \"./TextField.types\";\nimport { BASE_SIZES } from \"../../constants/sizes\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport Clickable from \"../../components/Clickable/Clickable\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { NOOP } from \"../../utils/function-utils\";\nimport { ComponentDefaultTestId, ComponentVibeId } from \"../../tests/constants\";\nimport { type VibeComponentProps, withStaticProps } from \"../../types\";\nimport styles from \"./TextField.module.scss\";\nimport { Tooltip } from \"../Tooltip\";\nimport { HiddenText } from \"../HiddenText\";\n\nconst EMPTY_OBJECT = { primary: \"\", secondary: \"\" };\n\nexport interface TextFieldProps extends VibeComponentProps {\n /**\n * The placeholder text displayed when the input is empty.\n */\n placeholder?: string;\n /**\n * Configures the browser's autocomplete behavior.\n */\n autoComplete?: string;\n /**\n * The current value of the text field.\n */\n value?: string;\n /**\n * Callback fired when the text field value changes.\n */\n onChange?: (\n value: string,\n event: React.ChangeEvent<HTMLInputElement> | Pick<React.ChangeEvent<HTMLInputElement>, \"target\">\n ) => void;\n /**\n * Callback fired when the text field loses focus.\n */\n onBlur?: (event: React.FocusEvent) => void;\n /**\n * Callback fired when the text field gains focus.\n */\n onFocus?: (event: React.FocusEvent) => void;\n /**\n * Callback fired when a key is pressed inside the text field.\n */\n onKeyDown?: (event: React.KeyboardEvent) => void;\n /**\n * Callback fired when the mouse wheel is used inside the text field.\n */\n onWheel?: (event: React.WheelEvent) => void;\n /**\n * The debounce rate for input value changes.\n */\n debounceRate?: number;\n /**\n * If true, the input is automatically focused on mount.\n */\n autoFocus?: boolean;\n /**\n * If true, disables the text field.\n */\n disabled?: boolean;\n /**\n * If true, makes the text field read-only.\n */\n readonly?: boolean;\n /**\n * A function to set a reference to the input element.\n */\n setRef?: (node: HTMLElement) => void;\n /**\n * The primary icon displayed inside the text field.\n */\n iconName?: string | React.FunctionComponent | null;\n /**\n * The secondary icon displayed inside the text field.\n */\n secondaryIconName?: string | React.FunctionComponent | null;\n /**\n * The label displayed above the text field.\n */\n title?: string;\n /**\n * The size of the text field.\n */\n size?: TextFieldSize;\n /**\n * Validation state for the text field.\n */\n validation?: { status?: \"error\" | \"success\"; text?: string | React.ReactNode };\n /**\n * Class name applied to the text field wrapper.\n */\n wrapperClassName?: string;\n /**\n * Callback fired when the icon inside the text field is clicked.\n */\n onIconClick?: (icon: string | React.FunctionComponent | null) => void;\n /**\n * If true, clears the input when the icon is clicked.\n */\n clearOnIconClick?: boolean;\n /**\n * The icon displayed inside the label.\n */\n labelIconName?: string | React.FunctionComponent | null;\n /**\n * If true, displays the character count.\n */\n showCharCount?: boolean;\n /**\n * The ARIA label for the input field.\n */\n inputAriaLabel?: string;\n /**\n * The ID of the container where search results are displayed.\n */\n searchResultsContainerId?: string;\n /**\n * The ID of the currently active search result.\n */\n activeDescendant?: string;\n /**\n * Icon labels for accessibility.\n */\n iconsNames?: {\n primary: string;\n secondary: string;\n };\n /**\n * The type of the text field.\n */\n type?: TextFieldType;\n /**\n * The maximum number of characters allowed.\n */\n maxLength?: number;\n /**\n * If true, allows the user to exceed the character limit set by `maxLength`.\n */\n allowExceedingMaxLength?: boolean;\n /**\n * If true, trims whitespace from the input value.\n */\n trim?: boolean;\n /**\n * The ARIA role of the text field.\n */\n role?: string;\n /**\n * If true, marks the input as required.\n */\n required?: boolean;\n /**\n * The error message displayed when a required field is left empty.\n */\n requiredErrorText?: string;\n /**\n * If true, displays a loading indicator inside the text field.\n */\n loading?: boolean;\n /**\n * Test ID for the secondary icon.\n */\n secondaryDataTestId?: string;\n /**\n * The tab order of the input field.\n */\n tabIndex?: number;\n /**\n * The name attribute for the input field.\n */\n name?: string;\n /**\n * If true, renders only an underline style for the text field.\n */\n underline?: boolean;\n /**\n * If true, the component is controlled by an external state.\n */\n controlled?: boolean;\n /**\n * Tooltip content for the primary icon.\n */\n iconTooltipContent?: string;\n /**\n * Tooltip content for the secondary icon.\n */\n secondaryTooltipContent?: string;\n /**\n * The text direction of the input.\n */\n dir?: \"ltr\" | \"rtl\" | \"auto\";\n}\n\nconst TextField = forwardRef(\n (\n {\n className = \"\",\n placeholder = \"\",\n autoComplete = \"off\",\n value,\n onChange = NOOP,\n onBlur = NOOP,\n onFocus = NOOP,\n onKeyDown = NOOP,\n onWheel = NOOP,\n debounceRate = 0,\n autoFocus = false,\n disabled = false,\n readonly = false,\n setRef = NOOP,\n iconName,\n secondaryIconName,\n id = \"input\",\n title = \"\",\n size = \"small\",\n validation = null,\n wrapperClassName = \"\",\n onIconClick = NOOP,\n clearOnIconClick = false,\n labelIconName,\n showCharCount = false,\n inputAriaLabel,\n searchResultsContainerId = \"\",\n activeDescendant = \"\",\n iconsNames = EMPTY_OBJECT,\n type = \"text\",\n maxLength = null,\n allowExceedingMaxLength = false,\n trim = false,\n role = \"\",\n required = false,\n requiredErrorText = \"\",\n loading = false,\n \"data-testid\": dataTestId,\n secondaryDataTestId,\n tabIndex,\n underline = false,\n name,\n controlled = false,\n iconTooltipContent,\n secondaryTooltipContent,\n dir\n }: TextFieldProps,\n ref: React.ForwardedRef<unknown>\n ) => {\n const [isRequiredAndEmpty, setIsRequiredAndEmpty] = useState(false);\n\n const inputRef = useRef(null);\n const mergedRef = useMergeRef(ref, inputRef, setRef);\n\n const onBlurCallback = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n if (required && !e.target.value) {\n setIsRequiredAndEmpty(true);\n }\n onBlur(e);\n },\n [onBlur, required]\n );\n\n const onChangeCallback = useCallback(\n (value: string, e?: React.ChangeEvent<HTMLInputElement>) => {\n if (isRequiredAndEmpty && value) {\n setIsRequiredAndEmpty(false);\n }\n const event = e || { target: inputRef.current };\n onChange(value, event);\n },\n [onChange, isRequiredAndEmpty]\n );\n\n const {\n inputValue: uncontrolledInput,\n onEventChanged,\n clearValue\n } = useDebounceEvent({\n delay: debounceRate,\n onChange: onChangeCallback,\n initialStateValue: value,\n trim\n });\n\n const inputValue = useMemo(() => {\n return controlled ? value : uncontrolledInput;\n }, [controlled, value, uncontrolledInput]);\n\n const handleChange = useCallback<ChangeEventHandler<HTMLInputElement>>(\n event => {\n controlled ? onChangeCallback(event.target.value, event) : onEventChanged(event);\n },\n [controlled, onChangeCallback, onEventChanged]\n );\n\n const currentStateIconName = useMemo(() => {\n if (secondaryIconName) {\n return inputValue ? secondaryIconName : iconName;\n }\n return iconName;\n }, [iconName, secondaryIconName, inputValue]);\n\n const onIconClickCallback = useCallback(() => {\n if (disabled) {\n return;\n }\n\n if (clearOnIconClick) {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n // Do it cause otherwise the value is not cleared in target object\n inputRef.current.value = \"\";\n controlled ? onChangeCallback(\"\") : clearValue();\n }\n onIconClick(currentStateIconName);\n }, [disabled, clearOnIconClick, onIconClick, currentStateIconName, controlled, onChangeCallback, clearValue]);\n\n const validationClass = useMemo(() => {\n if (typeof maxLength === \"number\" && inputValue && inputValue.length > maxLength) {\n return FEEDBACK_CLASSES.error;\n }\n\n if ((!validation || !validation.status) && !isRequiredAndEmpty) {\n return \"\";\n }\n const status = isRequiredAndEmpty ? \"error\" : validation.status;\n return FEEDBACK_CLASSES[status];\n }, [maxLength, validation, isRequiredAndEmpty, inputValue]);\n\n const hasIcon = iconName || secondaryIconName;\n const shouldShowExtraText =\n showCharCount || (validation && validation.text) || (isRequiredAndEmpty && requiredErrorText);\n const isSecondary = secondaryIconName === currentStateIconName;\n const isPrimary = iconName === currentStateIconName;\n const shouldFocusOnPrimaryIcon =\n (onIconClick !== NOOP || iconsNames.primary || iconTooltipContent) && inputValue && iconName.length && isPrimary;\n const shouldFocusOnSecondaryIcon = (secondaryIconName || secondaryTooltipContent) && isSecondary && !!inputValue;\n const allowExceedingMaxLengthTextId = allowExceedingMaxLength ? `${id}-allow-exceeding-max-length-text` : undefined;\n\n useEffect(() => {\n if (!inputRef?.current || !autoFocus) {\n return;\n }\n\n const animationFrame = requestAnimationFrame(() => inputRef.current.focus());\n return () => cancelAnimationFrame(animationFrame);\n }, [inputRef, autoFocus]);\n\n const isIconContainerClickable = onIconClick !== NOOP || clearOnIconClick;\n\n const primaryIconLabel = iconsNames.primary || iconTooltipContent;\n const secondaryIconLabel = iconsNames.secondary || secondaryTooltipContent;\n\n return (\n <div\n className={cx(styles.textField, wrapperClassName, {\n [styles.disabled]: disabled,\n [styles.onlyUnderline]: underline\n })}\n role={role}\n aria-busy={loading}\n >\n <div className={cx(styles.labelWrapper)}>\n <FieldLabel labelText={title} icon={labelIconName} labelFor={id} required={required} />\n <div className={cx(styles.inputWrapper, SIZE_MAPPER[size], validationClass)}>\n {/*Programatical input (tabIndex={-1}) is working fine with aria-activedescendant attribute despite the rule*/}\n {/*eslint-disable-next-line jsx-a11y/aria-activedescendant-has-tabindex*/}\n <input\n className={cx(className, styles.input, {\n [styles.inputHasIcon]: !!hasIcon,\n [styles.readOnly]: readonly\n })}\n placeholder={placeholder}\n autoComplete={autoComplete}\n value={inputValue}\n onChange={handleChange}\n disabled={disabled}\n readOnly={readonly}\n ref={mergedRef}\n type={type}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TEXT_FIELD, id)}\n data-vibe={ComponentVibeId.TEXT_FIELD}\n name={name}\n onBlur={onBlurCallback}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n onWheel={onWheel}\n maxLength={typeof maxLength === \"number\" && !allowExceedingMaxLength ? maxLength : undefined}\n role={searchResultsContainerId && \"combobox\"} // For voice reader\n aria-label={inputAriaLabel || placeholder}\n aria-invalid={(validation && validation.status === \"error\") || isRequiredAndEmpty}\n aria-owns={searchResultsContainerId}\n aria-activedescendant={activeDescendant}\n aria-required={required}\n aria-describedby={allowExceedingMaxLengthTextId}\n required={required}\n tabIndex={tabIndex}\n dir={dir}\n />\n {loading && (\n <div\n className={cx(styles.loaderContainer, {\n [styles.loaderContainerHasIcon]: hasIcon\n })}\n >\n <div className={cx(styles.loader)}>\n <Loader className={cx(styles.loaderSvg)} />\n </div>\n </div>\n )}\n {iconName && (\n <Tooltip\n content={isPrimary ? iconTooltipContent : undefined}\n referenceWrapperClassName={styles.tooltipContainer}\n >\n <Clickable\n className={cx(styles.iconContainer, {\n [styles.iconContainerHasIcon]: hasIcon,\n [styles.iconContainerActive]: isPrimary,\n [styles.iconContainerClickable]: isIconContainerClickable\n })}\n onClick={onIconClickCallback}\n tabIndex={shouldFocusOnPrimaryIcon ? \"0\" : \"-1\"}\n ariaLabel={primaryIconLabel}\n >\n <Icon\n icon={iconName}\n className={cx(styles.icon)}\n iconType=\"font\"\n iconSize={size === \"small\" ? \"16px\" : \"18px\"}\n />\n </Clickable>\n </Tooltip>\n )}\n {secondaryIconName && (\n <Tooltip\n content={isSecondary ? secondaryTooltipContent : undefined}\n addKeyboardHideShowTriggersByDefault\n referenceWrapperClassName={styles.tooltipContainer}\n >\n <Clickable\n className={cx(styles.iconContainer, {\n [styles.iconContainerHasIcon]: hasIcon,\n [styles.iconContainerActive]: isSecondary,\n [styles.iconContainerClickable]: isIconContainerClickable\n })}\n onClick={onIconClickCallback}\n tabIndex={shouldFocusOnSecondaryIcon ? \"0\" : \"-1\"}\n data-testid={secondaryDataTestId || getTestId(ComponentDefaultTestId.TEXT_FIELD_SECONDARY_BUTTON, id)}\n ariaLabel={secondaryIconLabel}\n >\n <Icon\n icon={secondaryIconName}\n className={cx(styles.icon)}\n iconType=\"font\"\n iconSize={size === \"small\" ? \"16px\" : \"18px\"}\n />\n </Clickable>\n </Tooltip>\n )}\n </div>\n {shouldShowExtraText && (\n <Text type=\"text2\" color=\"secondary\" className={cx(styles.subTextContainer)}>\n {((validation && validation.text) || (isRequiredAndEmpty && requiredErrorText)) && (\n <span className={cx(styles.subTextContainerStatus)}>\n {isRequiredAndEmpty ? requiredErrorText : validation.text}\n </span>\n )}\n {showCharCount && (\n <span className={cx(styles.counter)} aria-label={TextFieldAriaLabel.CHAR}>\n {(inputValue && inputValue.length) || 0}\n {typeof maxLength === \"number\" && `/${maxLength}`}\n <HiddenText id={allowExceedingMaxLengthTextId} text={`Maximum of ${maxLength} characters`} />\n </span>\n )}\n </Text>\n )}\n </div>\n </div>\n );\n }\n);\n\ninterface TextFieldStaticProps {\n sizes: typeof BASE_SIZES;\n types: typeof TextFieldTextTypeEnum;\n feedbacks: typeof TextFieldFeedbackStateEnum;\n}\n\nexport default withStaticProps<TextFieldProps, TextFieldStaticProps, unknown>(TextField, {\n sizes: BASE_SIZES,\n feedbacks: TextFieldFeedbackStateEnum,\n types: TextFieldTextTypeEnum\n});\n"],"names":["EMPTY_OBJECT","primary","secondary","withStaticProps","forwardRef","_ref","ref","_ref$className","className","_ref$placeholder","placeholder","_ref$autoComplete","autoComplete","value","_ref$onChange","onChange","NOOP","_ref$onBlur","onBlur","_ref$onFocus","onFocus","_ref$onKeyDown","onKeyDown","_ref$onWheel","onWheel","_ref$debounceRate","debounceRate","_ref$autoFocus","autoFocus","_ref$disabled","disabled","_ref$readonly","readonly","_ref$setRef","setRef","iconName","secondaryIconName","_ref$id","id","_ref$title","title","_ref$size","size","_ref$validation","validation","_ref$wrapperClassName","wrapperClassName","_ref$onIconClick","onIconClick","_ref$clearOnIconClick","clearOnIconClick","labelIconName","_ref$showCharCount","showCharCount","inputAriaLabel","_ref$searchResultsCon","searchResultsContainerId","_ref$activeDescendant","activeDescendant","_ref$iconsNames","iconsNames","_ref$type","type","_ref$maxLength","maxLength","_ref$allowExceedingMa","allowExceedingMaxLength","_ref$trim","trim","_ref$role","role","_ref$required","required","_ref$requiredErrorTex","requiredErrorText","_ref$loading","loading","dataTestId","secondaryDataTestId","tabIndex","_ref$underline","underline","name","_ref$controlled","controlled","iconTooltipContent","secondaryTooltipContent","dir","_useState","useState","_useState2","_slicedToArray","isRequiredAndEmpty","setIsRequiredAndEmpty","inputRef","useRef","mergedRef","useMergeRef","onBlurCallback","useCallback","e","target","onChangeCallback","current","_useDebounceEvent","useDebounceEvent","delay","initialStateValue","uncontrolledInput","inputValue","onEventChanged","clearValue","useMemo","handleChange","event","currentStateIconName","onIconClickCallback","focus","validationClass","length","FEEDBACK_CLASSES","error","status","hasIcon","shouldShowExtraText","text","isSecondary","isPrimary","shouldFocusOnPrimaryIcon","shouldFocusOnSecondaryIcon","allowExceedingMaxLengthTextId","concat","undefined","useEffect","animationFrame","requestAnimationFrame","cancelAnimationFrame","isIconContainerClickable","primaryIconLabel","secondaryIconLabel","React","createElement","cx","styles","textField","_defineProperty","onlyUnderline","labelWrapper","FieldLabel","labelText","icon","labelFor","inputWrapper","SIZE_MAPPER","input","inputHasIcon","readOnly","getTestId","ComponentDefaultTestId","TEXT_FIELD","ComponentVibeId","loaderContainer","loaderContainerHasIcon","loader","Loader","loaderSvg","Tooltip","content","referenceWrapperClassName","tooltipContainer","Clickable","iconContainer","iconContainerHasIcon","iconContainerActive","iconContainerClickable","onClick","ariaLabel","Icon","iconType","iconSize","addKeyboardHideShowTriggersByDefault","TEXT_FIELD_SECONDARY_BUTTON","Text","color","subTextContainer","subTextContainerStatus","counter","TextFieldAriaLabel","CHAR","HiddenText","sizes","BASE_SIZES","feedbacks","TextFieldFeedbackStateEnum","types","TextFieldTextTypeEnum"],"mappings":"4mCAmCA,IAAMA,EAAe,CAAEC,QAAS,GAAIC,UAAW,IA+dhCC,EAAAA,EAxSGC,GAChB,SAAAC,EAiDEC,GACE,IAAAC,EAAAF,EAhDAG,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAAE,EAAAJ,EACdK,YAAAA,OAAc,IAAHD,EAAG,GAAEA,EAAAE,EAAAN,EAChBO,aAAAA,OAAe,IAAHD,EAAG,MAAKA,EACpBE,EAAKR,EAALQ,MAAKC,EAAAT,EACLU,SAAAA,OAAWC,IAAHF,EAAGE,EAAIF,EAAAG,EAAAZ,EACfa,OAAAA,OAASF,IAAHC,EAAGD,EAAIC,EAAAE,EAAAd,EACbe,QAAAA,OAAUJ,IAAHG,EAAGH,EAAIG,EAAAE,EAAAhB,EACdiB,UAAAA,OAAYN,IAAHK,EAAGL,EAAIK,EAAAE,EAAAlB,EAChBmB,QAAAA,OAAUR,IAAHO,EAAGP,EAAIO,EAAAE,EAAApB,EACdqB,aAAAA,OAAe,IAAHD,EAAG,EAACA,EAAAE,EAAAtB,EAChBuB,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BAAdvD,IAAsBmE,IAAAA,OAAQnE,IACtC4E,EAAAC,cAACgD,EAAW,CAAAvJ,GAAI4F,GAA+BL,KAAI,cAAAM,OAAgBnE,GAAS,oBAQ5F,IASuF,CACvF8H,MAAOC,EACPC,UAAWC,EACXC,MAAOC"}
1
+ {"version":3,"file":"TextField.js","sources":["../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, {\n ChangeEvent,\n type ChangeEventHandler,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport useDebounceEvent from \"../../hooks/useDebounceEvent\";\nimport { Icon } from \"@vibe/icon\";\nimport { Loader } from \"@vibe/loader\";\nimport Text from \"../Text/Text\";\nimport FieldLabel from \"../FieldLabel/FieldLabel\";\nimport {\n FEEDBACK_CLASSES,\n SIZE_MAPPER,\n TextFieldAriaLabel,\n TextFieldFeedbackState as TextFieldFeedbackStateEnum,\n TextFieldTextType as TextFieldTextTypeEnum\n} from \"./TextFieldConstants\";\nimport { type TextFieldType, type TextFieldSize } from \"./TextField.types\";\nimport { BASE_SIZES } from \"../../constants/sizes\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport Clickable from \"../../components/Clickable/Clickable\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { NOOP } from \"../../utils/function-utils\";\nimport { ComponentDefaultTestId, ComponentVibeId } from \"../../tests/constants\";\nimport { type VibeComponentProps, withStaticProps } from \"../../types\";\nimport styles from \"./TextField.module.scss\";\nimport { Tooltip } from \"../Tooltip\";\nimport { HiddenText } from \"../HiddenText\";\n\nconst EMPTY_OBJECT = { primary: \"\", secondary: \"\" };\n\nexport interface TextFieldProps extends VibeComponentProps {\n /**\n * The placeholder text displayed when the input is empty.\n */\n placeholder?: string;\n /**\n * Configures the browser's autocomplete behavior.\n */\n autoComplete?: string;\n /**\n * The current value of the text field.\n */\n value?: string;\n /**\n * Callback fired when the text field value changes.\n */\n onChange?: (\n value: string,\n event: React.ChangeEvent<HTMLInputElement> | Pick<React.ChangeEvent<HTMLInputElement>, \"target\">\n ) => void;\n /**\n * Callback fired when the text field loses focus.\n */\n onBlur?: (event: React.FocusEvent) => void;\n /**\n * Callback fired when the text field gains focus.\n */\n onFocus?: (event: React.FocusEvent) => void;\n /**\n * Callback fired when a key is pressed inside the text field.\n */\n onKeyDown?: (event: React.KeyboardEvent) => void;\n /**\n * Callback fired when the mouse wheel is used inside the text field.\n */\n onWheel?: (event: React.WheelEvent) => void;\n /**\n * The debounce rate for input value changes.\n */\n debounceRate?: number;\n /**\n * If true, the input is automatically focused on mount.\n */\n autoFocus?: boolean;\n /**\n * If true, disables the text field.\n */\n disabled?: boolean;\n /**\n * If true, makes the text field read-only.\n */\n readonly?: boolean;\n /**\n * A function to set a reference to the input element.\n */\n setRef?: (node: HTMLElement) => void;\n /**\n * The primary icon displayed inside the text field.\n */\n iconName?: string | React.FunctionComponent | null;\n /**\n * The secondary icon displayed inside the text field.\n */\n secondaryIconName?: string | React.FunctionComponent | null;\n /**\n * The label displayed above the text field.\n */\n title?: string;\n /**\n * The size of the text field.\n */\n size?: TextFieldSize;\n /**\n * Validation state for the text field.\n */\n validation?: { status?: \"error\" | \"success\"; text?: string | React.ReactNode };\n /**\n * Class name applied to the text field wrapper.\n */\n wrapperClassName?: string;\n /**\n * Callback fired when the icon inside the text field is clicked.\n */\n onIconClick?: (icon: string | React.FunctionComponent | null) => void;\n /**\n * If true, clears the input when the icon is clicked.\n */\n clearOnIconClick?: boolean;\n /**\n * The icon displayed inside the label.\n */\n labelIconName?: string | React.FunctionComponent | null;\n /**\n * If true, displays the character count.\n */\n showCharCount?: boolean;\n /**\n * The ARIA label for the input field.\n */\n inputAriaLabel?: string;\n /**\n * The ID of the container where search results are displayed.\n */\n searchResultsContainerId?: string;\n /**\n * The ID of the currently active search result.\n */\n activeDescendant?: string;\n /**\n * Icon labels for accessibility.\n */\n iconsNames?: {\n primary: string;\n secondary: string;\n };\n /**\n * The type of the text field.\n */\n type?: TextFieldType;\n /**\n * The maximum number of characters allowed.\n */\n maxLength?: number;\n /**\n * If true, allows the user to exceed the character limit set by `maxLength`.\n */\n allowExceedingMaxLength?: boolean;\n /**\n * If true, trims whitespace from the input value.\n */\n trim?: boolean;\n /**\n * The ARIA role of the text field.\n */\n role?: string;\n /**\n * If true, marks the input as required.\n */\n required?: boolean;\n /**\n * The error message displayed when a required field is left empty.\n */\n requiredErrorText?: string;\n /**\n * If true, displays a loading indicator inside the text field.\n */\n loading?: boolean;\n /**\n * Test ID for the secondary icon.\n */\n secondaryDataTestId?: string;\n /**\n * The tab order of the input field.\n */\n tabIndex?: number;\n /**\n * The name attribute for the input field.\n */\n name?: string;\n /**\n * If true, renders only an underline style for the text field.\n */\n underline?: boolean;\n /**\n * If true, the component is controlled by an external state.\n */\n controlled?: boolean;\n /**\n * Tooltip content for the primary icon.\n */\n iconTooltipContent?: string;\n /**\n * Tooltip content for the secondary icon.\n */\n secondaryTooltipContent?: string;\n /**\n * The text direction of the input.\n */\n dir?: \"ltr\" | \"rtl\" | \"auto\";\n}\n\nconst TextField = forwardRef(\n (\n {\n className = \"\",\n placeholder = \"\",\n autoComplete = \"off\",\n value,\n onChange = NOOP,\n onBlur = NOOP,\n onFocus = NOOP,\n onKeyDown = NOOP,\n onWheel = NOOP,\n debounceRate = 0,\n autoFocus = false,\n disabled = false,\n readonly = false,\n setRef = NOOP,\n iconName,\n secondaryIconName,\n id = \"input\",\n title = \"\",\n size = \"small\",\n validation = null,\n wrapperClassName = \"\",\n onIconClick = NOOP,\n clearOnIconClick = false,\n labelIconName,\n showCharCount = false,\n inputAriaLabel,\n searchResultsContainerId = \"\",\n activeDescendant = \"\",\n iconsNames = EMPTY_OBJECT,\n type = \"text\",\n maxLength = null,\n allowExceedingMaxLength = false,\n trim = false,\n role = \"\",\n required = false,\n requiredErrorText = \"\",\n loading = false,\n \"data-testid\": dataTestId,\n secondaryDataTestId,\n tabIndex,\n underline = false,\n name,\n controlled = false,\n iconTooltipContent,\n secondaryTooltipContent,\n dir\n }: TextFieldProps,\n ref: React.ForwardedRef<unknown>\n ) => {\n const [isRequiredAndEmpty, setIsRequiredAndEmpty] = useState(false);\n\n const inputRef = useRef(null);\n const mergedRef = useMergeRef(ref, inputRef, setRef);\n\n const onBlurCallback = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n if (required && !e.target.value) {\n setIsRequiredAndEmpty(true);\n }\n onBlur(e);\n },\n [onBlur, required]\n );\n\n const onChangeCallback = useCallback(\n (value: string, e?: React.ChangeEvent<HTMLInputElement>) => {\n if (isRequiredAndEmpty && value) {\n setIsRequiredAndEmpty(false);\n }\n const event = e || { target: inputRef.current };\n onChange(value, event);\n },\n [onChange, isRequiredAndEmpty]\n );\n\n const {\n inputValue: uncontrolledInput,\n onEventChanged,\n clearValue\n } = useDebounceEvent({\n delay: debounceRate,\n onChange: onChangeCallback,\n initialStateValue: value,\n trim\n });\n\n const inputValue = useMemo(() => {\n return controlled ? value : uncontrolledInput;\n }, [controlled, value, uncontrolledInput]);\n\n const handleChange = useCallback<ChangeEventHandler<HTMLInputElement>>(\n event => {\n controlled ? onChangeCallback(event.target.value, event) : onEventChanged(event);\n },\n [controlled, onChangeCallback, onEventChanged]\n );\n\n const currentStateIconName = useMemo(() => {\n if (secondaryIconName) {\n return inputValue ? secondaryIconName : iconName;\n }\n return iconName;\n }, [iconName, secondaryIconName, inputValue]);\n\n const onIconClickCallback = useCallback(() => {\n if (disabled) {\n return;\n }\n\n if (clearOnIconClick) {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n // Do it cause otherwise the value is not cleared in target object\n inputRef.current.value = \"\";\n controlled ? onChangeCallback(\"\") : clearValue();\n }\n onIconClick(currentStateIconName);\n }, [disabled, clearOnIconClick, onIconClick, currentStateIconName, controlled, onChangeCallback, clearValue]);\n\n const validationClass = useMemo(() => {\n if (typeof maxLength === \"number\" && inputValue && inputValue.length > maxLength) {\n return FEEDBACK_CLASSES.error;\n }\n\n if ((!validation || !validation.status) && !isRequiredAndEmpty) {\n return \"\";\n }\n const status = isRequiredAndEmpty ? \"error\" : validation.status;\n return FEEDBACK_CLASSES[status];\n }, [maxLength, validation, isRequiredAndEmpty, inputValue]);\n\n const hasIcon = iconName || secondaryIconName;\n const shouldShowExtraText =\n showCharCount || (validation && validation.text) || (isRequiredAndEmpty && requiredErrorText);\n const isSecondary = secondaryIconName === currentStateIconName;\n const isPrimary = iconName === currentStateIconName;\n const shouldFocusOnPrimaryIcon =\n (onIconClick !== NOOP || iconsNames.primary || iconTooltipContent) && inputValue && iconName.length && isPrimary;\n const shouldFocusOnSecondaryIcon = (secondaryIconName || secondaryTooltipContent) && isSecondary && !!inputValue;\n const allowExceedingMaxLengthTextId = allowExceedingMaxLength ? `${id}-allow-exceeding-max-length-text` : undefined;\n\n useEffect(() => {\n if (!inputRef?.current || !autoFocus) {\n return;\n }\n\n const animationFrame = requestAnimationFrame(() => inputRef.current.focus());\n return () => cancelAnimationFrame(animationFrame);\n }, [inputRef, autoFocus]);\n\n const isIconContainerClickable = onIconClick !== NOOP || clearOnIconClick;\n\n const primaryIconLabel = iconsNames.primary || iconTooltipContent;\n const secondaryIconLabel = iconsNames.secondary || secondaryTooltipContent;\n\n return (\n <div\n className={cx(styles.textField, wrapperClassName, {\n [styles.disabled]: disabled,\n [styles.onlyUnderline]: underline\n })}\n role={role}\n aria-busy={loading}\n >\n <div className={cx(styles.labelWrapper)}>\n <FieldLabel labelText={title} icon={labelIconName} labelFor={id} required={required} />\n <div className={cx(styles.inputWrapper, SIZE_MAPPER[size], validationClass)}>\n {/*Programatical input (tabIndex={-1}) is working fine with aria-activedescendant attribute despite the rule*/}\n {/*eslint-disable-next-line jsx-a11y/aria-activedescendant-has-tabindex*/}\n <input\n className={cx(className, styles.input, {\n [styles.inputHasIcon]: !!hasIcon,\n [styles.readOnly]: readonly\n })}\n placeholder={placeholder}\n autoComplete={autoComplete}\n value={inputValue}\n onChange={handleChange}\n disabled={disabled}\n readOnly={readonly}\n ref={mergedRef}\n type={type}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TEXT_FIELD, id)}\n data-vibe={ComponentVibeId.TEXT_FIELD}\n name={name}\n onBlur={onBlurCallback}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n onWheel={onWheel}\n maxLength={typeof maxLength === \"number\" && !allowExceedingMaxLength ? maxLength : undefined}\n role={searchResultsContainerId && \"combobox\"} // For voice reader\n aria-label={inputAriaLabel || placeholder}\n aria-invalid={(validation && validation.status === \"error\") || isRequiredAndEmpty}\n aria-owns={searchResultsContainerId}\n aria-activedescendant={activeDescendant}\n aria-required={required}\n aria-describedby={allowExceedingMaxLengthTextId}\n required={required}\n tabIndex={tabIndex}\n dir={dir}\n />\n {loading && (\n <div\n className={cx(styles.loaderContainer, {\n [styles.loaderContainerHasIcon]: hasIcon\n })}\n >\n <div className={cx(styles.loader)}>\n <Loader className={cx(styles.loaderSvg)} />\n </div>\n </div>\n )}\n {iconName && (\n <Tooltip\n content={isPrimary ? iconTooltipContent : undefined}\n referenceWrapperClassName={styles.tooltipContainer}\n >\n <Clickable\n className={cx(styles.iconContainer, {\n [styles.iconContainerHasIcon]: hasIcon,\n [styles.iconContainerActive]: isPrimary,\n [styles.iconContainerClickable]: isIconContainerClickable\n })}\n onClick={onIconClickCallback}\n tabIndex={shouldFocusOnPrimaryIcon ? \"0\" : \"-1\"}\n ariaLabel={primaryIconLabel}\n >\n <Icon\n icon={iconName}\n className={cx(styles.icon)}\n iconType=\"font\"\n iconSize={size === \"small\" ? \"16px\" : \"18px\"}\n />\n </Clickable>\n </Tooltip>\n )}\n {secondaryIconName && (\n <Tooltip\n content={isSecondary ? secondaryTooltipContent : undefined}\n addKeyboardHideShowTriggersByDefault\n referenceWrapperClassName={styles.tooltipContainer}\n >\n <Clickable\n className={cx(styles.iconContainer, {\n [styles.iconContainerHasIcon]: hasIcon,\n [styles.iconContainerActive]: isSecondary,\n [styles.iconContainerClickable]: isIconContainerClickable\n })}\n onClick={onIconClickCallback}\n tabIndex={shouldFocusOnSecondaryIcon ? \"0\" : \"-1\"}\n data-testid={secondaryDataTestId || getTestId(ComponentDefaultTestId.TEXT_FIELD_SECONDARY_BUTTON, id)}\n ariaLabel={secondaryIconLabel}\n >\n <Icon\n icon={secondaryIconName}\n className={cx(styles.icon)}\n iconType=\"font\"\n iconSize={size === \"small\" ? \"16px\" : \"18px\"}\n />\n </Clickable>\n </Tooltip>\n )}\n </div>\n {shouldShowExtraText && (\n <Text type=\"text2\" color=\"secondary\" className={cx(styles.subTextContainer)}>\n {((validation && validation.text) || (isRequiredAndEmpty && requiredErrorText)) && (\n <span className={cx(styles.subTextContainerStatus)}>\n {isRequiredAndEmpty ? requiredErrorText : validation.text}\n </span>\n )}\n {showCharCount && (\n <span className={cx(styles.counter)} aria-label={TextFieldAriaLabel.CHAR}>\n {(inputValue && inputValue.length) || 0}\n {typeof maxLength === \"number\" && `/${maxLength}`}\n <HiddenText id={allowExceedingMaxLengthTextId} text={`Maximum of ${maxLength} characters`} />\n </span>\n )}\n </Text>\n )}\n </div>\n </div>\n );\n }\n);\n\ninterface TextFieldStaticProps {\n sizes: typeof BASE_SIZES;\n types: typeof TextFieldTextTypeEnum;\n feedbacks: typeof TextFieldFeedbackStateEnum;\n}\n\nexport default withStaticProps<TextFieldProps, TextFieldStaticProps, unknown>(TextField, {\n sizes: BASE_SIZES,\n feedbacks: TextFieldFeedbackStateEnum,\n types: TextFieldTextTypeEnum\n});\n"],"names":["EMPTY_OBJECT","primary","secondary","withStaticProps","forwardRef","_ref","ref","_ref$className","className","_ref$placeholder","placeholder","_ref$autoComplete","autoComplete","value","_ref$onChange","onChange","NOOP","_ref$onBlur","onBlur","_ref$onFocus","onFocus","_ref$onKeyDown","onKeyDown","_ref$onWheel","onWheel","_ref$debounceRate","debounceRate","_ref$autoFocus","autoFocus","_ref$disabled","disabled","_ref$readonly","readonly","_ref$setRef","setRef","iconName","secondaryIconName","_ref$id","id","_ref$title","title","_ref$size","size","_ref$validation","validation","_ref$wrapperClassName","wrapperClassName","_ref$onIconClick","onIconClick","_ref$clearOnIconClick","clearOnIconClick","labelIconName","_ref$showCharCount","showCharCount","inputAriaLabel","_ref$searchResultsCon","searchResultsContainerId","_ref$activeDescendant","activeDescendant","_ref$iconsNames","iconsNames","_ref$type","type","_ref$maxLength","maxLength","_ref$allowExceedingMa","allowExceedingMaxLength","_ref$trim","trim","_ref$role","role","_ref$required","required","_ref$requiredErrorTex","requiredErrorText","_ref$loading","loading","dataTestId","secondaryDataTestId","tabIndex","_ref$underline","underline","name","_ref$controlled","controlled","iconTooltipContent","secondaryTooltipContent","dir","_useState","useState","_useState2","_slicedToArray","isRequiredAndEmpty","setIsRequiredAndEmpty","inputRef","useRef","mergedRef","useMergeRef","onBlurCallback","useCallback","e","target","onChangeCallback","current","_useDebounceEvent","useDebounceEvent","delay","initialStateValue","uncontrolledInput","inputValue","onEventChanged","clearValue","useMemo","handleChange","event","currentStateIconName","onIconClickCallback","focus","validationClass","length","FEEDBACK_CLASSES","error","status","hasIcon","shouldShowExtraText","text","isSecondary","isPrimary","shouldFocusOnPrimaryIcon","shouldFocusOnSecondaryIcon","allowExceedingMaxLengthTextId","concat","undefined","useEffect","animationFrame","requestAnimationFrame","cancelAnimationFrame","isIconContainerClickable","primaryIconLabel","secondaryIconLabel","React","createElement","cx","styles","textField","_defineProperty","onlyUnderline","labelWrapper","FieldLabel","labelText","icon","labelFor","inputWrapper","SIZE_MAPPER","input","inputHasIcon","readOnly","getTestId","ComponentDefaultTestId","TEXT_FIELD","ComponentVibeId","loaderContainer","loaderContainerHasIcon","loader","Loader","loaderSvg","Tooltip","content","referenceWrapperClassName","tooltipContainer","Clickable","iconContainer","iconContainerHasIcon","iconContainerActive","iconContainerClickable","onClick","ariaLabel","Icon","iconType","iconSize","addKeyboardHideShowTriggersByDefault","TEXT_FIELD_SECONDARY_BUTTON","Text","color","subTextContainer","subTextContainerStatus","counter","TextFieldAriaLabel","CHAR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7B,EAACC,cAAA6B,GACClK,UAAWsI,EAAGC,EAAO4B,cAAa1B,EAAAA,EAAAA,KAC/BF,EAAO6B,qBAAuBjD,IAC9BoB,EAAO8B,oBAAsB/C,IAC7BiB,EAAO+B,uBAAyBrC,KAEnCsC,QAAS3D,GACTrC,SAAUkD,GAA6B,IAAM,KAAI,cACpCnD,IAAuB+E,EAAUC,EAAuBuB,4BAA6B/I,IAClG0I,UAAWrC,IAEXC,EAAAC,cAACoC,EACC,CAAA3B,KAAMlH,GACN5B,UAAWsI,EAAGC,EAAOO,MACrB4B,SAAS,OACTC,SAAmB,UAATzI,GAAmB,OAAS,YAM/CkF,IACCgB,EAACC,cAAAyC,GAAKxH,KAAK,QAAQyH,MAAM,YAAY/K,UAAWsI,EAAGC,EAAOyC,oBACrD5I,IAAcA,GAAWiF,MAAUjC,IAAsBlB,KAC1DkE,wBAAMpI,UAAWsI,EAAGC,EAAO0C,yBACxB7F,GAAqBlB,GAAoB9B,GAAWiF,MAGxDxE,IACCuF,EAAMC,cAAA,OAAA,CAAArI,UAAWsI,EAAGC,EAAO2C,SAAsB,aAAAC,EAAmBC,MAChE/E,IAAcA,GAAWU,QAAW,EAChB,iBAAdvD,IAAsBmE,IAAAA,OAAQnE,IACtC4E,EAAAC,cAACgD,EAAW,CAAAvJ,GAAI4F,GAA+BL,KAAI,cAAAM,OAAgBnE,GAAS,oBAQ5F,IASuF,CACvF8H,MAAOC,EACPC,UAAWC,EACXC,MAAOC"}
@@ -1,2 +1,2 @@
1
- import{slicedToArray as e,defineProperty as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import o,{forwardRef as i,useRef as r,useState as s,useEffect as n,useMemo as a,Fragment as l}from"react";import m from"classnames";import{AnimationType as d,HideShowEvent as p}from"../Dialog/DialogConstants.js";import c from"../../hooks/useMergeRef.js";import u from"../Tooltip/Tooltip.js";import f from"../IconButton/IconButton.js";import h from"./TipseenTitle.js";import{TipseenCloseButtonTheme as v,TipseenColor as T,TIPSEEN_CLOSE_BUTTON_ARIA_LABEL as y}from"./TipseenConstants.js";import{withStaticProps as g}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import{ComponentDefaultTestId as C}from"../../tests/constants.js";import{getTestId as j}from"../../tests/testIds.js";import N from"../Text/Text.js";import E from"./Tipseen.module.scss.js";import{ButtonColor as w}from"../Button/ButtonConstants.js";import{TooltipPositions as B}from"../Tooltip/TooltipConstants.js";import x from"../../../icons/dist/react/CloseSmall.js";var D=o.createContext("primary"),W=g(i((function(i,d){var p=i.className,v=i.id,T=i.position,g=void 0===T?"bottom":T,B=i.animationType,W=void 0===B?"expand":B,A=i.hideDelay,R=void 0===A?0:A,S=i.showDelay,k=void 0===S?100:S,I=i.title,O=i.titleClassName,P=i.hideCloseButton,_=i.closeButtonTheme,b=void 0===_?"light":_,H=i.onClose,L=i.closeAriaLabel,M=i.children,z=void 0===M?null:M,G=i.content,K=i.containerSelector,U=i.hideTrigger,V=void 0===U?[]:U,Y=i.showTrigger,q=void 0===Y?[]:Y,F=i.width,J=i.moveBy,Q=i.hideWhenReferenceHidden,X=void 0!==Q&&Q,Z=i.referenceWrapperClassName,$=i.tip,ee=void 0===$||$,te=i.tooltipArrowClassName,oe=i.modifiers,ie=void 0===oe?[]:oe,re=i.floating,se=void 0!==re&&re,ne=i.color,ae=i["data-testid"],le=null!=ne?ne:"inverted",me=Array.isArray(q)&&Array.isArray(V)&&0===q.length&&k>0,de=r(null),pe=c(d,de),ce=s(!me),ue=e(ce,2),fe=ue[0],he=ue[1],ve=L||y;n((function(){var e;return k&&(e=setTimeout((function(){he(!0)}),k)),function(){clearTimeout(e)}}),[k,he]);var Te=a((function(){return"inverted"===le?"onInverted":"onPrimary"}),[le]),ye=a((function(){return"light"===b?"inverted"===le?w.ON_INVERTED_BACKGROUND:w.ON_PRIMARY_COLOR:b}),[le,b]),ge=d||v?"div":l,Ce=o.createElement("div",null,o.createElement("div",{className:m(E.tipseenHeader)},P?null:o.createElement(f,{hideTooltip:!0,className:m(E.tipseenCloseButton,t({},E.dark,"dark"===b||"fixed-dark"===b)),onClick:H,size:"xs",kind:"tertiary",color:ye,ariaLabel:ve,icon:x}),o.createElement(h,{text:I,className:m(E.tipseenTitle,O)})),o.createElement(N,{color:Te,type:"text2",element:"p",className:m(E.tipseenContent)},o.createElement(D.Provider,{value:le},G)));return o.createElement(ge,{ref:pe,id:v,"data-testid":ae||j(C.TIPSEEN,v)},o.createElement(u,{className:m(E.tipseenWrapper,p,t(t({},E.tipseenWrapperWithoutCustomWidth,!F),E.floating,se)),maxWidth:F,arrowClassName:te,style:F?{width:F}:void 0,shouldShowOnMount:!me,position:g,animationType:W,hideDelay:R,showDelay:0,hideTrigger:V,showTrigger:q,showOnDialogEnter:!1,content:Ce,theme:"inverted"===le?"dark":"primary",containerSelector:K,disableDialogSlide:!1,moveBy:J,hideWhenReferenceHidden:X,referenceWrapperClassName:Z,tip:ee&&!se,modifiers:ie,open:me?fe:void 0,forceRenderWithoutChildren:se},z))})),{closeButtonThemes:v,animationTypes:d,hideShowTriggers:p,colors:T,positions:B});export{D as TipseenContext,W as default};
1
+ import{slicedToArray as e,defineProperty as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import o,{forwardRef as i,useRef as r,useState as n,useEffect as s,useMemo as a,Fragment as l}from"react";import m from"classnames";import{AnimationType as d,HideShowEvent as p}from"../Dialog/DialogConstants.js";import c from"../../hooks/useMergeRef.js";import u from"../Tooltip/Tooltip.js";import f from"../IconButton/IconButton.js";import h from"./TipseenTitle.js";import{TipseenCloseButtonTheme as v,TipseenColor as T,TIPSEEN_CLOSE_BUTTON_ARIA_LABEL as g}from"./TipseenConstants.js";import{withStaticProps as y}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import{ComponentDefaultTestId as C}from"../../tests/constants.js";import{getTestId as j}from"../../tests/testIds.js";import w from"../Text/Text.js";import N from"./Tipseen.module.scss.js";import{TooltipPositions as E}from"../Tooltip/TooltipConstants.js";import x from"../../../packages/icons/dist/react/CloseSmall.js";var W=o.createContext("primary"),k=y(i((function(i,d){var p=i.className,v=i.id,T=i.position,y=void 0===T?"bottom":T,E=i.animationType,k=void 0===E?"expand":E,B=i.hideDelay,D=void 0===B?0:B,S=i.showDelay,A=void 0===S?100:S,b=i.title,P=i.titleClassName,I=i.hideCloseButton,H=i.closeButtonTheme,R=void 0===H?"light":H,L=i.onClose,M=i.closeAriaLabel,O=i.children,_=void 0===O?null:O,z=i.content,q=i.containerSelector,F=i.hideTrigger,G=void 0===F?[]:F,J=i.showTrigger,K=void 0===J?[]:J,Q=i.width,U=i.moveBy,V=i.hideWhenReferenceHidden,X=void 0!==V&&V,Y=i.referenceWrapperClassName,Z=i.tip,$=void 0===Z||Z,ee=i.tooltipArrowClassName,te=i.modifiers,oe=void 0===te?[]:te,ie=i.floating,re=void 0!==ie&&ie,ne=i.color,se=i["data-testid"],ae=null!=ne?ne:"inverted",le=Array.isArray(K)&&Array.isArray(G)&&0===K.length&&A>0,me=r(null),de=c(d,me),pe=n(!le),ce=e(pe,2),ue=ce[0],fe=ce[1],he=M||g;s((function(){var e;return A&&(e=setTimeout((function(){fe(!0)}),A)),function(){clearTimeout(e)}}),[A,fe]);var ve=a((function(){return"inverted"===ae?"onInverted":"onPrimary"}),[ae]),Te=a((function(){return"light"===R?"inverted"===ae?"on-inverted-background":"on-primary-color":R}),[ae,R]),ge=d||v?"div":l,ye=o.createElement("div",null,o.createElement("div",{className:m(N.tipseenHeader)},I?null:o.createElement(f,{hideTooltip:!0,className:m(N.tipseenCloseButton,t({},N.dark,"dark"===R||"fixed-dark"===R)),onClick:L,size:"xs",kind:"tertiary",color:Te,ariaLabel:he,icon:x}),o.createElement(h,{text:b,className:m(N.tipseenTitle,P)})),o.createElement(w,{color:ve,type:"text2",element:"p",className:m(N.tipseenContent)},o.createElement(W.Provider,{value:ae},z)));return o.createElement(ge,{ref:de,id:v,"data-testid":se||j(C.TIPSEEN,v)},o.createElement(u,{className:m(N.tipseenWrapper,p,t(t({},N.tipseenWrapperWithoutCustomWidth,!Q),N.floating,re)),maxWidth:Q,arrowClassName:ee,style:Q?{width:Q}:void 0,shouldShowOnMount:!le,position:y,animationType:k,hideDelay:D,showDelay:0,hideTrigger:G,showTrigger:K,showOnDialogEnter:!1,content:ye,theme:"inverted"===ae?"dark":"primary",containerSelector:q,disableDialogSlide:!1,moveBy:U,hideWhenReferenceHidden:X,referenceWrapperClassName:Y,tip:$&&!re,modifiers:oe,open:le?ue:void 0,forceRenderWithoutChildren:re},_))})),{closeButtonThemes:v,animationTypes:d,hideShowTriggers:p,colors:T,positions:E});export{W as TipseenContext,k as default};
2
2
  //# sourceMappingURL=Tipseen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tipseen.js","sources":["../../../../../src/components/Tipseen/Tipseen.tsx"],"sourcesContent":["import { forwardRef, Fragment, type ReactElement, useEffect, useMemo, useRef, useState } from \"react\";\nimport cx from \"classnames\";\nimport { AnimationType as AnimationTypeEnum, HideShowEvent as HideShowEventEnum } from \"../Dialog/DialogConstants\";\nimport { type DialogAnimationType, type DialogTriggerEvent } from \"../Dialog/Dialog.types\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport Tooltip from \"../../components/Tooltip/Tooltip\";\nimport IconButton from \"../../components/IconButton/IconButton\";\nimport { CloseSmall } from \"@vibe/icons\";\nimport TipseenTitle from \"./TipseenTitle\";\nimport {\n TIPSEEN_CLOSE_BUTTON_ARIA_LABEL,\n TipseenCloseButtonTheme as TipseenCloseButtonThemeEnum,\n TipseenColor as TipseenColorEnum\n} from \"./TipseenConstants\";\nimport { type TipseenCloseButtonTheme, type TipseenColor } from \"./Tipseen.types\";\nimport { type ElementContent, type VibeComponentProps, withStaticProps } from \"../../types\";\nimport { type MoveBy } from \"../../types/MoveBy\";\nimport { type Modifier } from \"react-popper\";\nimport { ComponentDefaultTestId } from \"../../tests/constants\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport Text from \"../Text/Text\";\nimport styles from \"./Tipseen.module.scss\";\nimport { ButtonColor } from \"../Button/ButtonConstants\";\nimport React from \"react\";\nimport { type TooltipPositions } from \"../Tooltip/Tooltip.types\";\nimport { TooltipPositions as TooltipPositionsEnum } from \"../Tooltip/TooltipConstants\";\n\nexport interface TipseenProps extends VibeComponentProps {\n /**\n * Class name applied to the Tipseen title.\n */\n titleClassName?: string;\n /**\n * The position of the Tipseen relative to the target element.\n */\n position?: TooltipPositions;\n /**\n * The animation type used for showing/hiding the Tipseen.\n */\n animationType?: DialogAnimationType;\n /**\n * The delay in milliseconds before hiding the Tipseen.\n */\n hideDelay?: number;\n /**\n * The delay in milliseconds before showing the Tipseen.\n */\n showDelay?: number;\n /**\n * The title text of the Tipseen.\n */\n title?: string;\n /**\n * If true, hides the close button.\n */\n hideCloseButton?: boolean;\n /**\n * The child element that triggers the Tipseen.\n */\n children?: ReactElement;\n /**\n * The CSS selector of the container where the Tipseen should be rendered.\n */\n containerSelector?: string;\n /**\n * Events that trigger hiding the Tipseen.\n */\n hideTrigger?: DialogTriggerEvent | Array<DialogTriggerEvent>;\n /**\n * Events that trigger showing the Tipseen.\n */\n showTrigger?: DialogTriggerEvent | Array<DialogTriggerEvent>;\n /**\n * The width of the Tipseen.\n */\n width?: number;\n /**\n * Offset values for positioning adjustments.\n */\n moveBy?: MoveBy;\n /**\n * If true, hides the Tipseen when the reference element is hidden.\n */\n hideWhenReferenceHidden?: boolean;\n /**\n * Class name applied to the reference wrapper element.\n */\n referenceWrapperClassName?: string;\n /**\n * If false, hides the arrow of the Tipseen.\n */\n tip?: boolean;\n /**\n * Class name applied to the Tipseen arrow.\n */\n tooltipArrowClassName?: string;\n /**\n * Custom Popper.js modifiers.\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers?: Array<Modifier<unknown>>;\n /**\n * The aria-label for the close button.\n */\n closeAriaLabel?: string;\n /**\n * Callback fired when the Tipseen is closed.\n */\n onClose?: (event?: React.MouseEvent<HTMLButtonElement>) => void;\n /**\n * The content displayed inside the Tipseen.\n */\n content: ElementContent;\n /**\n * The theme of the Tipseen close button.\n */\n closeButtonTheme?: TipseenCloseButtonTheme;\n /**\n * If true, renders the Tipseen as a floating element without a reference.\n */\n floating?: boolean;\n /**\n * The color theme of the Tipseen.\n */\n color?: TipseenColor;\n}\n\nexport const TipseenContext = React.createContext<TipseenColor>(\"primary\");\n\nconst Tipseen = forwardRef(\n (\n {\n className,\n id,\n position = \"bottom\",\n animationType = \"expand\",\n hideDelay = 0,\n showDelay = 100,\n title,\n titleClassName,\n hideCloseButton,\n closeButtonTheme = \"light\",\n onClose,\n closeAriaLabel,\n children = null,\n content,\n containerSelector,\n hideTrigger = [],\n showTrigger = [],\n width,\n moveBy,\n hideWhenReferenceHidden = false,\n referenceWrapperClassName,\n tip = true,\n tooltipArrowClassName,\n modifiers = [],\n floating = false,\n color: colorProp,\n \"data-testid\": dataTestId\n }: TipseenProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n const color = colorProp ?? \"inverted\";\n\n const defaultDelayOpen =\n Array.isArray(showTrigger) && Array.isArray(hideTrigger) && showTrigger.length === 0 && showDelay > 0;\n\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n const [delayedOpen, setDelayOpen] = useState(!defaultDelayOpen);\n const overrideCloseAriaLabel = closeAriaLabel || TIPSEEN_CLOSE_BUTTON_ARIA_LABEL;\n\n useEffect(() => {\n let timeout: NodeJS.Timeout;\n if (showDelay) {\n timeout = setTimeout(() => {\n setDelayOpen(true);\n }, showDelay);\n }\n return () => {\n clearTimeout(timeout);\n };\n }, [showDelay, setDelayOpen]);\n\n const textColor = useMemo(() => {\n return color === \"inverted\" ? \"onInverted\" : \"onPrimary\";\n }, [color]);\n const closeButtonColor = useMemo(() => {\n if (closeButtonTheme === \"light\") {\n return color === \"inverted\" ? ButtonColor.ON_INVERTED_BACKGROUND : ButtonColor.ON_PRIMARY_COLOR;\n } else {\n return closeButtonTheme;\n }\n }, [color, closeButtonTheme]);\n\n const TipseenWrapper = ref || id ? \"div\" : Fragment;\n const tooltipContent = (\n <div>\n <div className={cx(styles.tipseenHeader)}>\n {hideCloseButton ? null : (\n <IconButton\n hideTooltip\n className={cx(styles.tipseenCloseButton, {\n [styles.dark]: closeButtonTheme === \"dark\" || closeButtonTheme === \"fixed-dark\"\n })}\n onClick={onClose}\n size=\"xs\"\n kind=\"tertiary\"\n // @ts-ignore\n color={closeButtonColor}\n ariaLabel={overrideCloseAriaLabel}\n icon={CloseSmall}\n />\n )}\n <TipseenTitle text={title} className={cx(styles.tipseenTitle, titleClassName)} />\n </div>\n <Text color={textColor} type=\"text2\" element=\"p\" className={cx(styles.tipseenContent)}>\n <TipseenContext.Provider value={color}>{content}</TipseenContext.Provider>\n </Text>\n </div>\n );\n\n return (\n <TipseenWrapper ref={mergedRef} id={id} data-testid={dataTestId || getTestId(ComponentDefaultTestId.TIPSEEN, id)}>\n <Tooltip\n className={cx(styles.tipseenWrapper, className, {\n [styles.tipseenWrapperWithoutCustomWidth]: !width,\n [styles.floating]: floating\n })}\n maxWidth={width}\n arrowClassName={tooltipArrowClassName}\n style={width ? { width } : undefined}\n shouldShowOnMount={!defaultDelayOpen}\n position={position}\n animationType={animationType}\n hideDelay={hideDelay}\n showDelay={0}\n hideTrigger={hideTrigger}\n showTrigger={showTrigger}\n showOnDialogEnter={false}\n content={tooltipContent}\n theme={color === \"inverted\" ? \"dark\" : \"primary\"}\n containerSelector={containerSelector}\n disableDialogSlide={false}\n moveBy={moveBy}\n hideWhenReferenceHidden={hideWhenReferenceHidden}\n referenceWrapperClassName={referenceWrapperClassName}\n tip={tip && !floating}\n modifiers={modifiers}\n open={defaultDelayOpen ? delayedOpen : undefined}\n forceRenderWithoutChildren={floating}\n >\n {children}\n </Tooltip>\n </TipseenWrapper>\n );\n }\n);\n\ninterface TipseenStaticProps {\n closeButtonThemes: typeof TipseenCloseButtonThemeEnum;\n animationTypes: typeof AnimationTypeEnum;\n hideShowTriggers: typeof HideShowEventEnum;\n colors: typeof TipseenColorEnum;\n positions: typeof TooltipPositionsEnum;\n}\n\nexport default withStaticProps<TipseenProps, TipseenStaticProps>(Tipseen, {\n closeButtonThemes: TipseenCloseButtonThemeEnum,\n animationTypes: AnimationTypeEnum,\n hideShowTriggers: HideShowEventEnum,\n colors: TipseenColorEnum,\n positions: TooltipPositionsEnum\n});\n"],"names":["TipseenContext","React","createContext","withStaticProps","forwardRef","_ref","ref","className","id","_ref$position","position","_ref$animationType","animationType","_ref$hideDelay","hideDelay","_ref$showDelay","showDelay","title","titleClassName","hideCloseButton","_ref$closeButtonTheme","closeButtonTheme","onClose","closeAriaLabel","_ref$children","children","content","containerSelector","_ref$hideTrigger","hideTrigger","_ref$showTrigger","showTrigger","width","moveBy","_ref$hideWhenReferenc","hideWhenReferenceHidden","referenceWrapperClassName","_ref$tip","tip","tooltipArrowClassName","_ref$modifiers","modifiers","_ref$floating","floating","colorProp","color","dataTestId","defaultDelayOpen","Array","isArray","length","componentRef","useRef","mergedRef","useMergeRef","_useState","useState","_useState2","_slicedToArray","delayedOpen","setDelayOpen","overrideCloseAriaLabel","TIPSEEN_CLOSE_BUTTON_ARIA_LABEL","useEffect","timeout","setTimeout","clearTimeout","textColor","useMemo","closeButtonColor","ButtonColor","ON_INVERTED_BACKGROUND","ON_PRIMARY_COLOR","TipseenWrapper","Fragment","tooltipContent","createElement","cx","styles","tipseenHeader","IconButton","hideTooltip","tipseenCloseButton","_defineProperty","dark","onClick","size","kind","ariaLabel","icon","CloseSmall","TipseenTitle","text","tipseenTitle","Text","type","element","tipseenContent","Provider","value","getTestId","ComponentDefaultTestId","TIPSEEN","Tooltip","tipseenWrapper","tipseenWrapperWithoutCustomWidth","maxWidth","arrowClassName","style","undefined","shouldShowOnMount","showOnDialogEnter","theme","disableDialogSlide","open","forceRenderWithoutChildren","closeButtonThemes","TipseenCloseButtonThemeEnum","animationTypes","AnimationTypeEnum","hideShowTriggers","HideShowEventEnum","colors","TipseenColorEnum","positions","TooltipPositionsEnum"],"mappings":"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AAuBC,QAAS9F,IAC3GP,EAAC2E,cAAA2B,EACC,CAAAhG,UAAWsE,EAAGC,EAAO0B,eAAgBjG,EAAS4E,EAAAA,EAAA,CAAA,EAC3CL,EAAO2B,kCAAoCzE,GAC3C8C,EAAOnC,SAAWA,KAErB+D,SAAU1E,EACV2E,eAAgBpE,GAChBqE,MAAO5E,EAAQ,CAAEA,MAAAA,QAAU6E,EAC3BC,mBAAoB/D,GACpBrC,SAAUA,EACVE,cAAeA,EACfE,UAAWA,EACXE,UAAW,EACXa,YAAaA,EACbE,YAAaA,EACbgF,mBAAmB,EACnBrF,QAASiD,GACTqC,MAAiB,aAAVnE,GAAuB,OAAS,UACvClB,kBAAmBA,EACnBsF,oBAAoB,EACpBhF,OAAQA,EACRE,wBAAyBA,EACzBC,0BAA2BA,EAC3BE,IAAKA,KAAQK,GACbF,UAAWA,GACXyE,KAAMnE,GAAmBY,QAAckD,EACvCM,2BAA4BxE,IAE3BlB,GAIT,IAWwE,CACxE2F,kBAAmBC,EACnBC,eAAgBC,EAChBC,iBAAkBC,EAClBC,OAAQC,EACRC,UAAWC"}
1
+ {"version":3,"file":"Tipseen.js","sources":["../../../../../src/components/Tipseen/Tipseen.tsx"],"sourcesContent":["import { forwardRef, Fragment, type ReactElement, useEffect, useMemo, useRef, useState } from \"react\";\nimport cx from \"classnames\";\nimport { AnimationType as AnimationTypeEnum, HideShowEvent as HideShowEventEnum } from \"../Dialog/DialogConstants\";\nimport { type DialogAnimationType, type DialogTriggerEvent } from \"../Dialog/Dialog.types\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport Tooltip from \"../../components/Tooltip/Tooltip\";\nimport IconButton from \"../../components/IconButton/IconButton\";\nimport { CloseSmall } from \"@vibe/icons\";\nimport TipseenTitle from \"./TipseenTitle\";\nimport {\n TIPSEEN_CLOSE_BUTTON_ARIA_LABEL,\n TipseenCloseButtonTheme as TipseenCloseButtonThemeEnum,\n TipseenColor as TipseenColorEnum\n} from \"./TipseenConstants\";\nimport { type TipseenCloseButtonTheme, type TipseenColor } from \"./Tipseen.types\";\nimport { type ElementContent, type VibeComponentProps, withStaticProps } from \"../../types\";\nimport { type MoveBy } from \"../../types/MoveBy\";\nimport { type Modifier } from \"react-popper\";\nimport { ComponentDefaultTestId } from \"../../tests/constants\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport Text from \"../Text/Text\";\nimport styles from \"./Tipseen.module.scss\";\nimport React from \"react\";\nimport { type TooltipPositions } from \"../Tooltip/Tooltip.types\";\nimport { TooltipPositions as TooltipPositionsEnum } from \"../Tooltip/TooltipConstants\";\n\nexport interface TipseenProps extends VibeComponentProps {\n /**\n * Class name applied to the Tipseen title.\n */\n titleClassName?: string;\n /**\n * The position of the Tipseen relative to the target element.\n */\n position?: TooltipPositions;\n /**\n * The animation type used for showing/hiding the Tipseen.\n */\n animationType?: DialogAnimationType;\n /**\n * The delay in milliseconds before hiding the Tipseen.\n */\n hideDelay?: number;\n /**\n * The delay in milliseconds before showing the Tipseen.\n */\n showDelay?: number;\n /**\n * The title text of the Tipseen.\n */\n title?: string;\n /**\n * If true, hides the close button.\n */\n hideCloseButton?: boolean;\n /**\n * The child element that triggers the Tipseen.\n */\n children?: ReactElement;\n /**\n * The CSS selector of the container where the Tipseen should be rendered.\n */\n containerSelector?: string;\n /**\n * Events that trigger hiding the Tipseen.\n */\n hideTrigger?: DialogTriggerEvent | Array<DialogTriggerEvent>;\n /**\n * Events that trigger showing the Tipseen.\n */\n showTrigger?: DialogTriggerEvent | Array<DialogTriggerEvent>;\n /**\n * The width of the Tipseen.\n */\n width?: number;\n /**\n * Offset values for positioning adjustments.\n */\n moveBy?: MoveBy;\n /**\n * If true, hides the Tipseen when the reference element is hidden.\n */\n hideWhenReferenceHidden?: boolean;\n /**\n * Class name applied to the reference wrapper element.\n */\n referenceWrapperClassName?: string;\n /**\n * If false, hides the arrow of the Tipseen.\n */\n tip?: boolean;\n /**\n * Class name applied to the Tipseen arrow.\n */\n tooltipArrowClassName?: string;\n /**\n * Custom Popper.js modifiers.\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers?: Array<Modifier<unknown>>;\n /**\n * The aria-label for the close button.\n */\n closeAriaLabel?: string;\n /**\n * Callback fired when the Tipseen is closed.\n */\n onClose?: (event?: React.MouseEvent<HTMLButtonElement>) => void;\n /**\n * The content displayed inside the Tipseen.\n */\n content: ElementContent;\n /**\n * The theme of the Tipseen close button.\n */\n closeButtonTheme?: TipseenCloseButtonTheme;\n /**\n * If true, renders the Tipseen as a floating element without a reference.\n */\n floating?: boolean;\n /**\n * The color theme of the Tipseen.\n */\n color?: TipseenColor;\n}\n\nexport const TipseenContext = React.createContext<TipseenColor>(\"primary\");\n\nconst Tipseen = forwardRef(\n (\n {\n className,\n id,\n position = \"bottom\",\n animationType = \"expand\",\n hideDelay = 0,\n showDelay = 100,\n title,\n titleClassName,\n hideCloseButton,\n closeButtonTheme = \"light\",\n onClose,\n closeAriaLabel,\n children = null,\n content,\n containerSelector,\n hideTrigger = [],\n showTrigger = [],\n width,\n moveBy,\n hideWhenReferenceHidden = false,\n referenceWrapperClassName,\n tip = true,\n tooltipArrowClassName,\n modifiers = [],\n floating = false,\n color: colorProp,\n \"data-testid\": dataTestId\n }: TipseenProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n const color = colorProp ?? \"inverted\";\n\n const defaultDelayOpen =\n Array.isArray(showTrigger) && Array.isArray(hideTrigger) && showTrigger.length === 0 && showDelay > 0;\n\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n const [delayedOpen, setDelayOpen] = useState(!defaultDelayOpen);\n const overrideCloseAriaLabel = closeAriaLabel || TIPSEEN_CLOSE_BUTTON_ARIA_LABEL;\n\n useEffect(() => {\n let timeout: NodeJS.Timeout;\n if (showDelay) {\n timeout = setTimeout(() => {\n setDelayOpen(true);\n }, showDelay);\n }\n return () => {\n clearTimeout(timeout);\n };\n }, [showDelay, setDelayOpen]);\n\n const textColor = useMemo(() => {\n return color === \"inverted\" ? \"onInverted\" : \"onPrimary\";\n }, [color]);\n const closeButtonColor = useMemo(() => {\n if (closeButtonTheme === \"light\") {\n return color === \"inverted\" ? \"on-inverted-background\" : \"on-primary-color\";\n } else {\n return closeButtonTheme;\n }\n }, [color, closeButtonTheme]);\n\n const TipseenWrapper = ref || id ? \"div\" : Fragment;\n const tooltipContent = (\n <div>\n <div className={cx(styles.tipseenHeader)}>\n {hideCloseButton ? null : (\n <IconButton\n hideTooltip\n className={cx(styles.tipseenCloseButton, {\n [styles.dark]: closeButtonTheme === \"dark\" || closeButtonTheme === \"fixed-dark\"\n })}\n onClick={onClose}\n size=\"xs\"\n kind=\"tertiary\"\n // @ts-ignore\n color={closeButtonColor}\n ariaLabel={overrideCloseAriaLabel}\n icon={CloseSmall}\n />\n )}\n <TipseenTitle text={title} className={cx(styles.tipseenTitle, titleClassName)} />\n </div>\n <Text color={textColor} type=\"text2\" element=\"p\" className={cx(styles.tipseenContent)}>\n <TipseenContext.Provider value={color}>{content}</TipseenContext.Provider>\n </Text>\n </div>\n );\n\n return (\n <TipseenWrapper ref={mergedRef} id={id} data-testid={dataTestId || getTestId(ComponentDefaultTestId.TIPSEEN, id)}>\n <Tooltip\n className={cx(styles.tipseenWrapper, className, {\n [styles.tipseenWrapperWithoutCustomWidth]: !width,\n [styles.floating]: floating\n })}\n maxWidth={width}\n arrowClassName={tooltipArrowClassName}\n style={width ? { width } : undefined}\n shouldShowOnMount={!defaultDelayOpen}\n position={position}\n animationType={animationType}\n hideDelay={hideDelay}\n showDelay={0}\n hideTrigger={hideTrigger}\n showTrigger={showTrigger}\n showOnDialogEnter={false}\n content={tooltipContent}\n theme={color === \"inverted\" ? \"dark\" : \"primary\"}\n containerSelector={containerSelector}\n disableDialogSlide={false}\n moveBy={moveBy}\n hideWhenReferenceHidden={hideWhenReferenceHidden}\n referenceWrapperClassName={referenceWrapperClassName}\n tip={tip && !floating}\n modifiers={modifiers}\n open={defaultDelayOpen ? delayedOpen : undefined}\n forceRenderWithoutChildren={floating}\n >\n {children}\n </Tooltip>\n </TipseenWrapper>\n );\n }\n);\n\ninterface TipseenStaticProps {\n closeButtonThemes: typeof TipseenCloseButtonThemeEnum;\n animationTypes: typeof AnimationTypeEnum;\n hideShowTriggers: typeof HideShowEventEnum;\n colors: typeof TipseenColorEnum;\n positions: typeof TooltipPositionsEnum;\n}\n\nexport default withStaticProps<TipseenProps, TipseenStaticProps>(Tipseen, {\n closeButtonThemes: TipseenCloseButtonThemeEnum,\n animationTypes: AnimationTypeEnum,\n hideShowTriggers: HideShowEventEnum,\n colors: TipseenColorEnum,\n positions: TooltipPositionsEnum\n});\n"],"names":["TipseenContext","React","createContext","withStaticProps","forwardRef","_ref","ref","className","id","_ref$position","position","_ref$animationType","animationType","_ref$hideDelay","hideDelay","_ref$showDelay","showDelay","title","titleClassName","hideCloseButton","_ref$closeButtonTheme","closeButtonTheme","onClose","closeAriaLabel","_ref$children","children","content","containerSelector","_ref$hideTrigger","hideTrigger","_ref$showTrigger","showTrigger","width","moveBy","_ref$hideWhenReferenc","hideWhenReferenceHidden","referenceWrapperClassName","_ref$tip","tip","tooltipArrowClassName","_ref$modifiers","modifiers","_ref$floating","floating","colorProp","color","dataTestId","defaultDelayOpen","Array","isArray","length","componentRef","useRef","mergedRef","useMergeRef","_useState","useState","_useState2","_slicedToArray","delayedOpen","setDelayOpen","overrideCloseAriaLabel","TIPSEEN_CLOSE_BUTTON_ARIA_LABEL","useEffect","timeout","setTimeout","clearTimeout","textColor","useMemo","closeButtonColor","TipseenWrapper","Fragment","tooltipContent","createElement","cx","styles","tipseenHeader","IconButton","hideTooltip","tipseenCloseButton","_defineProperty","dark","onClick","size","kind","ariaLabel","icon","CloseSmall","TipseenTitle","text","tipseenTitle","Text","type","element","tipseenContent","Provider","value","getTestId","ComponentDefaultTestId","TIPSEEN","Tooltip","tipseenWrapper","tipseenWrapperWithoutCustomWidth","maxWidth","arrowClassName","style","undefined","shouldShowOnMount","showOnDialogEnter","theme","disableDialogSlide","open","forceRenderWithoutChildren","closeButtonThemes","TipseenCloseButtonThemeEnum","animationTypes","AnimationTypeEnum","hideShowTriggers","HideShowEventEnum","colors","TipseenColorEnum","positions","TooltipPositionsEnum"],"mappings":"++BA8HO,IAAMA,EAAiBC,EAAMC,cAA4B,WA4IjDC,EAAAA,EA1ICC,GACd,SAAAC,EA8BEC,GACE,IA7BAC,EAASF,EAATE,UACAC,EAAEH,EAAFG,GAAEC,EAAAJ,EACFK,SAAAA,OAAW,IAAHD,EAAG,SAAQA,EAAAE,EAAAN,EACnBO,cAAAA,OAAgB,IAAHD,EAAG,SAAQA,EAAAE,EAAAR,EACxBS,UAAAA,OAAY,IAAHD,EAAG,EAACA,EAAAE,EAAAV,EACbW,UAAAA,OAAY,IAAHD,EAAG,IAAGA,EACfE,EAAKZ,EAALY,MACAC,EAAcb,EAAda,eACAC,EAAed,EAAfc,gBAAeC,EAAAf,EACfgB,iBAAAA,OAAmB,IAAHD,EAAG,QAAOA,EAC1BE,EAAOjB,EAAPiB,QACAC,EAAclB,EAAdkB,eAAcC,EAAAnB,EACdoB,SAAAA,OAAW,IAAHD,EAAG,KAAIA,EACfE,EAAOrB,EAAPqB,QACAC,EAAiBtB,EAAjBsB,kBAAiBC,EAAAvB,EACjBwB,YAAAA,OAAc,IAAHD,EAAG,GAAEA,EAAAE,EAAAzB,EAChB0B,YAAAA,OAAc,IAAHD,EAAG,GAAEA,EAChBE,EAAK3B,EAAL2B,MACAC,EAAM5B,EAAN4B,OAAMC,EAAA7B,EACN8B,wBAAAA,OAA0B,IAAHD,GAAQA,EAC/BE,EAAyB/B,EAAzB+B,0BAAyBC,EAAAhC,EACzBiC,IAAAA,OAAM,IAAHD,GAAOA,EACVE,GAAqBlC,EAArBkC,sBAAqBC,GAAAnC,EACrBoC,UAAAA,QAAY,IAAHD,GAAG,GAAEA,GAAAE,GAAArC,EACdsC,SAAAA,QAAW,IAAHD,IAAQA,GACTE,GAASvC,EAAhBwC,MACeC,GA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,SAAQ,CAACC,MAAOnD,IAAQnB,KAK9C,OACEzB,gBAACqE,GAAc,CAAChE,IAAK+C,GAAW7C,GAAIA,EAAiB,cAAAsC,IAAcmD,EAAUC,EAAuBC,QAAS3F,IAC3GP,EAACwE,cAAA2B,EACC,CAAA7F,UAAWmE,EAAGC,EAAO0B,eAAgB9F,EAASyE,EAAAA,EAAA,CAAA,EAC3CL,EAAO2B,kCAAoCtE,GAC3C2C,EAAOhC,SAAWA,KAErB4D,SAAUvE,EACVwE,eAAgBjE,GAChBkE,MAAOzE,EAAQ,CAAEA,MAAAA,QAAU0E,EAC3BC,mBAAoB5D,GACpBrC,SAAUA,EACVE,cAAeA,EACfE,UAAWA,EACXE,UAAW,EACXa,YAAaA,EACbE,YAAaA,EACb6E,mBAAmB,EACnBlF,QAAS8C,GACTqC,MAAiB,aAAVhE,GAAuB,OAAS,UACvClB,kBAAmBA,EACnBmF,oBAAoB,EACpB7E,OAAQA,EACRE,wBAAyBA,EACzBC,0BAA2BA,EAC3BE,IAAKA,IAAQK,GACbF,UAAWA,GACXsE,KAAMhE,GAAmBY,QAAc+C,EACvCM,2BAA4BrE,IAE3BlB,GAIT,IAWwE,CACxEwF,kBAAmBC,EACnBC,eAAgBC,EAChBC,iBAAkBC,EAClBC,OAAQC,EACRC,UAAWC"}
@@ -1,2 +1,2 @@
1
- import t,{useContext as s,useMemo as e}from"react";import i from"classnames";import o from"../Button/Button.js";import{TipseenColor as n,SUBMIT_BUTTON_TEXT as m,DISMISS_BUTTON_TEXT as r}from"./TipseenConstants.js";import l from"./TipseenBasicContent.js";import a from"./TipseenContent.module.scss.js";import{getTestId as u}from"../../tests/testIds.js";import{ComponentDefaultTestId as c}from"../../tests/constants.js";import{TipseenContext as d}from"./Tipseen.js";import{ButtonColor as p}from"../Button/ButtonConstants.js";var E=function(E){var N=E.id,T=E.title,f=E.titleClassName,C=E.children,I=void 0===C?null:C,B=E.hideDismiss,j=void 0===B||B,S=E.hideSubmit,_=E.submitButtonText,v=void 0===_?m:_,O=E.submitButtonIcon,D=E.onSubmit,R=E.dismissButtonText,b=void 0===R?r:R,k=E.onDismiss,h=s(d),x=e((function(){return h===n.INVERTED?p.ON_INVERTED_BACKGROUND:p.ON_PRIMARY_COLOR}),[h]);return t.createElement(l,{title:T,titleClassName:f,id:N},I?t.createElement("span",null,I):null,t.createElement("div",{className:i(a.buttons)},j?null:t.createElement(o,{kind:"tertiary",color:x,className:a.dismiss,size:"small",onClick:k,"data-testid":u(c.TIPSEEN_CONTENT_DISMISS)},b),S?null:t.createElement(o,{kind:"primary",color:x,size:"small",onClick:D,"data-testid":u(c.TIPSEEN_CONTENT_SUBMIT),leftIcon:O},v)))};export{E as default};
1
+ import t,{useContext as e,useMemo as s}from"react";import i from"classnames";import{TipseenColor as o,SUBMIT_BUTTON_TEXT as n,DISMISS_BUTTON_TEXT as r}from"./TipseenConstants.js";import m from"./TipseenBasicContent.js";import l from"./TipseenContent.module.scss.js";import{getTestId as a}from"../../tests/testIds.js";import{ComponentDefaultTestId as c}from"../../tests/constants.js";import{TipseenContext as d}from"./Tipseen.js";import u from"../../../components/button/dist/Button/Button.js";var p=function(p){var T=p.id,f=p.title,E=p.titleClassName,N=p.children,C=void 0===N?null:N,I=p.hideDismiss,v=void 0===I||I,S=p.hideSubmit,b=p.submitButtonText,j=void 0===b?n:b,B=p.submitButtonIcon,k=p.onSubmit,D=p.dismissButtonText,_=void 0===D?r:D,h=p.onDismiss,x=e(d),y=s((function(){return x===o.INVERTED?"on-inverted-background":"on-primary-color"}),[x]);return t.createElement(m,{title:f,titleClassName:E,id:T},C?t.createElement("span",null,C):null,t.createElement("div",{className:i(l.buttons)},v?null:t.createElement(u,{kind:"tertiary",color:y,className:l.dismiss,size:"small",onClick:h,"data-testid":a(c.TIPSEEN_CONTENT_DISMISS)},_),S?null:t.createElement(u,{kind:"primary",color:y,size:"small",onClick:k,"data-testid":a(c.TIPSEEN_CONTENT_SUBMIT),leftIcon:B},j)))};export{p as default};
2
2
  //# sourceMappingURL=TipseenContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TipseenContent.js","sources":["../../../../../src/components/Tipseen/TipseenContent.tsx"],"sourcesContent":["import React, { type FC, useContext, useMemo } from \"react\";\nimport cx from \"classnames\";\nimport Button from \"../../components/Button/Button\";\nimport { DISMISS_BUTTON_TEXT, SUBMIT_BUTTON_TEXT, TipseenColor } from \"./TipseenConstants\";\nimport TipseenBasicContent from \"./TipseenBasicContent\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { type ElementContent } from \"../../types/ElementContent\";\nimport styles from \"./TipseenContent.module.scss\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId } from \"../../tests/constants\";\nimport { TipseenContext } from \"./Tipseen\";\nimport { ButtonColor } from \"../Button/ButtonConstants\";\nimport { type SubIcon } from \"../../types\";\n\nexport interface TipseenContentProps extends VibeComponentProps {\n /**\n * The title text displayed in the Tipseen content.\n */\n title?: string;\n /**\n * Class name applied to the Tipseen title.\n */\n titleClassName?: string;\n /**\n * If true, hides the dismiss button.\n */\n hideDismiss?: boolean;\n /**\n * The content inside the Tipseen.\n */\n children?: ElementContent;\n /**\n * If true, hides the submit button.\n */\n hideSubmit?: boolean;\n /**\n * The text displayed on the submit button.\n */\n submitButtonText?: string;\n /**\n * Icon to display in the submit button\n */\n submitButtonIcon?: SubIcon;\n /**\n * Callback fired when the submit button is clicked.\n */\n onSubmit?: (event: React.MouseEvent) => void;\n /**\n * The text displayed on the dismiss button.\n */\n dismissButtonText?: string;\n /**\n * Callback fired when the dismiss button is clicked.\n */\n onDismiss?: (event: React.MouseEvent) => void;\n}\n\nconst TipseenContent: FC<TipseenContentProps> = ({\n id,\n title,\n titleClassName,\n children = null,\n hideDismiss = true,\n hideSubmit,\n submitButtonText = SUBMIT_BUTTON_TEXT,\n submitButtonIcon,\n onSubmit,\n dismissButtonText = DISMISS_BUTTON_TEXT,\n onDismiss\n}) => {\n const color = useContext(TipseenContext);\n const buttonColor = useMemo(() => {\n return color === TipseenColor.INVERTED ? ButtonColor.ON_INVERTED_BACKGROUND : ButtonColor.ON_PRIMARY_COLOR;\n }, [color]);\n\n return (\n <TipseenBasicContent title={title} titleClassName={titleClassName} id={id}>\n {children ? <span>{children}</span> : null}\n <div className={cx(styles.buttons)}>\n {hideDismiss ? null : (\n <Button\n kind=\"tertiary\"\n color={buttonColor}\n className={styles.dismiss}\n size=\"small\"\n onClick={onDismiss}\n data-testid={getTestId(ComponentDefaultTestId.TIPSEEN_CONTENT_DISMISS)}\n >\n {dismissButtonText}\n </Button>\n )}\n {hideSubmit ? null : (\n <Button\n kind=\"primary\"\n color={buttonColor}\n size=\"small\"\n onClick={onSubmit}\n data-testid={getTestId(ComponentDefaultTestId.TIPSEEN_CONTENT_SUBMIT)}\n leftIcon={submitButtonIcon}\n >\n {submitButtonText}\n </Button>\n )}\n </div>\n </TipseenBasicContent>\n );\n};\n\nexport default TipseenContent;\n"],"names":["TipseenContent","_ref","id","title","titleClassName","_ref$children","children","_ref$hideDismiss","hideDismiss","hideSubmit","_ref$submitButtonText","submitButtonText","SUBMIT_BUTTON_TEXT","submitButtonIcon","onSubmit","_ref$dismissButtonTex","dismissButtonText","DISMISS_BUTTON_TEXT","onDismiss","color","useContext","TipseenContext","buttonColor","useMemo","TipseenColor","INVERTED","ButtonColor","ON_INVERTED_BACKGROUND","ON_PRIMARY_COLOR","React","createElement","TipseenBasicContent","className","cx","styles","buttons","Button","kind","dismiss","size","onClick","getTestId","ComponentDefaultTestId","TIPSEEN_CONTENT_DISMISS","TIPSEEN_CONTENT_SUBMIT","leftIcon"],"mappings":"2gBAyDA,IAAMA,EAA0C,SAA5BC,GAYf,IAXHC,EAAED,EAAFC,GACAC,EAAKF,EAALE,MACAC,EAAcH,EAAdG,eAAcC,EAAAJ,EACdK,SAAAA,OAAW,IAAHD,EAAG,KAAIA,EAAAE,EAAAN,EACfO,YAAAA,OAAc,IAAHD,GAAOA,EAClBE,EAAUR,EAAVQ,WAAUC,EAAAT,EACVU,iBAAAA,OAAmBC,IAAHF,EAAGE,EAAkBF,EACrCG,EAAgBZ,EAAhBY,iBACAC,EAAQb,EAARa,SAAQC,EAAAd,EACRe,kBAAAA,OAAoBC,IAAHF,EAAGE,EAAmBF,EACvCG,EAASjB,EAATiB,UAEMC,EAAQC,EAAWC,GACnBC,EAAcC,GAAQ,WAC1B,OAAOJ,IAAUK,EAAaC,SAAWC,EAAYC,uBAAyBD,EAAYE,gBAC5F,GAAG,CAACT,IAEJ,OACEU,EAAAC,cAACC,EAAmB,CAAC5B,MAAOA,EAAOC,eAAgBA,EAAgBF,GAAIA,GACpEI,EAAWuB,EAAAC,cAAA,OAAA,KAAOxB,GAAmB,KACtCuB,EAAAC,cAAA,MAAA,CAAKE,UAAWC,EAAGC,EAAOC,UACvB3B,EAAc,KACbqB,EAAAC,cAACM,EACC,CAAAC,KAAK,WACLlB,MAAOG,EACPU,UAAWE,EAAOI,QAClBC,KAAK,QACLC,QAAStB,gBACIuB,EAAUC,EAAuBC,0BAE7C3B,GAGJP,EAAa,KACZoB,EAACC,cAAAM,GACCC,KAAK,UACLlB,MAAOG,EACPiB,KAAK,QACLC,QAAS1B,EACI,cAAA2B,EAAUC,EAAuBE,wBAC9CC,SAAUhC,GAETF,IAMb"}
1
+ {"version":3,"file":"TipseenContent.js","sources":["../../../../../src/components/Tipseen/TipseenContent.tsx"],"sourcesContent":["import React, { type FC, useContext, useMemo } from \"react\";\nimport cx from \"classnames\";\nimport { DISMISS_BUTTON_TEXT, SUBMIT_BUTTON_TEXT, TipseenColor } from \"./TipseenConstants\";\nimport TipseenBasicContent from \"./TipseenBasicContent\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { type ElementContent } from \"../../types/ElementContent\";\nimport styles from \"./TipseenContent.module.scss\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId } from \"../../tests/constants\";\nimport { TipseenContext } from \"./Tipseen\";\nimport { Button } from \"@vibe/button\";\nimport { type SubIcon } from \"@vibe/icon\";\n\nexport interface TipseenContentProps extends VibeComponentProps {\n /**\n * The title text displayed in the Tipseen content.\n */\n title?: string;\n /**\n * Class name applied to the Tipseen title.\n */\n titleClassName?: string;\n /**\n * If true, hides the dismiss button.\n */\n hideDismiss?: boolean;\n /**\n * The content inside the Tipseen.\n */\n children?: ElementContent;\n /**\n * If true, hides the submit button.\n */\n hideSubmit?: boolean;\n /**\n * The text displayed on the submit button.\n */\n submitButtonText?: string;\n /**\n * Icon to display in the submit button\n */\n submitButtonIcon?: SubIcon;\n /**\n * Callback fired when the submit button is clicked.\n */\n onSubmit?: (event: React.MouseEvent) => void;\n /**\n * The text displayed on the dismiss button.\n */\n dismissButtonText?: string;\n /**\n * Callback fired when the dismiss button is clicked.\n */\n onDismiss?: (event: React.MouseEvent) => void;\n}\n\nconst TipseenContent: FC<TipseenContentProps> = ({\n id,\n title,\n titleClassName,\n children = null,\n hideDismiss = true,\n hideSubmit,\n submitButtonText = SUBMIT_BUTTON_TEXT,\n submitButtonIcon,\n onSubmit,\n dismissButtonText = DISMISS_BUTTON_TEXT,\n onDismiss\n}) => {\n const color = useContext(TipseenContext);\n const buttonColor = useMemo(() => {\n return color === TipseenColor.INVERTED ? \"on-inverted-background\" : \"on-primary-color\";\n }, [color]);\n\n return (\n <TipseenBasicContent title={title} titleClassName={titleClassName} id={id}>\n {children ? <span>{children}</span> : null}\n <div className={cx(styles.buttons)}>\n {hideDismiss ? null : (\n <Button\n kind=\"tertiary\"\n color={buttonColor}\n className={styles.dismiss}\n size=\"small\"\n onClick={onDismiss}\n data-testid={getTestId(ComponentDefaultTestId.TIPSEEN_CONTENT_DISMISS)}\n >\n {dismissButtonText}\n </Button>\n )}\n {hideSubmit ? null : (\n <Button\n kind=\"primary\"\n color={buttonColor}\n size=\"small\"\n onClick={onSubmit}\n data-testid={getTestId(ComponentDefaultTestId.TIPSEEN_CONTENT_SUBMIT)}\n leftIcon={submitButtonIcon}\n >\n {submitButtonText}\n </Button>\n )}\n </div>\n </TipseenBasicContent>\n );\n};\n\nexport default TipseenContent;\n"],"names":["TipseenContent","_ref","id","title","titleClassName","_ref$children","children","_ref$hideDismiss","hideDismiss","hideSubmit","_ref$submitButtonText","submitButtonText","SUBMIT_BUTTON_TEXT","submitButtonIcon","onSubmit","_ref$dismissButtonTex","dismissButtonText","DISMISS_BUTTON_TEXT","onDismiss","color","useContext","TipseenContext","buttonColor","useMemo","TipseenColor","INVERTED","React","createElement","TipseenBasicContent","className","cx","styles","buttons","Button","kind","dismiss","size","onClick","getTestId","ComponentDefaultTestId","TIPSEEN_CONTENT_DISMISS","TIPSEEN_CONTENT_SUBMIT","leftIcon"],"mappings":"6eAwDA,IAAMA,EAA0C,SAA5BC,GAYf,IAXHC,EAAED,EAAFC,GACAC,EAAKF,EAALE,MACAC,EAAcH,EAAdG,eAAcC,EAAAJ,EACdK,SAAAA,OAAW,IAAHD,EAAG,KAAIA,EAAAE,EAAAN,EACfO,YAAAA,OAAc,IAAHD,GAAOA,EAClBE,EAAUR,EAAVQ,WAAUC,EAAAT,EACVU,iBAAAA,OAAmBC,IAAHF,EAAGE,EAAkBF,EACrCG,EAAgBZ,EAAhBY,iBACAC,EAAQb,EAARa,SAAQC,EAAAd,EACRe,kBAAAA,OAAoBC,IAAHF,EAAGE,EAAmBF,EACvCG,EAASjB,EAATiB,UAEMC,EAAQC,EAAWC,GACnBC,EAAcC,GAAQ,WAC1B,OAAOJ,IAAUK,EAAaC,SAAW,yBAA2B,kBACtE,GAAG,CAACN,IAEJ,OACEO,EAAAC,cAACC,EAAmB,CAACzB,MAAOA,EAAOC,eAAgBA,EAAgBF,GAAIA,GACpEI,EAAWoB,EAAAC,cAAA,OAAA,KAAOrB,GAAmB,KACtCoB,EAAAC,cAAA,MAAA,CAAKE,UAAWC,EAAGC,EAAOC,UACvBxB,EAAc,KACbkB,EAAAC,cAACM,EACC,CAAAC,KAAK,WACLf,MAAOG,EACPO,UAAWE,EAAOI,QAClBC,KAAK,QACLC,QAASnB,gBACIoB,EAAUC,EAAuBC,0BAE7CxB,GAGJP,EAAa,KACZiB,EAACC,cAAAM,GACCC,KAAK,UACLf,MAAOG,EACPc,KAAK,QACLC,QAASvB,EACI,cAAAwB,EAAUC,EAAuBE,wBAC9CC,SAAU7B,GAETF,IAMb"}
@@ -1 +1 @@
1
- {"version":3,"file":"TipseenWizard.js","sources":["../../../../../src/components/Tipseen/TipseenWizard.tsx"],"sourcesContent":["import React, { type FC, useContext, useMemo } from \"react\";\nimport cx from \"classnames\";\nimport Steps, { type StepsProps } from \"../Steps/Steps\";\nimport TipseenBasicContent from \"./TipseenBasicContent\";\nimport styles from \"./TipseenWizard.module.scss\";\nimport { TipseenContext } from \"./Tipseen\";\nimport { TipseenColor } from \"./TipseenConstants\";\nimport { type ButtonSize, type ButtonType } from \"../Button\";\n\nconst FINISH_TEXT = \"Got it\";\n\nexport interface TipseenWizardProps extends StepsProps {\n /**\n * The title text displayed in the Tipseen Wizard.\n */\n title?: string;\n /**\n * Class name applied to the Tipseen title.\n */\n titleClassName?: string;\n /**\n * Callback fired when the wizard is completed.\n */\n onFinish?: (e: React.MouseEvent | React.KeyboardEvent) => void;\n}\n\nconst TipseenWizard: FC<TipseenWizardProps> = ({ id, title, onFinish, titleClassName, className, ...stepsProps }) => {\n const overrideStepsProps = stepsProps as StepsProps;\n const color = useContext(TipseenContext);\n const buttonColor = useMemo(() => {\n return color === TipseenColor.INVERTED ? \"on-inverted-background\" : \"on-primary-color\";\n }, [color]);\n\n const nextButtonProps = useMemo(\n () => ({\n kind: \"primary\" as ButtonType,\n size: \"small\" as ButtonSize\n }),\n []\n );\n const backButtonProps = useMemo(\n () => ({\n size: \"small\" as ButtonSize\n }),\n []\n );\n const finishButtonProps = useMemo(\n () => ({\n kind: \"primary\" as ButtonType,\n size: \"small\" as ButtonSize,\n children: FINISH_TEXT\n }),\n []\n );\n return (\n <TipseenBasicContent\n title={title}\n className={cx(styles.tipseenWizard, className)}\n titleClassName={titleClassName}\n id={id || \"wizard\"}\n >\n <Steps\n className={cx(styles.tipseenWizardWizard)}\n color={buttonColor}\n isContentOnTop\n areButtonsIconsHidden\n backButtonProps={backButtonProps}\n nextButtonProps={nextButtonProps}\n finishButtonProps={finishButtonProps}\n onFinish={onFinish}\n {...overrideStepsProps}\n />\n </TipseenBasicContent>\n );\n};\nexport default TipseenWizard;\n"],"names":["TipseenWizard","_a","id","title","onFinish","titleClassName","className","overrideStepsProps","__rest","color","useContext","TipseenContext","buttonColor","useMemo","TipseenColor","INVERTED","nextButtonProps","kind","size","backButtonProps","finishButtonProps","children","React","createElement","TipseenBasicContent","cx","styles","tipseenWizard","Steps","Object","assign","tipseenWizardWizard","isContentOnTop","areButtonsIconsHidden"],"mappings":"4VASA,IAiBMA,EAAwC,SAACC,GAAA,IAAEC,EAA+DD,EAA/DC,GAAIC,EAA2DF,EAA3DE,MAAOC,EAAoDH,EAApDG,SAAUC,EAA0CJ,EAA1CI,eAAgBC,EAA0BL,EAA1BK,UAC9EC,EADsGC,EAAAP,EAA/D,wDAEvCQ,EAAQC,EAAWC,GACnBC,EAAcC,GAAQ,WAC1B,OAAOJ,IAAUK,EAAaC,SAAW,yBAA2B,kBACtE,GAAG,CAACN,IAEEO,EAAkBH,GACtB,WAAA,MAAO,CACLI,KAAM,UACNC,KAAM,QACN,GACF,IAEIC,EAAkBN,GACtB,WAAA,MAAO,CACLK,KAAM,QACN,GACF,IAEIE,EAAoBP,GACxB,WAAA,MAAO,CACLI,KAAM,UACNC,KAAM,QACNG,SAzCc,SA0Cd,GACF,IAEF,OACEC,EAACC,cAAAC,EACC,CAAArB,MAAOA,EACPG,UAAWmB,EAAGC,EAAOC,cAAerB,GACpCD,eAAgBA,EAChBH,GAAIA,GAAM,UAEVoB,EAAAC,cAACK,EACCC,OAAAC,OAAA,CAAAxB,UAAWmB,EAAGC,EAAOK,qBACrBtB,MAAOG,EACPoB,kBACAC,uBAAqB,EACrBd,gBAAiBA,EACjBH,gBAAiBA,EACjBI,kBAAmBA,EACnBhB,SAAUA,GACNG,IAIZ"}
1
+ {"version":3,"file":"TipseenWizard.js","sources":["../../../../../src/components/Tipseen/TipseenWizard.tsx"],"sourcesContent":["import React, { type FC, useContext, useMemo } from \"react\";\nimport cx from \"classnames\";\nimport Steps, { type StepsProps } from \"../Steps/Steps\";\nimport TipseenBasicContent from \"./TipseenBasicContent\";\nimport styles from \"./TipseenWizard.module.scss\";\nimport { TipseenContext } from \"./Tipseen\";\nimport { TipseenColor } from \"./TipseenConstants\";\nimport { type ButtonSize, type ButtonType } from \"@vibe/button\";\n\nconst FINISH_TEXT = \"Got it\";\n\nexport interface TipseenWizardProps extends StepsProps {\n /**\n * The title text displayed in the Tipseen Wizard.\n */\n title?: string;\n /**\n * Class name applied to the Tipseen title.\n */\n titleClassName?: string;\n /**\n * Callback fired when the wizard is completed.\n */\n onFinish?: (e: React.MouseEvent | React.KeyboardEvent) => void;\n}\n\nconst TipseenWizard: FC<TipseenWizardProps> = ({ id, title, onFinish, titleClassName, className, ...stepsProps }) => {\n const overrideStepsProps = stepsProps as StepsProps;\n const color = useContext(TipseenContext);\n const buttonColor = useMemo(() => {\n return color === TipseenColor.INVERTED ? \"on-inverted-background\" : \"on-primary-color\";\n }, [color]);\n\n const nextButtonProps = useMemo(\n () => ({\n kind: \"primary\" as ButtonType,\n size: \"small\" as ButtonSize\n }),\n []\n );\n const backButtonProps = useMemo(\n () => ({\n size: \"small\" as ButtonSize\n }),\n []\n );\n const finishButtonProps = useMemo(\n () => ({\n kind: \"primary\" as ButtonType,\n size: \"small\" as ButtonSize,\n children: FINISH_TEXT\n }),\n []\n );\n return (\n <TipseenBasicContent\n title={title}\n className={cx(styles.tipseenWizard, className)}\n titleClassName={titleClassName}\n id={id || \"wizard\"}\n >\n <Steps\n className={cx(styles.tipseenWizardWizard)}\n color={buttonColor}\n isContentOnTop\n areButtonsIconsHidden\n backButtonProps={backButtonProps}\n nextButtonProps={nextButtonProps}\n finishButtonProps={finishButtonProps}\n onFinish={onFinish}\n {...overrideStepsProps}\n />\n </TipseenBasicContent>\n );\n};\nexport default TipseenWizard;\n"],"names":["TipseenWizard","_a","id","title","onFinish","titleClassName","className","overrideStepsProps","__rest","color","useContext","TipseenContext","buttonColor","useMemo","TipseenColor","INVERTED","nextButtonProps","kind","size","backButtonProps","finishButtonProps","children","React","createElement","TipseenBasicContent","cx","styles","tipseenWizard","Steps","Object","assign","tipseenWizardWizard","isContentOnTop","areButtonsIconsHidden"],"mappings":"4VASA,IAiBMA,EAAwC,SAACC,GAAA,IAAEC,EAA+DD,EAA/DC,GAAIC,EAA2DF,EAA3DE,MAAOC,EAAoDH,EAApDG,SAAUC,EAA0CJ,EAA1CI,eAAgBC,EAA0BL,EAA1BK,UAC9EC,EADsGC,EAAAP,EAA/D,wDAEvCQ,EAAQC,EAAWC,GACnBC,EAAcC,GAAQ,WAC1B,OAAOJ,IAAUK,EAAaC,SAAW,yBAA2B,kBACtE,GAAG,CAACN,IAEEO,EAAkBH,GACtB,WAAA,MAAO,CACLI,KAAM,UACNC,KAAM,QACN,GACF,IAEIC,EAAkBN,GACtB,WAAA,MAAO,CACLK,KAAM,QACN,GACF,IAEIE,EAAoBP,GACxB,WAAA,MAAO,CACLI,KAAM,UACNC,KAAM,QACNG,SAzCc,SA0Cd,GACF,IAEF,OACEC,EAACC,cAAAC,EACC,CAAArB,MAAOA,EACPG,UAAWmB,EAAGC,EAAOC,cAAerB,GACpCD,eAAgBA,EAChBH,GAAIA,GAAM,UAEVoB,EAAAC,cAACK,EACCC,OAAAC,OAAA,CAAAxB,UAAWmB,EAAGC,EAAOK,qBACrBtB,MAAOG,EACPoB,kBACAC,uBAAqB,EACrBd,gBAAiBA,EACjBH,gBAAiBA,EACjBI,kBAAmBA,EACnBhB,SAAUA,GACNG,IAIZ"}
@@ -1,2 +1,2 @@
1
- import{defineProperty as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as e}from"../../../_virtual/_tslib.js";import{camelCase as o}from"es-toolkit";import{getTestId as i,ComponentDefaultTestId as n}from"../../tests/testIds.js";import r from"classnames";import s,{useRef as a,useMemo as l,useCallback as c,useEffect as m}from"react";import{CSSTransition as u}from"react-transition-group";import p from"../Text/Text.js";import d from"../Loader/Loader.js";import f from"../Flex/Flex.js";import v from"./ToastLink/ToastLink.js";import T from"./ToastButton/ToastButton.js";import{ToastType as j,ToastActionType as y}from"./ToastConstants.js";import{getIcon as h}from"./ToastHelpers.js";import{NOOP as g}from"../../utils/function-utils.js";import{getStyle as x}from"../../helpers/typesciptCssModulesHelper.js";import{withStaticPropsWithoutForwardRef as E}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import N from"./Toast.module.scss.js";import k from"../IconButton/IconButton.js";import C from"../../hooks/usePrevious/index.js";import b from"../../../icons/dist/react/CloseSmall.js";var B=E((function(j){var y=j.open,E=void 0!==y&&y,B=j.loading,L=void 0!==B&&B,O=j.autoHideDuration,A=void 0===O?null:O,w=j.type,S=void 0===w?"normal":w,_=j.icon,H=j.hideIcon,I=void 0!==H&&H,P=j.action,z=j.actions,F=j.children,D=j.closeable,M=void 0===D||D,R=j.onClose,U=void 0===R?g:R,q=j.className,G=j.id,J=j.closeButtonAriaLabel,K=void 0===J?"Close":J,Q=j["data-testid"],V=a(null),W=a(null),X=C(null==z?void 0:z.length),Y=l((function(){return z?z.filter((function(t){return"link"===t.type})).map((function(t){var o=e(t,["type"]);return s.createElement(v,Object.assign({key:o.href,className:N.actionLink},o))})):null}),[z]),Z=l((function(){return void 0!==X&&(null==z?void 0:z.length)!==X}),[z,X]),$=l((function(){return z?z.filter((function(t){return"button"===t.type})).map((function(o,i){var n=o.content,a=e(o,["type","content"]);return s.createElement(T,Object.assign({key:"alert-button-".concat(i),className:r(N.actionButton,t({},N.withTransition,Z))},a),n)})):null}),[z,Z]),tt=l((function(){return r(N.toast,x(N,o("type-"+S)),q)}),[S,q]),et=c((function(){U&&U()}),[U]),ot=a(),it=c((function(t){U&&null!=t&&(clearTimeout(ot.current),ot.current=setTimeout((function(){et()}),t))}),[et,U]);m((function(){return E&&A>0&&it(A),function(){clearTimeout(ot.current)}}),[E,A,it]);var nt=!I&&h(S,_),rt=c((function(t){var e=t.style.width;t.style.width="auto";var o=getComputedStyle(t).width;t.style.width=e,t.style.width=o}),[]);return m((function(){V.current&&rt(V.current)}),[F,rt]),s.createElement(u,{in:E,nodeRef:W,classNames:{enterActive:N.enterActive,exitActive:N.exitActive},timeout:400,unmountOnExit:!0},s.createElement(p,{ref:W,id:G,"data-testid":Q||i(n.TOAST,G),type:"text2",element:"div",color:"fixedLight",className:tt,role:"alert","aria-live":"polite"},nt&&s.createElement("div",{className:r(N.icon)},nt),s.createElement(f,{align:"center",gap:"large",className:N.content},s.createElement(f,{gap:"medium","data-testid":i(n.TOAST_CONTENT),className:N.textContent},s.createElement("span",null,F),Y),($||P)&&($||P),L&&s.createElement(d,{size:"xs"})),M&&s.createElement(k,{className:r(N.closeButton),onClick:et,size:"small",kind:"tertiary",color:"fixed-light",ariaLabel:K,"data-testid":i(n.TOAST_CLOSE_BUTTON),icon:b,hideTooltip:!0})))}),{types:j,actionTypes:y});export{B as default};
1
+ import{defineProperty as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as e}from"../../../_virtual/_tslib.js";import{camelCase as o}from"es-toolkit";import{getTestId as n,ComponentDefaultTestId as i}from"../../tests/testIds.js";import r from"classnames";import s,{useRef as a,useMemo as l,useCallback as c,useEffect as m}from"react";import{CSSTransition as u}from"react-transition-group";import p from"../Text/Text.js";import d from"../Flex/Flex.js";import f from"./ToastLink/ToastLink.js";import v from"./ToastButton/ToastButton.js";import{ToastType as T,ToastActionType as j}from"./ToastConstants.js";import{getIcon as y}from"./ToastHelpers.js";import{NOOP as h}from"../../utils/function-utils.js";import{getStyle as g}from"../../helpers/typesciptCssModulesHelper.js";import{withStaticPropsWithoutForwardRef as x}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import E from"./Toast.module.scss.js";import N from"../IconButton/IconButton.js";import k from"../../hooks/usePrevious/index.js";import C from"../../../components/loader/dist/Loader/Loader.js";import b from"../../../packages/icons/dist/react/CloseSmall.js";var B=x((function(T){var j=T.open,x=void 0!==j&&j,B=T.loading,L=void 0!==B&&B,O=T.autoHideDuration,A=void 0===O?null:O,w=T.type,S=void 0===w?"normal":w,_=T.icon,H=T.hideIcon,I=void 0!==H&&H,P=T.action,z=T.actions,F=T.children,D=T.closeable,M=void 0===D||D,R=T.onClose,U=void 0===R?h:R,q=T.className,G=T.id,J=T.closeButtonAriaLabel,K=void 0===J?"Close":J,Q=T["data-testid"],V=a(null),W=a(null),X=k(null==z?void 0:z.length),Y=l((function(){return z?z.filter((function(t){return"link"===t.type})).map((function(t){var o=e(t,["type"]);return s.createElement(f,Object.assign({key:o.href,className:E.actionLink},o))})):null}),[z]),Z=l((function(){return void 0!==X&&(null==z?void 0:z.length)!==X}),[z,X]),$=l((function(){return z?z.filter((function(t){return"button"===t.type})).map((function(o,n){var i=o.content,a=e(o,["type","content"]);return s.createElement(v,Object.assign({key:"alert-button-".concat(n),className:r(E.actionButton,t({},E.withTransition,Z))},a),i)})):null}),[z,Z]),tt=l((function(){return r(E.toast,g(E,o("type-"+S)),q)}),[S,q]),et=c((function(){U&&U()}),[U]),ot=a(),nt=c((function(t){U&&null!=t&&(clearTimeout(ot.current),ot.current=setTimeout((function(){et()}),t))}),[et,U]);m((function(){return x&&A>0&&nt(A),function(){clearTimeout(ot.current)}}),[x,A,nt]);var it=!I&&y(S,_),rt=c((function(t){var e=t.style.width;t.style.width="auto";var o=getComputedStyle(t).width;t.style.width=e,t.style.width=o}),[]);return m((function(){V.current&&rt(V.current)}),[F,rt]),s.createElement(u,{in:x,nodeRef:W,classNames:{enterActive:E.enterActive,exitActive:E.exitActive},timeout:400,unmountOnExit:!0},s.createElement(p,{ref:W,id:G,"data-testid":Q||n(i.TOAST,G),type:"text2",element:"div",color:"fixedLight",className:tt,role:"alert","aria-live":"polite"},it&&s.createElement("div",{className:r(E.icon)},it),s.createElement(d,{align:"center",gap:"large",className:E.content},s.createElement(d,{gap:"medium","data-testid":n(i.TOAST_CONTENT),className:E.textContent},s.createElement("span",null,F),Y),($||P)&&($||P),L&&s.createElement(C,{size:"xs"})),M&&s.createElement(N,{className:r(E.closeButton),onClick:et,size:"small",kind:"tertiary",color:"fixed-light",ariaLabel:K,"data-testid":n(i.TOAST_CLOSE_BUTTON),icon:b,hideTooltip:!0})))}),{types:T,actionTypes:j});export{B as default};
2
2
  //# sourceMappingURL=Toast.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.js","sources":["../../../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { type ReactElement, useCallback, useEffect, useMemo, useRef } from \"react\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { type IconSubComponentProps } from \"../Icon/Icon\";\nimport Text from \"../Text/Text\";\nimport Loader from \"../Loader/Loader\";\nimport Flex from \"../Flex/Flex\";\nimport { CloseSmall } from \"@vibe/icons\";\nimport ToastLink from \"./ToastLink/ToastLink\";\nimport ToastButton from \"./ToastButton/ToastButton\";\nimport { ToastActionType as ToastActionTypeEnum, ToastType as ToastTypeEnum } from \"./ToastConstants\";\nimport { type ToastType, type ToastAction } from \"./Toast.types\";\nimport { getIcon } from \"./ToastHelpers\";\nimport { NOOP } from \"../../utils/function-utils\";\nimport { getStyle } from \"../../helpers/typesciptCssModulesHelper\";\nimport { type VibeComponentProps, withStaticPropsWithoutForwardRef } from \"../../types\";\nimport styles from \"./Toast.module.scss\";\nimport IconButton from \"../IconButton/IconButton\";\nimport usePrevious from \"../../hooks/usePrevious\";\n\nexport interface ToastProps extends VibeComponentProps {\n /**\n * The actions available in the toast.\n */\n actions?: ToastAction[];\n /**\n * If true, the toast is open (visible).\n */\n open?: boolean;\n /**\n * If true, displays a loading indicator inside the toast.\n */\n loading?: boolean;\n /**\n * The type of toast.\n */\n type?: ToastType;\n /**\n * The icon displayed in the toast.\n */\n icon?: string | React.FC<IconSubComponentProps> | null;\n /**\n * If true, hides the toast icon.\n */\n hideIcon?: boolean;\n /**\n * The action element displayed in the toast.\n */\n action?: JSX.Element;\n /**\n * If false, hides the close button.\n */\n closeable?: boolean;\n /**\n * Callback fired when the toast is closed.\n */\n onClose?: () => void;\n /**\n * The number of milliseconds before the toast automatically closes.\n * (0 or null disables auto-close behavior).\n */\n autoHideDuration?: number;\n /**\n * The content displayed inside the toast.\n */\n children?: ReactElement | ReactElement[] | string;\n /**\n * The aria-label for the close button.\n */\n closeButtonAriaLabel?: string;\n}\n\nconst Toast = ({\n open = false,\n loading = false,\n autoHideDuration = null,\n type = \"normal\",\n icon,\n hideIcon = false,\n action: deprecatedAction,\n actions,\n children,\n closeable = true,\n onClose = NOOP,\n className,\n id,\n closeButtonAriaLabel = \"Close\",\n \"data-testid\": dataTestId\n}: ToastProps) => {\n const ref = useRef(null);\n const nodeRef = useRef<HTMLDivElement>(null);\n const prevActions = usePrevious(actions?.length);\n const toastLinks = useMemo(() => {\n return actions\n ? actions\n .filter(action => action.type === \"link\")\n .map(({ type: _type, ...otherProps }) => (\n <ToastLink key={otherProps.href} className={styles.actionLink} {...otherProps} />\n ))\n : null;\n }, [actions]);\n\n const shouldShowButtonTransition = useMemo(() => {\n return prevActions !== undefined && actions?.length !== prevActions;\n }, [actions, prevActions]);\n\n const toastButtons: JSX.Element[] | null = useMemo(() => {\n return actions\n ? actions\n .filter(action => action.type === \"button\")\n .map(({ type: _type, content, ...otherProps }, index) => (\n <ToastButton\n key={`alert-button-${index}`}\n className={cx(styles.actionButton, { [styles.withTransition]: shouldShowButtonTransition })}\n {...otherProps}\n >\n {content}\n </ToastButton>\n ))\n : null;\n }, [actions, shouldShowButtonTransition]);\n\n const classNames = useMemo(\n () => cx(styles.toast, getStyle(styles, camelCase(\"type-\" + type)), className),\n [type, className]\n );\n\n const handleClose = useCallback(() => {\n if (onClose) {\n onClose();\n }\n }, [onClose]);\n\n /* Timer */\n const timerAutoHide = useRef<NodeJS.Timeout>();\n const setAutoHideTimer = useCallback(\n (duration: number) => {\n if (!onClose || duration == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(() => {\n handleClose();\n }, duration);\n },\n [handleClose, onClose]\n );\n\n useEffect(() => {\n if (open && autoHideDuration > 0) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return () => {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]);\n\n const iconElement = !hideIcon && getIcon(type, icon);\n\n // https://n12v.com/css-transition-to-from-auto/\n const recalculateElementWidth = useCallback((element: HTMLElement) => {\n const prevWidth = element.style.width;\n element.style.width = \"auto\";\n const endWidth = getComputedStyle(element).width;\n element.style.width = prevWidth;\n element.offsetWidth; // force repaint\n element.style.width = endWidth;\n }, []);\n\n useEffect(() => {\n if (ref.current) {\n recalculateElementWidth(ref.current);\n }\n }, [children, recalculateElementWidth]);\n\n return (\n <CSSTransition\n in={open}\n nodeRef={nodeRef}\n classNames={{ enterActive: styles.enterActive, exitActive: styles.exitActive }}\n timeout={400}\n unmountOnExit\n >\n <Text\n ref={nodeRef}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TOAST, id)}\n type=\"text2\"\n element=\"div\"\n color=\"fixedLight\"\n className={classNames}\n role=\"alert\"\n aria-live=\"polite\"\n >\n {iconElement && <div className={cx(styles.icon)}>{iconElement}</div>}\n <Flex align=\"center\" gap=\"large\" className={styles.content}>\n <Flex\n gap=\"medium\"\n data-testid={getTestId(ComponentDefaultTestId.TOAST_CONTENT)}\n className={styles.textContent}\n >\n <span>{children}</span>\n {toastLinks}\n </Flex>\n {(toastButtons || deprecatedAction) && (toastButtons || deprecatedAction)}\n {loading && <Loader size=\"xs\" />}\n </Flex>\n {closeable && (\n <IconButton\n className={cx(styles.closeButton)}\n onClick={handleClose}\n size=\"small\"\n kind=\"tertiary\"\n color=\"fixed-light\"\n ariaLabel={closeButtonAriaLabel}\n data-testid={getTestId(ComponentDefaultTestId.TOAST_CLOSE_BUTTON)}\n icon={CloseSmall}\n hideTooltip\n />\n )}\n </Text>\n </CSSTransition>\n );\n};\n\ninterface ToastStaticProps {\n types: typeof ToastTypeEnum;\n actionTypes: typeof ToastActionTypeEnum;\n}\n\nexport default withStaticPropsWithoutForwardRef<ToastProps, ToastStaticProps>(Toast, {\n types: ToastTypeEnum,\n actionTypes: ToastActionTypeEnum\n});\n"],"names":["withStaticPropsWithoutForwardRef","_ref","_ref$open","open","_ref$loading","loading","_ref$autoHideDuration","autoHideDuration","_ref$type","type","icon","_ref$hideIcon","hideIcon","deprecatedAction","action","actions","children","_ref$closeable","closeable","_ref$onClose","onClose","NOOP","className","id","_ref$closeButtonAriaL","closeButtonAriaLabel","dataTestId","ref","useRef","nodeRef","prevActions","usePrevious","length","toastLinks","useMemo","filter","map","_a","otherProps","__rest","React","createElement","ToastLink","key","href","styles","actionLink","shouldShowButtonTransition","undefined","toastButtons","index","content","ToastButton","Object","assign","concat","cx","actionButton","_defineProperty","withTransition","classNames","toast","getStyle","camelCase","handleClose","useCallback","timerAutoHide","setAutoHideTimer","duration","clearTimeout","current","setTimeout","useEffect","iconElement","getIcon","recalculateElementWidth","element","prevWidth","style","width","endWidth","getComputedStyle","CSSTransition","in","enterActive","exitActive","timeout","unmountOnExit","Text","getTestId","ComponentDefaultTestId","TOAST","color","role","Flex","align","gap","TOAST_CONTENT","textContent","Loader","size","IconButton","closeButton","onClick","kind","ariaLabel","TOAST_CLOSE_BUTTON","CloseSmall","hideTooltip","types","ToastTypeEnum","actionTypes","ToastActionTypeEnum"],"mappings":"6mCA0EA,IAgKeA,EAAAA,GAhKD,SAAHC,GAgBM,IAAAC,EAAAD,EAffE,KAAAA,OAAO,IAAHD,GAAQA,EAAAE,EAAAH,EACZI,QAAAA,OAAU,IAAHD,GAAQA,EAAAE,EAA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AETpB,IAAejC,EAAAC,cAAA,MAAA,CAAKnB,UAAWkC,EAAGX,EAAOnC,OAAQ+D,IAClDjC,EAAAC,cAACqD,EAAI,CAACC,MAAM,SAASC,IAAI,QAAQ1E,UAAWuB,EAAOM,SACjDX,EAAAC,cAACqD,EACC,CAAAE,IAAI,uBACSP,EAAUC,EAAuBO,eAC9C3E,UAAWuB,EAAOqD,aAElB1D,EAAAC,cAAA,OAAA,KAAOzB,GACNiB,IAEDgB,GAAgBpC,KAAsBoC,GAAgBpC,GACvDR,GAAWmC,gBAAC2D,EAAM,CAACC,KAAK,QAE1BlF,GACCsB,EAACC,cAAA4D,GACC/E,UAAWkC,EAAGX,EAAOyD,aACrBC,QAASvC,GACToC,KAAK,QACLI,KAAK,WACLZ,MAAM,cACNa,UAAWhF,EACE,cAAAgE,EAAUC,EAAuBgB,oBAC9ChG,KAAMiG,EACNC,kBAMZ,GAOqF,CACnFC,MAAOC,EACPC,YAAaC"}
1
+ {"version":3,"file":"Toast.js","sources":["../../../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { type ReactElement, useCallback, useEffect, useMemo, useRef } from \"react\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { type IconSubComponentProps } from \"@vibe/icon\";\nimport Text from \"../Text/Text\";\nimport { Loader } from \"@vibe/loader\";\nimport Flex from \"../Flex/Flex\";\nimport { CloseSmall } from \"@vibe/icons\";\nimport ToastLink from \"./ToastLink/ToastLink\";\nimport ToastButton from \"./ToastButton/ToastButton\";\nimport { ToastActionType as ToastActionTypeEnum, ToastType as ToastTypeEnum } from \"./ToastConstants\";\nimport { type ToastType, type ToastAction } from \"./Toast.types\";\nimport { getIcon } from \"./ToastHelpers\";\nimport { NOOP } from \"../../utils/function-utils\";\nimport { getStyle } from \"../../helpers/typesciptCssModulesHelper\";\nimport { type VibeComponentProps, withStaticPropsWithoutForwardRef } from \"../../types\";\nimport styles from \"./Toast.module.scss\";\nimport IconButton from \"../IconButton/IconButton\";\nimport usePrevious from \"../../hooks/usePrevious\";\n\nexport interface ToastProps extends VibeComponentProps {\n /**\n * The actions available in the toast.\n */\n actions?: ToastAction[];\n /**\n * If true, the toast is open (visible).\n */\n open?: boolean;\n /**\n * If true, displays a loading indicator inside the toast.\n */\n loading?: boolean;\n /**\n * The type of toast.\n */\n type?: ToastType;\n /**\n * The icon displayed in the toast.\n */\n icon?: string | React.FC<IconSubComponentProps> | null;\n /**\n * If true, hides the toast icon.\n */\n hideIcon?: boolean;\n /**\n * The action element displayed in the toast.\n */\n action?: JSX.Element;\n /**\n * If false, hides the close button.\n */\n closeable?: boolean;\n /**\n * Callback fired when the toast is closed.\n */\n onClose?: () => void;\n /**\n * The number of milliseconds before the toast automatically closes.\n * (0 or null disables auto-close behavior).\n */\n autoHideDuration?: number;\n /**\n * The content displayed inside the toast.\n */\n children?: ReactElement | ReactElement[] | string;\n /**\n * The aria-label for the close button.\n */\n closeButtonAriaLabel?: string;\n}\n\nconst Toast = ({\n open = false,\n loading = false,\n autoHideDuration = null,\n type = \"normal\",\n icon,\n hideIcon = false,\n action: deprecatedAction,\n actions,\n children,\n closeable = true,\n onClose = NOOP,\n className,\n id,\n closeButtonAriaLabel = \"Close\",\n \"data-testid\": dataTestId\n}: ToastProps) => {\n const ref = useRef(null);\n const nodeRef = useRef<HTMLDivElement>(null);\n const prevActions = usePrevious(actions?.length);\n const toastLinks = useMemo(() => {\n return actions\n ? actions\n .filter(action => action.type === \"link\")\n .map(({ type: _type, ...otherProps }) => (\n <ToastLink key={otherProps.href} className={styles.actionLink} {...otherProps} />\n ))\n : null;\n }, [actions]);\n\n const shouldShowButtonTransition = useMemo(() => {\n return prevActions !== undefined && actions?.length !== prevActions;\n }, [actions, prevActions]);\n\n const toastButtons: JSX.Element[] | null = useMemo(() => {\n return actions\n ? actions\n .filter(action => action.type === \"button\")\n .map(({ type: _type, content, ...otherProps }, index) => (\n <ToastButton\n key={`alert-button-${index}`}\n className={cx(styles.actionButton, { [styles.withTransition]: shouldShowButtonTransition })}\n {...otherProps}\n >\n {content}\n </ToastButton>\n ))\n : null;\n }, [actions, shouldShowButtonTransition]);\n\n const classNames = useMemo(\n () => cx(styles.toast, getStyle(styles, camelCase(\"type-\" + type)), className),\n [type, className]\n );\n\n const handleClose = useCallback(() => {\n if (onClose) {\n onClose();\n }\n }, [onClose]);\n\n /* Timer */\n const timerAutoHide = useRef<NodeJS.Timeout>();\n const setAutoHideTimer = useCallback(\n (duration: number) => {\n if (!onClose || duration == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(() => {\n handleClose();\n }, duration);\n },\n [handleClose, onClose]\n );\n\n useEffect(() => {\n if (open && autoHideDuration > 0) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return () => {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]);\n\n const iconElement = !hideIcon && getIcon(type, icon);\n\n // https://n12v.com/css-transition-to-from-auto/\n const recalculateElementWidth = useCallback((element: HTMLElement) => {\n const prevWidth = element.style.width;\n element.style.width = \"auto\";\n const endWidth = getComputedStyle(element).width;\n element.style.width = prevWidth;\n element.offsetWidth; // force repaint\n element.style.width = endWidth;\n }, []);\n\n useEffect(() => {\n if (ref.current) {\n recalculateElementWidth(ref.current);\n }\n }, [children, recalculateElementWidth]);\n\n return (\n <CSSTransition\n in={open}\n nodeRef={nodeRef}\n classNames={{ enterActive: styles.enterActive, exitActive: styles.exitActive }}\n timeout={400}\n unmountOnExit\n >\n <Text\n ref={nodeRef}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TOAST, id)}\n type=\"text2\"\n element=\"div\"\n color=\"fixedLight\"\n className={classNames}\n role=\"alert\"\n aria-live=\"polite\"\n >\n {iconElement && <div className={cx(styles.icon)}>{iconElement}</div>}\n <Flex align=\"center\" gap=\"large\" className={styles.content}>\n <Flex\n gap=\"medium\"\n data-testid={getTestId(ComponentDefaultTestId.TOAST_CONTENT)}\n className={styles.textContent}\n >\n <span>{children}</span>\n {toastLinks}\n </Flex>\n {(toastButtons || deprecatedAction) && (toastButtons || deprecatedAction)}\n {loading && <Loader size=\"xs\" />}\n </Flex>\n {closeable && (\n <IconButton\n className={cx(styles.closeButton)}\n onClick={handleClose}\n size=\"small\"\n kind=\"tertiary\"\n color=\"fixed-light\"\n ariaLabel={closeButtonAriaLabel}\n data-testid={getTestId(ComponentDefaultTestId.TOAST_CLOSE_BUTTON)}\n icon={CloseSmall}\n hideTooltip\n />\n )}\n </Text>\n </CSSTransition>\n );\n};\n\ninterface ToastStaticProps {\n types: typeof ToastTypeEnum;\n actionTypes: typeof ToastActionTypeEnum;\n}\n\nexport default withStaticPropsWithoutForwardRef<ToastProps, ToastStaticProps>(Toast, {\n types: ToastTypeEnum,\n actionTypes: ToastActionTypeEnum\n});\n"],"names":["withStaticPropsWithoutForwardRef","_ref","_ref$open","open","_ref$loading","loading","_ref$autoHideDuration","autoHideDuration","_ref$type","type","icon","_ref$hideIcon","hideIcon","deprecatedAction","action","actions","children","_ref$closeable","closeable","_ref$onClose","onClose","NOOP","className","id","_ref$closeButtonAriaL","closeButtonAriaLabel","dataTestId","ref","useRef","nodeRef","prevActions","usePrevious","length","toastLinks","useMemo","filter","map","_a","otherProps","__rest","React","createElement","ToastLink","key","href","styles","actionLink","shouldShowButtonTransition","undefined","toastButtons","index","content","ToastButton","Object","assign","concat","cx","actionButton","_defineProperty","withTransition","classNames","toast","getStyle","camelCase","handleClose","useCallback","timerAutoHide","setAutoHideTimer","duration","clearTimeout","current","setTimeout","useEffect","iconElement","getIcon","recalculateElementWidth","element","prevWidth","style","width","endWidth","getComputedStyle","CSSTransition","in","enterActive","exitActive","timeout","unmountOnExit","Text","getTestId","ComponentDefaultTestId","TOAST","color","role","Flex","align","gap","TOAST_CONTENT","textContent","Loader","size","IconButton","closeButton","onClick","kind","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AAavC,EAAOuC,YAAaC,WAAYxC,EAAOwC,YAClEC,QAAS,IACTC,eAAa,GAEb/C,EAAAC,cAAC+C,EACC,CAAA7D,IAAKE,EACLN,GAAIA,EACS,cAAAG,GAAc+D,EAAUC,EAAuBC,MAAOpE,GACnEd,KAAK,QACLmE,QAAQ,MACRgB,MAAM,aACNtE,UAAWsC,GACXiC,KAAK,oBACK,UAETpB,IAAejC,EAAAC,cAAA,MAAA,CAAKnB,UAAWkC,EAAGX,EAAOnC,OAAQ+D,IAClDjC,EAAAC,cAACqD,EAAI,CAACC,MAAM,SAASC,IAAI,QAAQ1E,UAAWuB,EAAOM,SACjDX,EAAAC,cAACqD,EACC,CAAAE,IAAI,uBACSP,EAAUC,EAAuBO,eAC9C3E,UAAWuB,EAAOqD,aAElB1D,EAAAC,cAAA,OAAA,KAAOzB,GACNiB,IAEDgB,GAAgBpC,KAAsBoC,GAAgBpC,GACvDR,GAAWmC,gBAAC2D,EAAM,CAACC,KAAK,QAE1BlF,GACCsB,EAACC,cAAA4D,GACC/E,UAAWkC,EAAGX,EAAOyD,aACrBC,QAASvC,GACToC,KAAK,QACLI,KAAK,WACLZ,MAAM,cACNa,UAAWhF,EACE,cAAAgE,EAAUC,EAAuBgB,oBAC9ChG,KAAMiG,EACNC,kBAMZ,GAOqF,CACnFC,MAAOC,EACPC,YAAaC"}
@@ -1,2 +1,2 @@
1
- import{__rest as t}from"../../../../_virtual/_tslib.js";import s from"../../Button/Button.js";import a from"react";import{ComponentDefaultTestId as e}from"../../../tests/constants.js";import{getTestId as r}from"../../../tests/testIds.js";var i=function(i){var o=i.className,m=i.id,d=i["data-testid"],n=t(i,["className","id","data-testid"]);return a.createElement(s,Object.assign({},n,{id:m,kind:"secondary",marginLeft:!1,"data-testid":d||r(e.TOAST_BUTTON,m),className:o,size:"small",color:"fixed-light"}))};export{i as default};
1
+ import{__rest as t}from"../../../../_virtual/_tslib.js";import s from"react";import{ComponentDefaultTestId as a}from"../../../tests/constants.js";import{getTestId as e}from"../../../tests/testIds.js";import i from"../../../../components/button/dist/Button/Button.js";var o=function(o){var r=o.className,m=o.id,d=o["data-testid"],n=t(o,["className","id","data-testid"]);return s.createElement(i,Object.assign({},n,{id:m,kind:"secondary",marginLeft:!1,"data-testid":d||e(a.TOAST_BUTTON,m),className:r,size:"small",color:"fixed-light"}))};export{o as default};
2
2
  //# sourceMappingURL=ToastButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToastButton.js","sources":["../../../../../../src/components/Toast/ToastButton/ToastButton.tsx"],"sourcesContent":["import Button, { type ButtonProps } from \"../../Button/Button\";\nimport React, { type FC } from \"react\";\nimport { ComponentDefaultTestId } from \"../../../tests/constants\";\nimport { getTestId } from \"../../../tests/test-ids-utils\";\n\nexport type ToastButtonProps = ButtonProps;\n\nconst ToastButton: FC<ToastButtonProps> = ({\n className,\n id,\n \"data-testid\": dataTestId,\n ...buttonProps\n}: ToastButtonProps) => {\n return (\n <Button\n {...buttonProps}\n id={id}\n kind=\"secondary\"\n marginLeft={false}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TOAST_BUTTON, id)}\n className={className}\n size=\"small\"\n color=\"fixed-light\"\n />\n );\n};\n\nexport default ToastButton;\n"],"names":["ToastButton","_a","className","id","dataTestId","buttonProps","__rest","React","createElement","Button","kind","marginLeft","getTestId","ComponentDefaultTestId","TOAST_BUTTON","size","color"],"mappings":"8OAOA,IAAMA,EAAoC,SAACC,GAAA,IACzCC,EAEyBD,EAFzBC,UACAC,EACyBF,EADzBE,GACeC,EAAUH,EAAzB,eACGI,EAJsCC,EAAAL,EAAA,CAAA,YAAA,KAAA,gBAMzC,OACEM,EAACC,cAAAC,mBACKJ,EAAW,CACfF,GAAIA,EACJO,KAAK,YACLC,YAAY,EAAK,cACJP,GAAcQ,EAAUC,EAAuBC,aAAcX,GAC1ED,UAAWA,EACXa,KAAK,QACLC,MAAM,gBAGZ"}
1
+ {"version":3,"file":"ToastButton.js","sources":["../../../../../../src/components/Toast/ToastButton/ToastButton.tsx"],"sourcesContent":["import { Button, type ButtonProps } from \"@vibe/button\";\nimport React, { type FC } from \"react\";\nimport { ComponentDefaultTestId } from \"../../../tests/constants\";\nimport { getTestId } from \"../../../tests/test-ids-utils\";\n\nexport type ToastButtonProps = ButtonProps;\n\nconst ToastButton: FC<ToastButtonProps> = ({\n className,\n id,\n \"data-testid\": dataTestId,\n ...buttonProps\n}: ToastButtonProps) => {\n return (\n <Button\n {...buttonProps}\n id={id}\n kind=\"secondary\"\n marginLeft={false}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TOAST_BUTTON, id)}\n className={className}\n size=\"small\"\n color=\"fixed-light\"\n />\n );\n};\n\nexport default ToastButton;\n"],"names":["ToastButton","_a","className","id","dataTestId","buttonProps","__rest","React","createElement","Button","kind","marginLeft","getTestId","ComponentDefaultTestId","TOAST_BUTTON","size","color"],"mappings":"2QAOA,IAAMA,EAAoC,SAACC,GAAA,IACzCC,EAEyBD,EAFzBC,UACAC,EACyBF,EADzBE,GACeC,EAAUH,EAAzB,eACGI,EAJsCC,EAAAL,EAAA,CAAA,YAAA,KAAA,gBAMzC,OACEM,EAACC,cAAAC,mBACKJ,EAAW,CACfF,GAAIA,EACJO,KAAK,YACLC,YAAY,EAAK,cACJP,GAAcQ,EAAUC,EAAuBC,aAAcX,GAC1ED,UAAWA,EACXa,KAAK,QACLC,MAAM,gBAGZ"}
@@ -1,2 +1,2 @@
1
- import{defineProperty as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import i from"../../../icons/dist/react/Info.js";import o from"../../../icons/dist/react/Check.js";import t from"../../../icons/dist/react/Alert.js";import n from"../../../icons/dist/react/Warning.js";var e,s;!function(r){r.NORMAL="normal",r.POSITIVE="positive",r.NEGATIVE="negative",r.WARNING="warning",r.DARK="dark"}(e||(e={})),function(r){r.LINK="link",r.BUTTON="button"}(s||(s={}));var a=r(r(r(r(r({},e.NORMAL,i),e.POSITIVE,o),e.NEGATIVE,t),e.WARNING,n),e.DARK,i);export{s as ToastActionType,e as ToastType,a as defaultIconMap};
1
+ import{defineProperty as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import i from"../../../packages/icons/dist/react/Info.js";import o from"../../../packages/icons/dist/react/Check.js";import t from"../../../packages/icons/dist/react/Alert.js";import a from"../../../packages/icons/dist/react/Warning.js";var e,s;!function(r){r.NORMAL="normal",r.POSITIVE="positive",r.NEGATIVE="negative",r.WARNING="warning",r.DARK="dark"}(e||(e={})),function(r){r.LINK="link",r.BUTTON="button"}(s||(s={}));var n=r(r(r(r(r({},e.NORMAL,i),e.POSITIVE,o),e.NEGATIVE,t),e.WARNING,a),e.DARK,i);export{s as ToastActionType,e as ToastType,n as defaultIconMap};
2
2
  //# sourceMappingURL=ToastConstants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToastConstants.js","sources":["../../../../../src/components/Toast/ToastConstants.ts"],"sourcesContent":["import { Info, Check, Alert, Warning } from \"@vibe/icons\";\n\n/**\n * @deprecated\n */\nexport enum ToastType {\n NORMAL = \"normal\",\n POSITIVE = \"positive\",\n NEGATIVE = \"negative\",\n WARNING = \"warning\",\n DARK = \"dark\"\n}\n\n/**\n * @deprecated\n */\nexport enum ToastActionType {\n LINK = \"link\",\n BUTTON = \"button\"\n}\n\nexport const defaultIconMap = {\n [ToastType.NORMAL]: Info,\n [ToastType.POSITIVE]: Check,\n [ToastType.NEGATIVE]: Alert,\n [ToastType.WARNING]: Warning,\n [ToastType.DARK]: Info\n};\n\n/**\n * @deprecated\n */\nexport type ToastAction = {\n type: ToastActionType;\n content?: string;\n text?: string;\n href?: string;\n};\n"],"names":["ToastType","ToastActionType","defaultIconMap","_defineProperty","NORMAL","Info","POSITIVE","Check","NEGATIVE","Alert","WARNING","Warning","DARK"],"mappings":"6RAKYA,EAWAC,GAXZ,SAAYD,GACVA,EAAA,OAAA,SACAA,EAAA,SAAA,WACAA,EAAA,SAAA,WACAA,EAAA,QAAA,UACAA,EAAA,KAAA,MACD,CAND,CAAYA,IAAAA,EAMX,CAAA,IAKD,SAAYC,GACVA,EAAA,KAAA,OACAA,EAAA,OAAA,QACD,CAHD,CAAYA,IAAAA,EAGX,CAAA,QAEYC,EAAcC,EAAAA,EAAAA,EAAAA,EAAAA,KACxBH,EAAUI,OAASC,GACnBL,EAAUM,SAAWC,GACrBP,EAAUQ,SAAWC,GACrBT,EAAUU,QAAUC,GACpBX,EAAUY,KAAOP"}
1
+ {"version":3,"file":"ToastConstants.js","sources":["../../../../../src/components/Toast/ToastConstants.ts"],"sourcesContent":["import { Info, Check, Alert, Warning } from \"@vibe/icons\";\n\n/**\n * @deprecated\n */\nexport enum ToastType {\n NORMAL = \"normal\",\n POSITIVE = \"positive\",\n NEGATIVE = \"negative\",\n WARNING = \"warning\",\n DARK = \"dark\"\n}\n\n/**\n * @deprecated\n */\nexport enum ToastActionType {\n LINK = \"link\",\n BUTTON = \"button\"\n}\n\nexport const defaultIconMap = {\n [ToastType.NORMAL]: Info,\n [ToastType.POSITIVE]: Check,\n [ToastType.NEGATIVE]: Alert,\n [ToastType.WARNING]: Warning,\n [ToastType.DARK]: Info\n};\n\n/**\n * @deprecated\n */\nexport type ToastAction = {\n type: ToastActionType;\n content?: string;\n text?: string;\n href?: string;\n};\n"],"names":["ToastType","ToastActionType","defaultIconMap","_defineProperty","NORMAL","Info","POSITIVE","Check","NEGATIVE","Alert","WARNING","Warning","DARK"],"mappings":"iUAKYA,EAWAC,GAXZ,SAAYD,GACVA,EAAA,OAAA,SACAA,EAAA,SAAA,WACAA,EAAA,SAAA,WACAA,EAAA,QAAA,UACAA,EAAA,KAAA,MACD,CAND,CAAYA,IAAAA,EAMX,CAAA,IAKD,SAAYC,GACVA,EAAA,KAAA,OACAA,EAAA,OAAA,QACD,CAHD,CAAYA,IAAAA,EAGX,CAAA,QAEYC,EAAcC,EAAAA,EAAAA,EAAAA,EAAAA,KACxBH,EAAUI,OAASC,GACnBL,EAAUM,SAAWC,GACrBP,EAAUQ,SAAWC,GACrBT,EAAUU,QAAUC,GACpBX,EAAUY,KAAOP"}
@@ -1,2 +1,2 @@
1
- import{typeof as o}from"../../../_virtual/_rollupPluginBabelHelpers.js";import r from"react";import t from"../Icon/Icon.js";import{defaultIconMap as e}from"./ToastConstants.js";var n=function(n,i){return i&&"object"===o(i)?i:i||e[n]?r.createElement(t,{iconType:i?"font":"svg",icon:i||e[n],iconSize:20,ignoreFocusStyle:!0}):null};export{n as getIcon};
1
+ import{typeof as o}from"../../../_virtual/_rollupPluginBabelHelpers.js";import t from"react";import{defaultIconMap as n}from"./ToastConstants.js";import r from"../../../components/icon/dist/Icon/Icon.js";var e=function(e,i){return i&&"object"===o(i)?i:i||n[e]?t.createElement(r,{iconType:i?"font":"svg",icon:i||n[e],iconSize:20,ignoreFocusStyle:!0}):null};export{e as getIcon};
2
2
  //# sourceMappingURL=ToastHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToastHelpers.js","sources":["../../../../../src/components/Toast/ToastHelpers.tsx"],"sourcesContent":["import React from \"react\";\nimport Icon, { type IconSubComponentProps } from \"../Icon/Icon\";\nimport { defaultIconMap } from \"./ToastConstants\";\nimport { type ToastType } from \"./Toast.types\";\n\nexport const getIcon = (type: ToastType, icon: string | React.FC<IconSubComponentProps> | null) => {\n /* icon may be node a may be a string */\n if (icon && typeof icon === \"object\") {\n return icon;\n }\n return icon || defaultIconMap[type] ? (\n <Icon iconType={icon ? \"font\" : \"svg\"} icon={icon || defaultIconMap[type]} iconSize={20} ignoreFocusStyle />\n ) : null;\n};\n"],"names":["getIcon","type","icon","_typeof","defaultIconMap","React","Icon","iconType","iconSize","ignoreFocusStyle"],"mappings":"iLAKO,IAAMA,EAAU,SAACC,EAAiBC,GAEvC,OAAIA,GAAwB,WAAhBC,EAAOD,GACVA,EAEFA,GAAQE,EAAeH,GAC5BI,gBAACC,EAAI,CAACC,SAAUL,EAAO,OAAS,MAAOA,KAAMA,GAAQE,EAAeH,GAAOO,SAAU,GAAIC,kBAAgB,IACvG,IACN"}
1
+ {"version":3,"file":"ToastHelpers.js","sources":["../../../../../src/components/Toast/ToastHelpers.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconSubComponentProps } from \"@vibe/icon\";\nimport { defaultIconMap } from \"./ToastConstants\";\nimport { type ToastType } from \"./Toast.types\";\n\nexport const getIcon = (type: ToastType, icon: string | React.FC<IconSubComponentProps> | null) => {\n /* icon may be node a may be a string */\n if (icon && typeof icon === \"object\") {\n return icon;\n }\n return icon || defaultIconMap[type] ? (\n <Icon iconType={icon ? \"font\" : \"svg\"} icon={icon || defaultIconMap[type]} iconSize={20} ignoreFocusStyle />\n ) : null;\n};\n"],"names":["getIcon","type","icon","_typeof","defaultIconMap","React","Icon","iconType","iconSize","ignoreFocusStyle"],"mappings":"4MAKO,IAAMA,EAAU,SAACC,EAAiBC,GAEvC,OAAIA,GAAwB,WAAhBC,EAAOD,GACVA,EAEFA,GAAQE,EAAeH,GAC5BI,gBAACC,EAAI,CAACC,SAAUL,EAAO,OAAS,MAAOA,KAAMA,GAAQE,EAAeH,GAAOO,SAAU,GAAIC,kBAAgB,IACvG,IACN"}
@@ -1,2 +1,2 @@
1
- import{inherits as e,createClass as o,classCallCheck as t,callSuper as i}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{isFunction as n,camelCase as s}from"es-toolkit";import a from"classnames";import r,{isValidElement as l,PureComponent as p}from"react";import h from"../Dialog/Dialog.js";import{HideShowEvent as m,AnimationType as d}from"../Dialog/DialogConstants.js";import{TooltipPositions as c,TooltipTheme as T}from"./TooltipConstants.js";import{getStyle as u}from"../../helpers/typesciptCssModulesHelper.js";import g from"./Tooltip.module.scss.js";import{getTestId as w,ComponentDefaultTestId as f}from"../../tests/testIds.js";import S from"../Icon/Icon.js";import y from"../Flex/Flex.js";var D={lastTooltipHideTS:null,openTooltipsCount:0},v=function(m){function d(e){var o;return t(this,d),(o=i(this,d,[e])).renderTooltipContent=o.renderTooltipContent.bind(o),o.getShowDelay=o.getShowDelay.bind(o),o.onTooltipShow=o.onTooltipShow.bind(o),o.onTooltipHide=o.onTooltipHide.bind(o),o.wasShown=!1,o}return e(d,p),o(d,[{key:"renderTooltipContent",value:function(){var e,o=this.props,t=o.theme,i=o.content,p=o.className,h=o.style,m=o.maxWidth,d=o.title,c=o.image,T=o.icon,w=o.dir;return i?(n(i)?e=i():(l(i)||"string"==typeof i&&i||Array.isArray(i)&&i.length>0)&&(e=i),e?r.createElement("div",{style:m?Object.assign(Object.assign({},h),{"--tooltip-max-width":"".concat(m,"px")}):h,className:a(g.tooltip,u(g,s(t)),p),dir:w},c&&r.createElement("img",{className:g.image,src:c,alt:""}),r.createElement("div",{className:a(g.content)},d&&r.createElement(y,{gap:"xs"},T&&r.createElement(S,{iconSize:"20",icon:T}),r.createElement("div",{className:g.title},d)),e)):null):null}},{key:"onTooltipShow",value:function(){if(!this.wasShown){var e=this.props.onTooltipShow;D.openTooltipsCount++,this.wasShown=!0,e&&e()}}},{key:"onTooltipHide",value:function(){if(this.wasShown){var e=this.props.onTooltipHide;D.lastTooltipHideTS=Date.now(),D.openTooltipsCount--,this.wasShown=!1,e&&e()}}},{key:"getTimeSinceLastTooltip",value:function(){return D.openTooltipsCount>0?0:D.lastTooltipHideTS?Date.now()-D.lastTooltipHideTS:1/0}},{key:"getShowDelay",value:function(){var e=this.props,o=e.showDelay,t=e.immediateShowDelay,i=this.getTimeSinceLastTooltip();return(0===t||t)&&1500>i?{showDelay:t,preventAnimation:!0}:{showDelay:o,preventAnimation:!1}}},{key:"render",value:function(){var e=this.props,o=e.children,t=e.theme,i=e.tip,n=e.arrowClassName,s=e.id,l=e["data-testid"],p=e.position;if(!o&&!e.forceRenderWithoutChildren)return null;if(e.withoutDialog)return this.renderTooltipContent();var m=this.renderTooltipContent,d=Object.assign(Object.assign({},this.props),{position:p,"data-testid":l||w(f.TOOLTIP,s),tooltip:i,content:m,tooltipClassName:a(g.arrow,u(g,t),n),onDialogDidHide:this.onTooltipHide,onDialogDidShow:this.onTooltipShow,getDynamicShowDelay:this.getShowDelay});return r.createElement(h,Object.assign({},d,{animationType:"expand"}),o)}}])}();v.positions=c,v.hideShowTriggers=m,v.themes=T,v.animationTypes=d,v.defaultProps={moveBy:{main:4,secondary:0},theme:"dark",position:"top",hideDelay:100,showDelay:300,disableDialogSlide:!0,animationType:d.EXPAND,withoutDialog:!1,tip:!0,hideWhenReferenceHidden:!1,modifiers:[],showTrigger:v.hideShowTriggers.MOUSE_ENTER,hideTrigger:v.hideShowTriggers.MOUSE_LEAVE,showOnDialogEnter:!0,referenceWrapperClassName:"",addKeyboardHideShowTriggersByDefault:!0,open:!1};export{v as default};
1
+ import{inherits as e,createClass as o,classCallCheck as t,callSuper as i}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{isFunction as n,camelCase as s}from"es-toolkit";import a from"classnames";import r,{isValidElement as l,PureComponent as p}from"react";import h from"../Dialog/Dialog.js";import{HideShowEvent as m,AnimationType as d}from"../Dialog/DialogConstants.js";import{TooltipPositions as c,TooltipTheme as T}from"./TooltipConstants.js";import{getStyle as u}from"../../helpers/typesciptCssModulesHelper.js";import g from"./Tooltip.module.scss.js";import{getTestId as w,ComponentDefaultTestId as f}from"../../tests/testIds.js";import S from"../Flex/Flex.js";import y from"../../../components/icon/dist/Icon/Icon.js";var D={lastTooltipHideTS:null,openTooltipsCount:0},v=function(m){function d(e){var o;return t(this,d),(o=i(this,d,[e])).renderTooltipContent=o.renderTooltipContent.bind(o),o.getShowDelay=o.getShowDelay.bind(o),o.onTooltipShow=o.onTooltipShow.bind(o),o.onTooltipHide=o.onTooltipHide.bind(o),o.wasShown=!1,o}return e(d,p),o(d,[{key:"renderTooltipContent",value:function(){var e,o=this.props,t=o.theme,i=o.content,p=o.className,h=o.style,m=o.maxWidth,d=o.title,c=o.image,T=o.icon,w=o.dir;return i?(n(i)?e=i():(l(i)||"string"==typeof i&&i||Array.isArray(i)&&i.length>0)&&(e=i),e?r.createElement("div",{style:m?Object.assign(Object.assign({},h),{"--tooltip-max-width":"".concat(m,"px")}):h,className:a(g.tooltip,u(g,s(t)),p),dir:w},c&&r.createElement("img",{className:g.image,src:c,alt:""}),r.createElement("div",{className:a(g.content)},d&&r.createElement(S,{gap:"xs"},T&&r.createElement(y,{iconSize:"20",icon:T}),r.createElement("div",{className:g.title},d)),e)):null):null}},{key:"onTooltipShow",value:function(){if(!this.wasShown){var e=this.props.onTooltipShow;D.openTooltipsCount++,this.wasShown=!0,e&&e()}}},{key:"onTooltipHide",value:function(){if(this.wasShown){var e=this.props.onTooltipHide;D.lastTooltipHideTS=Date.now(),D.openTooltipsCount--,this.wasShown=!1,e&&e()}}},{key:"getTimeSinceLastTooltip",value:function(){return D.openTooltipsCount>0?0:D.lastTooltipHideTS?Date.now()-D.lastTooltipHideTS:1/0}},{key:"getShowDelay",value:function(){var e=this.props,o=e.showDelay,t=e.immediateShowDelay,i=this.getTimeSinceLastTooltip();return(0===t||t)&&1500>i?{showDelay:t,preventAnimation:!0}:{showDelay:o,preventAnimation:!1}}},{key:"render",value:function(){var e=this.props,o=e.children,t=e.theme,i=e.tip,n=e.arrowClassName,s=e.id,l=e["data-testid"],p=e.position;if(!o&&!e.forceRenderWithoutChildren)return null;if(e.withoutDialog)return this.renderTooltipContent();var m=this.renderTooltipContent,d=Object.assign(Object.assign({},this.props),{position:p,"data-testid":l||w(f.TOOLTIP,s),tooltip:i,content:m,tooltipClassName:a(g.arrow,u(g,t),n),onDialogDidHide:this.onTooltipHide,onDialogDidShow:this.onTooltipShow,getDynamicShowDelay:this.getShowDelay});return r.createElement(h,Object.assign({},d,{animationType:"expand"}),o)}}])}();v.positions=c,v.hideShowTriggers=m,v.themes=T,v.animationTypes=d,v.defaultProps={moveBy:{main:4,secondary:0},theme:"dark",position:"top",hideDelay:100,showDelay:300,disableDialogSlide:!0,animationType:d.EXPAND,withoutDialog:!1,tip:!0,hideWhenReferenceHidden:!1,modifiers:[],showTrigger:v.hideShowTriggers.MOUSE_ENTER,hideTrigger:v.hideShowTriggers.MOUSE_LEAVE,showOnDialogEnter:!0,referenceWrapperClassName:"",addKeyboardHideShowTriggersByDefault:!0,open:!1};export{v as default};
2
2
  //# sourceMappingURL=Tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { isFunction } from \"es-toolkit\";\nimport { camelCase } from \"es-toolkit\";\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":"qsBAkLA,IAGMA,EAAwE,CAC5EC,kBAAmB,KACnBC,kBAAmB,GAGAC,WAAQC,GAyB3B,SAAAD,EAAYE,GAAmB,IAAAC,EAOP,OAPOC,OAAAJ,IAC7BG,EAAAE,EAAAL,KAAAA,GAAME,KACDI,qBAAuBH,EAAKG,qBAAqBC,KAAIJ,GAC1DA,EAAKK,aAAeL,EAAKK,aAAaD,KAAIJ,GAC1CA,EAAKM,cAAgBN,EAAKM,cAAcF,KAAIJ,GAC5CA,EAAKO,cAAgBP,EAAKO,cAAcH,KAAIJ,GAE5CA,EAAKQ,UAAW,EAAMR,CACxB,CAAC,OAAAS,EAAAZ,EAjCkCa,GAiClCC,EAAAd,EAAA,CAAA,CAAAe,IAAA,uBAAAC,MAED,WACE,IAKIC,EALJC,EAAgFC,KAAKjB,MAA7EkB,EAAKF,EAALE,MAAOC,EAAOH,EAAPG,QAASC,EAASJ,EAATI,UAAWC,EAAKL,EAALK,MAAOC,EAAQN,EAARM,SAAUC,EAAKP,EAALO,MAAOC,EAAKR,EAALQ,MAAOC,EAAIT,EAAJS,KAAMC,EAAGV,EAAHU,IACxE,OAAKP,GAKDQ,EAAWR,GACbJ,EAAeI,KACNS,EAAeT,IAEI,iBAAZA,GAAwBA,GAE/BU,MAAMC,QAAQX,IAAYA,EAAQY,OAAS,KAHpDhB,EAAeI,GAQZJ,EAKHiB,uBACEX,MAAOC,EAAYW,OAAKC,OAAAD,OAAAC,OAAA,CAAA,EAAAb,IAAO,sBAAqB,GAAAc,OAAKb,EAAQ,QAA2BD,EAC5FD,UAAWgB,EAAGC,EAAOC,QAASC,EAASF,EAAQG,EAAUtB,IAASE,GAClEM,IAAKA,GAEJF,GAASQ,EAAAS,cAAA,MAAA,CAAKrB,UAAW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M,EAAQN,EAARM,SAGF,IAAKL,IATuBD,EAA1BO,2BAUA,OAAO,KAGT,GAfeP,EAAbQ,cAgBA,OAAOhD,KAAKb,uBAGd,IAAMe,EAAUF,KAAKb,qBACf8D,EAAWjC,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACZjB,KAAKjB,OAAK,CACb+D,SAAUA,EACV,cAAeD,GAAcK,EAAUC,EAAuBC,QAASR,GACvEvB,QAASqB,EACTxC,QAAAA,EACAmD,iBAAkBlC,EAAGC,EAAOkC,MAAOhC,EAASF,EAAQnB,GAAQ0C,GAC5DY,gBAAiBvD,KAAKT,cACtBiE,gBAAiBxD,KAAKV,cACtBmE,oBAAqBzD,KAAKX,eAE5B,OACE0B,EAAAS,cAACkC,EAAM1C,OAAAC,OAAA,CAAA,EAAKgC,EAAW,CAAEU,cAAc,WACpClB,EAGP,IAAC,IA3JM5D,EAAS+E,UAAGC,EACZhF,EAAgBiF,iBAAGC,EACnBlF,EAAMmF,OAAGC,EACTpF,EAAcqF,eAAGC,EACjBtF,EAAAuF,aAAe,CACpBC,OAAQ,CAAEC,KAAM,EAAGC,UAAW,GAC9BtE,MAAO,OACP6C,SAAU,MACV0B,UAAW,IACXrC,UAAW,IACXsC,oBAAoB,EACpBd,cAAeQ,EAAkBO,OACjC1B,eAAe,EACfN,KAAK,EACLiC,yBAAyB,EACzBC,UAAW,GACXC,YAAahG,EAAQiF,iBAAiBgB,YACtCC,YAAalG,EAAQiF,iBAAiBkB,YACtCC,mBAAmB,EACnBC,0BAA2B,GAC3BC,sCAAsC,EACtCC,MAAM"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { isFunction } from \"es-toolkit\";\nimport { camelCase } from \"es-toolkit\";\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 { Icon, type SubIcon } from \"@vibe/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":"guBAiLA,IAGMA,EAAwE,CAC5EC,kBAAmB,KACnBC,kBAAmB,GAGAC,WAAQC,GAyB3B,SAAAD,EAAYE,GAAmB,IAAAC,EAOP,OAPOC,OAAAJ,IAC7BG,EAAAE,EAAAL,KAAAA,GAAME,KACDI,qBAAuBH,EAAKG,qBAAqBC,KAAIJ,GAC1DA,EAAKK,aAAeL,EAAKK,aAAaD,KAA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