@heliux-org/design-system-core 0.0.82-table-tanstack-updated → 0.0.82-table-tanstack-latest

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 (472) hide show
  1. package/dist/components/index.js +7 -5
  2. package/dist/components/index.js.map +1 -1
  3. package/dist/esm/components/index.d.ts +3 -1
  4. package/dist/esm/components/index.d.ts.map +1 -1
  5. package/dist/esm/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
  6. package/dist/esm/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
  7. package/dist/esm/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
  8. package/dist/esm/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
  9. package/dist/esm/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
  10. package/dist/esm/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
  11. package/dist/esm/src/components/AttentionBox/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
  12. package/dist/esm/src/components/Avatar/Avatar.module.scss.js +1 -1
  13. package/dist/esm/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
  14. package/dist/esm/src/components/Avatar/AvatarContent.module.scss.js +1 -1
  15. package/dist/esm/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
  16. package/dist/esm/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
  17. package/dist/esm/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
  18. package/dist/esm/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
  19. package/dist/esm/src/components/Badge/Badge.module.scss.js +1 -1
  20. package/dist/esm/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
  21. package/dist/esm/src/components/Box/Box.module.scss.js +1 -1
  22. package/dist/esm/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
  23. package/dist/esm/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
  24. package/dist/esm/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
  25. package/dist/esm/src/components/Button/Button.module.scss.js +1 -1
  26. package/dist/esm/src/components/ButtonGroup/ButtonGroup.module.scss.js +1 -1
  27. package/dist/esm/src/components/Checkbox/Checkbox.module.scss.js +1 -1
  28. package/dist/esm/src/components/Clickable/Clickable.module.scss.js +1 -1
  29. package/dist/esm/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
  30. package/dist/esm/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
  31. package/dist/esm/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
  32. package/dist/esm/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
  33. package/dist/esm/src/components/Combobox/Combobox.module.scss.js +1 -1
  34. package/dist/esm/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
  35. package/dist/esm/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
  36. package/dist/esm/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
  37. package/dist/esm/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
  38. package/dist/esm/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
  39. package/dist/esm/src/components/Comments/comments.scss.js +1 -1
  40. package/dist/esm/src/components/Counter/Counter.module.scss.js +1 -1
  41. package/dist/esm/src/components/DatePicker/DateNavigationItem/DateNavigationItem.module.scss.js +1 -1
  42. package/dist/esm/src/components/DatePicker/DatePicker.module.scss.js +1 -1
  43. package/dist/esm/src/components/DatePicker/DatePickerHeader/DatePickerHeader.module.scss.js +1 -1
  44. package/dist/esm/src/components/DatePicker/YearPicker/YearPicker.module.scss.js +1 -1
  45. package/dist/esm/src/components/Dialog/Dialog.module.scss.js +1 -1
  46. package/dist/esm/src/components/Dialog/DialogContent/DialogContent.module.scss.js +1 -1
  47. package/dist/esm/src/components/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
  48. package/dist/esm/src/components/Divider/Divider.module.scss.js +1 -1
  49. package/dist/esm/src/components/Dropdown/Dropdown.module.scss.js +1 -1
  50. package/dist/esm/src/components/Dropdown/components/ChildrenContent/ChildrenContent.module.scss.js +1 -1
  51. package/dist/esm/src/components/Dropdown/components/MultiValueContainer/MultiValueContainer.module.scss.js +1 -1
  52. package/dist/esm/src/components/Dropdown/components/menu/menu.module.scss.js +1 -1
  53. package/dist/esm/src/components/Dropdown/components/option/option.module.scss.js +1 -1
  54. package/dist/esm/src/components/Dropdown/components/singleValue/singleValue.module.scss.js +1 -1
  55. package/dist/esm/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
  56. package/dist/esm/src/components/EditableInput/EditableInput.module.scss.js +1 -1
  57. package/dist/esm/src/components/EditableText/EditableText.module.scss.js +1 -1
  58. package/dist/esm/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
  59. package/dist/esm/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
  60. package/dist/esm/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
  61. package/dist/esm/src/components/Flex/Flex.module.scss.js +1 -1
  62. package/dist/esm/src/components/FormattedNumber/FormattedNumber.module.scss.js +1 -1
  63. package/dist/esm/src/components/HeaderActions/HeaderActions.module.scss.js +1 -1
  64. package/dist/esm/src/components/Heading/Heading.module.scss.js +1 -1
  65. package/dist/esm/src/components/HiddenText/HiddenText.module.scss.js +1 -1
  66. package/dist/esm/src/components/Icon/Icon.module.scss.js +1 -1
  67. package/dist/esm/src/components/IconButton/IconButton.module.scss.js +1 -1
  68. package/dist/esm/src/components/InlineEdit/InlineEdit.module.scss.js +1 -1
  69. package/dist/esm/src/components/Label/Label.module.scss.js +1 -1
  70. package/dist/esm/src/components/LegacyEditableHeading/LegacyEditableHeading.module.scss.js +1 -1
  71. package/dist/esm/src/components/LegacyHeading/LegacyHeading.module.scss.js +1 -1
  72. package/dist/esm/src/components/Link/Link.module.scss.js +1 -1
  73. package/dist/esm/src/components/List/List.module.scss.js +1 -1
  74. package/dist/esm/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
  75. package/dist/esm/src/components/ListItem/ListItem.module.scss.js +1 -1
  76. package/dist/esm/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
  77. package/dist/esm/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
  78. package/dist/esm/src/components/ListTitle/ListTitle.module.scss.js +1 -1
  79. package/dist/esm/src/components/Loader/Loader.module.scss.js +1 -1
  80. package/dist/esm/src/components/Menu/Menu/Menu.module.scss.js +1 -1
  81. package/dist/esm/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
  82. package/dist/esm/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
  83. package/dist/esm/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
  84. package/dist/esm/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
  85. package/dist/esm/src/components/MenuButton/MenuButton.module.scss.js +1 -1
  86. package/dist/esm/src/components/Modal/Modal.module.scss.js +1 -1
  87. package/dist/esm/src/components/Modal/ModalContent/ModalContent.module.scss.js +1 -1
  88. package/dist/esm/src/components/Modal/ModalFooter/ModalFooter.module.scss.js +1 -1
  89. package/dist/esm/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
  90. package/dist/esm/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
  91. package/dist/esm/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
  92. package/dist/esm/src/components/NewTable/Table.module.scss.js +1 -1
  93. package/dist/esm/src/components/NewTable/components/Cell/Cell.module.scss.js +1 -1
  94. package/dist/esm/src/components/NewTable/components/Cell/HeaderCell/HeaderCell.module.scss.js +1 -1
  95. package/dist/esm/src/components/NewTable/components/ExpandedContent/ExpandedContent.module.scss.js +1 -1
  96. package/dist/esm/src/components/NewTable/components/Row/Row.module.scss.js +1 -1
  97. package/dist/esm/src/components/NewTable/components/TableHead/TableHead.module.scss.js +1 -1
  98. package/dist/esm/src/components/NewTable/components/TableHeader/TableHeader.module.scss.js +1 -1
  99. package/dist/esm/src/components/NewTable/components/ToggleExpandedIcon/ToggleExpandedIcon.module.scss.js +1 -1
  100. package/dist/esm/src/components/NewTable/components/newComponents/pagination/Pagination.module.scss.js +1 -1
  101. package/dist/esm/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.module.scss.js +1 -1
  102. package/dist/esm/src/components/NumericField/NumericField.module.scss.js +1 -1
  103. package/dist/esm/src/components/PageHeader/PageHeader.module.scss.js +1 -1
  104. package/dist/esm/src/components/Panel/Panel.module.scss.js +1 -1
  105. package/dist/esm/src/components/ProgressBars/LinearProgressBar/Bar/Bar.module.scss.js +1 -1
  106. package/dist/esm/src/components/ProgressBars/LinearProgressBar/LinearProgressBar.module.scss.js +1 -1
  107. package/dist/esm/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +1 -1
  108. package/dist/esm/src/components/RadioButton/RadioButton.module.scss.js +1 -1
  109. package/dist/esm/src/components/ResponsiveList/ResponsiveList.module.scss.js +1 -1
  110. package/dist/esm/src/components/Search/Search.module.scss.js +1 -1
  111. package/dist/esm/src/components/SectionHeader/SectionHeader.module.scss.js +1 -1
  112. package/dist/esm/src/components/Sidebar/Sidebar.module.scss.js +1 -1
  113. package/dist/esm/src/components/Skeleton/Skeleton.module.scss.js +1 -1
  114. package/dist/esm/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
  115. package/dist/esm/src/components/Slider/Slider.module.scss.js +1 -1
  116. package/dist/esm/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
  117. package/dist/esm/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
  118. package/dist/esm/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
  119. package/dist/esm/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
  120. package/dist/esm/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
  121. package/dist/esm/src/components/Slider/SliderInfix.module.scss.js +1 -1
  122. package/dist/esm/src/components/SplitButton/SplitButton.module.scss.js +1 -1
  123. package/dist/esm/src/components/Steps/Steps.module.scss.js +1 -1
  124. package/dist/esm/src/components/Steps/StepsCommand.module.scss.js +1 -1
  125. package/dist/esm/src/components/Steps/StepsDot.module.scss.js +1 -1
  126. package/dist/esm/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
  127. package/dist/esm/src/components/Steps/StepsHeader.module.scss.js +1 -1
  128. package/dist/esm/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
  129. package/dist/esm/src/components/Switch/Switch.module.scss.js +1 -1
  130. package/dist/esm/src/components/Table/Table.js +1 -1
  131. package/dist/esm/src/components/Table/Table.js.map +1 -1
  132. package/dist/esm/src/components/Table/TableHeader.module.scss.js +1 -1
  133. package/dist/esm/src/components/Table/actionHandlers/expandHandler.js +2 -0
  134. package/dist/esm/src/components/Table/actionHandlers/expandHandler.js.map +1 -0
  135. package/dist/esm/src/components/Table/actionHandlers/filterHandler.js +2 -0
  136. package/dist/esm/src/components/Table/actionHandlers/filterHandler.js.map +1 -0
  137. package/dist/esm/src/components/Table/actionHandlers/resizeHandler.js +2 -0
  138. package/dist/esm/src/components/Table/actionHandlers/resizeHandler.js.map +1 -0
  139. package/dist/esm/src/components/Table/actionHandlers/selectHandler.js +2 -0
  140. package/dist/esm/src/components/Table/actionHandlers/selectHandler.js.map +1 -0
  141. package/dist/esm/src/components/Table/columns/expanderColumn.js +1 -1
  142. package/dist/esm/src/components/Table/columns/expanderColumn.js.map +1 -1
  143. package/dist/esm/src/components/Table/columns/selectionColumn.js +1 -1
  144. package/dist/esm/src/components/Table/columns/selectionColumn.js.map +1 -1
  145. package/dist/esm/src/components/Table/filters/FilterToggle.js +2 -0
  146. package/dist/esm/src/components/Table/filters/FilterToggle.js.map +1 -0
  147. package/dist/esm/src/components/Table/filters/customFilterFunctions.js +2 -0
  148. package/dist/esm/src/components/Table/filters/customFilterFunctions.js.map +1 -0
  149. package/dist/esm/src/components/Table/filters/defaultFilterFunctions.js +2 -0
  150. package/dist/esm/src/components/Table/filters/defaultFilterFunctions.js.map +1 -0
  151. package/dist/esm/src/components/Table/hooks/useColumnDragAndDrop.js +2 -0
  152. package/dist/esm/src/components/Table/hooks/useColumnDragAndDrop.js.map +1 -0
  153. package/dist/esm/src/components/Table/hooks/useExpanderCell.js +2 -0
  154. package/dist/esm/src/components/Table/hooks/useExpanderCell.js.map +1 -0
  155. package/dist/esm/src/components/Table/hooks/useResizeColumns.js +2 -0
  156. package/dist/esm/src/components/Table/hooks/useResizeColumns.js.map +1 -0
  157. package/dist/esm/src/components/Table/hooks/useScrollToRow.js +2 -0
  158. package/dist/esm/src/components/Table/hooks/useScrollToRow.js.map +1 -0
  159. package/dist/esm/src/components/Table/hooks/useSelectionCell.js +2 -0
  160. package/dist/esm/src/components/Table/hooks/useSelectionCell.js.map +1 -0
  161. package/dist/esm/src/components/Table/hooks/useStickyColumns.js +2 -0
  162. package/dist/esm/src/components/Table/hooks/useStickyColumns.js.map +1 -0
  163. package/dist/esm/src/components/Table/hooks/useSubRowFiltering.js +2 -0
  164. package/dist/esm/src/components/Table/hooks/useSubRowFiltering.js.map +1 -0
  165. package/dist/esm/src/components/Table/hooks/useSubRowSelection.js +2 -0
  166. package/dist/esm/src/components/Table/hooks/useSubRowSelection.js.map +1 -0
  167. package/dist/esm/src/components/Table/new/Buttons/IconButton.js +2 -0
  168. package/dist/esm/src/components/Table/new/Buttons/IconButton.js.map +1 -0
  169. package/dist/esm/src/components/Table/new/Popover/Popover.js +1 -1
  170. package/dist/esm/src/components/Table/new/Popover/Popover.js.map +1 -1
  171. package/dist/esm/src/components/Table/new/ThemeProvider/ThemeProvider.js +2 -0
  172. package/dist/esm/src/components/Table/new/ThemeProvider/ThemeProvider.js.map +1 -0
  173. package/dist/esm/src/components/Table/new/Toast/Toast.js +2 -0
  174. package/dist/esm/src/components/Table/new/Toast/Toast.js.map +1 -0
  175. package/dist/esm/src/components/Table/new/Toast/Toaster.js +1 -1
  176. package/dist/esm/src/components/Table/new/Toast/Toaster.js.map +1 -1
  177. package/dist/esm/src/components/Table/new/utils/components/VirtualScroll.js +2 -0
  178. package/dist/esm/src/components/Table/new/utils/components/VirtualScroll.js.map +1 -0
  179. package/dist/esm/src/components/Table/new/utils/functions/dev.js +1 -1
  180. package/dist/esm/src/components/Table/new/utils/functions/dev.js.map +1 -1
  181. package/dist/esm/src/components/Table/new/utils/functions/import.js +2 -0
  182. package/dist/esm/src/components/Table/new/utils/functions/import.js.map +1 -0
  183. package/dist/esm/src/components/Table/new/utils/hooks/useLatestRef.js +2 -0
  184. package/dist/esm/src/components/Table/new/utils/hooks/useLatestRef.js.map +1 -0
  185. package/dist/esm/src/components/Table/new/utils/hooks/useMediaQuery.js +2 -0
  186. package/dist/esm/src/components/Table/new/utils/hooks/useMediaQuery.js.map +1 -0
  187. package/dist/esm/src/components/Table/new/utils/hooks/useSafeContext.js +2 -0
  188. package/dist/esm/src/components/Table/new/utils/hooks/useSafeContext.js.map +1 -0
  189. package/dist/esm/src/components/Table/styling/column-filter.scss.js +2 -0
  190. package/dist/esm/src/components/Table/styling/column-filter.scss.js.map +1 -0
  191. package/dist/esm/src/components/Table/styling/paginator.scss.js +1 -1
  192. package/dist/esm/src/components/Table/styling/table_base.scss.js +1 -1
  193. package/dist/esm/src/components/Table/table.scss.js +1 -1
  194. package/dist/esm/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
  195. package/dist/esm/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
  196. package/dist/esm/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
  197. package/dist/esm/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
  198. package/dist/esm/src/components/Tags/Tags.module.scss.js +1 -1
  199. package/dist/esm/src/components/Text/Text.module.scss.js +1 -1
  200. package/dist/esm/src/components/TextAreaField/TextAreaField.module.scss.js +1 -1
  201. package/dist/esm/src/components/TextField/TextField.module.scss.js +1 -1
  202. package/dist/esm/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
  203. package/dist/esm/src/components/Timeline/Timeline/Timeline.module.scss.js +1 -1
  204. package/dist/esm/src/components/Timeline/TimelineRow/TimelineRow.module.scss.js +1 -1
  205. package/dist/esm/src/components/Tipseen/Tipseen.module.scss.js +1 -1
  206. package/dist/esm/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
  207. package/dist/esm/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
  208. package/dist/esm/src/components/Tipseen/TipseenImage.module.scss.js +1 -1
  209. package/dist/esm/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
  210. package/dist/esm/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
  211. package/dist/esm/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
  212. package/dist/esm/src/components/Toast/Toast.module.scss.js +1 -1
  213. package/dist/esm/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
  214. package/dist/esm/src/components/Toggle/MockToggle.module.scss.js +1 -1
  215. package/dist/esm/src/components/Toggle/Toggle.module.scss.js +1 -1
  216. package/dist/esm/src/components/Toggle/ToggleText.module.scss.js +1 -1
  217. package/dist/esm/src/components/Tooltip/Tooltip.module.scss.js +1 -1
  218. package/dist/esm/src/components/TopNavigationBar/TopNavigationBar.module.scss.js +1 -1
  219. package/dist/esm/src/components/TopNavigationBar/components/Notification/Notification.module.scss.js +1 -1
  220. package/dist/esm/src/components/TopNavigationBar/components/NotificationItem/NotificationItem.module.scss.js +1 -1
  221. package/dist/esm/src/components/Tree/components/TreeFile/TreeFile.scss.js +1 -1
  222. package/dist/esm/src/components/Tree/components/TreeFileIcon/TreeFileIcon.scss.js +1 -1
  223. package/dist/esm/src/components/Tree/components/TreeFolder/TreeFolder.scss.js +1 -1
  224. package/dist/esm/src/components/Tree/components/TreeFolderIcon/TreeFolderIcon.scss.js +1 -1
  225. package/dist/esm/src/components/Tree/components/TreeStatusIcon/TreeStatusIcon.scss.js +1 -1
  226. package/dist/esm/src/components/Tree/components/expand/expand.scss.js +1 -1
  227. package/dist/esm/src/components/Typography/Typography.module.scss.js +1 -1
  228. package/dist/esm/src/components/Uploader/Uploader.scss.js +1 -1
  229. package/dist/esm/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
  230. package/dist/esm/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
  231. package/dist/esm/src/components/Workflow/workflow.scss.js +1 -1
  232. package/dist/esm/src/index.js +1 -1
  233. package/dist/esm/style/dist/index.min.css.js +1 -1
  234. package/dist/main.css +3 -2
  235. package/dist/main.css.map +1 -1
  236. package/dist/main.js +2 -2
  237. package/dist/main.js.map +1 -1
  238. package/dist/mocked_classnames_esm/components/index.d.ts +3 -1
  239. package/dist/mocked_classnames_esm/components/index.d.ts.map +1 -1
  240. package/dist/mocked_classnames_esm/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
  241. package/dist/mocked_classnames_esm/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
  242. package/dist/mocked_classnames_esm/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
  243. package/dist/mocked_classnames_esm/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
  244. package/dist/mocked_classnames_esm/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
  245. package/dist/mocked_classnames_esm/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
  246. package/dist/mocked_classnames_esm/src/components/AttentionBox/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
  247. package/dist/mocked_classnames_esm/src/components/Avatar/Avatar.module.scss.js +1 -1
  248. package/dist/mocked_classnames_esm/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
  249. package/dist/mocked_classnames_esm/src/components/Avatar/AvatarContent.module.scss.js +1 -1
  250. package/dist/mocked_classnames_esm/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
  251. package/dist/mocked_classnames_esm/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
  252. package/dist/mocked_classnames_esm/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
  253. package/dist/mocked_classnames_esm/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
  254. package/dist/mocked_classnames_esm/src/components/Badge/Badge.module.scss.js +1 -1
  255. package/dist/mocked_classnames_esm/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
  256. package/dist/mocked_classnames_esm/src/components/Box/Box.module.scss.js +1 -1
  257. package/dist/mocked_classnames_esm/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
  258. package/dist/mocked_classnames_esm/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
  259. package/dist/mocked_classnames_esm/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
  260. package/dist/mocked_classnames_esm/src/components/Button/Button.module.scss.js +1 -1
  261. package/dist/mocked_classnames_esm/src/components/ButtonGroup/ButtonGroup.module.scss.js +1 -1
  262. package/dist/mocked_classnames_esm/src/components/Checkbox/Checkbox.module.scss.js +1 -1
  263. package/dist/mocked_classnames_esm/src/components/Clickable/Clickable.module.scss.js +1 -1
  264. package/dist/mocked_classnames_esm/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
  265. package/dist/mocked_classnames_esm/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
  266. package/dist/mocked_classnames_esm/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
  267. package/dist/mocked_classnames_esm/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
  268. package/dist/mocked_classnames_esm/src/components/Combobox/Combobox.module.scss.js +1 -1
  269. package/dist/mocked_classnames_esm/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
  270. package/dist/mocked_classnames_esm/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
  271. package/dist/mocked_classnames_esm/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
  272. package/dist/mocked_classnames_esm/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
  273. package/dist/mocked_classnames_esm/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
  274. package/dist/mocked_classnames_esm/src/components/Comments/comments.scss.js +1 -1
  275. package/dist/mocked_classnames_esm/src/components/Counter/Counter.module.scss.js +1 -1
  276. package/dist/mocked_classnames_esm/src/components/DatePicker/DateNavigationItem/DateNavigationItem.module.scss.js +1 -1
  277. package/dist/mocked_classnames_esm/src/components/DatePicker/DatePicker.module.scss.js +1 -1
  278. package/dist/mocked_classnames_esm/src/components/DatePicker/DatePickerHeader/DatePickerHeader.module.scss.js +1 -1
  279. package/dist/mocked_classnames_esm/src/components/DatePicker/YearPicker/YearPicker.module.scss.js +1 -1
  280. package/dist/mocked_classnames_esm/src/components/Dialog/Dialog.module.scss.js +1 -1
  281. package/dist/mocked_classnames_esm/src/components/Dialog/DialogContent/DialogContent.module.scss.js +1 -1
  282. package/dist/mocked_classnames_esm/src/components/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
  283. package/dist/mocked_classnames_esm/src/components/Divider/Divider.module.scss.js +1 -1
  284. package/dist/mocked_classnames_esm/src/components/Dropdown/Dropdown.module.scss.js +1 -1
  285. package/dist/mocked_classnames_esm/src/components/Dropdown/components/ChildrenContent/ChildrenContent.module.scss.js +1 -1
  286. package/dist/mocked_classnames_esm/src/components/Dropdown/components/MultiValueContainer/MultiValueContainer.module.scss.js +1 -1
  287. package/dist/mocked_classnames_esm/src/components/Dropdown/components/menu/menu.module.scss.js +1 -1
  288. package/dist/mocked_classnames_esm/src/components/Dropdown/components/option/option.module.scss.js +1 -1
  289. package/dist/mocked_classnames_esm/src/components/Dropdown/components/singleValue/singleValue.module.scss.js +1 -1
  290. package/dist/mocked_classnames_esm/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
  291. package/dist/mocked_classnames_esm/src/components/EditableInput/EditableInput.module.scss.js +1 -1
  292. package/dist/mocked_classnames_esm/src/components/EditableText/EditableText.module.scss.js +1 -1
  293. package/dist/mocked_classnames_esm/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
  294. package/dist/mocked_classnames_esm/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
  295. package/dist/mocked_classnames_esm/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
  296. package/dist/mocked_classnames_esm/src/components/Flex/Flex.module.scss.js +1 -1
  297. package/dist/mocked_classnames_esm/src/components/FormattedNumber/FormattedNumber.module.scss.js +1 -1
  298. package/dist/mocked_classnames_esm/src/components/HeaderActions/HeaderActions.module.scss.js +1 -1
  299. package/dist/mocked_classnames_esm/src/components/Heading/Heading.module.scss.js +1 -1
  300. package/dist/mocked_classnames_esm/src/components/HiddenText/HiddenText.module.scss.js +1 -1
  301. package/dist/mocked_classnames_esm/src/components/Icon/Icon.module.scss.js +1 -1
  302. package/dist/mocked_classnames_esm/src/components/IconButton/IconButton.module.scss.js +1 -1
  303. package/dist/mocked_classnames_esm/src/components/InlineEdit/InlineEdit.module.scss.js +1 -1
  304. package/dist/mocked_classnames_esm/src/components/Label/Label.module.scss.js +1 -1
  305. package/dist/mocked_classnames_esm/src/components/LegacyEditableHeading/LegacyEditableHeading.module.scss.js +1 -1
  306. package/dist/mocked_classnames_esm/src/components/LegacyHeading/LegacyHeading.module.scss.js +1 -1
  307. package/dist/mocked_classnames_esm/src/components/Link/Link.module.scss.js +1 -1
  308. package/dist/mocked_classnames_esm/src/components/List/List.module.scss.js +1 -1
  309. package/dist/mocked_classnames_esm/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
  310. package/dist/mocked_classnames_esm/src/components/ListItem/ListItem.module.scss.js +1 -1
  311. package/dist/mocked_classnames_esm/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
  312. package/dist/mocked_classnames_esm/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
  313. package/dist/mocked_classnames_esm/src/components/ListTitle/ListTitle.module.scss.js +1 -1
  314. package/dist/mocked_classnames_esm/src/components/Loader/Loader.module.scss.js +1 -1
  315. package/dist/mocked_classnames_esm/src/components/Menu/Menu/Menu.module.scss.js +1 -1
  316. package/dist/mocked_classnames_esm/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
  317. package/dist/mocked_classnames_esm/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
  318. package/dist/mocked_classnames_esm/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
  319. package/dist/mocked_classnames_esm/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
  320. package/dist/mocked_classnames_esm/src/components/MenuButton/MenuButton.module.scss.js +1 -1
  321. package/dist/mocked_classnames_esm/src/components/Modal/Modal.module.scss.js +1 -1
  322. package/dist/mocked_classnames_esm/src/components/Modal/ModalContent/ModalContent.module.scss.js +1 -1
  323. package/dist/mocked_classnames_esm/src/components/Modal/ModalFooter/ModalFooter.module.scss.js +1 -1
  324. package/dist/mocked_classnames_esm/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
  325. package/dist/mocked_classnames_esm/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
  326. package/dist/mocked_classnames_esm/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
  327. package/dist/mocked_classnames_esm/src/components/NewTable/Table.module.scss.js +1 -1
  328. package/dist/mocked_classnames_esm/src/components/NewTable/components/Cell/Cell.module.scss.js +1 -1
  329. package/dist/mocked_classnames_esm/src/components/NewTable/components/Cell/HeaderCell/HeaderCell.module.scss.js +1 -1
  330. package/dist/mocked_classnames_esm/src/components/NewTable/components/ExpandedContent/ExpandedContent.module.scss.js +1 -1
  331. package/dist/mocked_classnames_esm/src/components/NewTable/components/Row/Row.module.scss.js +1 -1
  332. package/dist/mocked_classnames_esm/src/components/NewTable/components/TableHead/TableHead.module.scss.js +1 -1
  333. package/dist/mocked_classnames_esm/src/components/NewTable/components/TableHeader/TableHeader.module.scss.js +1 -1
  334. package/dist/mocked_classnames_esm/src/components/NewTable/components/ToggleExpandedIcon/ToggleExpandedIcon.module.scss.js +1 -1
  335. package/dist/mocked_classnames_esm/src/components/NewTable/components/newComponents/pagination/Pagination.module.scss.js +1 -1
  336. package/dist/mocked_classnames_esm/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.module.scss.js +1 -1
  337. package/dist/mocked_classnames_esm/src/components/NumericField/NumericField.module.scss.js +1 -1
  338. package/dist/mocked_classnames_esm/src/components/PageHeader/PageHeader.module.scss.js +1 -1
  339. package/dist/mocked_classnames_esm/src/components/Panel/Panel.module.scss.js +1 -1
  340. package/dist/mocked_classnames_esm/src/components/ProgressBars/LinearProgressBar/Bar/Bar.module.scss.js +1 -1
  341. package/dist/mocked_classnames_esm/src/components/ProgressBars/LinearProgressBar/LinearProgressBar.module.scss.js +1 -1
  342. package/dist/mocked_classnames_esm/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +1 -1
  343. package/dist/mocked_classnames_esm/src/components/RadioButton/RadioButton.module.scss.js +1 -1
  344. package/dist/mocked_classnames_esm/src/components/ResponsiveList/ResponsiveList.module.scss.js +1 -1
  345. package/dist/mocked_classnames_esm/src/components/Search/Search.module.scss.js +1 -1
  346. package/dist/mocked_classnames_esm/src/components/SectionHeader/SectionHeader.module.scss.js +1 -1
  347. package/dist/mocked_classnames_esm/src/components/Sidebar/Sidebar.module.scss.js +1 -1
  348. package/dist/mocked_classnames_esm/src/components/Skeleton/Skeleton.module.scss.js +1 -1
  349. package/dist/mocked_classnames_esm/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
  350. package/dist/mocked_classnames_esm/src/components/Slider/Slider.module.scss.js +1 -1
  351. package/dist/mocked_classnames_esm/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
  352. package/dist/mocked_classnames_esm/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
  353. package/dist/mocked_classnames_esm/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
  354. package/dist/mocked_classnames_esm/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
  355. package/dist/mocked_classnames_esm/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
  356. package/dist/mocked_classnames_esm/src/components/Slider/SliderInfix.module.scss.js +1 -1
  357. package/dist/mocked_classnames_esm/src/components/SplitButton/SplitButton.module.scss.js +1 -1
  358. package/dist/mocked_classnames_esm/src/components/Steps/Steps.module.scss.js +1 -1
  359. package/dist/mocked_classnames_esm/src/components/Steps/StepsCommand.module.scss.js +1 -1
  360. package/dist/mocked_classnames_esm/src/components/Steps/StepsDot.module.scss.js +1 -1
  361. package/dist/mocked_classnames_esm/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
  362. package/dist/mocked_classnames_esm/src/components/Steps/StepsHeader.module.scss.js +1 -1
  363. package/dist/mocked_classnames_esm/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
  364. package/dist/mocked_classnames_esm/src/components/Switch/Switch.module.scss.js +1 -1
  365. package/dist/mocked_classnames_esm/src/components/Table/Table.js +1 -1
  366. package/dist/mocked_classnames_esm/src/components/Table/Table.js.map +1 -1
  367. package/dist/mocked_classnames_esm/src/components/Table/TableHeader.module.scss.js +1 -1
  368. package/dist/mocked_classnames_esm/src/components/Table/actionHandlers/expandHandler.js +2 -0
  369. package/dist/mocked_classnames_esm/src/components/Table/actionHandlers/expandHandler.js.map +1 -0
  370. package/dist/mocked_classnames_esm/src/components/Table/actionHandlers/filterHandler.js +2 -0
  371. package/dist/mocked_classnames_esm/src/components/Table/actionHandlers/filterHandler.js.map +1 -0
  372. package/dist/mocked_classnames_esm/src/components/Table/actionHandlers/resizeHandler.js +2 -0
  373. package/dist/mocked_classnames_esm/src/components/Table/actionHandlers/resizeHandler.js.map +1 -0
  374. package/dist/mocked_classnames_esm/src/components/Table/actionHandlers/selectHandler.js +2 -0
  375. package/dist/mocked_classnames_esm/src/components/Table/actionHandlers/selectHandler.js.map +1 -0
  376. package/dist/mocked_classnames_esm/src/components/Table/columns/expanderColumn.js +1 -1
  377. package/dist/mocked_classnames_esm/src/components/Table/columns/expanderColumn.js.map +1 -1
  378. package/dist/mocked_classnames_esm/src/components/Table/columns/selectionColumn.js +1 -1
  379. package/dist/mocked_classnames_esm/src/components/Table/columns/selectionColumn.js.map +1 -1
  380. package/dist/mocked_classnames_esm/src/components/Table/filters/FilterToggle.js +2 -0
  381. package/dist/mocked_classnames_esm/src/components/Table/filters/FilterToggle.js.map +1 -0
  382. package/dist/mocked_classnames_esm/src/components/Table/filters/customFilterFunctions.js +2 -0
  383. package/dist/mocked_classnames_esm/src/components/Table/filters/customFilterFunctions.js.map +1 -0
  384. package/dist/mocked_classnames_esm/src/components/Table/filters/defaultFilterFunctions.js +2 -0
  385. package/dist/mocked_classnames_esm/src/components/Table/filters/defaultFilterFunctions.js.map +1 -0
  386. package/dist/mocked_classnames_esm/src/components/Table/hooks/useColumnDragAndDrop.js +2 -0
  387. package/dist/mocked_classnames_esm/src/components/Table/hooks/useColumnDragAndDrop.js.map +1 -0
  388. package/dist/mocked_classnames_esm/src/components/Table/hooks/useExpanderCell.js +2 -0
  389. package/dist/mocked_classnames_esm/src/components/Table/hooks/useExpanderCell.js.map +1 -0
  390. package/dist/mocked_classnames_esm/src/components/Table/hooks/useResizeColumns.js +2 -0
  391. package/dist/mocked_classnames_esm/src/components/Table/hooks/useResizeColumns.js.map +1 -0
  392. package/dist/mocked_classnames_esm/src/components/Table/hooks/useScrollToRow.js +2 -0
  393. package/dist/mocked_classnames_esm/src/components/Table/hooks/useScrollToRow.js.map +1 -0
  394. package/dist/mocked_classnames_esm/src/components/Table/hooks/useSelectionCell.js +2 -0
  395. package/dist/mocked_classnames_esm/src/components/Table/hooks/useSelectionCell.js.map +1 -0
  396. package/dist/mocked_classnames_esm/src/components/Table/hooks/useStickyColumns.js +2 -0
  397. package/dist/mocked_classnames_esm/src/components/Table/hooks/useStickyColumns.js.map +1 -0
  398. package/dist/mocked_classnames_esm/src/components/Table/hooks/useSubRowFiltering.js +2 -0
  399. package/dist/mocked_classnames_esm/src/components/Table/hooks/useSubRowFiltering.js.map +1 -0
  400. package/dist/mocked_classnames_esm/src/components/Table/hooks/useSubRowSelection.js +2 -0
  401. package/dist/mocked_classnames_esm/src/components/Table/hooks/useSubRowSelection.js.map +1 -0
  402. package/dist/mocked_classnames_esm/src/components/Table/new/Buttons/IconButton.js +2 -0
  403. package/dist/mocked_classnames_esm/src/components/Table/new/Buttons/IconButton.js.map +1 -0
  404. package/dist/mocked_classnames_esm/src/components/Table/new/Popover/Popover.js +1 -1
  405. package/dist/mocked_classnames_esm/src/components/Table/new/Popover/Popover.js.map +1 -1
  406. package/dist/mocked_classnames_esm/src/components/Table/new/ThemeProvider/ThemeProvider.js +2 -0
  407. package/dist/mocked_classnames_esm/src/components/Table/new/ThemeProvider/ThemeProvider.js.map +1 -0
  408. package/dist/mocked_classnames_esm/src/components/Table/new/Toast/Toast.js +2 -0
  409. package/dist/mocked_classnames_esm/src/components/Table/new/Toast/Toast.js.map +1 -0
  410. package/dist/mocked_classnames_esm/src/components/Table/new/Toast/Toaster.js +1 -1
  411. package/dist/mocked_classnames_esm/src/components/Table/new/Toast/Toaster.js.map +1 -1
  412. package/dist/mocked_classnames_esm/src/components/Table/new/utils/components/VirtualScroll.js +2 -0
  413. package/dist/mocked_classnames_esm/src/components/Table/new/utils/components/VirtualScroll.js.map +1 -0
  414. package/dist/mocked_classnames_esm/src/components/Table/new/utils/functions/dev.js +1 -1
  415. package/dist/mocked_classnames_esm/src/components/Table/new/utils/functions/dev.js.map +1 -1
  416. package/dist/mocked_classnames_esm/src/components/Table/new/utils/functions/import.js +2 -0
  417. package/dist/mocked_classnames_esm/src/components/Table/new/utils/functions/import.js.map +1 -0
  418. package/dist/mocked_classnames_esm/src/components/Table/new/utils/hooks/useLatestRef.js +2 -0
  419. package/dist/mocked_classnames_esm/src/components/Table/new/utils/hooks/useLatestRef.js.map +1 -0
  420. package/dist/mocked_classnames_esm/src/components/Table/new/utils/hooks/useMediaQuery.js +2 -0
  421. package/dist/mocked_classnames_esm/src/components/Table/new/utils/hooks/useMediaQuery.js.map +1 -0
  422. package/dist/mocked_classnames_esm/src/components/Table/new/utils/hooks/useSafeContext.js +2 -0
  423. package/dist/mocked_classnames_esm/src/components/Table/new/utils/hooks/useSafeContext.js.map +1 -0
  424. package/dist/mocked_classnames_esm/src/components/Table/styling/column-filter.scss.js +2 -0
  425. package/dist/mocked_classnames_esm/src/components/Table/styling/column-filter.scss.js.map +1 -0
  426. package/dist/mocked_classnames_esm/src/components/Table/styling/paginator.scss.js +1 -1
  427. package/dist/mocked_classnames_esm/src/components/Table/styling/table_base.scss.js +1 -1
  428. package/dist/mocked_classnames_esm/src/components/Table/table.scss.js +1 -1
  429. package/dist/mocked_classnames_esm/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
  430. package/dist/mocked_classnames_esm/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
  431. package/dist/mocked_classnames_esm/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
  432. package/dist/mocked_classnames_esm/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
  433. package/dist/mocked_classnames_esm/src/components/Tags/Tags.module.scss.js +1 -1
  434. package/dist/mocked_classnames_esm/src/components/Text/Text.module.scss.js +1 -1
  435. package/dist/mocked_classnames_esm/src/components/TextAreaField/TextAreaField.module.scss.js +1 -1
  436. package/dist/mocked_classnames_esm/src/components/TextField/TextField.module.scss.js +1 -1
  437. package/dist/mocked_classnames_esm/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
  438. package/dist/mocked_classnames_esm/src/components/Timeline/Timeline/Timeline.module.scss.js +1 -1
  439. package/dist/mocked_classnames_esm/src/components/Timeline/TimelineRow/TimelineRow.module.scss.js +1 -1
  440. package/dist/mocked_classnames_esm/src/components/Tipseen/Tipseen.module.scss.js +1 -1
  441. package/dist/mocked_classnames_esm/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
  442. package/dist/mocked_classnames_esm/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
  443. package/dist/mocked_classnames_esm/src/components/Tipseen/TipseenImage.module.scss.js +1 -1
  444. package/dist/mocked_classnames_esm/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
  445. package/dist/mocked_classnames_esm/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
  446. package/dist/mocked_classnames_esm/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
  447. package/dist/mocked_classnames_esm/src/components/Toast/Toast.module.scss.js +1 -1
  448. package/dist/mocked_classnames_esm/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
  449. package/dist/mocked_classnames_esm/src/components/Toggle/MockToggle.module.scss.js +1 -1
  450. package/dist/mocked_classnames_esm/src/components/Toggle/Toggle.module.scss.js +1 -1
  451. package/dist/mocked_classnames_esm/src/components/Toggle/ToggleText.module.scss.js +1 -1
  452. package/dist/mocked_classnames_esm/src/components/Tooltip/Tooltip.module.scss.js +1 -1
  453. package/dist/mocked_classnames_esm/src/components/TopNavigationBar/TopNavigationBar.module.scss.js +1 -1
  454. package/dist/mocked_classnames_esm/src/components/TopNavigationBar/components/Notification/Notification.module.scss.js +1 -1
  455. package/dist/mocked_classnames_esm/src/components/TopNavigationBar/components/NotificationItem/NotificationItem.module.scss.js +1 -1
  456. package/dist/mocked_classnames_esm/src/components/Tree/components/TreeFile/TreeFile.scss.js +1 -1
  457. package/dist/mocked_classnames_esm/src/components/Tree/components/TreeFileIcon/TreeFileIcon.scss.js +1 -1
  458. package/dist/mocked_classnames_esm/src/components/Tree/components/TreeFolder/TreeFolder.scss.js +1 -1
  459. package/dist/mocked_classnames_esm/src/components/Tree/components/TreeFolderIcon/TreeFolderIcon.scss.js +1 -1
  460. package/dist/mocked_classnames_esm/src/components/Tree/components/TreeStatusIcon/TreeStatusIcon.scss.js +1 -1
  461. package/dist/mocked_classnames_esm/src/components/Tree/components/expand/expand.scss.js +1 -1
  462. package/dist/mocked_classnames_esm/src/components/Typography/Typography.module.scss.js +1 -1
  463. package/dist/mocked_classnames_esm/src/components/Uploader/Uploader.scss.js +1 -1
  464. package/dist/mocked_classnames_esm/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
  465. package/dist/mocked_classnames_esm/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
  466. package/dist/mocked_classnames_esm/src/components/Workflow/workflow.scss.js +1 -1
  467. package/dist/mocked_classnames_esm/src/index.js +1 -1
  468. package/dist/mocked_classnames_esm/style/dist/index.min.css.js +1 -1
  469. package/dist/types/components/index.d.ts +3 -1
  470. package/dist/types/components/index.d.ts.map +1 -1
  471. package/package.json +2 -2
  472. package/src/components/index.ts +3 -3
