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
@@ -8,28 +8,26 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
8
8
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
9
9
  const accordionColors_1 = require("./accordionColors");
10
10
  const Accordion = ({ allowMultiple, allowToggle, index, onChange, reduceMotion, items, ...rest }) => {
11
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
12
- const theme = (0, useCustomTheme_1.useCustomTheme)();
13
- const c = (_a = theme.colors) !== null && _a !== void 0 ? _a : {};
14
- const isDark = (0, accentText_1.isDarkCanvas)((_c = (_b = c.backgroundColor) === null || _b === void 0 ? void 0 : _b.main) !== null && _c !== void 0 ? _c : accentText_1.DEFAULT_CANVAS);
15
- const border = (_e = (_d = c.boxborder) === null || _d === void 0 ? void 0 : _d[300]) !== null && _e !== void 0 ? _e : (_f = c.gray) === null || _f === void 0 ? void 0 : _f[200];
16
- const headingColor = (_h = (_g = c.text) === null || _g === void 0 ? void 0 : _g[800]) !== null && _h !== void 0 ? _h : (_j = c.gray) === null || _j === void 0 ? void 0 : _j[800];
17
- const bodyColor = (_l = (_k = c.text) === null || _k === void 0 ? void 0 : _k[600]) !== null && _l !== void 0 ? _l : (_m = c.gray) === null || _m === void 0 ? void 0 : _m[600];
18
- const { expandedBg, softHover } = (0, react_1.useMemo)(() => { var _a; return (0, accordionColors_1.getAccordionHoverColors)((_a = theme.colors) !== null && _a !== void 0 ? _a : {}, isDark); }, [theme.colors, isDark]);
11
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
12
+ const isDark = (0, accentText_1.isDarkCanvas)(colors.backgroundColor.main);
13
+ const border = colors.boxborder[300];
14
+ const headingColor = colors.text[800];
15
+ const bodyColor = colors.text[600];
16
+ const { expandedBg, softHover } = (0, react_1.useMemo)(() => (0, accordionColors_1.getAccordionHoverColors)(colors, isDark), [colors, isDark]);
19
17
  return ((0, jsx_runtime_1.jsx)(react_2.Accordion, { allowMultiple: allowMultiple, allowToggle: allowToggle, index: index, onChange: onChange, reduceMotion: reduceMotion, ...rest, children: items.map((item, idx) => {
20
- var _a, _b, _c, _d, _e, _f, _g;
21
- return ((0, jsx_runtime_1.jsx)(react_2.AccordionItem, { border: `0.063rem solid ${border}`, borderRadius: "xl", bg: (_b = (_a = c.background) === null || _a === void 0 ? void 0 : _a[50]) !== null && _b !== void 0 ? _b : (_c = c.backgroundColor) === null || _c === void 0 ? void 0 : _c.light, mb: 3, overflow: "hidden", transition: "border-color 0.15s ease, box-shadow 0.15s ease", _last: { mb: 0 }, _hover: { borderColor: (_e = (_d = c.boxborder) === null || _d === void 0 ? void 0 : _d[400]) !== null && _e !== void 0 ? _e : (_f = c.gray) === null || _f === void 0 ? void 0 : _f[300] }, ...item.itemProps, sx: (_g = item.customStyles) === null || _g === void 0 ? void 0 : _g.itemStyle, children: ({ isExpanded }) => {
22
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
18
+ var _a;
19
+ return ((0, jsx_runtime_1.jsx)(react_2.AccordionItem, { border: `0.063rem solid ${border}`, borderRadius: "xl", bg: colors.background[50], mb: 3, overflow: "hidden", transition: "border-color 0.15s ease, box-shadow 0.15s ease", _last: { mb: 0 }, _hover: { borderColor: colors.boxborder[400] }, ...item.itemProps, sx: (_a = item.customStyles) === null || _a === void 0 ? void 0 : _a.itemStyle, children: ({ isExpanded }) => {
20
+ var _a, _b, _c;
23
21
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h2", { children: (0, jsx_runtime_1.jsxs)(react_2.AccordionButton, { px: 4, py: 3, gap: 3, fontSize: "0.875rem", fontWeight: 600, color: headingColor, bg: isExpanded ? expandedBg : "transparent", transition: "background 0.15s ease", _hover: { bg: isExpanded ? expandedBg : softHover }, _focusVisible: {
24
22
  boxShadow: "none",
25
- outline: `0.125rem solid ${(_b = (_a = c.primary) === null || _a === void 0 ? void 0 : _a[300]) !== null && _b !== void 0 ? _b : (_c = c.gray) === null || _c === void 0 ? void 0 : _c[300]}`,
23
+ outline: `0.125rem solid ${colors.primary[300]}`,
26
24
  outlineOffset: "-0.125rem",
27
25
  }, ...item.buttonProps, sx: {
28
- ...(_d = item.customStyles) === null || _d === void 0 ? void 0 : _d.buttonStyle,
26
+ ...(_a = item.customStyles) === null || _a === void 0 ? void 0 : _a.buttonStyle,
29
27
  "&:hover": {
30
- ...(_e = item.customStyles) === null || _e === void 0 ? void 0 : _e.hoverbuttonStyle,
28
+ ...(_b = item.customStyles) === null || _b === void 0 ? void 0 : _b.hoverbuttonStyle,
31
29
  },
32
- }, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", flex: "1", textAlign: "left", children: item.header }), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "1.5rem", flexShrink: 0, borderRadius: "md", color: isExpanded ? ((_g = (_f = c.primary) === null || _f === void 0 ? void 0 : _f[600]) !== null && _g !== void 0 ? _g : headingColor) : (_h = c.gray) === null || _h === void 0 ? void 0 : _h[500], bg: isExpanded ? ((_l = (_k = (_j = c.primary) === null || _j === void 0 ? void 0 : _j.opacity) === null || _k === void 0 ? void 0 : _k[16]) !== null && _l !== void 0 ? _l : "transparent") : "transparent", transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 0.2s ease, color 0.2s ease, background 0.2s ease", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16 }) })] }) }), (0, jsx_runtime_1.jsx)(react_2.AccordionPanel, { px: 4, pt: 1, pb: 4, fontSize: "0.875rem", lineHeight: "1.5", color: bodyColor, ...item.panelProps, sx: (_m = item.customStyles) === null || _m === void 0 ? void 0 : _m.panelStyle, children: item.content })] }));
30
+ }, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", flex: "1", textAlign: "left", children: item.header }), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "1.5rem", flexShrink: 0, borderRadius: "md", color: isExpanded ? colors.accentText : colors.textMuted, bg: isExpanded ? colors.primary.opacity[16] : "transparent", transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 0.2s ease, color 0.2s ease, background 0.2s ease", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16 }) })] }) }), (0, jsx_runtime_1.jsx)(react_2.AccordionPanel, { px: 4, pt: 1, pb: 4, fontSize: "0.875rem", lineHeight: "1.5", color: bodyColor, ...item.panelProps, sx: (_c = item.customStyles) === null || _c === void 0 ? void 0 : _c.panelStyle, children: item.content })] }));
33
31
  } }, idx));
34
32
  }) }));
35
33
  };
@@ -12,23 +12,20 @@ const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
12
12
  */
13
13
  const MIN_HOVER_STEP = 1.15;
