pixelize-design-library 2.4.2-beta.0 → 2.4.2-beta.10

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 (397) hide show
  1. package/dist/Components/Accordion/Accordion.js +13 -15
  2. package/dist/Components/Accordion/accordionColors.js +6 -9
  3. package/dist/Components/AlertDialog/AlertDialog.js +1 -2
  4. package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
  5. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
  6. package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
  7. package/dist/Components/AppearanceSettings/AppearanceSettings.js +9 -7
  8. package/dist/Components/Button/Button.styles.js +7 -12
  9. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +12 -13
  10. package/dist/Components/Checkbox/Checkbox.js +1 -1
  11. package/dist/Components/Checkbox/Checkbox.styles.js +2 -0
  12. package/dist/Components/Common/ErrorComponent.js +5 -8
  13. package/dist/Components/Common/ErrorMessage.js +2 -8
  14. package/dist/Components/Common/FormLabel.js +1 -3
  15. package/dist/Components/Common/FormattedDescription.js +3 -1
  16. package/dist/Components/Common/Label.js +3 -8
  17. package/dist/Components/Common/fieldStyles.js +6 -7
  18. package/dist/Components/ContactForm/ContactForm.js +1 -2
  19. package/dist/Components/CopyButton/CopyButton.js +3 -6
  20. package/dist/Components/CustomModulesTable/CustomModulesTable.js +7 -10
  21. package/dist/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
  22. package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -3
  23. package/dist/Components/DatePicker/CalendarPanel.js +3 -4
  24. package/dist/Components/DatePicker/RangeDatePicker.js +9 -9
  25. package/dist/Components/DatePicker/SingleDatePicker.js +11 -11
  26. package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -2
  27. package/dist/Components/DatePicker/TimePicker.js +6 -7
  28. package/dist/Components/DatePicker/TimePickerInput.js +6 -7
  29. package/dist/Components/Divider/Divider.js +1 -2
  30. package/dist/Components/Drawer/Drawer.js +1 -2
  31. package/dist/Components/Dropdown/DropDown.js +19 -33
  32. package/dist/Components/Editor/Editor.js +10 -13
  33. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +3 -3
  34. package/dist/Components/EmptyState/EmptyState.js +11 -11
  35. package/dist/Components/FieldSelectModal/FieldSelectModal.js +1 -1
  36. package/dist/Components/FilePreview/FilePreview.js +2 -2
  37. package/dist/Components/FileUpload/FileUpload.js +18 -24
  38. package/dist/Components/FileUploader/FileUploader.js +5 -6
  39. package/dist/Components/FilterSidebar/FilterSidebar.js +156 -160
  40. package/dist/Components/Form/FormWrapper.js +1 -2
  41. package/dist/Components/Header/Header.js +6 -6
  42. package/dist/Components/Header/HeaderActions.d.ts +3 -1
  43. package/dist/Components/Header/HeaderActions.js +8 -4
  44. package/dist/Components/Header/components/desktopMenu.js +7 -20
  45. package/dist/Components/Header/components/mobileMenu.js +3 -15
  46. package/dist/Components/Input/Input/Input.js +13 -17
  47. package/dist/Components/Input/TextInput.styles.js +15 -16
  48. package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -1
  49. package/dist/Components/InputTextArea/InputTextArea.style.js +14 -14
  50. package/dist/Components/KanbanBoard/AccountCard.js +10 -4
  51. package/dist/Components/KanbanBoard/AccountRow.js +1 -2
  52. package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  53. package/dist/Components/KanbanBoard/KanbanBoard.js +15 -62
  54. package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
  55. package/dist/Components/LimitReachedModal/LimitReachedModal.js +5 -18
  56. package/dist/Components/Loading/Loading.js +1 -1
  57. package/dist/Components/Modal/Modal.js +3 -1
  58. package/dist/Components/MoreItems/MoreItems.js +3 -7
  59. package/dist/Components/MultiSelect/MultiSelect.js +5 -6
  60. package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -1
  61. package/dist/Components/NavigationBar/NavigationBar.js +22 -18
  62. package/dist/Components/NavigationBar/NavigationBarProps.d.ts +5 -0
  63. package/dist/Components/NoteTextArea/NoteTextArea.js +7 -9
  64. package/dist/Components/Notification/Notification.js +17 -15
  65. package/dist/Components/NumberInput/NumberInput.styles.js +14 -14
  66. package/dist/Components/OrgSwitcher/OrgSwitcher.js +7 -8
  67. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +2 -0
  68. package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +6 -2
  69. package/dist/Components/OrganizationDetails/CreateOrgModal.js +1 -2
  70. package/dist/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
  71. package/dist/Components/OrganizationDetails/OrganizationDetails.js +25 -22
  72. package/dist/Components/PdfViewer/PdfViewer.js +1 -1
  73. package/dist/Components/PinInput/PinInput.js +1 -1
  74. package/dist/Components/PinInputs/PinInputs.js +7 -14
  75. package/dist/Components/PlanPill/PlanPill.js +8 -11
  76. package/dist/Components/PlanPill/planPillGradient.d.ts +21 -14
  77. package/dist/Components/PlanPill/planPillGradient.js +33 -16
  78. package/dist/Components/ProductCard/ProductPrice.js +6 -6
  79. package/dist/Components/ProductCard/ProductReview.js +4 -1
  80. package/dist/Components/ProductCard/ProductTags.js +4 -4
  81. package/dist/Components/ProductDetails/ProductDetails.js +3 -1
  82. package/dist/Components/ProductDetails/ProductDtlPrice.js +3 -3
  83. package/dist/Components/ProfileCard/ProfileCard.js +4 -4
  84. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +19 -16
  85. package/dist/Components/RadioButton/RadioButton.js +1 -1
  86. package/dist/Components/Reorder/Reorder.js +3 -4
  87. package/dist/Components/RolesPermission/DeleteRoleModal.js +5 -4
  88. package/dist/Components/RolesPermission/RolesPermission.js +12 -14
  89. package/dist/Components/ScrollToTop/ScrollToTop.js +2 -3
  90. package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +13 -0
  91. package/dist/Components/ScrollbarBox/ScrollbarBox.js +11 -0
  92. package/dist/Components/SearchSelect/SearchSelect.js +26 -28
  93. package/dist/Components/Select/Select.styles.js +34 -37
  94. package/dist/Components/SelectSearch/SelectSearch.js +10 -10
  95. package/dist/Components/SelectV2/SelectV2.js +8 -20
  96. package/dist/Components/SideBar/SecondaryBar.js +10 -15
  97. package/dist/Components/SideBar/SideBar.d.ts +1 -1
  98. package/dist/Components/SideBar/SideBar.js +41 -34
  99. package/dist/Components/SideBar/SideBarProps.d.ts +6 -0
  100. package/dist/Components/SideBar/components/MenuItemBox.js +10 -12
  101. package/dist/Components/SideBar/components/MenuItems.js +3 -1
  102. package/dist/Components/SideBar/components/MenuPopoverContent.js +7 -9
  103. package/dist/Components/SideBar/components/OtherApps.js +4 -4
  104. package/dist/Components/SideBar/sidebarAccentColors.d.ts +4 -17
  105. package/dist/Components/SideBar/sidebarAccentColors.js +6 -33
  106. package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -7
  107. package/dist/Components/Slider/Slider.js +2 -2
  108. package/dist/Components/StageProgress/StageProgress.js +2 -9
  109. package/dist/Components/StageProgress/StageProgressProps.js +9 -13
  110. package/dist/Components/Table/Table.js +19 -30
  111. package/dist/Components/Table/components/HeaderActions.js +6 -7
  112. package/dist/Components/Table/components/Pagination.js +1 -1
  113. package/dist/Components/Table/components/TableActions.js +4 -4
  114. package/dist/Components/Table/components/TableBody.js +18 -20
  115. package/dist/Components/Table/components/TableGroupRow.js +1 -2
  116. package/dist/Components/Table/components/TableHeader.js +8 -12
  117. package/dist/Components/Table/components/TableSearch.js +1 -2
  118. package/dist/Components/Table/components/tableRowHoverStyle.js +2 -3
  119. package/dist/Components/Table/filters/ActiveFilters.js +5 -24
  120. package/dist/Components/Table/filters/CompactSelect.js +4 -5
  121. package/dist/Components/Table/filters/LeftFilterPane.js +4 -5
  122. package/dist/Components/Table/filters/TableFilters.js +1 -2
  123. package/dist/Components/Table/hooks/useTable.js +8 -11
  124. package/dist/Components/Table/settings/ManageColumns.js +4 -18
  125. package/dist/Components/Table/settings/TableSettings.js +13 -21
  126. package/dist/Components/Tag/Tag.styles.js +8 -6
  127. package/dist/Components/Timeline/Timeline.js +32 -45
  128. package/dist/Components/Toaster/Toaster.js +43 -44
  129. package/dist/Components/ToolTip/ToolTip.js +1 -6
  130. package/dist/Components/Trail/EditableCell.js +4 -1
  131. package/dist/Components/Trail/TrailWorks.js +3 -3
  132. package/dist/Components/UpgradeButton/UpgradeButton.js +4 -6
  133. package/dist/Components/UserDetails/AddUserModal.js +3 -3
  134. package/dist/Components/UserDetails/ChangeRoleModal.js +2 -2
  135. package/dist/Components/UserDetails/DeactivateConfirmModal.js +5 -5
  136. package/dist/Components/UserDetails/UserDetails.js +14 -16
  137. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
  138. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
  139. package/dist/Constants/Sidebar.js +3 -2
  140. package/dist/Theme/assertPalette.d.ts +11 -0
  141. package/dist/Theme/assertPalette.js +55 -0
  142. package/dist/Theme/chakra/Avatar.styles.d.ts +5 -5
  143. package/dist/Theme/chakra/Avatar.styles.js +2 -2
  144. package/dist/Theme/chakra/Drawer.styles.d.ts +5 -5
  145. package/dist/Theme/chakra/Drawer.styles.js +8 -10
  146. package/dist/Theme/chakra/Menu.styles.d.ts +9 -6
  147. package/dist/Theme/chakra/Menu.styles.js +11 -5
  148. package/dist/Theme/chakra/Modal.styles.d.ts +5 -5
  149. package/dist/Theme/chakra/Modal.styles.js +8 -10
  150. package/dist/Theme/chakra/Popover.styles.d.ts +9 -6
  151. package/dist/Theme/chakra/Popover.styles.js +11 -6
  152. package/dist/Theme/chakra/Slider.styles.d.ts +1 -1
  153. package/dist/Theme/chakra/Slider.styles.js +7 -9
  154. package/dist/Theme/chakra/Switch.styles.d.ts +1 -1
  155. package/dist/Theme/chakra/Switch.styles.js +7 -9
  156. package/dist/Theme/chakra/Tabs.styles.d.ts +2 -2
  157. package/dist/Theme/chakra/Tabs.styles.js +13 -18
  158. package/dist/Theme/chakra/componentStyles.d.ts +69 -30
  159. package/dist/Theme/chakra/componentStyles.js +52 -43
  160. package/dist/Theme/chakra/createBrandTheme.js +3 -16
  161. package/dist/Theme/chakra/paletteFromTheme.d.ts +10 -0
  162. package/dist/Theme/chakra/paletteFromTheme.js +14 -0
  163. package/dist/Theme/provider/PixelizeThemeProvider.js +23 -20
  164. package/dist/Theme/provider/ThemeSwitcher.js +13 -20
  165. package/dist/Theme/testing/testPalette.d.ts +16 -0
  166. package/dist/Theme/testing/testPalette.js +24 -0
  167. package/dist/Theme/tokens/brands/emerald/palette.light.d.ts +2 -373
  168. package/dist/Theme/tokens/brands/emerald/palette.light.js +5 -7
  169. package/dist/Theme/tokens/brands/index.d.ts +3 -2
  170. package/dist/Theme/tokens/brands/index.js +29 -23
  171. package/dist/Theme/tokens/brands/lavender/palette.light.d.ts +2 -373
  172. package/dist/Theme/tokens/brands/lavender/palette.light.js +5 -116
  173. package/dist/Theme/tokens/brands/meadow/palette.light.d.ts +2 -373
  174. package/dist/Theme/tokens/brands/meadow/palette.light.js +5 -7
  175. package/dist/Theme/tokens/brands/neutrals.d.ts +8 -0
  176. package/dist/Theme/tokens/brands/neutrals.js +119 -0
  177. package/dist/Theme/tokens/brands/radiant/palette.light.d.ts +2 -373
  178. package/dist/Theme/tokens/brands/radiant/palette.light.js +5 -7
  179. package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts +2 -373
  180. package/dist/Theme/tokens/brands/rosewood/palette.light.js +5 -7
  181. package/dist/Theme/tokens/brands/skyline/palette.light.d.ts +2 -373
  182. package/dist/Theme/tokens/brands/skyline/palette.light.js +5 -7
  183. package/dist/Theme/tokens/brands/slate/palette.light.d.ts +2 -373
  184. package/dist/Theme/tokens/brands/slate/palette.light.js +7 -13
  185. package/dist/Theme/tokens/brands/storefront/palette.light.d.ts +2 -373
  186. package/dist/Theme/tokens/brands/storefront/palette.light.js +5 -7
  187. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +5 -3
  188. package/dist/Theme/tokens/brands/zinc/palette.dark.js +2 -1
  189. package/dist/Theme/tokens/brands/zinc/palette.light.d.ts +2 -373
  190. package/dist/Theme/tokens/builders/accentText.d.ts +2 -2
  191. package/dist/Theme/tokens/builders/accentText.js +8 -27
  192. package/dist/Theme/tokens/builders/brandInk.d.ts +11 -0
  193. package/dist/Theme/tokens/builders/brandInk.js +106 -0
  194. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +2 -2
  195. package/dist/Theme/tokens/builders/buildDarkPalette.js +16 -8
  196. package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  197. package/dist/Theme/tokens/builders/gradientInk.d.ts +22 -0
  198. package/dist/Theme/tokens/builders/gradientInk.js +28 -0
  199. package/dist/Theme/tokens/builders/index.d.ts +3 -0
  200. package/dist/Theme/tokens/builders/index.js +3 -0
  201. package/dist/Theme/tokens/builders/mutedText.d.ts +5 -0
  202. package/dist/Theme/tokens/builders/mutedText.js +9 -0
  203. package/dist/Theme/tokens/builders/outlineRung.d.ts +39 -9
  204. package/dist/Theme/tokens/builders/outlineRung.js +92 -21
  205. package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
  206. package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
  207. package/dist/Theme/tokens/builders/resolvedRungs.d.ts +11 -0
  208. package/dist/Theme/tokens/builders/resolvedRungs.js +30 -0
  209. package/dist/Theme/tokens/builders/scrollbar.d.ts +12 -0
  210. package/dist/Theme/tokens/builders/scrollbar.js +57 -0
  211. package/dist/Theme/tokens/builders/semanticText.d.ts +10 -0
  212. package/dist/Theme/tokens/builders/semanticText.js +22 -0
  213. package/dist/Theme/tokens/builders/sidebarAccent.d.ts +9 -0
  214. package/dist/Theme/tokens/builders/sidebarAccent.js +29 -0
  215. package/dist/Theme/tokens/builders/statusTone.js +3 -4
  216. package/dist/Theme/tokens/builders/surfaceRungs.d.ts +10 -0
  217. package/dist/Theme/tokens/builders/surfaceRungs.js +54 -0
  218. package/dist/Theme/tokens/types.d.ts +41 -13
  219. package/dist/Theme/useCustomTheme.js +4 -1
  220. package/dist/Utils/table.d.ts +1 -7
  221. package/dist/Utils/table.js +27 -35
  222. package/dist/esm/Components/Accordion/Accordion.js +14 -16
  223. package/dist/esm/Components/Accordion/accordionColors.js +6 -9
  224. package/dist/esm/Components/AlertDialog/AlertDialog.js +1 -2
  225. package/dist/esm/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
  226. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
  227. package/dist/esm/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
  228. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +9 -7
  229. package/dist/esm/Components/Button/Button.styles.js +8 -13
  230. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +12 -13
  231. package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
  232. package/dist/esm/Components/Checkbox/Checkbox.styles.js +2 -0
  233. package/dist/esm/Components/Common/ErrorComponent.js +6 -9
  234. package/dist/esm/Components/Common/ErrorMessage.js +2 -8
  235. package/dist/esm/Components/Common/FormLabel.js +1 -3
  236. package/dist/esm/Components/Common/FormattedDescription.js +3 -1
  237. package/dist/esm/Components/Common/Label.js +3 -8
  238. package/dist/esm/Components/Common/fieldStyles.js +6 -7
  239. package/dist/esm/Components/ContactForm/ContactForm.js +1 -2
  240. package/dist/esm/Components/CopyButton/CopyButton.js +3 -6
  241. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +7 -10
  242. package/dist/esm/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
  243. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -3
  244. package/dist/esm/Components/DatePicker/CalendarPanel.js +3 -4
  245. package/dist/esm/Components/DatePicker/RangeDatePicker.js +9 -9
  246. package/dist/esm/Components/DatePicker/SingleDatePicker.js +11 -11
  247. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -2
  248. package/dist/esm/Components/DatePicker/TimePicker.js +6 -7
  249. package/dist/esm/Components/DatePicker/TimePickerInput.js +6 -7
  250. package/dist/esm/Components/Divider/Divider.js +1 -2
  251. package/dist/esm/Components/Drawer/Drawer.js +1 -2
  252. package/dist/esm/Components/Dropdown/DropDown.js +19 -33
  253. package/dist/esm/Components/Editor/Editor.js +11 -14
  254. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +3 -3
  255. package/dist/esm/Components/EmptyState/EmptyState.js +11 -11
  256. package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +1 -1
  257. package/dist/esm/Components/FilePreview/FilePreview.js +2 -2
  258. package/dist/esm/Components/FileUpload/FileUpload.js +18 -24
  259. package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
  260. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +157 -161
  261. package/dist/esm/Components/Form/FormWrapper.js +1 -2
  262. package/dist/esm/Components/Header/Header.js +6 -6
  263. package/dist/esm/Components/Header/HeaderActions.js +9 -5
  264. package/dist/esm/Components/Header/components/desktopMenu.js +8 -21
  265. package/dist/esm/Components/Header/components/mobileMenu.js +3 -15
  266. package/dist/esm/Components/Input/Input/Input.js +14 -18
  267. package/dist/esm/Components/Input/TextInput.styles.js +15 -16
  268. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +14 -14
  269. package/dist/esm/Components/KanbanBoard/AccountCard.js +10 -4
  270. package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -2
  271. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  272. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +15 -62
  273. package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
  274. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +5 -18
  275. package/dist/esm/Components/Loading/Loading.js +1 -1
  276. package/dist/esm/Components/Modal/Modal.js +3 -1
  277. package/dist/esm/Components/MoreItems/MoreItems.js +3 -7
  278. package/dist/esm/Components/MultiSelect/MultiSelect.js +5 -6
  279. package/dist/esm/Components/NavigationBar/NavigationBar.js +23 -19
  280. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +7 -9
  281. package/dist/esm/Components/Notification/Notification.js +18 -16
  282. package/dist/esm/Components/NumberInput/NumberInput.styles.js +14 -14
  283. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +8 -9
  284. package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +5 -1
  285. package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +1 -2
  286. package/dist/esm/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
  287. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +25 -22
  288. package/dist/esm/Components/PdfViewer/PdfViewer.js +1 -1
  289. package/dist/esm/Components/PinInput/PinInput.js +1 -1
  290. package/dist/esm/Components/PinInputs/PinInputs.js +8 -15
  291. package/dist/esm/Components/PlanPill/PlanPill.js +9 -12
  292. package/dist/esm/Components/PlanPill/planPillGradient.js +27 -15
  293. package/dist/esm/Components/ProductCard/ProductPrice.js +6 -6
  294. package/dist/esm/Components/ProductCard/ProductReview.js +4 -1
  295. package/dist/esm/Components/ProductCard/ProductTags.js +5 -5
  296. package/dist/esm/Components/ProductDetails/ProductDetails.js +3 -1
  297. package/dist/esm/Components/ProductDetails/ProductDtlPrice.js +3 -3
  298. package/dist/esm/Components/ProfileCard/ProfileCard.js +5 -5
  299. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +20 -17
  300. package/dist/esm/Components/RadioButton/RadioButton.js +1 -1
  301. package/dist/esm/Components/Reorder/Reorder.js +3 -4
  302. package/dist/esm/Components/RolesPermission/DeleteRoleModal.js +5 -4
  303. package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -14
  304. package/dist/esm/Components/ScrollToTop/ScrollToTop.js +2 -3
  305. package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -0
  306. package/dist/esm/Components/SearchSelect/SearchSelect.js +26 -28
  307. package/dist/esm/Components/Select/Select.styles.js +34 -37
  308. package/dist/esm/Components/SelectSearch/SelectSearch.js +10 -10
  309. package/dist/esm/Components/SelectV2/SelectV2.js +8 -20
  310. package/dist/esm/Components/SideBar/SecondaryBar.js +11 -16
  311. package/dist/esm/Components/SideBar/SideBar.js +43 -36
  312. package/dist/esm/Components/SideBar/components/MenuItemBox.js +11 -13
  313. package/dist/esm/Components/SideBar/components/MenuItems.js +3 -1
  314. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +8 -10
  315. package/dist/esm/Components/SideBar/components/OtherApps.js +4 -4
  316. package/dist/esm/Components/SideBar/sidebarAccentColors.js +5 -31
  317. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -7
  318. package/dist/esm/Components/Slider/Slider.js +2 -2
  319. package/dist/esm/Components/StageProgress/StageProgress.js +2 -9
  320. package/dist/esm/Components/StageProgress/StageProgressProps.js +9 -13
  321. package/dist/esm/Components/Table/Table.js +19 -30
  322. package/dist/esm/Components/Table/components/HeaderActions.js +6 -7
  323. package/dist/esm/Components/Table/components/Pagination.js +1 -1
  324. package/dist/esm/Components/Table/components/TableActions.js +4 -4
  325. package/dist/esm/Components/Table/components/TableBody.js +18 -20
  326. package/dist/esm/Components/Table/components/TableGroupRow.js +1 -2
  327. package/dist/esm/Components/Table/components/TableHeader.js +8 -12
  328. package/dist/esm/Components/Table/components/TableSearch.js +1 -2
  329. package/dist/esm/Components/Table/components/tableRowHoverStyle.js +2 -3
  330. package/dist/esm/Components/Table/filters/ActiveFilters.js +5 -24
  331. package/dist/esm/Components/Table/filters/CompactSelect.js +4 -5
  332. package/dist/esm/Components/Table/filters/LeftFilterPane.js +4 -5
  333. package/dist/esm/Components/Table/filters/TableFilters.js +1 -2
  334. package/dist/esm/Components/Table/hooks/useTable.js +8 -11
  335. package/dist/esm/Components/Table/settings/ManageColumns.js +4 -18
  336. package/dist/esm/Components/Table/settings/TableSettings.js +13 -21
  337. package/dist/esm/Components/Tag/Tag.styles.js +9 -7
  338. package/dist/esm/Components/Timeline/Timeline.js +33 -46
  339. package/dist/esm/Components/Toaster/Toaster.js +44 -45
  340. package/dist/esm/Components/ToolTip/ToolTip.js +1 -6
  341. package/dist/esm/Components/Trail/EditableCell.js +4 -1
  342. package/dist/esm/Components/Trail/TrailWorks.js +4 -4
  343. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +4 -6
  344. package/dist/esm/Components/UserDetails/AddUserModal.js +3 -3
  345. package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -2
  346. package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +5 -5
  347. package/dist/esm/Components/UserDetails/UserDetails.js +15 -17
  348. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
  349. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
  350. package/dist/esm/Constants/Sidebar.js +3 -2
  351. package/dist/esm/Theme/assertPalette.js +50 -0
  352. package/dist/esm/Theme/chakra/Avatar.styles.js +2 -2
  353. package/dist/esm/Theme/chakra/Drawer.styles.js +8 -10
  354. package/dist/esm/Theme/chakra/Menu.styles.js +11 -5
  355. package/dist/esm/Theme/chakra/Modal.styles.js +8 -10
  356. package/dist/esm/Theme/chakra/Popover.styles.js +11 -6
  357. package/dist/esm/Theme/chakra/Slider.styles.js +7 -9
  358. package/dist/esm/Theme/chakra/Switch.styles.js +7 -9
  359. package/dist/esm/Theme/chakra/Tabs.styles.js +13 -18
  360. package/dist/esm/Theme/chakra/componentStyles.js +53 -44
  361. package/dist/esm/Theme/chakra/createBrandTheme.js +3 -16
  362. package/dist/esm/Theme/chakra/paletteFromTheme.js +9 -0
  363. package/dist/esm/Theme/provider/PixelizeThemeProvider.js +23 -20
  364. package/dist/esm/Theme/provider/ThemeSwitcher.js +13 -20
  365. package/dist/esm/Theme/testing/testPalette.js +19 -0
  366. package/dist/esm/Theme/tokens/brands/emerald/palette.light.js +5 -4
  367. package/dist/esm/Theme/tokens/brands/index.js +28 -23
  368. package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +5 -116
  369. package/dist/esm/Theme/tokens/brands/meadow/palette.light.js +5 -4
  370. package/dist/esm/Theme/tokens/brands/neutrals.js +116 -0
  371. package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +5 -4
  372. package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +5 -4
  373. package/dist/esm/Theme/tokens/brands/skyline/palette.light.js +5 -4
  374. package/dist/esm/Theme/tokens/brands/slate/palette.light.js +7 -10
  375. package/dist/esm/Theme/tokens/brands/storefront/palette.light.js +5 -4
  376. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -2
  377. package/dist/esm/Theme/tokens/builders/accentText.js +8 -27
  378. package/dist/esm/Theme/tokens/builders/brandInk.js +103 -0
  379. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +17 -9
  380. package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  381. package/dist/esm/Theme/tokens/builders/gradientInk.js +22 -0
  382. package/dist/esm/Theme/tokens/builders/index.js +3 -0
  383. package/dist/esm/Theme/tokens/builders/mutedText.js +5 -0
  384. package/dist/esm/Theme/tokens/builders/outlineRung.js +89 -21
  385. package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
  386. package/dist/esm/Theme/tokens/builders/resolvedRungs.js +25 -0
  387. package/dist/esm/Theme/tokens/builders/scrollbar.js +52 -0
  388. package/dist/esm/Theme/tokens/builders/semanticText.js +17 -0
  389. package/dist/esm/Theme/tokens/builders/sidebarAccent.js +23 -0
  390. package/dist/esm/Theme/tokens/builders/statusTone.js +3 -4
  391. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +48 -0
  392. package/dist/esm/Theme/useCustomTheme.js +4 -1
  393. package/dist/esm/Utils/table.js +28 -36
  394. package/dist/esm/index.js +6 -1
  395. package/dist/index.d.ts +10 -1
  396. package/dist/index.js +24 -3
  397. package/package.json +4 -2