@@ -0,0 +1,2 @@
1
+ import{toConsumableArray as o}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import"react/jsx-runtime";import"react";import"classnames";import"lodash-es";import"../../Icon/Icon.js";import"../../Icon/Icons/components/Check.js";import"../../Icon/Icons/components/Remove.js";import"../../../tests/constants.js";import"../../Text/Text.js";import"../../Checkbox/Checkbox.module.scss.js";import"../../../../_virtual/_tslib.js";import"../new/utils/functions/colors.js";import"../new/utils/functions/polymorphic.js";import"../new/utils/functions/dev.js";import"../new/utils/hooks/useId.js";import"../new/utils/color/ColorValue.js";import"react-dom";import"../new/utils/components/Box.js";import"@floating-ui/react";import"../new/Toast/Toaster.js";import"../../ListItem/ListItem.js";import"../../Icon/Icons/components/DropdownChevronRight.js";import{SELECTION_CELL_ID as t,SelectionColumn as n}from"../columns/selectionColumn.js";import"../../IconButton/IconButton.js";import"../../Icon/Icons/components/MoveArrowRight.js";import"../../Icon/Icons/components/MoveArrowDown.js";import"../table.scss.js";import"../../Icon/Icons/components/Settings.js";import"../../DialogContentContainer/DialogContentContainer.js";var s=function(s,i,r){var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"default";return function(m){s&&m.allColumns.push((function(s){return"single"===i||s.find((function(o){return o.id===t}))?s:[n({isDisabled:r,density:e})].concat(o(s))}))}};export{s as useSelectionCell};
2
+ //# sourceMappingURL=useSelectionCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSelectionCell.js","sources":["../../../../../../src/components/Table/hooks/useSelectionCell.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { ColumnInstance, Hooks } from \"../../../react-table/react-table\";\nimport { SelectionColumn, SELECTION_CELL_ID } from \"../columns/index\";\n\nexport const useSelectionCell =\n <T extends Record<string, unknown>>(\n isSelectable: boolean,\n selectionMode: \"multi\" | \"single\",\n isRowDisabled?: (rowData: T) => boolean,\n density: \"default\" | \"condensed\" | \"extra-condensed\" = \"default\"\n ) =>\n (hooks: Hooks<T>) => {\n if (!isSelectable) {\n return;\n }\n\n hooks.allColumns.push((columns: ColumnInstance<T>[]) =>\n selectionMode === \"single\" ||\n columns.find((c) => c.id === SELECTION_CELL_ID)\n ? columns\n : [\n SelectionColumn({ isDisabled: isRowDisabled, density: density }),\n ...columns,\n ]\n );\n };\n"],"names":["useSelectionCell","isSelectable","selectionMode","isRowDisabled","density","arguments","length","undefined","hooks","allColumns","push","columns","find","c","id","SELECTION_CELL_ID","SelectionColumn","isDisabled","concat","_toConsumableArray"],"mappings":"4rCAOO,IAAMA,EACX,SACEC,EACAC,EACAC,GAAuC,IACvCC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAuD,UAAS,OAElE,SAACG,GACMP,GAILO,EAAMC,WAAWC,MAAK,SAACC,GAA4B,MAC/B,WAAlBT,GACAS,EAAQC,MAAK,SAACC,GAAC,OAAKA,EAAEC,KAAOC,CAAiB,IAC1CJ,EAEEK,CAAAA,EAAgB,CAAEC,WAAYd,EAAeC,QAASA,KAAUc,OAAAC,EAC7DR,OAGZ"}
@@ -0,0 +1,2 @@
1
+ import{toConsumableArray as t}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{actions as i}from"react-table";i.setScrolledLeft="setScrolledLeft",i.setScrolledRight="setScrolledRight";var e=function(t){t.stateReducers.push(s),t.useInstance.push(c)},s=function(t,e){var s,c;return e.type===i.init?Object.assign(Object.assign({},t),{sticky:{}}):e.type===i.setScrolledLeft&&(null===(s=t.sticky)||void 0===s?void 0:s.isScrolledToLeft)!==e.value?Object.assign(Object.assign({},t),{sticky:Object.assign(Object.assign({},t.sticky),{isScrolledToLeft:e.value})}):e.type===i.setScrolledRight&&(null===(c=t.sticky)||void 0===c?void 0:c.isScrolledToRight)!==e.value?Object.assign(Object.assign({},t),{sticky:Object.assign(Object.assign({},t.sticky),{isScrolledToRight:e.value})}):t},c=function(i){var e=i.flatHeaders;e.forEach((function(t){var i;t.originalSticky||(t.originalSticky=null!==(i=t.sticky)&&void 0!==i?i:"none"),t.sticky="none"===t.originalSticky?void 0:t.originalSticky}));var s=!1;t(e).reverse().forEach((function(t){"left"===t.sticky&&(s=!0),s&&(t.sticky="left")}));var c=!1;e.forEach((function(t){"right"===t.sticky&&(c=!0),c&&(t.sticky="right")}))};export{e as useStickyColumns};
2
+ //# sourceMappingURL=useStickyColumns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStickyColumns.js","sources":["../../../../../../src/components/Table/hooks/useStickyColumns.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { actions } from \"react-table\";\nimport type {\n ActionType,\n Hooks,\n TableInstance,\n TableState,\n} from \"../../../react-table/react-table\";\n\nactions.setScrolledLeft = \"setScrolledLeft\";\nactions.setScrolledRight = \"setScrolledRight\";\n\nexport const useStickyColumns = <T extends Record<string, unknown>>(\n hooks: Hooks<T>\n) => {\n hooks.stateReducers.push(reducer);\n hooks.useInstance.push(useInstance);\n};\n\nconst reducer = <T extends Record<string, unknown>>(\n newState: TableState<T>,\n action: ActionType\n): TableState<T> => {\n if (action.type === actions.init) {\n return {\n ...newState,\n sticky: {},\n };\n }\n\n if (\n action.type === actions.setScrolledLeft &&\n newState.sticky?.isScrolledToLeft !== action.value // Prevents unnecessary re-render\n ) {\n return {\n ...newState,\n sticky: {\n ...newState.sticky,\n isScrolledToLeft: action.value,\n },\n };\n }\n\n if (\n action.type === actions.setScrolledRight &&\n newState.sticky?.isScrolledToRight !== action.value // Prevents unnecessary re-render\n ) {\n return {\n ...newState,\n sticky: {\n ...newState.sticky,\n isScrolledToRight: action.value,\n },\n };\n }\n\n return newState;\n};\n\nconst useInstance = <T extends Record<string, unknown>>(\n instance: TableInstance<T>\n) => {\n const { flatHeaders } = instance;\n\n // Edge case. Saving original sticky state in case sticky columns are reordered.\n flatHeaders.forEach((header) => {\n if (!header.originalSticky) {\n header.originalSticky = header.sticky ?? \"none\";\n }\n header.sticky =\n header.originalSticky === \"none\" ? undefined : header.originalSticky;\n });\n\n // If there is a column that is sticked to the left, make every column prior to that sticky too.\n let hasLeftStickyColumn = false;\n [...flatHeaders].reverse().forEach((header) => {\n if (header.sticky === \"left\") {\n hasLeftStickyColumn = true;\n }\n if (hasLeftStickyColumn) {\n header.sticky = \"left\";\n }\n });\n\n // If there is a column that is sticked to the right, make every column after to that sticky too.\n let hasRightStickyColumn = false;\n flatHeaders.forEach((header) => {\n if (header.sticky === \"right\") {\n hasRightStickyColumn = true;\n }\n if (hasRightStickyColumn) {\n header.sticky = \"right\";\n }\n });\n};\n"],"names":["actions","setScrolledLeft","setScrolledRight","useStickyColumns","hooks","stateReducers","push","reducer","useInstance","newState","action","type","init","Object","assign","sticky","_a","isScrolledToLeft","value","_b","isScrolledToRight","instance","flatHeaders","forEach","header","originalSticky","undefined","hasLeftStickyColumn","_toConsumableArray","reverse","hasRightStickyColumn"],"mappings":"4HAYAA,EAAQC,gBAAkB,kBAC1BD,EAAQE,iBAAmB,uBAEdC,EAAmB,SAC9BC,GAEAA,EAAMC,cAAcC,KAAKC,GACzBH,EAAMI,YAAYF,KAAKE,EACzB,EAEMD,EAAU,SACdE,EACAC,WAEA,OAAIA,EAAOC,OAASX,EAAQY,KAC1BC,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACKL,GAAQ,CACXM,OAAQ,KAKVL,EAAOC,OAASX,EAAQC,kBACT,QAAfe,EAAAP,EAASM,cAAM,IAAAC,OAAA,EAAAA,EAAEC,oBAAqBP,EAAOQ,MAE7CL,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACKL,GAAQ,CACXM,OAAMF,OAAAC,OAAAD,OAAAC,OAAA,GACDL,EAASM,QAAM,CAClBE,iBAAkBP,EAAOQ,UAM7BR,EAAOC,OAASX,EAAQE,mBACT,QAAfiB,EAAAV,EAASM,cAAM,IAAAI,OAAA,EAAAA,EAAEC,qBAAsBV,EAAOQ,MAE9CL,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACKL,GAAQ,CACXM,OAAMF,OAAAC,OAAAD,OAAAC,OAAA,GACDL,EAASM,QAAM,CAClBK,kBAAmBV,EAAOQ,UAKzBT,CACT,EAEMD,EAAc,SAClBa,GAEA,IAAQC,EAAgBD,EAAhBC,YAGRA,EAAYC,SAAQ,SAACC,SACdA,EAAOC,iBACVD,EAAOC,eAAkC,QAAjBT,EAAAQ,EAAOT,cAAU,IAAAC,EAAAA,EAAA,QAE3CQ,EAAOT,OACqB,SAA1BS,EAAOC,oBAA4BC,EAAYF,EAAOC,cAC1D,IAGA,IAAIE,GAAsB,EAC1BC,EAAIN,GAAaO,UAAUN,SAAQ,SAACC,GACZ,SAAlBA,EAAOT,SACTY,GAAsB,GAEpBA,IACFH,EAAOT,OAAS,OAEpB,IAGA,IAAIe,GAAuB,EAC3BR,EAAYC,SAAQ,SAACC,GACG,UAAlBA,EAAOT,SACTe,GAAuB,GAErBA,IACFN,EAAOT,OAAS,QAEpB,GACF"}
@@ -0,0 +1,2 @@
1
+ import{toConsumableArray as i}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import*as t from"react";import{defaultFilterFunctions as o}from"../filters/defaultFilterFunctions.js";var r=function(i){return function(t){t.useInstance.push(e.bind({},i))}},e=function(r,e){!function i(t){t.forEach((function(t){t.initialSubRows||(t.initialSubRows=t.subRows),i(t.subRows)}))}(e.initialRows);var s=t.useMemo((function(){if(!r)return{};!function i(t){t.forEach((function(t){var o;t.subRows=null!==(o=t.initialSubRows)&&void 0!==o?o:[],i(t.subRows)}))}(e.initialRows);var t=i(e.initialRows);e.state.filters.forEach((function(i){var r,s=i.id,l=i.value,f=e.allColumns.find((function(i){return i.id===s}));if(f){var u=Object.assign(Object.assign({},o),e.filterTypes),a="function"==typeof f.filter?f.filter:u[null!==(r=f.filter)&&void 0!==r?r:"text"];t=t.filter((function(i){return n(i,a,s,l)}))}}));var s=[],l=[],f={},u=function i(t){0===t.depth&&s.push(t),l.push(t),f[t.id]=t,t.subRows.length&&t.subRows.forEach((function(t){return i(t)}))};return t.forEach((function(i){return u(i)})),{filteredRows:s,filteredFlatRows:l,filteredRowsById:f}}),[e.allColumns,e.filterTypes,e.initialRows,e.state.filters,r]),l=s.filteredRows,f=void 0===l?e.filteredRows:l,u=s.filteredFlatRows,a=void 0===u?e.filteredFlatRows:u,w=s.filteredRowsById,d=void 0===w?e.filteredRowsById:w;Object.assign(e,{filteredRows:f,filteredFlatRows:a,filteredRowsById:d,rows:f,flatRows:a,rowsById:d})},n=function i(t,o,r,e){var n=!1;return t.subRows=t.initialSubRows.filter((function(t){var s=i(t,o,r,e);return s&&(n=!0),s})),!!n||!!o([t],[r],e).length};export{r as useSubRowFiltering};
2
+ //# sourceMappingURL=useSubRowFiltering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSubRowFiltering.js","sources":["../../../../../../src/components/Table/hooks/useSubRowFiltering.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nimport type {\n Hooks,\n IdType,\n Row,\n TableInstance,\n} from \"../../../react-table/react-table\";\nimport { defaultFilterFunctions } from \"../filters/defaultFilterFunctions\";\n\nexport const useSubRowFiltering =\n <T extends Record<string, unknown>>(hasAnySubRows: boolean) =>\n (hooks: Hooks<T>) => {\n hooks.useInstance.push(useInstance.bind({}, hasAnySubRows));\n };\n\nconst useInstance = <T extends Record<string, unknown>>(\n hasAnySubRows: boolean,\n instance: TableInstance<T>\n) => {\n // There is a bug in react-table that filtered out sub-rows won't be shown after clearing the filter.\n // Therefore saving original sub-rows separately.\n // Related issue: https://github.com/tannerlinsley/react-table/issues/2928\n const setInitialSubRows = (rows: Row<T>[]) => {\n rows.forEach((row) => {\n if (!row.initialSubRows) {\n row.initialSubRows = row.subRows;\n }\n setInitialSubRows(row.subRows);\n });\n };\n setInitialSubRows(instance.initialRows);\n\n const {\n filteredRows = instance.filteredRows,\n filteredFlatRows = instance.filteredFlatRows,\n filteredRowsById = instance.filteredRowsById,\n } = React.useMemo(() => {\n if (!hasAnySubRows) {\n return {};\n }\n\n // Restore original sub-rows\n const setSubRows = (rows: Row<T>[]) => {\n rows.forEach((row) => {\n row.subRows = row.initialSubRows ?? [];\n setSubRows(row.subRows);\n });\n };\n setSubRows(instance.initialRows);\n\n let currentlyFilteredRows = [...instance.initialRows];\n\n instance.state.filters.forEach(({ id: columnId, value: filterValue }) => {\n const column = instance.allColumns.find((c) => c.id === columnId);\n if (!column) {\n return;\n }\n\n const filterTypes: Record<\n string,\n (\n rows: Row<T>[],\n columnIds: IdType<T>[],\n filterValue: unknown\n ) => Row<T>[]\n > = {\n ...defaultFilterFunctions,\n ...instance.filterTypes,\n };\n const filterFn =\n typeof column.filter === \"function\"\n ? column.filter\n : filterTypes[column.filter ?? \"text\"];\n\n currentlyFilteredRows = currentlyFilteredRows.filter((row) =>\n handleRowFiltering(row, filterFn, columnId, filterValue)\n );\n });\n\n const filteredRows: Row<T>[] = [];\n const filteredFlatRows: Row<T>[] = [];\n const filteredRowsById: Record<string, Row<T>> = {};\n\n // Setting rows here helps to keep them ordered.\n const populateRows = (row: Row<T>) => {\n if (row.depth === 0) {\n filteredRows.push(row);\n }\n filteredFlatRows.push(row);\n filteredRowsById[row.id] = row;\n if (row.subRows.length) {\n row.subRows.forEach((r) => populateRows(r));\n }\n };\n currentlyFilteredRows.forEach((row) => populateRows(row));\n\n return { filteredRows, filteredFlatRows, filteredRowsById };\n }, [\n instance.allColumns,\n instance.filterTypes,\n instance.initialRows,\n instance.state.filters,\n hasAnySubRows,\n ]);\n\n Object.assign(instance, {\n filteredRows,\n filteredFlatRows,\n filteredRowsById,\n rows: filteredRows,\n flatRows: filteredFlatRows,\n rowsById: filteredRowsById,\n });\n};\n\nconst handleRowFiltering = <T extends Record<string, unknown>>(\n row: Row<T>,\n filterFn: (\n rows: Row<T>[],\n columnIds: IdType<T>[],\n filterValue: unknown\n ) => Row<T>[],\n columnId: IdType<T>,\n filterValue: unknown\n): boolean => {\n let hasFilteredSubRows = false;\n row.subRows = row.initialSubRows.filter((subRow) => {\n const result = handleRowFiltering(subRow, filterFn, columnId, filterValue);\n if (result) {\n hasFilteredSubRows = true;\n }\n return result;\n });\n\n // If row has any sub-rows that meet filter conditions,\n // then that row also needs to be shown.\n if (hasFilteredSubRows) {\n return true;\n }\n\n const result = filterFn([row], [columnId], filterValue);\n return !!result.length;\n};\n"],"names":["useSubRowFiltering","hasAnySubRows","hooks","useInstance","push","bind","instance","setInitialSubRows","rows","forEach","row","initialSubRows","subRows","initialRows","_React$useMemo","React","useMemo","setSubRows","_a","currentlyFilteredRows","_toConsumableArray","state","filters","_ref","columnId","id","filterValue","value","column","allColumns","find","c","filterTypes","defaultFilterFunctions","filterFn","filter","handleRowFiltering","filteredRows","filteredFlatRows","filteredRowsById","populateRows","depth","length","r","_React$useMemo$filter","_React$useMemo$filter2","_React$useMemo$filter3","Object","assign","flatRows","rowsById","hasFilteredSubRows","subRow","result"],"mappings":"gMAaaA,EACX,SAAoCC,GAAsB,OAC1D,SAACC,GACCA,EAAMC,YAAYC,KAAKD,EAAYE,KAAK,CAAE,EAAEJ,IAC7C,EAEGE,EAAc,SAClBF,EACAK,IAK0B,SAApBC,EAAqBC,GACzBA,EAAKC,SAAQ,SAACC,GACPA,EAAIC,iBACPD,EAAIC,eAAiBD,EAAIE,SAE3BL,EAAkBG,EAAIE,QACxB,IAEFL,CAAkBD,EAASO,aAE3B,IAAAC,EAIIC,EAAMC,SAAQ,WAChB,IAAKf,EACH,MAAO,IAIU,SAAbgB,EAAcT,GAClBA,EAAKC,SAAQ,SAACC,SACZA,EAAIE,QAAgC,QAAtBM,EAAAR,EAAIC,sBAAkB,IAAAO,EAAAA,EAAA,GACpCD,EAAWP,EAAIE,QACjB,IAEFK,CAAWX,EAASO,aAEpB,IAAIM,EAAqBC,EAAOd,EAASO,aAEzCP,EAASe,MAAMC,QAAQb,SAAQ,SAAAc,GAAyC,MAAlCC,EAAQD,EAAZE,GAAqBC,EAAWH,EAAlBI,MACxCC,EAAStB,EAASuB,WAAWC,MAAK,SAACC,GAAC,OAAKA,EAAEN,KAAOD,KACxD,GAAKI,EAAL,CAIA,IAAMI,iCAQDC,G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,GAAqB,GAEhBE,CACT,MAIIF,KAIWjB,EAAS,CAACxB,GAAM,CAACc,GAAWE,GAC3BgB,MAClB"}
@@ -0,0 +1,2 @@
1
+ import*as e from"react";var t=function(e){e.useInstance.push(s)},s=function(t){var s=e.useMemo((function(){var e=[],s=function t(s,o){var c=!1;s.subRows.forEach((function(e){t(e,o),(e.isSelected||e.isSomeSelected)&&(c=!0)})),o[s.id]?(s.isSelected=!0,s.isSomeSelected=!1,e.push(s)):(s.isSelected=!1,s.isSomeSelected=c)};return t.rows.forEach((function(e){return s(e,t.state.selectedRowIds)})),e}),[t.rows,t.state.selectedRowIds]);Object.assign(t,{selectedFlatRows:s})};export{t as useSubRowSelection};
2
+ //# sourceMappingURL=useSubRowSelection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSubRowSelection.js","sources":["../../../../../../src/components/Table/hooks/useSubRowSelection.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\nimport type {\n Hooks,\n IdType,\n Row,\n TableInstance,\n} from '../../../react-table/react-table';\n\nexport const useSubRowSelection = <T extends Record<string, unknown>>(\n hooks: Hooks<T>,\n) => {\n hooks.useInstance.push(useInstance);\n};\n\nconst useInstance = <T extends Record<string, unknown>>(\n instance: TableInstance<T>,\n) => {\n const selectedFlatRows = React.useMemo(() => {\n const selectedFlatRows: Row<T>[] = [];\n const setSelectionState = (\n row: Row<T>,\n selectedRowIds: Record<IdType<T>, boolean>,\n ) => {\n let isSomeSubRowsSelected = false;\n row.subRows.forEach((subRow) => {\n setSelectionState(subRow, selectedRowIds);\n if (subRow.isSelected || subRow.isSomeSelected) {\n isSomeSubRowsSelected = true;\n }\n });\n\n if (selectedRowIds[row.id]) {\n row.isSelected = true;\n row.isSomeSelected = false;\n selectedFlatRows.push(row);\n } else {\n row.isSelected = false;\n row.isSomeSelected = isSomeSubRowsSelected;\n }\n };\n instance.rows.forEach((row) =>\n setSelectionState(row, instance.state.selectedRowIds),\n );\n return selectedFlatRows;\n }, [instance.rows, instance.state.selectedRowIds]);\n\n Object.assign(instance, {\n selectedFlatRows,\n });\n};\n"],"names":["useSubRowSelection","hooks","useInstance","push","instance","selectedFlatRows","React","useMemo","setSelectionState","row","selectedRowIds","isSomeSubRowsSelected","subRows","forEach","subRow","isSelected","isSomeSelected","id","rows","state","Object","assign"],"mappings":"4BAYaA,EAAqB,SAChCC,GAEAA,EAAMC,YAAYC,KAAKD,EACzB,EAEMA,EAAc,SAClBE,GAEA,IAAMC,EAAmBC,EAAMC,SAAQ,WACrC,IAAMF,EAA6B,GAC7BG,EAAoB,SAApBA,EACJC,EACAC,GAEA,IAAIC,GAAwB,EAC5BF,EAAIG,QAAQC,SAAQ,SAACC,GACnBN,EAAkBM,EAAQJ,IACtBI,EAAOC,YAAcD,EAAOE,kBAC9BL,GAAwB,EAE5B,IAEID,EAAeD,EAAIQ,KACrBR,EAAIM,YAAa,EACjBN,EAAIO,gBAAiB,EACrBX,EAAiBF,KAAKM,KAEtBA,EAAIM,YAAa,EACjBN,EAAIO,eAAiBL,IAMzB,OAHAP,EAASc,KAAKL,SAAQ,SAACJ,GAAG,OACxBD,EAAkBC,EAAKL,EAASe,MAAMT,mBAEjCL,CACT,GAAG,CAACD,EAASc,KAAMd,EAASe,MAAMT,iBAElCU,OAAOC,OAAOjB,EAAU,CACtBC,iBAAAA,GAEJ"}
@@ -0,0 +1,2 @@
1
+ import{__rest as i}from"../../../../../_virtual/_tslib.js";import{jsxs as s,jsx as e}from"react/jsx-runtime";import a from"classnames";import*as t from"react";import{ButtonBase as o}from"../utils/components/ButtonBase.js";import{Box as r}from"../utils/components/Box.js";import{VisuallyHidden as l}from"../VisuallyHidden/VisuallyHidden.js";import n from"../../../Tooltip/Tooltip.js";var c=t.forwardRef((function(t,c){var m=t.isActive,d=t.children,p=t.styleType,u=void 0===p?"default":p,f=t.size,b=t.className,v=t.label,j=t.iconProps,h=t.labelProps,y=i(t,["isActive","children","styleType","size","className","label","iconProps","labelProps"]),N=s(o,Object.assign({ref:c,className:a("iui-button",b),"data-iui-variant":"default"!==u?u:void 0,"data-iui-size":f,"data-iui-active":m,"aria-pressed":m},y,{children:[e(r,Object.assign({as:"span","aria-hidden":!0},j,{className:a("iui-button-icon",null==j?void 0:j.className)},{children:d})),v?e(l,{children:v}):null]}));return v?e(n,Object.assign({},h,{content:v},{children:N})):N}));export{c as IconButton};
2
+ //# sourceMappingURL=IconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.js","sources":["../../../../../../../src/components/Table/new/Buttons/IconButton.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport cx from \"classnames\";\nimport * as React from \"react\";\nimport { ButtonBase } from \"../utils/components/ButtonBase\";\nimport { Box } from \"../utils/components/Box\";\n\nimport type { ButtonProps } from \"./Button.js\";\nimport type { PolymorphicForwardRefComponent } from \"../utils/index\";\nimport { VisuallyHidden } from \"../VisuallyHidden/VisuallyHidden\";\nimport Tooltip from \"../../../Tooltip/Tooltip\";\n\nexport type IconButtonProps = {\n /**\n * Button gets active style.\n * @default false\n */\n isActive?: boolean;\n /**\n * Name of the button, shown in a tooltip and exposed to assistive technologies.\n */\n label?: React.ReactNode;\n /**\n * Props passed to the Tooltip that contains the `label`.\n * Can be used for customizing the tooltip's `placement`, etc.\n */\n labelProps?: Omit<\n React.ComponentPropsWithoutRef<typeof Tooltip>,\n \"content\" | \"reference\" | \"ariaStrategy\" | \"children\"\n >;\n /**\n * Passes props to IconButton icon.\n */\n iconProps?: React.ComponentProps<\"span\">;\n} & Omit<\n ButtonProps,\n \"startIcon\" | \"endIcon\" | \"startIconProps\" | \"endIconProps\" | \"labelProps\"\n>;\n\n/**\n * Icon button\n * @example\n * <IconButton label='Add'><SvgAdd /></IconButton>\n * @example\n * <IconButton label='Add' styleType='borderless'><SvgAdd /></IconButton>\n */\nexport const IconButton = React.forwardRef((props, ref) => {\n const {\n isActive,\n children,\n styleType = \"default\",\n size,\n className,\n label,\n iconProps,\n labelProps,\n ...rest\n } = props;\n\n // const buttonGroupOrientation = React.useContext(ButtonGroupContext);\n\n const button = (\n <ButtonBase\n ref={ref}\n className={cx(\"iui-button\", className)}\n data-iui-variant={styleType !== \"default\" ? styleType : undefined}\n data-iui-size={size}\n data-iui-active={isActive}\n aria-pressed={isActive}\n {...rest}\n >\n <Box\n as=\"span\"\n aria-hidden\n {...iconProps}\n className={cx(\"iui-button-icon\", iconProps?.className)}\n >\n {children}\n </Box>\n {label ? <VisuallyHidden>{label}</VisuallyHidden> : null}\n </ButtonBase>\n );\n\n return label ? (\n <Tooltip\n // placement=\"right\"\n {...labelProps}\n content={label}\n // ariaStrategy=\"none\"\n >\n {button}\n </Tooltip>\n ) : (\n button\n );\n}) as PolymorphicForwardRefComponent<\"button\", IconButtonProps>;\n"],"names":["IconButton","React","forwardRef","props","ref","isActive","children","_props$styleType","styleType","size","className","label","iconProps","labelProps","rest","__rest","button","_jsxs","ButtonBase","cx","undefined","_jsx","Box","Object","assign","as","VisuallyHidden","Tooltip","content"],"mappings":"+XAgDO,IAAMA,EAAaC,EAAMC,YAAW,SAACC,EAAOC,GACjD,IACEC,EASEF,EATFE,SACAC,EAQEH,EARFG,SAAQC,EAQNJ,EAPFK,UAAAA,OAAY,IAAHD,EAAG,UAASA,EACrBE,EAMEN,EANFM,KACAC,EAKEP,EALFO,UACAC,EAIER,EAJFQ,MACAC,EAGET,EAHFS,UACAC,EAEEV,EAFFU,WACGC,EAAIC,EACLZ,EAVE,CAUL,WAAA,WAAA,YAAA,OAAA,YAAA,QAAA,YAAA,eAIKa,EACJC,EAACC,iBACCd,IAAKA,EACLM,UAAWS,EAAG,aAAcT,GAAU,mBACN,YAAdF,EAA0BA,OAAYY,EAAS,gBAClDX,EACE,kBAAAJ,iBACHA,GACVS,EAEJ,CAAAR,SAAA,CAAAe,EAACC,EAAGC,OAAAC,OAAA,CACFC,GAAG,OAEC,eAAA,GAAAb,GACJF,UAAWS,EAAG,kBAAmBP,aAAS,EAATA,EAAWF,YAAU,CAAAJ,SAErDA,KAEFK,EAAQU,EAACK,EAAgB,CAAApB,SAAAK,IAA0B,SAIxD,OAAOA,EACLU,EAACM,EAEKJ,OAAAC,OAAA,CAAA,EAAAX,EACJ,CAAAe,QAASjB,aAGRK,KAGHA,CAEJ"}
@@ -1,2 +1,2 @@
1
- import{slicedToArray as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../_virtual/_tslib.js";import"react/jsx-runtime";import*as t from"react";import"classnames";import{useFloating as o,autoUpdate as i,offset as n,flip as s,shift as l,size as r,autoPlacement as a,inline as c,hide as u,useInteractions as p,useClick as m,useDismiss as f,useHover as d,safePolygon as g,useFocus as b,useRole as j}from"@floating-ui/react";import"../utils/components/Box.js";import"../utils/functions/colors.js";import"../utils/functions/polymorphic.js";import"../utils/functions/dev.js";import"../utils/hooks/useId.js";import{useControlledState as h}from"../utils/hooks/useControlledState.js";import"../utils/color/ColorValue.js";import"react-dom";import"../Toast/Toaster.js";var v=function(v){var O=v.placement,x=void 0===O?"bottom-start":O,y=v.visible,C=v.onVisibleChange,k=v.closeOnOutsideClick,S=v.autoUpdateOptions,w=v.matchWidth,P=v.trigger,I=void 0===P?{click:!0,hover:!1,focus:!1}:P,_=v.role,z=Object.assign({flip:!0,shift:!0},v.middleware),B=h(!1,y,C),T=e(B,2),A=T[0],F=T[1],M=o({placement:x,open:A,onOpenChange:F,whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),o=0;e>o;o++)t[o]=arguments[o];return i.apply(void 0,t.concat([S]))},middleware:[void 0!==z.offset&&n(z.offset),z.flip&&s(),z.shift&&l(),w&&r({apply:function(e){W(e.rects.reference.width)}}),z.autoPlacement&&a(),z.inline&&c(),z.hide&&u()].filter(Boolean)}),V=p([m(M.context,{enabled:!!I.click}),f(M.context,{outsidePress:k}),d(M.context,{enabled:!!I.hover,delay:100,handleClose:g({buffer:1})}),b(M.context,{enabled:!!I.focus}),j(M.context,{role:"dialog",enabled:!!_})]),E=t.useState(),H=e(E,2),U=H[0],W=H[1],q=t.useCallback((function(e){return V.getFloatingProps(Object.assign(Object.assign({},e),{style:Object.assign(Object.assign(Object.assign(Object.assign({},M.floatingStyles),{zIndex:9999}),w&&U?{minInlineSize:"".concat(U,"px"),maxInlineSize:"min(".concat(2*U,"px, 90vw)")}:{}),null==e?void 0:e.style)}))}),[M.floatingStyles,V,w,U]);return t.useMemo((function(){return Object.assign(Object.assign(Object.assign({open:A,onOpenChange:F},V),{getFloatingProps:q}),M)}),[A,F,V,q,M])};export{v as usePopover};
1
+ import{slicedToArray as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as t}from"../../../../../_virtual/_tslib.js";import{jsxs as o,Fragment as i,jsx as n}from"react/jsx-runtime";import*as s from"react";import r from"classnames";import{useFloating as l,autoUpdate as a,offset as c,flip as f,shift as u,size as p,autoPlacement as d,inline as m,hide as g,useInteractions as b,useClick as h,useDismiss as j,useHover as v,safePolygon as O,useFocus as y,useRole as C,FloatingPortal as x,FloatingFocusManager as k}from"@floating-ui/react";import{Box as P}from"../utils/components/Box.js";import"../utils/functions/colors.js";import"../utils/functions/polymorphic.js";import{cloneElementWithRef as w}from"../utils/functions/react.js";import"../utils/functions/dev.js";import{useMergedRefs as R}from"../utils/hooks/useMergedRefs.js";import{useLayoutEffect as S}from"../utils/hooks/useIsomorphicLayoutEffect.js";import{useId as B}from"../utils/hooks/useId.js";import{useControlledState as F}from"../utils/hooks/useControlledState.js";import"../utils/color/ColorValue.js";import{Portal as I}from"../utils/components/Portal.js";import{ThemeProvider as V}from"../ThemeProvider/ThemeProvider.js";var _=function(t){var o=t.placement,i=void 0===o?"bottom-start":o,n=t.visible,r=t.onVisibleChange,x=t.closeOnOutsideClick,k=t.autoUpdateOptions,P=t.matchWidth,w=t.trigger,R=void 0===w?{click:!0,hover:!1,focus:!1}:w,S=t.role,B=Object.assign({flip:!0,shift:!0},t.middleware),I=F(!1,n,r),V=e(I,2),_=V[0],z=V[1],E=l({placement:i,open:_,onOpenChange:z,whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),o=0;e>o;o++)t[o]=arguments[o];return a.apply(void 0,t.concat([k]))},middleware:[void 0!==B.offset&&c(B.offset),B.flip&&f(),B.shift&&u(),P&&p({apply:function(e){L(e.rects.reference.width)}}),B.autoPlacement&&d(),B.inline&&m(),B.hide&&g()].filter(Boolean)}),M=b([h(E.context,{enabled:!!R.click}),j(E.context,{outsidePress:x}),v(E.context,{enabled:!!R.hover,delay:100,handleClose:O({buffer:1})}),y(E.context,{enabled:!!R.focus}),C(E.context,{role:"dialog",enabled:!!S})]),N=s.useState(),T=e(N,2),A=T[0],L=T[1],H=s.useCallback((function(e){return M.getFloatingProps(Object.assign(Object.assign({},e),{style:Object.assign(Object.assign(Object.assign(Object.assign({},E.floatingStyles),{zIndex:9999}),P&&A?{minInlineSize:"".concat(A,"px"),maxInlineSize:"min(".concat(2*A,"px, 90vw)")}:{}),null==e?void 0:e.style)}))}),[E.floatingStyles,M,P,A]);return s.useMemo((function(){return Object.assign(Object.assign(Object.assign({open:_,onOpenChange:z},M),{getFloatingProps:H}),E)}),[_,z,M,H,E])},z=s.forwardRef((function(l,a){var c,f=l.portal,u=void 0===f||f,p=l.visible,d=l.placement,m=void 0===d?"bottom-start":d,g=l.onVisibleChange,b=l.closeOnOutsideClick,h=void 0===b||b,j=l.middleware,v=l.positionReference,O=l.className,y=l.children,C=l.content,F=l.applyBackground,z=void 0!==F&&F,E=t(l,["portal","visible","placement","onVisibleChange","closeOnOutsideClick","middleware","positionReference","className","children","content","applyBackground"]),M=_({visible:p,placement:m,onVisibleChange:g,closeOnOutsideClick:h,role:"dialog",middleware:j}),N=s.useState(),T=e(N,2),A=T[0],L=R(M.refs.setFloating,a,T[1]),H="".concat(B(),"-trigger"),U=!!l["aria-labelledby"]||!!l["aria-label"];return S((function(){if(v)return M.refs.setPositionReference(v),function(){M.refs.setPositionReference(null)}}),[M.refs,v]),o(i,{children:[w(y,(function(e){return Object.assign(Object.assign({id:e.props.id||H},M.getReferenceProps(e.props)),{ref:M.refs.setReference})})),M.open?n(I,Object.assign({portal:u},{children:n(x,{children:n(V,Object.assign({portalContainer:A},{children:n(k,Object.assign({context:M.context,modal:!1,initialFocus:M.refs.floating},{children:n(P,Object.assign({className:r({"iui-popover-surface":z},O),"aria-labelledby":U||null===(c=M.refs.domReference.current)||void 0===c?void 0:c.id},M.getFloatingProps(E),{ref:L},{children:C}))}))}))})})):null]})}));export{z as Popover,_ as usePopover};
2
2
  //# sourceMappingURL=Popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../../../../../../src/components/Table/new/Popover/Popover.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n// @ts-nocheck\n\nimport * as React from \"react\";\nimport cx from \"classnames\";\nimport {\n useFloating,\n useClick,\n useDismiss,\n useInteractions,\n size,\n autoUpdate,\n offset,\n flip,\n shift,\n autoPlacement,\n inline,\n hide,\n FloatingFocusManager,\n useHover,\n useFocus,\n safePolygon,\n useRole,\n FloatingPortal,\n} from \"@floating-ui/react\";\nimport type { SizeOptions, Placement } from \"@floating-ui/react\";\nimport { Box } from \"../utils/components/Box\";\nimport {\n cloneElementWithRef,\n useControlledState,\n useId,\n useLayoutEffect,\n useMergedRefs,\n} from \"../utils/index\";\nimport type { PolymorphicForwardRefComponent } from \"../utils/index\";\nimport { Portal } from \"../utils/components/Portal\";\nimport type { PortalProps } from \"../utils/components/Portal\";\nimport { ThemeProvider } from \"../ThemeProvider/ThemeProvider\";\n\ntype PopoverOptions = {\n /**\n * Placement of the popover content.\n * @default 'bottom-start'\n */\n placement?: Placement;\n /**\n * Controlled flag for whether the popover is visible.\n */\n visible?: boolean;\n\n /**\n * Callback invoked every time the popover visibility changes as a result\n * of internal logic. Should be used alongside `visible` prop.\n */\n onVisibleChange?: (visible: boolean) => void;\n /**\n * If true, the popover will close when clicking outside it.\n *\n * @default true\n */\n closeOnOutsideClick?: boolean;\n /**\n * Middleware options.\n *\n * By default, `flip` and `shift` are enabled.\n *\n * @see https://floating-ui.com/docs/middleware\n */\n middleware?: {\n offset?: number;\n flip?: boolean;\n shift?: boolean;\n autoPlacement?: boolean;\n hide?: boolean;\n inline?: boolean;\n };\n};\n\n// keep public api small to start with\ntype PopoverInternalProps = {\n /**\n * autoUpdate options that recalculates position\n * to ensure the floating element remains anchored\n * to its reference element, such as when scrolling\n * and resizing the screen\n *\n * https://floating-ui.com/docs/autoUpdate#options\n */\n autoUpdateOptions?: {\n ancestorScroll?: boolean;\n ancestorResize?: boolean;\n elementResize?: boolean;\n /**\n * Use this if you want popover to follow moving trigger element\n */\n animationFrame?: boolean;\n layoutShift?: boolean;\n };\n /**\n * By default, the popover will only open on click.\n * `hover` and `focus` can be manually specified as triggers.\n */\n trigger?: Partial<Record<\"hover\" | \"click\" | \"focus\", boolean>>;\n role?: \"dialog\" | \"menu\" | \"listbox\";\n /**\n * Whether the popover should match the width of the trigger.\n */\n matchWidth?: boolean;\n};\n\n// ----------------------------------------------------------------------------\n\nexport const usePopover = (options: PopoverOptions & PopoverInternalProps) => {\n const {\n placement = \"bottom-start\",\n visible,\n onVisibleChange,\n closeOnOutsideClick,\n autoUpdateOptions,\n matchWidth,\n trigger = { click: true, hover: false, focus: false },\n role,\n } = options;\n\n const middleware = { flip: true, shift: true, ...options.middleware };\n\n const [open, onOpenChange] = useControlledState(\n false,\n visible,\n onVisibleChange\n );\n\n const floating = useFloating({\n placement,\n open,\n onOpenChange,\n whileElementsMounted: (...args) => autoUpdate(...args, autoUpdateOptions),\n middleware: [\n middleware.offset !== undefined && offset(middleware.offset),\n middleware.flip && flip(),\n middleware.shift && shift(),\n matchWidth &&\n size({\n apply: ({ rects }) => {\n setReferenceWidth(rects.reference.width);\n },\n } as SizeOptions),\n middleware.autoPlacement && autoPlacement(),\n middleware.inline && inline(),\n middleware.hide && hide(),\n ].filter(Boolean),\n });\n\n const interactions = useInteractions([\n useClick(floating.context, { enabled: !!trigger.click }),\n useDismiss(floating.context, { outsidePress: closeOnOutsideClick }),\n useHover(floating.context, {\n enabled: !!trigger.hover,\n delay: 100,\n handleClose: safePolygon({ buffer: 1 }),\n }),\n useFocus(floating.context, { enabled: !!trigger.focus }),\n useRole(floating.context, { role: \"dialog\", enabled: !!role }),\n ]);\n\n const [referenceWidth, setReferenceWidth] = React.useState<number>();\n\n const getFloatingProps = React.useCallback(\n (userProps?: React.HTMLProps<HTMLElement>) =>\n interactions.getFloatingProps({\n ...userProps,\n style: {\n ...floating.floatingStyles,\n zIndex: 9999,\n ...(matchWidth && referenceWidth\n ? {\n minInlineSize: `${referenceWidth}px`,\n maxInlineSize: `min(${referenceWidth * 2}px, 90vw)`,\n }\n : {}),\n ...userProps?.style,\n },\n }),\n [floating.floatingStyles, interactions, matchWidth, referenceWidth]\n );\n\n return React.useMemo(\n () => ({\n open,\n onOpenChange,\n ...interactions,\n getFloatingProps,\n ...floating,\n }),\n [open, onOpenChange, interactions, getFloatingProps, floating]\n );\n};\n\n// ----------------------------------------------------------------------------\n\ntype PopoverPublicProps = {\n /**\n * Content displayed inside the popover.\n */\n content?: React.ReactNode;\n /**\n * Element that triggers the popover. Should usually be a button.\n */\n children?: React.ReactNode;\n /**\n * Whether the popover adds recommended CSS (background-color, box-shadow, etc.) to itself.\n *\n * @default false\n */\n applyBackground?: boolean;\n /**\n * This is used to position the popover relative to a different element than the trigger.\n *\n * Recommended to use state to store this element, rather than a ref.\n */\n positionReference?: HTMLElement;\n} & PortalProps &\n PopoverOptions;\n\n/**\n * A utility component to help with positioning of floating content relative to a trigger.\n * Built on top of [`floating-ui`](https://floating-ui.com/).\n *\n * @see https://itwinui.bentley.com/docs/popover\n *\n * @example\n * <Popover content='This is a popover'>\n * <Button>Show popover</Button>\n * </Popover>\n */\nexport const Popover = React.forwardRef((props, forwardedRef) => {\n const {\n portal = true,\n //\n // popover options\n visible,\n placement = \"bottom-start\",\n onVisibleChange,\n closeOnOutsideClick = true,\n middleware,\n //\n // extra props\n positionReference,\n //\n // dom props\n className,\n children,\n content,\n applyBackground = false,\n ...rest\n } = props;\n\n const popover = usePopover({\n visible,\n placement,\n onVisibleChange,\n closeOnOutsideClick,\n role: \"dialog\",\n middleware,\n });\n\n const [popoverElement, setPopoverElement] = React.useState<HTMLElement>();\n\n const popoverRef = useMergedRefs(\n popover.refs.setFloating,\n forwardedRef,\n setPopoverElement\n );\n\n const triggerId = `${useId()}-trigger`;\n const hasAriaLabel = !!props[\"aria-labelledby\"] || !!props[\"aria-label\"];\n\n useLayoutEffect(() => {\n if (!positionReference) {\n return;\n }\n popover.refs.setPositionReference(positionReference);\n return () => void popover.refs.setPositionReference(null);\n }, [popover.refs, positionReference]);\n\n return (\n <>\n {cloneElementWithRef(children, (children) => ({\n id: children.props.id || triggerId,\n ...popover.getReferenceProps(children.props),\n ref: popover.refs.setReference,\n }))}\n\n {popover.open ? (\n <Portal portal={portal}>\n <FloatingPortal>\n <ThemeProvider\n portalContainer={popoverElement} // portal nested popovers into this one\n >\n <FloatingFocusManager\n context={popover.context}\n modal={false}\n initialFocus={popover.refs.floating}\n >\n <Box\n className={cx(\n { \"iui-popover-surface\": applyBackground },\n className\n )}\n aria-labelledby={\n !hasAriaLabel\n ? popover.refs.domReference.current?.id\n : undefined\n }\n {...popover.getFloatingProps(rest)}\n ref={popoverRef}\n >\n {content}\n </Box>\n </FloatingFocusManager>\n </ThemeProvider>\n </FloatingPortal>\n </Portal>\n ) : null}\n </>\n );\n}) as PolymorphicForwardRefComponent<\"div\", PopoverPublicProps>;\n"],"names":["usePopover","options","_options$placement","placement","visible","onVisibleChange","closeOnOutsideClick","autoUpdateOptions","matchWidth","_options$trigger","trigger","click","hover","focus","role","middleware","Object","assign","flip","shift","_useControlledState","useControlledState","_useControlledState2","_slicedToArray","open","onOpenChange","floating","useFloating","whileElementsMounted","_len","arguments","length","args","Array","_key","autoUpdate","apply","concat","undefined","offset","size","_ref","setReferenceWidth","rects","reference","width","autoPlacement","inline","hide","filter","Boolean","interactions","useInteractions","useClick","context","enabled","useDismiss","outsidePress","useHover","delay","handleClose","safePolygon","buffer","useFocus","useRole","_React$useState","React","useState","_React$useState2","referenceWidth","getFloatingProps","useCallback","userProps","style","floatingStyles","zIndex","minInlineSize","maxInlineSize","useMemo"],"mappings":"2xBAmHaA,EAAa,SAACC,GACzB,IAAAC,EASID,EARFE,UAAAA,OAAY,IAAHD,EAAG,eAAcA,EAC1BE,EAOEH,EAPFG,QACAC,EAMEJ,EANFI,gBACAC,EAKEL,EALFK,oBACAC,EAIEN,EAJFM,kBACAC,EAGEP,EAHFO,WAAUC,EAGRR,EAFFS,QAAAA,OAAU,IAAHD,EAAG,CAAEE,OAAO,EAAMC,OAAO,EAAOC,OAAO,GAAOJ,EACrDK,EACEb,EADFa,KAGIC,EAAUC,OAAAC,OAAA,CAAKC,MAAM,EAAMC,OAAO,GAASlB,EAAQc,YAEzDK,EAA6BC,GAC3B,EACAjB,EACAC,GACDiB,EAAAC,EAAAH,EAAA,GAJMI,EAAIF,EAAA,GAAEG,EAAYH,EAAA,GAMnBI,EAAWC,EAAY,CAC3BxB,UAAAA,EACAqB,KAAAA,EACAC,aAAAA,EACAG,qBAAsB,WAAA,IAAA,IAAAC,EAAAC,UAAAC,OAAIC,EAAIC,MAAAJ,GAAAK,EAAA,EAAAL,EAAAK,EAAAA,IAAJF,EAAIE,GAAAJ,UAAAI,GAAA,OAAKC,EAAUC,WAAA,EAAIJ,EAAIK,OAAE9B,CAAAA,IAAkB,EACzEQ,WAAY,MACYuB,IAAtBvB,EAAW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EAAcmB,EAAkB5C,GAEzD"}