14
14
  const getAccordionHoverColors = (colors, isDark) => {
15
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
16
15
  if (isDark) {
17
16
  // primary.opacity[8] composited over the dark canvas collapses to ~1.07:1 (near-black on
18
17
  // near-black) — gray[200] is an opaque rung that stays visibly above canvas (~1.6:1) without
19
18
  // being as loud as the gray[300] hover fill FilterSidebar/Table already use.
20
19
  return {
21
- expandedBg: (_d = (_b = (_a = colors.gray) === null || _a === void 0 ? void 0 : _a[200]) !== null && _b !== void 0 ? _b : (_c = colors.gray) === null || _c === void 0 ? void 0 : _c[300]) !== null && _d !== void 0 ? _d : (_e = colors.gray) === null || _e === void 0 ? void 0 : _e[50],
22
- softHover: (_j = (_g = (_f = colors.gray) === null || _f === void 0 ? void 0 : _f[200]) !== null && _g !== void 0 ? _g : (_h = colors.gray) === null || _h === void 0 ? void 0 : _h[300]) !== null && _j !== void 0 ? _j : (_k = colors.gray) === null || _k === void 0 ? void 0 : _k[50],
20
+ expandedBg: colors.gray[200],
21
+ softHover: colors.gray[200],
23
22
  };
24
23
  }
25
- const rest = (_m = (_l = colors.background) === null || _l === void 0 ? void 0 : _l[50]) !== null && _m !== void 0 ? _m : (_o = colors.backgroundColor) === null || _o === void 0 ? void 0 : _o.light;
26
- const expandedTint = ((_q = (_p = colors.primary) === null || _p === void 0 ? void 0 : _p.opacity) === null || _q === void 0 ? void 0 : _q[8])
27
- ? (0, color_1.compositeOver)(colors.primary.opacity[8], rest)
28
- : ((_s = (_r = colors.gray) === null || _r === void 0 ? void 0 : _r[50]) !== null && _s !== void 0 ? _s : rest);
24
+ const rest = colors.background[50];
25
+ const expandedTint = (0, color_1.compositeOver)(colors.primary.opacity[8], rest);
29
26
  return {
30
- expandedBg: (0, outlineRung_1.liftToContrast)(expandedTint, rest, "light", MIN_HOVER_STEP),
31
- softHover: (0, outlineRung_1.liftToContrast)((_v = (_u = (_t = colors.table) === null || _t === void 0 ? void 0 : _t.hover) === null || _u === void 0 ? void 0 : _u[100]) !== null && _v !== void 0 ? _v : (_w = colors.gray) === null || _w === void 0 ? void 0 : _w[50], rest, "light", MIN_HOVER_STEP),
27
+ expandedBg: (0, outlineRung_1.liftToContrast)(expandedTint, rest, MIN_HOVER_STEP),
28
+ softHover: (0, outlineRung_1.liftToContrast)(colors.table.hover[100], rest, MIN_HOVER_STEP),
32
29
  };
33
30
  };
34
31
  exports.getAccordionHoverColors = getAccordionHoverColors;
@@ -4,8 +4,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_1 = require("@chakra-ui/react");
5
5
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
6
6
  const AlertDialog = ({ isOpen, onClose, leastDestructiveRef, content, title, confirmButtonText = "Yes", cancelButtonText = "No", isConfirmLoading, onConfirm, ContentStyle, headerStyle, bodyStyle, footerStyle, closeButtonStyle, button1Style, button2Style, isCentered, key, }) => {
7
- var _a;
8
7
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
9
- return ((0, jsx_runtime_1.jsxs)(react_1.AlertDialog, { motionPreset: "slideInBottom", leastDestructiveRef: leastDestructiveRef, onClose: onClose, isOpen: isOpen, isCentered: isCentered, children: [(0, jsx_runtime_1.jsx)(react_1.AlertDialogOverlay, {}), (0, jsx_runtime_1.jsxs)(react_1.AlertDialogContent, { bg: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[50], sx: ContentStyle, children: [(0, jsx_runtime_1.jsx)(react_1.AlertDialogHeader, { sx: headerStyle, children: title }), (0, jsx_runtime_1.jsx)(react_1.AlertDialogCloseButton, { sx: closeButtonStyle }), (0, jsx_runtime_1.jsx)(react_1.AlertDialogBody, { sx: bodyStyle, children: content }), (0, jsx_runtime_1.jsxs)(react_1.AlertDialogFooter, { sx: footerStyle, children: [(0, jsx_runtime_1.jsx)(react_1.Button, { ref: leastDestructiveRef, onClick: onClose, variant: "outline", colorScheme: "red", size: "sm", sx: button1Style, children: cancelButtonText }), (0, jsx_runtime_1.jsx)(react_1.Button, { colorScheme: "primary", onClick: onConfirm, isLoading: isConfirmLoading, ml: 3, size: "sm", sx: button2Style, children: confirmButtonText })] })] })] }, key));
8
+ return ((0, jsx_runtime_1.jsxs)(react_1.AlertDialog, { motionPreset: "slideInBottom", leastDestructiveRef: leastDestructiveRef, onClose: onClose, isOpen: isOpen, isCentered: isCentered, children: [(0, jsx_runtime_1.jsx)(react_1.AlertDialogOverlay, {}), (0, jsx_runtime_1.jsxs)(react_1.AlertDialogContent, { bg: colors.background[50], sx: ContentStyle, children: [(0, jsx_runtime_1.jsx)(react_1.AlertDialogHeader, { sx: headerStyle, children: title }), (0, jsx_runtime_1.jsx)(react_1.AlertDialogCloseButton, { sx: closeButtonStyle }), (0, jsx_runtime_1.jsx)(react_1.AlertDialogBody, { sx: bodyStyle, children: content }), (0, jsx_runtime_1.jsxs)(react_1.AlertDialogFooter, { sx: footerStyle, children: [(0, jsx_runtime_1.jsx)(react_1.Button, { ref: leastDestructiveRef, onClick: onClose, variant: "outline", colorScheme: "red", size: "sm", sx: button1Style, children: cancelButtonText }), (0, jsx_runtime_1.jsx)(react_1.Button, { colorScheme: "primary", onClick: onConfirm, isLoading: isConfirmLoading, ml: 3, size: "sm", sx: button2Style, children: confirmButtonText })] })] })] }, key));
10
9
  };
11
10
  exports.default = AlertDialog;
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const react_1 = require("react");
8
8
  const react_apexcharts_1 = __importDefault(require("react-apexcharts"));
9
- const react_2 = require("@chakra-ui/react");
9
+ const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
10
10
  const chartColorsFromTheme_1 = require("../../../Theme/tokens/builders/chartColorsFromTheme");
11
11
  const chartBase_1 = require("../chartBase");