@@ -3,7 +3,7 @@ import { Box, Flex, Spinner, Text, Tooltip, useBreakpointValue, } from "@chakra-
3
3
  import { ArrowRight, FileText, IndianRupee, Paperclip, Pencil, PencilLine, Plus, StickyNote, Trash2, Volleyball, } from "lucide-react";
4
4
  import React from "react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
- import { DEFAULT_CANVAS, accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
6
+ import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
7
7
  import { toWords } from "../../Utils/functions.js";
8
8
  import NoteTextArea from "../NoteTextArea/NoteTextArea.js";
9
9
  import { useEffect, useMemo, useRef, useState } from "react";
@@ -18,8 +18,6 @@ const TIME_FMT = new Intl.DateTimeFormat("en-US", {
18
18
  minute: "2-digit",
19
19
  hour12: true,
20
20
  });
21
- // Stable identity, so a theme without a palette does not invalidate every memoised card.
22
- const EMPTY_COLORS = {};
23
21
  const formatTimestamp = (timestamp, type) => {
24
22
  if (typeof timestamp === "string" && !timestamp.match(/^\d+$/)) {
25
23
  const date = new Date(timestamp);
@@ -49,15 +47,14 @@ const formatTimestamp = (timestamp, type) => {
49
47
  };
50
48
  // A semantic color scale chosen by the action title (created / updated / delete).
51
49
  const getEventScale = (colors, title) => {
52
- var _a, _b, _c, _d, _e, _f;
53
50
  switch ((title || "").toLowerCase()) {
54
51
  case "created":
55
- return (_b = (_a = colors.semantic) === null || _a === void 0 ? void 0 : _a.success) !== null && _b !== void 0 ? _b : colors.green;
52
+ return colors.semantic.success;
56
53
  case "updated":
57
- return (_d = (_c = colors.semantic) === null || _c === void 0 ? void 0 : _c.warning) !== null && _d !== void 0 ? _d : colors.orange;
54
+ return colors.semantic.warning;
58
55
  case "delete":
59
56
  case "deleted":
60
- return (_f = (_e = colors.semantic) === null || _e === void 0 ? void 0 : _e.error) !== null && _f !== void 0 ? _f : colors.red;
57
+ return colors.semantic.error;
61
58
  default:
62
59
  return colors.primary;
63
60
  }
@@ -138,50 +135,44 @@ const OFFSCREEN_SKIP = {
138
135
  // swapping to an inline NoteTextArea while editing.
139
136
  // Declared at module scope: inside Timeline's body it remounts every note on each render.
140
137
  const NoteItem = React.memo(function NoteItem({ note, event, index, colors, activeEditNoteId, setActiveEditNoteId, editNoteLoading, deletingNoteId, onEditNote, onDeleteNote, }) {
141
- 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, _0, _1, _2;
138
+ var _a, _b;
142
139
  const isEditing = activeEditNoteId === note.log_note_id;
143
140
  const isDeleting = deletingNoteId != null && deletingNoteId === note.log_note_id;
144
141
  if (isEditing) {
145
142
  return (_jsx(Box, { children: _jsx(NoteTextArea, { isEditable: true, value: (_a = note.note) !== null && _a !== void 0 ? _a : "", title: (_b = note.title) !== null && _b !== void 0 ? _b : "", saveButtonLoading: editNoteLoading, handleSubmit: (n, t, f) => onEditNote === null || onEditNote === void 0 ? void 0 : onEditNote(note.log_note_id, n, t, f, event, index), handleCancel: () => setActiveEditNoteId(null) }) }));
146
143
  }
147
- return (_jsxs(Box, { position: "relative", bg: (_c = colors.gray) === null || _c === void 0 ? void 0 : _c[50], border: `0.063rem solid ${(_e = (_d = colors.boxborder) === null || _d === void 0 ? void 0 : _d[200]) !== null && _e !== void 0 ? _e : (_f = colors.gray) === null || _f === void 0 ? void 0 : _f[200]}`, borderRadius: "lg", px: 2.5, py: 2, opacity: isDeleting ? 0.6 : 1, _hover: { ".timeline-note-actions": { opacity: 1 } }, _focusWithin: { ".timeline-note-actions": { opacity: 1 } }, children: [_jsxs(Flex, { align: "center", gap: 1.5, mb: note.note ? 1 : 0, children: [_jsx(Box, { as: "span", color: (_g = colors.primary) === null || _g === void 0 ? void 0 : _g[500], display: "inline-flex", children: _jsx(StickyNote, { size: 12 }) }), note.title && (_jsx(Text, { fontSize: "0.6875rem", fontWeight: 700, color: (_j = (_h = colors.text) === null || _h === void 0 ? void 0 : _h[800]) !== null && _j !== void 0 ? _j : (_k = colors.gray) === null || _k === void 0 ? void 0 : _k[800], noOfLines: 1, children: note.title })), (onEditNote || onDeleteNote) && (_jsx(Flex, { className: "timeline-note-actions", align: "center", gap: 0.5, ml: "auto", flexShrink: 0, opacity: isDeleting ? 1 : 0, transition: "opacity 0.15s ease", children: isDeleting ? (_jsx(Spinner, { size: "xs", color: (_l = colors.gray) === null || _l === void 0 ? void 0 : _l[500] })) : (_jsxs(_Fragment, { children: [onEditNote && (_jsx(Tooltip, { label: "Edit", placement: "top", hasArrow: true, children: _jsx(Box, { as: "button", type: "button", "aria-label": "Edit note", display: "inline-flex", alignItems: "center", justifyContent: "center", p: 1, borderRadius: "md", color: (_m = colors.gray) === null || _m === void 0 ? void 0 : _m[500], bg: "transparent", cursor: "pointer", _hover: {
148
- bg: (_o = colors.primary) === null || _o === void 0 ? void 0 : _o[50],
149
- color: (_p = colors.primary) === null || _p === void 0 ? void 0 : _p[600],
144
+ return (_jsxs(Box, { position: "relative", bg: colors.gray[50], border: `0.063rem solid ${colors.boxborder[200]}`, borderRadius: "lg", px: 2.5, py: 2, opacity: isDeleting ? 0.6 : 1, _hover: { ".timeline-note-actions": { opacity: 1 } }, _focusWithin: { ".timeline-note-actions": { opacity: 1 } }, children: [_jsxs(Flex, { align: "center", gap: 1.5, mb: note.note ? 1 : 0, children: [_jsx(Box, { as: "span", color: accentTextOnCanvas(colors.primary, colors.gray[50]), display: "inline-flex", children: _jsx(StickyNote, { size: 12 }) }), note.title && (_jsx(Text, { fontSize: "0.6875rem", fontWeight: 700, color: colors.text[800], noOfLines: 1, children: note.title })), (onEditNote || onDeleteNote) && (_jsx(Flex, { className: "timeline-note-actions", align: "center", gap: 0.5, ml: "auto", flexShrink: 0, opacity: isDeleting ? 1 : 0, transition: "opacity 0.15s ease", children: isDeleting ? (_jsx(Spinner, { size: "xs", color: colors.textMuted })) : (_jsxs(_Fragment, { children: [onEditNote && (_jsx(Tooltip, { label: "Edit", placement: "top", hasArrow: true, children: _jsx(Box, { as: "button", type: "button", "aria-label": "Edit note", display: "inline-flex", alignItems: "center", justifyContent: "center", p: 1, borderRadius: "md", color: colors.textMuted, bg: "transparent", cursor: "pointer", _hover: {
145
+ bg: colors.primary[50],
146
+ color: accentTextOnCanvas(colors.primary, colors.primary[50]),
150
147
  }, onClick: (e) => {
151
148
  e.stopPropagation();
152
149
  setActiveEditNoteId(note.log_note_id);
153
- }, children: _jsx(Pencil, { size: 12 }) }) })), onDeleteNote && (_jsx(Tooltip, { label: "Delete", placement: "top", hasArrow: true, children: _jsx(Box, { as: "button", type: "button", "aria-label": "Delete note", display: "inline-flex", alignItems: "center", justifyContent: "center", p: 1, borderRadius: "md", color: (_q = colors.gray) === null || _q === void 0 ? void 0 : _q[500], bg: "transparent", cursor: "pointer", _hover: {
154
- bg: (_t = (_s = (_r = colors.semantic) === null || _r === void 0 ? void 0 : _r.error) === null || _s === void 0 ? void 0 : _s[50]) !== null && _t !== void 0 ? _t : (_u = colors.red) === null || _u === void 0 ? void 0 : _u[50],
155
- color: (_x = (_w = (_v = colors.semantic) === null || _v === void 0 ? void 0 : _v.error) === null || _w === void 0 ? void 0 : _w[600]) !== null && _x !== void 0 ? _x : (_y = colors.red) === null || _y === void 0 ? void 0 : _y[600],
150
+ }, children: _jsx(Pencil, { size: 12 }) }) })), onDeleteNote && (_jsx(Tooltip, { label: "Delete", placement: "top", hasArrow: true, children: _jsx(Box, { as: "button", type: "button", "aria-label": "Delete note", display: "inline-flex", alignItems: "center", justifyContent: "center", p: 1, borderRadius: "md", color: colors.textMuted, bg: "transparent", cursor: "pointer", _hover: {
151
+ bg: colors.semantic.error[50],
152
+ color: accentTextOnCanvas(colors.semantic.error, colors.semantic.error[50]),
156
153
  }, onClick: (e) => {
157
154
  e.stopPropagation();
158
155
  onDeleteNote === null || onDeleteNote === void 0 ? void 0 : onDeleteNote(note.log_note_id, event, index);
159
- }, children: _jsx(Trash2, { size: 12 }) }) }))] })) }))] }), note.note && (_jsx(Text, { fontSize: "0.6875rem", color: (_0 = (_z = colors.text) === null || _z === void 0 ? void 0 : _z[700]) !== null && _0 !== void 0 ? _0 : (_1 = colors.gray) === null || _1 === void 0 ? void 0 : _1[700], whiteSpace: "pre-wrap", children: note.note })), note.attachments && note.attachments.length > 0 && (_jsx(Flex, { wrap: "wrap", gap: 1.5, mt: 1.5, children: note.attachments.map((att, attIndex) => {
160
- var _a, _b, _c;
161
- return (_jsxs(Flex, { as: "a", href: att.url, target: "_blank", rel: "noopener noreferrer", onClick: (e) => e.stopPropagation(), align: "center", gap: 1, px: 1.5, py: 0.5, borderRadius: "full", bg: (_a = colors.primary) === null || _a === void 0 ? void 0 : _a[50], color: (_b = colors.primary) === null || _b === void 0 ? void 0 : _b[700], fontSize: "0.625rem", maxW: "100%", _hover: { bg: (_c = colors.primary) === null || _c === void 0 ? void 0 : _c[100] }, children: [_jsx(Paperclip, { size: 10 }), _jsx(Box, { as: "span", noOfLines: 1, maxW: "9rem", children: att.name || "attachment" })] }, attIndex));
162
- }) })), (note.created_by || note.created_at) && (_jsxs(Text, { fontSize: "0.625rem", color: (_2 = colors.gray) === null || _2 === void 0 ? void 0 : _2[500], mt: 1, children: [note.created_by ? toWords(note.created_by) : "", note.created_by && note.created_at ? " · " : "", note.created_at ? formatTimestamp(note.created_at, "time") : ""] }))] }));
156
+ }, children: _jsx(Trash2, { size: 12 }) }) }))] })) }))] }), note.note && (_jsx(Text, { fontSize: "0.6875rem", color: colors.text[700], whiteSpace: "pre-wrap", children: note.note })), note.attachments && note.attachments.length > 0 && (_jsx(Flex, { wrap: "wrap", gap: 1.5, mt: 1.5, children: note.attachments.map((att, attIndex) => (_jsxs(Flex, { as: "a", href: att.url, target: "_blank", rel: "noopener noreferrer", onClick: (e) => e.stopPropagation(), align: "center", gap: 1, px: 1.5, py: 0.5, borderRadius: "full", bg: colors.primary[50], color: accentTextOnCanvas(colors.primary, colors.primary[50]), fontSize: "0.625rem", maxW: "100%", _hover: { bg: colors.primary[100] }, children: [_jsx(Paperclip, { size: 10 }), _jsx(Box, { as: "span", noOfLines: 1, maxW: "9rem", children: att.name || "attachment" })] }, attIndex))) })), (note.created_by || note.created_at) && (_jsxs(Text, { fontSize: "0.625rem", color: colors.textMuted, mt: 1, children: [note.created_by ? toWords(note.created_by) : "", note.created_by && note.created_at ? " · " : "", note.created_at ? formatTimestamp(note.created_at, "time") : ""] }))] }));
163
157
  });
164
158
  // The colored event card (shared by both the desktop "tree" and mobile rail).
165
159
  // `accent` decides which edge carries the colored bar (pointing toward the spine).
166
160
  // Declared at module scope: inside Timeline's body it remounts every card on each render.
167
161
  const EventCard = React.memo(function EventCard({ event, index, accent, colors, theme, isActiveNote, setActiveNoteEventIndex, activeEditNoteId, setActiveEditNoteId, showAddNote, addNoteLoading, editNoteLoading, deletingNoteId, onEventClick, onAddNote, onEditNote, onDeleteNote, }) {
168
- 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, _0, _1, _2, _3, _4, _5;
162
+ var _a;
169
163
  const scale = getEventScale(colors, event.title);
170
164
  const changes = useMemo(() => parseChanges(event.changes), [event.changes]);
171
165
  const clickable = typeof onEventClick === "function";
172
- return (_jsxs(Box, { _hover: { ".timeline-add-note": { opacity: 1 } }, _focusWithin: { ".timeline-add-note": { opacity: 1 } }, children: [_jsxs(Box, { as: clickable ? "button" : undefined, type: clickable ? "button" : undefined, display: clickable ? "block" : undefined, w: clickable ? "100%" : undefined, textAlign: clickable ? "start" : undefined, position: "relative", zIndex: 1, bg: (_b = (_a = colors.background) === null || _a === void 0 ? void 0 : _a[50]) !== null && _b !== void 0 ? _b : (_c = colors.backgroundColor) === null || _c === void 0 ? void 0 : _c.light, border: `0.063rem solid ${(_e = (_d = colors.boxborder) === null || _d === void 0 ? void 0 : _d[300]) !== null && _e !== void 0 ? _e : (_f = colors.gray) === null || _f === void 0 ? void 0 : _f[200]}`, borderInlineStartWidth: accent === "left" ? "0.1875rem" : undefined, borderInlineEndWidth: accent === "right" ? "0.1875rem" : undefined, borderInlineStartColor: accent === "left" ? scale === null || scale === void 0 ? void 0 : scale[400] : undefined, borderInlineEndColor: accent === "right" ? scale === null || scale === void 0 ? void 0 : scale[400] : undefined, borderRadius: "xl", px: 3.5, py: 2.5, transition: "all 0.15s ease", cursor: clickable ? "pointer" : "default", onClick: clickable ? () => onEventClick(event, index) : undefined, _hover: {
173
- borderColor: (_g = scale === null || scale === void 0 ? void 0 : scale[300]) !== null && _g !== void 0 ? _g : (_h = colors.gray) === null || _h === void 0 ? void 0 : _h[300],
174
- boxShadow: (_j = theme.shadows) === null || _j === void 0 ? void 0 : _j.md,
166
+ return (_jsxs(Box, { _hover: { ".timeline-add-note": { opacity: 1 } }, _focusWithin: { ".timeline-add-note": { opacity: 1 } }, children: [_jsxs(Box, { as: clickable ? "button" : undefined, type: clickable ? "button" : undefined, display: clickable ? "block" : undefined, w: clickable ? "100%" : undefined, textAlign: clickable ? "start" : undefined, position: "relative", zIndex: 1, bg: colors.background[50], border: `0.063rem solid ${colors.boxborder[200]}`, borderInlineStartWidth: accent === "left" ? "0.1875rem" : undefined, borderInlineEndWidth: accent === "right" ? "0.1875rem" : undefined, borderInlineStartColor: accent === "left" ? scale[400] : undefined, borderInlineEndColor: accent === "right" ? scale[400] : undefined, borderRadius: "xl", px: 3.5, py: 2.5, transition: "all 0.15s ease", cursor: clickable ? "pointer" : "default", onClick: clickable ? () => onEventClick(event, index) : undefined, _hover: {
167
+ borderColor: scale[300],
168
+ boxShadow: (_a = theme.shadows) === null || _a === void 0 ? void 0 : _a.md,
175
169
  transform: clickable ? "translateY(-1px)" : undefined,
176
- }, children: [_jsxs(Flex, { align: "center", justify: "space-between", gap: 2, flexWrap: "wrap", children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(Text, { fontSize: "0.8125rem", fontWeight: 600, color: (_l = (_k = colors.text) === null || _k === void 0 ? void 0 : _k[800]) !== null && _l !== void 0 ? _l : (_m = colors.gray) === null || _m === void 0 ? void 0 : _m[800], noOfLines: 1, children: event.action_from }), _jsx(Box, { as: "span", fontSize: "0.6875rem", fontWeight: 600, lineHeight: "1", textTransform: "capitalize", color: accentTextOnCanvas(scale, (_o = scale === null || scale === void 0 ? void 0 : scale[50]) !== null && _o !== void 0 ? _o : DEFAULT_CANVAS), bg: scale === null || scale === void 0 ? void 0 : scale[50], border: `0.063rem solid ${(_p = scale === null || scale === void 0 ? void 0 : scale[200]) !== null && _p !== void 0 ? _p : (_q = colors.gray) === null || _q === void 0 ? void 0 : _q[200]}`, borderRadius: "full", px: 2, py: 1, children: event.title })] }), _jsx(Text, { fontSize: "0.6875rem", color: (_r = colors.gray) === null || _r === void 0 ? void 0 : _r[500], whiteSpace: "nowrap", children: formatTimestamp(event.created_at, "time") })] }), changes.length > 0 && (_jsx(Flex, { direction: "column", gap: 1, mt: 2, children: changes.map((c, i) => {
177
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
178
- return (_jsxs(Flex, { align: "center", gap: 1.5, fontSize: "0.6875rem", lineHeight: "1.4", flexWrap: "wrap", children: [_jsx(Text, { fontWeight: 600, color: (_b = (_a = colors.text) === null || _a === void 0 ? void 0 : _a[700]) !== null && _b !== void 0 ? _b : (_c = colors.gray) === null || _c === void 0 ? void 0 : _c[700], children: toWords(c.field) }), c.from !== null && c.from !== undefined && (_jsxs(_Fragment, { children: [_jsx(Box, { as: "span", color: (_d = colors.gray) === null || _d === void 0 ? void 0 : _d[500], bg: (_e = colors.gray) === null || _e === void 0 ? void 0 : _e[50], borderRadius: "base", px: 1.5, textDecoration: "line-through", maxW: "10rem", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: String(c.from) }), _jsx(Box, { as: "span", color: (_f = colors.gray) === null || _f === void 0 ? void 0 : _f[400], display: "inline-flex", children: _jsx(ArrowRight, { size: 11 }) })] })), _jsx(Box, { as: "span", color: accentTextOnCanvas(((_h = (_g = colors.semantic) === null || _g === void 0 ? void 0 : _g.success) !== null && _h !== void 0 ? _h : colors.green), ((_l = (_k = (_j = colors.semantic) === null || _j === void 0 ? void 0 : _j.success) === null || _k === void 0 ? void 0 : _k[50]) !== null && _l !== void 0 ? _l : (_m = colors.green) === null || _m === void 0 ? void 0 : _m[50])), bg: (_q = (_p = (_o = colors.semantic) === null || _o === void 0 ? void 0 : _o.success) === null || _p === void 0 ? void 0 : _p[50]) !== null && _q !== void 0 ? _q : (_r = colors.green) === null || _r === void 0 ? void 0 : _r[50], borderRadius: "base", px: 1.5, maxW: "12rem", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: String(c.to) })] }, `${c.field}-${i}`));
179
- }) })), _jsxs(Flex, { align: "center", justify: "space-between", gap: 2, mt: 2, children: [_jsxs(Flex, { align: "center", gap: 2, children: [_jsx(Tooltip, { label: toWords(event.action_by), placement: "top", hasArrow: true, children: _jsx(Flex, { align: "center", justify: "center", boxSize: "1.25rem", minW: "1.25rem", borderRadius: "full", bg: (_u = (_t = (_s = colors.primary) === null || _s === void 0 ? void 0 : _s.opacity) === null || _t === void 0 ? void 0 : _t[16]) !== null && _u !== void 0 ? _u : (_v = colors.primary) === null || _v === void 0 ? void 0 : _v[50], color: (_w = colors.primary) === null || _w === void 0 ? void 0 : _w[600], fontSize: "0.5625rem", fontWeight: 700, children: initials(toWords(event.action_by)) }) }), _jsxs(Text, { fontSize: "0.6875rem", color: (_x = colors.gray) === null || _x === void 0 ? void 0 : _x[500], children: ["by", " ", _jsx(Box, { as: "span", color: (_z = (_y = colors.text) === null || _y === void 0 ? void 0 : _y[700]) !== null && _z !== void 0 ? _z : (_0 = colors.gray) === null || _0 === void 0 ? void 0 : _0[700], fontWeight: 500, children: toWords(event.action_by) })] })] }), showAddNote && (_jsx(Box, { className: "timeline-add-note", as: "button", type: "button", onClick: (e) => {
170
+ }, children: [_jsxs(Flex, { align: "center", justify: "space-between", gap: 2, flexWrap: "wrap", children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(Text, { fontSize: "0.8125rem", fontWeight: 600, color: colors.text[800], noOfLines: 1, children: event.action_from }), _jsx(Box, { as: "span", fontSize: "0.6875rem", fontWeight: 600, lineHeight: "1", textTransform: "capitalize", color: accentTextOnCanvas(scale, scale[50]), bg: scale[50], border: `0.063rem solid ${scale[200]}`, borderRadius: "full", px: 2, py: 1, children: event.title })] }), _jsx(Text, { fontSize: "0.6875rem", color: colors.textMuted, whiteSpace: "nowrap", children: formatTimestamp(event.created_at, "time") })] }), changes.length > 0 && (_jsx(Flex, { direction: "column", gap: 1, mt: 2, children: changes.map((c, i) => (_jsxs(Flex, { align: "center", gap: 1.5, fontSize: "0.6875rem", lineHeight: "1.4", flexWrap: "wrap", children: [_jsx(Text, { fontWeight: 600, color: colors.text[700], children: toWords(c.field) }), c.from !== null && c.from !== undefined && (_jsxs(_Fragment, { children: [_jsx(Box, { as: "span", color: colors.textMuted, bg: colors.gray[50], borderRadius: "base", px: 1.5, textDecoration: "line-through", maxW: "10rem", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: String(c.from) }), _jsx(Box, { as: "span", color: colors.textMuted, display: "inline-flex", children: _jsx(ArrowRight, { size: 11 }) })] })), _jsx(Box, { as: "span", color: accentTextOnCanvas(colors.semantic.success, colors.semantic.success[50]), bg: colors.semantic.success[50], borderRadius: "base", px: 1.5, maxW: "12rem", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: String(c.to) })] }, `${c.field}-${i}`))) })), _jsxs(Flex, { align: "center", justify: "space-between", gap: 2, mt: 2, children: [_jsxs(Flex, { align: "center", gap: 2, children: [_jsx(Tooltip, { label: toWords(event.action_by), placement: "top", hasArrow: true, children: _jsx(Flex, { align: "center", justify: "center", boxSize: "1.25rem", minW: "1.25rem", borderRadius: "full", bg: colors.primary.opacity[16], color: accentTextOnCanvas(colors.primary, colors.background[50]), fontSize: "0.5625rem", fontWeight: 700, children: initials(toWords(event.action_by)) }) }), _jsxs(Text, { fontSize: "0.6875rem", color: colors.textMuted, children: ["by", " ", _jsx(Box, { as: "span", color: colors.text[700], fontWeight: 500, children: toWords(event.action_by) })] })] }), showAddNote && (_jsx(Box, { className: "timeline-add-note", as: "button", type: "button", onClick: (e) => {
180
171
  e.stopPropagation();
181
172
  setActiveNoteEventIndex(isActiveNote ? null : index);
182
- }, opacity: isActiveNote ? 1 : 0, transition: "opacity 0.15s ease", px: 2, py: 1, borderRadius: "md", fontSize: "0.75rem", fontWeight: 600, color: (_1 = colors.primary) === null || _1 === void 0 ? void 0 : _1[700], bg: "transparent", cursor: "pointer", _hover: {
183
- bg: (_2 = colors.primary) === null || _2 === void 0 ? void 0 : _2[50],
184
- }, children: isActiveNote ? "Hide note" : "Add note" }))] }), event.notes && event.notes.length > 0 && (_jsx(Flex, { direction: "column", gap: 2, mt: 2, pt: 2, borderTop: `0.063rem solid ${(_4 = (_3 = colors.gray) === null || _3 === void 0 ? void 0 : _3[100]) !== null && _4 !== void 0 ? _4 : (_5 = colors.boxborder) === null || _5 === void 0 ? void 0 : _5[200]}`, children: event.notes.map((note, noteIndex) => {
173
+ }, opacity: isActiveNote ? 1 : 0, transition: "opacity 0.15s ease", px: 2, py: 1, borderRadius: "md", fontSize: "0.75rem", fontWeight: 600, color: accentTextOnCanvas(colors.primary, colors.background[50]), bg: "transparent", cursor: "pointer", _hover: {
174
+ bg: colors.primary[50],
175
+ }, children: isActiveNote ? "Hide note" : "Add note" }))] }), event.notes && event.notes.length > 0 && (_jsx(Flex, { direction: "column", gap: 2, mt: 2, pt: 2, borderTop: `0.063rem solid ${colors.gray[100]}`, children: event.notes.map((note, noteIndex) => {
185
176
  var _a;
186
177
  return (_jsx(NoteItem, { note: note, event: event, index: index, colors: colors, activeEditNoteId: activeEditNoteId, setActiveEditNoteId: setActiveEditNoteId, editNoteLoading: editNoteLoading, deletingNoteId: deletingNoteId, onEditNote: onEditNote, onDeleteNote: onDeleteNote }, (_a = note.log_note_id) !== null && _a !== void 0 ? _a : noteIndex));
187
178
  }) }))] }), isActiveNote && (_jsx(Box, { mt: 2, children: _jsx(NoteTextArea, { saveButtonLoading: addNoteLoading, handleSubmit: (note, title, files) => {
@@ -193,9 +184,8 @@ const EventCard = React.memo(function EventCard({ event, index, accent, colors,
193
184
  }, handleCancel: () => setActiveNoteEventIndex(null) }) }))] }));
194
185
  });
195
186
  const Timeline = ({ timelineEvents, onEventClick, onAddNote, onEditNote, onDeleteNote, showAddNote = false, addNoteLoading, editNoteLoading, deletingNoteId, }) => {
196
- var _a, _b, _c, _d, _e, _f, _g;
197
187
  const theme = useCustomTheme();
198
- const colors = (_a = theme.colors) !== null && _a !== void 0 ? _a : EMPTY_COLORS;
188
+ const colors = theme.colors;
199
189
  const isMobile = useBreakpointValue({ base: true, md: false });
200
190
  const [activeNoteEventIndex, setActiveNoteEventIndex] = useState(null);
201
191
  const [activeEditNoteId, setActiveEditNoteId] = useState(null);
@@ -217,33 +207,30 @@ const Timeline = ({ timelineEvents, onEventClick, onAddNote, onEditNote, onDelet
217
207
  }, [editNoteLoading]);
218
208
  const groupedEvents = useMemo(() => groupEventsByDate(timelineEvents !== null && timelineEvents !== void 0 ? timelineEvents : []), [timelineEvents]);
219
209
  if (!timelineEvents || timelineEvents.length === 0) {
220
- return (_jsxs(Flex, { direction: "column", align: "center", justify: "center", py: 12, gap: 2, color: (_b = colors.gray) === null || _b === void 0 ? void 0 : _b[500], children: [_jsx(Box, { boxSize: "2.75rem", borderRadius: "full", bg: (_c = colors.gray) === null || _c === void 0 ? void 0 : _c[100], display: "flex", alignItems: "center", justifyContent: "center", color: (_d = colors.gray) === null || _d === void 0 ? void 0 : _d[400], children: _jsx(Volleyball, { size: 20 }) }), _jsx(Text, { fontSize: "0.875rem", fontWeight: 500, children: "No timeline events to display" })] }));
210
+ return (_jsxs(Flex, { direction: "column", align: "center", justify: "center", py: 12, gap: 2, color: colors.textMuted, children: [_jsx(Box, { boxSize: "2.75rem", borderRadius: "full", bg: colors.gray[100], display: "flex", alignItems: "center", justifyContent: "center", color: accentTextOnCanvas(colors.gray, colors.gray[100]), children: _jsx(Volleyball, { size: 20 }) }), _jsx(Text, { fontSize: "0.875rem", fontWeight: 500, children: "No timeline events to display" })] }));
221
211
  }
222
212
  // -------------------------------------------------------------------------
223
213
  // Mobile: single left rail (alternating doesn't read well on narrow widths)
224
214
  // -------------------------------------------------------------------------
225
215
  if (isMobile) {
226
- return (_jsx(Box, { position: "relative", maxW: "100%", px: 2, py: 2, children: Object.keys(groupedEvents).map((date) => {
227
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
228
- return (_jsxs(Box, { mb: 2, children: [_jsxs(Flex, { align: "center", gap: 3, mb: 4, mt: 2, children: [_jsx(Text, { fontSize: "0.75rem", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.02em", color: (_a = colors.gray) === null || _a === void 0 ? void 0 : _a[500], bg: (_b = colors.gray) === null || _b === void 0 ? void 0 : _b[50], border: `0.063rem solid ${(_d = (_c = colors.boxborder) === null || _c === void 0 ? void 0 : _c[200]) !== null && _d !== void 0 ? _d : (_e = colors.gray) === null || _e === void 0 ? void 0 : _e[200]}`, borderRadius: "full", px: 3, py: 1, whiteSpace: "nowrap", children: date }), _jsx(Box, { flex: "1", h: "0.063rem", bg: (_g = (_f = colors.boxborder) === null || _f === void 0 ? void 0 : _f[200]) !== null && _g !== void 0 ? _g : (_h = colors.gray) === null || _h === void 0 ? void 0 : _h[200] })] }), _jsxs(Box, { position: "relative", children: [_jsx(Box, { position: "absolute", left: NODE_RADIUS, top: "0.5rem", bottom: "0.5rem", w: "0.1875rem", borderRadius: "full", bg: (_k = (_j = colors.gray) === null || _j === void 0 ? void 0 : _j[300]) !== null && _k !== void 0 ? _k : (_l = colors.boxborder) === null || _l === void 0 ? void 0 : _l[400], transform: "translateX(-50%)" }), groupedEvents[date].map(({ event, globalIndex }, index) => {
229
- var _a, _b, _c, _d, _e, _f;
230
- const scale = getEventScale(colors, event.title);
231
- return (_jsxs(Flex, { align: "flex-start", gap: 3, mb: index === groupedEvents[date].length - 1 ? 0 : 3, sx: OFFSCREEN_SKIP, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: NODE, minW: NODE, borderRadius: "full", bg: scale === null || scale === void 0 ? void 0 : scale[50], color: scale === null || scale === void 0 ? void 0 : scale[600], border: `0.125rem solid ${(_b = (_a = colors.background) === null || _a === void 0 ? void 0 : _a[50]) !== null && _b !== void 0 ? _b : (_c = colors.backgroundColor) === null || _c === void 0 ? void 0 : _c.light}`, boxShadow: `0 0 0 0.063rem ${(_d = scale === null || scale === void 0 ? void 0 : scale[200]) !== null && _d !== void 0 ? _d : (_e = colors.gray) === null || _e === void 0 ? void 0 : _e[200]}`, zIndex: 1, children: getIcon(event, 14) }), _jsx(Box, { flex: "1", minW: 0, children: _jsx(EventCard, { event: event, index: globalIndex, accent: "left", colors: colors, theme: theme, isActiveNote: activeNoteEventIndex === globalIndex, setActiveNoteEventIndex: setActiveNoteEventIndex, activeEditNoteId: activeEditNoteId, setActiveEditNoteId: setActiveEditNoteId, showAddNote: showAddNote, addNoteLoading: addNoteLoading, editNoteLoading: editNoteLoading, deletingNoteId: deletingNoteId, onEventClick: onEventClick, onAddNote: onAddNote, onEditNote: onEditNote, onDeleteNote: onDeleteNote }) })] }, `${(_f = event.logs_id) !== null && _f !== void 0 ? _f : date}-${index}`));
232
- })] })] }, date));
233
- }) }));
216
+ return (_jsx(Box, { position: "relative", maxW: "100%", px: 2, py: 2, children: Object.keys(groupedEvents).map((date) => (_jsxs(Box, { mb: 2, children: [_jsxs(Flex, { align: "center", gap: 3, mb: 4, mt: 2, children: [_jsx(Text, { fontSize: "0.75rem", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.02em", color: accentTextOnCanvas(colors.gray, colors.gray[50]), bg: colors.gray[50], border: `0.063rem solid ${colors.boxborder[200]}`, borderRadius: "full", px: 3, py: 1, whiteSpace: "nowrap", children: date }), _jsx(Box, { flex: "1", h: "0.063rem", bg: colors.boxborder[200] })] }), _jsxs(Box, { position: "relative", children: [_jsx(Box, { position: "absolute", left: NODE_RADIUS, top: "0.5rem", bottom: "0.5rem", w: "0.1875rem", borderRadius: "full", bg: colors.gray[300], transform: "translateX(-50%)" }), groupedEvents[date].map(({ event, globalIndex }, index) => {
217
+ var _a;
218
+ const scale = getEventScale(colors, event.title);
219
+ return (_jsxs(Flex, { align: "flex-start", gap: 3, mb: index === groupedEvents[date].length - 1 ? 0 : 3, sx: OFFSCREEN_SKIP, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: NODE, minW: NODE, borderRadius: "full", bg: scale[50], color: accentTextOnCanvas(scale, scale[50]), border: `0.125rem solid ${colors.background[50]}`, boxShadow: `0 0 0 0.063rem ${scale[200]}`, zIndex: 1, children: getIcon(event, 14) }), _jsx(Box, { flex: "1", minW: 0, children: _jsx(EventCard, { event: event, index: globalIndex, accent: "left", colors: colors, theme: theme, isActiveNote: activeNoteEventIndex === globalIndex, setActiveNoteEventIndex: setActiveNoteEventIndex, activeEditNoteId: activeEditNoteId, setActiveEditNoteId: setActiveEditNoteId, showAddNote: showAddNote, addNoteLoading: addNoteLoading, editNoteLoading: editNoteLoading, deletingNoteId: deletingNoteId, onEventClick: onEventClick, onAddNote: onAddNote, onEditNote: onEditNote, onDeleteNote: onDeleteNote }) })] }, `${(_a = event.logs_id) !== null && _a !== void 0 ? _a : date}-${index}`));
220
+ })] })] }, date))) }));
234
221
  }
235
222
  // -------------------------------------------------------------------------
236
223
  // Desktop: center spine with cards alternating left / right (the "tree")
237
224
  // -------------------------------------------------------------------------
238
- return (_jsxs(Box, { position: "relative", maxW: "60rem", mx: "auto", px: 4, py: 2, children: [_jsx(Box, { position: "absolute", left: "50%", top: "0.5rem", bottom: "0.5rem", w: "0.015rem", borderRadius: "full", bg: (_f = (_e = colors.gray) === null || _e === void 0 ? void 0 : _e[300]) !== null && _f !== void 0 ? _f : (_g = colors.boxborder) === null || _g === void 0 ? void 0 : _g[400], transform: "translateX(-50%)" }), Object.keys(groupedEvents).map((date) => {
239
- var _a, _b, _c, _d, _e, _f, _g, _h;
240
- return (_jsxs(Box, { mb: 2, children: [_jsx(Flex, { justify: "center", mb: 5, mt: 3, position: "relative", zIndex: 2, children: _jsx(Text, { fontSize: "0.75rem", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.02em", color: (_a = colors.gray) === null || _a === void 0 ? void 0 : _a[600], bg: (_c = (_b = colors.background) === null || _b === void 0 ? void 0 : _b[50]) !== null && _c !== void 0 ? _c : (_d = colors.backgroundColor) === null || _d === void 0 ? void 0 : _d.light, border: `0.063rem solid ${(_f = (_e = colors.boxborder) === null || _e === void 0 ? void 0 : _e[300]) !== null && _f !== void 0 ? _f : (_g = colors.gray) === null || _g === void 0 ? void 0 : _g[200]}`, boxShadow: (_h = theme.shadows) === null || _h === void 0 ? void 0 : _h.xs, borderRadius: "full", px: 4, py: 1.5, whiteSpace: "nowrap", children: date }) }), groupedEvents[date].map(({ event, globalIndex }, index) => {
241
- var _a, _b, _c, _d, _e, _f, _g, _h;
225
+ return (_jsxs(Box, { position: "relative", maxW: "60rem", mx: "auto", px: 4, py: 2, children: [_jsx(Box, { position: "absolute", left: "50%", top: "0.5rem", bottom: "0.5rem", w: "0.015rem", borderRadius: "full", bg: colors.gray[300], transform: "translateX(-50%)" }), Object.keys(groupedEvents).map((date) => {
226
+ var _a;
227
+ return (_jsxs(Box, { mb: 2, children: [_jsx(Flex, { justify: "center", mb: 5, mt: 3, position: "relative", zIndex: 2, children: _jsx(Text, { fontSize: "0.75rem", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.02em", color: colors.textMuted, bg: colors.background[50], border: `0.063rem solid ${colors.boxborder[200]}`, boxShadow: (_a = theme.shadows) === null || _a === void 0 ? void 0 : _a.xs, borderRadius: "full", px: 4, py: 1.5, whiteSpace: "nowrap", children: date }) }), groupedEvents[date].map(({ event, globalIndex }, index) => {
228
+ var _a;
242
229
  const isLeft = index % 2 === 0;
243
230
  const scale = getEventScale(colors, event.title);
244
- return (_jsxs(Box, { position: "relative", mb: index === groupedEvents[date].length - 1 ? 0 : 5, minH: NODE, sx: OFFSCREEN_SKIP, children: [_jsx(Box, { position: "absolute", top: "1.375rem", h: "0.125rem", w: "0.8125rem", bg: (_a = scale === null || scale === void 0 ? void 0 : scale[300]) !== null && _a !== void 0 ? _a : (_b = colors.gray) === null || _b === void 0 ? void 0 : _b[300], left: isLeft
231
+ return (_jsxs(Box, { position: "relative", mb: index === groupedEvents[date].length - 1 ? 0 : 5, minH: NODE, sx: OFFSCREEN_SKIP, children: [_jsx(Box, { position: "absolute", top: "1.375rem", h: "0.125rem", w: "0.8125rem", bg: scale[300], left: isLeft
245
232
  ? `calc(50% - ${SPINE_GAP})`
246
- : `calc(50% + ${NODE_RADIUS})`, zIndex: 0 }), _jsx(Flex, { position: "absolute", left: "50%", top: "0.5rem", transform: "translateX(-50%)", align: "center", justify: "center", boxSize: NODE, borderRadius: "full", bg: scale === null || scale === void 0 ? void 0 : scale[50], color: scale === null || scale === void 0 ? void 0 : scale[600], border: `0.125rem solid ${(_d = (_c = colors.background) === null || _c === void 0 ? void 0 : _c[50]) !== null && _d !== void 0 ? _d : (_e = colors.backgroundColor) === null || _e === void 0 ? void 0 : _e.light}`, boxShadow: `0 0 0 0.063rem ${(_f = scale === null || scale === void 0 ? void 0 : scale[200]) !== null && _f !== void 0 ? _f : (_g = colors.gray) === null || _g === void 0 ? void 0 : _g[200]}`, zIndex: 2, children: getIcon(event, 15) }), _jsx(Box, { position: "relative", zIndex: 1, w: `calc(50% - ${SPINE_GAP})`, ml: isLeft ? 0 : `calc(50% + ${SPINE_GAP})`, children: _jsx(EventCard, { event: event, index: globalIndex, accent: isLeft ? "right" : "left", colors: colors, theme: theme, isActiveNote: activeNoteEventIndex === globalIndex, setActiveNoteEventIndex: setActiveNoteEventIndex, activeEditNoteId: activeEditNoteId, setActiveEditNoteId: setActiveEditNoteId, showAddNote: showAddNote, addNoteLoading: addNoteLoading, editNoteLoading: editNoteLoading, deletingNoteId: deletingNoteId, onEventClick: onEventClick, onAddNote: onAddNote, onEditNote: onEditNote, onDeleteNote: onDeleteNote }) })] }, `${(_h = event.logs_id) !== null && _h !== void 0 ? _h : date}-${index}`));
233
+ : `calc(50% + ${NODE_RADIUS})`, zIndex: 0 }), _jsx(Flex, { position: "absolute", left: "50%", top: "0.5rem", transform: "translateX(-50%)", align: "center", justify: "center", boxSize: NODE, borderRadius: "full", bg: scale[50], color: accentTextOnCanvas(scale, scale[50]), border: `0.125rem solid ${colors.background[50]}`, boxShadow: `0 0 0 0.063rem ${scale[200]}`, zIndex: 2, children: getIcon(event, 15) }), _jsx(Box, { position: "relative", zIndex: 1, w: `calc(50% - ${SPINE_GAP})`, ml: isLeft ? 0 : `calc(50% + ${SPINE_GAP})`, children: _jsx(EventCard, { event: event, index: globalIndex, accent: isLeft ? "right" : "left", colors: colors, theme: theme, isActiveNote: activeNoteEventIndex === globalIndex, setActiveNoteEventIndex: setActiveNoteEventIndex, activeEditNoteId: activeEditNoteId, setActiveEditNoteId: setActiveEditNoteId, showAddNote: showAddNote, addNoteLoading: addNoteLoading, editNoteLoading: editNoteLoading, deletingNoteId: deletingNoteId, onEventClick: onEventClick, onAddNote: onAddNote, onEditNote: onEditNote, onDeleteNote: onDeleteNote }) })] }, `${(_a = event.logs_id) !== null && _a !== void 0 ? _a : date}-${index}`));
247
234
  })] }, date));
248
235
  })] }));
249
236
  };
@@ -1,9 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createContext, useCallback, useContext, useMemo, useState, } from "react";
3
- import { Box, CloseButton, Flex, Spinner, Text, useToast, useTheme, } from "@chakra-ui/react";
3
+ import { Box, CloseButton, Flex, Spinner, Text, useToast, } from "@chakra-ui/react";
4
4
  import { keyframes } from "@emotion/react";
5
5
  import { motion } from "framer-motion";
6
6
  import { CheckCircle2, AlertTriangle, Info, XCircle, } from "lucide-react";
7
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
8
+ import { isDarkCanvas } from "../../Theme/tokens/builders/accentText.js";
9
+ import { resolveStatusTone } from "../../Theme/tokens/builders/statusTone.js";
7
10
  const ToasterContext = createContext(undefined);
8
11
  const shrink = keyframes `
9
12
  from { transform: scaleX(1); }
@@ -22,12 +25,9 @@ const MotionBox = motion(Box);
22
25
  * action without the toast vanishing mid-reach.
23
26
  */
24
27
  function ToastCard({ onClose, title, description, actions, isClosable, duration, meta, colors: c, shadowLg, }) {
25
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
26
28
  const [paused, setPaused] = useState(false);
27
- const solid = (_b = (_a = meta.scale) === null || _a === void 0 ? void 0 : _a[500]) !== null && _b !== void 0 ? _b : (_c = c === null || c === void 0 ? void 0 : c.gray) === null || _c === void 0 ? void 0 : _c[500];
28
- const soft = (_e = (_d = meta.scale) === null || _d === void 0 ? void 0 : _d[50]) !== null && _e !== void 0 ? _e : (_f = c === null || c === void 0 ? void 0 : c.gray) === null || _f === void 0 ? void 0 : _f[50];
29
- const accent = (_h = (_g = meta.scale) === null || _g === void 0 ? void 0 : _g[600]) !== null && _h !== void 0 ? _h : solid;
30
- const ringTint = (_k = (_j = meta.scale) === null || _j === void 0 ? void 0 : _j[200]) !== null && _k !== void 0 ? _k : soft;
29
+ const mode = isDarkCanvas(c.backgroundColor.main) ? "dark" : "light";
30
+ const tone = resolveStatusTone(meta.scale, mode);
31
31
  const showProgress = typeof duration === "number" && duration > 0;
32
32
  return (_jsxs(MotionBox
33
33
  // Refined entrance — slides in from the right and settles, never a hard pop.
@@ -46,54 +46,53 @@ function ToastCard({ onClose, title, description, actions, isClosable, duration,
46
46
  initial: { opacity: 0, x: 24 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: 24 }, transition: { duration: 0.24, ease: [0.22, 1, 0.36, 1] }, onHoverStart: () => setPaused(true), onHoverEnd: () => setPaused(false), position: "relative",
47
47
  // Surface token, not `colors.white`: `white` is a foreground token and stays
48
48
  // white in dark mode. `background[50]` is #ffffff in light, near-black in dark.
49
- bg: (_l = c === null || c === void 0 ? void 0 : c.background) === null || _l === void 0 ? void 0 : _l[50], border: `0.063rem solid ${(_o = (_m = c === null || c === void 0 ? void 0 : c.boxborder) === null || _m === void 0 ? void 0 : _m[300]) !== null && _o !== void 0 ? _o : (_p = c === null || c === void 0 ? void 0 : c.gray) === null || _p === void 0 ? void 0 : _p[200]}`, boxShadow: shadowLg !== null && shadowLg !== void 0 ? shadowLg : "lg", borderRadius: "2xl", overflow: "hidden", minW: "22.5rem", maxW: "26rem", willChange: "transform, opacity", sx: {
49
+ bg: c.background[50], border: `0.063rem solid ${c.boxborder[200]}`, boxShadow: shadowLg !== null && shadowLg !== void 0 ? shadowLg : "lg", borderRadius: "2xl", overflow: "hidden", minW: "22.5rem", maxW: "26rem", willChange: "transform, opacity", sx: {
50
50
  transition: "box-shadow 0.18s ease",
51
51
  _hover: { boxShadow: "xl" },
52
- }, children: [_jsxs(Flex, { p: 3.5, gap: 3, align: actions ? "flex-start" : "center", children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "2rem", minW: "2rem", borderRadius: "full", bg: soft, color: accent, sx: {
53
- ["--toast-pulse-color"]: ringTint,
52
+ }, children: [_jsxs(Flex, { p: 3.5, gap: 3, align: actions ? "flex-start" : "center", children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "2rem", minW: "2rem", borderRadius: "full", bg: tone.bg, color: tone.fg, sx: {
53
+ ["--toast-pulse-color"]: tone.border,
54
54
  animation: `${iconPulse} 900ms ease-out 1`,
55
- }, children: meta.icon }), _jsxs(Box, { flex: "1", minW: 0, children: [title && (_jsx(Text, { fontWeight: 600, fontSize: "0.875rem", lineHeight: "1.3", color: (_r = (_q = c === null || c === void 0 ? void 0 : c.text) === null || _q === void 0 ? void 0 : _q[800]) !== null && _r !== void 0 ? _r : (_s = c === null || c === void 0 ? void 0 : c.gray) === null || _s === void 0 ? void 0 : _s[800], children: title })), description && (_jsx(Text, { fontSize: "0.8125rem", lineHeight: "1.45", color: (_u = (_t = c === null || c === void 0 ? void 0 : c.gray) === null || _t === void 0 ? void 0 : _t[600]) !== null && _u !== void 0 ? _u : (_v = c === null || c === void 0 ? void 0 : c.text) === null || _v === void 0 ? void 0 : _v[600], mt: title ? "0.125rem" : 0, children: description })), actions && (_jsx(Flex, { gap: 2, mt: 2.5, align: "center", wrap: "wrap", children: actions(onClose) }))] }), isClosable && (_jsx(CloseButton, { onClick: onClose, size: "sm", color: (_w = c === null || c === void 0 ? void 0 : c.gray) === null || _w === void 0 ? void 0 : _w[400], borderRadius: "md", alignSelf: "flex-start", _hover: {
56
- bg: (_x = c === null || c === void 0 ? void 0 : c.gray) === null || _x === void 0 ? void 0 : _x[100],
57
- color: (_y = c === null || c === void 0 ? void 0 : c.gray) === null || _y === void 0 ? void 0 : _y[700],
58
- } }))] }), showProgress && (_jsx(Box, { position: "absolute", bottom: 0, left: 0, right: 0, h: "0.1875rem", bg: solid, opacity: 0.85, transformOrigin: "left", sx: {
55
+ }, children: meta.icon }), _jsxs(Box, { flex: "1", minW: 0, children: [title && (_jsx(Text, { fontWeight: 600, fontSize: "0.875rem", lineHeight: "1.3", color: c.text[800], children: title })), description && (_jsx(Text, { fontSize: "0.8125rem", lineHeight: "1.45", color: c.textMuted, mt: title ? "0.125rem" : 0, children: description })), actions && (_jsx(Flex, { gap: 2, mt: 2.5, align: "center", wrap: "wrap", children: actions(onClose) }))] }), isClosable && (_jsx(CloseButton, { onClick: onClose, size: "sm", color: c.textMuted, borderRadius: "md", alignSelf: "flex-start", _hover: {
56
+ bg: c.gray[100],
57
+ color: c.text[700],
58
+ } }))] }), showProgress && (_jsx(Box, { position: "absolute", bottom: 0, left: 0, right: 0, h: "0.1875rem", bg: meta.ink, opacity: 0.85, transformOrigin: "left", sx: {
59
59
  animation: `${shrink} ${duration}ms linear forwards`,
60
60
  animationPlayState: paused ? "paused" : "running",
61
61
  } }))] }));
62
62
  }
63
63
  export default function ToasterProvider({ children }) {
64
- var _a;
65
64
  const toast = useToast();
66
- const theme = useTheme();
65
+ const theme = useCustomTheme();
67
66
  const colors = theme.colors;
68
- const shadowLg = (_a = theme.shadows) === null || _a === void 0 ? void 0 : _a.lg;
69
- // Keyed off `theme.colors`, not the `?? {}` fallback: dark mode swaps the palette object, so
70
- // this must re-derive per mode or a toast fired after a switch paints the old mode's colors.
71
- const statusConfig = useMemo(() => {
72
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
73
- const c = colors !== null && colors !== void 0 ? colors : {};
74
- return {
75
- success: {
76
- scale: (_b = (_a = c.semantic) === null || _a === void 0 ? void 0 : _a.success) !== null && _b !== void 0 ? _b : c.green,
77
- icon: _jsx(CheckCircle2, { size: 18 }),
78
- },
79
- error: {
80
- scale: (_d = (_c = c.semantic) === null || _c === void 0 ? void 0 : _c.error) !== null && _d !== void 0 ? _d : c.red,
81
- icon: _jsx(XCircle, { size: 18 }),
82
- },
83
- warning: {
84
- scale: (_g = (_f = (_e = c.semantic) === null || _e === void 0 ? void 0 : _e.warning) !== null && _f !== void 0 ? _f : c.yellow) !== null && _g !== void 0 ? _g : c.orange,
85
- icon: _jsx(AlertTriangle, { size: 18 }),
86
- },
87
- info: {
88
- scale: (_j = (_h = c.semantic) === null || _h === void 0 ? void 0 : _h.info) !== null && _j !== void 0 ? _j : c.blue,
89
- icon: _jsx(Info, { size: 18 }),
90
- },
91
- loading: {
92
- scale: ((_k = c.primary) !== null && _k !== void 0 ? _k : c.gray),
93
- icon: _jsx(Spinner, { size: "sm", thickness: "0.125rem", speed: "0.7s" }),
94
- },
95
- };
96
- }, [colors]);
67
+ const shadowLg = theme.shadows.lg;
68
+ // Dark mode swaps the palette object, so this must re-derive per mode.
69
+ const statusConfig = useMemo(() => ({
70
+ success: {
71
+ scale: colors.semantic.success,
72
+ ink: colors.semanticText.success,
73
+ icon: _jsx(CheckCircle2, { size: 18 }),
74
+ },
75
+ error: {
76
+ scale: colors.semantic.error,
77
+ ink: colors.semanticText.error,
78
+ icon: _jsx(XCircle, { size: 18 }),
79
+ },
80
+ warning: {
81
+ scale: colors.semantic.warning,
82
+ ink: colors.semanticText.warning,
83
+ icon: _jsx(AlertTriangle, { size: 18 }),
84
+ },
85
+ info: {
86
+ scale: colors.semantic.info,
87
+ ink: colors.semanticText.info,
88
+ icon: _jsx(Info, { size: 18 }),
89
+ },
90
+ loading: {
91
+ scale: colors.primary,
92
+ ink: colors.accentText,
93
+ icon: _jsx(Spinner, { size: "sm", thickness: "0.125rem", speed: "0.7s" }),
94
+ },
95
+ }), [colors]);
97
96
  const showToast = useCallback(({ title, description, status = "info", duration = 5000, isClosable = true, position = "top-right", onClose, actions, }) => {
98
97
  var _a;
99
98
  const meta = (_a = statusConfig[status]) !== null && _a !== void 0 ? _a : statusConfig.info;
@@ -102,7 +101,7 @@ export default function ToasterProvider({ children }) {
102
101
  isClosable,
103
102
  position,
104
103
  onCloseComplete: onClose,
105
- render: ({ onClose }) => (_jsx(ToastCard, { onClose: onClose, title: title, description: description, actions: actions, isClosable: isClosable, duration: duration, meta: meta, colors: colors !== null && colors !== void 0 ? colors : {}, shadowLg: shadowLg })),
104
+ render: ({ onClose }) => (_jsx(ToastCard, { onClose: onClose, title: title, description: description, actions: actions, isClosable: isClosable, duration: duration, meta: meta, colors: colors, shadowLg: shadowLg })),
106
105
  });
107
106
  }, [toast, statusConfig, colors, shadowLg]);
108
107
  // Memoized because this provider wraps the whole app: an unstable value re-renders every
@@ -4,12 +4,7 @@ import { Tooltip as ChakraTooltip } from "@chakra-ui/react";
4
4
  import { useIsTruncated } from "../../Hooks/useIsTruncated.js";
5
5
  import { mergeRefs } from "../../Utils/mergeRefs.js";
6
6
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
7
- // Surface used when no Pixelize palette is in context — a bare `ChakraProvider`, or no
8
- // provider at all (Chakra's `useTheme()` yields `{}` there rather than throwing). Keeps
9
- // tooltips outside the Pixelize theme rendering exactly as they did before theming.
10
- const FALLBACK_SURFACE = "#12161B";
11
7
  export default function ToolTip({ placement = "top", label, children, hasArrow = true, fontSize = "14px", bg, color = "white", isDisabled, overflowOnly = false, isOpen, defaultIsOpen, openDelay = 0, closeDelay = 0, arrowSize = 10, closeOnClick = false, size, width, height, arrowPadding, arrowShadowColor, direction, gutter = 8, onClose, modifiers, closeOnPointerDown, styles, }) {
12
- var _a, _b, _c, _d;
13
8
  // Measure the child for `overflowOnly`. The hook is always called (Rules of
14
9
  // Hooks) but is fully inert unless `overflowOnly` is set — no layout reads,
15
10
  // no ResizeObserver, no re-renders for ordinary tooltips. Measurement never
@@ -20,7 +15,7 @@ export default function ToolTip({ placement = "top", label, children, hasArrow =
20
15
  // un-inverted, so it stays near-black in dark mode and the white label stays legible —
21
16
  // every other surface ramp flips light and would render the label invisible.
22
17
  const theme = useCustomTheme();
23
- const surface = (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _a === void 0 ? void 0 : _a.sidebar) === null || _b === void 0 ? void 0 : _b.background) === null || _c === void 0 ? void 0 : _c[500]) !== null && _d !== void 0 ? _d : FALLBACK_SURFACE;
18
+ const surface = theme.colors.sidebar.background[500];
24
19
  let content = children;
25
20
  let effectiveDisabled = isDisabled;
26
21
  if (overflowOnly && isValidElement(children)) {
@@ -2,7 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef } from "react";
3
3
  import { Box, Input, Button, Menu, MenuButton, MenuList, MenuItem, useOutsideClick, } from "@chakra-ui/react";
4
4
  import { ChevronDown } from "lucide-react";
5
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
+ import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
5
7
  export const EditableCell = ({ row, column, isEditable, handleCellClick, handleCellChange, }) => {
8
+ const { colors } = useCustomTheme();
6
9
  const cellRef = useRef(null);
7
10
  useOutsideClick({
8
11
  ref: cellRef,
@@ -17,7 +20,7 @@ export const EditableCell = ({ row, column, isEditable, handleCellClick, handleC
17
20
  return (_jsx(Box, { width: "50%", ref: cellRef, children: _jsx(Input, { type: "date", value: value, onChange: (e) => handleCellChange(row.id, column.label, e.target.value) }) }));
18
21
  }
19
22
  else if (column.label === "priority") {
20
- return (_jsx(Box, { width: "100%", ref: cellRef, children: _jsxs(Menu, { isOpen: true, children: [_jsx(MenuButton, { as: Button, rightIcon: _jsx(ChevronDown, {}), bg: "teal.50", color: "teal.900", _hover: { bg: "teal.100" }, _active: { bg: "teal.200" }, children: value }), _jsxs(MenuList, { children: [_jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "Low"), _hover: { bg: "teal.100" }, children: "Low" }), _jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "Medium"), _hover: { bg: "teal.100" }, children: "Medium" }), _jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "High"), _hover: { bg: "teal.100" }, children: "High" })] })] }) }));
23
+ return (_jsx(Box, { width: "100%", ref: cellRef, children: _jsxs(Menu, { isOpen: true, children: [_jsx(MenuButton, { as: Button, rightIcon: _jsx(ChevronDown, {}), bg: colors.teal[50], color: accentTextOnCanvas(colors.teal, colors.teal[50]), _hover: { bg: colors.teal[100] }, _active: { bg: colors.teal[200] }, children: value }), _jsxs(MenuList, { children: [_jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "Low"), _hover: { bg: colors.teal[100] }, children: "Low" }), _jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "Medium"), _hover: { bg: colors.teal[100] }, children: "Medium" }), _jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "High"), _hover: { bg: colors.teal[100] }, children: "High" })] })] }) }));
21
24
  }
22
25
  else {
23
26
  return (_jsx(Box, { width: "100%", ref: cellRef, children: _jsx(Input, { value: value, onChange: (e) => handleCellChange(row.id, column.label, e.target.value) }) }));
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Thead, Table, Tr, Th, Tbody, Td, Checkbox, useTheme, } from "@chakra-ui/react";
2
+ import { Box, Thead, Table, Tr, Th, Tbody, Td, Checkbox, } from "@chakra-ui/react";
3
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
3
4
  const TrailWorks = () => {
4
- var _a, _b, _c;
5
- const theme = useTheme();
6
- const cellBorder = (_b = (_a = theme.colors.border) === null || _a === void 0 ? void 0 : _a[500]) !== null && _b !== void 0 ? _b : (_c = theme.colors.gray) === null || _c === void 0 ? void 0 : _c[300];
5
+ const { colors } = useCustomTheme();
6
+ const cellBorder = colors.boxborder[200];
7
7
  const data = [
8
8
  {
9
9
  contact: "John Doe",
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Flex, Spinner, Text } from "@chakra-ui/react";
3
3
  import { Sparkles } from "lucide-react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
- import { onGradient } from "../../Theme/tokens/builders/accentText.js";
5
+ import { resolveGradient } from "../../Theme/tokens/builders/gradientInk.js";
6
6
  import { contrastRatio } from "../../Theme/tokens/builders/color.js";
7
7
  import { AA_NON_TEXT } from "../../Theme/tokens/builders/outlineRung.js";
8
8
  /** The brand's gold sparkle accent, kept only where it clears 3:1 on the button's own fill. */
@@ -15,11 +15,9 @@ const sizeMap = {
15
15
  lg: { px: "26px", py: "8px", font: "16px", sub: "11px", icon: 16, radius: "full" },
16
16
  };
17
17
  const UpgradeButton = ({ label, mobileLabel, subtitle, icon = Sparkles, iconColor, variant = "brand", gradient, size = "md", shimmer = true, isLoading = false, isDisabled = false, maxLabelWidth = "160px", ariaLabel, onClick, }) => {
18
- var _a, _b;
19
18
  const theme = useCustomTheme();
20
19
  const c = theme.colors;
21
- // Only reachable if a consumer hand-builds a palette without `gradient`; every shipped brand sets it.
22
- const themeGradient = (_a = c.gradient) !== null && _a !== void 0 ? _a : { from: c.primary[500], to: c.primary[700] };
20
+ const themeGradient = c.gradient;
23
21
  // `primary`/`secondary` at [500]->[700] / [400]->[600] sit in the mid-luminance band where
24
22
  // neither white nor black ink clears AA at both ends at once (measured worst-case as low as
25
23
  // 2.72:1 across brands — no ink choice fixes a gradient with no readable ink at all). One rung
@@ -35,10 +33,10 @@ const UpgradeButton = ({ label, mobileLabel, subtitle, icon = Sparkles, iconColo
35
33
  danger: { from: c.semantic.error[400], to: c.semantic.error[600] },
36
34
  info: { from: c.semantic.info[400], to: c.semantic.info[600] },
37
35
  };
38
- const resolved = (_b = gradient !== null && gradient !== void 0 ? gradient : variantGradient[variant]) !== null && _b !== void 0 ? _b : themeGradient;
39
36
  // `iconColor`'s gold default fails AA as body text against this gradient (measured ~1.4-3.3
40
37
  // across brands) — the label/subtitle share this computed ink instead.
41
- const ink = onGradient(resolved.from, resolved.to, c.white, c.black);
38
+ const resolved = resolveGradient(gradient !== null && gradient !== void 0 ? gradient : variantGradient[variant], c.white, c.black);
39
+ const ink = resolved.ink;
42
40
  // The gold only clears 1.4.11's 3:1 on a DARK gradient. zinc dark inverts `primary` to a
43
41
  // near-white fill, where gold-on-near-white measures ~1.3:1 and the icon vanishes, so fall
44
42
  // back to the label's ink whenever the gold misses either stop.
@@ -13,7 +13,7 @@ const emptyValues = {
13
13
  role: null,
14
14
  };
15
15
  const AddUserModal = ({ isOpen, onClose, roleOptions, isLoading, onSubmit, onAddRoleClick, upgradeNotice, labels, }) => {
16
- var _a, _b, _c, _d;
16
+ var _a;
17
17
  const { colors } = useCustomTheme();
18
18
  const [values, setValues] = useState(emptyValues);
19
19
  const [errors, setErrors] = useState({});
@@ -75,10 +75,10 @@ const AddUserModal = ({ isOpen, onClose, roleOptions, isLoading, onSubmit, onAdd
75
75
  type: "email",
76
76
  },
77
77
  ];
78
- return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, trapFocus: false, isCentered: true, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.background[50], borderRadius: "2xl", overflow: "hidden", children: [_jsxs(ModalHeader, { borderBottom: "1px solid", borderColor: (_b = (_a = colors === null || colors === void 0 ? void 0 : colors.boxborder) === null || _a === void 0 ? void 0 : _a[200]) !== null && _b !== void 0 ? _b : (_c = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _c === void 0 ? void 0 : _c[200], children: [labels.addNewUser, upgradeNotice] }), _jsx(ModalCloseButton, {}), _jsx(ModalBody, { py: 5, children: _jsxs(VStack, { spacing: 4, align: "stretch", children: [textFields.map((field) => (_jsx(FormControl, { isInvalid: !!errors[field.id], children: _jsx(TextInput, { id: field.id, name: field.id, type: field.type, label: field.label, placeholder: field.placeholder, value: values[field.id], onChange: handleChange(field.id), isRequired: true, error: !!errors[field.id], errorMessage: errors[field.id], width: "100%" }) }, field.id))), _jsx(FormControl, { isInvalid: !!errors.role, isRequired: true, children: _jsx(SearchSelect, { label: labels.role, options: roleOptions.map((item) => ({
78
+ return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, trapFocus: false, isCentered: true, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.background[50], borderRadius: "2xl", overflow: "hidden", children: [_jsxs(ModalHeader, { borderBottom: "1px solid", borderColor: colors.boxborder[200], children: [labels.addNewUser, upgradeNotice] }), _jsx(ModalCloseButton, {}), _jsx(ModalBody, { py: 5, children: _jsxs(VStack, { spacing: 4, align: "stretch", children: [textFields.map((field) => (_jsx(FormControl, { isInvalid: !!errors[field.id], children: _jsx(TextInput, { id: field.id, name: field.id, type: field.type, label: field.label, placeholder: field.placeholder, value: values[field.id], onChange: handleChange(field.id), isRequired: true, error: !!errors[field.id], errorMessage: errors[field.id], width: "100%" }) }, field.id))), _jsx(FormControl, { isInvalid: !!errors.role, isRequired: true, children: _jsx(SearchSelect, { label: labels.role, options: roleOptions.map((item) => ({
79
79
  id: item.id,
80
80
  label: item.label,
81
- })), value: (_d = values.role) !== null && _d !== void 0 ? _d : undefined, onSelect: (option) => {
81
+ })), value: (_a = values.role) !== null && _a !== void 0 ? _a : undefined, onSelect: (option) => {
82
82
  if (!option) {
83
83
  setValues((prev) => ({ ...prev, role: null }));
84
84
  }
@@ -6,7 +6,7 @@ import Button from "../Button/Button.js";
6
6
  import TextInput from "../Input/TextInput.js";
7
7
  import SearchSelect from "../SearchSelect/SearchSelect.js";
8
8
  const ChangeRoleModal = ({ isOpen, onClose, userId, email, currentRole, roleOptions, isLoading, onSubmit, onAddRoleClick, labels, }) => {
9
- var _a, _b, _c, _d, _e;
9
+ var _a;
10
10
  const { colors } = useCustomTheme();
11
11
  const [selectedRole, setSelectedRole] = useState(null);
12
12
  const [error, setError] = useState(null);
@@ -31,7 +31,7 @@ const ChangeRoleModal = ({ isOpen, onClose, userId, email, currentRole, roleOpti
31
31
  return;
32
32
  await (onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit({ userId, roleId: selectedRole.id }));
33
33
  };
34
- return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, trapFocus: false, isCentered: true, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: (_b = colors === null || colors === void 0 ? void 0 : colors.background) === null || _b === void 0 ? void 0 : _b[50], borderRadius: "2xl", overflow: "hidden", children: [_jsx(ModalHeader, { borderBottom: "1px solid", borderColor: (_d = (_c = colors === null || colors === void 0 ? void 0 : colors.boxborder) === null || _c === void 0 ? void 0 : _c[200]) !== null && _d !== void 0 ? _d : (_e = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _e === void 0 ? void 0 : _e[200], children: labels.changeRoleTitle }), _jsx(ModalCloseButton, {}), _jsx(ModalBody, { py: 5, children: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(TextInput, { label: labels.email, value: email !== null && email !== void 0 ? email : "", isDisabled: true, width: "100%" }), _jsx(FormControl, { isInvalid: !!error, isRequired: true, children: _jsx(SearchSelect, { label: labels.role, options: roleOptions.map((item) => ({
34
+ return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, trapFocus: false, isCentered: true, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.background[50], borderRadius: "2xl", overflow: "hidden", children: [_jsx(ModalHeader, { borderBottom: "1px solid", borderColor: colors.boxborder[200], children: labels.changeRoleTitle }), _jsx(ModalCloseButton, {}), _jsx(ModalBody, { py: 5, children: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(TextInput, { label: labels.email, value: email !== null && email !== void 0 ? email : "", isDisabled: true, width: "100%" }), _jsx(FormControl, { isInvalid: !!error, isRequired: true, children: _jsx(SearchSelect, { label: labels.role, options: roleOptions.map((item) => ({
35
35
  id: item.id,
36
36
  label: item.label,
37
37
  })), value: selectedRole !== null && selectedRole !== void 0 ? selectedRole : undefined, onSelect: (option) => {
@@ -2,13 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, HStack, VStack, Text, Flex, Box, } from "@chakra-ui/react";
3
3
  import { AlertTriangle, Trash2 } from "lucide-react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
+ import { isDarkCanvas } from "../../Theme/tokens/builders/accentText.js";
6
+ import { resolveStatusTone } from "../../Theme/tokens/builders/statusTone.js";
5
7
  import Button from "../Button/Button.js";
6
8
  const DeactivateConfirmModal = ({ isOpen, onClose, userName, isLoading, onConfirm, labels, }) => {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8
9
  const { colors } = useCustomTheme();
9
- return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[50], borderRadius: "2xl", overflow: "hidden", children: [_jsxs(ModalHeader, { borderBottom: "1px solid", borderColor: (_c = (_b = colors === null || colors === void 0 ? void 0 : colors.boxborder) === null || _b === void 0 ? void 0 : _b[200]) !== null && _c !== void 0 ? _c : (_d = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _d === void 0 ? void 0 : _d[200], display: "flex", alignItems: "center", gap: 3, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full",
10
- // `red` reverses in dark (50 → deep red); `semantic.error` does not, so it would
11
- // leave this disc pale pink on a near-black modal. Identical values in light.
12
- bg: (_e = colors === null || colors === void 0 ? void 0 : colors.red) === null || _e === void 0 ? void 0 : _e[50], color: (_f = colors === null || colors === void 0 ? void 0 : colors.red) === null || _f === void 0 ? void 0 : _f[500], children: _jsx(AlertTriangle, { size: 18 }) }), _jsx(Text, { fontSize: "1.05rem", fontWeight: 600, children: labels.confirmDeactivation })] }), _jsx(ModalCloseButton, {}), _jsx(ModalBody, { py: 6, children: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(Text, { fontSize: "md", fontWeight: 500, color: (_g = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _g === void 0 ? void 0 : _g[800], children: labels.deactivateConfirmQuestion }), _jsx(Box, { bg: (_h = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _h === void 0 ? void 0 : _h[50], borderRadius: "lg", p: 4, border: "1px solid", borderColor: (_k = (_j = colors === null || colors === void 0 ? void 0 : colors.boxborder) === null || _j === void 0 ? void 0 : _j[200]) !== null && _k !== void 0 ? _k : (_l = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _l === void 0 ? void 0 : _l[200], children: _jsxs(Text, { color: (_m = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _m === void 0 ? void 0 : _m[600], fontSize: "sm", children: [userName ? `${userName} ` : "", labels.deactivateConfirmDescription] }) }), _jsxs(HStack, { justifyContent: "flex-end", spacing: 3, pt: 2, children: [_jsx(Button, { label: labels.cancel, onClick: onClose, variant: "outline", size: "sm", colorScheme: "gray" }), _jsx(Button, { label: labels.deactivateUser, onClick: onConfirm, colorScheme: "red", size: "sm", isLoading: isLoading, leftIcon: _jsx(Trash2, { size: 16 }) })] })] }) })] })] }));
10
+ const mode = isDarkCanvas(colors.backgroundColor.main) ? "dark" : "light";
11
+ const errorTone = resolveStatusTone(colors.semantic.error, mode);
12
+ return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.background[50], borderRadius: "2xl", overflow: "hidden", children: [_jsxs(ModalHeader, { borderBottom: "1px solid", borderColor: colors.boxborder[200], display: "flex", alignItems: "center", gap: 3, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: errorTone.bg, color: errorTone.fg, children: _jsx(AlertTriangle, { size: 18 }) }), _jsx(Text, { fontSize: "1.05rem", fontWeight: 600, children: labels.confirmDeactivation })] }), _jsx(ModalCloseButton, {}), _jsx(ModalBody, { py: 6, children: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(Text, { fontSize: "md", fontWeight: 500, color: colors.text[900], children: labels.deactivateConfirmQuestion }), _jsx(Box, { bg: colors.gray[50], borderRadius: "lg", p: 4, border: "1px solid", borderColor: colors.boxborder[200], children: _jsxs(Text, { color: colors.textMuted, fontSize: "sm", children: [userName ? `${userName} ` : "", labels.deactivateConfirmDescription] }) }), _jsxs(HStack, { justifyContent: "flex-end", spacing: 3, pt: 2, children: [_jsx(Button, { label: labels.cancel, onClick: onClose, variant: "outline", size: "sm", colorScheme: "gray" }), _jsx(Button, { label: labels.deactivateUser, onClick: onConfirm, colorScheme: "red", size: "sm", isLoading: isLoading, leftIcon: _jsx(Trash2, { size: 16 }) })] })] }) })] })] }));
13
13
  };
14
14
  export default DeactivateConfirmModal;