1
+ {"version":3,"file":"Popover.js","sources":["../../../../../../../src/components/Table/new/Popover/Popover.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n// @ts-nocheck\n\nimport * as React from \"react\";\nimport cx from \"classnames\";\nimport {\n useFloating,\n useClick,\n useDismiss,\n useInteractions,\n size,\n autoUpdate,\n offset,\n flip,\n shift,\n autoPlacement,\n inline,\n hide,\n FloatingFocusManager,\n useHover,\n useFocus,\n safePolygon,\n useRole,\n FloatingPortal,\n} from \"@floating-ui/react\";\nimport type { SizeOptions, Placement } from \"@floating-ui/react\";\nimport { Box } from \"../utils/components/Box\";\nimport {\n cloneElementWithRef,\n useControlledState,\n useId,\n useLayoutEffect,\n useMergedRefs,\n} from \"../utils/index\";\nimport type { PolymorphicForwardRefComponent } from \"../utils/index\";\nimport { Portal } from \"../utils/components/Portal\";\nimport type { PortalProps } from \"../utils/components/Portal\";\nimport { ThemeProvider } from \"../ThemeProvider/ThemeProvider\";\n\ntype PopoverOptions = {\n /**\n * Placement of the popover content.\n * @default 'bottom-start'\n */\n placement?: Placement;\n /**\n * Controlled flag for whether the popover is visible.\n */\n visible?: boolean;\n\n /**\n * Callback invoked every time the popover visibility changes as a result\n * of internal logic. Should be used alongside `visible` prop.\n */\n onVisibleChange?: (visible: boolean) => void;\n /**\n * If true, the popover will close when clicking outside it.\n *\n * @default true\n */\n closeOnOutsideClick?: boolean;\n /**\n * Middleware options.\n *\n * By default, `flip` and `shift` are enabled.\n *\n * @see https://floating-ui.com/docs/middleware\n */\n middleware?: {\n offset?: number;\n flip?: boolean;\n shift?: boolean;\n autoPlacement?: boolean;\n hide?: boolean;\n inline?: boolean;\n };\n};\n\n// keep public api small to start with\ntype PopoverInternalProps = {\n /**\n * autoUpdate options that recalculates position\n * to ensure the floating element remains anchored\n * to its reference element, such as when scrolling\n * and resizing the screen\n *\n * https://floating-ui.com/docs/autoUpdate#options\n */\n autoUpdateOptions?: {\n ancestorScroll?: boolean;\n ancestorResize?: boolean;\n elementResize?: boolean;\n /**\n * Use this if you want popover to follow moving trigger element\n */\n animationFrame?: boolean;\n layoutShift?: boolean;\n };\n /**\n * By default, the popover will only open on click.\n * `hover` and `focus` can be manually specified as triggers.\n */\n trigger?: Partial<Record<\"hover\" | \"click\" | \"focus\", boolean>>;\n role?: \"dialog\" | \"menu\" | \"listbox\";\n /**\n * Whether the popover should match the width of the trigger.\n */\n matchWidth?: boolean;\n};\n\n// ----------------------------------------------------------------------------\n\nexport const usePopover = (options: PopoverOptions & PopoverInternalProps) => {\n const {\n placement = \"bottom-start\",\n visible,\n onVisibleChange,\n closeOnOutsideClick,\n autoUpdateOptions,\n matchWidth,\n trigger = { click: true, hover: false, focus: false },\n role,\n } = options;\n\n const middleware = { flip: true, shift: true, ...options.middleware };\n\n const [open, onOpenChange] = useControlledState(\n false,\n visible,\n onVisibleChange\n );\n\n const floating = useFloating({\n placement,\n open,\n onOpenChange,\n whileElementsMounted: (...args) => autoUpdate(...args, autoUpdateOptions),\n middleware: [\n middleware.offset !== undefined && offset(middleware.offset),\n middleware.flip && flip(),\n middleware.shift && shift(),\n matchWidth &&\n size({\n apply: ({ rects }) => {\n setReferenceWidth(rects.reference.width);\n },\n } as SizeOptions),\n middleware.autoPlacement && autoPlacement(),\n middleware.inline && inline(),\n middleware.hide && hide(),\n ].filter(Boolean),\n });\n\n const interactions = useInteractions([\n useClick(floating.context, { enabled: !!trigger.click }),\n useDismiss(floating.context, { outsidePress: closeOnOutsideClick }),\n useHover(floating.context, {\n enabled: !!trigger.hover,\n delay: 100,\n handleClose: safePolygon({ buffer: 1 }),\n }),\n useFocus(floating.context, { enabled: !!trigger.focus }),\n useRole(floating.context, { role: \"dialog\", enabled: !!role }),\n ]);\n\n const [referenceWidth, setReferenceWidth] = React.useState<number>();\n\n const getFloatingProps = React.useCallback(\n (userProps?: React.HTMLProps<HTMLElement>) =>\n interactions.getFloatingProps({\n ...userProps,\n style: {\n ...floating.floatingStyles,\n zIndex: 9999,\n ...(matchWidth && referenceWidth\n ? {\n minInlineSize: `${referenceWidth}px`,\n maxInlineSize: `min(${referenceWidth * 2}px, 90vw)`,\n }\n : {}),\n ...userProps?.style,\n },\n }),\n [floating.floatingStyles, interactions, matchWidth, referenceWidth]\n );\n\n return React.useMemo(\n () => ({\n open,\n onOpenChange,\n ...interactions,\n getFloatingProps,\n ...floating,\n }),\n [open, onOpenChange, interactions, getFloatingProps, floating]\n );\n};\n\n// ----------------------------------------------------------------------------\n\ntype PopoverPublicProps = {\n /**\n * Content displayed inside the popover.\n */\n content?: React.ReactNode;\n /**\n * Element that triggers the popover. Should usually be a button.\n */\n children?: React.ReactNode;\n /**\n * Whether the popover adds recommended CSS (background-color, box-shadow, etc.) to itself.\n *\n * @default false\n */\n applyBackground?: boolean;\n /**\n * This is used to position the popover relative to a different element than the trigger.\n *\n * Recommended to use state to store this element, rather than a ref.\n */\n positionReference?: HTMLElement;\n} & PortalProps &\n PopoverOptions;\n\n/**\n * A utility component to help with positioning of floating content relative to a trigger.\n * Built on top of [`floating-ui`](https://floating-ui.com/).\n *\n * @see https://itwinui.bentley.com/docs/popover\n *\n * @example\n * <Popover content='This is a popover'>\n * <Button>Show popover</Button>\n * </Popover>\n */\nexport const Popover = React.forwardRef((props, forwardedRef) => {\n const {\n portal = true,\n //\n // popover options\n visible,\n placement = \"bottom-start\",\n onVisibleChange,\n closeOnOutsideClick = true,\n middleware,\n //\n // extra props\n positionReference,\n //\n // dom props\n className,\n children,\n content,\n applyBackground = false,\n ...rest\n } = props;\n\n const popover = usePopover({\n visible,\n placement,\n onVisibleChange,\n closeOnOutsideClick,\n role: \"dialog\",\n middleware,\n });\n\n const [popoverElement, setPopoverElement] = React.useState<HTMLElement>();\n\n const popoverRef = useMergedRefs(\n popover.refs.setFloating,\n forwardedRef,\n setPopoverElement\n );\n\n const triggerId = `${useId()}-trigger`;\n const hasAriaLabel = !!props[\"aria-labelledby\"] || !!props[\"aria-label\"];\n\n useLayoutEffect(() => {\n if (!positionReference) {\n return;\n }\n popover.refs.setPositionReference(positionReference);\n return () => void popover.refs.setPositionReference(null);\n }, [popover.refs, positionReference]);\n\n return (\n <>\n {cloneElementWithRef(children, (children) => ({\n id: children.props.id || triggerId,\n ...popover.getReferenceProps(children.props),\n ref: popover.refs.setReference,\n }))}\n\n {popover.open ? (\n <Portal portal={portal}>\n <FloatingPortal>\n <ThemeProvider\n portalContainer={popoverElement} // portal nested popovers into this one\n >\n <FloatingFocusManager\n context={popover.context}\n modal={false}\n initialFocus={popover.refs.floating}\n >\n <Box\n className={cx(\n { \"iui-popover-surface\": applyBackground },\n className\n )}\n aria-labelledby={\n !hasAriaLabel\n ? popover.refs.domReference.current?.id\n : undefined\n }\n {...popover.getFloatingProps(rest)}\n ref={popoverRef}\n >\n {content}\n </Box>\n </FloatingFocusManager>\n </ThemeProvider>\n </FloatingPortal>\n </Portal>\n ) : null}\n </>\n );\n}) as PolymorphicForwardRefComponent<\"div\", PopoverPublicProps>;\n"],"names":["usePopover","options","_options$placement","placement","visible","onVisibleChange","closeOnOutsideClick","autoUpdateOptions","matchWidth","_options$trigger","trigger","click","hover","focus","role","middleware","Object","assign","flip","shift","_useControlledState","useControlledState","_useControlledState2","_slicedToArray","open","onOpenChange","floating","useFloating","whileElementsMounted","_len","arguments","length","args","Array","_key","autoUpdate","apply","concat","undefined","offset","size","_ref","setReferenceWidth","rects","reference","width","autoPlacement","inline","hide","filter","Boolean","interactions","useInteractions","useClick","context","enabled","useDismiss","outsidePress","useHover","delay","handleClose","safePolygon","buffer","useFocus","useRole","_React$useState","React","useState","_React$useState2","referenceWidth","getFloatingProps","useCallback","userProps","style","floatingStyles","zIndex","minInlineSize","maxInlineSize","useMemo","Popover","forwardRef","props","forwardedRef","_props$portal","portal","_props$placement","_props$closeOnOutside","positionReference","className","children","content","_props$applyBackgroun","applyBackground","rest","__rest","popover","_React$useState3","_React$useState4","popoverElement","popoverRef","useMergedRefs","refs","setFloating","triggerId","useId","hasAriaLabel","useLayoutEffect","setPositionReference","_jsxs","cloneElementWithRef","id","getReferenceProps","ref","setReference","_jsx","Portal","FloatingPortal","ThemeProvider","portalContainer","FloatingFocusManager","modal","initialFocus","Box","cx","_a","domReference","current"],"mappings":"gsCAmHaA,EAAa,SAACC,GACzB,IAAAC,EASID,EARFE,UAAAA,OAAY,IAAHD,EAAG,eAAcA,EAC1BE,EAOEH,EAPFG,QACAC,EAMEJ,EANFI,gBACAC,EAKEL,EALFK,oBACAC,EAIEN,EAJFM,kBACAC,EAGEP,EAHFO,WAAUC,EAGRR,EAFFS,QAAAA,OAAU,IAAHD,EAAG,CAAEE,OAAO,EAAMC,OAAO,EAAOC,OAAO,GAAOJ,EACrDK,EACEb,EADFa,KAGIC,EAAUC,OAAAC,OAAA,CAAKC,MAAM,EAAMC,OAAO,GAASlB,EAAQc,YAEzDK,EAA6BC,GAC3B,EACAjB,EACAC,GACDiB,EAAAC,EAAAH,EAAA,GAJMI,EAAIF,EAAA,GAAEG,EAAYH,EAAA,GAMnBI,EAAWC,EAAY,CAC3BxB,UAAAA,EACAqB,KAAAA,EACAC,aAAAA,EACAG,qBAAsB,WAAA,IAAA,IAAAC,EAAAC,UAAAC,OAAIC,EAAIC,MAAAJ,GAAAK,EAAA,EAAAL,EAAAK,EAAAA,IAAJF,EAAIE,GAAAJ,UAAAI,GAAA,OAAKC,EAAUC,WAAA,EAAIJ,EAAIK,OAAE9B,CAAAA,IAAkB,EACzEQ,WAAY,MACYuB,IAAtBvB,EAAWwB,QAAwBA,EAAOxB,EAAWwB,QACrDxB,EAAWG,MAAQA,IACnBH,EAAWI,OAASA,IACpBX,GACEgC,EAAK,CACHJ,MAAO,SAAAK,GACLC,EADaD,EAALE,MACgBC,UAAUC,MACpC,IAEJ9B,EAAW+B,eAAiBA,IAC5B/B,EAAWgC,QAAUA,IAC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ACQ,EAAG1G,OAAAC,OAAA,CACFuE,UAAWmC,EACT,CAAE,sBAAuB/B,GACzBJ,GAGA,kBAACiB,GACoC,QAAjCmB,EAAA7B,EAAQM,KAAKwB,aAAaC,eAAO,IAAAF,OACjCtF,EADiCsF,EAAEd,IAGrCf,EAAQzB,iBAAiBuB,GAC7B,CAAAmB,IAAKb,GAEJ,CAAAV,SAAAC,gBAMT,OAGV"}
@@ -0,0 +1,2 @@
1
+ import{slicedToArray as t,regeneratorRuntime as e,toConsumableArray as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as i,__awaiter as r}from"../../../../../_virtual/_tslib.js";import{jsxs as n,jsx as s,Fragment as l}from"react/jsx-runtime";import*as a from"react";import*as u from"react-dom";import d from"classnames";import"../utils/functions/colors.js";import"../utils/functions/polymorphic.js";import{importCss as c}from"../utils/functions/import.js";import{useMergedRefs as m}from"../utils/hooks/useMergedRefs.js";import{isUnitTest as h}from"../utils/functions/dev.js";import{useLayoutEffect as p}from"../utils/hooks/useIsomorphicLayoutEffect.js";import{ThemeContext as v}from"./ThemeContext.js";import{useMediaQuery as f}from"../utils/hooks/useMediaQuery.js";import{useLatestRef as g}from"../utils/hooks/useLatestRef.js";import"../utils/hooks/useId.js";import{useControlledState as j}from"../utils/hooks/useControlledState.js";import"../utils/color/ColorValue.js";import{Box as y}from"../utils/components/Box.js";import{ToastProvider as C,Toaster as b}from"../Toast/Toaster.js";var k=a.forwardRef((function(e,o){var r,l,d,c=e.theme,h=void 0===c?"inherit":c,p=e.children,f=e.themeOptions,g=void 0===f?{}:f,y=e.portalContainer,k=e.includeCss,w=void 0===k?"inherit"===h:k,B=i(e,["theme","children","themeOptions","portalContainer","includeCss"]),R=a.useState(null),_=t(R,2),A=_[0],E=_[1],M=x(A),N="inherit"===h?M.theme||"light":h;null!==(r=g.applyBackground)&&void 0!==r||(g.applyBackground=!M.theme),null!==(l=g.highContrast)&&void 0!==l||(g.highContrast="inherit"===h?M.highContrast:void 0);var P=y||("inherit"===h?null===(d=M.context)||void 0===d?void 0:d.portalContainer:void 0),T=j(null,P),L=t(T,2),I=L[0],V=L[1],F=a.useMemo((function(){return{theme:N,themeOptions:g,portalContainer:I}}),[N,JSON.stringify(g),I]);return n(v.Provider,Object.assign({value:F},{children:[w&&A?s(S,{root:A}):null,s(O,Object.assign({theme:N,themeOptions:g,ref:m(o,E)},B,{children:n(C,{children:[p,P?u.createPortal(s(b,{}),P):s("div",Object.assign({ref:V,style:{display:"contents"}},{children:s(b,{})}))]})}))]}))})),O=a.forwardRef((function(t,e){var o,r=t.theme,n=t.children,l=t.themeOptions,a=t.className,u=i(t,["theme","children","themeOptions","className"]),c=f("(prefers-color-scheme: dark)"),m=f("(prefers-contrast: more)"),h="dark"===r||"os"===r&&c,p=null!==(o=null==l?void 0:l.highContrast)&&void 0!==o?o:m;return s(y,Object.assign({className:d("iui-root",{"iui-root-background":null==l?void 0:l.applyBackground},a),"data-iui-theme":h?"dark":"light","data-iui-contrast":p?"high":"default",ref:e},u,{children:n}))})),x=function(e){var o,i,r,n,s=a.useContext(v),l=a.useState(null==s?void 0:s.theme),u=t(l,2),d=u[0],c=u[1],m=a.useState(null===(o=null==s?void 0:s.themeOptions)||void 0===o?void 0:o.highContrast),h=t(m,2),f=h[0],j=h[1],y=g(null==s?void 0:s.theme);return p((function(){var t;if(!y.current){var o=null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.closest("[data-iui-theme]");if(o){var i=function(){c(null==o?void 0:o.getAttribute("data-iui-theme")),j("high"===(null==o?void 0:o.getAttribute("data-iui-contrast")))};i();var r=new MutationObserver((function(){return i()}));return r.observe(o,{attributes:!0,attributeFilter:["data-iui-theme","data-iui-contrast"]}),function(){r.disconnect()}}}}),[e,y]),{theme:null!==(i=null==s?void 0:s.theme)&&void 0!==i?i:d,highContrast:null!==(n=null===(r=null==s?void 0:s.themeOptions)||void 0===r?void 0:r.highContrast)&&void 0!==n?n:f,context:s}},S=function(t){var i=t.root;return p((function(){"yes"!==getComputedStyle(i).getPropertyValue("--_iui-v3-loaded")&&(h||r(void 0,void 0,void 0,e().mark((function t(){var i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,t.next=10;break;case 3:return t.prev=3,t.t0=t.catch(0),console.log("Error loading styles.css locally",t.t0),t.next=8,c("https://cdn.jsdelivr.net/npm/@itwin/itwinui-react@3/styles.css");case 8:i=t.sent,document.adoptedStyleSheets=[].concat(o(document.adoptedStyleSheets),[i.default]);case 10:case"end":return t.stop()}}),t,null,[[0,3]])}))))}),[i]),s(l,{})};export{k as ThemeProvider};
2
+ //# sourceMappingURL=ThemeProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeProvider.js","sources":["../../../../../../../src/components/Table/new/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport cx from 'classnames';\nimport {\n useMediaQuery,\n useMergedRefs,\n useLayoutEffect,\n useControlledState,\n useLatestRef,\n importCss,\n isUnitTest,\n} from '../utils/index';\nimport { Box } from '../utils/components/Box';\nimport type { PolymorphicForwardRefComponent } from '../utils/index';\nimport { ThemeContext } from './ThemeContext';\nimport { ToastProvider, Toaster } from '../Toast/Toaster';\n\nexport type ThemeOptions = {\n /**\n * Whether to apply high-contrast versions of light and dark themes.\n * Will default to user preference if browser supports it.\n */\n highContrast?: boolean;\n};\n\nexport type ThemeType = 'light' | 'dark' | 'os';\n\ntype RootProps = {\n /**\n * Theme to be applied. Can be 'light' or 'dark' or 'os'.\n *\n * Note that 'os' will respect the system preference on client but will fallback to 'light'\n * in SSR environments because it is not possible detect system preference on the server.\n * This can cause a flash of incorrect theme on first render.\n *\n * The 'inherit' option is intended to be used by packages, to enable incremental adoption\n * of iTwinUI while respecting the theme set by the consuming app. It will fall back to 'light'\n * if no parent theme is found. Additionally, it will attempt to inherit `themeOptions.highContrast`\n * and `portalContainer` (if possible).\n *\n * @default 'inherit'\n */\n theme?: ThemeType | 'inherit';\n themeOptions?: Pick<ThemeOptions, 'highContrast'> & {\n /**\n * Whether or not the element should apply the recommended `background-color` on itself.\n *\n * When not specified, the default behavior is to apply a background-color only\n * if it is the topmost `ThemeProvider` in the tree. Nested `ThemeProvider`s will\n * be detected using React Context and will not apply a background-color.\n *\n * Additionally, if theme is set to `'inherit'`, then this will default to false.\n *\n * When set to true or false, it will override the default behavior.\n */\n applyBackground?: boolean;\n };\n /**\n * This will be used to determine if background will be applied.\n */\n shouldApplyBackground?: boolean;\n};\n\ntype ThemeProviderOwnProps = Pick<RootProps, 'theme'> & {\n themeOptions?: RootProps['themeOptions'];\n children: Required<React.ReactNode>;\n /**\n * The element used as the portal for floating elements (Tooltip, Toast, DropdownMenu, Dialog, etc).\n *\n * Defaults to a `<div>` rendered at the end of the ThemeProvider.\n *\n * When passing an element, it is recommended to use state.\n *\n * @example\n * const [myPortal, setMyPortal] = React.useState(null);\n *\n * <div ref={setMyPortal} />\n * <ThemeProvider\n * portalContainer={myPortal}\n * >\n * ...\n * </ThemeProvider>\n */\n portalContainer?: HTMLElement;\n /**\n * This prop will be used to determine if `styles.css` should be automatically imported at runtime (if not already found).\n *\n * By default, this is enabled when using `theme='inherit'`.\n * This default behavior is useful for packages that want to support incremental adoption of latest iTwinUI,\n * without requiring consuming applications (that might still be using an older version) to manually import the CSS.\n *\n * If true or false is passed, it will override the default behavior.\n */\n includeCss?: boolean;\n};\n\n/**\n * This component provides global state and applies theme to the entire tree\n * that it is wrapping around.\n *\n * The `theme` prop defaults to \"inherit\", which looks upwards for closest ThemeProvider\n * and falls back to \"light\" theme if one is not found.\n *\n * If you want to theme the entire app, you should use this component at the root. You can also\n * use this component to apply a different theme to only a part of the tree.\n *\n * By default, the topmost `ThemeProvider` in the tree will apply the recommended\n * `background-color`. You can override this behavior using `themeOptions.applyBackground`.\n *\n * @example\n * <ThemeProvider theme='os'>\n * <App />\n * </ThemeProvider>\n *\n * @example\n * <ThemeProvider as='body'>\n * <App />\n * </ThemeProvider>\n *\n * @example\n * <ThemeProvider theme='dark' themeOptions={{ applyBackground: false }}>\n * <App />\n * </ThemeProvider>\n */\nexport const ThemeProvider = React.forwardRef((props, forwardedRef) => {\n const {\n theme: themeProp = 'inherit',\n children,\n themeOptions = {},\n portalContainer: portalContainerProp,\n includeCss = themeProp === 'inherit',\n ...rest\n } = props;\n\n const [rootElement, setRootElement] = React.useState<HTMLElement | null>(\n null,\n );\n const parent = useParentThemeAndContext(rootElement);\n const theme = themeProp === 'inherit' ? parent.theme || 'light' : themeProp;\n\n // default apply background only for topmost ThemeProvider\n themeOptions.applyBackground ??= !parent.theme;\n\n // default inherit highContrast option from parent if also inheriting base theme\n themeOptions.highContrast ??=\n themeProp === 'inherit' ? parent.highContrast : undefined;\n\n /**\n * We will portal our portal container into `portalContainer` prop (if specified),\n * or inherit `portalContainer` from context (if also inheriting theme).\n */\n const portaledPortalContainer =\n portalContainerProp ||\n (themeProp === 'inherit' ? parent.context?.portalContainer : undefined);\n\n const [portalContainer, setPortalContainer] = useControlledState(\n null,\n portaledPortalContainer,\n );\n\n const contextValue = React.useMemo(\n () => ({ theme, themeOptions, portalContainer }),\n // we do include all dependencies below, but we want to stringify the objects as they could be different on each render\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [theme, JSON.stringify(themeOptions), portalContainer],\n );\n\n return (\n <ThemeContext.Provider value={contextValue}>\n {includeCss && rootElement ? <FallbackStyles root={rootElement} /> : null}\n\n <Root\n theme={theme}\n themeOptions={themeOptions}\n ref={useMergedRefs(forwardedRef, setRootElement)}\n {...rest}\n >\n <ToastProvider>\n {children}\n\n {portaledPortalContainer ? (\n ReactDOM.createPortal(<Toaster />, portaledPortalContainer)\n ) : (\n <div ref={setPortalContainer} style={{ display: 'contents' }}>\n <Toaster />\n </div>\n )}\n </ToastProvider>\n </Root>\n </ThemeContext.Provider>\n );\n}) as PolymorphicForwardRefComponent<'div', ThemeProviderOwnProps>;\n// ----------------------------------------------------------------------------\n\nconst Root = React.forwardRef((props, forwardedRef) => {\n const { theme, children, themeOptions, className, ...rest } = props;\n\n const prefersDark = useMediaQuery('(prefers-color-scheme: dark)');\n const prefersHighContrast = useMediaQuery('(prefers-contrast: more)');\n const shouldApplyDark = theme === 'dark' || (theme === 'os' && prefersDark);\n const shouldApplyHC = themeOptions?.highContrast ?? prefersHighContrast;\n const shouldApplyBackground = themeOptions?.applyBackground;\n\n return (\n <Box\n className={cx(\n 'iui-root',\n { 'iui-root-background': shouldApplyBackground },\n className,\n )}\n data-iui-theme={shouldApplyDark ? 'dark' : 'light'}\n data-iui-contrast={shouldApplyHC ? 'high' : 'default'}\n ref={forwardedRef}\n {...rest}\n >\n {children}\n </Box>\n );\n}) as PolymorphicForwardRefComponent<'div', RootProps>;\n\n// ----------------------------------------------------------------------------\n\n/**\n * Returns theme information from either parent ThemeContext or by reading the closest\n * data-iui-theme attribute if context is not found.\n *\n * Also returns the ThemeContext itself (if found).\n */\nconst useParentThemeAndContext = (rootElement: HTMLElement | null) => {\n const parentContext = React.useContext(ThemeContext);\n const [parentThemeState, setParentTheme] = React.useState(\n parentContext?.theme,\n );\n const [parentHighContrastState, setParentHighContrastState] = React.useState(\n parentContext?.themeOptions?.highContrast,\n );\n\n const parentThemeRef = useLatestRef(parentContext?.theme);\n\n useLayoutEffect(() => {\n // bail if we already have theme from context\n if (parentThemeRef.current) {\n return;\n }\n\n // find parent theme from closest data-iui-theme attribute\n const closestRoot = rootElement?.parentElement?.closest('[data-iui-theme]');\n\n if (!closestRoot) {\n return;\n }\n\n // helper function that updates state to match data attributes from closest root\n const synchronizeTheme = () => {\n setParentTheme(closestRoot?.getAttribute('data-iui-theme') as ThemeType);\n setParentHighContrastState(\n closestRoot?.getAttribute('data-iui-contrast') === 'high',\n );\n };\n\n // set theme for initial mount\n synchronizeTheme();\n\n // use mutation observers to listen to future updates to data attributes\n const observer = new MutationObserver(() => synchronizeTheme());\n observer.observe(closestRoot, {\n attributes: true,\n attributeFilter: ['data-iui-theme', 'data-iui-contrast'],\n });\n\n return () => {\n observer.disconnect();\n };\n }, [rootElement, parentThemeRef]);\n\n return {\n theme: parentContext?.theme ?? parentThemeState,\n highContrast:\n parentContext?.themeOptions?.highContrast ?? parentHighContrastState,\n context: parentContext,\n } as const;\n};\n\n// ----------------------------------------------------------------------------\n\n/**\n * When `@itwin/itwinui-react/styles.css` is not imported, we will attempt to\n * dynamically import it (if possible) and fallback to loading it from a CDN.\n */\nconst FallbackStyles = ({ root }: { root: HTMLElement }) => {\n useLayoutEffect(() => {\n // bail if styles are already loaded\n if (getComputedStyle(root).getPropertyValue('--_iui-v3-loaded') === 'yes') {\n return;\n }\n\n // bail if isUnitTest because unit tests don't care about CSS 🤷\n if (isUnitTest) {\n return;\n }\n\n (async () => {\n try {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // await import('../../../styles.css');\n } catch (error) {\n console.log('Error loading styles.css locally', error);\n const css = await importCss(\n 'https://cdn.jsdelivr.net/npm/@itwin/itwinui-react@3/styles.css',\n );\n document.adoptedStyleSheets = [\n ...document.adoptedStyleSheets,\n css.default,\n ];\n }\n })();\n }, [root]);\n\n return <></>;\n};\n"],"names":["ThemeProvider","React","forwardRef","props","forwardedRef","_props$theme","theme","themeProp","children","_props$themeOptions","themeOptions","portalContainerProp","portalContainer","_props$includeCss","includeCss","rest","__rest","_React$useState","useState","_React$useState2","_slicedToArray","rootElement","setRootElement","parent","useParentThemeAndContext","_a","applyBackground","_b","highContrast","undefined","portaledPortalContainer","_c","context","_useControlledState","useControlledState","_useControlledState2","setPortalContainer","contextValue","useMemo","JSON","stringify","_jsxs","ThemeContext","Provider","Object","assign","value","_jsx","FallbackStyles","root","Root","ref","useMergedRefs","ToastProvider","ReactDOM","createPortal","Toaster","style","display","className","prefersDark","useMediaQuery","prefersHighContrast","shouldApplyDark","shouldApplyHC","Box","cx","parentContext","useContext","_React$useState3","_React$useState4","parentThemeState","setParentTheme","_React$useState5","_React$useState6","parentHighContrastState","setParentHighContrastState","parentThemeRef","useLatestRef","useLayoutEffect","current","closestRoot","parentElement","closest","synchronizeTheme","getAttribute","observer","MutationObserver","observe","attributes","attributeFilter","disconnect","_d","_ref","getComputedStyle","getPropertyValue","isUnitTest","__awaiter","_regeneratorRuntime","mark","_callee","css","wrap","_context","prev","next","t0","console","log","importCss","sent","document","adoptedStyleSheets","concat","_toConsumableArray","default","stop"],"mappings":"ylCAgIO,IAAMA,EAAgBC,EAAMC,YAAW,SAACC,EAAOC,aACpDC,EAOIF,EANFG,MAAOC,OAAY,IAAHF,EAAG,UAASA,EAC5BG,EAKEL,EALFK,SAAQC,EAKNN,EAJFO,aAAAA,OAAY,IAAAD,EAAG,CAAE,EAAAA,EACAE,EAGfR,EAHFS,gBAAeC,EAGbV,EAFFW,WAAAA,OAAU,IAAAD,EAAiB,YAAdN,EAAuBM,EACjCE,EACDC,EAAAb,EAPE,CAAA,QAAA,WAAA,eAAA,kBAAA,eASNc,EAAsChB,EAAMiB,SAC1C,MACDC,EAAAC,EAAAH,EAAA,GAFMI,EAAWF,EAAA,GAAEG,EAAcH,EAAA,GAG5BI,EAASC,EAAyBH,GAClCf,EAAsB,YAAdC,EAA0BgB,EAAOjB,OAAS,QAAUC,EAGtC,QAA5BkB,EAAAf,EAAagB,uBAAe,IAAAD,IAA5Bf,EAAagB,iBAAqBH,EAAOjB,OAGhB,QAAzBqB,EAAAjB,EAAakB,oBAAY,IAAAD,IAAzBjB,EAAakB,aACG,YAAdrB,EAA0BgB,EAAOK,kBAAeC,GAMlD,IAAMC,EACJnB,IACe,YAAdJ,UAA0BwB,EAAAR,EAAOS,8BAASpB,qBAAkBiB,GAE/DI,EAA8CC,EAC5C,KACAJ,GACDK,EAAAf,EAAAa,EAAA,GAHMrB,EAAeuB,EAAA,GAAEC,EAAkBD,E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,EAAAC,IAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAA,OAAAH,IAAAI,MAAA,SAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAAF,EAAAC,KAAA,EAAAD,EAAAE,KAAA,GAAA,MAAA,KAAA,EAOI,OAPJF,EAAAC,KAAA,EAAAD,EAAAG,GAAAH,EAAA,MAAA,GAMRI,QAAQC,IAAI,mCAAkCL,EAAAG,IAASH,EAAAE,KAAA,EACrCI,EAChB,kEACD,KAAA,EAFKR,EAAGE,EAAAO,KAGTC,SAASC,mBAAkBC,GAAAA,OAAAC,EACtBH,SAASC,oBAAkB,CAC9BX,EAAIc,UACJ,KAAA,GAAA,IAAA,MAAA,OAAAZ,EAAAa,OAAA,GAAAhB,EAAA,KAAA,CAAA,CAAA,EAAA,IAEL,KACH,GAAG,CAACnD,IAEGF,OACT"}
@@ -0,0 +1,2 @@
1
+ import{slicedToArray as t}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as o}from"../../../../../_virtual/_tslib.js";import{jsx as s,jsxs as e}from"react/jsx-runtime";import*as n from"react";import i from"classnames";import{getWindow as r}from"../utils/functions/dom.js";import"../utils/functions/colors.js";import"../utils/functions/polymorphic.js";import"../utils/functions/dev.js";import"../utils/hooks/useId.js";import"../utils/color/ColorValue.js";import{ButtonBase as a}from"../utils/components/ButtonBase.js";import{Box as l}from"../utils/components/Box.js";import{IconButton as c}from"../Buttons/IconButton.js";import u from"../../../Icon/Icon.js";import m from"../../../Icon/Icons/components/Close.js";var p=function(o){var e=o.content,i=o.category,a=o.type,c=void 0===a?"temporary":a,u=o.isVisible,m=o.link,p=o.duration,d=void 0===p?7e3:p,j=o.hasCloseButton,v=o.animateOutTo,g=o.domProps,h=n.useRef(0),y=n.useState(null==u||u),b=t(y,2),B=b[1],C=null!=u?u:b[0],O=n.useState(0),N=t(O,2),k=N[0],P=N[1],I=n.useRef(null),T=n.useState(0),R=t(T,2),S=R[0],_=R[1];n.useEffect((function(){return"temporary"===c&&E(d),function(){V()}}),[d,c]),n.useEffect((function(){C||v||_(-k)}),[C,v,_,k]);var x=function(){V(),_(-k),B(!1)},E=function(t){var o=r();o&&(h.current=o.setTimeout((function(){x()}),t))},V=function(){var t;null===(t=r())||void 0===t||t.clearTimeout(h.current)};return s(l,Object.assign({ref:I,className:"iui-toast-all",style:Object.assign({height:k},{marginBlockStart:S})},{children:s("div",Object.assign({ref:function(t){if(t){var o=t.getBoundingClientRect();P(o.height)}}},{children:s(f,Object.assign({as:"div",category:i,content:e,link:m,type:c,hasCloseButton:j,onClose:x},null==g?void 0:g.toastProps,{contentProps:null==g?void 0:g.contentProps}))}))}))},f=n.forwardRef((function(t,n){var r=t.content,p=t.category,f=t.type,d=void 0===f?"temporary":f,j=t.link,v=t.hasCloseButton,g=t.onClose,h=t.className,y=t.contentProps,b=o(t,["content","category","type","link","hasCloseButton","onClose","className","contentProps"]);return e(l,Object.assign({className:i("iui-toast iui-".concat(p),h),ref:n},b,{children:[s(l,{className:"iui-status-area"}),s(l,Object.assign({as:"div"},y,{className:i("iui-message",null==y?void 0:y.className)},{children:r})),j&&s(a,Object.assign({className:"iui-toast-anchor"},j,{title:void 0},{children:j.title})),("persisting"===d||v)&&s(c,Object.assign({size:"small",styleType:"borderless",onClick:g,"aria-label":"Close"},{children:s(u,{icon:m})}))]}))}));export{p as Toast,f as ToastPresentation};
2
+ //# sourceMappingURL=Toast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.js","sources":["../../../../../../../src/components/Table/new/Toast/Toast.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n// @ts-nocheck\nimport * as React from \"react\";\nimport cx from \"classnames\";\nimport {\n getWindow,\n} from \"../utils/index\";\nimport { ButtonBase } from \"../utils/components/ButtonBase\";\nimport { Box } from \"../utils/components/Box\";\nimport type { PolymorphicForwardRefComponent } from \"../utils/index\";\nimport { IconButton } from \"../Buttons/IconButton\";\nimport { ToasterStateContext } from \"./Toaster\";\nimport Icon from \"../../../Icon/Icon\";\nimport Close from \"../../../Icon/Icons/components/Close\";\n\nconst isMotionOk = () =>\n getWindow()?.matchMedia?.(\"(prefers-reduced-motion: no-preference)\")?.matches;\n\nexport type ToastCategory =\n | \"informational\"\n | \"negative\"\n | \"positive\"\n | \"warning\";\n\nexport type ToastProps = {\n /**\n * Internal id of the toast. Used for closing the toasts.\n */\n id: number;\n /**\n * Content of the Toast message\n */\n content: React.ReactNode;\n /**\n * Passes props to toast and content\n */\n domProps?: {\n toastProps?: React.ComponentProps<\"div\">;\n contentProps?: React.ComponentProps<\"div\">;\n };\n /**\n * Category of the Toast, which controls the border color, as well as the category icon.\n */\n category: ToastCategory;\n /**\n * The Type of the Toast.\n * Persisting Toasts will not be closed automatically, and will contain a close button.\n * Temporary Toasts will automatically close after 7 seconds and will not contain a close button.\n * @default 'temporary'\n */\n type?: \"persisting\" | \"temporary\";\n /**\n * Controlled boolean prop indicating whether the toast is visible.\n */\n isVisible?: boolean;\n /**\n * Duration of the toast in millisecond.\n * @default 7000\n */\n duration?: number;\n /**\n * Boolean indicating when the close button is visible.\n * When false, the toast will not have any close button.\n */\n hasCloseButton?: boolean;\n /**\n * Props for a button/link that can be used to perform an action\n * (e.g. to show additional information).\n */\n link?: {\n title: string;\n } & Omit<React.ComponentPropsWithoutRef<\"button\">, \"children\">;\n /**\n * Function called when the toast is all the way closed.\n */\n onRemove?: () => void;\n /**\n * Element to which the toast will animate out to.\n */\n animateOutTo?: HTMLElement | null;\n};\n\n/**\n * Generic Toast Component\n * @example\n * <Toast type='persisting' content='Job processing completed.' category='positive' link={{onClick:() => {alert('Link callback')}, title:'View the report'}} />\n * <Toast type='temporary' content='Processing completed.' category='positive' />\n * <Toast type='temporary' content='26 files are available for synchronization.' category='informational' />\n * <Toast type='persisting' content='Job processing error.' category='negative' />\n */\nexport const Toast = (props: ToastProps) => {\n const {\n content,\n category,\n type = \"temporary\",\n isVisible: isVisibleProp,\n link,\n duration = 7000,\n hasCloseButton,\n onRemove,\n animateOutTo,\n domProps,\n } = props;\n\n const closeTimeout = React.useRef(0);\n\n const [visible, setVisible] = React.useState(isVisibleProp ?? true);\n const isVisible = isVisibleProp ?? visible;\n\n const [height, setHeight] = React.useState(0);\n const thisElement = React.useRef<HTMLDivElement>(null);\n const [margin, setMargin] = React.useState(0);\n\n const marginStyle = () => {\n return { marginBlockStart: margin };\n };\n\n React.useEffect(() => {\n if (type === \"temporary\") {\n setCloseTimeout(duration);\n }\n\n return () => {\n clearCloseTimeout();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [duration, type]);\n\n React.useEffect(() => {\n // if we don't have animateOutTo point and not isVisible, set negative margin to move other toasts up.\n // Close all and close on toasts with no anchor.\n if (!isVisible && !animateOutTo) {\n setMargin(-height);\n }\n }, [isVisible, animateOutTo, setMargin, height]);\n\n const close = () => {\n clearCloseTimeout();\n // move element up when this element is closed.\n setMargin(-height);\n setVisible(false);\n };\n\n const setCloseTimeout = (timeout: number) => {\n const definedWindow = getWindow();\n if (!definedWindow) {\n return;\n }\n\n closeTimeout.current = definedWindow.setTimeout(() => {\n close();\n }, timeout);\n };\n\n const clearCloseTimeout = () => {\n getWindow()?.clearTimeout(closeTimeout.current);\n };\n\n const onRef = (ref: HTMLDivElement) => {\n if (ref) {\n const { height } = ref.getBoundingClientRect();\n setHeight(height);\n }\n };\n\n const calculateOutAnimation = (node: HTMLElement) => {\n // calculation translate x and y pixels.\n let translateX = 0;\n let translateY = 0;\n if (animateOutTo && node) {\n const { x: startX, y: startY } = node.getBoundingClientRect(); // current element\n const { x: endX, y: endY } = animateOutTo.getBoundingClientRect(); // anchor point\n translateX = endX - startX;\n translateY = endY - startY;\n }\n return { translateX, translateY };\n };\n\n return (\n <Box\n ref={thisElement}\n className=\"iui-toast-all\"\n style={{\n height,\n ...marginStyle(),\n }}\n >\n <div ref={onRef}>\n <ToastPresentation\n as=\"div\"\n category={category}\n content={content}\n link={link}\n type={type}\n hasCloseButton={hasCloseButton}\n onClose={close}\n {...domProps?.toastProps}\n contentProps={domProps?.contentProps}\n />\n </div>\n </Box>\n );\n};\n\nexport type ToastPresentationProps = Omit<\n ToastProps,\n \"duration\" | \"id\" | \"isVisible\" | \"onRemove\" | \"domProps\"\n> & {\n onClose?: () => void;\n contentProps?: React.ComponentProps<\"div\">;\n};\n\n/**\n * The presentational part of a toast, without any animation or logic.\n * @private\n */\nexport const ToastPresentation = React.forwardRef((props, forwardedRef) => {\n const {\n content,\n category,\n type = \"temporary\",\n link,\n hasCloseButton,\n onClose,\n className,\n contentProps,\n ...rest\n } = props;\n\n // const StatusIcon = StatusIconMap[category];\n\n return (\n <Box\n className={cx(`iui-toast iui-${category}`, className)}\n ref={forwardedRef}\n {...rest}\n >\n <Box className=\"iui-status-area\">\n {/* {<StatusIcon className=\"iui-icon\" />} */}\n </Box>\n <Box\n as=\"div\"\n {...contentProps}\n className={cx(\"iui-message\", contentProps?.className)}\n >\n {content}\n </Box>\n {link && (\n <ButtonBase className=\"iui-toast-anchor\" {...link} title={undefined}>\n {link.title}\n </ButtonBase>\n )}\n {(type === \"persisting\" || hasCloseButton) && (\n <IconButton\n size=\"small\"\n styleType=\"borderless\"\n onClick={onClose}\n aria-label=\"Close\"\n >\n {/* <SvgCloseSmall /> */}\n <Icon icon={Close} />\n </IconButton>\n )}\n </Box>\n );\n}) as PolymorphicForwardRefComponent<\"div\", ToastPresentationProps>;\n"],"names":["Toast","props","content","category","_props$type","type","isVisibleProp","isVisible","link","_props$duration","duration","hasCloseButton","animateOutTo","domProps","closeTimeout","React","useRef","_React$useState","useState","_React$useState2","_slicedToArray","setVisible","_React$useState3","_React$useState4","height","setHeight","thisElement","_React$useState5","_React$useState6","margin","setMargin","useEffect","setCloseTimeout","clearCloseTimeout","close","timeout","definedWindow","getWindow","current","setTimeout","_a","clearTimeout","_jsx","Box","Object","assign","ref","className","style","marginBlockStart","children","_ref$getBoundingClien","getBoundingClientRect","ToastPresentation","as","onClose","toastProps","contentProps","forwardRef","forwardedRef","_props$type2","rest","__rest","_jsxs","cx","concat","ButtonBase","title","undefined","IconButton","size","styleType","onClick","Icon","icon","Close"],"mappings":"suBA6FaA,EAAQ,SAACC,GACpB,IACEC,EAUED,EAVFC,QACAC,EASEF,EATFE,SAAQC,EASNH,EARFI,KAAAA,OAAO,IAAHD,EAAG,YAAWA,EACPE,EAOTL,EAPFM,UACAC,EAMEP,EANFO,KAAIC,EAMFR,EALFS,SAAAA,OAAW,IAAHD,EAAG,IAAIA,EACfE,EAIEV,EAJFU,eAEAC,EAEEX,EAFFW,aACAC,EACEZ,EADFY,SAGIC,EAAeC,EAAMC,OAAO,GAElCC,EAA8BF,EAAMG,SAASZ,SAAAA,GAAsBa,EAAAC,EAAAH,EAAA,GAAnDI,EAAUF,EAAA,GACpBZ,EAAYD,QAAAA,EADJa,EAAA,GAGdG,EAA4BP,EAAMG,SAAS,GAAEK,EAAAH,EAAAE,EAAA,GAAtCE,EAAMD,EAAA,GAAEE,EAASF,EAAA,GAClBG,EAAcX,EAAMC,OAAuB,MACjDW,EAA4BZ,EAAMG,SAAS,GAAEU,EAAAR,EAAAO,EAAA,GAAtCE,EAAMD,EAAA,GAAEE,EAASF,EAAA,GAMxBb,EAAMgB,WAAU,WAKd,MAJa,cAAT1B,GACF2B,EAAgBtB,GAGX,WACLuB,IAGJ,GAAG,CAACvB,EAAUL,IAEdU,EAAMgB,WAAU,WAGTxB,GAAcK,GACjBkB,GAAWN,EAEd,GAAE,CAACjB,EAAWK,EAAckB,EAAWN,IAExC,IAAMU,EAAQ,WACZD,IAEAH,GAAWN,GACXH,GAAW,IAGPW,EAAkB,SAACG,GACvB,IAAMC,EAAgBC,IACjBD,IAILtB,EAAawB,QAAUF,EAAcG,YAAW,WAC9CL,GACD,GAAEC,KAGCF,EAAoB,iBACX,QAAbO,EAAAH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U,oBAAuBvC,EAAI,CAAE2D,WAAOC,GAAS,CAAAlB,SAChE1C,EAAK2D,UAGC,eAAT9D,GAAyBM,IACzB+B,EAAC2B,EAAUzB,OAAAC,OAAA,CACTyB,KAAK,QACLC,UAAU,aACVC,QAASjB,EAAO,aACL,SAGX,CAAAL,SAAAR,EAAC+B,EAAI,CAACC,KAAMC,UAKtB"}
@@ -1,2 +1,2 @@
1
- import"react/jsx-runtime";import*as o from"react";import"classnames";import"../utils/functions/colors.js";import"../utils/functions/polymorphic.js";import"../../../../../_virtual/_tslib.js";import"../utils/functions/dev.js";import"../utils/hooks/useId.js";import"../utils/color/ColorValue.js";import"../utils/components/Box.js";import"../utils/components/ButtonBase.js";import"react-dom";import"../../../Tooltip/Tooltip.js";import"../../../Icon/Icon.js";import"../../../Icon/Icons/components/Close.js";var t=o.createContext(void 0);t.displayName="ToasterStateContext",o.createContext(void 0).displayName="ToasterDispatchContext";export{t as ToasterStateContext};
1
+ import{slicedToArray as t,toConsumableArray as s}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as e}from"react/jsx-runtime";import*as i from"react";import o from"classnames";import"../utils/functions/colors.js";import"../utils/functions/polymorphic.js";import"../../../../../_virtual/_tslib.js";import"../utils/functions/dev.js";import{useSafeContext as a}from"../utils/hooks/useSafeContext.js";import"../utils/hooks/useId.js";import"../utils/color/ColorValue.js";import{Box as n}from"../utils/components/Box.js";import{Toast as r}from"./Toast.js";var c=function(){var t=a(p),s=t.toasts;return e(n,Object.assign({className:o("iui-toast-wrapper","iui-placement-".concat(t.settings.placement))},{children:s.map((function(t){return e(r,Object.assign({},t),t.id)}))}))},l=function(s){var o=s.children,a=i.useReducer(u,{toasts:[],settings:{order:"auto",placement:"top"}}),n=t(a,2);return e(m.Provider,Object.assign({value:n[1]},{children:e(p.Provider,Object.assign({value:n[0]},{children:o}))}))},u=function(t,e){if("add"===e.type){var i=t.settings.order;return"auto"===i&&(i=t.settings.placement.startsWith("top")?"descending":"ascending"),Object.assign(Object.assign({},t),{toasts:[].concat(s("ascending"===i?t.toasts:[]),[e.toast],s("descending"===i?t.toasts:[]))})}return"remove"===e.type?Object.assign(Object.assign({},t),{toasts:t.toasts.filter((function(t){return t.id!==e.id}))}):"close-all"===e.type?Object.assign(Object.assign({},t),{toasts:t.toasts.map((function(t){return Object.assign(Object.assign({},t),{isVisible:!1})}))}):"settings"===e.type?Object.assign(Object.assign({},t),{settings:Object.assign(Object.assign({},t.settings),e.settings)}):t},p=i.createContext(void 0);p.displayName="ToasterStateContext";var m=i.createContext(void 0);m.displayName="ToasterDispatchContext";export{l as ToastProvider,c as Toaster,p as ToasterStateContext};
2
2
  //# sourceMappingURL=Toaster.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toaster.js","sources":["../../../../../../../src/components/Table/new/Toast/Toaster.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nimport cx from \"classnames\";\nimport { useSafeContext } from \"../utils/index\";\nimport { Box } from \"../utils/components/Box\";\nimport { Toast } from \"./Toast\";\nimport type { ToastCategory, ToastProps } from \"./Toast\";\n\nexport type ToasterSettings = {\n /**\n * Order of toasts.\n * When set to 'descending', most recent toasts are on top. When set to 'ascending', most recent toasts are on bottom.\n *\n * When set to `auto`, it will behave like 'descending' when `placement` is set to a top value, otherwise 'ascending'.\n *\n * @default 'auto'\n */\n order: \"descending\" | \"ascending\" | \"auto\";\n /**\n * Placement of toasts.\n * Changes placement of toasts. Start indicates left side of viewport. End - right side of viewport.\n * @default 'top'\n */\n placement:\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\";\n};\n\nexport type ToastOptions = Omit<\n ToastProps,\n \"category\" | \"isVisible\" | \"id\" | \"content\"\n>;\n\n// ----------------------------------------------------------------------------\n\nexport const useToaster = () => {\n const dispatch = useSafeContext(ToasterDispatchContext);\n\n return React.useMemo(() => {\n const showToast =\n (category: ToastCategory) =>\n (content: React.ReactNode, options?: ToastOptions) => {\n const id = nextId();\n\n dispatch({\n type: \"add\",\n toast: { ...options, id, content, category },\n });\n\n return { close: () => dispatch({ type: \"remove\", id }) };\n };\n\n return {\n positive: showToast(\"positive\"),\n informational: showToast(\"informational\"),\n negative: showToast(\"negative\"),\n warning: showToast(\"warning\"),\n closeAll: () => {\n dispatch({ type: \"close-all\" });\n },\n setSettings: (settings: Partial<ToasterSettings>) => {\n dispatch({ type: \"settings\", settings });\n },\n };\n }, [dispatch]);\n};\n\n// ----------------------------------------------------------------------------\n\nexport const Toaster = () => {\n const { toasts, settings } = useSafeContext(ToasterStateContext);\n\n return (\n <Box\n className={cx(`iui-toast-wrapper`, `iui-placement-${settings.placement}`)}\n >\n {toasts.map((toastProps) => {\n return <Toast key={toastProps.id} {...toastProps} />;\n })}\n </Box>\n );\n};\n\n// ----------------------------------------------------------------------------\n\nexport const ToastProvider = ({ children }: { children: React.ReactNode }) => {\n const [toasterState, dispatch] = React.useReducer(toastReducer, {\n toasts: [],\n settings: {\n order: \"auto\",\n placement: \"top\",\n },\n });\n\n return (\n <ToasterDispatchContext.Provider value={dispatch}>\n <ToasterStateContext.Provider value={toasterState}>\n {children}\n </ToasterStateContext.Provider>\n </ToasterDispatchContext.Provider>\n );\n};\n\nconst toastReducer = (state: ToasterState, action: ToasterAction) => {\n if (action.type === \"add\") {\n let order = state.settings.order;\n if (order === \"auto\") {\n order = state.settings.placement.startsWith(\"top\")\n ? \"descending\"\n : \"ascending\";\n }\n\n return {\n ...state,\n toasts: [\n ...(order === \"ascending\" ? state.toasts : []),\n action.toast,\n ...(order === \"descending\" ? state.toasts : []),\n ],\n };\n }\n\n if (action.type === \"remove\") {\n return {\n ...state,\n toasts: state.toasts.filter((toast) => toast.id !== action.id),\n };\n }\n\n if (action.type === \"close-all\") {\n return {\n ...state,\n toasts: state.toasts.map((toast) => ({ ...toast, isVisible: false })),\n };\n }\n\n if (action.type === \"settings\") {\n return { ...state, settings: { ...state.settings, ...action.settings } };\n }\n\n return state;\n};\n\n// ----------------------------------------------------------------------------\n\nexport const ToasterStateContext = React.createContext<\n ToasterState | undefined\n>(undefined);\nToasterStateContext.displayName = \"ToasterStateContext\";\n\ntype ToasterState = { toasts: ToastProps[]; settings: ToasterSettings };\n\n// ----------------------------------------------------------------------------\n\nconst ToasterDispatchContext = React.createContext<\n React.Dispatch<ToasterAction> | undefined\n>(undefined);\nToasterDispatchContext.displayName = \"ToasterDispatchContext\";\n\ntype ToasterAction =\n | { type: \"add\"; toast: ToastProps }\n | { type: \"remove\"; id: number }\n | { type: \"close-all\" }\n | { type: \"settings\"; settings: Partial<ToasterSettings> };\n\n// ----------------------------------------------------------------------------\n\nconst nextId = (() => {\n let count = 0;\n return () => ++count;\n})();\n"],"names":["ToasterStateContext","React","createContext","undefined","displayName"],"mappings":"sfAwJO,IAAMA,EAAsBC,EAAMC,mBAEvCC,GACFH,EAAoBI,YAAc,sBAMHH,EAAMC,mBAEnCC,GACqBC,YAAc"}
