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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) 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 +4 -10
  9. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +9 -10
  10. package/dist/Components/Common/ErrorComponent.js +5 -8
  11. package/dist/Components/Common/ErrorMessage.js +2 -8
  12. package/dist/Components/Common/FormLabel.js +1 -3
  13. package/dist/Components/Common/FormattedDescription.js +3 -1
  14. package/dist/Components/Common/Label.js +3 -8
  15. package/dist/Components/Common/fieldStyles.js +6 -7
  16. package/dist/Components/ContactForm/ContactForm.js +1 -2
  17. package/dist/Components/CopyButton/CopyButton.js +3 -6
  18. package/dist/Components/CustomModulesTable/CustomModulesTable.js +7 -10
  19. package/dist/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
  20. package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -3
  21. package/dist/Components/DatePicker/CalendarPanel.js +2 -3
  22. package/dist/Components/DatePicker/RangeDatePicker.js +9 -9
  23. package/dist/Components/DatePicker/SingleDatePicker.js +11 -11
  24. package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -2
  25. package/dist/Components/DatePicker/TimePicker.js +6 -7
  26. package/dist/Components/DatePicker/TimePickerInput.js +6 -7
  27. package/dist/Components/Divider/Divider.js +1 -2
  28. package/dist/Components/Drawer/Drawer.js +1 -2
  29. package/dist/Components/Dropdown/DropDown.js +22 -26
  30. package/dist/Components/Editor/Editor.js +10 -13
  31. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -2
  32. package/dist/Components/EmptyState/EmptyState.js +11 -11
  33. package/dist/Components/FieldSelectModal/FieldSelectModal.js +1 -1
  34. package/dist/Components/FilePreview/FilePreview.js +2 -2
  35. package/dist/Components/FileUpload/FileUpload.js +18 -24
  36. package/dist/Components/FileUploader/FileUploader.js +5 -6
  37. package/dist/Components/FilterSidebar/FilterSidebar.js +156 -160
  38. package/dist/Components/Form/FormWrapper.js +1 -2
  39. package/dist/Components/Header/Header.js +6 -6
  40. package/dist/Components/Header/HeaderActions.d.ts +3 -1
  41. package/dist/Components/Header/HeaderActions.js +8 -4
  42. package/dist/Components/Header/components/desktopMenu.js +7 -20
  43. package/dist/Components/Header/components/mobileMenu.js +3 -15
  44. package/dist/Components/Input/Input/Input.js +13 -17
  45. package/dist/Components/Input/TextInput.styles.js +10 -13
  46. package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -1
  47. package/dist/Components/InputTextArea/InputTextArea.style.js +10 -11
  48. package/dist/Components/KanbanBoard/AccountCard.js +10 -4
  49. package/dist/Components/KanbanBoard/AccountRow.js +1 -2
  50. package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  51. package/dist/Components/KanbanBoard/KanbanBoard.js +21 -28
  52. package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
  53. package/dist/Components/LimitReachedModal/LimitReachedModal.js +3 -15
  54. package/dist/Components/Loading/Loading.js +1 -1
  55. package/dist/Components/Modal/Modal.js +3 -1
  56. package/dist/Components/MoreItems/MoreItems.js +3 -7
  57. package/dist/Components/MultiSelect/MultiSelect.js +5 -6
  58. package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -1
  59. package/dist/Components/NavigationBar/NavigationBar.js +22 -18
  60. package/dist/Components/NavigationBar/NavigationBarProps.d.ts +5 -0
  61. package/dist/Components/NoteTextArea/NoteTextArea.js +4 -8
  62. package/dist/Components/Notification/Notification.js +17 -15
  63. package/dist/Components/NumberInput/NumberInput.styles.js +10 -11
  64. package/dist/Components/OrgSwitcher/OrgSwitcher.js +6 -7
  65. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +2 -0
  66. package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +6 -2
  67. package/dist/Components/OrganizationDetails/CreateOrgModal.js +1 -2
  68. package/dist/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
  69. package/dist/Components/OrganizationDetails/OrganizationDetails.js +25 -22
  70. package/dist/Components/PdfViewer/PdfViewer.js +1 -1
  71. package/dist/Components/PinInputs/PinInputs.js +7 -14
  72. package/dist/Components/PlanPill/PlanPill.js +5 -8
  73. package/dist/Components/PlanPill/planPillGradient.d.ts +19 -0
  74. package/dist/Components/PlanPill/planPillGradient.js +30 -1
  75. package/dist/Components/ProductCard/ProductPrice.js +6 -6
  76. package/dist/Components/ProductCard/ProductReview.js +4 -1
  77. package/dist/Components/ProductCard/ProductTags.js +4 -4
  78. package/dist/Components/ProductDetails/ProductDetails.js +3 -1
  79. package/dist/Components/ProductDetails/ProductDtlPrice.js +3 -3
  80. package/dist/Components/ProfileCard/ProfileCard.js +4 -4
  81. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +19 -16
  82. package/dist/Components/Reorder/Reorder.js +3 -4
  83. package/dist/Components/RolesPermission/DeleteRoleModal.js +5 -4
  84. package/dist/Components/RolesPermission/RolesPermission.js +12 -14
  85. package/dist/Components/ScrollToTop/ScrollToTop.js +2 -3
  86. package/dist/Components/SearchSelect/SearchSelect.js +25 -28
  87. package/dist/Components/Select/Select.styles.js +33 -37
  88. package/dist/Components/SelectSearch/SelectSearch.js +8 -8
  89. package/dist/Components/SelectV2/SelectV2.js +14 -20
  90. package/dist/Components/SideBar/SecondaryBar.js +10 -15
  91. package/dist/Components/SideBar/SideBar.d.ts +1 -1
  92. package/dist/Components/SideBar/SideBar.js +41 -34
  93. package/dist/Components/SideBar/SideBarProps.d.ts +6 -0
  94. package/dist/Components/SideBar/components/MenuItemBox.js +10 -12
  95. package/dist/Components/SideBar/components/MenuItems.js +3 -1
  96. package/dist/Components/SideBar/components/MenuPopoverContent.js +7 -9
  97. package/dist/Components/SideBar/components/OtherApps.js +4 -4
  98. package/dist/Components/SideBar/sidebarAccentColors.d.ts +4 -17
  99. package/dist/Components/SideBar/sidebarAccentColors.js +6 -33
  100. package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -7
  101. package/dist/Components/Slider/Slider.js +2 -2
  102. package/dist/Components/StageProgress/StageProgressProps.js +9 -13
  103. package/dist/Components/Table/Table.js +10 -10
  104. package/dist/Components/Table/components/HeaderActions.js +6 -7
  105. package/dist/Components/Table/components/Pagination.js +1 -1
  106. package/dist/Components/Table/components/TableActions.js +4 -4
  107. package/dist/Components/Table/components/TableBody.js +18 -20
  108. package/dist/Components/Table/components/TableGroupRow.js +1 -2
  109. package/dist/Components/Table/components/TableHeader.js +8 -12
  110. package/dist/Components/Table/components/TableSearch.js +1 -2
  111. package/dist/Components/Table/components/tableRowHoverStyle.js +2 -3
  112. package/dist/Components/Table/filters/ActiveFilters.js +5 -8
  113. package/dist/Components/Table/filters/CompactSelect.js +4 -5
  114. package/dist/Components/Table/filters/LeftFilterPane.js +4 -5
  115. package/dist/Components/Table/filters/TableFilters.js +1 -2
  116. package/dist/Components/Table/hooks/useTable.js +8 -11
  117. package/dist/Components/Table/settings/ManageColumns.js +1 -1
  118. package/dist/Components/Table/settings/TableSettings.js +12 -14
  119. package/dist/Components/Tag/Tag.styles.js +8 -6
  120. package/dist/Components/Timeline/Timeline.js +32 -45
  121. package/dist/Components/Toaster/Toaster.js +43 -44
  122. package/dist/Components/ToolTip/ToolTip.js +1 -6
  123. package/dist/Components/Trail/EditableCell.js +4 -1
  124. package/dist/Components/Trail/TrailWorks.js +3 -3
  125. package/dist/Components/UpgradeButton/UpgradeButton.js +2 -4
  126. package/dist/Components/UserDetails/AddUserModal.js +3 -3
  127. package/dist/Components/UserDetails/ChangeRoleModal.js +2 -2
  128. package/dist/Components/UserDetails/DeactivateConfirmModal.js +5 -5
  129. package/dist/Components/UserDetails/UserDetails.js +14 -16
  130. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
  131. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
  132. package/dist/Theme/assertPalette.d.ts +11 -0
  133. package/dist/Theme/assertPalette.js +55 -0
  134. package/dist/Theme/chakra/Avatar.styles.d.ts +5 -5
  135. package/dist/Theme/chakra/Avatar.styles.js +2 -2
  136. package/dist/Theme/chakra/Drawer.styles.d.ts +5 -5
  137. package/dist/Theme/chakra/Drawer.styles.js +8 -10
  138. package/dist/Theme/chakra/Modal.styles.d.ts +5 -5
  139. package/dist/Theme/chakra/Modal.styles.js +8 -10
  140. package/dist/Theme/chakra/Popover.styles.d.ts +3 -3
  141. package/dist/Theme/chakra/Slider.styles.d.ts +1 -1
  142. package/dist/Theme/chakra/Slider.styles.js +7 -9
  143. package/dist/Theme/chakra/Tabs.styles.d.ts +2 -2
  144. package/dist/Theme/chakra/Tabs.styles.js +13 -18
  145. package/dist/Theme/chakra/componentStyles.d.ts +54 -21
  146. package/dist/Theme/chakra/componentStyles.js +52 -43
  147. package/dist/Theme/chakra/paletteFromTheme.d.ts +10 -0
  148. package/dist/Theme/chakra/paletteFromTheme.js +14 -0
  149. package/dist/Theme/provider/PixelizeThemeProvider.js +5 -0
  150. package/dist/Theme/testing/testPalette.d.ts +16 -0
  151. package/dist/Theme/testing/testPalette.js +24 -0
  152. package/dist/Theme/tokens/brands/emerald/palette.light.d.ts +2 -373
  153. package/dist/Theme/tokens/brands/emerald/palette.light.js +5 -7
  154. package/dist/Theme/tokens/brands/index.d.ts +3 -2
  155. package/dist/Theme/tokens/brands/index.js +29 -23
  156. package/dist/Theme/tokens/brands/lavender/palette.light.d.ts +2 -373
  157. package/dist/Theme/tokens/brands/lavender/palette.light.js +3 -110
  158. package/dist/Theme/tokens/brands/meadow/palette.light.d.ts +2 -373
  159. package/dist/Theme/tokens/brands/meadow/palette.light.js +5 -7
  160. package/dist/Theme/tokens/brands/neutrals.d.ts +8 -0
  161. package/dist/Theme/tokens/brands/neutrals.js +119 -0
  162. package/dist/Theme/tokens/brands/radiant/palette.light.d.ts +2 -373
  163. package/dist/Theme/tokens/brands/radiant/palette.light.js +5 -7
  164. package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts +2 -373
  165. package/dist/Theme/tokens/brands/rosewood/palette.light.js +5 -7
  166. package/dist/Theme/tokens/brands/skyline/palette.light.d.ts +2 -373
  167. package/dist/Theme/tokens/brands/skyline/palette.light.js +5 -7
  168. package/dist/Theme/tokens/brands/slate/palette.light.d.ts +2 -373
  169. package/dist/Theme/tokens/brands/slate/palette.light.js +6 -8
  170. package/dist/Theme/tokens/brands/storefront/palette.light.d.ts +2 -373
  171. package/dist/Theme/tokens/brands/storefront/palette.light.js +5 -7
  172. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +5 -3
  173. package/dist/Theme/tokens/brands/zinc/palette.dark.js +2 -1
  174. package/dist/Theme/tokens/brands/zinc/palette.light.d.ts +2 -373
  175. package/dist/Theme/tokens/builders/accentText.d.ts +2 -2
  176. package/dist/Theme/tokens/builders/accentText.js +8 -27
  177. package/dist/Theme/tokens/builders/brandInk.d.ts +11 -0
  178. package/dist/Theme/tokens/builders/brandInk.js +106 -0
  179. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +2 -2
  180. package/dist/Theme/tokens/builders/buildDarkPalette.js +16 -8
  181. package/dist/Theme/tokens/builders/mutedText.d.ts +5 -0
  182. package/dist/Theme/tokens/builders/mutedText.js +9 -0
  183. package/dist/Theme/tokens/builders/outlineRung.d.ts +7 -6
  184. package/dist/Theme/tokens/builders/outlineRung.js +20 -18
  185. package/dist/Theme/tokens/builders/resolvedRungs.d.ts +7 -0
  186. package/dist/Theme/tokens/builders/resolvedRungs.js +25 -0
  187. package/dist/Theme/tokens/builders/semanticText.d.ts +10 -0
  188. package/dist/Theme/tokens/builders/semanticText.js +22 -0
  189. package/dist/Theme/tokens/builders/sidebarAccent.d.ts +9 -0
  190. package/dist/Theme/tokens/builders/sidebarAccent.js +29 -0
  191. package/dist/Theme/tokens/builders/statusTone.js +3 -4
  192. package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -0
  193. package/dist/Theme/tokens/builders/surfaceRungs.js +39 -0
  194. package/dist/Theme/tokens/types.d.ts +41 -13
  195. package/dist/Theme/useCustomTheme.js +4 -1
  196. package/dist/Utils/table.d.ts +1 -7
  197. package/dist/Utils/table.js +27 -35
  198. package/dist/esm/Components/Accordion/Accordion.js +14 -16
  199. package/dist/esm/Components/Accordion/accordionColors.js +6 -9
  200. package/dist/esm/Components/AlertDialog/AlertDialog.js +1 -2
  201. package/dist/esm/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
  202. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
  203. package/dist/esm/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
  204. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +9 -7
  205. package/dist/esm/Components/Button/Button.styles.js +4 -10
  206. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +9 -10
  207. package/dist/esm/Components/Common/ErrorComponent.js +6 -9
  208. package/dist/esm/Components/Common/ErrorMessage.js +2 -8
  209. package/dist/esm/Components/Common/FormLabel.js +1 -3
  210. package/dist/esm/Components/Common/FormattedDescription.js +3 -1
  211. package/dist/esm/Components/Common/Label.js +3 -8
  212. package/dist/esm/Components/Common/fieldStyles.js +6 -7
  213. package/dist/esm/Components/ContactForm/ContactForm.js +1 -2
  214. package/dist/esm/Components/CopyButton/CopyButton.js +3 -6
  215. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +7 -10
  216. package/dist/esm/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
  217. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -3
  218. package/dist/esm/Components/DatePicker/CalendarPanel.js +2 -3
  219. package/dist/esm/Components/DatePicker/RangeDatePicker.js +9 -9
  220. package/dist/esm/Components/DatePicker/SingleDatePicker.js +11 -11
  221. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -2
  222. package/dist/esm/Components/DatePicker/TimePicker.js +6 -7
  223. package/dist/esm/Components/DatePicker/TimePickerInput.js +6 -7
  224. package/dist/esm/Components/Divider/Divider.js +1 -2
  225. package/dist/esm/Components/Drawer/Drawer.js +1 -2
  226. package/dist/esm/Components/Dropdown/DropDown.js +22 -26
  227. package/dist/esm/Components/Editor/Editor.js +11 -14
  228. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -2
  229. package/dist/esm/Components/EmptyState/EmptyState.js +11 -11
  230. package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +1 -1
  231. package/dist/esm/Components/FilePreview/FilePreview.js +2 -2
  232. package/dist/esm/Components/FileUpload/FileUpload.js +18 -24
  233. package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
  234. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +157 -161
  235. package/dist/esm/Components/Form/FormWrapper.js +1 -2
  236. package/dist/esm/Components/Header/Header.js +6 -6
  237. package/dist/esm/Components/Header/HeaderActions.js +9 -5
  238. package/dist/esm/Components/Header/components/desktopMenu.js +8 -21
  239. package/dist/esm/Components/Header/components/mobileMenu.js +3 -15
  240. package/dist/esm/Components/Input/Input/Input.js +14 -18
  241. package/dist/esm/Components/Input/TextInput.styles.js +10 -13
  242. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +10 -11
  243. package/dist/esm/Components/KanbanBoard/AccountCard.js +10 -4
  244. package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -2
  245. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  246. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +21 -28
  247. package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
  248. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +4 -16
  249. package/dist/esm/Components/Loading/Loading.js +1 -1
  250. package/dist/esm/Components/Modal/Modal.js +3 -1
  251. package/dist/esm/Components/MoreItems/MoreItems.js +3 -7
  252. package/dist/esm/Components/MultiSelect/MultiSelect.js +5 -6
  253. package/dist/esm/Components/NavigationBar/NavigationBar.js +23 -19
  254. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +4 -8
  255. package/dist/esm/Components/Notification/Notification.js +18 -16
  256. package/dist/esm/Components/NumberInput/NumberInput.styles.js +10 -11
  257. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +7 -8
  258. package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +5 -1
  259. package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +1 -2
  260. package/dist/esm/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
  261. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +25 -22
  262. package/dist/esm/Components/PdfViewer/PdfViewer.js +1 -1
  263. package/dist/esm/Components/PinInputs/PinInputs.js +8 -15
  264. package/dist/esm/Components/PlanPill/PlanPill.js +6 -9
  265. package/dist/esm/Components/PlanPill/planPillGradient.js +24 -0
  266. package/dist/esm/Components/ProductCard/ProductPrice.js +6 -6
  267. package/dist/esm/Components/ProductCard/ProductReview.js +4 -1
  268. package/dist/esm/Components/ProductCard/ProductTags.js +5 -5
  269. package/dist/esm/Components/ProductDetails/ProductDetails.js +3 -1
  270. package/dist/esm/Components/ProductDetails/ProductDtlPrice.js +3 -3
  271. package/dist/esm/Components/ProfileCard/ProfileCard.js +5 -5
  272. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +20 -17
  273. package/dist/esm/Components/Reorder/Reorder.js +3 -4
  274. package/dist/esm/Components/RolesPermission/DeleteRoleModal.js +5 -4
  275. package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -14
  276. package/dist/esm/Components/ScrollToTop/ScrollToTop.js +2 -3
  277. package/dist/esm/Components/SearchSelect/SearchSelect.js +25 -28
  278. package/dist/esm/Components/Select/Select.styles.js +33 -37
  279. package/dist/esm/Components/SelectSearch/SelectSearch.js +8 -8
  280. package/dist/esm/Components/SelectV2/SelectV2.js +14 -20
  281. package/dist/esm/Components/SideBar/SecondaryBar.js +11 -16
  282. package/dist/esm/Components/SideBar/SideBar.js +43 -36
  283. package/dist/esm/Components/SideBar/components/MenuItemBox.js +11 -13
  284. package/dist/esm/Components/SideBar/components/MenuItems.js +3 -1
  285. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +8 -10
  286. package/dist/esm/Components/SideBar/components/OtherApps.js +4 -4
  287. package/dist/esm/Components/SideBar/sidebarAccentColors.js +5 -31
  288. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -7
  289. package/dist/esm/Components/Slider/Slider.js +2 -2
  290. package/dist/esm/Components/StageProgress/StageProgressProps.js +9 -13
  291. package/dist/esm/Components/Table/Table.js +10 -10
  292. package/dist/esm/Components/Table/components/HeaderActions.js +6 -7
  293. package/dist/esm/Components/Table/components/Pagination.js +1 -1
  294. package/dist/esm/Components/Table/components/TableActions.js +4 -4
  295. package/dist/esm/Components/Table/components/TableBody.js +18 -20
  296. package/dist/esm/Components/Table/components/TableGroupRow.js +1 -2
  297. package/dist/esm/Components/Table/components/TableHeader.js +8 -12
  298. package/dist/esm/Components/Table/components/TableSearch.js +1 -2
  299. package/dist/esm/Components/Table/components/tableRowHoverStyle.js +2 -3
  300. package/dist/esm/Components/Table/filters/ActiveFilters.js +5 -8
  301. package/dist/esm/Components/Table/filters/CompactSelect.js +4 -5
  302. package/dist/esm/Components/Table/filters/LeftFilterPane.js +4 -5
  303. package/dist/esm/Components/Table/filters/TableFilters.js +1 -2
  304. package/dist/esm/Components/Table/hooks/useTable.js +8 -11
  305. package/dist/esm/Components/Table/settings/ManageColumns.js +1 -1
  306. package/dist/esm/Components/Table/settings/TableSettings.js +12 -14
  307. package/dist/esm/Components/Tag/Tag.styles.js +9 -7
  308. package/dist/esm/Components/Timeline/Timeline.js +33 -46
  309. package/dist/esm/Components/Toaster/Toaster.js +44 -45
  310. package/dist/esm/Components/ToolTip/ToolTip.js +1 -6
  311. package/dist/esm/Components/Trail/EditableCell.js +4 -1
  312. package/dist/esm/Components/Trail/TrailWorks.js +4 -4
  313. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +2 -4
  314. package/dist/esm/Components/UserDetails/AddUserModal.js +3 -3
  315. package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -2
  316. package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +5 -5
  317. package/dist/esm/Components/UserDetails/UserDetails.js +15 -17
  318. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
  319. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
  320. package/dist/esm/Theme/assertPalette.js +50 -0
  321. package/dist/esm/Theme/chakra/Avatar.styles.js +2 -2
  322. package/dist/esm/Theme/chakra/Drawer.styles.js +8 -10
  323. package/dist/esm/Theme/chakra/Modal.styles.js +8 -10
  324. package/dist/esm/Theme/chakra/Slider.styles.js +7 -9
  325. package/dist/esm/Theme/chakra/Tabs.styles.js +13 -18
  326. package/dist/esm/Theme/chakra/componentStyles.js +53 -44
  327. package/dist/esm/Theme/chakra/paletteFromTheme.js +9 -0
  328. package/dist/esm/Theme/provider/PixelizeThemeProvider.js +5 -0
  329. package/dist/esm/Theme/testing/testPalette.js +19 -0
  330. package/dist/esm/Theme/tokens/brands/emerald/palette.light.js +5 -4
  331. package/dist/esm/Theme/tokens/brands/index.js +28 -23
  332. package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +3 -110
  333. package/dist/esm/Theme/tokens/brands/meadow/palette.light.js +5 -4
  334. package/dist/esm/Theme/tokens/brands/neutrals.js +116 -0
  335. package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +5 -4
  336. package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +5 -4
  337. package/dist/esm/Theme/tokens/brands/skyline/palette.light.js +5 -4
  338. package/dist/esm/Theme/tokens/brands/slate/palette.light.js +6 -5
  339. package/dist/esm/Theme/tokens/brands/storefront/palette.light.js +5 -4
  340. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -2
  341. package/dist/esm/Theme/tokens/builders/accentText.js +8 -27
  342. package/dist/esm/Theme/tokens/builders/brandInk.js +103 -0
  343. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +17 -9
  344. package/dist/esm/Theme/tokens/builders/mutedText.js +5 -0
  345. package/dist/esm/Theme/tokens/builders/outlineRung.js +21 -19
  346. package/dist/esm/Theme/tokens/builders/resolvedRungs.js +20 -0
  347. package/dist/esm/Theme/tokens/builders/semanticText.js +17 -0
  348. package/dist/esm/Theme/tokens/builders/sidebarAccent.js +23 -0
  349. package/dist/esm/Theme/tokens/builders/statusTone.js +3 -4
  350. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +33 -0
  351. package/dist/esm/Theme/useCustomTheme.js +4 -1
  352. package/dist/esm/Utils/table.js +28 -36
  353. package/dist/esm/index.js +1 -0
  354. package/dist/index.d.ts +1 -0
  355. package/dist/index.js +9 -2
  356. package/package.json +1 -1