12
12
  const ApexAreaChart = ({ variant = "basic", data, series, labels, title, titlePosition = "left", height = 320, width = "100%", colors, showLegend = true, legendPosition = "bottom", yAxisFormatter, }) => {
13
- const theme = (0, react_2.useTheme)();
14
- const palette = theme.colors;
13
+ const { colors: palette } = (0, useCustomTheme_1.useCustomTheme)();
15
14
  const seriesColors = (0, react_1.useMemo)(() => colors !== null && colors !== void 0 ? colors : (0, chartColorsFromTheme_1.getDefaultSeriesColors)(palette), [colors, palette]);
16
15
  const resolvedSeries = (0, react_1.useMemo)(() => series !== null && series !== void 0 ? series : [{ name: title !== null && title !== void 0 ? title : "Series 1", data: data !== null && data !== void 0 ? data : [] }], [series, data, title]);
17
16
  const isSpark = variant === "sparkline";
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const react_1 = require("react");
8
8
  const react_apexcharts_1 = __importDefault(require("react-apexcharts"));
9
- const react_2 = require("@chakra-ui/react");
9
+ const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
10
10
  const chartColorsFromTheme_1 = require("../../../Theme/tokens/builders/chartColorsFromTheme");
11
11
  const chartBase_1 = require("../chartBase");
12
12
  const getValidLegendPosition = (position) => {
@@ -19,8 +19,7 @@ const getValidLegendPosition = (position) => {
19
19
  };
20
20
  const ApexPieChart = ({ data, labels, title, height = 400, width = 500, donutColors, chartColor, titlePosition = "center", titleStyle, legendPosition = "bottom", legendStyle, variant = "pie", showDataLabels = true, minLabelPercent = 8, surfaceColor, donutSize = "68%", totalLabel = "Total", labelPlacement = "auto", }) => {
21
21
  var _a;
22
- const theme = (0, react_2.useTheme)();
23
- const palette = theme.colors;
22
+ const { colors: palette } = (0, useCustomTheme_1.useCustomTheme)();
24
23
  const ink = (0, chartColorsFromTheme_1.chartInk)(palette);
25
24
  const gap = surfaceColor !== null && surfaceColor !== void 0 ? surfaceColor : ink.surface;
26
25
  const mergedTitleStyle = (0, react_1.useMemo)(() => (0, chartColorsFromTheme_1.mergeChartTitleStyle)(palette, titleStyle), [palette, titleStyle]);
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const react_1 = require("react");
8
8
  const react_apexcharts_1 = __importDefault(require("react-apexcharts"));
9
- const react_2 = require("@chakra-ui/react");
9
+ const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
10
10
  const chartColorsFromTheme_1 = require("../../../Theme/tokens/builders/chartColorsFromTheme");
11
11
  const chartBase_1 = require("../chartBase");
12
12
  const ApexRadialChart = ({ variant = "gauge", data, labels, title, titlePosition = "left", height = 320, width = "100%", colors, totalLabel = "Total", trackColor, hollowSize = "62%", }) => {
13
- const theme = (0, react_2.useTheme)();
14
- const palette = theme.colors;
13
+ const { colors: palette } = (0, useCustomTheme_1.useCustomTheme)();
15
14
  const ink = (0, chartColorsFromTheme_1.chartInk)(palette);
16
15
  const seriesColors = (0, react_1.useMemo)(() => colors !== null && colors !== void 0 ? colors : (0, chartColorsFromTheme_1.getDefaultSeriesColors)(palette), [colors, palette]);
17
16
  const options = (0, react_1.useMemo)(() => ({
@@ -10,20 +10,22 @@ const react_2 = require("@chakra-ui/react");
10
10
  const Theme_1 = require("../../Theme");
11
11
  const provider_1 = require("../../Theme/provider");
12
12
  const fontSize_1 = require("../../Theme/provider/fontSize");
13
+ const brands_1 = require("../../Theme/tokens/brands");
14
+ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
13
15
  const SelectV2_1 = __importDefault(require("../SelectV2/SelectV2"));
14
- const FieldLabel = ({ children }) => ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight: "medium", color: "gray.600", mb: 2, children: children }));
15
- const brandSwatch = (name) => {
16
- var _a, _b, _c;
17
- const brand = Theme_1.ThemesList[name];
18
- return ((0, jsx_runtime_1.jsx)(react_2.Box, { w: "14px", h: "14px", borderRadius: "full", bg: (_c = (_b = (_a = brand === null || brand === void 0 ? void 0 : brand.colors) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b[500]) !== null && _c !== void 0 ? _c : "gray.300", border: "1px solid", borderColor: "whiteAlpha.300" }));
16
+ const FieldLabel = ({ children }) => {
17
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
18
+ return ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight: "medium", color: colors.textMuted, mb: 2, children: children }));
19
19
  };
20
+ const brandSwatch = (name, colors) => ((0, jsx_runtime_1.jsx)(react_2.Box, { w: "14px", h: "14px", borderRadius: "full", bg: brands_1.lightPalettes[name].primary[500], border: "1px solid", borderColor: colors.boxborder[500] }));
20
21
  const AppearanceSettings = ({ brand, fontSize, onBrandChange, onFontSizeChange, showBrand = true, showColorMode = true, showFontSize = true, size = "sm", labels, }) => {
21
22
  var _a, _b, _c;
23
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
22
24
  const brandOptions = (0, react_1.useMemo)(() => Object.keys(Theme_1.ThemesList).map((name) => ({
23
25
  id: name,
24
26
  label: name.charAt(0).toUpperCase() + name.slice(1),
25
- icon: brandSwatch(name),
26
- })), []);
27
+ icon: brandSwatch(name, colors),
28
+ })), [colors]);
27
29
  const themeLabel = (_a = labels === null || labels === void 0 ? void 0 : labels.theme) !== null && _a !== void 0 ? _a : "Theme";
28
30
  const colorModeLabel = (_b = labels === null || labels === void 0 ? void 0 : labels.colorMode) !== null && _b !== void 0 ? _b : "Color mode";
29
31
  const fontSizeLabel = (_c = labels === null || labels === void 0 ? void 0 : labels.fontSize) !== null && _c !== void 0 ? _c : "Font Size";