1
+ {"version":3,"file":"Toaster.js","sources":["../../../../../../../src/components/Table/new/Toast/Toaster.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nimport cx from \"classnames\";\nimport { useSafeContext } from \"../utils/index\";\nimport { Box } from \"../utils/components/Box\";\nimport { Toast } from \"./Toast\";\nimport type { ToastCategory, ToastProps } from \"./Toast\";\n\nexport type ToasterSettings = {\n /**\n * Order of toasts.\n * When set to 'descending', most recent toasts are on top. When set to 'ascending', most recent toasts are on bottom.\n *\n * When set to `auto`, it will behave like 'descending' when `placement` is set to a top value, otherwise 'ascending'.\n *\n * @default 'auto'\n */\n order: \"descending\" | \"ascending\" | \"auto\";\n /**\n * Placement of toasts.\n * Changes placement of toasts. Start indicates left side of viewport. End - right side of viewport.\n * @default 'top'\n */\n placement:\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\";\n};\n\nexport type ToastOptions = Omit<\n ToastProps,\n \"category\" | \"isVisible\" | \"id\" | \"content\"\n>;\n\n// ----------------------------------------------------------------------------\n\nexport const useToaster = () => {\n const dispatch = useSafeContext(ToasterDispatchContext);\n\n return React.useMemo(() => {\n const showToast =\n (category: ToastCategory) =>\n (content: React.ReactNode, options?: ToastOptions) => {\n const id = nextId();\n\n dispatch({\n type: \"add\",\n toast: { ...options, id, content, category },\n });\n\n return { close: () => dispatch({ type: \"remove\", id }) };\n };\n\n return {\n positive: showToast(\"positive\"),\n informational: showToast(\"informational\"),\n negative: showToast(\"negative\"),\n warning: showToast(\"warning\"),\n closeAll: () => {\n dispatch({ type: \"close-all\" });\n },\n setSettings: (settings: Partial<ToasterSettings>) => {\n dispatch({ type: \"settings\", settings });\n },\n };\n }, [dispatch]);\n};\n\n// ----------------------------------------------------------------------------\n\nexport const Toaster = () => {\n const { toasts, settings } = useSafeContext(ToasterStateContext);\n\n return (\n <Box\n className={cx(`iui-toast-wrapper`, `iui-placement-${settings.placement}`)}\n >\n {toasts.map((toastProps) => {\n return <Toast key={toastProps.id} {...toastProps} />;\n })}\n </Box>\n );\n};\n\n// ----------------------------------------------------------------------------\n\nexport const ToastProvider = ({ children }: { children: React.ReactNode }) => {\n const [toasterState, dispatch] = React.useReducer(toastReducer, {\n toasts: [],\n settings: {\n order: \"auto\",\n placement: \"top\",\n },\n });\n\n return (\n <ToasterDispatchContext.Provider value={dispatch}>\n <ToasterStateContext.Provider value={toasterState}>\n {children}\n </ToasterStateContext.Provider>\n </ToasterDispatchContext.Provider>\n );\n};\n\nconst toastReducer = (state: ToasterState, action: ToasterAction) => {\n if (action.type === \"add\") {\n let order = state.settings.order;\n if (order === \"auto\") {\n order = state.settings.placement.startsWith(\"top\")\n ? \"descending\"\n : \"ascending\";\n }\n\n return {\n ...state,\n toasts: [\n ...(order === \"ascending\" ? state.toasts : []),\n action.toast,\n ...(order === \"descending\" ? state.toasts : []),\n ],\n };\n }\n\n if (action.type === \"remove\") {\n return {\n ...state,\n toasts: state.toasts.filter((toast) => toast.id !== action.id),\n };\n }\n\n if (action.type === \"close-all\") {\n return {\n ...state,\n toasts: state.toasts.map((toast) => ({ ...toast, isVisible: false })),\n };\n }\n\n if (action.type === \"settings\") {\n return { ...state, settings: { ...state.settings, ...action.settings } };\n }\n\n return state;\n};\n\n// ----------------------------------------------------------------------------\n\nexport const ToasterStateContext = React.createContext<\n ToasterState | undefined\n>(undefined);\nToasterStateContext.displayName = \"ToasterStateContext\";\n\ntype ToasterState = { toasts: ToastProps[]; settings: ToasterSettings };\n\n// ----------------------------------------------------------------------------\n\nconst ToasterDispatchContext = React.createContext<\n React.Dispatch<ToasterAction> | undefined\n>(undefined);\nToasterDispatchContext.displayName = \"ToasterDispatchContext\";\n\ntype ToasterAction =\n | { type: \"add\"; toast: ToastProps }\n | { type: \"remove\"; id: number }\n | { type: \"close-all\" }\n | { type: \"settings\"; settings: Partial<ToasterSettings> };\n\n// ----------------------------------------------------------------------------\n\nconst nextId = (() => {\n let count = 0;\n return () => ++count;\n})();\n"],"names":["Toaster","_useSafeContext","useSafeContext","ToasterStateContext","toasts","_jsx","Box","Object","assign","className","cx","concat","settings","placement","children","map","toastProps","Toast","id","ToastProvider","_ref","_React$useReducer","React","useReducer","toastReducer","order","_React$useReducer2","_slicedToArray","ToasterDispatchContext","Provider","value","state","action","type","startsWith","_toConsumableArray","toast","filter","isVisible","createContext","undefined","displayName"],"mappings":"gkBA4EaA,EAAU,WACrB,IAAAC,EAA6BC,EAAeC,GAApCC,EAAMH,EAANG,OAER,OACEC,EAACC,EACCC,OAAAC,OAAA,CAAAC,UAAWC,EAAEC,oBAAAA,iBAAAA,OAJOV,EAARW,SAIiDC,aAAY,CAAAC,S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AAAuB,GAAO,CAAAnB,SAAeL,OAAAC,OAAAD,OAAAC,OAAA,GAAAuB,EAAMnB,UAAaoB,EAAOpB,YAGvDmB,CACT,EAIa5B,EAAsBmB,EAAMiB,mBAEvCC,GACFrC,EAAoBsC,YAAc,sBAMlC,IAAMb,EAAyBN,EAAMiB,mBAEnCC,GACFZ,EAAuBa,YAAc"}
@@ -0,0 +1,2 @@
1
+ import{slicedToArray as r}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as e}from"../../../../../../_virtual/_tslib.js";import{jsx as t}from"react/jsx-runtime";import*as n from"react";import*as o from"react-dom";import{mergeRefs as u}from"../hooks/useMergedRefs.js";import{useResizeObserver as i}from"../hooks/useResizeObserver.js";import{useLayoutEffect as l}from"../hooks/useIsomorphicLayoutEffect.js";import"../functions/dev.js";import"../functions/colors.js";import"../functions/polymorphic.js";import"../hooks/useId.js";var c,s=null!==(c=o.unstable_batchedUpdates)&&void 0!==c?c:function(r){r()},d=function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e&&e!==t.body?a(e)?e:r(e.parentElement,t):t.body},a=function(r){return/(auto|scroll|overlay)/.test(f(r,"overflow")+f(r,"overflow-y"))},f=function(r,e){return getComputedStyle(r,null).getPropertyValue(e)},m=function(r){var e;return null!==(e=null==r?void 0:r.getBoundingClientRect().height)&&void 0!==e?e:0},v=function(r){if(r){var e=parseFloat(f(r,"margin-block-start"))+parseFloat(f(r,"margin-block-end"));return m(r)+(isNaN(e)?0:e)}},h=function(r,e){return r?Math.floor(e/r):0},p=function(r,e,t,n){return Math.min(t-e,h(r,m(n)))},b=n.forwardRef((function(r,e){var n=g(r);return t("div",Object.assign({},n.outerProps,{ref:e},{children:t("div",Object.assign({},n.innerProps,{children:n.visibleChildren}))}))})),g=function(t){var o=t.itemsLength,c=t.itemRenderer,a=t.bufferSize,f=void 0===a?10:a,m=t.scrollToIndex,b=t.style,g=e(t,["itemsLength","itemRenderer","bufferSize","scrollToIndex","style"]),y=n.useState(0),j=r(y,2),M=j[0],k=j[1],T=n.useState(0),x=r(T,2),R=x[0],w=x[1],C=n.useRef(),S=n.useRef(null),E=n.useRef({first:0,middle:0,last:0}),L=n.useRef(),D=n.useState(0),P=r(D,2),z=P[0],F=P[1],I=n.useRef({start:0,end:0}),N=n.useState(!1),O=r(N,2),_=O[0],B=O[1],H=function(){var r,e;return null!==(r=C.current)&&void 0!==r?r:null===(e=S.current)||void 0===e?void 0:e.ownerDocument.scrollingElement},A=n.useMemo((function(){for(var r=[],e=Math.min(o,M+R+2*f),t=M;e>t;t++)r.push(c(t));return r}),[o,c,f,M,R]),U=n.useCallback((function(){var r,e,t,n,o,u;if(S.current&&A.length){var i=S.current.children.item(0),l=S.current.children.item(1),c=S.current.children.item(S.current.children.length-1),s=Number(null!==(e=null===(r=v(i))||void 0===r?void 0:r.toFixed(2))&&void 0!==e?e:0);E.current={first:s,middle:Number(null!==(n=null===(t=v(l))||void 0===t?void 0:t.toFixed(2))&&void 0!==n?n:s),last:Number(null!==(u=null===(o=v(c))||void 0===o?void 0:o.toFixed(2))&&void 0!==u?u:s)}}}),[A.length]),V=n.useCallback((function(r){var e=r.height;e>0&&B(!0),s((function(){F(e),U()}))}),[U]),Y=i(V),q=r(Y,2),G=q[0],J=q[1];l((function(){var r,e=d(S.current,null===(r=S.current)||void 0===r?void 0:r.ownerDocument);C.current=e,G(e)}),[G]),l((function(){return function(){return null==J?void 0:J.disconnect()}}),[J]),l((function(){return U()}),[U]);var K=n.useCallback((function(){var r=H();if(r){var e=h(E.current.middle,Math.round(r.scrollTop)),t=p(E.current.middle,e,o,r),n=Math.min(Math.max(0,e-f),Math.max(0,o-2*f-t));I.current={start:e,end:e+t},k(n),w(t),S.current&&(S.current.style.transform="translateY(".concat(function(r,e){return e>0?r*e:0}(E.current.middle,n),"px)"))}}),[f,o]),Q=n.useCallback((function(){K()}),[K]),W=n.useCallback((function(){var r,e;L.current&&(C.current&&C.current!==(null===(r=S.current)||void 0===r?void 0:r.ownerDocument.body)?C.current.removeEventListener("scroll",L.current):null===(e=S.current)||void 0===e||e.ownerDocument.removeEventListener("scroll",L.current))}),[]);return l((function(){var r,e;return W(),L.current=Q,C.current&&C.current!==(null===(r=S.current)||void 0===r?void 0:r.ownerDocument.body)?C.current.addEventListener("scroll",Q):null===(e=S.current)||void 0===e||e.ownerDocument.addEventListener("scroll",Q),W}),[Q,W]),l((function(){if(_){var r=H();if(r&&null!=m){if(m>I.current.end||I.current.start>m){var e=m>I.current.end?m-I.current.end:m-I.current.start;if(0===m)return void r.scrollTo({top:0});r.scrollTo({top:e>0?Math.ceil(r.scrollTop)+e*E.current.middle:m*E.current.middle});var t=h(E.current.middle,Math.round(r.scrollTop)),n=p(E.current.middle,t,o,r);I.current={start:t,end:t+n}}if(m!==I.current.start){if(m===I.current.end){var u=(r.offsetHeight-E.current.first)%E.current.middle,i=Math.ceil(r.scrollTop);u>0&&0===i%E.current.middle&&r.scrollTo({top:i+E.current.middle-u})}}else{var l=Math.round(r.scrollTop),c=l%E.current.middle;c>0&&r.scrollTo({top:l-c})}}}}),[m,_,o]),l((function(){z&&K()}),[z,K]),{outerProps:Object.assign({style:Object.assign({minBlockSize:o>1?Math.max(o-2,0)*E.current.middle+E.current.first+E.current.last:E.current.middle,minInlineSize:"100%"},b)},g),innerProps:{style:{willChange:"transform"},ref:u(S)},visibleChildren:A}};export{b as VirtualScroll,g as useVirtualization};
2
+ //# sourceMappingURL=VirtualScroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VirtualScroll.js","sources":["../../../../../../../../src/components/Table/new/utils/components/VirtualScroll.tsx"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n// @ts-nocheck\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport {\n mergeRefs,\n useResizeObserver,\n useLayoutEffect,\n} from '../hooks/index';\n\nconst unstable_batchedUpdates =\n ReactDOM.unstable_batchedUpdates ?? ((cb: () => void) => void cb());\n\nconst getScrollableParent = (\n element: HTMLElement | null,\n ownerDocument: Document = document,\n): HTMLElement => {\n if (!element || element === ownerDocument.body) {\n return ownerDocument.body;\n }\n\n return isElementScrollable(element)\n ? element\n : getScrollableParent(element.parentElement, ownerDocument);\n};\n\nconst isElementScrollable = (element: HTMLElement) => {\n return /(auto|scroll|overlay)/.test(\n getElementStyle(element, 'overflow') +\n getElementStyle(element, 'overflow-y'),\n );\n};\n\nconst getElementStyle = (element: HTMLElement, prop: string) => {\n return getComputedStyle(element, null).getPropertyValue(prop);\n};\n\nconst getElementHeight = (element: HTMLElement | undefined) => {\n return element?.getBoundingClientRect().height ?? 0;\n};\n\nconst getElementHeightWithMargins = (element: HTMLElement | undefined) => {\n if (!element) {\n return undefined;\n }\n\n const margin =\n parseFloat(getElementStyle(element, 'margin-block-start')) +\n parseFloat(getElementStyle(element, 'margin-block-end'));\n return getElementHeight(element) + (isNaN(margin) ? 0 : margin);\n};\n\nconst getNumberOfNodesInHeight = (childHeight: number, totalHeight: number) => {\n if (!childHeight) {\n return 0;\n }\n\n return Math.floor(totalHeight / childHeight);\n};\n\nconst getTranslateValue = (childHeight: number, startIndex: number) => {\n if (startIndex > 0) {\n return childHeight * startIndex;\n }\n\n return 0;\n};\n\nconst getVisibleNodeCount = (\n childHeight: number,\n startIndex: number,\n childrenLength: number,\n scrollContainer: HTMLElement,\n) => {\n return Math.min(\n childrenLength - startIndex,\n getNumberOfNodesInHeight(childHeight, getElementHeight(scrollContainer)),\n );\n};\n\nexport type VirtualScrollProps = {\n /**\n * Length of the items to virtualize.\n */\n itemsLength: number;\n /**\n * Single item render function, which gives index of the item (0 based) in the data array\n * and expects to get the JSX of that element to render.\n * Recommended to memoize the reference of the function.\n */\n itemRenderer: (index: number) => JSX.Element;\n /**\n * Number of items to be rendered at the start and the end.\n * Not recommended to go lower than the visible items in viewport.\n * @default 10\n */\n bufferSize?: number;\n /**\n * Index of the first element on initial render.\n */\n scrollToIndex?: number;\n} & React.ComponentPropsWithRef<'div'>;\n\n/**\n * `VirtualScroll` component is used to render a huge amount of items in the DOM. It renders only the ones which are visible\n * and the amount provided through `bufferSize` prop at the start and the end. Can be used inside other components like `Table`.\n *\n * It has two wrapper elements, so DOM will be changed. One is used for setting full expected height in the scrollable container\n * and other is for transformation (translateY) to show the correct part of the list.\n *\n * Currently it works only with the direct vertically scrollable parent element. It does not work with body scroll.\n * It supports only static (same) height rows virtualization. Expect some issues, if list consists of different height elements.\n * @example\n * const itemRenderer = React.useCallback(() => (\n * <div key={index}>\n * This is my item #{index}\n * </div>\n * ), [])\n * <VirtualScroll\n * itemsLength={1000}\n * itemRenderer={itemRenderer}\n * />\n * @private\n */\nexport const VirtualScroll = React.forwardRef<\n HTMLDivElement,\n VirtualScrollProps\n>((props, ref) => {\n const { innerProps, outerProps, visibleChildren } = useVirtualization(props);\n\n return (\n <div {...outerProps} ref={ref}>\n <div {...innerProps}>{visibleChildren}</div>\n </div>\n );\n});\n\n/**\n * `useVirtualization` is used for efficiently rendering only the visible rows from a large list.\n * It returns `outerProps` and `innerProps`, which need to be applied on 2 container elements and `visibleChildren` which is a list of virtualized items.\n * @example\n * const itemRenderer = React.useCallback((index: number) => (\n * <li key={index}>\n * This is my item #{index}\n * </li>\n * ), [])\n *\n * const { outerProps, innerProps, visibleChildren } = useVirtualization({itemsLength: 1000, itemRenderer: itemRenderer});\n * return (\n * <div {...outerProps}>\n * <ul {...innerProps}>\n * {visibleChildren}\n * </ul>\n * </div>\n * );\n * @private\n */\nexport const useVirtualization = (props: VirtualScrollProps) => {\n const {\n itemsLength,\n itemRenderer,\n bufferSize = 10,\n scrollToIndex,\n style,\n ...rest\n } = props;\n const [startNode, setStartNode] = React.useState(0);\n const [visibleNodeCount, setVisibleNodeCount] = React.useState(0);\n const scrollContainer = React.useRef<HTMLElement>();\n const parentRef = React.useRef<HTMLElement>(null);\n const childHeight = React.useRef({ first: 0, middle: 0, last: 0 });\n const onScrollRef = React.useRef<(e: Event) => void>();\n // Used only to recalculate on resize\n const [scrollContainerHeight, setScrollContainerHeight] = React.useState(0);\n const visibleIndex = React.useRef({ start: 0, end: 0 });\n // Used to mark when scroll container has height (updated by resize observer)\n // because before that calculations are not right\n const [isMounted, setIsMounted] = React.useState(false);\n\n const getScrollableContainer = () =>\n scrollContainer.current ??\n (parentRef.current?.ownerDocument.scrollingElement as HTMLElement);\n\n const visibleChildren = React.useMemo(() => {\n const arr = [];\n const endIndex = Math.min(\n itemsLength,\n startNode + visibleNodeCount + bufferSize * 2,\n );\n for (let i = startNode; i < endIndex; i++) {\n arr.push(itemRenderer(i));\n }\n return arr;\n }, [itemsLength, itemRenderer, bufferSize, startNode, visibleNodeCount]);\n\n const updateChildHeight = React.useCallback(() => {\n if (!parentRef.current || !visibleChildren.length) {\n return;\n }\n\n const firstChild = parentRef.current.children.item(0) as HTMLElement;\n const secondChild = parentRef.current.children.item(1) as HTMLElement;\n const lastChild = parentRef.current.children.item(\n parentRef.current.children.length - 1,\n ) as HTMLElement;\n const firstChildHeight = Number(\n getElementHeightWithMargins(firstChild)?.toFixed(2) ?? 0,\n );\n\n childHeight.current = {\n first: firstChildHeight,\n middle: Number(\n getElementHeightWithMargins(secondChild)?.toFixed(2) ??\n firstChildHeight,\n ),\n last: Number(\n getElementHeightWithMargins(lastChild)?.toFixed(2) ?? firstChildHeight,\n ),\n };\n }, [visibleChildren.length]);\n\n const onResize = React.useCallback(\n ({ height }: DOMRectReadOnly) => {\n // Initial value returned by resize observer is 0\n // So wait for the next one\n if (height > 0) {\n setIsMounted(true);\n }\n unstable_batchedUpdates(() => {\n setScrollContainerHeight(height);\n updateChildHeight();\n });\n },\n [updateChildHeight],\n );\n const [resizeRef, resizeObserver] = useResizeObserver(onResize);\n\n // Find scrollable parent\n // Needed only on init\n useLayoutEffect(() => {\n const scrollableParent = getScrollableParent(\n parentRef.current,\n parentRef.current?.ownerDocument,\n );\n scrollContainer.current = scrollableParent;\n\n resizeRef(scrollableParent);\n }, [resizeRef]);\n\n // Stop watching resize, when virtual scroll is unmounted\n useLayoutEffect(() => {\n return () => resizeObserver?.disconnect();\n }, [resizeObserver]);\n\n // Get child height when children available\n useLayoutEffect(() => updateChildHeight(), [updateChildHeight]);\n\n const updateVirtualScroll = React.useCallback(() => {\n const scrollableContainer = getScrollableContainer();\n if (!scrollableContainer) {\n return;\n }\n\n const start = getNumberOfNodesInHeight(\n childHeight.current.middle,\n Math.round(scrollableContainer.scrollTop),\n );\n const visibleNodes = getVisibleNodeCount(\n childHeight.current.middle,\n start,\n itemsLength,\n scrollableContainer,\n );\n // If there are less items at the end than buffer size\n // show more items at the start.\n // Have boundaries for edge cases, e.g. 1 item length\n const startIndex = Math.min(\n Math.max(0, start - bufferSize),\n Math.max(0, itemsLength - bufferSize * 2 - visibleNodes),\n );\n visibleIndex.current = { start: start, end: start + visibleNodes };\n setStartNode(startIndex);\n setVisibleNodeCount(visibleNodes);\n\n if (!parentRef.current) {\n return;\n }\n parentRef.current.style.transform = `translateY(${getTranslateValue(\n childHeight.current.middle,\n startIndex,\n )}px)`;\n }, [bufferSize, itemsLength]);\n\n const onScroll = React.useCallback(() => {\n updateVirtualScroll();\n }, [updateVirtualScroll]);\n\n const removeScrollListener = React.useCallback(() => {\n if (!onScrollRef.current) {\n return;\n }\n !scrollContainer.current ||\n scrollContainer.current === parentRef.current?.ownerDocument.body\n ? parentRef.current?.ownerDocument.removeEventListener(\n 'scroll',\n onScrollRef.current,\n )\n : scrollContainer.current.removeEventListener(\n 'scroll',\n onScrollRef.current,\n );\n }, []);\n\n // Add event listener to the scrollable container.\n useLayoutEffect(() => {\n removeScrollListener();\n onScrollRef.current = onScroll;\n if (\n !scrollContainer.current ||\n scrollContainer.current === parentRef.current?.ownerDocument.body\n ) {\n parentRef.current?.ownerDocument.addEventListener('scroll', onScroll);\n } else {\n scrollContainer.current.addEventListener('scroll', onScroll);\n }\n return removeScrollListener;\n }, [onScroll, removeScrollListener]);\n\n useLayoutEffect(() => {\n if (!isMounted) {\n return;\n }\n\n const scrollableContainer = getScrollableContainer();\n\n if (!scrollableContainer || scrollToIndex == null) {\n return;\n }\n\n // if `scrollToIndex` is not visible, scroll to it\n if (\n scrollToIndex > visibleIndex.current.end ||\n scrollToIndex < visibleIndex.current.start\n ) {\n const indexDiff =\n scrollToIndex > visibleIndex.current.end\n ? scrollToIndex - visibleIndex.current.end\n : scrollToIndex - visibleIndex.current.start;\n\n if (scrollToIndex === 0) {\n scrollableContainer.scrollTo({ top: 0 });\n return;\n }\n // If go down: add to the existing scrollTop needed height\n // If go up: calculate the exact scroll top\n scrollableContainer.scrollTo({\n top:\n indexDiff > 0\n ? Math.ceil(scrollableContainer.scrollTop) +\n indexDiff * childHeight.current.middle\n : scrollToIndex * childHeight.current.middle,\n });\n\n // update visible index\n const start = getNumberOfNodesInHeight(\n childHeight.current.middle,\n Math.round(scrollableContainer.scrollTop),\n );\n const visibleNodes = getVisibleNodeCount(\n childHeight.current.middle,\n start,\n itemsLength,\n scrollableContainer,\n );\n visibleIndex.current = { start: start, end: start + visibleNodes };\n }\n\n // if `scrollToIndex` is the first visible node\n // ensure it is fully visible\n if (scrollToIndex === visibleIndex.current.start) {\n const roundedScrollTop = Math.round(scrollableContainer.scrollTop);\n const diff = roundedScrollTop % childHeight.current.middle;\n diff > 0 &&\n scrollableContainer.scrollTo({\n top: roundedScrollTop - diff,\n });\n return;\n }\n\n // if `scrollToIndex` is the last visible node\n // ensure it is fully visible\n if (scrollToIndex === visibleIndex.current.end) {\n const diff =\n (scrollableContainer.offsetHeight - childHeight.current.first) %\n childHeight.current.middle;\n const roundedScrollTop = Math.ceil(scrollableContainer.scrollTop);\n const scrollTopMod = roundedScrollTop % childHeight.current.middle;\n\n if (diff > 0 && scrollTopMod === 0) {\n scrollableContainer.scrollTo({\n top: roundedScrollTop + childHeight.current.middle - diff,\n });\n }\n }\n }, [scrollToIndex, isMounted, itemsLength]);\n\n useLayoutEffect(() => {\n if (!scrollContainerHeight) {\n return;\n }\n\n updateVirtualScroll();\n }, [scrollContainerHeight, updateVirtualScroll]);\n\n return {\n outerProps: {\n style: {\n minBlockSize:\n itemsLength > 1\n ? Math.max(itemsLength - 2, 0) * childHeight.current.middle +\n childHeight.current.first +\n childHeight.current.last\n : childHeight.current.middle,\n minInlineSize: '100%',\n ...style,\n },\n ...rest,\n } as React.HTMLAttributes<HTMLElement>,\n innerProps: {\n style: { willChange: 'transform' },\n ref: mergeRefs(parentRef), // convert object ref to callback ref for better types\n } as const,\n visibleChildren,\n };\n};\n"],"names":["unstable_batchedUpdates","_a","ReactDOM","cb","getScrollableParent","element","ownerDocument","arguments","length","undefined","document","body","isElementScrollable","parentElement","test","getElementStyle","prop","getComputedStyle","getPropertyValue","getElementHeight","getBoundingClientRect","height","getElementHeightWithMargins","margin","parseFloat","isNaN","getNumberOfNodesInHeight","childHeight","totalHeight","Math","floor","getVisibleNodeCount","startIndex","childrenLength","scrollContainer","min","VirtualScroll","React","forwardRef","props","ref","_useVirtualization","useVirtualization","_jsx","Object","assign","outerProps","children","innerProps","visibleChildren","itemsLength","itemRenderer","_props$bufferSize","bufferSize","scrollToIndex","style","rest","_React$useState","useState","_React$useState2","_slicedToArray","startNode","setStartNode","_React$useState3","_React$useState4","visibleNodeCount","setVisibleNodeCount","useRef","parentRef","first","middle","last","onScrollRef","_React$useState5","_React$useState6","scrollContainerHeight","setScrollContainerHeight","visibleIndex","start","end","_React$useState7","_React$useState8","isMounted","setIsMounted","getScrollableContainer","current","_b","scrollingElement","useMemo","arr","endIndex","i","push","updateChildHeight","useCallback","firstChild","item","secondChild","lastChild","firstChildHeight","Number","toFixed","_d","_c","_f","_e","onResize","_ref","_useResizeObserver","useResizeObserver","_useResizeObserver2","resizeRef","resizeObserver","useLayoutEffect","scrollableParent","disconnect","updateVirtualScroll","scrollableContainer","round","scrollTop","visibleNodes","max","transform","concat","getTranslateValue","onScroll","removeScrollListener","removeEventListener","addEventListener","indexDiff","scrollTo","top","ceil","diff","offsetHeight","roundedScrollTop","minBlockSize","minInlineSize","willChange","mergeRefs"],"mappings":"ijBAcMA,EACgC,QAApCC,EAAAC,EAASF,+BAA2B,IAAAC,EAAAA,EAAC,SAACE,GAAwBA,GAAI,EAE9DC,EAAsB,SAAtBA,EACJC,GAEe,IADfC,EAA0BC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAAG,SAE1B,OAAKL,GAAWA,IAAYC,EAAcK,KAInCC,EAAoBP,GACvBA,EACAD,EAAoBC,EAAQQ,cAAeP,GALtCA,EAAcK,IAMzB,EAEMC,EAAsB,SAACP,GAC3B,MAAO,wBAAwBS,KAC7BC,EAAgBV,EAAS,YACvBU,EAAgBV,EAAS,cAE/B,EAEMU,EAAkB,SAACV,EAAsBW,GAC7C,OAAOC,iBAAiBZ,EAAS,MAAMa,iBAAiBF,EAC1D,EAEMG,EAAmB,SAACd,SACxB,OAAkD,QAA3CJ,EAAAI,aAAA,EAAAA,EAASe,wBAAwBC,cAAU,IAAApB,EAAAA,EAAA,CACpD,EAEMqB,EAA8B,SAACjB,GACnC,GAAKA,EAAL,CAIA,IAAMkB,EACJC,WAAWT,EAAgBV,EAAS,uBACpCmB,WAAWT,EAAgBV,EAAS,qBACtC,OAAOc,EAAiBd,IAAYoB,MAAMF,GAAU,EAAIA,EALvD,CAMH,EAEMG,EAA2B,SAACC,EAAqBC,GACrD,OAAKD,EAIEE,KAAKC,MAAMF,EAAcD,GAHvB,CAIX,EAUMI,EAAsB,SAC1BJ,EACAK,EACAC,EACAC,GAEA,OAAOL,KAAKM,IACVF,EAAiBD,EACjBN,EAAyBC,EAAaR,EAAiBe,IAE3D,EA8CaE,EAAgBC,EAAMC,YAGjC,SAACC,EAAOC,GACR,IAAAC,EAAoDC,EAAkBH,GAEtE,OACEI,EAAA,MAAAC,OAAAC,OAAA,CAAA,EAH4BJ,EAAVK,WAGC,CAAEN,IAAKA,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O,GAAsB,IAFZE,EAAmB5G,EAAY0D,QAAQf,QAG1D+C,EAAoBa,SAAS,CAC3BC,IAAKI,EAAmB5G,EAAY0D,QAAQf,OAAS+D,GAG1D,MAxBD,CACE,IAAME,EAAmB1G,KAAKyF,MAAMD,EAAoBE,WAClDc,EAAOE,EAAmB5G,EAAY0D,QAAQf,OACpD+D,EAAO,GACLhB,EAAoBa,SAAS,CAC3BC,IAAKI,EAAmBF,GAG7B,CAlDA,CANA,CAyEF,GAAE,CAAC/E,EAAe4B,EAAWhC,IAE9B+D,GAAgB,WACTtC,GAILyC,GACF,GAAG,CAACzC,EAAuByC,IAEpB,CACLtE,WAAYF,eACVW,MAAKX,OAAAC,OAAA,CACH2F,aACEtF,EAAc,EACVrB,KAAK4F,IAAIvE,EAAc,EAAG,GAAKvB,EAAY0D,QAAQf,OACnD3C,EAAY0D,QAAQhB,MACpB1C,EAAY0D,QAAQd,KACpB5C,EAAY0D,QAAQf,OAC1BmE,cAAe,QACZlF,IAEFC,GAELR,WAAY,CACVO,MAAO,CAAEmF,WAAY,aACrBlG,IAAKmG,EAAUvE,IAEjBnB,gBAAAA,EAEJ"}
@@ -1,2 +1,2 @@
1
- var e=void 0!==globalThis.jest,o=void 0!==globalThis.beforeEach&&"function(name,fn){suites[0].beforeEach(name,fn);}"==="".concat(globalThis.beforeEach).replace(/\s/g,""),a=void 0!==globalThis.__vitest_index__,i=e||a||o,c=!1;try{c="production"!==process.env.NODE_ENV&&!i}catch(e){}export{c as isDev,i as isUnitTest};
1
+ var n=void 0!==globalThis.jest,o=void 0!==globalThis.beforeEach&&"function(name,fn){suites[0].beforeEach(name,fn);}"==="".concat(globalThis.beforeEach).replace(/\s/g,""),e=void 0!==globalThis.__vitest_index__,a=n||e||o,c=!1;try{c="production"!==process.env.NODE_ENV&&!a}catch(n){}var i=c?function(){var n=!1;return function(o){n||(console.warn(o),n=!0)}}:function(){return function(){}};export{i as createWarningLogger,c as isDev,a as isUnitTest};
2
2
  //# sourceMappingURL=dev.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dev.js","sources":["../../../../../../../../src/components/Table/new/utils/functions/dev.ts"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nconst isJest = typeof (globalThis as any).jest !== 'undefined';\nconst isMocha =\n typeof (globalThis as any).beforeEach !== 'undefined' &&\n `${(globalThis as any).beforeEach}`.replace(/\\s/g, '') ===\n 'function(name,fn){suites[0].beforeEach(name,fn);}';\nconst isVitest = typeof (globalThis as any).__vitest_index__ !== 'undefined';\n\nconst isUnitTest = isJest || isVitest || isMocha;\n\nlet isDev = false;\n\n// wrapping in try-catch because process might be undefined\ntry {\n isDev = process.env.NODE_ENV !== 'production' && !isUnitTest;\n} catch {}\n\n/**\n * Logs message one time only in dev environments.\n *\n * @example\n * const logWarningInDev = createWarningLogger();\n * logWarningInDev(\"please don't use this\")\n */\nconst createWarningLogger = !isDev\n ? () => () => {}\n : () => {\n let logged = false;\n return (message: string) => {\n if (!logged) {\n console.warn(message);\n logged = true;\n }\n };\n };\n\nexport { isUnitTest, isDev, createWarningLogger };\n"],"names":["isJest","globalThis","jest","isMocha","beforeEach","concat","replace","isVitest","__vitest_index__","isUnitTest","isDev","process","env","NODE_ENV","_a"],"mappings":"AAMA,IAAMA,OAA6C,IAA5BC,WAAmBC,KACpCC,OACsC,IAAlCF,WAAmBG,YAEzB,sDADF,GAAAC,OAAIJ,WAAmBG,YAAaE,QAAQ,MAAO,IAE/CC,OAA2D,IAAxCN,WAAmBO,iBAEtCC,EAAaT,GAAUO,GAAYJ,EAErCO,GAAQ,EAGZ,IACEA,EAAiC,eAAzBC,QAAQC,IAAIC,WAA8BJ,CACnD,CAAC,MAAAK,GAAM"}