@@ -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[300]}`, 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.border[500];
7
7
  const data = [
8
8
  {
9
9
  contact: "John Doe",
@@ -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,7 +33,7 @@ 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;
36
+ const resolved = gradient !== null && gradient !== void 0 ? gradient : variantGradient[variant];
39
37
  // `iconColor`'s gold default fails AA as body text against this gradient (measured ~1.4-3.3
40
38
  // across brands) — the label/subtitle share this computed ink instead.
41
39
  const ink = onGradient(resolved.from, resolved.to, c.white, c.black);
@@ -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;
@@ -4,7 +4,7 @@ import { Avatar, Badge, Box, Button, Divider, Flex, Heading, HStack, IconButton,
4
4
  import { ChevronLeft, RefreshCw, Send, Shield, Trash2, UserPlus, Users, UserRound, } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
6
  import { resolveHoverTint } from "../../Theme/tokens/builders/outlineRung.js";
7
- import { DEFAULT_CANVAS, accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
7
+ import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
8
8
  import EmptyState from "../EmptyState/EmptyState.js";
9
9
  import AddUserModal from "./AddUserModal.js";
10
10
  import ChangeRoleModal from "./ChangeRoleModal.js";
@@ -47,21 +47,20 @@ const DEFAULT_LABELS = {
47
47
  deactivateConfirmDescription: "will no longer have access to the organization. You can reactivate them later if needed.",
48
48
  };
49
49
  const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], canManageUsers = false, isUsersLoading = false, isInviteLoading = false, isDeactivateLoading = false, isAddUserLoading = false, isChangeRoleLoading = false, onSelectUser, onRefresh, onBack, onAddUserSubmit, onChangeRoleSubmit, onReinvite, onDeactivate, onAddRoleClick, addUserUpgradeNotice, labels: labelOverrides, minHeight = "90vh", }) => {
50
- var _a, _b, _c, _d, _e, _f, _g, _h;
51
50
  const { colors } = useCustomTheme();
52
51
  const labels = useMemo(() => ({ ...DEFAULT_LABELS, ...labelOverrides }), [labelOverrides]);
53
52
  const { isOpen: isAddUserOpen, onOpen: onAddUserOpen, onClose: onAddUserClose, } = useDisclosure();
54
53
  const { isOpen: isChangeRoleOpen, onOpen: onChangeRoleOpen, onClose: onChangeRoleClose, } = useDisclosure();
55
54
  const { isOpen: isConfirmOpen, onOpen: onConfirmOpen, onClose: onConfirmClose, } = useDisclosure();
56
55
  const [actionUserId, setActionUserId] = useState(null);
57
- const border = (_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];
58
- const surface = (_d = colors === null || colors === void 0 ? void 0 : colors.background) === null || _d === void 0 ? void 0 : _d[50];
59
- const muted = (_e = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _e === void 0 ? void 0 : _e[500];
60
- const heading = (_f = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _f === void 0 ? void 0 : _f[800];
61
- const avatarBg = (_g = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _g === void 0 ? void 0 : _g[100];
56
+ const border = colors.boxborder[200];
57
+ const surface = colors.background[50];
58
+ const muted = colors.textMuted;
59
+ const heading = colors.text[900];
60
+ const avatarBg = colors.primary[100];
62
61
  // Picked dynamically against `avatarBg` rather than a fixed [600] rung — a fixed rung falls
63
62
  // short of AA (4.27) for some brands' primary scale in dark mode.
64
- const avatarColor = accentTextOnCanvas(colors === null || colors === void 0 ? void 0 : colors.primary, avatarBg !== null && avatarBg !== void 0 ? avatarBg : DEFAULT_CANVAS);
63
+ const avatarColor = accentTextOnCanvas(colors.primary, avatarBg);
65
64
  const successScheme = "green";
66
65
  const dangerScheme = "red";
67
66
  const handleDeactivateConfirm = () => {
@@ -70,14 +69,13 @@ const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], ca
70
69
  onConfirmClose();
71
70
  };
72
71
  const renderStatusBadge = (isActive) => (_jsx(Badge, { variant: "subtle", colorScheme: isActive ? successScheme : dangerScheme, borderRadius: "full", px: 2, py: 0.5, fontSize: "0.65rem", fontWeight: 600, textTransform: "none", children: isActive ? labels.active : labels.inactive }));
73
- return (_jsxs(Flex, { backgroundColor: (_h = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _h === void 0 ? void 0 : _h[50], minHeight: minHeight, p: { base: 3, md: 4 }, gap: 3, flexDirection: { base: "column", lg: "row" }, children: [_jsxs(Box, { width: { base: "100%", lg: "300px" }, backgroundColor: surface, borderRadius: "xl", boxShadow: "sm", border: "1px solid", borderColor: border, position: "relative", order: { base: 2, lg: 1 }, overflow: "hidden", display: "flex", flexDirection: "column", children: [_jsxs(Flex, { px: 4, py: 3, borderBottom: "1px solid", borderColor: border, alignItems: "center", justifyContent: "space-between", children: [_jsxs(HStack, { spacing: 2, children: [onBack && (_jsx(IconButton, { "aria-label": "Go back", icon: _jsx(ChevronLeft, { size: 18 }), variant: "ghost", size: "xs", color: muted, onClick: onBack })), _jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.teamMembers }), _jsx(Badge, { colorScheme: "gray", borderRadius: "full", fontSize: "0.65rem", px: 2, children: users.length })] }), onRefresh && (_jsx(IconButton, { "aria-label": labels.refreshList, icon: _jsx(RefreshCw, { size: 15 }), variant: "ghost", size: "xs", color: muted, onClick: onRefresh, isLoading: isUsersLoading }))] }), _jsx(Box, { flex: 1, overflowY: "auto", maxHeight: { base: "380px", lg: `calc(${minHeight} - 80px)` }, children: isUsersLoading ? (_jsx(VStack, { spacing: 2, p: 3, children: Array.from({ length: 6 }).map((_, idx) => (_jsxs(Flex, { alignItems: "center", gap: 3, p: 2, w: "100%", children: [_jsx(SkeletonCircle, { size: "9" }), _jsxs(Box, { flex: 1, children: [_jsx(Skeleton, { height: "12px", mb: 2, width: "80%" }), _jsx(Skeleton, { height: "9px", width: "60%" })] })] }, idx))) })) : users.length === 0 ? (_jsx(EmptyState, { icon: Users, title: labels.noUsers, size: "sm", minH: "220px" })) : (_jsx(VStack, { spacing: 1, p: 2, align: "stretch", children: users.map((user) => {
74
- var _a, _b, _c, _d;
72
+ return (_jsxs(Flex, { backgroundColor: colors.backgroundColor.main, minHeight: minHeight, p: { base: 3, md: 4 }, gap: 3, flexDirection: { base: "column", lg: "row" }, children: [_jsxs(Box, { width: { base: "100%", lg: "300px" }, backgroundColor: surface, borderRadius: "xl", boxShadow: "sm", border: "1px solid", borderColor: border, position: "relative", order: { base: 2, lg: 1 }, overflow: "hidden", display: "flex", flexDirection: "column", children: [_jsxs(Flex, { px: 4, py: 3, borderBottom: "1px solid", borderColor: border, alignItems: "center", justifyContent: "space-between", children: [_jsxs(HStack, { spacing: 2, children: [onBack && (_jsx(IconButton, { "aria-label": "Go back", icon: _jsx(ChevronLeft, { size: 18 }), variant: "ghost", size: "xs", color: muted, onClick: onBack })), _jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.teamMembers }), _jsx(Badge, { colorScheme: "gray", borderRadius: "full", fontSize: "0.65rem", px: 2, children: users.length })] }), onRefresh && (_jsx(IconButton, { "aria-label": labels.refreshList, icon: _jsx(RefreshCw, { size: 15 }), variant: "ghost", size: "xs", color: muted, onClick: onRefresh, isLoading: isUsersLoading }))] }), _jsx(Box, { flex: 1, overflowY: "auto", maxHeight: { base: "380px", lg: `calc(${minHeight} - 80px)` }, children: isUsersLoading ? (_jsx(VStack, { spacing: 2, p: 3, children: Array.from({ length: 6 }).map((_, idx) => (_jsxs(Flex, { alignItems: "center", gap: 3, p: 2, w: "100%", children: [_jsx(SkeletonCircle, { size: "9" }), _jsxs(Box, { flex: 1, children: [_jsx(Skeleton, { height: "12px", mb: 2, width: "80%" }), _jsx(Skeleton, { height: "9px", width: "60%" })] })] }, idx))) })) : users.length === 0 ? (_jsx(EmptyState, { icon: Users, title: labels.noUsers, size: "sm", minH: "220px" })) : (_jsx(VStack, { spacing: 1, p: 2, align: "stretch", children: users.map((user) => {
75
73
  const isSelected = selectedUserId != null && selectedUserId === user.id;
76
- return (_jsxs(Flex, { p: 2.5, w: "100%", cursor: "pointer", alignItems: "center", gap: 2.5, backgroundColor: isSelected ? (_a = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _a === void 0 ? void 0 : _a[50] : "transparent", _hover: {
74
+ return (_jsxs(Flex, { p: 2.5, w: "100%", cursor: "pointer", alignItems: "center", gap: 2.5, backgroundColor: isSelected ? colors.primary[50] : "transparent", _hover: {
77
75
  background: isSelected
78
- ? (_b = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _b === void 0 ? void 0 : _b[50]
79
- : (_c = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _c === void 0 ? void 0 : _c[50],
80
- }, transition: "background 0.15s ease", borderRadius: "lg", position: "relative", onClick: () => onSelectUser === null || onSelectUser === void 0 ? void 0 : onSelectUser(user), children: [isSelected && (_jsx(Box, { position: "absolute", left: 0, top: "20%", bottom: "20%", width: "3px", borderRadius: "full", bg: (_d = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _d === void 0 ? void 0 : _d[500] })), _jsx(Avatar, { size: "sm", name: `${user.firstName} ${user.lastName}`, src: user.profile, bg: avatarBg, color: avatarColor }), _jsxs(Box, { flex: 1, overflow: "hidden", children: [_jsxs(Text, { fontSize: "sm", fontWeight: 600, noOfLines: 1, color: heading, children: [user.firstName, " ", user.lastName] }), _jsx(Text, { fontSize: "xs", color: muted, noOfLines: 1, children: user.email })] }), renderStatusBadge(user.isActive)] }, user.id));
76
+ ? colors.primary[50]
77
+ : resolveHoverTint(colors.gray[50], surface),
78
+ }, transition: "background 0.15s ease", borderRadius: "lg", position: "relative", onClick: () => onSelectUser === null || onSelectUser === void 0 ? void 0 : onSelectUser(user), children: [isSelected && (_jsx(Box, { position: "absolute", left: 0, top: "20%", bottom: "20%", width: "3px", borderRadius: "full", bg: colors.primary[500] })), _jsx(Avatar, { size: "sm", name: `${user.firstName} ${user.lastName}`, src: user.profile, bg: avatarBg, color: avatarColor }), _jsxs(Box, { flex: 1, overflow: "hidden", children: [_jsxs(Text, { fontSize: "sm", fontWeight: 600, noOfLines: 1, color: heading, children: [user.firstName, " ", user.lastName] }), _jsx(Text, { fontSize: "xs", color: muted, noOfLines: 1, children: user.email })] }), renderStatusBadge(user.isActive)] }, user.id));
81
79
  }) })) })] }), _jsxs(Box, { flex: 1, backgroundColor: surface, borderRadius: "xl", boxShadow: "sm", border: "1px solid", borderColor: border, display: "flex", flexDirection: "column", order: { base: 1, lg: 2 }, overflow: "hidden", children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", px: 4, py: 3, borderBottom: "1px solid", borderColor: border, children: [_jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: selectedUser ? labels.userDetails : labels.selectTeamMember }), canManageUsers && (_jsx(Button, { size: "sm", colorScheme: "primary", fontSize: "xs", leftIcon: _jsx(UserPlus, { size: 15 }), onClick: onAddUserOpen, children: labels.addUser }))] }), _jsx(Box, { flex: 1, overflowY: "auto", children: isUsersLoading ? (_jsxs(VStack, { spacing: 4, p: 4, align: "stretch", children: [_jsxs(Flex, { align: "center", gap: 4, children: [_jsx(SkeletonCircle, { size: "16" }), _jsxs(Box, { flex: 1, children: [_jsx(Skeleton, { height: "18px", width: "50%", mb: 2 }), _jsx(Skeleton, { height: "12px", width: "35%" })] })] }), Array.from({ length: 4 }).map((_, idx) => (_jsxs(Box, { w: "100%", children: [_jsx(Skeleton, { height: "12px", width: "30%", mb: 2 }), _jsx(Skeleton, { height: "10px", width: "80%" })] }, idx)))] })) : selectedUser ? (_jsxs(_Fragment, { children: [_jsxs(Flex, { direction: { base: "column", md: "row" }, alignItems: { base: "flex-start", md: "center" }, justifyContent: "space-between", gap: 4, p: 4, borderBottom: "1px solid", borderColor: border, children: [_jsxs(Flex, { alignItems: "center", gap: 4, children: [_jsxs(Box, { position: "relative", children: [_jsx(Avatar, { size: "lg", name: selectedUser.name, src: selectedUser.profilePhoto, bg: avatarBg, color: avatarColor }), selectedUser.isCurrent && (_jsx(Badge, { position: "absolute", bottom: -1, right: -1, colorScheme: "blue", variant: "solid", fontSize: "0.6rem", borderRadius: "full", px: 2, py: 0.5, boxShadow: "sm", textTransform: "none", children: labels.you }))] }), _jsxs(Box, { children: [_jsx(Heading, { size: "md", mb: 1, color: heading, children: selectedUser.name }), _jsx(Text, { fontSize: "sm", color: muted, mb: 2, children: selectedUser.role }), _jsxs(HStack, { spacing: 2, children: [renderStatusBadge(selectedUser.isActive), selectedUser.isPending && (_jsx(Badge, { variant: "subtle", borderRadius: "full", px: 2, py: 0.5, fontSize: "0.65rem", fontWeight: 600, colorScheme: "orange", textTransform: "none", children: labels.pendingInvitation }))] })] })] }), canManageUsers &&
82
80
  !selectedUser.isSuperAdmin && (_jsxs(HStack, { spacing: 2, flexWrap: "wrap", children: [!selectedUser.isCurrent && !selectedUser.isActive && (_jsx(Button, { size: "xs", variant: "outline", colorScheme: "blue", fontSize: "xs", leftIcon: _jsx(Send, { size: 13 }), isLoading: isInviteLoading, onClick: () => selectedUser.userId != null &&
83
81
  (onReinvite === null || onReinvite === void 0 ? void 0 : onReinvite(selectedUser.userId)), children: labels.resendInvitation })), _jsx(Button, { size: "xs", variant: "outline", colorScheme: "gray", fontSize: "xs", leftIcon: _jsx(Shield, { size: 13 }), onClick: () => {
@@ -91,11 +89,11 @@ const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], ca
91
89
  onConfirmOpen();
92
90
  }
93
91
  }, children: labels.deactivateUser }))] }))] }), _jsxs(Box, { p: 4, children: [_jsx(Text, { fontSize: "xs", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.05em", color: muted, mb: 3, children: labels.personalInformation }), _jsx(Box, { border: "1px solid", borderColor: border, borderRadius: "lg", overflow: "hidden", children: selectedUser.details.map((detail, index) => {
94
- var _a, _b, _c, _d, _e;
92
+ var _a;
95
93
  const Icon = (_a = detail.icon) !== null && _a !== void 0 ? _a : UserRound;
96
94
  return (_jsxs(React.Fragment, { children: [_jsxs(Flex, { gap: 3, px: 3, py: 2.5, _hover: {
97
- bg: resolveHoverTint((_b = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _b === void 0 ? void 0 : _b[50], (_c = colors === null || colors === void 0 ? void 0 : colors.background) === null || _c === void 0 ? void 0 : _c[50]),
98
- }, alignItems: "center", transition: "background 0.15s ease", children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "30px", bg: (_d = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _d === void 0 ? void 0 : _d[50], borderRadius: "lg", color: (_e = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _e === void 0 ? void 0 : _e[600], flexShrink: 0, children: _jsx(Icon, { size: 15 }) }), _jsx(Box, { minWidth: "110px", children: _jsx(Text, { fontSize: "xs", fontWeight: 600, color: muted, children: detail.label }) }), _jsx(Box, { flex: 1, children: _jsx(Text, { fontSize: "sm", color: heading, fontWeight: 500, children: detail.value }) })] }), index < selectedUser.details.length - 1 && (_jsx(Divider, { borderColor: border }))] }, index));
95
+ bg: resolveHoverTint(colors.gray[50], surface),
96
+ }, alignItems: "center", transition: "background 0.15s ease", children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "30px", bg: colors.primary[50], borderRadius: "lg", color: accentTextOnCanvas(colors.primary, colors.primary[50]), flexShrink: 0, children: _jsx(Icon, { size: 15 }) }), _jsx(Box, { minWidth: "110px", children: _jsx(Text, { fontSize: "xs", fontWeight: 600, color: muted, children: detail.label }) }), _jsx(Box, { flex: 1, children: _jsx(Text, { fontSize: "sm", color: heading, fontWeight: 500, children: detail.value }) })] }), index < selectedUser.details.length - 1 && (_jsx(Divider, { borderColor: border }))] }, index));
99
97
  }) })] })] })) : (_jsx(EmptyState, { icon: UserRound, title: labels.selectTeamMember, description: labels.noUserSelected, minH: "300px" })) })] }), _jsx(AddUserModal, { isOpen: isAddUserOpen, onClose: onAddUserClose, roleOptions: roleOptions, isLoading: isAddUserLoading, onSubmit: async (values) => {
100
98
  await (onAddUserSubmit === null || onAddUserSubmit === void 0 ? void 0 : onAddUserSubmit(values));
101
99
  onAddUserClose();
@@ -22,7 +22,6 @@ const PLACEMENT_STYLE = {
22
22
  * `onOpenChange`.
23
23
  */
24
24
  export default function WorkspaceTrayPreview({ children, preview, enabled = true, openDelayMs = 350, closeDelayMs = 200, placement = "top-end", onOpenChange, width = "340px", testId = "workspace-tray-preview", }) {
25
- var _a, _b, _c, _d;
26
25
  const theme = useCustomTheme();
27
26
  const [open, setOpen] = useState(false);
28
27
  const openTimer = useRef(null);
@@ -77,7 +76,7 @@ export default function WorkspaceTrayPreview({ children, preview, enabled = true
77
76
  e.stopPropagation();
78
77
  closeNow();
79
78
  }
80
- }, children: [children, open && (_jsx(Box, { position: "absolute", ...PLACEMENT_STYLE[placement], w: typeof width === "number" ? `${width}px` : width, maxW: "min(360px, calc(100vw - 2rem))", bg: theme.colors.background[50], borderWidth: "1px", borderColor: (_b = (_a = theme.colors.boxborder) === null || _a === void 0 ? void 0 : _a[200]) !== null && _b !== void 0 ? _b : theme.colors.gray[200], borderRadius: "lg", boxShadow: "xl", zIndex: 1500, pointerEvents: "auto", p: 3, textAlign: "left", color: (_d = (_c = theme.colors.text) === null || _c === void 0 ? void 0 : _c[700]) !== null && _d !== void 0 ? _d : theme.colors.gray[800], cursor: "default", onMouseEnter: clearCloseTimer, onMouseLeave: scheduleClose, "data-testid": testId, children: typeof preview === "function"
79
+ }, children: [children, open && (_jsx(Box, { position: "absolute", ...PLACEMENT_STYLE[placement], w: typeof width === "number" ? `${width}px` : width, maxW: "min(360px, calc(100vw - 2rem))", bg: theme.colors.background[50], borderWidth: "1px", borderColor: theme.colors.boxborder[200], borderRadius: "lg", boxShadow: "xl", zIndex: 1500, pointerEvents: "auto", p: 3, textAlign: "left", color: theme.colors.text[700], cursor: "default", onMouseEnter: clearCloseTimer, onMouseLeave: scheduleClose, "data-testid": testId, children: typeof preview === "function"
81
80
  ? preview({ close: closeNow })
82
81
  : preview }))] }));
83
82
  }
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Flex, HStack, IconButton, Modal, ModalContent, ModalOverlay, Text, } from "@chakra-ui/react";
3
3
  import { ExternalLink, Minus, X } from "lucide-react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
+ import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
5
6
  // One in-between windowed size — wider than a cramped dialog but not near-full
6
7
  // screen. There is no maximize/restore toggle (removed by product decision); the
7
8
  // `onMedium`/`onMaximize` props are kept optional for back-compat but unused.
@@ -14,7 +15,6 @@ const WINDOW_SIZE = { maxW: "88rem", h: "92vh" };
14
15
  * minimized windows with the companion WorkspaceTray.
15
16
  */
16
17
  export default function WorkspaceWindow({ title, state, children, onMinimize, onClose, onOpenFullPage, onOverlayClick, headerActions, testId = "workspace-window", }) {
17
- var _a, _b, _c, _d, _e, _f;
18
18
  // Must run before the early return: a minimized render would otherwise skip the hook
19
19
  // and change hook order when the window reopens.
20
20
  const theme = useCustomTheme();
@@ -33,7 +33,7 @@ export default function WorkspaceWindow({ title, state, children, onMinimize, on
33
33
  onMouseDown: (e) => {
34
34
  if (e.target === e.currentTarget)
35
35
  onOverlayClick === null || onOverlayClick === void 0 ? void 0 : onOverlayClick();
36
- }, "data-testid": `${testId}-backdrop`, children: _jsxs(Box, { bg: theme.colors.background[50], borderRadius: "xl", boxShadow: "2xl", overflow: "hidden", w: "100%", maxW: size.maxW, h: size.h, display: "flex", flexDirection: "column", "data-testid": testId, "data-window-state": state, children: [_jsxs(Flex, { align: "center", justify: "space-between", px: 3, py: 2, borderBottomWidth: "1px", borderColor: (_b = (_a = theme.colors.boxborder) === null || _a === void 0 ? void 0 : _a[200]) !== null && _b !== void 0 ? _b : theme.colors.gray[100], bg: (_d = (_c = theme.colors.background) === null || _c === void 0 ? void 0 : _c[100]) !== null && _d !== void 0 ? _d : theme.colors.gray[50], flexShrink: 0, children: [_jsx(Text, { fontSize: "sm", fontWeight: 600, color: (_f = (_e = theme.colors.text) === null || _e === void 0 ? void 0 : _e[700]) !== null && _f !== void 0 ? _f : theme.colors.gray[700], noOfLines: 1, "data-testid": `${testId}-title`, children: title }), _jsxs(HStack, { spacing: 1, children: [headerActions, onOpenFullPage ? (_jsx(IconButton, { "aria-label": "Open full page", size: "xs", variant: "ghost", icon: _jsx(ExternalLink, { size: 14 }), onClick: onOpenFullPage, "data-testid": `${testId}-fullpage` })) : null, onMinimize ? (_jsx(IconButton, { "aria-label": "Minimize", size: "xs", variant: "ghost", icon: _jsx(Minus, { size: 15 }), onClick: onMinimize, "data-testid": `${testId}-minimize` })) : null, onClose ? (_jsx(IconButton, { "aria-label": "Close", size: "xs", variant: "ghost", colorScheme: "red", icon: _jsx(X, { size: 15 }), onClick: onClose, "data-testid": `${testId}-close` })) : null] })] }), _jsx(Box, { flex: "1", overflow: "auto", px: { base: 3, md: 5 }, py: 4, children: children })] }) })] }));
36
+ }, "data-testid": `${testId}-backdrop`, children: _jsxs(Box, { bg: theme.colors.background[50], borderRadius: "xl", boxShadow: "2xl", overflow: "hidden", w: "100%", maxW: size.maxW, h: size.h, display: "flex", flexDirection: "column", "data-testid": testId, "data-window-state": state, children: [_jsxs(Flex, { align: "center", justify: "space-between", px: 3, py: 2, borderBottomWidth: "1px", borderColor: theme.colors.boxborder[200], bg: theme.colors.background[100], flexShrink: 0, children: [_jsx(Text, { fontSize: "sm", fontWeight: 600, color: theme.colors.text[700], noOfLines: 1, "data-testid": `${testId}-title`, children: title }), _jsxs(HStack, { spacing: 1, children: [headerActions, onOpenFullPage ? (_jsx(IconButton, { "aria-label": "Open full page", size: "xs", variant: "ghost", icon: _jsx(ExternalLink, { size: 14 }), onClick: onOpenFullPage, "data-testid": `${testId}-fullpage` })) : null, onMinimize ? (_jsx(IconButton, { "aria-label": "Minimize", size: "xs", variant: "ghost", icon: _jsx(Minus, { size: 15 }), onClick: onMinimize, "data-testid": `${testId}-minimize` })) : null, onClose ? (_jsx(IconButton, { "aria-label": "Close", size: "xs", variant: "ghost", colorScheme: "red", icon: _jsx(X, { size: 15 }), onClick: onClose, "data-testid": `${testId}-close` })) : null] })] }), _jsx(Box, { flex: "1", overflow: "auto", px: { base: 3, md: 5 }, py: 4, children: children })] }) })] }));
37
37
  }
38
38
  /**
39
39
  * Bottom tray of restore pills for minimized WorkspaceWindows. Presentational —
@@ -48,7 +48,6 @@ export function WorkspaceTray({ items, onRestore, onClose, testId = "workspace-t
48
48
  // than a full-width docked bar, so it never covers the bottom strip of page
49
49
  // content and needs no reserved page gutter. Pills wrap upward.
50
50
  _jsx(Flex, { position: "fixed", bottom: 4, right: 4, zIndex: 1400, direction: "row-reverse", wrap: "wrap-reverse", justify: "flex-start", gap: 2, maxW: { base: "calc(100vw - 2rem)", md: "36rem" }, "data-testid": testId, children: items.map((item) => {
51
- var _a, _b, _c, _d, _e, _f;
52
51
  const api = {
53
52
  restore: () => onRestore === null || onRestore === void 0 ? void 0 : onRestore(item.id),
54
53
  close: () => onClose === null || onClose === void 0 ? void 0 : onClose(item.id),
@@ -56,6 +55,6 @@ export function WorkspaceTray({ items, onRestore, onClose, testId = "workspace-t
56
55
  if (renderItem) {
57
56
  return _jsx(Box, { children: renderItem(item, api) }, item.id);
58
57
  }
59
- return (_jsxs(HStack, { spacing: 1, pl: 3, pr: 1, py: 1, borderRadius: "full", bg: (_b = (_a = theme.colors.primary) === null || _a === void 0 ? void 0 : _a[100]) !== null && _b !== void 0 ? _b : "blue.100", color: (_d = (_c = theme.colors.primary) === null || _c === void 0 ? void 0 : _c[700]) !== null && _d !== void 0 ? _d : "blue.700", boxShadow: "md", borderWidth: "1px", borderColor: (_f = (_e = theme.colors.primary) === null || _e === void 0 ? void 0 : _e[200]) !== null && _f !== void 0 ? _f : "blue.200", "data-testid": `${testId}-pill`, children: [_jsx(Box, { as: "button", type: "button", fontSize: "sm", onClick: api.restore, "data-testid": `${testId}-restore`, maxW: "16rem", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: item.title }), onClose ? (_jsx(IconButton, { "aria-label": "Close", size: "xs", variant: "ghost", borderRadius: "full", minW: "auto", h: "auto", p: 1, color: "inherit", icon: _jsx(X, { size: 13 }), onClick: api.close, "data-testid": `${testId}-close` })) : null] }, item.id));
58
+ return (_jsxs(HStack, { spacing: 1, pl: 3, pr: 1, py: 1, borderRadius: "full", bg: theme.colors.primary[100], color: accentTextOnCanvas(theme.colors.primary, theme.colors.primary[100]), boxShadow: "md", borderWidth: "1px", borderColor: theme.colors.primary[200], "data-testid": `${testId}-pill`, children: [_jsx(Box, { as: "button", type: "button", fontSize: "sm", onClick: api.restore, "data-testid": `${testId}-restore`, maxW: "16rem", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: item.title }), onClose ? (_jsx(IconButton, { "aria-label": "Close", size: "xs", variant: "ghost", borderRadius: "full", minW: "auto", h: "auto", p: 1, color: "inherit", icon: _jsx(X, { size: 13 }), onClick: api.close, "data-testid": `${testId}-close` })) : null] }, item.id));
60
59
  }) }));
61
60
  }
@@ -0,0 +1,50 @@
1
+ const REQUIRED_GROUPS = [
2
+ "gradient", "primary", "secondary", "tertiary", "transparent", "black", "white",
3
+ "semantic", "gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan",
4
+ "purple", "pink", "backgroundColor", "background", "text", "header", "placeholder",
5
+ "boxShadow", "sidebar", "boxborder", "border", "table", "disabled", "accentText",
6
+ "textMuted", "semanticText", "onPrimary", "onSemantic",
7
+ ];
8
+ export const allPaletteTokensListed = true;
9
+ const NESTED = [
10
+ ["semantic", ["success", "error", "warning", "info"]],
11
+ ["sidebar", [
12
+ "background", "activeIcon", "activeLabel", "mutedIcon", "mutedLabel", "elevated",
13
+ "semanticText",
14
+ ]],
15
+ ["semanticText", ["success", "error", "warning", "info"]],
16
+ ["onSemantic", ["success", "error", "warning", "info"]],
17
+ ["backgroundColor", ["main", "base"]],
18
+ ["boxShadow", ["primary", "default"]],
19
+ ];
20
+ export const missingPaletteTokens = (colors) => {
21
+ if (!colors || typeof colors !== "object")
22
+ return ["(no colors object)"];
23
+ const c = colors;
24
+ const missing = REQUIRED_GROUPS.filter((k) => c[k] === undefined).map(String);
25
+ for (const [group, keys] of NESTED) {
26
+ const value = c[group];
27
+ if (!value)
28
+ continue;
29
+ for (const key of keys)
30
+ if (value[key] === undefined)
31
+ missing.push(`${group}.${key}`);
32
+ }
33
+ return missing;
34
+ };
35
+ const checked = new WeakSet();
36
+ /** Fails once, loudly, at the theme boundary — never as a wrong colour 40 components deep. */
37
+ export const assertPixelizePalette = (theme) => {
38
+ if (typeof theme === "object" && theme !== null && checked.has(theme)) {
39
+ return theme.colors;
40
+ }
41
+ const missing = missingPaletteTokens(theme === null || theme === void 0 ? void 0 : theme.colors);
42
+ if (missing.length > 0) {
43
+ throw new Error(`pixelize-design-library: this theme is missing ${missing.length} palette token(s): ` +
44
+ `${missing.join(", ")}. Components read these directly and have no fallback by design. ` +
45
+ `Wrap the app in <PixelizeThemeProvider>, or build the theme with createBrandTheme(palette).`);
46
+ }
47
+ if (typeof theme === "object" && theme !== null)
48
+ checked.add(theme);
49
+ return theme.colors;
50
+ };
@@ -1,3 +1,4 @@
1
+ import { paletteOf } from "./paletteFromTheme.js";
1
2
  import { createMultiStyleConfigHelpers, cssVar } from "@chakra-ui/react";
2
3
  import { avatarAnatomy } from "@chakra-ui/anatomy";
3
4
  const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(avatarAnatomy.keys);
@@ -9,8 +10,7 @@ const $badgeBorder = cssVar("avatar-border-color");
9
10
  * triggers. Every bare `<Avatar>`/`<AvatarBadge>` renders a white ring on the dark canvas.
10
11
  */
11
12
  const baseStyle = definePartsStyle(({ theme }) => {
12
- var _a, _b, _c, _d, _e, _f;
13
- const border = (_f = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.light) !== null && _c !== void 0 ? _c : (_e = (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.background) === null || _e === void 0 ? void 0 : _e[50]) !== null && _f !== void 0 ? _f : "#fff";
13
+ const border = paletteOf(theme).backgroundColor.light;
14
14
  return {
15
15
  badge: {
16
16
  [$badgeBorder.variable]: border,
@@ -1,3 +1,4 @@
1
+ import { paletteOf } from "./paletteFromTheme.js";
1
2
  import { createMultiStyleConfigHelpers, cssVar } from "@chakra-ui/react";
2
3
  import { drawerAnatomy } from "@chakra-ui/anatomy";
3
4
  const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(drawerAnatomy.keys);
@@ -8,16 +9,13 @@ const $bg = cssVar("drawer-bg");
8
9
  * `<DrawerContent>` in every consuming app renders a white panel on the dark canvas — the same
9
10
  * bug class `Menu.styles.ts`/`Modal.styles.ts` already fix.
10
11
  */
11
- const baseStyle = definePartsStyle(({ theme }) => {
12
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13
- return ({
14
- dialog: {
15
- [$bg.variable]: (_f = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.light) !== null && _c !== void 0 ? _c : (_e = (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.background) === null || _e === void 0 ? void 0 : _e[50]) !== null && _f !== void 0 ? _f : "#fff",
16
- bg: $bg.reference,
17
- color: (_j = (_h = (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.text) === null || _h === void 0 ? void 0 : _h[900]) !== null && _j !== void 0 ? _j : "inherit",
18
- },
19
- });
20
- });
12
+ const baseStyle = definePartsStyle(({ theme }) => ({
13
+ dialog: {
14
+ [$bg.variable]: paletteOf(theme).backgroundColor.light,
15
+ bg: $bg.reference,
16
+ color: paletteOf(theme).text[900],
17
+ },
18
+ }));
21
19
  export const Drawer = defineMultiStyleConfig({
22
20
  baseStyle,
23
21
  });
@@ -1,3 +1,4 @@
1
+ import { paletteOf } from "./paletteFromTheme.js";
1
2
  import { createMultiStyleConfigHelpers, cssVar } from "@chakra-ui/react";
2
3
  import { modalAnatomy } from "@chakra-ui/anatomy";
3
4
  const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(modalAnatomy.keys);
@@ -8,16 +9,13 @@ const $bg = cssVar("modal-bg");
8
9
  * `<ModalContent>` in every consuming app renders a white dialog on the dark canvas — the same
9
10
  * bug class `Menu.styles.ts` already fixes for dropdowns.
10
11
  */
11
- const baseStyle = definePartsStyle(({ theme }) => {
12
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13
- return ({
14
- dialog: {
15
- [$bg.variable]: (_f = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.light) !== null && _c !== void 0 ? _c : (_e = (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.background) === null || _e === void 0 ? void 0 : _e[50]) !== null && _f !== void 0 ? _f : "#fff",
16
- bg: $bg.reference,
17
- color: (_j = (_h = (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.text) === null || _h === void 0 ? void 0 : _h[900]) !== null && _j !== void 0 ? _j : "inherit",
18
- },
19
- });
20
- });
12
+ const baseStyle = definePartsStyle(({ theme }) => ({
13
+ dialog: {
14
+ [$bg.variable]: paletteOf(theme).backgroundColor.light,
15
+ bg: $bg.reference,
16
+ color: paletteOf(theme).text[900],
17
+ },
18
+ }));
21
19
  export const Modal = defineMultiStyleConfig({
22
20
  baseStyle,
23
21
  });