pixelize-design-library 2.4.1-beta.11 → 2.4.1-beta.13

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 (651) hide show
  1. package/dist/App.d.ts +4 -0
  2. package/dist/App.js +95 -0
  3. package/dist/Components/AlertDialog/AlertDialog.d.ts.map +1 -1
  4. package/dist/Components/AlertDialog/AlertDialog.js +1 -1
  5. package/dist/Components/Button/Button.d.ts +1 -1
  6. package/dist/Components/Button/Button.d.ts.map +1 -1
  7. package/dist/Components/Button/Button.js +2 -2
  8. package/dist/Components/Button/ButtonProps.d.ts +1 -1
  9. package/dist/Components/Button/ButtonProps.d.ts.map +1 -1
  10. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.d.ts.map +1 -1
  11. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +5 -2
  12. package/dist/Components/Checkbox/Checkbox.d.ts +1 -1
  13. package/dist/Components/Checkbox/Checkbox.d.ts.map +1 -1
  14. package/dist/Components/Checkbox/Checkbox.js +2 -2
  15. package/dist/Components/Checkbox/CheckboxProps.d.ts +1 -1
  16. package/dist/Components/Checkbox/CheckboxProps.d.ts.map +1 -1
  17. package/dist/Components/Common/ErrorMessage.d.ts +2 -1
  18. package/dist/Components/Common/ErrorMessage.d.ts.map +1 -1
  19. package/dist/Components/Common/ErrorMessage.js +4 -2
  20. package/dist/Components/Common/FormLabel.d.ts +1 -1
  21. package/dist/Components/Common/FormLabel.d.ts.map +1 -1
  22. package/dist/Components/Common/FormLabel.js +15 -2
  23. package/dist/Components/Common/Label.d.ts +3 -1
  24. package/dist/Components/Common/Label.d.ts.map +1 -1
  25. package/dist/Components/Common/Label.js +2 -2
  26. package/dist/Components/Dropdown/DropDown.d.ts.map +1 -1
  27. package/dist/Components/Dropdown/DropDown.js +132 -14
  28. package/dist/Components/Dropdown/DropdownProps.d.ts +2 -0
  29. package/dist/Components/Dropdown/DropdownProps.d.ts.map +1 -1
  30. package/dist/Components/Editor/EditorProps.d.ts +1 -1
  31. package/dist/Components/Editor/EditorProps.d.ts.map +1 -1
  32. package/dist/Components/KanbanBoard/KanbanBoard.d.ts.map +1 -1
  33. package/dist/Components/KanbanBoard/KanbanBoard.js +5 -2
  34. package/dist/Components/KanbanBoard/MeasuredItem.d.ts.map +1 -1
  35. package/dist/Components/KanbanBoard/MeasuredItem.js +4 -2
  36. package/dist/Components/NavigationBar/NavigationBar.d.ts.map +1 -1
  37. package/dist/Components/NavigationBar/NavigationBar.js +3 -1
  38. package/dist/Components/OrgSwitcher/OrgSwitcher.d.ts.map +1 -1
  39. package/dist/Components/OrgSwitcher/OrgSwitcher.js +40 -3
  40. package/dist/Components/ProductCard/ProductPrice.d.ts.map +1 -1
  41. package/dist/Components/ProductCard/ProductPrice.js +13 -7
  42. package/dist/Components/ProgressBar/ProgressBar.d.ts +1 -1
  43. package/dist/Components/ProgressBar/ProgressBar.d.ts.map +1 -1
  44. package/dist/Components/ProgressBar/ProgressBar.js +2 -2
  45. package/dist/Components/ProgressBar/ProgressBarProps.d.ts +1 -1
  46. package/dist/Components/ProgressBar/ProgressBarProps.d.ts.map +1 -1
  47. package/dist/Components/ScrollToTop/ScrollToTop.d.ts.map +1 -1
  48. package/dist/Components/ScrollToTop/ScrollToTop.js +8 -3
  49. package/dist/Components/SearchSelect/SearchSelect.d.ts.map +1 -1
  50. package/dist/Components/SearchSelect/SearchSelect.js +213 -18
  51. package/dist/Components/SelectSearch/SelectSearch.d.ts.map +1 -1
  52. package/dist/Components/SelectSearch/SelectSearch.js +89 -4
  53. package/dist/Components/SelectV2/SelectV2.d.ts.map +1 -1
  54. package/dist/Components/SelectV2/SelectV2.js +116 -29
  55. package/dist/Components/SideBar/SecondaryBar.d.ts.map +1 -1
  56. package/dist/Components/SideBar/SecondaryBar.js +15 -7
  57. package/dist/Components/SideBar/SideBar.d.ts.map +1 -1
  58. package/dist/Components/SideBar/SideBar.js +36 -5
  59. package/dist/Components/SideBar/components/MenuItemBox.d.ts.map +1 -1
  60. package/dist/Components/SideBar/components/MenuItemBox.js +44 -15
  61. package/dist/Components/SideBar/components/MenuPopoverContent.d.ts.map +1 -1
  62. package/dist/Components/SideBar/components/MenuPopoverContent.js +9 -3
  63. package/dist/Components/StageProgress/StageItem.d.ts.map +1 -1
  64. package/dist/Components/StageProgress/StageItem.js +1 -1
  65. package/dist/Components/StageProgress/StepperStage.d.ts.map +1 -1
  66. package/dist/Components/StageProgress/StepperStage.js +1 -1
  67. package/dist/Components/Table/Table.d.ts.map +1 -1
  68. package/dist/Components/Table/Table.js +1 -1
  69. package/dist/Components/Table/components/HeaderActions.d.ts.map +1 -1
  70. package/dist/Components/Table/components/HeaderActions.js +3 -1
  71. package/dist/Components/Table/components/TableActions.d.ts.map +1 -1
  72. package/dist/Components/Table/components/TableActions.js +3 -3
  73. package/dist/Components/Table/components/TableBody.d.ts.map +1 -1
  74. package/dist/Components/Table/components/TableBody.js +74 -48
  75. package/dist/Components/Table/components/TableGroupRow.d.ts +1 -0
  76. package/dist/Components/Table/components/TableGroupRow.d.ts.map +1 -1
  77. package/dist/Components/Table/components/TableGroupRow.js +2 -2
  78. package/dist/Components/Table/components/TableHeader.d.ts.map +1 -1
  79. package/dist/Components/Table/components/TableHeader.js +35 -42
  80. package/dist/Components/Table/components/TableSearch.d.ts.map +1 -1
  81. package/dist/Components/Table/components/TableSearch.js +1 -1
  82. package/dist/Components/Table/filters/CompactSelect.d.ts.map +1 -1
  83. package/dist/Components/Table/filters/CompactSelect.js +33 -1
  84. package/dist/Components/Table/filters/LeftFilterPane.d.ts.map +1 -1
  85. package/dist/Components/Table/filters/LeftFilterPane.js +1 -1
  86. package/dist/Components/Table/hooks/useTable.d.ts.map +1 -1
  87. package/dist/Components/Table/hooks/useTable.js +6 -2
  88. package/dist/Components/Table/settings/ManageColumns.d.ts.map +1 -1
  89. package/dist/Components/Table/settings/ManageColumns.js +13 -4
  90. package/dist/Components/Table/settings/TableSettings.d.ts.map +1 -1
  91. package/dist/Components/Table/settings/TableSettings.js +2 -2
  92. package/dist/Components/Tag/Tag.d.ts.map +1 -1
  93. package/dist/Components/Tag/Tag.js +5 -8
  94. package/dist/Components/Timeline/Timeline.d.ts.map +1 -1
  95. package/dist/Components/Timeline/Timeline.js +202 -202
  96. package/dist/Components/Toaster/Toaster.d.ts.map +1 -1
  97. package/dist/Components/Toaster/Toaster.js +19 -11
  98. package/dist/Hooks/usePreferences.d.ts.map +1 -1
  99. package/dist/Hooks/usePreferences.js +6 -1
  100. package/dist/Layout.d.ts +3 -0
  101. package/dist/Layout.js +286 -0
  102. package/dist/Pages/TInput.d.ts +3 -0
  103. package/dist/Pages/TInput.d.ts.map +1 -0
  104. package/dist/Pages/TInput.js +20 -0
  105. package/dist/Pages/accordion.d.ts +3 -0
  106. package/dist/Pages/accordion.d.ts.map +1 -0
  107. package/dist/Pages/accordion.js +21 -0
  108. package/dist/Pages/alertdialog.d.ts +3 -0
  109. package/dist/Pages/alertdialog.d.ts.map +1 -0
  110. package/dist/Pages/alertdialog.js +53 -0
  111. package/dist/Pages/button.d.ts +3 -0
  112. package/dist/Pages/button.d.ts.map +1 -0
  113. package/dist/Pages/button.js +32 -0
  114. package/dist/Pages/card.d.ts +3 -0
  115. package/dist/Pages/card.d.ts.map +1 -0
  116. package/dist/Pages/card.js +102 -0
  117. package/dist/Pages/chart.d.ts +4 -0
  118. package/dist/Pages/chart.d.ts.map +1 -0
  119. package/dist/Pages/chart.js +25 -0
  120. package/dist/Pages/checkbox.d.ts +3 -0
  121. package/dist/Pages/checkbox.d.ts.map +1 -0
  122. package/dist/Pages/checkbox.js +11 -0
  123. package/dist/Pages/contactForm.d.ts +3 -0
  124. package/dist/Pages/contactForm.d.ts.map +1 -0
  125. package/dist/Pages/contactForm.js +15 -0
  126. package/dist/Pages/customModulesTable.d.ts +4 -0
  127. package/dist/Pages/customModulesTable.d.ts.map +1 -0
  128. package/dist/Pages/customModulesTable.js +25 -0
  129. package/dist/Pages/datePick.d.ts +3 -0
  130. package/dist/Pages/datePick.d.ts.map +1 -0
  131. package/dist/Pages/datePick.js +49 -0
  132. package/dist/Pages/drawer.d.ts +3 -0
  133. package/dist/Pages/drawer.d.ts.map +1 -0
  134. package/dist/Pages/drawer.js +53 -0
  135. package/dist/Pages/dropdown.d.ts +3 -0
  136. package/dist/Pages/dropdown.d.ts.map +1 -0
  137. package/dist/Pages/dropdown.js +21 -0
  138. package/dist/Pages/editor.d.ts +3 -0
  139. package/dist/Pages/editor.d.ts.map +1 -0
  140. package/dist/Pages/editor.js +13 -0
  141. package/dist/Pages/feedback.d.ts +2 -0
  142. package/dist/Pages/feedback.d.ts.map +1 -0
  143. package/dist/Pages/feedback.js +12 -0
  144. package/dist/Pages/fileUpload.d.ts +2 -0
  145. package/dist/Pages/fileUpload.d.ts.map +1 -0
  146. package/dist/Pages/fileUpload.js +36 -0
  147. package/dist/Pages/input.d.ts +3 -0
  148. package/dist/Pages/input.d.ts.map +1 -0
  149. package/dist/Pages/input.js +48 -0
  150. package/dist/Pages/kanbanboard.d.ts +3 -0
  151. package/dist/Pages/kanbanboard.d.ts.map +1 -0
  152. package/dist/Pages/kanbanboard.js +182 -0
  153. package/dist/Pages/modal.d.ts +3 -0
  154. package/dist/Pages/modal.d.ts.map +1 -0
  155. package/dist/Pages/modal.js +61 -0
  156. package/dist/Pages/multiSelect.d.ts +3 -0
  157. package/dist/Pages/multiSelect.d.ts.map +1 -0
  158. package/dist/Pages/multiSelect.js +22 -0
  159. package/dist/Pages/noteArea.d.ts +3 -0
  160. package/dist/Pages/noteArea.d.ts.map +1 -0
  161. package/dist/Pages/noteArea.js +26 -0
  162. package/dist/Pages/notification.d.ts +3 -0
  163. package/dist/Pages/notification.d.ts.map +1 -0
  164. package/dist/Pages/notification.js +37 -0
  165. package/dist/Pages/numberInput.d.ts +3 -0
  166. package/dist/Pages/numberInput.d.ts.map +1 -0
  167. package/dist/Pages/numberInput.js +16 -0
  168. package/dist/Pages/orgSwitcher.d.ts +4 -0
  169. package/dist/Pages/orgSwitcher.d.ts.map +1 -0
  170. package/dist/Pages/orgSwitcher.js +36 -0
  171. package/dist/Pages/organizationDetails.d.ts +4 -0
  172. package/dist/Pages/organizationDetails.d.ts.map +1 -0
  173. package/dist/Pages/organizationDetails.js +80 -0
  174. package/dist/Pages/photoViewer.d.ts +3 -0
  175. package/dist/Pages/photoViewer.d.ts.map +1 -0
  176. package/dist/Pages/photoViewer.js +12 -0
  177. package/dist/Pages/pinInputs.d.ts +3 -0
  178. package/dist/Pages/pinInputs.d.ts.map +1 -0
  179. package/dist/Pages/pinInputs.js +11 -0
  180. package/dist/Pages/productCaard.d.ts +3 -0
  181. package/dist/Pages/productCaard.d.ts.map +1 -0
  182. package/dist/Pages/productCaard.js +311 -0
  183. package/dist/Pages/productDetailCard.d.ts +3 -0
  184. package/dist/Pages/productDetailCard.d.ts.map +1 -0
  185. package/dist/Pages/productDetailCard.js +78 -0
  186. package/dist/Pages/productFilter.d.ts +3 -0
  187. package/dist/Pages/productFilter.d.ts.map +1 -0
  188. package/dist/Pages/productFilter.js +148 -0
  189. package/dist/Pages/progressbar.d.ts +3 -0
  190. package/dist/Pages/progressbar.d.ts.map +1 -0
  191. package/dist/Pages/progressbar.js +11 -0
  192. package/dist/Pages/radioButton.d.ts +3 -0
  193. package/dist/Pages/radioButton.d.ts.map +1 -0
  194. package/dist/Pages/radioButton.js +18 -0
  195. package/dist/Pages/rolesPermission.d.ts +4 -0
  196. package/dist/Pages/rolesPermission.d.ts.map +1 -0
  197. package/dist/Pages/rolesPermission.js +144 -0
  198. package/dist/Pages/search.d.ts +3 -0
  199. package/dist/Pages/search.d.ts.map +1 -0
  200. package/dist/Pages/search.js +21 -0
  201. package/dist/Pages/searchSelect.d.ts +3 -0
  202. package/dist/Pages/searchSelect.d.ts.map +1 -0
  203. package/dist/Pages/searchSelect.js +97 -0
  204. package/dist/Pages/select.d.ts +3 -0
  205. package/dist/Pages/select.d.ts.map +1 -0
  206. package/dist/Pages/select.js +20 -0
  207. package/dist/Pages/selectSearch.d.ts +3 -0
  208. package/dist/Pages/selectSearch.d.ts.map +1 -0
  209. package/dist/Pages/selectSearch.js +58 -0
  210. package/dist/Pages/signInActivityTable.d.ts +4 -0
  211. package/dist/Pages/signInActivityTable.d.ts.map +1 -0
  212. package/dist/Pages/signInActivityTable.js +17 -0
  213. package/dist/Pages/skeleton.d.ts +3 -0
  214. package/dist/Pages/skeleton.d.ts.map +1 -0
  215. package/dist/Pages/skeleton.js +12 -0
  216. package/dist/Pages/stageProgress.d.ts +4 -0
  217. package/dist/Pages/stageProgress.d.ts.map +1 -0
  218. package/dist/Pages/stageProgress.js +31 -0
  219. package/dist/Pages/switch.d.ts +3 -0
  220. package/dist/Pages/switch.d.ts.map +1 -0
  221. package/dist/Pages/switch.js +17 -0
  222. package/dist/Pages/table.d.ts +3 -0
  223. package/dist/Pages/table.d.ts.map +1 -0
  224. package/dist/Pages/table.js +182 -0
  225. package/dist/Pages/tag.d.ts +3 -0
  226. package/dist/Pages/tag.d.ts.map +1 -0
  227. package/dist/Pages/tag.js +27 -0
  228. package/dist/Pages/textArea.d.ts +3 -0
  229. package/dist/Pages/textArea.d.ts.map +1 -0
  230. package/dist/Pages/textArea.js +14 -0
  231. package/dist/Pages/tier1.d.ts +4 -0
  232. package/dist/Pages/tier1.d.ts.map +1 -0
  233. package/dist/Pages/tier1.js +86 -0
  234. package/dist/Pages/timeline.d.ts +3 -0
  235. package/dist/Pages/timeline.d.ts.map +1 -0
  236. package/dist/Pages/timeline.js +73 -0
  237. package/dist/Pages/tooltip.d.ts +3 -0
  238. package/dist/Pages/tooltip.d.ts.map +1 -0
  239. package/dist/Pages/tooltip.js +11 -0
  240. package/dist/Pages/toster.d.ts +3 -0
  241. package/dist/Pages/toster.d.ts.map +1 -0
  242. package/dist/Pages/toster.js +53 -0
  243. package/dist/Pages/upgradeButton.d.ts +4 -0
  244. package/dist/Pages/upgradeButton.d.ts.map +1 -0
  245. package/dist/Pages/upgradeButton.js +17 -0
  246. package/dist/Pages/userDetails.d.ts +4 -0
  247. package/dist/Pages/userDetails.d.ts.map +1 -0
  248. package/dist/Pages/userDetails.js +79 -0
  249. package/dist/Pages/verifyEmail.d.ts +3 -0
  250. package/dist/Pages/verifyEmail.d.ts.map +1 -0
  251. package/dist/Pages/verifyEmail.js +17 -0
  252. package/dist/Theme/index.d.ts.map +1 -1
  253. package/dist/Theme/index.js +25 -9
  254. package/dist/Theme/provider/PixelizeThemeProvider.d.ts.map +1 -1
  255. package/dist/Theme/provider/PixelizeThemeProvider.js +17 -7
  256. package/dist/Utils/rafThrottle.d.ts +15 -0
  257. package/dist/Utils/rafThrottle.d.ts.map +1 -0
  258. package/dist/Utils/rafThrottle.js +34 -0
  259. package/dist/Utils/table.d.ts.map +1 -1
  260. package/dist/Utils/table.js +16 -5
  261. package/dist/bootstrap.d.ts +2 -0
  262. package/dist/bootstrap.js +16 -0
  263. package/dist/esm/App.js +90 -0
  264. package/dist/esm/Assets/defaultLogo.js +5 -0
  265. package/dist/esm/Components/Accordion/Accordion.js +34 -0
  266. package/dist/esm/Components/Accordion/AccordionProps.js +1 -0
  267. package/dist/esm/Components/Accordion/accordionColors.js +30 -0
  268. package/dist/esm/Components/AlertDialog/AlertDialog.js +9 -0
  269. package/dist/esm/Components/AlertDialog/AlertDialogProps.js +1 -0
  270. package/dist/esm/Components/Apexcharts/ApexBarChart/ApexBarChart.js +71 -0
  271. package/dist/esm/Components/Apexcharts/ApexBarChart/ApexBarChartProps.js +1 -0
  272. package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +149 -0
  273. package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChartProps.js +1 -0
  274. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +161 -0
  275. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChartProps.js +1 -0
  276. package/dist/esm/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +79 -0
  277. package/dist/esm/Components/Apexcharts/ApexPolarCharts/ApexPolarChartsProps.js +1 -0
  278. package/dist/esm/Components/Breadcrumbs/Breadcrumbs.js +9 -0
  279. package/dist/esm/Components/Breadcrumbs/Breadcrumbs.stories.js +5 -0
  280. package/dist/esm/Components/Breadcrumbs/BreadcrumbsProps.js +1 -0
  281. package/dist/esm/Components/Button/Button.js +7 -0
  282. package/dist/esm/Components/Button/Button.stories.js +5 -0
  283. package/dist/esm/Components/Button/Button.styles.js +204 -0
  284. package/dist/esm/Components/Button/ButtonProps.js +1 -0
  285. package/dist/esm/Components/ButtonGroupIcon/ButtonGoupIconProps.js +1 -0
  286. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +98 -0
  287. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.stories.js +5 -0
  288. package/dist/esm/Components/Buttons/Buttons.js +5 -0
  289. package/dist/esm/Components/Buttons/ButtonsProps.js +1 -0
  290. package/dist/esm/Components/Card/Card.js +5 -0
  291. package/dist/esm/Components/Card/CardProps.js +1 -0
  292. package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +65 -0
  293. package/dist/esm/Components/Card/PaymentCard/PaymentCardProps.js +1 -0
  294. package/dist/esm/Components/Checkbox/Checkbox.js +28 -0
  295. package/dist/esm/Components/Checkbox/Checkbox.stories.js +6 -0
  296. package/dist/esm/Components/Checkbox/Checkbox.styles.js +69 -0
  297. package/dist/esm/Components/Checkbox/CheckboxProps.js +1 -0
  298. package/dist/esm/Components/Common/ErrorComponent.js +15 -0
  299. package/dist/esm/Components/Common/ErrorMessage.js +17 -0
  300. package/dist/esm/Components/Common/FormLabel.js +32 -0
  301. package/dist/esm/Components/Common/FormattedDescription.js +57 -0
  302. package/dist/esm/Components/Common/HelperText.js +8 -0
  303. package/dist/esm/Components/Common/Label.js +13 -0
  304. package/dist/esm/Components/Common/fieldStyles.js +34 -0
  305. package/dist/esm/Components/ContactForm/ContactForm.js +112 -0
  306. package/dist/esm/Components/ContactForm/ContactFormProps.js +1 -0
  307. package/dist/esm/Components/CopyButton/CopyButton.js +44 -0
  308. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +63 -0
  309. package/dist/esm/Components/CustomModulesTable/CustomModulesTableProps.js +1 -0
  310. package/dist/esm/Components/CustomModulesTable/DeleteModuleModal.js +11 -0
  311. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +20 -0
  312. package/dist/esm/Components/DatePicker/CalendarPanel.js +133 -0
  313. package/dist/esm/Components/DatePicker/DatePicker.js +252 -0
  314. package/dist/esm/Components/DatePicker/DatePickerProps.js +1 -0
  315. package/dist/esm/Components/DatePicker/RangeDatePicker.js +206 -0
  316. package/dist/esm/Components/DatePicker/SingleDatePicker.js +972 -0
  317. package/dist/esm/Components/DatePicker/ThemeDatePicker.js +27 -0
  318. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +78 -0
  319. package/dist/esm/Components/DatePicker/TimePicker.js +70 -0
  320. package/dist/esm/Components/DatePicker/TimePickerInput.js +412 -0
  321. package/dist/esm/Components/Divider/Divider.js +9 -0
  322. package/dist/esm/Components/Drawer/Drawer.js +24 -0
  323. package/dist/esm/Components/Drawer/DrawerProps.js +1 -0
  324. package/dist/esm/Components/Dropdown/DropDown.js +249 -0
  325. package/dist/esm/Components/Dropdown/DropdownProps.js +1 -0
  326. package/dist/esm/Components/Editor/Editor.js +38 -0
  327. package/dist/esm/Components/Editor/EditorProps.js +1 -0
  328. package/dist/esm/Components/Editor/joditThemeVars.js +75 -0
  329. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +15 -0
  330. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.js +1 -0
  331. package/dist/esm/Components/EmptyState/EmptyState.js +40 -0
  332. package/dist/esm/Components/EmptyState/EmptyStateProps.js +1 -0
  333. package/dist/esm/Components/FeedbackForm/FeedbackForm.js +65 -0
  334. package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +33 -0
  335. package/dist/esm/Components/FilePreview/FilePreview.js +79 -0
  336. package/dist/esm/Components/FilePreview/FilePreviewProps.js +1 -0
  337. package/dist/esm/Components/FileUpload/FileUpload.js +82 -0
  338. package/dist/esm/Components/FileUpload/FileUploadProps.js +1 -0
  339. package/dist/esm/Components/FileUpload/constants.js +24 -0
  340. package/dist/esm/Components/FileUploader/FileUploader.js +78 -0
  341. package/dist/esm/Components/FileUploader/FileUploaderProps.js +1 -0
  342. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +258 -0
  343. package/dist/esm/Components/FilterSidebar/filterHoverStyle.js +10 -0
  344. package/dist/esm/Components/Form/FormWrapper.js +9 -0
  345. package/dist/esm/Components/Header/Header.js +55 -0
  346. package/dist/esm/Components/Header/HeaderActions.js +24 -0
  347. package/dist/esm/Components/Header/HeaderProps.js +1 -0
  348. package/dist/esm/Components/Header/components/desktopMenu.js +43 -0
  349. package/dist/esm/Components/Header/components/mobileMenu.js +37 -0
  350. package/dist/esm/Components/Input/Input/Input.js +40 -0
  351. package/dist/esm/Components/Input/Input/InputProps.js +1 -0
  352. package/dist/esm/Components/Input/PhoneNumberInput.js +62 -0
  353. package/dist/esm/Components/Input/PhoneNumberInputProps.js +1 -0
  354. package/dist/esm/Components/Input/Switch/InputSwitch.js +21 -0
  355. package/dist/esm/Components/Input/TextInput.js +16 -0
  356. package/dist/esm/Components/Input/TextInput.stories.js +7 -0
  357. package/dist/esm/Components/Input/TextInput.styles.js +101 -0
  358. package/dist/esm/Components/Input/TextInputProps.js +1 -0
  359. package/dist/esm/Components/Input/textInputIconSize.js +36 -0
  360. package/dist/esm/Components/InputTextArea/InputTextArea.js +8 -0
  361. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +77 -0
  362. package/dist/esm/Components/InputTextArea/InputTextAreaProps.js +1 -0
  363. package/dist/esm/Components/KanbanBoard/AccountCard.js +22 -0
  364. package/dist/esm/Components/KanbanBoard/AccountRow.js +10 -0
  365. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +13 -0
  366. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +453 -0
  367. package/dist/esm/Components/KanbanBoard/KanbanBoardProps.js +1 -0
  368. package/dist/esm/Components/KanbanBoard/MeasuredItem.js +54 -0
  369. package/dist/esm/Components/LazyWrapper/LazyWrapper.js +10 -0
  370. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +40 -0
  371. package/dist/esm/Components/LimitReachedModal/LimitReachedModalProps.js +1 -0
  372. package/dist/esm/Components/LimitReachedModal/limitReachedCopy.js +50 -0
  373. package/dist/esm/Components/Loading/Loading.js +24 -0
  374. package/dist/esm/Components/Loading/Loading.stories.js +6 -0
  375. package/dist/esm/Components/Loading/LoadingProps.js +1 -0
  376. package/dist/esm/Components/Modal/Modal.js +30 -0
  377. package/dist/esm/Components/Modal/Modal.stories.js +6 -0
  378. package/dist/esm/Components/Modal/ModalProps.js +1 -0
  379. package/dist/esm/Components/MoreItems/MoreItems.js +22 -0
  380. package/dist/esm/Components/MoreItems/MoreItemsProps.js +1 -0
  381. package/dist/esm/Components/MultiSelect/MultiSelect.js +70 -0
  382. package/dist/esm/Components/MultiSelect/MultiSelectProps.js +1 -0
  383. package/dist/esm/Components/NavigationBar/NavBar.stories.js +2 -0
  384. package/dist/esm/Components/NavigationBar/NavigationBar.js +57 -0
  385. package/dist/esm/Components/NavigationBar/NavigationBarProps.js +1 -0
  386. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +142 -0
  387. package/dist/esm/Components/NoteTextArea/NoteTextAreaProps.js +1 -0
  388. package/dist/esm/Components/Notification/Notification.js +106 -0
  389. package/dist/esm/Components/Notification/NotificationProps.js +1 -0
  390. package/dist/esm/Components/NumberInput/NumberInput.js +6 -0
  391. package/dist/esm/Components/NumberInput/NumberInput.styles.js +85 -0
  392. package/dist/esm/Components/NumberInput/NumberInputProps.js +1 -0
  393. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +116 -0
  394. package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +34 -0
  395. package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +57 -0
  396. package/dist/esm/Components/OrganizationDetails/DeleteOrgModal.js +11 -0
  397. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +165 -0
  398. package/dist/esm/Components/OrganizationDetails/OrganizationDetailsProps.js +1 -0
  399. package/dist/esm/Components/PdfViewer/PdfViewer.js +10 -0
  400. package/dist/esm/Components/PinInput/PinInput.js +15 -0
  401. package/dist/esm/Components/PinInput/PinInput.stories.js +5 -0
  402. package/dist/esm/Components/PinInput/PinInputProps.js +1 -0
  403. package/dist/esm/Components/PinInputs/PinInputs.js +48 -0
  404. package/dist/esm/Components/PinInputs/PinInputsProps.js +1 -0
  405. package/dist/esm/Components/PlanBadge/PlanBadge.js +17 -0
  406. package/dist/esm/Components/PlanBadge/PlanBadgeProps.js +1 -0
  407. package/dist/esm/Components/PlanPill/PlanPill.js +40 -0
  408. package/dist/esm/Components/PlanPill/PlanPillProps.js +1 -0
  409. package/dist/esm/Components/PlanPill/planPillGradient.js +17 -0
  410. package/dist/esm/Components/ProductCard/ProductCard.js +62 -0
  411. package/dist/esm/Components/ProductCard/ProductCardProps.js +1 -0
  412. package/dist/esm/Components/ProductCard/ProductLabel.js +18 -0
  413. package/dist/esm/Components/ProductCard/ProductPrice.js +110 -0
  414. package/dist/esm/Components/ProductCard/ProductReview.js +19 -0
  415. package/dist/esm/Components/ProductCard/ProductTags.js +48 -0
  416. package/dist/esm/Components/ProductDetails/ProductDetails.js +40 -0
  417. package/dist/esm/Components/ProductDetails/ProductDetailsProps.js +1 -0
  418. package/dist/esm/Components/ProductDetails/ProductDtlPrice.js +22 -0
  419. package/dist/esm/Components/ProductDetails/ProductImageSlider.js +188 -0
  420. package/dist/esm/Components/ProfileCard/ProfileCard.js +34 -0
  421. package/dist/esm/Components/ProfileCard/ProfileCard.stories.js +5 -0
  422. package/dist/esm/Components/ProfileCard/ProfileCardProps.js +1 -0
  423. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +70 -0
  424. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.js +5 -0
  425. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.js +1 -0
  426. package/dist/esm/Components/ProgressBar/ProgressBar.js +6 -0
  427. package/dist/esm/Components/ProgressBar/ProgressBar.stories.js +6 -0
  428. package/dist/esm/Components/ProgressBar/ProgressBarProps.js +1 -0
  429. package/dist/esm/Components/RadioButton/RadioButton.js +25 -0
  430. package/dist/esm/Components/RadioButton/RadioButton.stories.js +6 -0
  431. package/dist/esm/Components/RadioButton/RadioButtonProps.js +1 -0
  432. package/dist/esm/Components/Reorder/Reorder.js +22 -0
  433. package/dist/esm/Components/Reorder/ReorderProps.js +1 -0
  434. package/dist/esm/Components/RolesPermission/DeleteRoleModal.js +13 -0
  435. package/dist/esm/Components/RolesPermission/RolesPermission.js +121 -0
  436. package/dist/esm/Components/RolesPermission/RolesPermissionProps.js +1 -0
  437. package/dist/esm/Components/ScrollToTop/ScrollToTop.js +67 -0
  438. package/dist/esm/Components/Search/Search.js +29 -0
  439. package/dist/esm/Components/Search/SearchProps.js +1 -0
  440. package/dist/esm/Components/SearchSelect/SearchSelect.js +518 -0
  441. package/dist/esm/Components/SearchSelect/SearchSelectProps.js +1 -0
  442. package/dist/esm/Components/SearchSelect/SelectTruncatedLabel.js +17 -0
  443. package/dist/esm/Components/SearchSelect/searchSelectSize.js +93 -0
  444. package/dist/esm/Components/Select/Select.js +24 -0
  445. package/dist/esm/Components/Select/Select.stories.js +7 -0
  446. package/dist/esm/Components/Select/Select.styles.js +108 -0
  447. package/dist/esm/Components/Select/SelectProps.js +1 -0
  448. package/dist/esm/Components/SelectSearch/SelectSearch.js +270 -0
  449. package/dist/esm/Components/SelectSearch/SelectSearchProps.js +1 -0
  450. package/dist/esm/Components/SelectV2/SelectV2.js +233 -0
  451. package/dist/esm/Components/SelectV2/SelectV2Props.js +1 -0
  452. package/dist/esm/Components/SideBar/SecondaryBar.js +67 -0
  453. package/dist/esm/Components/SideBar/SideBar.js +237 -0
  454. package/dist/esm/Components/SideBar/SideBarProps.js +1 -0
  455. package/dist/esm/Components/SideBar/Sidebar.stories.js +6 -0
  456. package/dist/esm/Components/SideBar/components/MenuItemBox.js +132 -0
  457. package/dist/esm/Components/SideBar/components/MenuItems.js +114 -0
  458. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +54 -0
  459. package/dist/esm/Components/SideBar/components/OtherApps.js +20 -0
  460. package/dist/esm/Components/SideBar/components/OverflowTooltipText.js +29 -0
  461. package/dist/esm/Components/SideBar/components/TextTruncation.js +27 -0
  462. package/dist/esm/Components/SideBar/sidebarAccentColors.js +31 -0
  463. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +34 -0
  464. package/dist/esm/Components/SignInActivityTable/SignInActivityTableProps.js +1 -0
  465. package/dist/esm/Components/Skeletons/Skeleton.stories.js +6 -0
  466. package/dist/esm/Components/Skeletons/SkeletonProps.js +1 -0
  467. package/dist/esm/Components/Skeletons/Skeletons.js +5 -0
  468. package/dist/esm/Components/Slider/Slider.js +41 -0
  469. package/dist/esm/Components/StageProgress/StageItem.js +85 -0
  470. package/dist/esm/Components/StageProgress/StageProgress.js +47 -0
  471. package/dist/esm/Components/StageProgress/StageProgressProps.js +29 -0
  472. package/dist/esm/Components/StageProgress/StepperStage.js +38 -0
  473. package/dist/esm/Components/Switch/Switch.js +11 -0
  474. package/dist/esm/Components/Switch/SwitchProps.js +1 -0
  475. package/dist/esm/Components/Table/Table.js +430 -0
  476. package/dist/esm/Components/Table/Table.stories.js +8 -0
  477. package/dist/esm/Components/Table/TableProps.js +1 -0
  478. package/dist/esm/Components/Table/components/HeaderActions.js +47 -0
  479. package/dist/esm/Components/Table/components/Pagination.js +19 -0
  480. package/dist/esm/Components/Table/components/TableActions.js +55 -0
  481. package/dist/esm/Components/Table/components/TableBody.js +337 -0
  482. package/dist/esm/Components/Table/components/TableGroupRow.js +11 -0
  483. package/dist/esm/Components/Table/components/TableHeader.js +100 -0
  484. package/dist/esm/Components/Table/components/TableLoading.js +11 -0
  485. package/dist/esm/Components/Table/components/TableSearch.js +31 -0
  486. package/dist/esm/Components/Table/components/tableRowHoverStyle.js +22 -0
  487. package/dist/esm/Components/Table/filterTypes.js +1 -0
  488. package/dist/esm/Components/Table/filters/ActiveFilters.js +63 -0
  489. package/dist/esm/Components/Table/filters/CompactSelect.js +55 -0
  490. package/dist/esm/Components/Table/filters/LeftFilterPane.js +174 -0
  491. package/dist/esm/Components/Table/filters/SelectOperationControls.js +5 -0
  492. package/dist/esm/Components/Table/filters/TableFilters.js +45 -0
  493. package/dist/esm/Components/Table/filters/TextOperationControls.js +16 -0
  494. package/dist/esm/Components/Table/hooks/useDebounce.js +22 -0
  495. package/dist/esm/Components/Table/hooks/useTable.js +227 -0
  496. package/dist/esm/Components/Table/settings/ManageColumns.js +105 -0
  497. package/dist/esm/Components/Table/settings/TableSettings.js +82 -0
  498. package/dist/esm/Components/Tag/Tag.js +18 -0
  499. package/dist/esm/Components/Tag/Tag.styles.js +91 -0
  500. package/dist/esm/Components/Tag/TagProps.js +1 -0
  501. package/dist/esm/Components/Timeline/Timeline.js +250 -0
  502. package/dist/esm/Components/Timeline/TimelineProps.js +1 -0
  503. package/dist/esm/Components/Toaster/Toaster.js +120 -0
  504. package/dist/esm/Components/Toaster/Toaster.stories.js +7 -0
  505. package/dist/esm/Components/Toaster/ToasterProps.js +1 -0
  506. package/dist/esm/Components/Toggle/TableToggle.js +39 -0
  507. package/dist/esm/Components/Toggle/TableToggleProps.js +1 -0
  508. package/dist/esm/Components/ToolTip/OverflowToolTip.js +20 -0
  509. package/dist/esm/Components/ToolTip/ToolTip.js +35 -0
  510. package/dist/esm/Components/ToolTip/ToolTip.stories.js +6 -0
  511. package/dist/esm/Components/ToolTip/ToolTipProps.js +1 -0
  512. package/dist/esm/Components/Trail/EditableCell.js +27 -0
  513. package/dist/esm/Components/Trail/SelectAllCheckbox.js +5 -0
  514. package/dist/esm/Components/Trail/TrailWorks.js +54 -0
  515. package/dist/esm/Components/Trail/data.js +26 -0
  516. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +79 -0
  517. package/dist/esm/Components/UpgradeButton/UpgradeButtonProps.js +1 -0
  518. package/dist/esm/Components/UserDetails/AddUserModal.js +101 -0
  519. package/dist/esm/Components/UserDetails/ChangeRoleModal.js +56 -0
  520. package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +14 -0
  521. package/dist/esm/Components/UserDetails/UserDetails.js +109 -0
  522. package/dist/esm/Components/UserDetails/UserDetailsProps.js +1 -0
  523. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +83 -0
  524. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +61 -0
  525. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindowProps.js +1 -0
  526. package/dist/esm/Constants/Sidebar.js +39 -0
  527. package/dist/esm/Hooks/useIsTruncated.js +54 -0
  528. package/dist/esm/Hooks/usePreferences.js +74 -0
  529. package/dist/esm/Hooks/useSidebarPrefs.js +68 -0
  530. package/dist/esm/Layout.js +281 -0
  531. package/dist/esm/Pages/TInput.js +15 -0
  532. package/dist/esm/Pages/accordion.js +16 -0
  533. package/dist/esm/Pages/alertdialog.js +15 -0
  534. package/dist/esm/Pages/button.js +27 -0
  535. package/dist/esm/Pages/card.js +64 -0
  536. package/dist/esm/Pages/chart.js +20 -0
  537. package/dist/esm/Pages/checkbox.js +6 -0
  538. package/dist/esm/Pages/contactForm.js +10 -0
  539. package/dist/esm/Pages/customModulesTable.js +20 -0
  540. package/dist/esm/Pages/datePick.js +44 -0
  541. package/dist/esm/Pages/drawer.js +15 -0
  542. package/dist/esm/Pages/dropdown.js +16 -0
  543. package/dist/esm/Pages/editor.js +8 -0
  544. package/dist/esm/Pages/feedback.js +6 -0
  545. package/dist/esm/Pages/fileUpload.js +29 -0
  546. package/dist/esm/Pages/input.js +43 -0
  547. package/dist/esm/Pages/kanbanboard.js +177 -0
  548. package/dist/esm/Pages/modal.js +23 -0
  549. package/dist/esm/Pages/multiSelect.js +17 -0
  550. package/dist/esm/Pages/noteArea.js +21 -0
  551. package/dist/esm/Pages/notification.js +32 -0
  552. package/dist/esm/Pages/numberInput.js +11 -0
  553. package/dist/esm/Pages/orgSwitcher.js +31 -0
  554. package/dist/esm/Pages/organizationDetails.js +75 -0
  555. package/dist/esm/Pages/photoViewer.js +7 -0
  556. package/dist/esm/Pages/pinInputs.js +6 -0
  557. package/dist/esm/Pages/productCaard.js +306 -0
  558. package/dist/esm/Pages/productDetailCard.js +73 -0
  559. package/dist/esm/Pages/productFilter.js +143 -0
  560. package/dist/esm/Pages/progressbar.js +6 -0
  561. package/dist/esm/Pages/radioButton.js +16 -0
  562. package/dist/esm/Pages/rolesPermission.js +139 -0
  563. package/dist/esm/Pages/search.js +16 -0
  564. package/dist/esm/Pages/searchSelect.js +92 -0
  565. package/dist/esm/Pages/select.js +15 -0
  566. package/dist/esm/Pages/selectSearch.js +53 -0
  567. package/dist/esm/Pages/signInActivityTable.js +12 -0
  568. package/dist/esm/Pages/skeleton.js +7 -0
  569. package/dist/esm/Pages/stageProgress.js +26 -0
  570. package/dist/esm/Pages/switch.js +12 -0
  571. package/dist/esm/Pages/table.js +175 -0
  572. package/dist/esm/Pages/tag.js +22 -0
  573. package/dist/esm/Pages/textArea.js +9 -0
  574. package/dist/esm/Pages/tier1.js +48 -0
  575. package/dist/esm/Pages/timeline.js +68 -0
  576. package/dist/esm/Pages/tooltip.js +6 -0
  577. package/dist/esm/Pages/toster.js +48 -0
  578. package/dist/esm/Pages/upgradeButton.js +12 -0
  579. package/dist/esm/Pages/userDetails.js +74 -0
  580. package/dist/esm/Pages/verifyEmail.js +12 -0
  581. package/dist/esm/Theme/chakra/Avatar.styles.js +25 -0
  582. package/dist/esm/Theme/chakra/Drawer.styles.js +23 -0
  583. package/dist/esm/Theme/chakra/Menu.styles.js +47 -0
  584. package/dist/esm/Theme/chakra/Modal.styles.js +23 -0
  585. package/dist/esm/Theme/chakra/Popover.styles.js +27 -0
  586. package/dist/esm/Theme/chakra/Slider.styles.js +22 -0
  587. package/dist/esm/Theme/chakra/Switch.styles.js +21 -0
  588. package/dist/esm/Theme/chakra/Tabs.styles.js +38 -0
  589. package/dist/esm/Theme/chakra/common.web.js +22 -0
  590. package/dist/esm/Theme/chakra/componentStyles.js +221 -0
  591. package/dist/esm/Theme/chakra/createBrandTheme.js +118 -0
  592. package/dist/esm/Theme/chakra/fonts.web.js +10 -0
  593. package/dist/esm/Theme/index.js +63 -0
  594. package/dist/esm/Theme/provider/PixelizeThemeProvider.js +204 -0
  595. package/dist/esm/Theme/provider/ThemeSwitcher.js +107 -0
  596. package/dist/esm/Theme/provider/colorModeStorage.js +99 -0
  597. package/dist/esm/Theme/provider/index.js +3 -0
  598. package/dist/esm/Theme/provider/useThemeMode.js +9 -0
  599. package/dist/esm/Theme/themeProps.js +1 -0
  600. package/dist/esm/Theme/tokens/brands/emerald/palette.dark.js +8 -0
  601. package/dist/esm/Theme/tokens/brands/emerald/palette.light.js +130 -0
  602. package/dist/esm/Theme/tokens/brands/index.js +73 -0
  603. package/dist/esm/Theme/tokens/brands/lavender/palette.dark.js +8 -0
  604. package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +321 -0
  605. package/dist/esm/Theme/tokens/brands/meadow/palette.dark.js +8 -0
  606. package/dist/esm/Theme/tokens/brands/meadow/palette.light.js +128 -0
  607. package/dist/esm/Theme/tokens/brands/radiant/palette.dark.js +8 -0
  608. package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +130 -0
  609. package/dist/esm/Theme/tokens/brands/rosewood/palette.dark.js +8 -0
  610. package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +134 -0
  611. package/dist/esm/Theme/tokens/brands/skyline/palette.dark.js +8 -0
  612. package/dist/esm/Theme/tokens/brands/skyline/palette.light.js +128 -0
  613. package/dist/esm/Theme/tokens/brands/slate/palette.dark.js +8 -0
  614. package/dist/esm/Theme/tokens/brands/slate/palette.light.js +132 -0
  615. package/dist/esm/Theme/tokens/brands/storefront/palette.dark.js +8 -0
  616. package/dist/esm/Theme/tokens/brands/storefront/palette.light.js +122 -0
  617. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +202 -0
  618. package/dist/esm/Theme/tokens/brands/zinc/palette.light.js +381 -0
  619. package/dist/esm/Theme/tokens/builders/accentText.js +83 -0
  620. package/dist/esm/Theme/tokens/builders/buildBrandTokens.js +28 -0
  621. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +289 -0
  622. package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +21 -0
  623. package/dist/esm/Theme/tokens/builders/color.js +141 -0
  624. package/dist/esm/Theme/tokens/builders/index.js +5 -0
  625. package/dist/esm/Theme/tokens/builders/outlineRung.js +63 -0
  626. package/dist/esm/Theme/tokens/builders/statusTone.js +56 -0
  627. package/dist/esm/Theme/tokens/index.js +14 -0
  628. package/dist/esm/Theme/tokens/primitives/breakpoints.js +8 -0
  629. package/dist/esm/Theme/tokens/primitives/index.js +9 -0
  630. package/dist/esm/Theme/tokens/primitives/letterSpacings.js +9 -0
  631. package/dist/esm/Theme/tokens/primitives/lineHeights.js +18 -0
  632. package/dist/esm/Theme/tokens/primitives/radii.js +12 -0
  633. package/dist/esm/Theme/tokens/primitives/shadows.js +15 -0
  634. package/dist/esm/Theme/tokens/primitives/sizes.js +34 -0
  635. package/dist/esm/Theme/tokens/primitives/space.js +33 -0
  636. package/dist/esm/Theme/tokens/primitives/typography.js +40 -0
  637. package/dist/esm/Theme/tokens/primitives/zIndices.js +16 -0
  638. package/dist/esm/Theme/tokens/types.js +7 -0
  639. package/dist/esm/Theme/useCustomTheme.js +4 -0
  640. package/dist/esm/Utils/accountHandoff.js +139 -0
  641. package/dist/esm/Utils/functions.js +7 -0
  642. package/dist/esm/Utils/mergeRefs.js +16 -0
  643. package/dist/esm/Utils/planBadge.js +105 -0
  644. package/dist/esm/Utils/planExpiry.js +109 -0
  645. package/dist/esm/Utils/rafThrottle.js +30 -0
  646. package/dist/esm/Utils/table.js +321 -0
  647. package/dist/esm/bootstrap.js +11 -0
  648. package/dist/esm/index.js +133 -0
  649. package/dist/esm/services/feedback.js +15 -0
  650. package/dist/esm/withTheme.js +9 -0
  651. package/package.json +13 -6