1
+ {"version":3,"file":"dev.js","sources":["../../../../../../../../src/components/Table/new/utils/functions/dev.ts"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nconst isJest = typeof (globalThis as any).jest !== 'undefined';\nconst isMocha =\n typeof (globalThis as any).beforeEach !== 'undefined' &&\n `${(globalThis as any).beforeEach}`.replace(/\\s/g, '') ===\n 'function(name,fn){suites[0].beforeEach(name,fn);}';\nconst isVitest = typeof (globalThis as any).__vitest_index__ !== 'undefined';\n\nconst isUnitTest = isJest || isVitest || isMocha;\n\nlet isDev = false;\n\n// wrapping in try-catch because process might be undefined\ntry {\n isDev = process.env.NODE_ENV !== 'production' && !isUnitTest;\n} catch {}\n\n/**\n * Logs message one time only in dev environments.\n *\n * @example\n * const logWarningInDev = createWarningLogger();\n * logWarningInDev(\"please don't use this\")\n */\nconst createWarningLogger = !isDev\n ? () => () => {}\n : () => {\n let logged = false;\n return (message: string) => {\n if (!logged) {\n console.warn(message);\n logged = true;\n }\n };\n };\n\nexport { isUnitTest, isDev, createWarningLogger };\n"],"names":["isJest","globalThis","jest","isMocha","beforeEach","concat","replace","isVitest","__vitest_index__","isUnitTest","isDev","process","env","NODE_ENV","_a","createWarningLogger","logged","message","console","warn"],"mappings":"AAMA,IAAMA,OAA6C,IAA5BC,WAAmBC,KACpCC,OACsC,IAAlCF,WAAmBG,YAEzB,sDADF,GAAAC,OAAIJ,WAAmBG,YAAaE,QAAQ,MAAO,IAE/CC,OAA2D,IAAxCN,WAAmBO,iBAEtCC,EAAaT,GAAUO,GAAYJ,EAErCO,GAAQ,EAGZ,IACEA,EAAiC,eAAzBC,QAAQC,IAAIC,WAA8BJ,CACnD,CAAC,MAAAK,GAAQ,CASV,IAAMC,EAAuBL,EAEzB,WACE,IAAIM,GAAS,EACb,OAAO,SAACC,GACDD,IACHE,QAAQC,KAAKF,GACbD,GAAS,GAGf,EATA,WAAA,OAAM,YAAQ"}
@@ -0,0 +1,2 @@
1
+ import{regeneratorRuntime as t}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import{__awaiter as e}from"../../../../../../_virtual/_tslib.js";var r=function(r){return e(void 0,void 0,void 0,t().mark((function e(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Function('return import("'.concat(r,'", { with: { type: "css" } })'))();case 3:case 11:case 18:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.prev=8,t.next=11,Function('return import("'.concat(r,'", { assert: { type: "css" } })'))();case 14:return t.prev=14,t.t1=t.catch(8),t.next=18,fetch(r).then((function(t){return t.text()})).then((function(t){var e=new CSSStyleSheet;return e.replaceSync(t),{default:e}}));case 19:case"end":return t.stop()}}),e,null,[[0,6],[8,14]])})))};export{r as importCss};
2
+ //# sourceMappingURL=import.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import.js","sources":["../../../../../../../../src/components/Table/new/utils/functions/import.ts"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/**\n * Wrapper around native CSS module scripts (import attributes) for dynamic imports.\n * In unsupported browsers, it gracefully degrades to import assertions, and then `fetch`.\n *\n * Returns a constructable CSSStyleSheet object that can be adopted.\n *\n * @see https://web.dev/articles/css-module-scripts\n * @see https://github.com/tc39/proposal-import-attributes\n */\nexport const importCss = async (\n url: string,\n): Promise<{ default: CSSStyleSheet }> => {\n try {\n return await new Function(\n `return import(\"${url}\", { with: { type: \"css\" } })`,\n )();\n } catch {\n try {\n return await new Function(\n `return import(\"${url}\", { assert: { type: \"css\" } })`,\n )();\n } catch {\n return await fetch(url)\n .then((res) => res.text())\n .then((cssText) => {\n const stylesheet = new CSSStyleSheet();\n stylesheet.replaceSync(cssText);\n return { default: stylesheet };\n });\n }\n }\n};\n"],"names":["importCss","url","__awaiter","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","Function","concat","abrupt","sent","t0","t1","fetch","then","res","text","cssText","stylesheet","CSSStyleSheet","replaceSync","default","stop"],"mappings":"kKAcaA,EAAY,SACvBC,GAAW,OAC4BC,OAAA,OAAA,OAAA,EAAAC,IAAAC,MAAA,SAAAC,IAAA,OAAAF,IAAAG,MAAA,SAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAE9B,OAF8BF,EAAAC,KAAA,EAAAD,EAAAE,KAAA,EAEpBC,SAAQC,kBAAAA,OACLV,EAAG,iCADV,GAEV,KAAA,EAKE,KAAA,GAQC,KAAA,GAAA,OAAAM,EAAAK,OAAAL,SAAAA,EAAAM,MAbH,KAAA,EAGM,OAHNN,EAAAC,KAAA,EAAAD,EAAAO,GAAAP,EAAA,MAAA,GAAAA,EAAAC,KAAA,EAAAD,EAAAE,KAAA,GAGgBC,SAAQC,kBAAAA,OACLV,EAAG,mCADV,GAEV,KAAA,GAEI,OAFJM,EAAAC,KAAA,GAAAD,EAAAQ,GAAAR,EAAA,MAAA,GAAAA,EAAAE,KAAA,GAEUO,MAAMf,GAChBgB,MAAK,SAACC,GAAG,OAAKA,EAAIC,MAAM,IACxBF,MAAK,SAACG,GACL,IAAMC,EAAa,IAAIC,cAEvB,OADAD,EAAWE,YAAYH,GAChB,CAAEI,QAASH,EACpB,IAAE,KAAA,GAAA,IAAA,MAAA,OAAAd,EAAAkB,OAAA,GAAApB,EAAA,KAAA,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,KAGT,IAAA"}
@@ -0,0 +1,2 @@
1
+ import*as r from"react";var e=function(e){var t=r.useRef(e);return r.useEffect((function(){t.current=e}),[e]),t};export{e as useLatestRef};
2
+ //# sourceMappingURL=useLatestRef.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLatestRef.js","sources":["../../../../../../../../src/components/Table/new/utils/hooks/useLatestRef.ts"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\n\n/**\n * Hook that keeps track of the latest value in a ref.\n * @private\n * @example\n * const { value } = props;\n * const valueRef = useLatestRef(value);\n */\nexport const useLatestRef = <T>(value: T) => {\n const valueRef = React.useRef<T>(value);\n\n React.useEffect(() => {\n valueRef.current = value;\n }, [value]);\n\n return valueRef;\n};\n"],"names":["useLatestRef","value","valueRef","React","useRef","useEffect","current"],"mappings":"4BAaaA,EAAe,SAAIC,GAC9B,IAAMC,EAAWC,EAAMC,OAAUH,GAMjC,OAJAE,EAAME,WAAU,WACdH,EAASI,QAAUL,CACrB,GAAG,CAACA,IAEGC,CACT"}
@@ -0,0 +1,2 @@
1
+ import{slicedToArray as t}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import*as o from"react";import{getWindow as r}from"../functions/dom.js";import"../functions/colors.js";import"../functions/polymorphic.js";import"../../../../../../_virtual/_tslib.js";import"../functions/dev.js";import{useLayoutEffect as i}from"./useIsomorphicLayoutEffect.js";var e=function(e){var n=o.useState(),l=t(n,2),a=l[0],s=l[1];return i((function(){var t,o,i,n=null===(o=null===(t=r())||void 0===t?void 0:t.matchMedia)||void 0===o?void 0:o.call(t,e),l=function(t){return s(t.matches)};if(null!=n){s(n.matches);try{n.addEventListener("change",l)}catch(t){null===(i=n.addListener)||void 0===i||i.call(n,l)}}return function(){var t;try{null==n||n.removeEventListener("change",l)}catch(o){null===(t=null==n?void 0:n.removeListener)||void 0===t||t.call(n,l)}}}),[e]),!!a};export{e as useMediaQuery};
2
+ //# sourceMappingURL=useMediaQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMediaQuery.js","sources":["../../../../../../../../src/components/Table/new/utils/hooks/useMediaQuery.ts"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\nimport { getWindow } from '../functions/index';\nimport { useLayoutEffect } from './useIsomorphicLayoutEffect';\n\nexport const useMediaQuery = (queryString: string) => {\n const [matches, setMatches] = React.useState<boolean>();\n\n useLayoutEffect(() => {\n const mediaQueryList = getWindow()?.matchMedia?.(queryString);\n const handleChange = ({ matches }: MediaQueryListEvent) =>\n setMatches(matches);\n\n if (mediaQueryList != undefined) {\n setMatches(mediaQueryList.matches);\n try {\n mediaQueryList.addEventListener('change', handleChange);\n } catch {\n // Safari 13 fallback\n mediaQueryList.addListener?.(handleChange);\n }\n }\n\n return () => {\n try {\n mediaQueryList?.removeEventListener('change', handleChange);\n } catch {\n // Safari 13 fallback\n mediaQueryList?.removeListener?.(handleChange);\n }\n };\n }, [queryString]);\n\n return !!matches;\n};\n"],"names":["useMediaQuery","queryString","_React$useState","React","useState","_React$useState2","_slicedToArray","matches","setMatches","useLayoutEffect","mediaQueryList","_b","_a","getWindow","matchMedia","call","handleChange","_ref","undefined","addEventListener","_d","_c","addListener","removeEventListener","removeListener"],"mappings":"iXAQaA,EAAgB,SAACC,GAC5B,IAAAC,EAA8BC,EAAMC,WAAmBC,EAAAC,EAAAJ,EAAA,GAAhDK,EAAOF,EAAA,GAAEG,EAAUH,EAAA,GA2B1B,OAzBAI,GAAgB,qBACRC,EAAwC,QAAvBC,EAAW,QAAXC,EAAAC,WAAW,IAAAD,OAAA,EAAAA,EAAEE,kBAAU,IAAAH,OAAA,EAAAA,EAAAI,KAAAH,EAAGX,GAC3Ce,EAAe,SAAHC,GAAa,OAC7BT,EAD6BS,EAAPV,QACH,EAErB,GAAsBW,MAAlBR,EAA6B,CAC/BF,EAAWE,EAAeH,SAC1B,IACEG,EAAeS,iBAAiB,SAAUH,EAC3C,CAAC,MAAMI,GAEuB,QAA7BC,EAAAX,EAAeY,mBAAc,IAAAD,GAAAA,EAAAN,KAAAL,EAAAM,EAC9B,CACF,CAED,OAAO,iBACL,IACEN,SAAAA,EAAgBa,oBAAoB,SAAUP,EAC/C,CAAC,MAAML,GAEwB,QAA9BC,EAAAF,aAAA,EAAAA,EAAgBc,sBAAc,IAAAZ,GAAAA,EAAAG,KAAAL,EAAGM,EAClC,EAEL,GAAG,CAACf,MAEKM,CACX"}
@@ -0,0 +1,2 @@
1
+ import*as r from"react";var t=function(t){var e=r.useContext(t);if(!e)throw Error("".concat(t.displayName," is undefined"));return e};export{t as useSafeContext};
2
+ //# sourceMappingURL=useSafeContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSafeContext.js","sources":["../../../../../../../../src/components/Table/new/utils/hooks/useSafeContext.ts"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\n\n/**\n * Wrapper hook around `useContext` that throws an error if the context is not provided.\n * @param context Context to use. Must have a `displayName` for useful errors.\n */\nexport const useSafeContext = <T>(context: React.Context<T>) => {\n const value = React.useContext(context);\n if (!value) {\n throw new Error(`${context.displayName} is undefined`);\n }\n return value!; // eslint-disable-line @typescript-eslint/no-non-null-assertion -- we already checked for undefined\n};\n"],"names":["useSafeContext","context","value","React","useContext","Error","concat","displayName"],"mappings":"4BAUaA,EAAiB,SAAIC,GAChC,IAAMC,EAAQC,EAAMC,WAAWH,GAC/B,IAAKC,EACH,MAAUG,MAAKC,GAAAA,OAAIL,EAAQM,YAAW,kBAExC,OAAOL,CACT"}
@@ -0,0 +1,2 @@
1
+ var e="";!function(e){if("undefined"==typeof document)return;const t=document.head||document.getElementsByTagName("head")[0],d="s_id-e8f0641a7377_0_0_82-table-tanstack-updated";if(t.querySelector("#"+d))return;const n=document.createElement("style");n.id=d,t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.appendChild(document.createTextNode(e))}("");export{e as default};
2
+ //# sourceMappingURL=column-filter.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-filter.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- var e=".dropdown-button {\n display: flex;\n align-items: center;\n}\n\n.menu-item {\n width: 100px;\n}";!function(e){if("undefined"==typeof document)return;const t=document.head||document.getElementsByTagName("head")[0],n="s_id-14bea31bdd51_0_0_82-table-tanstack";if(t.querySelector("#"+n))return;const d=document.createElement("style");d.id=n,t.firstChild?t.insertBefore(d,t.firstChild):t.appendChild(d),d.appendChild(document.createTextNode(e))}(e);export{e as default};
1
+ var e=".dropdown-button {\n display: flex;\n align-items: center;\n}\n\n.menu-item {\n width: 100px;\n}";!function(e){if("undefined"==typeof document)return;const t=document.head||document.getElementsByTagName("head")[0],n="s_id-14bea31bdd51_0_0_82-table-tanstack-updated";if(t.querySelector("#"+n))return;const d=document.createElement("style");d.id=n,t.firstChild?t.insertBefore(d,t.firstChild):t.appendChild(d),d.appendChild(document.createTextNode(e))}(e);export{e as default};
2
2
  //# sourceMappingURL=paginator.scss.js.map