@@ -16,9 +16,8 @@ const onCanvasText = (theme, colorScheme) => (0, accentText_1.accentTextOnCanvas
16
16
  * `[50]`.
17
17
  */
18
18
  const onCanvasHoverBg = (theme, colorScheme, step) => {
19
- var _a, _b;
20
19
  const scale = theme.colors[colorScheme];
21
- return (_b = (_a = scale.opacity) === null || _a === void 0 ? void 0 : _a[step]) !== null && _b !== void 0 ? _b : scale[50];
20
+ return "opacity" in scale ? scale.opacity[step] : scale[50];
22
21
  };
23
22
  /**
24
23
  * The rung one/two steps DARKER than the accent — what a filled button's hover/active needs so its
@@ -139,15 +138,10 @@ exports.Button = {
139
138
  bg: "transparent",
140
139
  },
141
140
  }),
142
- // Theme-based two-tone gradient: each theme defines its own `gradient`
143
- // {from,to} pair (see palettes); falls back to the primary scale. Ignores
144
- // colorScheme. Hover/active shift brightness so it works for any pair.
141
+ // Theme-based two-tone gradient: each theme defines its own `gradient` {from,to} pair.
142
+ // Ignores colorScheme; hover/active shift brightness so it works for any pair.
145
143
  gradient: ({ theme }) => {
146
- var _a;
147
- const g = (_a = theme.colors.gradient) !== null && _a !== void 0 ? _a : {
148
- from: theme.colors.primary[400],
149
- to: theme.colors.primary[700],
150
- };
144
+ const g = theme.colors.gradient;
151
145
  const bg = `linear-gradient(135deg, ${g.from} 0%, ${g.to} 100%)`;
152
146
  return {
153
147
  bgImage: bg,
@@ -6,11 +6,11 @@ const react_1 = require("react");
6
6
  const react_2 = require("@chakra-ui/react");
7
7
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
8
8
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
9
+ const color_1 = require("../../Theme/tokens/builders/color");
9
10
  const rafThrottle_1 = require("../../Utils/rafThrottle");
10
11
  function ButtonGroupIcon({ leftIcon, rightIcon, onLeftIconClick, onRightIconClick, buttonText, onButtonClick, onButtongroupClick, size, variant, color, buttonGroupStyle, buttonGroupLeftIconStyle, buttonGroupRightIconStyle, buttonStyle, onBlurLeftIcon, onBlurRightIcon, dropdownOptions, // New prop for dropdown options
11
12
  onDropdownOptionClick, // New prop to handle option clicks
12
13
  rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, leftIconLoading, RightIconLoading, }) {
13
- var _a;
14
14
  const theme = (0, useCustomTheme_1.useCustomTheme)();
15
15
  const [isDropdownOpen, setIsDropdownOpen] = (0, react_1.useState)(false);
16
16
  const textRef = (0, react_1.useRef)(null);
@@ -49,31 +49,30 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
49
49
  // keep the segments transparent (so it doesn't restart per button/icon), with a
50
50
  // translucent-white hover overlay for per-segment feedback.
51
51
  const isGradient = variant === "gradient";
52
- const gradientStops = (_a = theme.colors.gradient) !== null && _a !== void 0 ? _a : {
53
- from: theme.colors.primary[400],
54
- to: theme.colors.primary[700],
55
- };
52
+ const gradientStops = theme.colors.gradient;
56
53
  const gradientBg = `linear-gradient(135deg, ${gradientStops.from} 0%, ${gradientStops.to} 100%)`;
57
54
  const gradientInk = (0, accentText_1.onGradient)(gradientStops.from, gradientStops.to, theme.colors.white, theme.colors.black);
55
+ const whiteRgb = (0, color_1.hexToRgb)(theme.colors.white);
56
+ const whiteOverlay = (alpha) => `rgba(${whiteRgb.r}, ${whiteRgb.g}, ${whiteRgb.b}, ${alpha})`;
58
57
  const gradientItemSx = isGradient
59
58
  ? {
60
59
  color: gradientInk,
61
60
  bg: "transparent",
62
61
  bgImage: "none",
63
62
  boxShadow: "none",
64
- _hover: { bg: "whiteAlpha.200", boxShadow: "none" },
65
- _active: { bg: "whiteAlpha.300" },
63
+ _hover: { bg: whiteOverlay(0.08), boxShadow: "none" },
64
+ _active: { bg: whiteOverlay(0.16) },
66
65
  }
67
66
  : undefined;
68
67
  return ((0, jsx_runtime_1.jsxs)(react_2.ButtonGroup, { size: size, isAttached: true, variant: isGradient ? "solid" : variant, onClick: onButtongroupClick, colorScheme: color, style: buttonGroupStyle, sx: isGradient
69
68
  ? { bgImage: gradientBg, color: gradientInk, borderRadius: "lg", overflow: "hidden" }
70
- : undefined, children: [leftIcon && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Left icon button", icon: leftIcon, isLoading: leftIconLoading, onClick: onLeftIconClick, onBlur: onBlurLeftIcon, style: buttonGroupLeftIconStyle, sx: gradientItemSx })), (0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: buttonText, isDisabled: !buttonText || !isTextTruncated, children: (0, jsx_runtime_1.jsx)(react_2.Button, { onClick: onButtonClick, style: buttonStyle, isLoading: isLoading, borderLeft: "1px solid", borderRight: "1px solid", borderColor: "whiteAlpha.400", maxW: "200px", sx: gradientItemSx, children: (0, jsx_runtime_1.jsx)(react_2.Box, { ref: textRef, as: "span", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", display: "block", width: "100%", children: buttonText }) }) }), rightIcon && rightIconDropdown ? ((0, jsx_runtime_1.jsxs)(react_2.Menu, { isOpen: isDropdownOpen, onClose: () => setIsDropdownOpen(false), children: [(0, jsx_runtime_1.jsx)(react_2.MenuButton, { as: react_2.IconButton, "aria-label": "Right icon button", icon: rightIcon, isLoading: RightIconLoading, onClick: handleRightIconClick, onBlur: onBlurRightIcon, style: buttonGroupRightIconStyle, sx: gradientItemSx }), (0, jsx_runtime_1.jsx)(react_2.Box, { sx: { zIndex: 99 }, children: (0, jsx_runtime_1.jsx)(react_2.MenuList, { style: menulistStyle, bg: theme.colors.backgroundColor.light,
69
+ : undefined, children: [leftIcon && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Left icon button", icon: leftIcon, isLoading: leftIconLoading, onClick: onLeftIconClick, onBlur: onBlurLeftIcon, style: buttonGroupLeftIconStyle, sx: gradientItemSx })), (0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: buttonText, isDisabled: !buttonText || !isTextTruncated, children: (0, jsx_runtime_1.jsx)(react_2.Button, { onClick: onButtonClick, style: buttonStyle, isLoading: isLoading, borderLeft: "1px solid", borderRight: "1px solid", borderColor: whiteOverlay(0.24), maxW: "200px", sx: gradientItemSx, children: (0, jsx_runtime_1.jsx)(react_2.Box, { ref: textRef, as: "span", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", display: "block", width: "100%", children: buttonText }) }) }), rightIcon && rightIconDropdown ? ((0, jsx_runtime_1.jsxs)(react_2.Menu, { isOpen: isDropdownOpen, onClose: () => setIsDropdownOpen(false), children: [(0, jsx_runtime_1.jsx)(react_2.MenuButton, { as: react_2.IconButton, "aria-label": "Right icon button", icon: rightIcon, isLoading: RightIconLoading, onClick: handleRightIconClick, onBlur: onBlurRightIcon, style: buttonGroupRightIconStyle, sx: gradientItemSx }), (0, jsx_runtime_1.jsx)(react_2.Box, { sx: { zIndex: 99 }, children: (0, jsx_runtime_1.jsx)(react_2.MenuList, { style: menulistStyle, bg: theme.colors.backgroundColor.light,
71
70
  // Chakra's own MenuItem renders `background: var(--menu-bg)` at rest, and its
72
71
  // MenuList baseStyle sets that var to a hardcoded "#fff" (never our `_dark`, which
73
72
  // this theme-swap app never triggers) — our `bg` prop above only recolors the list
74
73
  // itself, not the inherited var, so items fell back to white until hover/focus (which
75
74
  // our own sx already overrides). Setting the var here fixes the rest state too.
76
- sx: { "--menu-bg": theme.colors.backgroundColor.light }, border: "1px solid", borderColor: "blackAlpha.100", borderRadius: "xl", boxShadow: "lg", py: "0.375rem", minW: "12rem", overflow: "hidden", children: dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option, index) => ((0, jsx_runtime_1.jsxs)(react_2.MenuItem, { onClick: (event) => handleMenuClick(event, option), style: menuItemStyle, sx: {
75
+ sx: { "--menu-bg": theme.colors.backgroundColor.light }, border: "1px solid", borderColor: theme.colors.boxborder[500], borderRadius: "xl", boxShadow: "lg", py: "0.375rem", minW: "12rem", overflow: "hidden", children: dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option, index) => ((0, jsx_runtime_1.jsxs)(react_2.MenuItem, { onClick: (event) => handleMenuClick(event, option), style: menuItemStyle, sx: {
77
76
  display: "flex",
78
77
  alignItems: "center",
79
78
  gap: "0.5rem",
@@ -91,7 +90,7 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
91
90
  mx: 0,
92
91
  borderRadius: "none",
93
92
  borderBottom: "1px solid",
94
- borderColor: "blackAlpha.100",
93
+ borderColor: theme.colors.boxborder[300],
95
94
  }
96
95
  : {}),
97
96
  _hover: { bg: theme.colors.primary[50], color: theme.colors.primary[700] },
@@ -2,16 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_1 = require("@chakra-ui/react");
5
- const react_2 = require("@chakra-ui/react");
5
+ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
6
6
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
7
7
  const ErrorComponent = ({ error, errorClassName, }) => {
8
- var _a, _b, _c, _d;
9
- const theme = (0, react_2.useTheme)();
10
- // [500] alone fails AA on the page canvas in every brandstep to a darker rung instead.
11
- const errorFill = (0, accentText_1.accentTextOnCanvas)((_b = (_a = theme.colors.semantic) === null || _a === void 0 ? void 0 : _a.error) !== null && _b !== void 0 ? _b : theme.colors.red, (_d = (_c = theme.colors.backgroundColor) === null || _c === void 0 ? void 0 : _c.main) !== null && _d !== void 0 ? _d : accentText_1.DEFAULT_CANVAS);
12
- // errorFill is tuned for text-on-page-canvas, not for carrying a white mark on top of itself —
13
- // pick the mark ink structurally (onFilled) instead of assuming white always clears AA on it.
14
- const markInk = (0, accentText_1.onFilled)(errorFill, theme.colors.white, theme.colors.black);
8
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
9
+ const errorFill = colors.semanticText.error;
10
+ // errorFill is ink, not a fill tuned to carry a markpick the mark's ink structurally.
11
+ const markInk = (0, accentText_1.onFilled)(errorFill, colors.white, colors.black);
15
12
  return ((0, jsx_runtime_1.jsxs)(react_1.HStack, { as: "p", align: "flex-start", spacing: 1, mt: 1, fontSize: "sm", color: errorFill, className: errorClassName, children: [(0, jsx_runtime_1.jsxs)("svg", { width: "12", height: "12", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": true, children: [(0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "50", r: "50", fill: errorFill }), (0, jsx_runtime_1.jsx)("rect", { x: "46", y: "40", width: "8", height: "30", rx: "2", fill: markInk }), (0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "28", r: "4", fill: markInk })] }), (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", children: error })] }));
16
13
  };
17
14
  exports.default = ErrorComponent;
@@ -4,16 +4,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_1 = require("@chakra-ui/react");
5
5
  const lucide_react_1 = require("lucide-react");
6
6
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
7
- const accentText_1 = require("../../Theme/tokens/builders/accentText");
8
7
  // `id` lets a field point `aria-describedby` here so the message is part of the control's
9
8
  // description on every focus. `role="alert"` alone announces once, when it first renders.
10
9
  const ErrorMessage = ({ errorMessage, id }) => {
11
- var _a, _b;
12
- const theme = (0, useCustomTheme_1.useCustomTheme)();
13
- // red[500] alone fails AA on the page canvas (~3.4:1 vs the ~4.5 bar) in every brand — step
14
- // to a darker rung of the same scale instead of hardcoding one, since a manual retune of a
15
- // vivid-alert red collides with its own darker rungs before it clears AA (see red/error
16
- // scale comments in each brand's palette.light.ts).
17
- return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { id: id, align: "center", color: (0, accentText_1.accentTextOnCanvas)(theme.colors.red, (_b = (_a = theme.colors.backgroundColor) === null || _a === void 0 ? void 0 : _a.main) !== null && _b !== void 0 ? _b : accentText_1.DEFAULT_CANVAS), fontSize: "0.875rem", role: "alert", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Info, { width: "0.875rem" }), (0, jsx_runtime_1.jsx)(react_1.Text, { ml: "0.188rem", children: errorMessage !== null && errorMessage !== void 0 ? errorMessage : "Error" })] }));
10
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
11
+ return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { id: id, align: "center", color: colors.semanticText.error, fontSize: "0.875rem", role: "alert", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Info, { width: "0.875rem" }), (0, jsx_runtime_1.jsx)(react_1.Text, { ml: "0.188rem", children: errorMessage !== null && errorMessage !== void 0 ? errorMessage : "Error" })] }));
18
12
  };
19
13
  exports.default = ErrorMessage;
@@ -7,11 +7,9 @@ exports.TextLabel = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("@chakra-ui/react");
9
9
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
10
- const accentText_1 = require("../../Theme/tokens/builders/accentText");
11
10
  const lucide_react_1 = require("lucide-react");
12
11
  const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
13
12
  const TextLabel = ({ label, id, isRequired = false, isInformation = false, informationMessage = "", fontSize, showTooltip, tooltipLabel, clampLines, inline = false, }) => {
14
- var _a, _b, _c;
15
13
  const theme = (0, useCustomTheme_1.useCustomTheme)();
16
14
  const clampStyles = clampLines ? {
17
15
  display: "-webkit-box",
@@ -30,7 +28,7 @@ const TextLabel = ({ label, id, isRequired = false, isInformation = false, infor
30
28
  fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : "0.8125rem",
31
29
  lineHeight: "1.2",
32
30
  };
33
- const content = ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem", children: [showTooltip ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: tooltipLabel !== null && tooltipLabel !== void 0 ? tooltipLabel : label, hasArrow: true, placement: "top", fontSize: "0.75rem", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label }) })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label })), isRequired && ((0, jsx_runtime_1.jsx)("span", { style: { color: (0, accentText_1.accentTextOnCanvas)((_a = theme.colors.semantic) === null || _a === void 0 ? void 0 : _a.error, (_c = (_b = theme.colors.backgroundColor) === null || _b === void 0 ? void 0 : _b.main) !== null && _c !== void 0 ? _c : accentText_1.DEFAULT_CANVAS), marginLeft: "0.125rem" }, children: "*" })), isInformation && informationMessage && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: informationMessage, hasArrow: true, placement: "top", fontSize: "0.75rem", children: (0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.InfoIcon, color: theme.colors.text[700], boxSize: 3.5 }) }))] }));
31
+ const content = ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem", children: [showTooltip ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: tooltipLabel !== null && tooltipLabel !== void 0 ? tooltipLabel : label, hasArrow: true, placement: "top", fontSize: "0.75rem", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label }) })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label })), isRequired && ((0, jsx_runtime_1.jsx)("span", { style: { color: theme.colors.semanticText.error, marginLeft: "0.125rem" }, children: "*" })), isInformation && informationMessage && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: informationMessage, hasArrow: true, placement: "top", fontSize: "0.75rem", children: (0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.InfoIcon, color: theme.colors.text[700], boxSize: 3.5 }) }))] }));
34
32
  // A real <label> only when there is a control id to point at. Without one it would name
35
33
  // nothing, and TextLabel also renders `inline` inside controls that are themselves a <label>
36
34
  // (Checkbox/Radio) — nesting labels there would be invalid markup.
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_1 = require("@chakra-ui/react");
5
+ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
5
6
  const InlineText = ({ text }) => {
6
7
  const nodes = [];
7
8
  let i = 0;
@@ -41,6 +42,7 @@ const InlineText = ({ text }) => {
41
42
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nodes });
42
43
  };
43
44
  const FormattedDescription = ({ content }) => {
45
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
44
46
  if (!content)
45
47
  return null;
46
48
  const lines = content.split(/\r?\n/);
@@ -53,7 +55,7 @@ const FormattedDescription = ({ content }) => {
53
55
  const weight = level === 1 ? "bold" : level === 2 ? "semibold" : "medium";
54
56
  return ((0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: size, fontWeight: weight, mt: idx === 0 ? 0 : 2, textAlign: "left", children: (0, jsx_runtime_1.jsx)(InlineText, { text: text }) }, `h-${idx}`));
55
57
  }
56
- return ((0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "sm", color: "gray.700", mt: idx === 0 ? 0 : 2, textAlign: "justify", children: (0, jsx_runtime_1.jsx)(InlineText, { text: line }) }, `p-${idx}`));
58
+ return ((0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "sm", color: colors.text[500], mt: idx === 0 ? 0 : 2, textAlign: "justify", children: (0, jsx_runtime_1.jsx)(InlineText, { text: line }) }, `p-${idx}`));
57
59
  }) }));
58
60
  };
59
61
  exports.default = FormattedDescription;
@@ -2,14 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_1 = require("@chakra-ui/react");
5
- const react_2 = require("@chakra-ui/react");
6
- const accentText_1 = require("../../Theme/tokens/builders/accentText");
5
+ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
7
6
  const Label = ({ label, htmlFor, labelClassName, isRequired, }) => {
8
- var _a, _b, _c, _d, _e, _f;
9
- const theme = (0, react_2.useTheme)();
10
- const headerColor = (_b = (_a = theme.colors.header) === null || _a === void 0 ? void 0 : _a[500]) !== null && _b !== void 0 ? _b : (_c = theme.colors.text) === null || _c === void 0 ? void 0 : _c[500];
11
- // [500] alone fails AA on the page canvas in every brand — step to a darker rung instead.
12
- const errorColor = (0, accentText_1.accentTextOnCanvas)((_d = theme.colors.semantic) === null || _d === void 0 ? void 0 : _d.error, (_f = (_e = theme.colors.backgroundColor) === null || _e === void 0 ? void 0 : _e.main) !== null && _f !== void 0 ? _f : accentText_1.DEFAULT_CANVAS);
13
- return ((0, jsx_runtime_1.jsxs)(react_1.FormLabel, { htmlFor: htmlFor, mb: 1, fontSize: "sm", fontWeight: "medium", className: labelClassName, color: headerColor, children: [label, isRequired && ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", color: errorColor, ml: 1, children: "*" }))] }));
7
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
8
+ return ((0, jsx_runtime_1.jsxs)(react_1.FormLabel, { htmlFor: htmlFor, mb: 1, fontSize: "sm", fontWeight: "medium", className: labelClassName, color: colors.header[500], children: [label, isRequired && ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", color: colors.semanticText.error, ml: 1, children: "*" }))] }));
14
9
  };
15
10
  exports.default = Label;
@@ -12,16 +12,15 @@ exports.FIELD_TRANSITION = "border-color 0.2s, box-shadow 0.2s";
12
12
  * (e.g. SearchSelect, SingleDatePicker). Returns Chakra style props.
13
13
  */
14
14
  const getFieldStateStyles = (theme, { error = false, focused = false } = {}) => {
15
- var _a, _b, _c, _d, _e, _f, _g, _h;
16
15
  // [800], not [500]: WCAG 1.4.11 needs >=3.0 for a control boundary against any named surface
17
16
  // up to `muted` (lightest); [500] fails there, [800] clears all with margin.
18
- const idleBorder = (_b = (_a = theme.colors.boxborder) === null || _a === void 0 ? void 0 : _a[800]) !== null && _b !== void 0 ? _b : (_c = theme.colors.gray) === null || _c === void 0 ? void 0 : _c[300];
17
+ const idleBorder = theme.colors.boxborder[800];
19
18
  const primary = theme.colors.primary[500];
20
- const errorColor = (_e = (_d = theme.colors.semantic) === null || _d === void 0 ? void 0 : _d.error) === null || _e === void 0 ? void 0 : _e[500];
21
- const ringPrimary = (_f = theme.colors.boxShadow) === null || _f === void 0 ? void 0 : _f.primary;
22
- const ringError = (_g = theme.colors.boxShadow) === null || _g === void 0 ? void 0 : _g.error;
19
+ const errorColor = theme.colors.semanticText.error;
20
+ const ringPrimary = theme.colors.boxShadow.primary;
21
+ const ringError = theme.colors.boxShadow.error;
23
22
  return {
24
- bg: (_h = theme.colors.gray) === null || _h === void 0 ? void 0 : _h[50],
23
+ bg: theme.colors.gray[50],
25
24
  borderRadius: exports.FIELD_RADIUS,
26
25
  border: `${exports.FIELD_BORDER_WIDTH} solid`,
27
26
  borderColor: error ? errorColor : focused ? primary : idleBorder,
@@ -35,5 +34,5 @@ const getFieldStateStyles = (theme, { error = false, focused = false } = {}) =>
35
34
  };
36
35
  exports.getFieldStateStyles = getFieldStateStyles;
37
36
  /** Focus ring value (e.g. for `_focus` / `_focusWithin` pseudo styles). */
38
- const fieldFocusRing = (theme, error = false) => { var _a, _b; return `0 0 0 0.125rem ${error ? (_a = theme.colors.boxShadow) === null || _a === void 0 ? void 0 : _a.error : (_b = theme.colors.boxShadow) === null || _b === void 0 ? void 0 : _b.primary}`; };
37
+ const fieldFocusRing = (theme, error = false) => `0 0 0 0.125rem ${error ? theme.colors.boxShadow.error : theme.colors.boxShadow.primary}`;
39
38
  exports.fieldFocusRing = fieldFocusRing;
@@ -12,7 +12,6 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
12
12
  const InputTextArea_1 = __importDefault(require("../InputTextArea/InputTextArea"));
13
13
  const Button_1 = __importDefault(require("../Button/Button"));
14
14
  const ContactForm = ({ apiKey, customFields, getCustomValues, isDisabled = false, organizationId, customerId, buttonColorScheme = "primary", buttonSx, }) => {
15
- var _a;
16
15
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
17
16
  const [formData, setFormData] = (0, react_1.useState)({
18
17
  firstName: "",
@@ -112,6 +111,6 @@ const ContactForm = ({ apiKey, customFields, getCustomValues, isDisabled = false
112
111
  setIsLoading(false);
113
112
  }
114
113
  };
115
- return ((0, jsx_runtime_1.jsxs)(react_2.Box, { maxW: "lg", mx: "auto", p: 8, borderRadius: "2xl", boxShadow: "lg", bg: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[300], children: [response.title ? ((0, jsx_runtime_1.jsxs)(react_2.Alert, { status: (response === null || response === void 0 ? void 0 : response.isSuccess) ? "success" : "error", fontWeight: "bold", variant: "solid", mb: 1, children: [(response === null || response === void 0 ? void 0 : response.isSuccess) ? (0, jsx_runtime_1.jsx)(lucide_react_1.CircleCheck, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.CircleX, {}), " \u00A0", " ", response.title] })) : null, (0, jsx_runtime_1.jsx)(react_2.Heading, { textAlign: "center", size: "lg", mb: 2, children: "Contact Us" }), (0, jsx_runtime_1.jsx)(react_2.Text, { textAlign: "center", mb: 6, color: "gray.500", children: "Fill in the form below to reach out to us." }), (0, jsx_runtime_1.jsx)(react_2.Box, { as: "form", onSubmit: handleSubmit, children: (0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: 4, children: [(0, jsx_runtime_1.jsxs)(react_2.SimpleGrid, { columns: { base: 1, md: 2 }, spacing: 4, w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.FormControl, { children: (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: "First Name", placeholder: "Enter first name", value: formData.firstName, onChange: (e) => handleChange("firstName", e.target.value), error: Boolean(errors.firstName), errorMessage: errors.firstName, isRequired: true }) }), (0, jsx_runtime_1.jsx)(react_2.FormControl, { children: (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: "Last Name", placeholder: "Enter last name", value: formData.lastName, onChange: (e) => handleChange("lastName", e.target.value) }) })] }), (0, jsx_runtime_1.jsxs)(react_2.SimpleGrid, { columns: { base: 1, md: 2 }, spacing: 4, w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.FormControl, { children: (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: "Phone", placeholder: "Enter phone number", value: formData.phone, onChange: (e) => handleChange("phone", e.target.value), isRequired: true, error: Boolean(errors.phone), errorMessage: errors.phone }) }), (0, jsx_runtime_1.jsx)(react_2.FormControl, { isInvalid: !!errors.email, children: (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: "Email", placeholder: "Enter email", value: formData.email, onChange: (e) => handleChange("email", e.target.value), error: Boolean(errors.email), errorMessage: errors.email }) })] }), customFields, (0, jsx_runtime_1.jsxs)(react_2.FormControl, { children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", mb: 1, children: "Enquiry" }), (0, jsx_runtime_1.jsx)(react_2.Box, { children: (0, jsx_runtime_1.jsx)(InputTextArea_1.default, { placeholder: "Enter your enquiry", rows: 4, width: "100%", value: formData.enquiry, onChange: (e) => handleChange("enquiry", e.target.value) }) })] }), (0, jsx_runtime_1.jsx)(Button_1.default, { type: "submit", isDisabled: isDisabled, colorScheme: buttonColorScheme, width: "full", sx: buttonSx, isLoading: isLoading, loadingText: "Sending...", children: "Send Message" })] }) })] }));
114
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { maxW: "lg", mx: "auto", p: 8, borderRadius: "2xl", boxShadow: "lg", bg: colors.background[300], children: [response.title ? ((0, jsx_runtime_1.jsxs)(react_2.Alert, { status: (response === null || response === void 0 ? void 0 : response.isSuccess) ? "success" : "error", fontWeight: "bold", variant: "solid", mb: 1, children: [(response === null || response === void 0 ? void 0 : response.isSuccess) ? (0, jsx_runtime_1.jsx)(lucide_react_1.CircleCheck, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.CircleX, {}), " \u00A0", " ", response.title] })) : null, (0, jsx_runtime_1.jsx)(react_2.Heading, { textAlign: "center", size: "lg", mb: 2, children: "Contact Us" }), (0, jsx_runtime_1.jsx)(react_2.Text, { textAlign: "center", mb: 6, color: colors.textMuted, children: "Fill in the form below to reach out to us." }), (0, jsx_runtime_1.jsx)(react_2.Box, { as: "form", onSubmit: handleSubmit, children: (0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: 4, children: [(0, jsx_runtime_1.jsxs)(react_2.SimpleGrid, { columns: { base: 1, md: 2 }, spacing: 4, w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.FormControl, { children: (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: "First Name", placeholder: "Enter first name", value: formData.firstName, onChange: (e) => handleChange("firstName", e.target.value), error: Boolean(errors.firstName), errorMessage: errors.firstName, isRequired: true }) }), (0, jsx_runtime_1.jsx)(react_2.FormControl, { children: (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: "Last Name", placeholder: "Enter last name", value: formData.lastName, onChange: (e) => handleChange("lastName", e.target.value) }) })] }), (0, jsx_runtime_1.jsxs)(react_2.SimpleGrid, { columns: { base: 1, md: 2 }, spacing: 4, w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.FormControl, { children: (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: "Phone", placeholder: "Enter phone number", value: formData.phone, onChange: (e) => handleChange("phone", e.target.value), isRequired: true, error: Boolean(errors.phone), errorMessage: errors.phone }) }), (0, jsx_runtime_1.jsx)(react_2.FormControl, { isInvalid: !!errors.email, children: (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: "Email", placeholder: "Enter email", value: formData.email, onChange: (e) => handleChange("email", e.target.value), error: Boolean(errors.email), errorMessage: errors.email }) })] }), customFields, (0, jsx_runtime_1.jsxs)(react_2.FormControl, { children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", mb: 1, children: "Enquiry" }), (0, jsx_runtime_1.jsx)(react_2.Box, { children: (0, jsx_runtime_1.jsx)(InputTextArea_1.default, { placeholder: "Enter your enquiry", rows: 4, width: "100%", value: formData.enquiry, onChange: (e) => handleChange("enquiry", e.target.value) }) })] }), (0, jsx_runtime_1.jsx)(Button_1.default, { type: "submit", isDisabled: isDisabled, colorScheme: buttonColorScheme, width: "full", sx: buttonSx, isLoading: isLoading, loadingText: "Sending...", children: "Send Message" })] }) })] }));
116
115
  };
117
116
  exports.default = ContactForm;
@@ -11,7 +11,6 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
11
11
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
12
12
  const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
13
13
  const CopyButton = ({ value, variant = "icon", label = "Copy", copiedLabel = "Copied!", tooltip = "Copy", feedbackDuration = 1500, iconSize = 16, size = "sm", onCopy, }) => {
14
- var _a, _b;
15
14
  const theme = (0, useCustomTheme_1.useCustomTheme)();
16
15
  const [copied, setCopied] = (0, react_1.useState)(false);
17
16
  const timer = (0, react_1.useRef)();
@@ -33,16 +32,14 @@ const CopyButton = ({ value, variant = "icon", label = "Copy", copiedLabel = "Co
33
32
  // canvas — it fails AA here in 5 of 7 brands in dark mode. accentTextOnCanvas steps to the
34
33
  // nearest rung that clears AA against the canvas this button actually sits on.
35
34
  const accent = (0, accentText_1.accentTextOnCanvas)(theme.colors.primary, theme.colors.backgroundColor.main);
36
- const success = theme.colors.semantic.success[500];
35
+ const success = theme.colors.semanticText.success;
37
36
  if (variant === "menu-item") {
38
37
  return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: "0.5rem", px: "12px", py: "8px", width: "100%", cursor: "pointer", borderRadius: "md", transition: "background 0.15s ease", _hover: { bg: theme.colors.gray[100] }, onClick: handleCopy, children: [copied ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: iconSize, color: success }) : (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { size: iconSize, color: accent }), (0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "14px", fontWeight: 500, color: copied ? success : accent, children: copied ? copiedLabel : label })] }));
39
38
  }
40
39
  if (variant === "button") {
41
40
  return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", align: "center", gap: "6px", px: "12px", py: "6px", borderRadius: "lg", border: "1px solid",
42
- // boxborder[800], not raw gray[200]: this renders as a real `<button>` (as="button"),
43
- // so its border is a control boundary WCAG 1.4.11 needs >=3.0 against any named
44
- // surface up to `muted` (lightest); gray[200] fails there in dark mode.
45
- borderColor: copied ? success : ((_b = (_a = theme.colors.boxborder) === null || _a === void 0 ? void 0 : _a[800]) !== null && _b !== void 0 ? _b : theme.colors.gray[200]), bg: "transparent", color: copied ? success : theme.colors.gray[700], fontSize: "14px", fontWeight: 500, transition: "all 0.15s ease", _hover: { borderColor: accent, color: accent }, onClick: handleCopy, children: [copied ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: iconSize }) : (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { size: iconSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { children: copied ? copiedLabel : label })] }));
41
+ // [800], not [500]: a real control boundary needs >=3:1 on every surface up to `muted`.
42
+ borderColor: copied ? success : theme.colors.boxborder[800], bg: "transparent", color: copied ? success : theme.colors.gray[700], fontSize: "14px", fontWeight: 500, transition: "all 0.15s ease", _hover: { borderColor: accent, color: accent }, onClick: handleCopy, children: [copied ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: iconSize }) : (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { size: iconSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { children: copied ? copiedLabel : label })] }));
46
43
  }