@@ -0,0 +1,47 @@
1
+ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Box } from "@chakra-ui/react";
3
+ import { SquarePen, Trash2 } from "lucide-react";
4
+ import React from "react";
5
+ import { useCustomTheme } from "../../../Theme/useCustomTheme";
6
+ import { accentTextOnCanvas } from "../../../Theme/tokens/builders/accentText";
7
+ import VeritcalDivider from "../../Divider/Divider";
8
+ const ListItem = ({ icon, name, onClick, selections, isHoverEnabled = false, hoverColor, customComponent, }) => {
9
+ var _a, _b, _c;
10
+ const { colors } = useCustomTheme();
11
+ const styledIcon = icon ? React.cloneElement(icon, {
12
+ color: "currentColor",
13
+ size: "1.25rem",
14
+ }) : null;
15
+ // A `customComponent` may itself be focusable, and a button must never wrap one.
16
+ const isButton = !!onClick && !customComponent;
17
+ return (_jsxs(Box, { as: isButton ? "button" : undefined, type: isButton ? "button" : undefined, bg: "transparent", textAlign: "left", fontSize: "inherit", fontWeight: "inherit", fontFamily: "inherit", display: "flex", alignItems: "center", gap: "0.375rem", cursor: "pointer", onClick: () => onClick && onClick(selections), color: (_a = colors === null || colors === void 0 ? void 0 : colors.text) === null || _a === void 0 ? void 0 : _a[500], px: 2, py: 1, borderRadius: "md", _hover: isHoverEnabled
18
+ ? {
19
+ color: hoverColor ? hoverColor : (_b = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _b === void 0 ? void 0 : _b[500],
20
+ bg: ((_c = colors === null || colors === void 0 ? void 0 : colors.background) === null || _c === void 0 ? void 0 : _c[100]) || "gray.50",
21
+ }
22
+ : {}, transition: "all 0.2s ease", children: [customComponent, styledIcon, " ", name] }));
23
+ };
24
+ const HeaderActions = ({ actions, selections, }) => {
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
26
+ const { colors } = useCustomTheme();
27
+ const hasSelections = selections.length > 0;
28
+ return (_jsxs(Box, { display: "flex", gap: 2, fontSize: "0.875rem", fontWeight: 400, color: accentTextOnCanvas(colors === null || colors === void 0 ? void 0 : colors.secondary, (_a = colors === null || colors === void 0 ? void 0 : colors.backgroundColor) === null || _a === void 0 ? void 0 : _a.main), alignItems: "center", children: [(_b = actions === null || actions === void 0 ? void 0 : actions.items) === null || _b === void 0 ? void 0 : _b.map((item, index) => {
29
+ if ("type" in item)
30
+ return null;
31
+ const actionItem = item;
32
+ if (actionItem.isStatic) {
33
+ return (_jsx(ListItem, { ...actionItem, selections: selections }, `static-${index}`));
34
+ }
35
+ return null;
36
+ }), hasSelections && (_jsxs(_Fragment, { children: [((_c = actions === null || actions === void 0 ? void 0 : actions.isDelete) === null || _c === void 0 ? void 0 : _c.enabled) && (_jsx(ListItem, { icon: _jsx(Trash2, { className: "w-4 h-4" }), name: "Delete", onClick: (_d = actions === null || actions === void 0 ? void 0 : actions.isDelete) === null || _d === void 0 ? void 0 : _d.onClick, selections: selections, isHoverEnabled: true, hoverColor: (_e = colors === null || colors === void 0 ? void 0 : colors.red) === null || _e === void 0 ? void 0 : _e[500] })), ((_f = actions === null || actions === void 0 ? void 0 : actions.isUpdate) === null || _f === void 0 ? void 0 : _f.enabled) && (_jsx(ListItem, { icon: _jsx(SquarePen, { className: "w-4 h-4" }), name: "Mass Update", onClick: (_g = actions === null || actions === void 0 ? void 0 : actions.isUpdate) === null || _g === void 0 ? void 0 : _g.onClick, selections: selections, isHoverEnabled: true, hoverColor: (_h = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _h === void 0 ? void 0 : _h[500] })), (_j = actions === null || actions === void 0 ? void 0 : actions.items) === null || _j === void 0 ? void 0 : _j.map((item, index) => {
37
+ if ("type" in item && item.type === "divider") {
38
+ return _jsx(VeritcalDivider, {}, index);
39
+ }
40
+ const actionItem = item;
41
+ if (!actionItem.isStatic) {
42
+ return (_jsx(ListItem, { ...actionItem, selections: selections }, `dynamic-${index}`));
43
+ }
44
+ return null;
45
+ })] }))] }));
46
+ };
47
+ export default HeaderActions;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useMemo } from "react";
3
+ import { Flex, IconButton, Select, Text } from "@chakra-ui/react";
4
+ import { pageSizeCalculation } from "../../../Utils/table";
5
+ import { useCustomTheme } from "../../../Theme/useCustomTheme";
6
+ import ToolTip from "../../ToolTip/ToolTip";
7
+ import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, } from "lucide-react";
8
+ const Pagination = React.memo(({ paginationText, handlePageSizeChange, rowsPerPage, currentPage, pages, setCurrentPage, dataLength, isServerPagination, paginationSelectOptions, }) => {
9
+ const computedOptions = useMemo(() => paginationSelectOptions && paginationSelectOptions.length
10
+ ? paginationSelectOptions
11
+ : pageSizeCalculation(dataLength), [paginationSelectOptions, dataLength]);
12
+ const theme = useCustomTheme();
13
+ // const isLeftDisabled = currentPage === 0;
14
+ // const isRightDisabled = currentPage >= pages - 1;
15
+ const isLeftDisabled = dataLength === 0 || currentPage === 0;
16
+ const isRightDisabled = dataLength === 0 || currentPage >= pages - 1;
17
+ return (_jsxs(Flex, { justify: "flex-end", align: "center", flexWrap: "nowrap", children: [(!isServerPagination || paginationSelectOptions) && (_jsxs(Select, { onChange: handlePageSizeChange, value: rowsPerPage, size: "xs", borderRadius: 3, width: "auto", minW: "4.5rem", isDisabled: dataLength === 0, children: [!paginationSelectOptions && dataLength < 100 ? _jsx("option", { value: 0 }) : null, computedOptions.map((size, index) => (_jsx("option", { value: String(size), children: String(size) }, index)))] })), dataLength > 0 && (_jsxs(Flex, { w: "100%", children: [_jsx(ToolTip, { label: "First", placement: "top", children: _jsx(IconButton, { "aria-label": "first-page", color: isLeftDisabled ? theme.colors.gray[400] : theme.colors.text[500], rounded: "full", variant: isLeftDisabled ? "plain" : "ghost", onClick: () => setCurrentPage(0), _hover: !isLeftDisabled ? { color: theme.colors.primary[500] } : {}, children: _jsx(ChevronsLeft, {}) }) }), _jsx(ToolTip, { label: "Previous", placement: "top", children: _jsx(IconButton, { "aria-label": "previous-page", color: isLeftDisabled ? theme.colors.gray[400] : theme.colors.text[500], rounded: "full", variant: isLeftDisabled ? "plain" : "ghost", onClick: () => currentPage > 0 && setCurrentPage(currentPage - 1), _hover: !isLeftDisabled ? { color: theme.colors.primary[500] } : {}, children: _jsx(ChevronLeft, {}) }) }), _jsx(Text, { mt: 3, fontSize: 12, whiteSpace: "nowrap", color: theme.colors.text[500], children: paginationText }), _jsx(ToolTip, { label: "Next", placement: "top", children: _jsx(IconButton, { "aria-label": "next-page", color: isRightDisabled ? theme.colors.gray[400] : theme.colors.text[500], rounded: "full", variant: isRightDisabled ? "plain" : "ghost", onClick: () => currentPage < pages - 1 && setCurrentPage(currentPage + 1), _hover: !isRightDisabled ? { color: theme.colors.primary[500] } : {}, children: _jsx(ChevronRight, {}) }) }), _jsx(ToolTip, { label: "Last", placement: "top", children: _jsx(IconButton, { "aria-label": "last-page", color: isRightDisabled ? theme.colors.gray[400] : theme.colors.text[500], rounded: "full", variant: isRightDisabled ? "plain" : "ghost", onClick: () => setCurrentPage(pages - 1), _hover: !isRightDisabled ? { color: theme.colors.primary[500] } : {}, children: _jsx(ChevronsRight, {}) }) })] }))] }));
18
+ });
19
+ export default Pagination;
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useEffect, useRef, useState } from "react";
3
+ import { Button, IconButton, Popover, PopoverBody, PopoverContent, PopoverTrigger, Portal, VStack, } from "@chakra-ui/react";
4
+ import { EllipsisVertical, ExternalLink, Pencil, Trash2 } from "lucide-react";
5
+ import { useCustomTheme } from "../../../Theme/useCustomTheme";
6
+ const TableActions = React.memo(({ row }) => {
7
+ var _a, _b, _c;
8
+ const [isOpen, setIsOpen] = useState(false);
9
+ const ref = useRef(null);
10
+ const theme = useCustomTheme();
11
+ // Listen for "close-all-popovers"
12
+ useEffect(() => {
13
+ const handler = () => setIsOpen(false);
14
+ window.addEventListener("close-all-popovers", handler);
15
+ return () => window.removeEventListener("close-all-popovers", handler);
16
+ }, []);
17
+ // Detect outside click
18
+ useEffect(() => {
19
+ const handleClickOutside = (event) => {
20
+ if (ref.current && !ref.current.contains(event.target)) {
21
+ setIsOpen(false);
22
+ }
23
+ };
24
+ if (isOpen) {
25
+ // ✅ Use click instead of mousedown
26
+ document.addEventListener("click", handleClickOutside);
27
+ }
28
+ return () => {
29
+ document.removeEventListener("click", handleClickOutside);
30
+ };
31
+ }, [isOpen]);
32
+ const handleOpen = () => {
33
+ window.dispatchEvent(new Event("close-all-popovers")); // close others
34
+ setIsOpen(true);
35
+ };
36
+ const handleClose = () => setIsOpen(false);
37
+ // ✅ if row itself is missing, render nothing
38
+ if (!row)
39
+ return null;
40
+ return (_jsx(Popover, { placement: "bottom-start", isOpen: isOpen, onClose: handleClose, closeOnBlur: false, children: _jsxs("div", { ref: ref, children: [_jsx(PopoverTrigger, { children: _jsx(IconButton, { "aria-label": "Actions", color: theme.colors.text[900], icon: _jsx(EllipsisVertical, { size: 17 }), size: "sm", p: 0, variant: "ghost", _hover: { transform: "scale(1.2)" }, onClick: () => (isOpen ? handleClose() : handleOpen()) }) }), isOpen && (_jsx(Portal, { children: _jsx(PopoverContent, { w: "auto", minW: "100px", boxShadow: "lg", p: 0, zIndex: 999, children: _jsx(PopoverBody, { p: 0, m: 0, children: _jsxs(VStack, { align: "stretch", spacing: 1, p: 0, m: 0, children: [row.onLink && (_jsxs(Button, { size: "sm", variant: "ghost", justifyContent: "flex-start", borderBottom: `1px solid ${(_a = theme.colors) === null || _a === void 0 ? void 0 : _a.border[500]}`, borderRadius: 0, gap: 2, onClick: () => {
41
+ var _a;
42
+ (_a = row.onLink) === null || _a === void 0 ? void 0 : _a.call(row, row);
43
+ handleClose();
44
+ }, children: [_jsx(ExternalLink, { size: 17 }), " View"] })), row.onEdit && (_jsxs(Button, { size: "sm", variant: "ghost", justifyContent: "flex-start", gap: 2, borderBottom: `1px solid ${(_b = theme.colors) === null || _b === void 0 ? void 0 : _b.border[500]}`, borderRadius: 0, onClick: () => {
45
+ var _a;
46
+ (_a = row.onEdit) === null || _a === void 0 ? void 0 : _a.call(row, row);
47
+ handleClose();
48
+ }, children: [_jsx(Pencil, { size: 17 }), " Edit"] })), row.actions && ((_c = row === null || row === void 0 ? void 0 : row.actions) === null || _c === void 0 ? void 0 : _c.call(row)), row.onDelete && (_jsxs(Button, { size: "sm", variant: "ghost", justifyContent: "flex-start", colorScheme: "red", gap: 2, borderRadius: 0, onClick: () => {
49
+ var _a;
50
+ (_a = row.onDelete) === null || _a === void 0 ? void 0 : _a.call(row, row);
51
+ handleClose();
52
+ }, children: [_jsx(Trash2, { size: 17 }), " Delete"] })), !row.onLink && !row.onEdit && !row.onDelete && !row.actions && (_jsx(Button, { size: "sm", variant: "ghost", isDisabled: true, justifyContent: "center", children: "No actions" }))] }) }) }) }))] }) }));
53
+ });
54
+ TableActions.displayName = "TableActions";
55
+ export default TableActions;
@@ -0,0 +1,337 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Box, IconButton, Spinner, Td, Tr } from "@chakra-ui/react";
3
+ import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
4
+ import { normalizeTableCellValue, buildTablePalette, pickTableColor } from "../../../Utils/table";
5
+ import { useCustomTheme } from "../../../Theme/useCustomTheme";
6
+ import { onFilled, isDarkCanvas } from "../../../Theme/tokens/builders/accentText";
7
+ import { TableBodyLoading } from "./TableLoading";
8
+ import TableActions from "./TableActions";
9
+ import { getTableRowHoverStyle } from "./tableRowHoverStyle";
10
+ import { ChevronDown, ChevronRight } from "lucide-react";
11
+ import CheckBox from "../../Checkbox/Checkbox";
12
+ import TableGroupRow from "./TableGroupRow";
13
+ // Density → row height (px) + cell vertical padding. The padding (not just the
14
+ // min-height) is what drives perceived row size, so compact tightens both.
15
+ const DENSITY_CONFIG = {
16
+ compact: { height: 32, py: "0.125rem" },
17
+ normal: { height: 40, py: "0.5rem" },
18
+ comfortable: { height: 52, py: "0.875rem" },
19
+ };
20
+ const getRowId = (row) => row.id;
21
+ const getRowContent = (row) => typeof row.content === "function"
22
+ ? row.content
23
+ : undefined;
24
+ // Monday-style status cell: the whole cell is filled with the status color and
25
+ // the label is centered in whichever of white/black clears AA against that fill —
26
+ // the fill can be a consumer hex we can't know in advance is light or dark.
27
+ const StatusCell = ({ value, onSolid }) => (_jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", w: "100%", h: "100%", px: "0.5rem", fontSize: "0.75rem", fontWeight: 600, color: onSolid, textAlign: "center", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", children: value }));
28
+ const EMPTY_HOVER = {};
29
+ const TableRow = React.memo(({ row, rowIndex, isChecked, isExpanded, isContent, isLink, isCheckbox, isLoading, isActionFreeze, columns, leftOffsets, noBorders, freezedBgColor, freezedTextColor, theme, borderStyle, selectedBg, selectedFrozenBg, hoverStyle, rowHeight, cellPy, palette, accentColor, ariaRowIndex, handleCheckbox, onRowClick, toggleRowExpansion, onMeasure, }) => {
30
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
31
+ // Measured-height virtualization: report this row's real height (main + any
32
+ // expanded panel) so the windower can place variable/expandable rows exactly.
33
+ const mainRowRef = useRef(null);
34
+ const expandedRowRef = useRef(null);
35
+ const hasContent = !!getRowContent(row);
36
+ useLayoutEffect(() => {
37
+ if (!onMeasure)
38
+ return;
39
+ const measure = () => {
40
+ var _a, _b, _c, _d;
41
+ const main = (_b = (_a = mainRowRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0;
42
+ const exp = isExpanded && hasContent ? (_d = (_c = expandedRowRef.current) === null || _c === void 0 ? void 0 : _c.offsetHeight) !== null && _d !== void 0 ? _d : 0 : 0;
43
+ const h = main + exp;
44
+ if (h > 0)
45
+ onMeasure(getRowId(row), h);
46
+ };
47
+ measure();
48
+ const raf = requestAnimationFrame(measure);
49
+ let ro;
50
+ if (typeof ResizeObserver !== "undefined") {
51
+ ro = new ResizeObserver(measure);
52
+ if (mainRowRef.current)
53
+ ro.observe(mainRowRef.current);
54
+ if (expandedRowRef.current)
55
+ ro.observe(expandedRowRef.current);
56
+ }
57
+ return () => {
58
+ cancelAnimationFrame(raf);
59
+ ro === null || ro === void 0 ? void 0 : ro.disconnect();
60
+ };
61
+ }, [onMeasure, isExpanded, hasContent, row]);
62
+ const handleCellClick = useCallback((header) => {
63
+ if (!header.node && onRowClick) {
64
+ onRowClick(row, { label: header.label, id: header.id });
65
+ }
66
+ }, [row, onRowClick]);
67
+ const firstDataColIndex = columns.findIndex((c) => !c.isHidden);
68
+ const accentSx = accentColor ? `inset 3px 0 0 ${accentColor}` : undefined;
69
+ // Pinned/frozen columns get a tinted, opaque background so the frozen pane reads
70
+ // as one piece with its header (and so sticky cells cover scrolling content).
71
+ const frozenCellBg = (_d = freezedBgColor !== null && freezedBgColor !== void 0 ? freezedBgColor : (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.table) === null || _b === void 0 ? void 0 : _b.hover) === null || _c === void 0 ? void 0 : _c[100]) !== null && _d !== void 0 ? _d : (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.background) === null || _f === void 0 ? void 0 : _f[100];
72
+ const cellStyles = row.cellStyle;
73
+ const rowStyle = row.rowStyle;
74
+ const rowContent = getRowContent(row);
75
+ return (_jsxs(React.Fragment, { children: [_jsxs(Tr, { ref: mainRowRef, "aria-rowindex": ariaRowIndex, opacity: isLoading ? 0.4 : 1, pointerEvents: isLoading ? "none" : "auto", transition: "opacity 0.2s", children: [isContent && (_jsx(Td, { w: "6", p: 0, fontSize: 14, background: isChecked ? selectedFrozenBg : frozenCellBg, color: freezedTextColor, position: "sticky", borderBottom: borderStyle, boxShadow: accentSx, boxSizing: "border-box", left: 0, zIndex: 1, className: "columns sticky-columns", children: !!(row === null || row === void 0 ? void 0 : row.content) && (_jsx(IconButton, { "aria-label": isExpanded ? "Collapse row" : "Expand row", color: (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.gray[600], icon: isExpanded ? (_jsx(ChevronDown, { fontSize: 16 })) : (_jsx(ChevronRight, { fontSize: 16 })), _hover: { transform: "scale(1.1)" }, size: "sm", onClick: () => toggleRowExpansion(rowIndex), variant: "ghost" })) })), isCheckbox && (_jsx(Td, { w: "6", fontSize: 14, fontWeight: 600, color: (_j = (_h = theme.colors) === null || _h === void 0 ? void 0 : _h.background) === null || _j === void 0 ? void 0 : _j[50], textTransform: "capitalize", background: isChecked ? selectedFrozenBg : frozenCellBg, position: "sticky", borderBottom: borderStyle, boxShadow: !isContent ? accentSx : undefined, boxSizing: "border-box", left: 0, zIndex: 1, className: "columns sticky-columns", children: _jsx(CheckBox, { "aria-label": `Select row ${rowIndex + 1}`, onChange: () => handleCheckbox(getRowId(row)), isChecked: isChecked }) })), columns.map((header, headerIndex) => {
76
+ var _a, _b, _c, _d, _e, _f, _g, _h;
77
+ if (header.isHidden)
78
+ return null;
79
+ const isFrozen = header.isFreeze;
80
+ const isFirstDataCell = !isContent && !isCheckbox && headerIndex === firstDataColIndex;
81
+ const isStatus = header.type === "status" && !header.node;
82
+ const rawStatus = String((_a = row[header.id]) !== null && _a !== void 0 ? _a : "");
83
+ const statusColor = isStatus
84
+ ? pickTableColor(rawStatus, palette, (_b = header.statusColors) === null || _b === void 0 ? void 0 : _b[rawStatus], theme)
85
+ : null;
86
+ // Guards a `statusColor` built by an older external caller that predates `onSolid`.
87
+ const statusOnSolid = statusColor
88
+ ? (_c = statusColor.onSolid) !== null && _c !== void 0 ? _c : onFilled((_d = statusColor.solid) !== null && _d !== void 0 ? _d : "#8B3FC8", theme.colors.white, theme.colors.black)
89
+ : undefined;
90
+ return (_jsx(Td, { maxWidth: 500, minWidth: 120, height: `${rowHeight}px`, py: isStatus && statusColor ? 0 : cellPy, px: isStatus && statusColor ? 0 : undefined, onClick: () => handleCellClick(header), fontSize: 14, fontWeight: 400, position: isFrozen ? "sticky" : undefined, left: isFrozen ? leftOffsets[headerIndex] : undefined, zIndex: isFrozen ? 1 : 0, background: isStatus && statusColor ? statusColor.solid : isChecked ? (isFrozen ? selectedFrozenBg : selectedBg) : isFrozen ? frozenCellBg : (_e = theme.colors.background) === null || _e === void 0 ? void 0 : _e[50], textOverflow: "ellipsis", boxShadow: isFirstDataCell ? accentSx : undefined, borderBottom: noBorders
91
+ ? "none"
92
+ : `0.063rem solid ${(_f = theme.colors) === null || _f === void 0 ? void 0 : _f.gray[isFrozen || isChecked ? 300 : 200]}`, className: `columns ${isFrozen ? "sticky-columns" : "scrollable-columns"}`, boxSizing: "border-box", color: isStatus && statusColor ? statusOnSolid : (_h = (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.text) === null || _h === void 0 ? void 0 : _h[500], _hover: isStatus && statusColor
93
+ ? EMPTY_HOVER
94
+ : (cellStyles === null || cellStyles === void 0 ? void 0 : cellStyles[header.id]) || rowStyle
95
+ ? EMPTY_HOVER
96
+ : hoverStyle, children: isStatus && statusColor ? (_jsx(StatusCell, { value: normalizeTableCellValue(row[header.id]), onSolid: statusOnSolid })) : (_jsx(Box, { display: "block", overflow: "hidden", whiteSpace: "normal", overflowWrap: "break-word", children: normalizeTableCellValue(header.node ? header.node(row) : row[header.id]) })) }, headerIndex + 1));
97
+ }), isLink && (_jsx(Td, { w: 2, p: 0, fontSize: 14, background: isChecked ? (isActionFreeze ? selectedFrozenBg : selectedBg) : isActionFreeze ? frozenCellBg : (_l = (_k = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _k === void 0 ? void 0 : _k.background) === null || _l === void 0 ? void 0 : _l[50], color: freezedTextColor, position: isActionFreeze ? "sticky" : "relative", borderBottom: borderStyle, boxSizing: "border-box", right: 0, zIndex: 1, className: `columns sticky-columns${isActionFreeze ? "-right" : ""}`, children: (row.onLink || row.onEdit || row.onDelete) ? (_jsx(TableActions, { row: row })) : null }))] }), rowContent && isExpanded && (_jsx(Tr, { ref: expandedRowRef, children: _jsx(Td, { colSpan: columns.length +
98
+ (isCheckbox ? 1 : 0) +
99
+ (isContent ? 1 : 0) +
100
+ (isLink ? 1 : 0), p: 2, children: _jsx(Box, { p: 2, bg: (_m = theme.colors.background) === null || _m === void 0 ? void 0 : _m[50], borderRadius: "md", children: rowContent(row) }) }) }))] }));
101
+ });
102
+ const TableBody = ({ data, isCheckbox, columns, startRow, columnWidths, freezedBgColor, freezedTextColor, noBorders, handleCheckbox, selections, isLoading, onRowClick, isContent, isLink, isActionFreeze, loadingSkeletonRows, scrollContainerRef, density, accentColors, groups, onAddItem, emptyState, }) => {
103
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
104
+ const theme = useCustomTheme();
105
+ const [expandedRows, setExpandedRows] = useState(new Set());
106
+ const [collapsedGroups, setCollapsedGroups] = useState(new Set());
107
+ const toggleGroup = useCallback((value) => {
108
+ setCollapsedGroups((prev) => {
109
+ const next = new Set(prev);
110
+ if (next.has(value)) {
111
+ next.delete(value);
112
+ }
113
+ else {
114
+ next.add(value);
115
+ }
116
+ return next;
117
+ });
118
+ }, []);
119
+ const selectionsSet = useMemo(() => new Set(selections), [selections]);
120
+ const palette = useMemo(() => buildTablePalette(theme), [theme]);
121
+ const densityConfig = (_a = DENSITY_CONFIG[density !== null && density !== void 0 ? density : "normal"]) !== null && _a !== void 0 ? _a : DENSITY_CONFIG.normal;
122
+ const rowHeight = densityConfig.height;
123
+ const cellPy = densityConfig.py;
124
+ // --- Row virtualization ---------------------------------------------------
125
+ // Rows are a fixed 45px tall (see the `height={45}` on every <Td/> below),
126
+ // and the scroll viewport is capped at ~500px, so only ~11 rows are ever
127
+ // visible. Mounting all 50/100 page rows is what makes paging freeze. We
128
+ // render only the rows inside the viewport (+ overscan) and reserve the
129
+ // remaining height with empty spacer rows. Spacer rows (rather than CSS
130
+ // transforms) keep the table in normal flow so the sticky header and
131
+ // `position: sticky` frozen columns keep working.
132
+ // Expandable `content` rows are supported via measured heights (see
133
+ // `measuredHeights` / `onMeasure` below) — each rendered row reports its real
134
+ // height, so the window places variable/expanded rows exactly.
135
+ const ROW_HEIGHT = rowHeight;
136
+ const GROUP_HEADER_H = 42;
137
+ const OVERSCAN = 6;
138
+ const VIRTUALIZE_THRESHOLD = 30;
139
+ const ESTIMATED_EXPAND = 120; // assumed extra height for an expanded-but-not-yet-measured row
140
+ const shouldVirtualize = data.length > VIRTUALIZE_THRESHOLD;
141
+ // Grouped mode has no pager, so it virtualizes too (when no expandable rows):
142
+ // group headers + rows form one flat sequence that we window over.
143
+ const groupRowCount = groups ? groups.reduce((n, g) => n + g.rows.length, 0) : 0;
144
+ const groupVirtualize = !!groups && !isContent && groupRowCount > VIRTUALIZE_THRESHOLD;
145
+ const [scrollTop, setScrollTop] = useState(0);
146
+ const [viewportH, setViewportH] = useState(0);
147
+ // Measured row heights keyed by row id (stable across scroll/paging).
148
+ const [measuredHeights, setMeasuredHeights] = useState(new Map());
149
+ const reportHeight = useCallback((id, h) => {
150
+ setMeasuredHeights((prev) => {
151
+ if (prev.get(id) === h)
152
+ return prev;
153
+ const next = new Map(prev);
154
+ next.set(id, h);
155
+ return next;
156
+ });
157
+ }, []);
158
+ useEffect(() => {
159
+ const el = scrollContainerRef === null || scrollContainerRef === void 0 ? void 0 : scrollContainerRef.current;
160
+ if (!el || !(shouldVirtualize || groupVirtualize))
161
+ return;
162
+ const onScroll = () => setScrollTop(el.scrollTop);
163
+ const measure = () => setViewportH(el.clientHeight);
164
+ measure();
165
+ setScrollTop(el.scrollTop);
166
+ el.addEventListener("scroll", onScroll, { passive: true });
167
+ window.addEventListener("resize", measure);
168
+ return () => {
169
+ el.removeEventListener("scroll", onScroll);
170
+ window.removeEventListener("resize", measure);
171
+ };
172
+ }, [scrollContainerRef, shouldVirtualize, groupVirtualize, data.length, groupRowCount]);
173
+ // New page: jump back to the top so the window recomputes from row 0.
174
+ useEffect(() => {
175
+ if (!shouldVirtualize)
176
+ return;
177
+ const el = scrollContainerRef === null || scrollContainerRef === void 0 ? void 0 : scrollContainerRef.current;
178
+ if (el)
179
+ el.scrollTop = 0;
180
+ setScrollTop(0);
181
+ }, [startRow, shouldVirtualize, scrollContainerRef]);
182
+ const total = data.length;
183
+ // Prefix-sum offsets using measured heights (exact for rendered rows) and
184
+ // estimates for not-yet-measured rows (ROW_HEIGHT, + ESTIMATED_EXPAND if expanded).
185
+ // Independent of scrollTop, so scrolling reuses it instead of rebuilding it.
186
+ const offsets = useMemo(() => {
187
+ if (!shouldVirtualize)
188
+ return null;
189
+ const acc = new Array(total + 1);
190
+ acc[0] = 0;
191
+ for (let i = 0; i < total; i++) {
192
+ const id = getRowId(data[i]);
193
+ const measured = measuredHeights.get(id);
194
+ const h = measured != null
195
+ ? measured
196
+ : ROW_HEIGHT + (expandedRows.has(startRow + i) ? ESTIMATED_EXPAND : 0);
197
+ acc[i + 1] = acc[i] + h;
198
+ }
199
+ return acc;
200
+ }, [shouldVirtualize, total, data, measuredHeights, expandedRows, startRow, ROW_HEIGHT, ESTIMATED_EXPAND]);
201
+ let firstIndex = 0;
202
+ let lastIndex = total;
203
+ let topPad = 0;
204
+ let bottomPad = 0;
205
+ if (shouldVirtualize && offsets) {
206
+ const vh = viewportH || 500;
207
+ const totalH = offsets[total];
208
+ const top = scrollTop - OVERSCAN * ROW_HEIGHT;
209
+ const bottom = scrollTop + vh + OVERSCAN * ROW_HEIGHT;
210
+ firstIndex = 0;
211
+ while (firstIndex < total && offsets[firstIndex + 1] <= top)
212
+ firstIndex++;
213
+ lastIndex = firstIndex;
214
+ while (lastIndex < total && offsets[lastIndex] < bottom)
215
+ lastIndex++;
216
+ if (lastIndex < firstIndex)
217
+ lastIndex = firstIndex;
218
+ topPad = offsets[firstIndex];
219
+ bottomPad = totalH - offsets[lastIndex];
220
+ }
221
+ const visibleRows = shouldVirtualize ? data.slice(firstIndex, lastIndex) : data;
222
+ // Consumers pass a fresh closure each render; the ref keeps memoized rows valid.
223
+ const onRowClickRef = useRef(onRowClick);
224
+ onRowClickRef.current = onRowClick;
225
+ const handleRowClick = useCallback((row, header) => {
226
+ var _a;
227
+ (_a = onRowClickRef.current) === null || _a === void 0 ? void 0 : _a.call(onRowClickRef, row, header);
228
+ }, []);
229
+ const rowClickHandler = onRowClick ? handleRowClick : undefined;
230
+ const toggleRowExpansion = useCallback((rowIndex) => {
231
+ setExpandedRows((prev) => {
232
+ const newSet = new Set(prev);
233
+ if (newSet.has(rowIndex)) {
234
+ newSet.delete(rowIndex);
235
+ }
236
+ else {
237
+ newSet.add(rowIndex);
238
+ }
239
+ return newSet;
240
+ });
241
+ }, []);
242
+ const totalVisibleColumns = useMemo(() => columns.filter((o) => !o.isHidden).length +
243
+ (isCheckbox ? 1 : 0) +
244
+ (isContent ? 1 : 0) +
245
+ (isLink ? 1 : 0), [columns, isCheckbox, isContent, isLink]);
246
+ const leftOffsets = useMemo(() => {
247
+ const checkboxOffset = isCheckbox ? 50 : 0;
248
+ return columnWidths.map((_, idx) => columnWidths.slice(0, idx).reduce((sum, w) => sum + w, 0) + checkboxOffset);
249
+ }, [columnWidths, isCheckbox]);
250
+ const borderStyle = useMemo(() => { var _a; return noBorders ? "none" : `0.063rem solid ${(_a = theme.colors) === null || _a === void 0 ? void 0 : _a.border[500]}`; }, [noBorders, (_b = theme.colors) === null || _b === void 0 ? void 0 : _b.border]);
251
+ // Selected-row tint applied per-cell (NOT a blanket `& td` override) so status
252
+ // cells keep their solid color + white text instead of white-on-tint.
253
+ const selectedBg = (_e = (_d = (_c = theme.colors.primary) === null || _c === void 0 ? void 0 : _c.opacity) === null || _d === void 0 ? void 0 : _d[16]) !== null && _e !== void 0 ? _e : (_f = theme.colors.disabled) === null || _f === void 0 ? void 0 : _f[100];
254
+ // Sticky/frozen cells overlay scrolling content, so their selected background
255
+ // must be OPAQUE — paint the (translucent) tint over an opaque base.
256
+ const selectedFrozenBg = `linear-gradient(0deg, ${selectedBg}, ${selectedBg}), ${(_j = (_h = (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.background) === null || _h === void 0 ? void 0 : _h[50]) !== null && _j !== void 0 ? _j : "#fff"}`;
257
+ // Dark mode needs a much brighter fill to be visible against a near-black row (`table.hover[300]`
258
+ // sits within ~1.2:1 of it) plus a flipped ink color so the existing (light-tuned) cell text
259
+ // stays legible on that brighter fill — see `tableRowHoverStyle.ts`.
260
+ const isDark = isDarkCanvas((_l = (_k = theme.colors.backgroundColor) === null || _k === void 0 ? void 0 : _k.main) !== null && _l !== void 0 ? _l : "#ffffff");
261
+ const hoverStyle = useMemo(() => getTableRowHoverStyle(theme.colors, isDark), [theme.colors, isDark]);
262
+ // Flatten groups → one sequence of header/row items so it can be windowed.
263
+ // Independent of scrollTop, so scrolling reuses it instead of re-flattening.
264
+ const groupItems = useMemo(() => {
265
+ if (!groups)
266
+ return null;
267
+ const list = [];
268
+ for (const g of groups) {
269
+ list.push({ kind: "header", g });
270
+ if (!collapsedGroups.has(g.value)) {
271
+ for (const row of g.rows)
272
+ list.push({ kind: "row", g, row });
273
+ }
274
+ }
275
+ return list;
276
+ }, [groups, collapsedGroups]);
277
+ const groupMetrics = useMemo(() => {
278
+ if (!groupItems || !groupVirtualize)
279
+ return null;
280
+ const heights = groupItems.map((it) => (it.kind === "header" ? GROUP_HEADER_H : rowHeight));
281
+ const offsets = [];
282
+ let acc = 0;
283
+ for (const h of heights) {
284
+ offsets.push(acc);
285
+ acc += h;
286
+ }
287
+ return { heights, offsets, totalH: acc };
288
+ }, [groupItems, groupVirtualize, rowHeight, GROUP_HEADER_H]);
289
+ if (isLoading && data.length === 0) {
290
+ return (_jsx(TableBodyLoading, { noOfColumns: totalVisibleColumns, borderColor: theme.colors.gray[300], rowsCount: typeof loadingSkeletonRows === "number" ? loadingSkeletonRows : 4 }));
291
+ }
292
+ if (!isLoading && data.length === 0) {
293
+ const isStructured = emptyState && typeof emptyState === "object" && !React.isValidElement(emptyState);
294
+ const es = isStructured ? emptyState : null;
295
+ return (_jsx(Tr, { backgroundColor: (_m = theme.colors.background) === null || _m === void 0 ? void 0 : _m[50], children: _jsx(Td, { colSpan: totalVisibleColumns, textAlign: "center", py: 10, border: "none", children: emptyState && !isStructured ? emptyState : (_jsxs(Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: 2, color: (_p = (_o = theme.colors) === null || _o === void 0 ? void 0 : _o.gray) === null || _p === void 0 ? void 0 : _p[500], children: [(es === null || es === void 0 ? void 0 : es.icon) && _jsx(Box, { fontSize: "1.75rem", color: (_r = (_q = theme.colors) === null || _q === void 0 ? void 0 : _q.gray) === null || _r === void 0 ? void 0 : _r[400], children: es.icon }), _jsx(Box, { fontSize: "0.95rem", fontWeight: 600, color: (_t = (_s = theme.colors) === null || _s === void 0 ? void 0 : _s.text) === null || _t === void 0 ? void 0 : _t[700], children: (_u = es === null || es === void 0 ? void 0 : es.title) !== null && _u !== void 0 ? _u : "No data found" }), (es === null || es === void 0 ? void 0 : es.description) && (_jsx(Box, { fontSize: "0.8125rem", color: (_w = (_v = theme.colors) === null || _v === void 0 ? void 0 : _v.gray) === null || _w === void 0 ? void 0 : _w[500], children: es.description }))] })) }) }));
296
+ }
297
+ // --- Monday-style grouped board render (virtualized when large) -----------
298
+ if (groups) {
299
+ const items = groupItems !== null && groupItems !== void 0 ? groupItems : [];
300
+ let firstI = 0;
301
+ let lastI = items.length;
302
+ let gTopPad = 0;
303
+ let gBottomPad = 0;
304
+ if (groupVirtualize && groupMetrics) {
305
+ const { heights, offsets, totalH } = groupMetrics;
306
+ const vh = viewportH || 500;
307
+ const top = scrollTop - OVERSCAN * rowHeight;
308
+ const bottom = scrollTop + vh + OVERSCAN * rowHeight;
309
+ firstI = items.findIndex((_, i) => offsets[i] + heights[i] > top);
310
+ if (firstI < 0)
311
+ firstI = items.length;
312
+ lastI = items.length;
313
+ for (let i = firstI; i < items.length; i++) {
314
+ if (offsets[i] > bottom) {
315
+ lastI = i;
316
+ break;
317
+ }
318
+ }
319
+ gTopPad = (_x = offsets[firstI]) !== null && _x !== void 0 ? _x : 0;
320
+ gBottomPad = totalH - (lastI > firstI ? offsets[lastI - 1] + heights[lastI - 1] : gTopPad);
321
+ }
322
+ const windowItems = groupVirtualize ? items.slice(firstI, lastI) : items;
323
+ return (_jsxs(_Fragment, { children: [gTopPad > 0 && (_jsx("tr", { "aria-hidden": "true", style: { height: gTopPad }, children: _jsx("td", { colSpan: totalVisibleColumns, style: { padding: 0, border: "none", height: gTopPad } }) })), windowItems.map((it, k) => {
324
+ var _a;
325
+ return it.kind === "header" ? (_jsx(TableGroupRow, { label: it.g.label, value: it.g.value, count: it.g.rows.length, color: it.g.color, collapsed: collapsedGroups.has(it.g.value), colSpan: totalVisibleColumns, ariaRowIndex: firstI + k + 2, onToggle: () => toggleGroup(it.g.value), onAddItem: onAddItem }, `h-${it.g.value}`)) : (_jsx(TableRow, { row: it.row, rowIndex: firstI + k, index: firstI + k, isChecked: selectionsSet.has(getRowId(it.row)), isExpanded: expandedRows.has(firstI + k), isContent: isContent, isLink: isLink, isCheckbox: isCheckbox, isLoading: isLoading, isActionFreeze: isActionFreeze, columns: columns, leftOffsets: leftOffsets, noBorders: noBorders, freezedBgColor: freezedBgColor, freezedTextColor: freezedTextColor, theme: theme, borderStyle: borderStyle, selectedBg: selectedBg, selectedFrozenBg: selectedFrozenBg, hoverStyle: hoverStyle, rowHeight: rowHeight, cellPy: cellPy, palette: palette, accentColor: it.g.color.solid, ariaRowIndex: firstI + k + 2, handleCheckbox: handleCheckbox, onRowClick: rowClickHandler, toggleRowExpansion: toggleRowExpansion }, (_a = getRowId(it.row)) !== null && _a !== void 0 ? _a : `r-${firstI + k}`));
326
+ }), gBottomPad > 0 && (_jsx("tr", { "aria-hidden": "true", style: { height: gBottomPad }, children: _jsx("td", { colSpan: totalVisibleColumns, style: { padding: 0, border: "none", height: gBottomPad } }) }))] }));
327
+ }
328
+ return (_jsxs(_Fragment, { children: [isLoading && data.length > 0 && (_jsx(Tr, { children: _jsx(Td, { colSpan: totalVisibleColumns, p: 0, border: "none", position: "relative", height: 0, children: _jsx(Box, { position: "absolute", top: 4, left: "50%", transform: "translateX(-50%)", zIndex: 10, children: _jsx(Spinner, { size: "sm", color: ((_z = (_y = theme.colors) === null || _y === void 0 ? void 0 : _y.primary) === null || _z === void 0 ? void 0 : _z[500]) || "blue.500" }) }) }) })), shouldVirtualize && topPad > 0 && (_jsx("tr", { "aria-hidden": "true", style: { height: topPad }, children: _jsx("td", { colSpan: totalVisibleColumns, style: { padding: 0, border: "none", height: topPad } }) })), visibleRows.map((row, i) => {
329
+ var _a;
330
+ const index = firstIndex + i;
331
+ const rowIndex = startRow + index;
332
+ const isExpanded = expandedRows.has(rowIndex);
333
+ const isChecked = selectionsSet.has(getRowId(row));
334
+ return (_jsx(TableRow, { row: row, rowIndex: rowIndex, index: index, isChecked: isChecked, isExpanded: isExpanded, isContent: isContent, isLink: isLink, isCheckbox: isCheckbox, isLoading: isLoading, isActionFreeze: isActionFreeze, columns: columns, leftOffsets: leftOffsets, noBorders: noBorders, freezedBgColor: freezedBgColor, freezedTextColor: freezedTextColor, theme: theme, borderStyle: borderStyle, selectedBg: selectedBg, selectedFrozenBg: selectedFrozenBg, hoverStyle: hoverStyle, rowHeight: rowHeight, cellPy: cellPy, palette: palette, accentColor: accentColors === null || accentColors === void 0 ? void 0 : accentColors[getRowId(row)], ariaRowIndex: index + 2, handleCheckbox: handleCheckbox, onRowClick: rowClickHandler, toggleRowExpansion: toggleRowExpansion, onMeasure: shouldVirtualize ? reportHeight : undefined }, (_a = getRowId(row)) !== null && _a !== void 0 ? _a : rowIndex));
335
+ }), shouldVirtualize && bottomPad > 0 && (_jsx("tr", { "aria-hidden": "true", style: { height: bottomPad }, children: _jsx("td", { colSpan: totalVisibleColumns, style: { padding: 0, border: "none", height: bottomPad } }) }))] }));
336
+ };
337
+ export default TableBody;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Flex, IconButton, Td, Text, Tr } from "@chakra-ui/react";
3
+ import { ChevronDown, ChevronRight, Plus } from "lucide-react";
4
+ import { useCustomTheme } from "../../../Theme/useCustomTheme";
5
+ /** Monday-style colored, collapsible group header row. */
6
+ export const TableGroupRow = ({ label, value, count, color, collapsed, colSpan, ariaRowIndex, onToggle, onAddItem, }) => {
7
+ var _a, _b, _c, _d, _e, _f;
8
+ const theme = useCustomTheme();
9
+ return (_jsx(Tr, { "aria-rowindex": ariaRowIndex, children: _jsx(Td, { colSpan: colSpan, p: 0, border: "none", children: _jsxs(Flex, { align: "center", gap: 2, px: 3, py: 2, bg: color.soft, boxShadow: `inset 4px 0 0 ${color.solid}`, borderBottom: `0.063rem solid ${(_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.border) === null || _b === void 0 ? void 0 : _b[500]}`, children: [_jsx(IconButton, { "aria-label": collapsed ? "Expand group" : "Collapse group", size: "xs", variant: "ghost", color: color.text, onClick: onToggle, icon: collapsed ? _jsx(ChevronRight, { size: 16 }) : _jsx(ChevronDown, { size: 16 }) }), _jsx(Text, { fontSize: "0.8125rem", fontWeight: 700, color: color.text, isTruncated: true, maxW: "20rem", children: label }), _jsx(Box, { as: "span", fontSize: "0.6875rem", fontWeight: 600, color: color.text, bg: (_d = (_c = theme.colors) === null || _c === void 0 ? void 0 : _c.background) === null || _d === void 0 ? void 0 : _d[50], borderRadius: "full", px: "0.5rem", py: "0.0625rem", children: count }), onAddItem && (_jsxs(Flex, { as: "button", type: "button", align: "center", gap: 1, ml: "auto", px: 2, py: 1, borderRadius: "md", fontSize: "0.75rem", fontWeight: 500, color: (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.text) === null || _f === void 0 ? void 0 : _f[500], _hover: { bg: "whiteAlpha.500", color: color.text }, onClick: () => onAddItem(value), children: [_jsx(Plus, { size: 14 }), " Add item"] }))] }) }) }));
10
+ };
11
+ export default TableGroupRow;
@@ -0,0 +1,100 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Spinner, Th, Tr } from "@chakra-ui/react";
3
+ import { memo, useState } from "react";
4
+ import { calculateLeftOffset } from "../../../Utils/table";
5
+ import { useCustomTheme } from "../../../Theme/useCustomTheme";
6
+ import { accentTextOnCanvas } from "../../../Theme/tokens/builders/accentText";
7
+ import TableFilters from "../filters/TableFilters";
8
+ import { ChevronDown, ChevronsUpDown, ChevronUp } from "lucide-react";
9
+ import CheckBox from "../../Checkbox/Checkbox";
10
+ const TableHeader = ({ columns, isCheckbox, handleSort, headerRefs, columnWidths, columnsSort, headerBgColor, freezedBgColor, freezedTextColor, noBorders, handleCheckbox, checked, isLoading, isContent, isLink, isActionFreeze, setColumnsSearch, columnsSearch, isSelecting, }) => {
11
+ const [openFilterId, setOpenFilterId] = useState(null);
12
+ return (_jsxs(Tr, { pr: 0, "aria-rowindex": 1, children: [isContent && _jsx(ContentSpacerCell, { noBorders: noBorders }), isCheckbox && (_jsx(SelectAllCell, { freezedTextColor: freezedTextColor, noBorders: noBorders, isSelecting: isSelecting, isLoading: isLoading, checked: checked, handleCheckbox: handleCheckbox })), columns.map((header, index) => {
13
+ if (header === null || header === void 0 ? void 0 : header.isHidden)
14
+ return null;
15
+ return (_jsx(ColumnHeader, { header: header, index: index, columnWidths: columnWidths, handleSort: handleSort, isCheckbox: isCheckbox, headerBgColor: headerBgColor, freezedBgColor: freezedBgColor, noBorders: noBorders, columnsSort: columnsSort, headerRefs: headerRefs, columnsSearch: columnsSearch, setColumnsSearch: setColumnsSearch, openFilterId: openFilterId, setOpenFilterId: setOpenFilterId }, header.label));
16
+ }), isLink && _jsx(ViewSpacerCell, { noBorders: noBorders, isActionFreeze: isActionFreeze })] }));
17
+ };
18
+ export default memo(TableHeader);
19
+ const SelectAllCell = memo(({ freezedTextColor, noBorders, isSelecting, isLoading, checked, handleCheckbox, }) => {
20
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
21
+ const theme = useCustomTheme();
22
+ return (_jsx(Th, { scope: "col", w: 6, fontSize: 14, fontWeight: 600, color: freezedTextColor, textTransform: "capitalize", backgroundColor: (_d = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.table) === null || _b === void 0 ? void 0 : _b.hover) === null || _c === void 0 ? void 0 : _c[200]) !== null && _d !== void 0 ? _d : (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.secondary) === null || _f === void 0 ? void 0 : _f[50], position: "sticky", className: `columns sticky-columns`, left: "0px", zIndex: 9, borderBottom: noBorders ? "none" : `0.063rem solid ${(_g = theme.colors) === null || _g === void 0 ? void 0 : _g.gray[300]}`, children: isSelecting ? (_jsx(Spinner, { size: "sm", color: (_j = (_h = theme.colors) === null || _h === void 0 ? void 0 : _h.primary) === null || _j === void 0 ? void 0 : _j[500] })) : (_jsx(CheckBox, { "aria-label": "Select all rows", variant: "outline", onChange: () => handleCheckbox(0), isChecked: isLoading ? false : checked === true, isIndeterminate: checked === "indeterminate" })) }));
23
+ });
24
+ const ContentSpacerCell = memo(({ noBorders }) => {
25
+ var _a, _b, _c, _d, _e, _f, _g;
26
+ const theme = useCustomTheme();
27
+ return (_jsx(Th, { scope: "col", w: 6, minW: "35px", p: 0, backgroundColor: (_d = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.table) === null || _b === void 0 ? void 0 : _b.hover) === null || _c === void 0 ? void 0 : _c[200]) !== null && _d !== void 0 ? _d : (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.secondary) === null || _f === void 0 ? void 0 : _f[50], borderBottom: noBorders ? "none" : `0.063rem solid ${(_g = theme.colors) === null || _g === void 0 ? void 0 : _g.gray[300]}`, position: "sticky", className: `columns sticky-columns`, left: "0px", zIndex: 1 }));
28
+ });
29
+ const ViewSpacerCell = memo(({ noBorders, isActionFreeze, }) => {
30
+ var _a, _b, _c, _d, _e, _f, _g;
31
+ const theme = useCustomTheme();
32
+ return (_jsx(Th, { scope: "col", w: 2, p: 0, minW: "2.065rem", backgroundColor: (_d = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.table) === null || _b === void 0 ? void 0 : _b.hover) === null || _c === void 0 ? void 0 : _c[200]) !== null && _d !== void 0 ? _d : (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.secondary) === null || _f === void 0 ? void 0 : _f[50], borderBottom: noBorders ? "none" : `0.063rem solid ${(_g = theme.colors) === null || _g === void 0 ? void 0 : _g.gray[300]}`, position: isActionFreeze ? "sticky" : "relative", className: `columns sticky-columns`, right: "0px", zIndex: 1 }));
33
+ });
34
+ const SortingIcon = memo(({ label, sortState, isVisible, handleSortClick, }) => {
35
+ var _a, _b, _c, _d, _e, _f;
36
+ const theme = useCustomTheme();
37
+ return (_jsxs(Box, { as: "button", type: "button", "aria-label": `Sort by ${label}`, display: "inline-flex", alignItems: "center", justifyContent: "center", cursor: "pointer", ml: 2, p: 0, border: "none", bg: "transparent", lineHeight: "1", onClick: handleSortClick, transition: "color 0.2s ease-in-out, opacity 0.2s ease-in-out",
38
+ // Kept out of view until hover/focus so the header looks exactly as it did,
39
+ // while staying in the DOM and reachable by Tab.
40
+ opacity: isVisible ? 1 : 0, _focus: { opacity: 1 }, _focusVisible: { opacity: 1 }, color: theme.colors.gray[600], _hover: {
41
+ opacity: 1,
42
+ color: accentTextOnCanvas(theme.colors.secondary, (_d = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.table) === null || _b === void 0 ? void 0 : _b.hover) === null || _c === void 0 ? void 0 : _c[200]) !== null && _d !== void 0 ? _d : (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.secondary) === null || _f === void 0 ? void 0 : _f[50]),
43
+ }, children: [sortState === "none" && _jsx(ChevronsUpDown, { size: 14 }), sortState === "asc" && _jsx(ChevronUp, { size: 14 }), sortState === "desc" && _jsx(ChevronDown, { size: 14 })] }));
44
+ });
45
+ const ColumnHeader = memo(({ header, index, columnWidths, isCheckbox, noBorders, columnsSort, headerRefs, columnsSearch, setColumnsSearch, handleSort, openFilterId, setOpenFilterId, }) => {
46
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
47
+ const [isHovered, setIsHovered] = useState(false);
48
+ const theme = useCustomTheme();
49
+ const isFrozen = header.isFreeze;
50
+ const leftOffset = isFrozen
51
+ ? calculateLeftOffset(columnWidths, index) + (isCheckbox ? 50 : 0)
52
+ : undefined;
53
+ const isSorting = header.isSort
54
+ ? columnsSort.find((o) => o.column === header.id)
55
+ : undefined;
56
+ const activeSorts = columnsSort.filter((o) => o.direction !== "none");
57
+ const sortPriority = activeSorts.length > 1 && isSorting && isSorting.direction !== "none"
58
+ ? activeSorts.findIndex((o) => o.column === header.id) + 1
59
+ : 0;
60
+ const ariaSort = (isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) === "asc"
61
+ ? "ascending"
62
+ : (isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) === "desc"
63
+ ? "descending"
64
+ : undefined;
65
+ // const TextColor = isFrozen ? freezedTextColor : headerTextColor;
66
+ const handleMouseDown = (e) => {
67
+ const parentBox = e.target
68
+ .parentElement;
69
+ const th = parentBox.parentElement;
70
+ const startX = e.pageX;
71
+ const startWidth = th.offsetWidth;
72
+ const onMouseMove = (moveEvent) => {
73
+ const newWidth = startWidth + (moveEvent.pageX - startX);
74
+ th.style.width = `${newWidth}px`;
75
+ };
76
+ const onMouseUp = () => {
77
+ document.removeEventListener("mousemove", onMouseMove);
78
+ document.removeEventListener("mouseup", onMouseUp);
79
+ };
80
+ document.addEventListener("mousemove", onMouseMove);
81
+ document.addEventListener("mouseup", onMouseUp);
82
+ };
83
+ const isSortActive = !!(isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) && isSorting.direction !== "none";
84
+ return (_jsx(Th, { scope: "col", ref: (el) => (headerRefs.current[index] = el), "aria-sort": ariaSort, textTransform: "capitalize", fontSize: 13, fontWeight: 600, position: isFrozen ? "sticky" : undefined, left: isFrozen ? leftOffset : undefined, minWidth: 120, backgroundColor: (_d = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.table) === null || _b === void 0 ? void 0 : _b.hover) === null || _c === void 0 ? void 0 : _c[200]) !== null && _d !== void 0 ? _d : (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.secondary) === null || _f === void 0 ? void 0 : _f[50], maxWidth: 500, zIndex: isFrozen ? 2 : 1, py: 2, pr: 0, overflow: "hidden", borderTop: "none", borderBottom: noBorders ? "none" : `0.063rem solid ${(_g = theme.colors) === null || _g === void 0 ? void 0 : _g.border[500]}`, borderRight: noBorders ? "none" : `0.063rem solid ${(_k = (_j = (_h = theme.colors) === null || _h === void 0 ? void 0 : _h.boxborder) === null || _j === void 0 ? void 0 : _j[300]) !== null && _k !== void 0 ? _k : (_l = theme.colors) === null || _l === void 0 ? void 0 : _l.gray[200]}`, className: `columns ${isFrozen ? "sticky-columns" : "scrollable-columns"}`, height: 45, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: _jsxs(Box, { display: "flex", color: accentTextOnCanvas(theme.colors.secondary, (_q = (_p = (_o = (_m = theme.colors) === null || _m === void 0 ? void 0 : _m.table) === null || _o === void 0 ? void 0 : _o.hover) === null || _p === void 0 ? void 0 : _p[200]) !== null && _q !== void 0 ? _q : (_s = (_r = theme.colors) === null || _r === void 0 ? void 0 : _r.secondary) === null || _s === void 0 ? void 0 : _s[50]), lineHeight: "1.25rem", justifyContent: "space-between", alignItems: "center", position: "relative", children: [_jsx(Box, { textOverflow: "ellipsis", whiteSpace: "nowrap", display: "inline-block", overflow: "hidden", children: header.label }), _jsxs(Box, { display: "inline-flex", alignItems: "center", children: [header.isSort && (_jsx(SortingIcon, { label: String(header.label), sortState: (_t = isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) !== null && _t !== void 0 ? _t : "none", isVisible: isHovered || isSortActive, handleSortClick: () => {
85
+ let direction = "asc";
86
+ if ((isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) === "asc") {
87
+ direction = "desc";
88
+ }
89
+ else if ((isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) === "desc") {
90
+ direction = "none";
91
+ }
92
+ handleSort(header.id, direction);
93
+ } })), sortPriority > 0 && (_jsx(Box, { as: "span", ml: 1, fontSize: "0.625rem", fontWeight: 700, lineHeight: "1", borderRadius: "full", px: "0.3rem", py: "0.1rem", bg: (_w = (_v = (_u = theme.colors) === null || _u === void 0 ? void 0 : _u.primary) === null || _v === void 0 ? void 0 : _v.opacity) === null || _w === void 0 ? void 0 : _w[16], color: (_y = (_x = theme.colors) === null || _x === void 0 ? void 0 : _x.primary) === null || _y === void 0 ? void 0 : _y[600], children: sortPriority })), _jsx(TableFilters, { header: header, setColumnsSearch: (searchVal) => setColumnsSearch((prev) => ({
94
+ ...prev,
95
+ [header.id]: searchVal,
96
+ })), columnsSearch: columnsSearch[header.id] || "", onClose: () => {
97
+ setIsHovered(false);
98
+ setOpenFilterId(null);
99
+ }, isOpen: openFilterId === header.id, onOpen: () => setOpenFilterId(header.id) })] }), _jsx("div", { className: "resize-handle", onMouseDown: handleMouseDown })] }) }, index + 1));
100
+ });
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Box, Skeleton, SkeletonText, Table, Tbody, Td, Th, Thead, Tr, } from "@chakra-ui/react";
3
+ const TableLoading = () => {
4
+ return (_jsx(Box, { overflowX: "auto", p: 4, children: _jsxs(Table, { variant: "simple", width: "full", children: [_jsx(Thead, { children: _jsxs(Tr, { children: [_jsx(Th, { p: 2, children: _jsx(Skeleton, { height: "20px" }) }), _jsx(Th, { p: 2, children: _jsx(Skeleton, { height: "20px" }) }), _jsx(Th, { p: 2, children: _jsx(Skeleton, { height: "20px" }) }), _jsx(Th, { p: 2, children: _jsx(Skeleton, { height: "20px" }) })] }) }), _jsx(Tbody, { children: Array.from({ length: 5 }).map((_, rowIndex) => (_jsxs(Tr, { children: [_jsx(Td, { p: 2, children: _jsx(SkeletonText, { noOfLines: 1, skeletonHeight: "2" }) }), _jsx(Td, { p: 2, children: _jsx(SkeletonText, { noOfLines: 1, skeletonHeight: "2" }) }), _jsx(Td, { p: 2, children: _jsx(SkeletonText, { noOfLines: 1, skeletonHeight: "2" }) }), _jsx(Td, { p: 2, children: _jsx(SkeletonText, { noOfLines: 1, skeletonHeight: "2" }) })] }, rowIndex))) })] }) }));
5
+ };
6
+ export default TableLoading;
7
+ export const TableBodyLoading = ({ noOfColumns, borderColor, rowsCount = 4, rowHeight = 45, }) => {
8
+ return (_jsx(_Fragment, { children: Array.from({ length: rowsCount }).map((_, index) => {
9
+ return (_jsx(Tr, { children: _jsx(Td, { colSpan: noOfColumns, textAlign: "center", border: `1px solid ${borderColor}`, px: 2, pt: 2, pb: 0, height: `${rowHeight}px`, boxSizing: "border-box", children: _jsx(Skeleton, { height: "15px", variant: "shine" }) }) }, index));
10
+ }) }));
11
+ };