@@ -1,2 +1,2 @@
1
- var r=":where(body.iui-root) {\n margin: 0;\n}\n\n:where(body.iui-root, .iui-root.iui-root-background) {\n background-color: var(--surface-secondary);\n}\n\n:where(.iui-root, .iui-root *) {\n scrollbar-color: hsl(var(--surface-secondary)/var(--iui-opacity-4)) transparent;\n scrollbar-width: thin;\n}\n\n:where(.iui-root, .iui-root *)::-webkit-scrollbar {\n max-inline-size: var(--spacing-xs);\n max-block-size: var(--spacing-xs);\n}\n\n:where(.iui-root, .iui-root *)::-webkit-scrollbar-thumb {\n background-color: hsl(var(--surface-secondary)/var(--iui-opacity-4));\n border-radius: var(--spacing-xs);\n}\n\n:where(.iui-root, .iui-root *)::-webkit-scrollbar-thumb:hover {\n background-color: hsl(var(--surface-secondary)/var(--iui-opacity-3));\n}\n\n:where(.iui-root, .iui-root *)::-webkit-scrollbar-track, :where(.iui-root, .iui-root *)::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n\n:where(.iui-root, .iui-root *), :where(.iui-root, .iui-root *)::before, :where(.iui-root, .iui-root *)::after {\n box-sizing: border-box;\n}\n\n:where(.iui-root, .iui-root *):where(:focus-visible) {\n outline: 2px solid var(--divider-secondary);\n}";!function(r){if("undefined"==typeof document)return;const o=document.head||document.getElementsByTagName("head")[0],i="s_id-0bb327308675_0_0_82-table-tanstack";if(o.querySelector("#"+i))return;const e=document.createElement("style");e.id=i,o.firstChild?o.insertBefore(e,o.firstChild):o.appendChild(e),e.appendChild(document.createTextNode(r))}(r);export{r as default};
1
+ var r=":where(body.iui-root) {\n margin: 0;\n}\n\n:where(body.iui-root, .iui-root.iui-root-background) {\n background-color: var(--surface-secondary);\n}\n\n:where(.iui-root, .iui-root *) {\n scrollbar-color: hsl(var(--surface-secondary)/var(--iui-opacity-4)) transparent;\n scrollbar-width: thin;\n}\n\n:where(.iui-root, .iui-root *)::-webkit-scrollbar {\n max-inline-size: var(--spacing-xs);\n max-block-size: var(--spacing-xs);\n}\n\n:where(.iui-root, .iui-root *)::-webkit-scrollbar-thumb {\n background-color: hsl(var(--surface-secondary)/var(--iui-opacity-4));\n border-radius: var(--spacing-xs);\n}\n\n:where(.iui-root, .iui-root *)::-webkit-scrollbar-thumb:hover {\n background-color: hsl(var(--surface-secondary)/var(--iui-opacity-3));\n}\n\n:where(.iui-root, .iui-root *)::-webkit-scrollbar-track, :where(.iui-root, .iui-root *)::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n\n:where(.iui-root, .iui-root *), :where(.iui-root, .iui-root *)::before, :where(.iui-root, .iui-root *)::after {\n box-sizing: border-box;\n}\n\n:where(.iui-root, .iui-root *):where(:focus-visible) {\n outline: 2px solid var(--divider-secondary);\n}";!function(r){if("undefined"==typeof document)return;const o=document.head||document.getElementsByTagName("head")[0],i="s_id-0bb327308675_0_0_82-table-tanstack-updated";if(o.querySelector("#"+i))return;const e=document.createElement("style");e.id=i,o.firstChild?o.insertBefore(e,o.firstChild):o.appendChild(e),e.appendChild(document.createTextNode(r))}(r);export{r as default};
2
2
  //# sourceMappingURL=table_base.scss.js.map