47
44
  return ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: copied ? copiedLabel : tooltip, placement: "top", children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": tooltip, size: size, variant: "ghost", onClick: handleCopy, color: copied ? success : theme.colors.gray[500], _hover: { color: accent, bg: theme.colors.primary[50] }, icon: copied ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: iconSize }) : (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { size: iconSize }) }) }));
48
45
  };
@@ -29,16 +29,16 @@ const DEFAULT_LABELS = {
29
29
  deleteConfirmPrefix: "Are you sure you want to delete",
30
30
  };
31
31
  const CustomModulesTable = ({ modules, isLoading = false, isUpdating = false, isDeleting = false, onUpdateModule, onDeleteModule, labels: labelOverrides, }) => {
32
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
32
+ var _a;
33
33
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
34
34
  const labels = (0, react_1.useMemo)(() => ({ ...DEFAULT_LABELS, ...labelOverrides }), [labelOverrides]);
35
35
  const [editTarget, setEditTarget] = (0, react_1.useState)(null);
36
36
  const [deleteTarget, setDeleteTarget] = (0, react_1.useState)(null);
37
- 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];
38
- const surface = (_e = (_d = colors === null || colors === void 0 ? void 0 : colors.background) === null || _d === void 0 ? void 0 : _d[50]) !== null && _e !== void 0 ? _e : (_f = colors === null || colors === void 0 ? void 0 : colors.backgroundColor) === null || _f === void 0 ? void 0 : _f.light;
39
- const muted = (_h = (_g = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _g === void 0 ? void 0 : _g[500]) !== null && _h !== void 0 ? _h : (_j = colors === null || colors === void 0 ? void 0 : colors.text) === null || _j === void 0 ? void 0 : _j[500];
40
- const heading = (_l = (_k = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _k === void 0 ? void 0 : _k[800]) !== null && _l !== void 0 ? _l : (_m = colors === null || colors === void 0 ? void 0 : colors.text) === null || _m === void 0 ? void 0 : _m[800];
41
- const headBg = (_p = (_o = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _o === void 0 ? void 0 : _o[50]) !== null && _p !== void 0 ? _p : (_q = colors === null || colors === void 0 ? void 0 : colors.backgroundColor) === null || _q === void 0 ? void 0 : _q.tableHeader;
37
+ const border = colors.boxborder[200];
38
+ const surface = colors.background[50];
39
+ const muted = colors.textMuted;
40
+ const heading = colors.text[800];
41
+ const headBg = colors.backgroundColor.tableHeader;
42
42
  const thStyle = {
43
43
  fontSize: "0.7rem",
44
44
  textTransform: "uppercase",
@@ -47,10 +47,7 @@ const CustomModulesTable = ({ modules, isLoading = false, isUpdating = false, is
47
47
  borderColor: border,
48
48
  py: 3,
49
49
  };
50
- return ((0, jsx_runtime_1.jsxs)(react_2.Box, { backgroundColor: surface, borderRadius: "xl", border: "1px solid", borderColor: border, boxShadow: "sm", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { px: 4, py: 3, borderBottom: "1px solid", borderColor: border, alignItems: "center", children: (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.title }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { overflowX: "auto", children: isLoading ? ((0, jsx_runtime_1.jsx)(react_2.VStack, { spacing: 3, p: 4, align: "stretch", children: Array.from({ length: 4 }).map((_, idx) => {
51
- var _a, _b;
52
- return ((0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "18px", borderRadius: "md", startColor: (_a = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _a === void 0 ? void 0 : _a[100], endColor: (_b = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _b === void 0 ? void 0 : _b[400] }, idx));
53
- }) })) : modules.length === 0 ? ((0, jsx_runtime_1.jsx)(EmptyState_1.default, { icon: lucide_react_1.Boxes, title: labels.noModules, size: "sm", minH: "180px" })) : ((0, jsx_runtime_1.jsxs)(react_2.Table, { variant: "simple", size: "sm", children: [(0, jsx_runtime_1.jsx)(react_2.Thead, { bg: headBg, children: (0, jsx_runtime_1.jsxs)(react_2.Tr, { children: [(0, jsx_runtime_1.jsx)(react_2.Th, { ...thStyle, children: labels.moduleName }), (0, jsx_runtime_1.jsx)(react_2.Th, { ...thStyle, children: labels.moduleOwner }), (0, jsx_runtime_1.jsx)(react_2.Th, { ...thStyle, textAlign: "right", children: labels.action })] }) }), (0, jsx_runtime_1.jsx)(react_2.Tbody, { children: modules.map((item) => ((0, jsx_runtime_1.jsxs)(react_2.Tr, { _hover: { bg: headBg }, transition: "background 0.15s ease", children: [(0, jsx_runtime_1.jsx)(react_2.Td, { borderColor: border, fontSize: "sm", fontWeight: 500, color: heading, maxW: "220px", children: (0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: item.moduleName, hasArrow: true, openDelay: 400, children: (0, jsx_runtime_1.jsx)(react_2.Text, { noOfLines: 1, children: item.moduleName }) }) }), (0, jsx_runtime_1.jsx)(react_2.Td, { borderColor: border, fontSize: "sm", color: muted, children: item.ownerLabel || "—" }), (0, jsx_runtime_1.jsx)(react_2.Td, { borderColor: border, children: (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, justifyContent: "flex-end", children: [(0, jsx_runtime_1.jsx)(Button_1.default, { size: "xs", variant: "outline", colorScheme: "primary", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Pencil, { size: 13 }), label: labels.edit, onClick: () => setEditTarget(item) }), (0, jsx_runtime_1.jsx)(Button_1.default, { size: "xs", variant: "outline", colorScheme: "red", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Trash2, { size: 13 }), label: labels.delete, onClick: () => setDeleteTarget(item) })] }) })] }, item.module_id))) })] })) }), (0, jsx_runtime_1.jsx)(EditModuleModal_1.default, { isOpen: editTarget !== null, onClose: () => setEditTarget(null), initialName: (_r = editTarget === null || editTarget === void 0 ? void 0 : editTarget.moduleName) !== null && _r !== void 0 ? _r : "", isLoading: isUpdating, onSubmit: async (name) => {
50
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { backgroundColor: surface, borderRadius: "xl", border: "1px solid", borderColor: border, boxShadow: "sm", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { px: 4, py: 3, borderBottom: "1px solid", borderColor: border, alignItems: "center", children: (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.title }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { overflowX: "auto", children: isLoading ? ((0, jsx_runtime_1.jsx)(react_2.VStack, { spacing: 3, p: 4, align: "stretch", children: Array.from({ length: 4 }).map((_, idx) => ((0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "18px", borderRadius: "md", startColor: colors.gray[100], endColor: colors.gray[400] }, idx))) })) : modules.length === 0 ? ((0, jsx_runtime_1.jsx)(EmptyState_1.default, { icon: lucide_react_1.Boxes, title: labels.noModules, size: "sm", minH: "180px" })) : ((0, jsx_runtime_1.jsxs)(react_2.Table, { variant: "simple", size: "sm", children: [(0, jsx_runtime_1.jsx)(react_2.Thead, { bg: headBg, children: (0, jsx_runtime_1.jsxs)(react_2.Tr, { children: [(0, jsx_runtime_1.jsx)(react_2.Th, { ...thStyle, children: labels.moduleName }), (0, jsx_runtime_1.jsx)(react_2.Th, { ...thStyle, children: labels.moduleOwner }), (0, jsx_runtime_1.jsx)(react_2.Th, { ...thStyle, textAlign: "right", children: labels.action })] }) }), (0, jsx_runtime_1.jsx)(react_2.Tbody, { children: modules.map((item) => ((0, jsx_runtime_1.jsxs)(react_2.Tr, { _hover: { bg: headBg }, transition: "background 0.15s ease", children: [(0, jsx_runtime_1.jsx)(react_2.Td, { borderColor: border, fontSize: "sm", fontWeight: 500, color: heading, maxW: "220px", children: (0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: item.moduleName, hasArrow: true, openDelay: 400, children: (0, jsx_runtime_1.jsx)(react_2.Text, { noOfLines: 1, children: item.moduleName }) }) }), (0, jsx_runtime_1.jsx)(react_2.Td, { borderColor: border, fontSize: "sm", color: muted, children: item.ownerLabel || "—" }), (0, jsx_runtime_1.jsx)(react_2.Td, { borderColor: border, children: (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, justifyContent: "flex-end", children: [(0, jsx_runtime_1.jsx)(Button_1.default, { size: "xs", variant: "outline", colorScheme: "primary", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Pencil, { size: 13 }), label: labels.edit, onClick: () => setEditTarget(item) }), (0, jsx_runtime_1.jsx)(Button_1.default, { size: "xs", variant: "outline", colorScheme: "red", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Trash2, { size: 13 }), label: labels.delete, onClick: () => setDeleteTarget(item) })] }) })] }, item.module_id))) })] })) }), (0, jsx_runtime_1.jsx)(EditModuleModal_1.default, { isOpen: editTarget !== null, onClose: () => setEditTarget(null), initialName: (_a = editTarget === null || editTarget === void 0 ? void 0 : editTarget.moduleName) !== null && _a !== void 0 ? _a : "", isLoading: isUpdating, onSubmit: async (name) => {
54
51
  if (editTarget) {
55
52
  await (onUpdateModule === null || onUpdateModule === void 0 ? void 0 : onUpdateModule({
56
53
  moduleId: editTarget.module_id,
@@ -7,10 +7,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const react_1 = require("@chakra-ui/react");
8
8
  const lucide_react_1 = require("lucide-react");
9
9
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
10
+ const accentText_1 = require("../../Theme/tokens/builders/accentText");
10
11
  const Button_1 = __importDefault(require("../Button/Button"));
11
12
  const DeleteModuleModal = ({ isOpen, onClose, moduleName, isLoading, onConfirm, labels, }) => {
12
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
13
13
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
14
- return ((0, jsx_runtime_1.jsxs)(react_1.Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, children: [(0, jsx_runtime_1.jsx)(react_1.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_1.ModalContent, { borderRadius: "2xl", overflow: "hidden", bg: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[50], children: [(0, jsx_runtime_1.jsxs)(react_1.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: [(0, jsx_runtime_1.jsx)(react_1.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: (_g = (_f = (_e = colors === null || colors === void 0 ? void 0 : colors.semantic) === null || _e === void 0 ? void 0 : _e.error) === null || _f === void 0 ? void 0 : _f[50]) !== null && _g !== void 0 ? _g : (_h = colors === null || colors === void 0 ? void 0 : colors.red) === null || _h === void 0 ? void 0 : _h[50], color: (_l = (_k = (_j = colors === null || colors === void 0 ? void 0 : colors.semantic) === null || _j === void 0 ? void 0 : _j.error) === null || _k === void 0 ? void 0 : _k[500]) !== null && _l !== void 0 ? _l : (_m = colors === null || colors === void 0 ? void 0 : colors.red) === null || _m === void 0 ? void 0 : _m[500], children: (0, jsx_runtime_1.jsx)(lucide_react_1.AlertTriangle, { size: 18 }) }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "1.05rem", fontWeight: 600, children: labels.confirmDeletion })] }), (0, jsx_runtime_1.jsx)(react_1.ModalCloseButton, {}), (0, jsx_runtime_1.jsxs)(react_1.ModalBody, { py: 6, children: [(0, jsx_runtime_1.jsxs)(react_1.Text, { color: (_o = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _o === void 0 ? void 0 : _o[600], fontSize: "sm", mb: 5, children: [labels.deleteConfirmPrefix, " ", (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontWeight: 600, color: (_p = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _p === void 0 ? void 0 : _p[800], children: moduleName }), "?"] }), (0, jsx_runtime_1.jsxs)(react_1.HStack, { justifyContent: "flex-end", spacing: 3, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.cancel, onClick: onClose, variant: "outline", colorScheme: "gray", size: "sm" }), (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.delete, onClick: onConfirm, colorScheme: "red", size: "sm", isLoading: isLoading, leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Trash2, { size: 15 }) })] })] })] })] }));
14
+ return ((0, jsx_runtime_1.jsxs)(react_1.Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, children: [(0, jsx_runtime_1.jsx)(react_1.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_1.ModalContent, { borderRadius: "2xl", overflow: "hidden", bg: colors.background[50], children: [(0, jsx_runtime_1.jsxs)(react_1.ModalHeader, { borderBottom: "1px solid", borderColor: colors.boxborder[200], display: "flex", alignItems: "center", gap: 3, children: [(0, jsx_runtime_1.jsx)(react_1.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: colors.semantic.error[50], color: (0, accentText_1.accentTextOnCanvas)(colors.semantic.error, colors.semantic.error[50]), children: (0, jsx_runtime_1.jsx)(lucide_react_1.AlertTriangle, { size: 18 }) }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "1.05rem", fontWeight: 600, children: labels.confirmDeletion })] }), (0, jsx_runtime_1.jsx)(react_1.ModalCloseButton, {}), (0, jsx_runtime_1.jsxs)(react_1.ModalBody, { py: 6, children: [(0, jsx_runtime_1.jsxs)(react_1.Text, { color: colors.textMuted, fontSize: "sm", mb: 5, children: [labels.deleteConfirmPrefix, " ", (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontWeight: 600, color: colors.text[800], children: moduleName }), "?"] }), (0, jsx_runtime_1.jsxs)(react_1.HStack, { justifyContent: "flex-end", spacing: 3, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.cancel, onClick: onClose, variant: "outline", colorScheme: "gray", size: "sm" }), (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.delete, onClick: onConfirm, colorScheme: "red", size: "sm", isLoading: isLoading, leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Trash2, { size: 15 }) })] })] })] })] }));
15
15
  };
16
16
  exports.default = DeleteModuleModal;