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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. package/dist/Components/Accordion/Accordion.js +13 -15
  2. package/dist/Components/Accordion/accordionColors.js +6 -9
  3. package/dist/Components/AlertDialog/AlertDialog.js +1 -2
  4. package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
  5. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
  6. package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
  7. package/dist/Components/AppearanceSettings/AppearanceSettings.js +9 -7
  8. package/dist/Components/Button/Button.styles.js +7 -12
  9. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +12 -13
  10. package/dist/Components/Checkbox/Checkbox.js +1 -1
  11. package/dist/Components/Checkbox/Checkbox.styles.js +2 -0
  12. package/dist/Components/Common/ErrorComponent.js +5 -8
  13. package/dist/Components/Common/ErrorMessage.js +2 -8
  14. package/dist/Components/Common/FormLabel.js +1 -3
  15. package/dist/Components/Common/FormattedDescription.js +3 -1
  16. package/dist/Components/Common/Label.js +3 -8
  17. package/dist/Components/Common/fieldStyles.js +6 -7
  18. package/dist/Components/ContactForm/ContactForm.js +1 -2
  19. package/dist/Components/CopyButton/CopyButton.js +3 -6
  20. package/dist/Components/CustomModulesTable/CustomModulesTable.js +7 -10
  21. package/dist/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
  22. package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -3
  23. package/dist/Components/DatePicker/CalendarPanel.js +3 -4
  24. package/dist/Components/DatePicker/RangeDatePicker.js +9 -9
  25. package/dist/Components/DatePicker/SingleDatePicker.js +11 -11
  26. package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -2
  27. package/dist/Components/DatePicker/TimePicker.js +6 -7
  28. package/dist/Components/DatePicker/TimePickerInput.js +6 -7
  29. package/dist/Components/Divider/Divider.js +1 -2
  30. package/dist/Components/Drawer/Drawer.js +1 -2
  31. package/dist/Components/Dropdown/DropDown.js +19 -33
  32. package/dist/Components/Editor/Editor.js +10 -13
  33. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +3 -3
  34. package/dist/Components/EmptyState/EmptyState.js +11 -11
  35. package/dist/Components/FieldSelectModal/FieldSelectModal.js +1 -1
  36. package/dist/Components/FilePreview/FilePreview.js +2 -2
  37. package/dist/Components/FileUpload/FileUpload.js +18 -24
  38. package/dist/Components/FileUploader/FileUploader.js +5 -6
  39. package/dist/Components/FilterSidebar/FilterSidebar.js +156 -160
  40. package/dist/Components/Form/FormWrapper.js +1 -2
  41. package/dist/Components/Header/Header.js +6 -6
  42. package/dist/Components/Header/HeaderActions.d.ts +3 -1
  43. package/dist/Components/Header/HeaderActions.js +8 -4
  44. package/dist/Components/Header/components/desktopMenu.js +7 -20
  45. package/dist/Components/Header/components/mobileMenu.js +3 -15
  46. package/dist/Components/Input/Input/Input.js +13 -17
  47. package/dist/Components/Input/TextInput.styles.js +15 -16
  48. package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -1
  49. package/dist/Components/InputTextArea/InputTextArea.style.js +14 -14
  50. package/dist/Components/KanbanBoard/AccountCard.js +10 -4
  51. package/dist/Components/KanbanBoard/AccountRow.js +1 -2
  52. package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  53. package/dist/Components/KanbanBoard/KanbanBoard.js +15 -62
  54. package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
  55. package/dist/Components/LimitReachedModal/LimitReachedModal.js +5 -18
  56. package/dist/Components/Loading/Loading.js +1 -1
  57. package/dist/Components/Modal/Modal.js +3 -1
  58. package/dist/Components/MoreItems/MoreItems.js +3 -7
  59. package/dist/Components/MultiSelect/MultiSelect.js +5 -6
  60. package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -1
  61. package/dist/Components/NavigationBar/NavigationBar.js +22 -18
  62. package/dist/Components/NavigationBar/NavigationBarProps.d.ts +5 -0
  63. package/dist/Components/NoteTextArea/NoteTextArea.js +7 -9
  64. package/dist/Components/Notification/Notification.js +17 -15
  65. package/dist/Components/NumberInput/NumberInput.styles.js +14 -14
  66. package/dist/Components/OrgSwitcher/OrgSwitcher.js +7 -8
  67. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +2 -0
  68. package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +6 -2
  69. package/dist/Components/OrganizationDetails/CreateOrgModal.js +1 -2
  70. package/dist/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
  71. package/dist/Components/OrganizationDetails/OrganizationDetails.js +25 -22
  72. package/dist/Components/PdfViewer/PdfViewer.js +1 -1
  73. package/dist/Components/PinInput/PinInput.js +1 -1
  74. package/dist/Components/PinInputs/PinInputs.js +7 -14
  75. package/dist/Components/PlanPill/PlanPill.js +8 -11
  76. package/dist/Components/PlanPill/planPillGradient.d.ts +21 -14
  77. package/dist/Components/PlanPill/planPillGradient.js +33 -16
  78. package/dist/Components/ProductCard/ProductPrice.js +6 -6
  79. package/dist/Components/ProductCard/ProductReview.js +4 -1
  80. package/dist/Components/ProductCard/ProductTags.js +4 -4
  81. package/dist/Components/ProductDetails/ProductDetails.js +3 -1
  82. package/dist/Components/ProductDetails/ProductDtlPrice.js +3 -3
  83. package/dist/Components/ProfileCard/ProfileCard.js +4 -4
  84. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +19 -16
  85. package/dist/Components/RadioButton/RadioButton.js +1 -1
  86. package/dist/Components/Reorder/Reorder.js +3 -4
  87. package/dist/Components/RolesPermission/DeleteRoleModal.js +5 -4
  88. package/dist/Components/RolesPermission/RolesPermission.js +12 -14
  89. package/dist/Components/ScrollToTop/ScrollToTop.js +2 -3
  90. package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +13 -0
  91. package/dist/Components/ScrollbarBox/ScrollbarBox.js +11 -0
  92. package/dist/Components/SearchSelect/SearchSelect.js +26 -28
  93. package/dist/Components/Select/Select.styles.js +34 -37
  94. package/dist/Components/SelectSearch/SelectSearch.js +10 -10
  95. package/dist/Components/SelectV2/SelectV2.js +8 -20
  96. package/dist/Components/SideBar/SecondaryBar.js +10 -15
  97. package/dist/Components/SideBar/SideBar.d.ts +1 -1
  98. package/dist/Components/SideBar/SideBar.js +41 -34
  99. package/dist/Components/SideBar/SideBarProps.d.ts +6 -0
  100. package/dist/Components/SideBar/components/MenuItemBox.js +10 -12
  101. package/dist/Components/SideBar/components/MenuItems.js +3 -1
  102. package/dist/Components/SideBar/components/MenuPopoverContent.js +7 -9
  103. package/dist/Components/SideBar/components/OtherApps.js +4 -4
  104. package/dist/Components/SideBar/sidebarAccentColors.d.ts +4 -17
  105. package/dist/Components/SideBar/sidebarAccentColors.js +6 -33
  106. package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -7
  107. package/dist/Components/Slider/Slider.js +2 -2
  108. package/dist/Components/StageProgress/StageProgress.js +2 -9
  109. package/dist/Components/StageProgress/StageProgressProps.js +9 -13
  110. package/dist/Components/Table/Table.js +19 -30
  111. package/dist/Components/Table/components/HeaderActions.js +6 -7
  112. package/dist/Components/Table/components/Pagination.js +1 -1
  113. package/dist/Components/Table/components/TableActions.js +4 -4
  114. package/dist/Components/Table/components/TableBody.js +18 -20
  115. package/dist/Components/Table/components/TableGroupRow.js +1 -2
  116. package/dist/Components/Table/components/TableHeader.js +8 -12
  117. package/dist/Components/Table/components/TableSearch.js +1 -2
  118. package/dist/Components/Table/components/tableRowHoverStyle.js +2 -3
  119. package/dist/Components/Table/filters/ActiveFilters.js +5 -24
  120. package/dist/Components/Table/filters/CompactSelect.js +4 -5
  121. package/dist/Components/Table/filters/LeftFilterPane.js +4 -5
  122. package/dist/Components/Table/filters/TableFilters.js +1 -2
  123. package/dist/Components/Table/hooks/useTable.js +8 -11
  124. package/dist/Components/Table/settings/ManageColumns.js +4 -18
  125. package/dist/Components/Table/settings/TableSettings.js +13 -21
  126. package/dist/Components/Tag/Tag.styles.js +8 -6
  127. package/dist/Components/Timeline/Timeline.js +32 -45
  128. package/dist/Components/Toaster/Toaster.js +43 -44
  129. package/dist/Components/ToolTip/ToolTip.js +1 -6
  130. package/dist/Components/Trail/EditableCell.js +4 -1
  131. package/dist/Components/Trail/TrailWorks.js +3 -3
  132. package/dist/Components/UpgradeButton/UpgradeButton.js +4 -6
  133. package/dist/Components/UserDetails/AddUserModal.js +3 -3
  134. package/dist/Components/UserDetails/ChangeRoleModal.js +2 -2
  135. package/dist/Components/UserDetails/DeactivateConfirmModal.js +5 -5
  136. package/dist/Components/UserDetails/UserDetails.js +14 -16
  137. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
  138. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
  139. package/dist/Constants/Sidebar.js +3 -2
  140. package/dist/Theme/assertPalette.d.ts +11 -0
  141. package/dist/Theme/assertPalette.js +55 -0
  142. package/dist/Theme/chakra/Avatar.styles.d.ts +5 -5
  143. package/dist/Theme/chakra/Avatar.styles.js +2 -2
  144. package/dist/Theme/chakra/Drawer.styles.d.ts +5 -5
  145. package/dist/Theme/chakra/Drawer.styles.js +8 -10
  146. package/dist/Theme/chakra/Menu.styles.d.ts +9 -6
  147. package/dist/Theme/chakra/Menu.styles.js +11 -5
  148. package/dist/Theme/chakra/Modal.styles.d.ts +5 -5
  149. package/dist/Theme/chakra/Modal.styles.js +8 -10
  150. package/dist/Theme/chakra/Popover.styles.d.ts +9 -6
  151. package/dist/Theme/chakra/Popover.styles.js +11 -6
  152. package/dist/Theme/chakra/Slider.styles.d.ts +1 -1
  153. package/dist/Theme/chakra/Slider.styles.js +7 -9
  154. package/dist/Theme/chakra/Switch.styles.d.ts +1 -1
  155. package/dist/Theme/chakra/Switch.styles.js +7 -9
  156. package/dist/Theme/chakra/Tabs.styles.d.ts +2 -2
  157. package/dist/Theme/chakra/Tabs.styles.js +13 -18
  158. package/dist/Theme/chakra/componentStyles.d.ts +69 -30
  159. package/dist/Theme/chakra/componentStyles.js +52 -43
  160. package/dist/Theme/chakra/createBrandTheme.js +3 -16
  161. package/dist/Theme/chakra/paletteFromTheme.d.ts +10 -0
  162. package/dist/Theme/chakra/paletteFromTheme.js +14 -0
  163. package/dist/Theme/provider/PixelizeThemeProvider.js +23 -20
  164. package/dist/Theme/provider/ThemeSwitcher.js +13 -20
  165. package/dist/Theme/testing/testPalette.d.ts +16 -0
  166. package/dist/Theme/testing/testPalette.js +24 -0
  167. package/dist/Theme/tokens/brands/emerald/palette.light.d.ts +2 -373
  168. package/dist/Theme/tokens/brands/emerald/palette.light.js +5 -7
  169. package/dist/Theme/tokens/brands/index.d.ts +3 -2
  170. package/dist/Theme/tokens/brands/index.js +29 -23
  171. package/dist/Theme/tokens/brands/lavender/palette.light.d.ts +2 -373
  172. package/dist/Theme/tokens/brands/lavender/palette.light.js +5 -116
  173. package/dist/Theme/tokens/brands/meadow/palette.light.d.ts +2 -373
  174. package/dist/Theme/tokens/brands/meadow/palette.light.js +5 -7
  175. package/dist/Theme/tokens/brands/neutrals.d.ts +8 -0
  176. package/dist/Theme/tokens/brands/neutrals.js +119 -0
  177. package/dist/Theme/tokens/brands/radiant/palette.light.d.ts +2 -373
  178. package/dist/Theme/tokens/brands/radiant/palette.light.js +5 -7
  179. package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts +2 -373
  180. package/dist/Theme/tokens/brands/rosewood/palette.light.js +5 -7
  181. package/dist/Theme/tokens/brands/skyline/palette.light.d.ts +2 -373
  182. package/dist/Theme/tokens/brands/skyline/palette.light.js +5 -7
  183. package/dist/Theme/tokens/brands/slate/palette.light.d.ts +2 -373
  184. package/dist/Theme/tokens/brands/slate/palette.light.js +7 -13
  185. package/dist/Theme/tokens/brands/storefront/palette.light.d.ts +2 -373
  186. package/dist/Theme/tokens/brands/storefront/palette.light.js +5 -7
  187. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +5 -3
  188. package/dist/Theme/tokens/brands/zinc/palette.dark.js +2 -1
  189. package/dist/Theme/tokens/brands/zinc/palette.light.d.ts +2 -373
  190. package/dist/Theme/tokens/builders/accentText.d.ts +2 -2
  191. package/dist/Theme/tokens/builders/accentText.js +8 -27
  192. package/dist/Theme/tokens/builders/brandInk.d.ts +11 -0
  193. package/dist/Theme/tokens/builders/brandInk.js +106 -0
  194. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +2 -2
  195. package/dist/Theme/tokens/builders/buildDarkPalette.js +16 -8
  196. package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  197. package/dist/Theme/tokens/builders/gradientInk.d.ts +22 -0
  198. package/dist/Theme/tokens/builders/gradientInk.js +28 -0
  199. package/dist/Theme/tokens/builders/index.d.ts +3 -0
  200. package/dist/Theme/tokens/builders/index.js +3 -0
  201. package/dist/Theme/tokens/builders/mutedText.d.ts +5 -0
  202. package/dist/Theme/tokens/builders/mutedText.js +9 -0
  203. package/dist/Theme/tokens/builders/outlineRung.d.ts +39 -9
  204. package/dist/Theme/tokens/builders/outlineRung.js +92 -21
  205. package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
  206. package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
  207. package/dist/Theme/tokens/builders/resolvedRungs.d.ts +11 -0
  208. package/dist/Theme/tokens/builders/resolvedRungs.js +30 -0
  209. package/dist/Theme/tokens/builders/scrollbar.d.ts +12 -0
  210. package/dist/Theme/tokens/builders/scrollbar.js +57 -0
  211. package/dist/Theme/tokens/builders/semanticText.d.ts +10 -0
  212. package/dist/Theme/tokens/builders/semanticText.js +22 -0
  213. package/dist/Theme/tokens/builders/sidebarAccent.d.ts +9 -0
  214. package/dist/Theme/tokens/builders/sidebarAccent.js +29 -0
  215. package/dist/Theme/tokens/builders/statusTone.js +3 -4
  216. package/dist/Theme/tokens/builders/surfaceRungs.d.ts +10 -0
  217. package/dist/Theme/tokens/builders/surfaceRungs.js +54 -0
  218. package/dist/Theme/tokens/types.d.ts +41 -13
  219. package/dist/Theme/useCustomTheme.js +4 -1
  220. package/dist/Utils/table.d.ts +1 -7
  221. package/dist/Utils/table.js +27 -35
  222. package/dist/esm/Components/Accordion/Accordion.js +14 -16
  223. package/dist/esm/Components/Accordion/accordionColors.js +6 -9
  224. package/dist/esm/Components/AlertDialog/AlertDialog.js +1 -2
  225. package/dist/esm/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
  226. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
  227. package/dist/esm/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
  228. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +9 -7
  229. package/dist/esm/Components/Button/Button.styles.js +8 -13
  230. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +12 -13
  231. package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
  232. package/dist/esm/Components/Checkbox/Checkbox.styles.js +2 -0
  233. package/dist/esm/Components/Common/ErrorComponent.js +6 -9
  234. package/dist/esm/Components/Common/ErrorMessage.js +2 -8
  235. package/dist/esm/Components/Common/FormLabel.js +1 -3
  236. package/dist/esm/Components/Common/FormattedDescription.js +3 -1
  237. package/dist/esm/Components/Common/Label.js +3 -8
  238. package/dist/esm/Components/Common/fieldStyles.js +6 -7
  239. package/dist/esm/Components/ContactForm/ContactForm.js +1 -2
  240. package/dist/esm/Components/CopyButton/CopyButton.js +3 -6
  241. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +7 -10
  242. package/dist/esm/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
  243. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -3
  244. package/dist/esm/Components/DatePicker/CalendarPanel.js +3 -4
  245. package/dist/esm/Components/DatePicker/RangeDatePicker.js +9 -9
  246. package/dist/esm/Components/DatePicker/SingleDatePicker.js +11 -11
  247. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -2
  248. package/dist/esm/Components/DatePicker/TimePicker.js +6 -7
  249. package/dist/esm/Components/DatePicker/TimePickerInput.js +6 -7
  250. package/dist/esm/Components/Divider/Divider.js +1 -2
  251. package/dist/esm/Components/Drawer/Drawer.js +1 -2
  252. package/dist/esm/Components/Dropdown/DropDown.js +19 -33
  253. package/dist/esm/Components/Editor/Editor.js +11 -14
  254. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +3 -3
  255. package/dist/esm/Components/EmptyState/EmptyState.js +11 -11
  256. package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +1 -1
  257. package/dist/esm/Components/FilePreview/FilePreview.js +2 -2
  258. package/dist/esm/Components/FileUpload/FileUpload.js +18 -24
  259. package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
  260. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +157 -161
  261. package/dist/esm/Components/Form/FormWrapper.js +1 -2
  262. package/dist/esm/Components/Header/Header.js +6 -6
  263. package/dist/esm/Components/Header/HeaderActions.js +9 -5
  264. package/dist/esm/Components/Header/components/desktopMenu.js +8 -21
  265. package/dist/esm/Components/Header/components/mobileMenu.js +3 -15
  266. package/dist/esm/Components/Input/Input/Input.js +14 -18
  267. package/dist/esm/Components/Input/TextInput.styles.js +15 -16
  268. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +14 -14
  269. package/dist/esm/Components/KanbanBoard/AccountCard.js +10 -4
  270. package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -2
  271. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  272. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +15 -62
  273. package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
  274. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +5 -18
  275. package/dist/esm/Components/Loading/Loading.js +1 -1
  276. package/dist/esm/Components/Modal/Modal.js +3 -1
  277. package/dist/esm/Components/MoreItems/MoreItems.js +3 -7
  278. package/dist/esm/Components/MultiSelect/MultiSelect.js +5 -6
  279. package/dist/esm/Components/NavigationBar/NavigationBar.js +23 -19
  280. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +7 -9
  281. package/dist/esm/Components/Notification/Notification.js +18 -16
  282. package/dist/esm/Components/NumberInput/NumberInput.styles.js +14 -14
  283. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +8 -9
  284. package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +5 -1
  285. package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +1 -2
  286. package/dist/esm/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
  287. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +25 -22
  288. package/dist/esm/Components/PdfViewer/PdfViewer.js +1 -1
  289. package/dist/esm/Components/PinInput/PinInput.js +1 -1
  290. package/dist/esm/Components/PinInputs/PinInputs.js +8 -15
  291. package/dist/esm/Components/PlanPill/PlanPill.js +9 -12
  292. package/dist/esm/Components/PlanPill/planPillGradient.js +27 -15
  293. package/dist/esm/Components/ProductCard/ProductPrice.js +6 -6
  294. package/dist/esm/Components/ProductCard/ProductReview.js +4 -1
  295. package/dist/esm/Components/ProductCard/ProductTags.js +5 -5
  296. package/dist/esm/Components/ProductDetails/ProductDetails.js +3 -1
  297. package/dist/esm/Components/ProductDetails/ProductDtlPrice.js +3 -3
  298. package/dist/esm/Components/ProfileCard/ProfileCard.js +5 -5
  299. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +20 -17
  300. package/dist/esm/Components/RadioButton/RadioButton.js +1 -1
  301. package/dist/esm/Components/Reorder/Reorder.js +3 -4
  302. package/dist/esm/Components/RolesPermission/DeleteRoleModal.js +5 -4
  303. package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -14
  304. package/dist/esm/Components/ScrollToTop/ScrollToTop.js +2 -3
  305. package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -0
  306. package/dist/esm/Components/SearchSelect/SearchSelect.js +26 -28
  307. package/dist/esm/Components/Select/Select.styles.js +34 -37
  308. package/dist/esm/Components/SelectSearch/SelectSearch.js +10 -10
  309. package/dist/esm/Components/SelectV2/SelectV2.js +8 -20
  310. package/dist/esm/Components/SideBar/SecondaryBar.js +11 -16
  311. package/dist/esm/Components/SideBar/SideBar.js +43 -36
  312. package/dist/esm/Components/SideBar/components/MenuItemBox.js +11 -13
  313. package/dist/esm/Components/SideBar/components/MenuItems.js +3 -1
  314. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +8 -10
  315. package/dist/esm/Components/SideBar/components/OtherApps.js +4 -4
  316. package/dist/esm/Components/SideBar/sidebarAccentColors.js +5 -31
  317. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -7
  318. package/dist/esm/Components/Slider/Slider.js +2 -2
  319. package/dist/esm/Components/StageProgress/StageProgress.js +2 -9
  320. package/dist/esm/Components/StageProgress/StageProgressProps.js +9 -13
  321. package/dist/esm/Components/Table/Table.js +19 -30
  322. package/dist/esm/Components/Table/components/HeaderActions.js +6 -7
  323. package/dist/esm/Components/Table/components/Pagination.js +1 -1
  324. package/dist/esm/Components/Table/components/TableActions.js +4 -4
  325. package/dist/esm/Components/Table/components/TableBody.js +18 -20
  326. package/dist/esm/Components/Table/components/TableGroupRow.js +1 -2
  327. package/dist/esm/Components/Table/components/TableHeader.js +8 -12
  328. package/dist/esm/Components/Table/components/TableSearch.js +1 -2
  329. package/dist/esm/Components/Table/components/tableRowHoverStyle.js +2 -3
  330. package/dist/esm/Components/Table/filters/ActiveFilters.js +5 -24
  331. package/dist/esm/Components/Table/filters/CompactSelect.js +4 -5
  332. package/dist/esm/Components/Table/filters/LeftFilterPane.js +4 -5
  333. package/dist/esm/Components/Table/filters/TableFilters.js +1 -2
  334. package/dist/esm/Components/Table/hooks/useTable.js +8 -11
  335. package/dist/esm/Components/Table/settings/ManageColumns.js +4 -18
  336. package/dist/esm/Components/Table/settings/TableSettings.js +13 -21
  337. package/dist/esm/Components/Tag/Tag.styles.js +9 -7
  338. package/dist/esm/Components/Timeline/Timeline.js +33 -46
  339. package/dist/esm/Components/Toaster/Toaster.js +44 -45
  340. package/dist/esm/Components/ToolTip/ToolTip.js +1 -6
  341. package/dist/esm/Components/Trail/EditableCell.js +4 -1
  342. package/dist/esm/Components/Trail/TrailWorks.js +4 -4
  343. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +4 -6
  344. package/dist/esm/Components/UserDetails/AddUserModal.js +3 -3
  345. package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -2
  346. package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +5 -5
  347. package/dist/esm/Components/UserDetails/UserDetails.js +15 -17
  348. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
  349. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
  350. package/dist/esm/Constants/Sidebar.js +3 -2
  351. package/dist/esm/Theme/assertPalette.js +50 -0
  352. package/dist/esm/Theme/chakra/Avatar.styles.js +2 -2
  353. package/dist/esm/Theme/chakra/Drawer.styles.js +8 -10
  354. package/dist/esm/Theme/chakra/Menu.styles.js +11 -5
  355. package/dist/esm/Theme/chakra/Modal.styles.js +8 -10
  356. package/dist/esm/Theme/chakra/Popover.styles.js +11 -6
  357. package/dist/esm/Theme/chakra/Slider.styles.js +7 -9
  358. package/dist/esm/Theme/chakra/Switch.styles.js +7 -9
  359. package/dist/esm/Theme/chakra/Tabs.styles.js +13 -18
  360. package/dist/esm/Theme/chakra/componentStyles.js +53 -44
  361. package/dist/esm/Theme/chakra/createBrandTheme.js +3 -16
  362. package/dist/esm/Theme/chakra/paletteFromTheme.js +9 -0
  363. package/dist/esm/Theme/provider/PixelizeThemeProvider.js +23 -20
  364. package/dist/esm/Theme/provider/ThemeSwitcher.js +13 -20
  365. package/dist/esm/Theme/testing/testPalette.js +19 -0
  366. package/dist/esm/Theme/tokens/brands/emerald/palette.light.js +5 -4
  367. package/dist/esm/Theme/tokens/brands/index.js +28 -23
  368. package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +5 -116
  369. package/dist/esm/Theme/tokens/brands/meadow/palette.light.js +5 -4
  370. package/dist/esm/Theme/tokens/brands/neutrals.js +116 -0
  371. package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +5 -4
  372. package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +5 -4
  373. package/dist/esm/Theme/tokens/brands/skyline/palette.light.js +5 -4
  374. package/dist/esm/Theme/tokens/brands/slate/palette.light.js +7 -10
  375. package/dist/esm/Theme/tokens/brands/storefront/palette.light.js +5 -4
  376. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -2
  377. package/dist/esm/Theme/tokens/builders/accentText.js +8 -27
  378. package/dist/esm/Theme/tokens/builders/brandInk.js +103 -0
  379. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +17 -9
  380. package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  381. package/dist/esm/Theme/tokens/builders/gradientInk.js +22 -0
  382. package/dist/esm/Theme/tokens/builders/index.js +3 -0
  383. package/dist/esm/Theme/tokens/builders/mutedText.js +5 -0
  384. package/dist/esm/Theme/tokens/builders/outlineRung.js +89 -21
  385. package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
  386. package/dist/esm/Theme/tokens/builders/resolvedRungs.js +25 -0
  387. package/dist/esm/Theme/tokens/builders/scrollbar.js +52 -0
  388. package/dist/esm/Theme/tokens/builders/semanticText.js +17 -0
  389. package/dist/esm/Theme/tokens/builders/sidebarAccent.js +23 -0
  390. package/dist/esm/Theme/tokens/builders/statusTone.js +3 -4
  391. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +48 -0
  392. package/dist/esm/Theme/useCustomTheme.js +4 -1
  393. package/dist/esm/Utils/table.js +28 -36
  394. package/dist/esm/index.js +6 -1
  395. package/dist/index.d.ts +10 -1
  396. package/dist/index.js +24 -3
  397. package/package.json +4 -2
@@ -3,6 +3,8 @@ import { useMemo, useState } from "react";
3
3
  import { Avatar, Badge, Box, Flex, Heading, HStack, IconButton, Input, Skeleton, SkeletonText, Spinner, Text, Tooltip, VStack, } from "@chakra-ui/react";
4
4
  import { ArrowLeft, Building2, Check, CheckCircle2, Crown, Globe, Mail, Pencil, Plus, Trash2, Users, X, } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
+ import { accentTextOnCanvas, isDarkCanvas, onFilled } from "../../Theme/tokens/builders/accentText.js";
7
+ import { resolveStatusTone } from "../../Theme/tokens/builders/statusTone.js";
6
8
  import Button from "../Button/Button.js";
7
9
  import EmptyState from "../EmptyState/EmptyState.js";
8
10
  import Tag from "../Tag/Tag.js";
@@ -46,7 +48,6 @@ const DEFAULT_LABELS = {
46
48
  termsOfService: "Terms of Service",
47
49
  };
48
50
  const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoading = false, switchingOrgIds = [], respondingOrgIds = [], editingOrgIds = [], isCreating = false, userName, userAvatarUrl, onSetDefault, onAcceptInvite, onDeclineInvite, onDeleteOrganization, onDeleteRequest, onCreateOrganization, onEditOrganization, onBack, footerSlot, labels: labelOverrides, }) => {
49
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
50
51
  const { colors } = useCustomTheme();
51
52
  const labels = useMemo(() => ({ ...DEFAULT_LABELS, ...labelOverrides }), [labelOverrides]);
52
53
  const [isCreateOpen, setCreateOpen] = useState(false);
@@ -55,16 +56,19 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
55
56
  const [editingOrgId, setEditingOrgId] = useState(null);
56
57
  const [editValue, setEditValue] = useState("");
57
58
  const [editError, setEditError] = useState("");
58
- 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];
59
- 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 : colors === null || colors === void 0 ? void 0 : colors.white;
60
- const muted = (_f = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _f === void 0 ? void 0 : _f[500];
61
- const subtle = (_g = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _g === void 0 ? void 0 : _g[600];
62
- const heading = (_h = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _h === void 0 ? void 0 : _h[800];
63
- const pageBg = (_j = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _j === void 0 ? void 0 : _j[50];
64
- const primary50 = (_k = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _k === void 0 ? void 0 : _k[50];
65
- const primary100 = (_l = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _l === void 0 ? void 0 : _l[100];
66
- const primary500 = (_m = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _m === void 0 ? void 0 : _m[500];
67
- const primary600 = (_o = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _o === void 0 ? void 0 : _o[600];
59
+ const mode = isDarkCanvas(colors.backgroundColor.main) ? "dark" : "light";
60
+ const errorTone = resolveStatusTone(colors.semantic.error, mode);
61
+ const warningTone = resolveStatusTone(colors.semantic.warning, mode);
62
+ const border = colors.boxborder[200];
63
+ const surface = colors.background[50];
64
+ const muted = colors.textMuted;
65
+ const subtle = colors.text[600];
66
+ const heading = colors.text[900];
67
+ const pageBg = colors.backgroundColor.main;
68
+ const primary50 = colors.primary[50];
69
+ const primary100 = colors.primary[100];
70
+ const primary500 = colors.primary[500];
71
+ const onPrimary50 = accentTextOnCanvas(colors.primary, colors.primary[50]);
68
72
  const cardSx = {
69
73
  backgroundColor: surface,
70
74
  borderRadius: "xl",
@@ -99,7 +103,7 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
99
103
  setEditError("");
100
104
  };
101
105
  const renderActiveCard = (item) => {
102
- var _a, _b, _c, _d, _e, _f, _g, _h;
106
+ var _a, _b, _c, _d;
103
107
  const isSwitching = switchingOrgIds.includes(item.orgId);
104
108
  // Role name is a display value, not a permission — apps pass the real rule.
105
109
  const canEdit = (_a = item.canRename) !== null && _a !== void 0 ? _a : item.roleName === "Super Admin";
@@ -109,17 +113,17 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
109
113
  const isSavingThis = editingOrgIds.includes(item.orgId);
110
114
  const roleLabel = (_c = item.roleName) === null || _c === void 0 ? void 0 : _c.trim();
111
115
  const deleteButton = (_jsx(IconButton, { "aria-label": labels.deleteOrganization, icon: _jsx(Trash2, { size: 12 }), size: "xs", variant: "ghost", borderRadius: "full", color: muted, isDisabled: isProtected, _hover: {
112
- bg: (_d = colors === null || colors === void 0 ? void 0 : colors.red) === null || _d === void 0 ? void 0 : _d[50],
113
- color: (_e = colors === null || colors === void 0 ? void 0 : colors.red) === null || _e === void 0 ? void 0 : _e[600],
116
+ bg: errorTone.bg,
117
+ color: errorTone.fg,
114
118
  }, onClick: () => onDeleteRequest
115
119
  ? onDeleteRequest(item.orgId)
116
120
  : setDeleteOrgId(item.orgId) }));
117
121
  return (_jsxs(Box, { ...cardSx, p: 3, position: "relative", transition: "all 0.2s ease", _hover: {
118
- borderColor: (_f = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _f === void 0 ? void 0 : _f[300],
122
+ borderColor: colors.primary[300],
119
123
  boxShadow: "lg",
120
124
  transform: "translateY(-3px)",
121
- }, children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", mb: 2, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "lg", bg: primary50, color: primary600, children: _jsx(Building2, { size: 18 }) }), _jsxs(HStack, { spacing: 1, children: [item.default === 1 ? (_jsxs(Badge, { colorScheme: "green", borderRadius: "full", px: 2, py: 0.5, display: "flex", alignItems: "center", gap: 1, fontSize: "0.7rem", fontWeight: 600, children: [_jsx(CheckCircle2, { size: 12 }), labels.default] })) : isSwitching ? (_jsxs(Flex, { align: "center", gap: 2, color: primary500, children: [_jsx(Spinner, { size: "sm" }), _jsx(Text, { fontSize: "xs", children: labels.settingDefault })] })) : (_jsxs(Flex, { align: "center", gap: 1, fontSize: "xs", color: primary600, fontWeight: 600, cursor: "pointer", _hover: { color: primary500, gap: 2 }, transition: "all 0.2s ease", onClick: () => onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId), children: [_jsx(CheckCircle2, { size: 12 }), _jsx(Text, { children: labels.setAsDefault })] })), canEdit && (_jsx(Tooltip, { label: labels.editOrganization, hasArrow: true, children: _jsx(IconButton, { "aria-label": labels.editOrganization, icon: _jsx(Pencil, { size: 12 }), size: "xs", variant: "ghost", color: muted, borderRadius: "full", _hover: { color: primary600, bg: primary50 }, onClick: () => startEditing(item) }) })), _jsx(Tooltip, { label: isProtected
122
- ? ((_g = item.deleteDisabledReason) !== null && _g !== void 0 ? _g : labels.protectedOrganization)
125
+ }, children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", mb: 2, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "lg", bg: primary50, color: onPrimary50, children: _jsx(Building2, { size: 18 }) }), _jsxs(HStack, { spacing: 1, children: [item.default === 1 ? (_jsxs(Badge, { colorScheme: "green", borderRadius: "full", px: 2, py: 0.5, display: "flex", alignItems: "center", gap: 1, fontSize: "0.7rem", fontWeight: 600, children: [_jsx(CheckCircle2, { size: 12 }), labels.default] })) : isSwitching ? (_jsxs(Flex, { align: "center", gap: 2, color: colors.accentText, children: [_jsx(Spinner, { size: "sm" }), _jsx(Text, { fontSize: "xs", children: labels.settingDefault })] })) : (_jsxs(Flex, { align: "center", gap: 1, fontSize: "xs", color: colors.accentText, fontWeight: 600, cursor: "pointer", _hover: { color: colors.primary[700], gap: 2 }, transition: "all 0.2s ease", onClick: () => onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId), children: [_jsx(CheckCircle2, { size: 12 }), _jsx(Text, { children: labels.setAsDefault })] })), canEdit && (_jsx(Tooltip, { label: labels.editOrganization, hasArrow: true, children: _jsx(IconButton, { "aria-label": labels.editOrganization, icon: _jsx(Pencil, { size: 12 }), size: "xs", variant: "ghost", color: muted, borderRadius: "full", _hover: { color: onPrimary50, bg: primary50 }, onClick: () => startEditing(item) }) })), _jsx(Tooltip, { label: isProtected
126
+ ? ((_d = item.deleteDisabledReason) !== null && _d !== void 0 ? _d : labels.protectedOrganization)
123
127
  : labels.deleteOrganization, hasArrow: true, children: isProtected ? (_jsx(Box, { as: "span", display: "inline-flex", children: deleteButton })) : (deleteButton) })] })] }), isEditingThis ? (_jsxs(Box, { children: [_jsxs(HStack, { spacing: 1, children: [_jsx(Input, { value: editValue, onChange: (e) => {
124
128
  setEditValue(e.target.value);
125
129
  if (editError)
@@ -129,15 +133,14 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
129
133
  submitEditing(item);
130
134
  if (e.key === "Escape")
131
135
  cancelEditing();
132
- } }), _jsx(IconButton, { "aria-label": labels.save, icon: isSavingThis ? _jsx(Spinner, { size: "xs" }) : _jsx(Check, { size: 14 }), size: "xs", colorScheme: "green", isDisabled: isSavingThis, onClick: () => submitEditing(item), variant: "ghost" }), _jsx(IconButton, { "aria-label": labels.cancel, icon: _jsx(X, { size: 14 }), size: "xs", variant: "ghost", isDisabled: isSavingThis, onClick: cancelEditing })] }), editError && (_jsx(Text, { fontSize: "0.7rem", color: (_h = colors === null || colors === void 0 ? void 0 : colors.red) === null || _h === void 0 ? void 0 : _h[600], mt: 1, children: editError }))] })) : (_jsxs(Box, { children: [_jsx(Text, { fontSize: "sm", fontWeight: 700, color: heading, noOfLines: 1, children: item.company_name }), (item.isOwner || roleLabel) && (_jsxs(HStack, { spacing: 1, mt: 1, children: [item.isOwner && (_jsx(Tag, { label: labels.owner, icon: Crown, colorScheme: "primary", variant: "subtle", size: "xs" })), roleLabel && (_jsx(Tag, { label: roleLabel, colorScheme: "gray", variant: "subtle", size: "xs" }))] }))] }))] }, item.orgId));
136
+ } }), _jsx(IconButton, { "aria-label": labels.save, icon: isSavingThis ? _jsx(Spinner, { size: "xs" }) : _jsx(Check, { size: 14 }), size: "xs", colorScheme: "green", isDisabled: isSavingThis, onClick: () => submitEditing(item), variant: "ghost" }), _jsx(IconButton, { "aria-label": labels.cancel, icon: _jsx(X, { size: 14 }), size: "xs", variant: "ghost", isDisabled: isSavingThis, onClick: cancelEditing })] }), editError && (_jsx(Text, { fontSize: "0.7rem", color: colors.semanticText.error, mt: 1, children: editError }))] })) : (_jsxs(Box, { children: [_jsx(Text, { fontSize: "sm", fontWeight: 700, color: heading, noOfLines: 1, children: item.company_name }), (item.isOwner || roleLabel) && (_jsxs(HStack, { spacing: 1, mt: 1, children: [item.isOwner && (_jsx(Tag, { label: labels.owner, icon: Crown, colorScheme: "primary", variant: "subtle", size: "xs" })), roleLabel && (_jsx(Tag, { label: roleLabel, colorScheme: "gray", variant: "subtle", size: "xs" }))] }))] }))] }, item.orgId));
133
137
  };
134
138
  const renderInvitedCard = (item) => {
135
- var _a, _b;
136
139
  const isResponding = respondingOrgIds.includes(item.orgId);
137
140
  return (_jsxs(Box, { ...cardSx, p: 3, position: "relative", transition: "all 0.2s ease", _hover: {
138
141
  boxShadow: "lg",
139
142
  transform: "translateY(-3px)",
140
- }, children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", mb: 2, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "lg", bg: (_a = colors === null || colors === void 0 ? void 0 : colors.yellow) === null || _a === void 0 ? void 0 : _a[100], color: (_b = colors === null || colors === void 0 ? void 0 : colors.yellow) === null || _b === void 0 ? void 0 : _b[600], children: _jsx(Building2, { size: 18 }) }), _jsx(Badge, { colorScheme: "yellow", borderRadius: "full", px: 2, py: 0.5, fontSize: "0.7rem", fontWeight: 600, children: labels.pending })] }), _jsx(Text, { fontSize: "sm", fontWeight: 700, color: heading, noOfLines: 1, mb: 1, children: item.company_name }), item.company_url && (_jsxs(Flex, { align: "center", gap: 2, color: subtle, fontSize: "xs", mb: 2, children: [_jsx(Globe, { size: 13 }), _jsx(Text, { noOfLines: 1, title: item.company_url, children: item.company_url })] })), _jsxs(HStack, { spacing: 2, pt: 2, borderTop: "1px solid", borderColor: border, children: [_jsx(Box, { flex: 1, children: _jsx(Button, { label: labels.accept, colorScheme: "green", size: "sm", width: "100%", isLoading: isResponding, loadingText: labels.accepting, onClick: () => onAcceptInvite === null || onAcceptInvite === void 0 ? void 0 : onAcceptInvite(item.orgId) }) }), _jsx(Box, { flex: 1, children: _jsx(Button, { label: labels.decline, colorScheme: "red", size: "sm", width: "100%", onClick: () => onDeclineInvite === null || onDeclineInvite === void 0 ? void 0 : onDeclineInvite(item.orgId) }) })] })] }, item.orgId));
143
+ }, children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", mb: 2, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "lg", bg: warningTone.bg, color: warningTone.fg, children: _jsx(Building2, { size: 18 }) }), _jsx(Badge, { colorScheme: "yellow", borderRadius: "full", px: 2, py: 0.5, fontSize: "0.7rem", fontWeight: 600, children: labels.pending })] }), _jsx(Text, { fontSize: "sm", fontWeight: 700, color: heading, noOfLines: 1, mb: 1, children: item.company_name }), item.company_url && (_jsxs(Flex, { align: "center", gap: 2, color: subtle, fontSize: "xs", mb: 2, children: [_jsx(Globe, { size: 13 }), _jsx(Text, { noOfLines: 1, title: item.company_url, children: item.company_url })] })), _jsxs(HStack, { spacing: 2, pt: 2, borderTop: "1px solid", borderColor: border, children: [_jsx(Box, { flex: 1, children: _jsx(Button, { label: labels.accept, colorScheme: "green", size: "sm", width: "100%", isLoading: isResponding, loadingText: labels.accepting, onClick: () => onAcceptInvite === null || onAcceptInvite === void 0 ? void 0 : onAcceptInvite(item.orgId) }) }), _jsx(Box, { flex: 1, children: _jsx(Button, { label: labels.decline, colorScheme: "red", size: "sm", width: "100%", onClick: () => onDeclineInvite === null || onDeclineInvite === void 0 ? void 0 : onDeclineInvite(item.orgId) }) })] })] }, item.orgId));
141
144
  };
142
145
  const gridSx = {
143
146
  display: "grid",
@@ -150,9 +153,9 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
150
153
  width: "100%",
151
154
  };
152
155
  const hasOrganizations = activeOrganizations.length > 0 || invitedOrganizations.length > 0;
153
- return (_jsxs(Box, { backgroundColor: pageBg, minHeight: "100%", p: { base: 2, md: 3 }, children: [_jsxs(Flex, { ...cardSx, px: 3, py: 2.5, mb: 3, alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: 3, bgGradient: `linear(135deg, ${primary50} 0%, ${primary100} 100%)`, children: [_jsxs(Flex, { alignItems: "center", gap: 3, children: [onBack && (_jsx(IconButton, { "aria-label": "Go back", icon: _jsx(ArrowLeft, { size: 18 }), variant: "ghost", size: "sm", color: subtle, onClick: onBack })), _jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: primary500, color: "white", children: _jsx(Building2, { size: 18 }) }), _jsxs(Box, { children: [_jsxs(HStack, { spacing: 2, children: [_jsx(Heading, { size: "sm", color: heading, fontWeight: 700, children: userName
156
+ return (_jsxs(Box, { backgroundColor: pageBg, minHeight: "100%", p: { base: 2, md: 3 }, children: [_jsxs(Flex, { ...cardSx, px: 3, py: 2.5, mb: 3, alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: 3, bgGradient: `linear(135deg, ${primary50} 0%, ${primary100} 100%)`, children: [_jsxs(Flex, { alignItems: "center", gap: 3, children: [onBack && (_jsx(IconButton, { "aria-label": "Go back", icon: _jsx(ArrowLeft, { size: 18 }), variant: "ghost", size: "sm", color: subtle, onClick: onBack })), _jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: primary500, color: onFilled(primary500, colors.white, colors.black), children: _jsx(Building2, { size: 18 }) }), _jsxs(Box, { children: [_jsxs(HStack, { spacing: 2, children: [_jsx(Heading, { size: "sm", color: heading, fontWeight: 700, children: userName
154
157
  ? `${labels.greeting.replace(/User!?/, "")}${userName}!`.trim()
155
- : labels.greeting }), _jsx(Avatar, { size: "xs", name: userName, src: userAvatarUrl })] }), _jsx(Text, { fontSize: "xs", color: subtle, mt: 0.5, children: labels.manageSubtitle })] })] }), _jsx(Button, { label: labels.createNewOrganization, onClick: () => setCreateOpen(true), leftIcon: _jsx(Plus, { size: 16 }), colorScheme: "primary", size: "sm" })] }), isLoading ? (_jsx(Box, { ...gridSx, children: Array.from({ length: 6 }).map((_, idx) => (_jsxs(Box, { ...cardSx, p: 3, children: [_jsx(Skeleton, { boxSize: "36px", borderRadius: "lg", mb: 2 }), _jsx(SkeletonText, { noOfLines: 2, spacing: 2 })] }, idx))) })) : !hasOrganizations ? (_jsx(EmptyState, { icon: Building2, title: labels.noOrganizationsTitle, description: labels.noOrganizationsDescription, minH: "40vh", action: _jsx(Button, { label: labels.createOrganization, onClick: () => setCreateOpen(true), leftIcon: _jsx(Plus, { size: 16 }), colorScheme: "primary", size: "sm" }) })) : (_jsxs(VStack, { align: "stretch", spacing: 4, children: [activeOrganizations.length > 0 && (_jsxs(Box, { children: [_jsxs(Flex, { align: "center", gap: 2, mb: 2, children: [_jsx(Users, { size: 16, color: primary500 }), _jsx(Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.activeOrganizations }), sectionBadge(activeOrganizations.length, "blue")] }), _jsx(Box, { ...gridSx, children: activeOrganizations.map(renderActiveCard) })] })), invitedOrganizations.length > 0 && (_jsxs(Box, { children: [_jsxs(Flex, { align: "center", gap: 2, mb: 2, children: [_jsx(Mail, { size: 16, color: (_p = colors === null || colors === void 0 ? void 0 : colors.yellow) === null || _p === void 0 ? void 0 : _p[500] }), _jsx(Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.invitedOrganizations }), sectionBadge(invitedOrganizations.length, "yellow")] }), _jsx(Box, { ...gridSx, children: invitedOrganizations.map(renderInvitedCard) })] }))] })), footerSlot, _jsx(CreateOrgModal, { isOpen: isCreateOpen, onClose: () => setCreateOpen(false), isLoading: isCreating, onSubmit: async (values) => {
158
+ : labels.greeting }), _jsx(Avatar, { size: "xs", name: userName, src: userAvatarUrl })] }), _jsx(Text, { fontSize: "xs", color: subtle, mt: 0.5, children: labels.manageSubtitle })] })] }), _jsx(Button, { label: labels.createNewOrganization, onClick: () => setCreateOpen(true), leftIcon: _jsx(Plus, { size: 16 }), colorScheme: "primary", size: "sm" })] }), isLoading ? (_jsx(Box, { ...gridSx, children: Array.from({ length: 6 }).map((_, idx) => (_jsxs(Box, { ...cardSx, p: 3, children: [_jsx(Skeleton, { boxSize: "36px", borderRadius: "lg", mb: 2 }), _jsx(SkeletonText, { noOfLines: 2, spacing: 2 })] }, idx))) })) : !hasOrganizations ? (_jsx(EmptyState, { icon: Building2, title: labels.noOrganizationsTitle, description: labels.noOrganizationsDescription, minH: "40vh", action: _jsx(Button, { label: labels.createOrganization, onClick: () => setCreateOpen(true), leftIcon: _jsx(Plus, { size: 16 }), colorScheme: "primary", size: "sm" }) })) : (_jsxs(VStack, { align: "stretch", spacing: 4, children: [activeOrganizations.length > 0 && (_jsxs(Box, { children: [_jsxs(Flex, { align: "center", gap: 2, mb: 2, children: [_jsx(Users, { size: 16, color: colors.accentText }), _jsx(Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.activeOrganizations }), sectionBadge(activeOrganizations.length, "blue")] }), _jsx(Box, { ...gridSx, children: activeOrganizations.map(renderActiveCard) })] })), invitedOrganizations.length > 0 && (_jsxs(Box, { children: [_jsxs(Flex, { align: "center", gap: 2, mb: 2, children: [_jsx(Mail, { size: 16, color: colors.semanticText.warning }), _jsx(Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.invitedOrganizations }), sectionBadge(invitedOrganizations.length, "yellow")] }), _jsx(Box, { ...gridSx, children: invitedOrganizations.map(renderInvitedCard) })] }))] })), footerSlot, _jsx(CreateOrgModal, { isOpen: isCreateOpen, onClose: () => setCreateOpen(false), isLoading: isCreating, onSubmit: async (values) => {
156
159
  await (onCreateOrganization === null || onCreateOrganization === void 0 ? void 0 : onCreateOrganization(values));
157
160
  setCreateOpen(false);
158
161
  }, labels: labels }), _jsx(DeleteOrgModal, { isOpen: deleteOrgId !== null, onClose: () => setDeleteOrgId(null), onConfirm: async () => {
@@ -5,6 +5,6 @@ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
5
  import ToolTip from "../ToolTip/ToolTip.js";
6
6
  const PdfViewer = ({ pdfUrl, fileName = "Document.pdf", height = "480px", showToolbar = true, borderRadius = "xl", }) => {
7
7
  const theme = useCustomTheme();
8
- return (_jsxs(Box, { border: "1px solid", borderColor: theme.colors.gray[200], borderRadius: borderRadius, overflow: "hidden", bg: theme.colors.background[50], children: [showToolbar && (_jsxs(Flex, { align: "center", justify: "space-between", px: 4, py: 2.5, borderBottom: "1px solid", borderColor: theme.colors.gray[100], bg: theme.colors.gray[50], children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(FileText, { size: 18, color: theme.colors.primary[500] }), _jsx(Text, { fontSize: "sm", fontWeight: 500, color: theme.colors.gray[700], overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: fileName })] }), _jsxs(Flex, { align: "center", gap: 1, children: [_jsx(ToolTip, { label: "Open in new tab", placement: "top", children: _jsx(Box, { as: "a", href: pdfUrl, target: "_blank", rel: "noopener noreferrer", p: 2, borderRadius: "lg", color: theme.colors.gray[600], _hover: { bg: theme.colors.primary[50], color: theme.colors.primary[500] }, children: _jsx(ExternalLink, { size: 16 }) }) }), _jsx(ToolTip, { label: "Download", placement: "top", children: _jsx(Box, { as: "a", href: pdfUrl, download: fileName, p: 2, borderRadius: "lg", color: theme.colors.gray[600], _hover: { bg: theme.colors.primary[50], color: theme.colors.primary[500] }, children: _jsx(Download, { size: 16 }) }) })] })] })), _jsx(Box, { as: "embed", src: pdfUrl, type: "application/pdf", width: "100%", height: height, display: "block" })] }));
8
+ return (_jsxs(Box, { border: "1px solid", borderColor: theme.colors.gray[200], borderRadius: borderRadius, overflow: "hidden", bg: theme.colors.background[50], children: [showToolbar && (_jsxs(Flex, { align: "center", justify: "space-between", px: 4, py: 2.5, borderBottom: "1px solid", borderColor: theme.colors.gray[100], bg: theme.colors.gray[50], children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(FileText, { size: 18, color: theme.colors.accentText }), _jsx(Text, { fontSize: "sm", fontWeight: 500, color: theme.colors.gray[700], overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: fileName })] }), _jsxs(Flex, { align: "center", gap: 1, children: [_jsx(ToolTip, { label: "Open in new tab", placement: "top", children: _jsx(Box, { as: "a", href: pdfUrl, target: "_blank", rel: "noopener noreferrer", p: 2, borderRadius: "lg", color: theme.colors.gray[600], _hover: { bg: theme.colors.primary[50], color: theme.colors.primary[500] }, children: _jsx(ExternalLink, { size: 16 }) }) }), _jsx(ToolTip, { label: "Download", placement: "top", children: _jsx(Box, { as: "a", href: pdfUrl, download: fileName, p: 2, borderRadius: "lg", color: theme.colors.gray[600], _hover: { bg: theme.colors.primary[50], color: theme.colors.primary[500] }, children: _jsx(Download, { size: 16 }) }) })] })] })), _jsx(Box, { as: "embed", src: pdfUrl, type: "application/pdf", width: "100%", height: height, display: "block" })] }));
9
9
  };
10
10
  export default PdfViewer;
@@ -8,7 +8,7 @@ export default function PinInputs({ otp, mask, defaultValue, placeholder, manage
8
8
  // [800], not [300]/[700]: WCAG 1.4.11 needs >=3.0 for a control boundary, measured
9
9
  // against the parent surface — up to `muted` (lightest). [700] fails there (2.41-2.72);
10
10
  // [800] clears all named surfaces with margin (3.44-3.90).
11
- borderColor: theme.colors.boxborder[800], _focus: {
11
+ borderColor: theme.colors.boxborder[500], _focus: {
12
12
  borderColor: theme.colors.primary[500],
13
13
  boxShadow: `0 0 0 0.063rem ${theme.colors.primary[500]}`,
14
14
  } }, index))) }) })] }));
@@ -1,23 +1,18 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef, useState } from "react";
3
- import { Box, HStack, Input, useTheme } from "@chakra-ui/react";
3
+ import { Box, HStack, Input } from "@chakra-ui/react";
4
4
  import Label from "../Common/Label.js";
5
5
  import ErrorComponent from "../Common/ErrorComponent.js";
6
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
7
  const PinInputs = ({ length = 3, label, error, onChange, onComplete, mask = false, placeholder = "*", }) => {
7
- var _a, _b, _c, _d, _e;
8
- const theme = useTheme();
9
- const { colors } = theme;
8
+ const { colors } = useCustomTheme();
10
9
  const [values, setValues] = useState(Array(length).fill(""));
11
10
  const inputsRef = useRef([]);
12
- // [800], not [500]: WCAG 1.4.11 needs >=3.0 for a control boundary against any named surface
13
- // up to `muted` (lightest); [500] fails there, [800] clears all with margin.
14
11
  const borderColor = error
15
- ? (_b = (_a = colors.semantic) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b[500]
16
- : (_c = colors.boxborder) === null || _c === void 0 ? void 0 : _c[800];
17
- const focusRing = error ? (_d = colors.boxShadow) === null || _d === void 0 ? void 0 : _d.error : (_e = colors.boxShadow) === null || _e === void 0 ? void 0 : _e.primary;
18
- const focusShadow = focusRing
19
- ? `0 0 0 0.125rem ${focusRing}`
20
- : undefined;
12
+ ? colors.semanticText.error
13
+ : colors.boxborder[500];
14
+ const focusRing = error ? colors.boxShadow.error : colors.boxShadow.primary;
15
+ const focusShadow = `0 0 0 0.125rem ${focusRing}`;
21
16
  const handleChange = (index, value) => {
22
17
  var _a;
23
18
  if (!/^[0-9]?$/.test(value))
@@ -41,8 +36,6 @@ const PinInputs = ({ length = 3, label, error, onChange, onComplete, mask = fals
41
36
  };
42
37
  return (_jsxs(Box, { children: [label && _jsx(Label, { label: label }), _jsx(HStack, { spacing: 2, children: Array.from({ length }).map((_, index) => (_jsx(Input, { ref: (el) => {
43
38
  inputsRef.current[index] = el;
44
- }, type: mask ? "password" : "text", inputMode: "numeric", maxLength: 1, placeholder: placeholder, value: values[index], onChange: (e) => handleChange(index, e.target.value), onKeyDown: (e) => handleKeyDown(e, index), w: 12, h: 12, textAlign: "center", fontSize: "lg", borderWidth: "1px", borderColor: borderColor, borderRadius: "md", _focus: focusShadow
45
- ? { boxShadow: focusShadow, outline: "none" }
46
- : { outline: "none" } }, index))) }), error && _jsx(ErrorComponent, { error: error })] }));
39
+ }, type: mask ? "password" : "text", inputMode: "numeric", maxLength: 1, placeholder: placeholder, value: values[index], onChange: (e) => handleChange(index, e.target.value), onKeyDown: (e) => handleKeyDown(e, index), w: 12, h: 12, textAlign: "center", fontSize: "lg", borderWidth: "1px", borderColor: borderColor, borderRadius: "md", _focus: { boxShadow: focusShadow, outline: "none" } }, index))) }), error && _jsx(ErrorComponent, { error: error })] }));
47
40
  };
48
41
  export default PinInputs;
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Flex, Text } from "@chakra-ui/react";
3
3
  import { AlertCircle, Clock, Sparkles } from "lucide-react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
- import { onGradient } from "../../Theme/tokens/builders/accentText.js";
6
- import { ACCENT_GRADIENT } from "./planPillGradient.js";
5
+ import { resolveGradient, gradientCss } from "../../Theme/tokens/builders/gradientInk.js";
6
+ import { chipBorder, chipFill, statusGradient, } from "./planPillGradient.js";
7
7
  const TONE_ICON = {
8
8
  normal: Sparkles,
9
9
  warning: Clock,
@@ -13,18 +13,15 @@ const PlanPill = ({ label, mobileLabel, status, tone = "normal", icon, gradient,
13
13
  const theme = useCustomTheme();
14
14
  const c = theme.colors;
15
15
  const toneGradient = {
16
- normal: ACCENT_GRADIENT,
17
- warning: { from: c.semantic.warning[400], to: c.semantic.warning[600] },
18
- danger: { from: c.semantic.error[400], to: c.semantic.error[600] },
16
+ normal: c.gradient,
17
+ warning: statusGradient(c.semantic.warning),
18
+ danger: statusGradient(c.semantic.error),
19
19
  };
20
- const resolved = gradient !== null && gradient !== void 0 ? gradient : toneGradient[tone];
21
- const ink = onGradient(resolved.from, resolved.to, c.white, c.black);
22
- // The chip is a translucent inset of the pill itself, so it tints with whichever
23
- // ink won — a white wash under black text would wash the chip out entirely.
24
- const onDark = ink === c.white;
20
+ const resolved = resolveGradient(gradient !== null && gradient !== void 0 ? gradient : toneGradient[tone], c.white, c.black);
21
+ const ink = resolved.ink;
25
22
  const Icon = icon === undefined ? TONE_ICON[tone] : icon;
26
23
  const hasMobile = !!mobileLabel && mobileLabel !== label;
27
- return (_jsxs(Box, { as: "button", type: "button", "aria-label": ariaLabel || (status ? `${label} — ${status}` : label), onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage: `linear-gradient(135deg, ${resolved.from} 0%, ${resolved.to} 100%)`, color: ink, borderRadius: "full", whiteSpace: "nowrap", cursor: "pointer", transition: "transform 0.2s ease, box-shadow 0.2s ease", _hover: {
24
+ return (_jsxs(Box, { as: "button", type: "button", "aria-label": ariaLabel || (status ? `${label} — ${status}` : label), onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage: gradientCss(resolved), color: ink, borderRadius: "full", whiteSpace: "nowrap", cursor: "pointer", transition: "transform 0.2s ease, box-shadow 0.2s ease", _hover: {
28
25
  transform: "translateY(-1px)",
29
26
  boxShadow: `0 6px 18px ${resolved.from}59`,
30
27
  }, _focusVisible: {
@@ -35,6 +32,6 @@ const PlanPill = ({ label, mobileLabel, status, tone = "normal", icon, gradient,
35
32
  transition: "none",
36
33
  _hover: { transform: "none" },
37
34
  },
38
- }, children: [Icon ? _jsx(Icon, { size: 12, strokeWidth: 2.5, "aria-hidden": true }) : null, _jsx(Text, { as: "span", fontSize: "12.5px", fontWeight: "600", lineHeight: "18px", overflow: "hidden", textOverflow: "ellipsis", maxW: maxLabelWidth, display: hasMobile ? { base: "none", md: "block" } : "block", children: label }), hasMobile ? (_jsx(Text, { as: "span", fontSize: "12.5px", fontWeight: "600", lineHeight: "18px", display: { base: "block", md: "none" }, children: mobileLabel })) : null, status ? (_jsx(Flex, { as: "span", align: "center", px: "8px", borderRadius: "full", bg: onDark ? "rgba(255,255,255,0.22)" : "rgba(0,0,0,0.12)", border: "1px solid", borderColor: onDark ? "rgba(255,255,255,0.28)" : "rgba(0,0,0,0.08)", fontSize: "11px", fontWeight: "700", lineHeight: "18px", sx: { fontVariantNumeric: "tabular-nums" }, children: status })) : null] }));
35
+ }, children: [Icon ? _jsx(Icon, { size: 12, strokeWidth: 2.5, "aria-hidden": true }) : null, _jsx(Text, { as: "span", fontSize: "12.5px", fontWeight: "600", lineHeight: "18px", overflow: "hidden", textOverflow: "ellipsis", maxW: maxLabelWidth, display: hasMobile ? { base: "none", md: "block" } : "block", children: label }), hasMobile ? (_jsx(Text, { as: "span", fontSize: "12.5px", fontWeight: "600", lineHeight: "18px", display: { base: "block", md: "none" }, children: mobileLabel })) : null, status ? (_jsx(Flex, { as: "span", align: "center", px: "8px", borderRadius: "full", bg: chipFill(resolved), border: "1px solid", borderColor: chipBorder(resolved), fontSize: "11px", fontWeight: "700", lineHeight: "18px", sx: { fontVariantNumeric: "tabular-nums" }, children: status })) : null] }));
39
36
  };
40
37
  export default PlanPill;
@@ -1,17 +1,29 @@
1
+ import { resolveAvatarFill } from "../../Theme/tokens/builders/statusTone.js";
2
+ import { relativeLuminance } from "../../Theme/tokens/builders/color.js";
3
+ export const STATUS_INK = "#ffffff";
1
4
  /**
2
- * The plan badge's `normal` tone is a single fixed accent — not brand-driven, and
3
- * not mode-dependent.
4
- *
5
- * Its tone carries meaning (normal / warning / danger), and a brand gradient can
6
- * collide with that: rosewood's `#c74962 → #ea0727` is red, so a healthy plan
7
- * rendered as if it had expired. Greyscale brands failed the other way, sinking
8
- * the badge into the header chrome.
9
- *
10
- * One accent for both color modes is deliberate: a lighter dark-mode variant was
11
- * tried and flipped `onGradient`'s ink to black, which read as a washed-out candy
12
- * pill on dark chrome. These stops keep white ink in both modes, so the badge looks
13
- * like the same component everywhere. Verified at AA (>= 4.5:1) on both stops.
14
- *
15
- * Consumers who genuinely want another colour still pass `gradient`.
5
+ * Opt-in accent for consumers who want a fixed badge colour instead of the brand `gradient`.
6
+ * One hue, like every brand gradient — a second hue reads as a status change, not a style.
16
7
  */
17
- export const ACCENT_GRADIENT = { from: "#8B3FC8", to: "#df187a" };
8
+ export const ACCENT_GRADIENT = { from: "#8b3fc8", to: "#762d9d" };
9
+ /**
10
+ * Sinks both stops until WHITE ink clears AA, keeping each stop's hue. Any mid-tone gradient —
11
+ * a brand `gradient` token, a status scale — otherwise flips `onGradient` to black ink, so the
12
+ * same badge reads white-on-colour in one brand and black-on-pastel in the next.
13
+ */
14
+ export const inkSafeGradient = (gradient) => ({
15
+ from: resolveAvatarFill(gradient.from),
16
+ to: resolveAvatarFill(gradient.to),
17
+ });
18
+ /** Status tones are semantic scales, not designed as label backdrops. */
19
+ export const statusGradient = (scale) => inkSafeGradient({ from: scale[400], to: scale[600] });
20
+ const CHIP_INK_CONTRAST = 7;
21
+ export const darkerStop = (g) => relativeLuminance(g.from) <= relativeLuminance(g.to) ? g.from : g.to;
22
+ /**
23
+ * Solid inset chip in the pill's own hue. A translucent scrim was a guessed alpha that
24
+ * composited into a muddy dark lozenge on every mid-tone gradient; a derived rung reads as
25
+ * one step down from the pill in every brand and both modes.
26
+ */
27
+ export const chipFill = (g) => resolveAvatarFill(darkerStop(g), CHIP_INK_CONTRAST);
28
+ /** The pill's lighter stop — guaranteed lighter than `chipFill`, so it draws the inset edge. */
29
+ export const chipBorder = (g) => relativeLuminance(g.from) > relativeLuminance(g.to) ? g.from : g.to;
@@ -91,20 +91,20 @@ const ProductPrice = ({ options, size, onSelect, rightSlot }) => {
91
91
  useEffect(() => {
92
92
  onSelect === null || onSelect === void 0 ? void 0 : onSelect(selected);
93
93
  }, [selected, onSelect]);
94
- return (_jsxs(_Fragment, { children: [isSingleOption ? (_jsx(Box, { border: "0.063rem solid", borderColor: "red.300", bg: "red.50", px: cfg.px,
94
+ return (_jsxs(_Fragment, { children: [isSingleOption ? (_jsx(Box, { border: "0.063rem solid", borderColor: theme.colors.red[300], bg: theme.colors.red[50], px: cfg.px,
95
95
  // py={cfg.py}
96
- rounded: "md", display: "inline-block", w: "100%", children: _jsx(Text, { fontSize: cfg.label, fontWeight: "medium", children: options[0].label }) })) : (_jsxs(Box, { ref: buttonRef, onClick: () => setIsOpen(!isOpen), border: "0.063rem solid", borderColor: "red.300", bg: "red.50", px: cfg.px,
96
+ rounded: "md", display: "inline-block", w: "100%", children: _jsx(Text, { fontSize: cfg.label, fontWeight: "medium", children: options[0].label }) })) : (_jsxs(Box, { ref: buttonRef, onClick: () => setIsOpen(!isOpen), border: "0.063rem solid", borderColor: theme.colors.red[300], bg: theme.colors.red[50], px: cfg.px,
97
97
  // py={cfg.py}
98
- rounded: "md", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", w: "100%", children: [_jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", maxWidth: "100%", fontSize: cfg.label, fontWeight: "medium", whiteSpace: "nowrap", children: selected.label }) }), _jsx(Text, { fontSize: cfg.font, color: accentTextOnCanvas(theme.colors.red, theme.colors.red[50]), transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)', transition: "transform 0.2s", children: "\u25BE" })] })), !isSingleOption && isOpen && (_jsx(Portal, { children: _jsx(Box, { ref: dropdownRef, position: "fixed", top: `${dropdownPosition.top}px`, left: `${dropdownPosition.left}px`, width: `${dropdownPosition.width}px`, bg: theme.colors.background[50], border: "0.063rem solid", borderColor: "red.300", borderRadius: "md", overflow: "hidden", maxH: "13rem", overflowY: "auto", shadow: "md", zIndex: 100000, children: options.map((option) => {
98
+ rounded: "md", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", w: "100%", children: [_jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", maxWidth: "100%", fontSize: cfg.label, fontWeight: "medium", whiteSpace: "nowrap", children: selected.label }) }), _jsx(Text, { fontSize: cfg.font, color: accentTextOnCanvas(theme.colors.red, theme.colors.red[50]), transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)', transition: "transform 0.2s", children: "\u25BE" })] })), !isSingleOption && isOpen && (_jsx(Portal, { children: _jsx(Box, { ref: dropdownRef, position: "fixed", top: `${dropdownPosition.top}px`, left: `${dropdownPosition.left}px`, width: `${dropdownPosition.width}px`, bg: theme.colors.background[50], border: "0.063rem solid", borderColor: theme.colors.red[300], borderRadius: "md", overflow: "hidden", maxH: "13rem", overflowY: "auto", shadow: "md", zIndex: 100000, children: options.map((option) => {
99
99
  const discounted = getDiscountedPrice(option);
100
100
  const isSelected = selected.var_id === option.var_id;
101
- return (_jsxs(Grid, { px: 1, py: 0.5, cursor: "pointer", bg: isSelected ? 'red.50' : theme.colors.background[50], borderLeft: isSelected ? '0.25rem solid' : '0.25rem solid transparent', borderLeftColor: isSelected ? 'red.300' : 'transparent', _hover: { bg: 'red.100' }, onClick: () => {
101
+ return (_jsxs(Grid, { px: 1, py: 0.5, cursor: "pointer", bg: isSelected ? theme.colors.red[50] : theme.colors.background[50], borderLeft: isSelected ? '0.25rem solid' : '0.25rem solid transparent', borderLeftColor: isSelected ? theme.colors.red[300] : "transparent", _hover: { bg: theme.colors.red[100] }, onClick: () => {
102
102
  setSelected(option);
103
103
  setIsOpen(false);
104
104
  }, templateColumns: { base: '1fr auto', md: '1fr auto' },
105
105
  // columnGap={{ base: 2, md: 3 }}
106
106
  // rowGap={{ base: 1.5, md: 2 }}
107
- alignItems: "center", children: [_jsx(HStack, { gridColumn: 1, gridRow: 1, spacing: 2, align: "center", minW: 0, mb: 0, children: _jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", maxWidth: "100%", fontSize: { base: "xs", md: "sm" }, fontWeight: "medium", whiteSpace: "nowrap", children: option.label }) }) }), _jsx(Box, { gridColumn: 1, gridRow: 2, mt: 0, textAlign: "left", children: _jsxs(HStack, { spacing: 2, align: "center", children: [option.offer > 0 && (_jsx(Badge, { bg: "green.100", color: "green.700", borderRadius: "md", px: { base: 0, md: 0.5 }, py: { base: 0, md: 0.25 }, fontWeight: "bold", fontSize: "10px", flexShrink: 0, children: isMobile ? `${option.offer}%` : `${option.offer}% OFF` })), _jsxs(Text, { fontSize: "sm", fontWeight: "bold", color: accentTextOnCanvas(theme.colors.red, isSelected ? theme.colors.red[50] : theme.colors.background[50]), whiteSpace: "nowrap", children: ["\u20B9", discounted] }), option.offer > 0 && (_jsxs(Text, { fontSize: "xs", color: "gray.500", textDecoration: "line-through", whiteSpace: "nowrap", children: ["\u20B9", option.price] }))] }) }), _jsx(Box, { gridColumn: 2, gridRow: 1, ml: { base: 0, md: 0 }, justifySelf: "end", w: { base: "0.625rem", md: "0.75rem" }, h: { base: "0.625rem", md: "0.75rem" }, minW: { base: "0.625rem", md: "0.75rem" }, borderRadius: "full", border: "0.125rem solid", borderColor: isSelected ? 'red.500' : 'gray.600', bg: theme.colors.background[50], display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "none", children: isSelected && (_jsx(Box, { w: { base: "0.25rem", md: "0.3125rem" }, h: { base: "0.25rem", md: "0.3125rem" }, bg: "red.500", borderRadius: "full" })) })] }, option.var_id));
108
- }) }) })), _jsxs(Flex, { mt: 2, w: "full", gap: 3, direction: { base: "column", md: "row" }, align: { base: "flex-start", md: "center" }, justify: { base: "flex-start", md: rightSlot ? "space-between" : "flex-start" }, children: [_jsxs(Box, { display: "flex", alignItems: "center", fontSize: cfg.price, gap: 2, minW: 0, children: [selected.offer > 0 && (_jsxs(Text, { color: "gray.500", textDecoration: "line-through", children: ["\u20B9", selected.price] })), _jsxs(Text, { color: accentTextOnCanvas(theme.colors.red, theme.colors.backgroundColor.main), fontWeight: "semibold", children: ["\u20B9", getDiscountedPrice(selected)] })] }), rightSlot && (_jsx(Box, { flexShrink: 0, mt: { base: 2, md: 0 }, children: rightSlot }))] })] }));
107
+ alignItems: "center", children: [_jsx(HStack, { gridColumn: 1, gridRow: 1, spacing: 2, align: "center", minW: 0, mb: 0, children: _jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", maxWidth: "100%", fontSize: { base: "xs", md: "sm" }, fontWeight: "medium", whiteSpace: "nowrap", children: option.label }) }) }), _jsx(Box, { gridColumn: 1, gridRow: 2, mt: 0, textAlign: "left", children: _jsxs(HStack, { spacing: 2, align: "center", children: [option.offer > 0 && (_jsx(Badge, { bg: theme.colors.green[100], color: accentTextOnCanvas(theme.colors.green, theme.colors.green[100]), borderRadius: "md", px: { base: 0, md: 0.5 }, py: { base: 0, md: 0.25 }, fontWeight: "bold", fontSize: "10px", flexShrink: 0, children: isMobile ? `${option.offer}%` : `${option.offer}% OFF` })), _jsxs(Text, { fontSize: "sm", fontWeight: "bold", color: accentTextOnCanvas(theme.colors.red, isSelected ? theme.colors.red[50] : theme.colors.background[50]), whiteSpace: "nowrap", children: ["\u20B9", discounted] }), option.offer > 0 && (_jsxs(Text, { fontSize: "xs", color: theme.colors.textMuted, textDecoration: "line-through", whiteSpace: "nowrap", children: ["\u20B9", option.price] }))] }) }), _jsx(Box, { gridColumn: 2, gridRow: 1, ml: { base: 0, md: 0 }, justifySelf: "end", w: { base: "0.625rem", md: "0.75rem" }, h: { base: "0.625rem", md: "0.75rem" }, minW: { base: "0.625rem", md: "0.75rem" }, borderRadius: "full", border: "0.125rem solid", borderColor: isSelected ? theme.colors.red[500] : theme.colors.boxborder[500], bg: theme.colors.background[50], display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "none", children: isSelected && (_jsx(Box, { w: { base: "0.25rem", md: "0.3125rem" }, h: { base: "0.25rem", md: "0.3125rem" }, bg: theme.colors.red[500], borderRadius: "full" })) })] }, option.var_id));
108
+ }) }) })), _jsxs(Flex, { mt: 2, w: "full", gap: 3, direction: { base: "column", md: "row" }, align: { base: "flex-start", md: "center" }, justify: { base: "flex-start", md: rightSlot ? "space-between" : "flex-start" }, children: [_jsxs(Box, { display: "flex", alignItems: "center", fontSize: cfg.price, gap: 2, minW: 0, children: [selected.offer > 0 && (_jsxs(Text, { color: theme.colors.textMuted, textDecoration: "line-through", children: ["\u20B9", selected.price] })), _jsxs(Text, { color: accentTextOnCanvas(theme.colors.red, theme.colors.backgroundColor.main), fontWeight: "semibold", children: ["\u20B9", getDiscountedPrice(selected)] })] }), rightSlot && (_jsx(Box, { flexShrink: 0, mt: { base: 2, md: 0 }, children: rightSlot }))] })] }));
109
109
  };
110
110
  export default ProductPrice;
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Flex, Text, Icon } from '@chakra-ui/react';
3
3
  import { BookCheck, Star } from 'lucide-react';
4
+ import { useCustomTheme } from '../../Theme/useCustomTheme.js';
5
+ import { accentTextOnCanvas } from '../../Theme/tokens/builders/accentText.js';
4
6
  // The theme's `yellow` scale reverses index roles in dark mode (like every utility hue), so
5
7
  // pulling it through the theme would silently flip this decorative "filled star" from gold to
6
8
  // pale. A rating star is a universal, brand-independent gold — not something that should follow
@@ -8,12 +10,13 @@ import { BookCheck, Star } from 'lucide-react';
8
10
  // "rating gold") to pixelize-design-library if this pattern is needed elsewhere.
9
11
  const RATING_STAR_FILL = "#ECC94B";
10
12
  const ProductReview = ({ rating, reviewCount, mb = 0 }) => {
13
+ const { colors } = useCustomTheme();
11
14
  const hasRating = rating !== undefined && rating !== null;
12
15
  const hasReviewCount = reviewCount !== undefined && reviewCount !== null;
13
16
  // Convert rating to number and ensure it's between 0 and 5
14
17
  // Calculate fill percentage: (rating / 5) * 100%
15
18
  const numericRating = hasRating ? Math.min(Math.max(Number(rating), 0), 5) : 0;
16
19
  const fillPercentage = (numericRating / 6) * 100;
17
- return (_jsxs(Flex, { align: "center", gap: 2, mb: mb, children: [hasRating && (_jsxs(Flex, { align: "center", gap: 1, bg: "teal.50", color: "teal.900", px: 2, borderRadius: "md", children: [_jsxs(Box, { position: "relative", flexShrink: 0, display: "inline-block", width: "14px", height: "14px", lineHeight: 0, children: [_jsx(Box, { position: "absolute", top: 0, left: 0, width: "14px", height: "14px", children: _jsx(Star, { size: 14, fill: "none", strokeWidth: 1.5 }) }), fillPercentage > 0 && (_jsx(Box, { position: "absolute", top: 0, left: 0, width: `${fillPercentage}%`, height: "100%", overflow: "hidden", children: _jsx(Star, { size: 14, color: RATING_STAR_FILL, fill: RATING_STAR_FILL }) }))] }), _jsx(Text, { fontSize: "sm", fontWeight: "bold", children: numericRating })] })), hasRating && hasReviewCount && _jsx(Box, { h: "4", w: "0.063rem", bg: "gray.400" }), hasReviewCount && (_jsxs(Flex, { align: "center", gap: "1", children: [_jsx(Icon, { as: BookCheck, boxSize: 3.5 }), _jsxs(Text, { fontSize: "sm", color: "gray.600", children: ["(", reviewCount, ")"] })] }))] }));
20
+ return (_jsxs(Flex, { align: "center", gap: 2, mb: mb, children: [hasRating && (_jsxs(Flex, { align: "center", gap: 1, bg: colors.teal[50], color: accentTextOnCanvas(colors.teal, colors.teal[50]), px: 2, borderRadius: "md", children: [_jsxs(Box, { position: "relative", flexShrink: 0, display: "inline-block", width: "14px", height: "14px", lineHeight: 0, children: [_jsx(Box, { position: "absolute", top: 0, left: 0, width: "14px", height: "14px", children: _jsx(Star, { size: 14, fill: "none", strokeWidth: 1.5 }) }), fillPercentage > 0 && (_jsx(Box, { position: "absolute", top: 0, left: 0, width: `${fillPercentage}%`, height: "100%", overflow: "hidden", children: _jsx(Star, { size: 14, color: RATING_STAR_FILL, fill: RATING_STAR_FILL }) }))] }), _jsx(Text, { fontSize: "sm", fontWeight: "bold", children: numericRating })] })), hasRating && hasReviewCount && _jsx(Box, { h: "4", w: "0.063rem", bg: colors.boxborder[500] }), hasReviewCount && (_jsxs(Flex, { align: "center", gap: "1", children: [_jsx(Icon, { as: BookCheck, boxSize: 3.5 }), _jsxs(Text, { fontSize: "sm", color: colors.textMuted, children: ["(", reviewCount, ")"] })] }))] }));
18
21
  };
19
22
  export default ProductReview;
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { Box, Flex, useTheme } from '@chakra-ui/react';
3
+ import { Box, Flex } from '@chakra-ui/react';
4
4
  import ToolTip from '../ToolTip/ToolTip.js';
5
+ import { useCustomTheme } from '../../Theme/useCustomTheme.js';
5
6
  const ProductTags = ({ tags, className, size = 'sm' }) => {
6
7
  const getRows = (tags) => {
7
8
  const count = tags.length;
@@ -18,10 +19,9 @@ const ProductTags = ({ tags, className, size = 'sm' }) => {
18
19
  return (_jsx(Flex, { direction: "column", gap: "1", className: className, w: "full", children: getRows(tags).map((row, rowIndex) => (_jsx(Flex, { gap: "1", children: row.map((tag, tagIndex) => (_jsx(Tag, { fullWidth: row.length === 1, size: size, children: tag }, tagIndex))) }, rowIndex))) }));
19
20
  };
20
21
  const Tag = ({ children, fullWidth = false, size = 'sm', }) => {
21
- var _a, _b, _c, _d;
22
- const theme = useTheme();
23
- const tagBorder = (_c = (_b = (_a = theme.colors.semantic) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b[200]) !== null && _c !== void 0 ? _c : (_d = theme.colors.red) === null || _d === void 0 ? void 0 : _d[200];
24
- const tagText = theme.colors.text[900];
22
+ const { colors } = useCustomTheme();
23
+ const tagBorder = colors.semanticText.error;
24
+ const tagText = colors.text[900];
25
25
  // Size map for tags
26
26
  const tagSizes = {
27
27
  xs: { fontSize: '0.625rem', px: '0.5rem', py: '0.125rem' },
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { Box, Flex, Text, HStack, IconButton, useBreakpointValue } from "@chakra-ui/react";
4
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
5
  import ProductImageSlider from "./ProductImageSlider.js";
5
6
  import ProductLabel from "../ProductCard/ProductLabel.js";
6
7
  import ProductTags from "../ProductCard/ProductTags.js";
@@ -11,6 +12,7 @@ import ProductReview from "../ProductCard/ProductReview.js";
11
12
  import FormattedDescription from "../Common/FormattedDescription.js";
12
13
  const ProductDetails = ({ id, price, label, shortdesc, tags, images, batch, onAddToCart, onNotifyMe, onOptionChange, addToCart, goToCart, OnGoToCart, rating, reviews, notifyMe, isQtyEditable = false, displayRating = true, }) => {
13
14
  var _a, _b, _c, _d, _e;
15
+ const { colors } = useCustomTheme();
14
16
  const isMobile = useBreakpointValue({ base: true, md: false });
15
17
  const [selectedOption, setSelectedOption] = React.useState(price === null || price === void 0 ? void 0 : price[0]);
16
18
  const [qty, setQty] = React.useState(1);
@@ -29,7 +31,7 @@ const ProductDetails = ({ id, price, label, shortdesc, tags, images, batch, onAd
29
31
  const handleDecrement = () => {
30
32
  setQty((prev) => (prev > 1 ? prev - 1 : 1));
31
33
  };
32
- return (_jsxs(Flex, { direction: ["column", "row"], maxW: "6xl", mx: "auto", align: "start", gap: 5, children: [_jsx(Box, { position: "relative", color: "white", borderRadius: "md", flex: "1", minH: isMobile ? undefined : "31.25rem", children: _jsx(ProductImageSlider, { images: images, thumbHeight: isMobile ? 48 : 80, imageSize: isMobile ? 360 : 480, thumbnailsToShow: isMobile ? 4 : 6, batch: batch }) }), _jsxs(Box, { flex: "1", children: [label && _jsx(ProductLabel, { label: label, size: "sm" }), shortdesc && _jsx(Box, { my: 3, children: _jsx(FormattedDescription, { content: shortdesc }) }), ((rating !== undefined && rating !== null) || (reviews !== undefined && reviews !== null)) && displayRating && (_jsx(ProductReview, { rating: rating, reviewCount: reviews, mb: 3 })), tags && _jsx(ProductTags, { tags: tags, size: "sm" }), price && (_jsx(ProductDtlPrice, { price: price, onSelect: (option) => {
34
+ return (_jsxs(Flex, { direction: ["column", "row"], maxW: "6xl", mx: "auto", align: "start", gap: 5, children: [_jsx(Box, { position: "relative", color: colors.text[500], borderRadius: "md", flex: "1", minH: isMobile ? undefined : "31.25rem", children: _jsx(ProductImageSlider, { images: images, thumbHeight: isMobile ? 48 : 80, imageSize: isMobile ? 360 : 480, thumbnailsToShow: isMobile ? 4 : 6, batch: batch }) }), _jsxs(Box, { flex: "1", children: [label && _jsx(ProductLabel, { label: label, size: "sm" }), shortdesc && _jsx(Box, { my: 3, children: _jsx(FormattedDescription, { content: shortdesc }) }), ((rating !== undefined && rating !== null) || (reviews !== undefined && reviews !== null)) && displayRating && (_jsx(ProductReview, { rating: rating, reviewCount: reviews, mb: 3 })), tags && _jsx(ProductTags, { tags: tags, size: "sm" }), price && (_jsx(ProductDtlPrice, { price: price, onSelect: (option) => {
33
35
  setSelectedOption(option);
34
36
  onOptionChange === null || onOptionChange === void 0 ? void 0 : onOptionChange(option);
35
37
  } })), typeof (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.stocks) === "number" && ((_a = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.stocks) !== null && _a !== void 0 ? _a : 0) <= 0 && (_jsx(Box, { sx: { ml: "1.1rem", mt: "0.5rem", mb: "0.5rem" }, children: _jsx(Button, { colorScheme: "gray", size: "sm",
@@ -11,12 +11,12 @@ const ProductDtlPrice = ({ price, onSelect }) => {
11
11
  useEffect(() => {
12
12
  onSelect === null || onSelect === void 0 ? void 0 : onSelect(selected);
13
13
  }, [selected, onSelect]);
14
- return (_jsxs(VStack, { align: "start", spacing: 3, p: 4, borderRadius: "md", w: "full", children: [_jsxs(HStack, { spacing: 2, align: "center", children: [selected.offer > 0 && (_jsxs(Text, { fontSize: "lg", color: theme.colors.gray[500], as: "s", children: ["\u20B9", selected.price] })), _jsxs(Text, { fontSize: "xl", color: accentTextOnCanvas(theme.colors.red, theme.colors.backgroundColor.main), fontWeight: "bold", children: ["\u20B9", discounted] }), selected.offer > 0 && (_jsxs(Badge, { colorScheme: "pink", fontSize: "xs", borderRadius: "sm", px: 2, py: 0.5, children: ["SAVE ", selected.offer, "%"] }))] }), _jsx(Text, { fontSize: "sm", color: theme.colors.gray[600], children: "(Incl. of all taxes)" }), _jsxs(Box, { children: [_jsxs(Text, { fontSize: "sm", fontWeight: "bold", textTransform: "uppercase", mb: 1, children: ["Packs : ", selected.label] }), _jsx(HStack, { spacing: 2, children: price.map((pack, idx) => (_jsx(Button, { size: "xs", variant: "outline", borderColor: idx === selectedIndex ? "orange.400" : "orange.200", bg: idx === selectedIndex ? "orange.50" : theme.colors.background[50],
14
+ return (_jsxs(VStack, { align: "start", spacing: 3, p: 4, borderRadius: "md", w: "full", children: [_jsxs(HStack, { spacing: 2, align: "center", children: [selected.offer > 0 && (_jsxs(Text, { fontSize: "lg", color: theme.colors.textMuted, as: "s", children: ["\u20B9", selected.price] })), _jsxs(Text, { fontSize: "xl", color: accentTextOnCanvas(theme.colors.red, theme.colors.backgroundColor.main), fontWeight: "bold", children: ["\u20B9", discounted] }), selected.offer > 0 && (_jsxs(Badge, { colorScheme: "pink", fontSize: "xs", borderRadius: "sm", px: 2, py: 0.5, children: ["SAVE ", selected.offer, "%"] }))] }), _jsx(Text, { fontSize: "sm", color: theme.colors.textMuted, children: "(Incl. of all taxes)" }), _jsxs(Box, { children: [_jsxs(Text, { fontSize: "sm", fontWeight: "bold", textTransform: "uppercase", mb: 1, children: ["Packs : ", selected.label] }), _jsx(HStack, { spacing: 2, children: price.map((pack, idx) => (_jsx(Button, { size: "xs", variant: "outline", borderColor: idx === selectedIndex ? theme.colors.orange[400] : theme.colors.orange[200], bg: idx === selectedIndex ? theme.colors.orange[50] : theme.colors.background[50],
15
15
  // orange.600 fails AA against both possible bg states — walk the scale per canvas
16
16
  color: accentTextOnCanvas(theme.colors.orange, idx === selectedIndex ? theme.colors.orange[50] : theme.colors.background[50]), borderRadius: "md", fontWeight: "medium", _hover: {
17
- bg: "orange.100",
17
+ bg: theme.colors.orange[100],
18
18
  }, _active: {
19
- bg: "orange.100",
19
+ bg: theme.colors.orange[100],
20
20
  }, onClick: () => setSelectedIndex(idx), children: pack.label }, pack.var_id))) })] })] }));
21
21
  };
22
22
  export default ProductDtlPrice;
@@ -1,6 +1,7 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
- import { Card as ChakraCard, CardBody, CardFooter, CardHeader, Divider, useTheme, } from "@chakra-ui/react";
3
+ import { Card as ChakraCard, CardBody, CardFooter, CardHeader, Divider, } from "@chakra-ui/react";
4
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
5
  export const ProfileCardHeader = ({ children, }) => {
5
6
  return _jsx(_Fragment, { children: children });
6
7
  };
@@ -11,10 +12,9 @@ export const ProfileCardFooter = ({ children, }) => {
11
12
  return _jsx(_Fragment, { children: children });
12
13
  };
13
14
  export default function ProfileCard({ maxW, align, variant, direction, justify, children, size, color, overflow, dividercolor, dividersize = "0.5px", dividervariant = "solid", CardStyle, CardHeaderStyle, CardBodyStyle, borderTopColor, borderLeftColor, }) {
14
- var _a, _b, _c, _d;
15
- const theme = useTheme();
16
- const resolvedDividerColor = (_b = dividercolor !== null && dividercolor !== void 0 ? dividercolor : (_a = theme.colors.border) === null || _a === void 0 ? void 0 : _a[400]) !== null && _b !== void 0 ? _b : (_c = theme.colors.gray) === null || _c === void 0 ? void 0 : _c[300];
17
- const accentBorder = `2px solid ${(_d = theme.colors.primary) === null || _d === void 0 ? void 0 : _d[500]}`;
15
+ const { colors } = useCustomTheme();
16
+ const resolvedDividerColor = dividercolor !== null && dividercolor !== void 0 ? dividercolor : colors.boxborder[200];
17
+ const accentBorder = `2px solid ${colors.primary[500]}`;
18
18
  const isReactElement = (child) => {
19
19
  return child !== null && typeof child === "object" && "type" in child;
20
20
  };
@@ -3,13 +3,13 @@ import { useRef, useState } from "react";
3
3
  import { Box, Image, IconButton, Input, Text, Tooltip, HStack, } from "@chakra-ui/react";
4
4
  import { Eye, FileText, SquarePen, User } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
- import { DEFAULT_WHITE } from "../../Theme/tokens/builders/accentText.js";
6
+ import { accentTextOnCanvas, onFilled } from "../../Theme/tokens/builders/accentText.js";
7
7
  export default function ProfilePhotoViewer({ photoUrl, onPhotoChange, imageWidth = "100px", imageAlt = "Profile Photo", imageObjectFit = "cover", imageBorderRadius = "full", editIconSize = "sm", editIconPositionRight = "0px", editIconPositionBottom = "0px", isRound = true, boxStyle, isEditable = false, isView = false, style, handleIsView, fallbackText, revealOnHover = true, }) {
8
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
8
+ var _a, _b, _c, _d, _e;
9
9
  const [photo, setPhoto] = useState(photoUrl);
10
10
  const fileInputRef = useRef(null);
11
11
  const theme = useCustomTheme();
12
- const c = (_a = theme.colors) !== null && _a !== void 0 ? _a : {};
12
+ const c = theme.colors;
13
13
  const handlePhotoChange = (event) => {
14
14
  var _a;
15
15
  if (!isEditable)
@@ -35,37 +35,40 @@ export default function ProfilePhotoViewer({ photoUrl, onPhotoChange, imageWidth
35
35
  // [800], not [300]: the edit IconButton's border is a control boundary — WCAG 1.4.11 needs
36
36
  // >=3.0 against any named surface up to `muted` (lightest); [300] fails there, [800] clears
37
37
  // all with margin.
38
- const border = (_c = (_b = c.boxborder) === null || _b === void 0 ? void 0 : _b[800]) !== null && _c !== void 0 ? _c : (_d = c.gray) === null || _d === void 0 ? void 0 : _d[200];
38
+ const border = c.boxborder[500];
39
39
  // Shared modern frame for whichever media we render (photo / pdf / fallback).
40
40
  const mediaFrame = {
41
41
  boxSize: imageWidth,
42
42
  borderRadius: imageBorderRadius,
43
43
  border: `0.063rem solid ${border}`,
44
- boxShadow: (_e = theme.shadows) === null || _e === void 0 ? void 0 : _e.sm,
44
+ boxShadow: (_a = theme.shadows) === null || _a === void 0 ? void 0 : _a.sm,
45
45
  };
46
46
  const renderMedia = () => {
47
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
48
47
  if (photo) {
49
- return isPdf ? (_jsx(Box, { ...mediaFrame, bg: (_b = (_a = c.gray) === null || _a === void 0 ? void 0 : _a[100]) !== null && _b !== void 0 ? _b : "gray.100", color: (_c = c.gray) === null || _c === void 0 ? void 0 : _c[500], display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden", children: _jsx(FileText, { size: "45%" }) })) : (_jsx(Image, { src: photo, alt: imageAlt, objectFit: imageObjectFit, ...mediaFrame }));
48
+ return isPdf ? (_jsx(Box, { ...mediaFrame, bg: c.gray[100], color: accentTextOnCanvas(c.gray, c.gray[100]), display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden", children: _jsx(FileText, { size: "45%" }) })) : (_jsx(Image, { src: photo, alt: imageAlt, objectFit: imageObjectFit, ...mediaFrame }));
50
49
  }
51
50
  // Fallback: branded tinted avatar (initials or user glyph).
52
- return (_jsx(Box, { ...mediaFrame, display: "flex", alignItems: "center", justifyContent: "center", bg: (_f = (_e = (_d = c.primary) === null || _d === void 0 ? void 0 : _d.opacity) === null || _e === void 0 ? void 0 : _e[16]) !== null && _f !== void 0 ? _f : (_g = c.gray) === null || _g === void 0 ? void 0 : _g[100], color: (_j = (_h = c.primary) === null || _h === void 0 ? void 0 : _h[600]) !== null && _j !== void 0 ? _j : (_k = c.gray) === null || _k === void 0 ? void 0 : _k[500], children: fallbackText ? (_jsx(Text, { fontSize: "1.75rem", fontWeight: 700, lineHeight: "1", children: fallbackText })) : (_jsx(User, { size: "48%" })) }));
51
+ return (_jsx(Box, { ...mediaFrame, display: "flex", alignItems: "center", justifyContent: "center", bg: c.primary.opacity[16], color: accentTextOnCanvas(c.primary, c.backgroundColor.main), children: fallbackText ? (_jsx(Text, { fontSize: "1.75rem", fontWeight: 700, lineHeight: "1", children: fallbackText })) : (_jsx(User, { size: "48%" })) }));
53
52
  };
54
53
  const hasActions = isEditable || isView;
55
54
  return (_jsxs(Box, { position: "relative", display: "inline-block", style: boxStyle, borderRadius: imageBorderRadius, transition: "box-shadow 0.2s ease", sx: {
56
55
  "&:hover .ppv-overlay": { opacity: 1 },
57
56
  "&:hover .ppv-actions": { opacity: 1 },
58
57
  "&:hover .ppv-media": {
59
- boxShadow: `0 0 0 0.1875rem ${(_h = (_g = (_f = c.primary) === null || _f === void 0 ? void 0 : _f.opacity) === null || _g === void 0 ? void 0 : _g[24]) !== null && _h !== void 0 ? _h : "transparent"}`,
58
+ boxShadow: `0 0 0 0.1875rem ${c.primary.opacity[24]}`,
60
59
  },
61
- }, children: [_jsx(Box, { className: "ppv-media", borderRadius: imageBorderRadius, transition: "box-shadow 0.2s ease", children: renderMedia() }), hasActions && (_jsxs(_Fragment, { children: [_jsx(Box, { className: "ppv-overlay", position: "absolute", inset: 0, borderRadius: imageBorderRadius, bg: "blackAlpha.300", opacity: 0, transition: "opacity 0.2s ease", pointerEvents: "none" }), _jsxs(HStack, { className: "ppv-actions", position: "absolute", right: editIconPositionRight, bottom: editIconPositionBottom, transform: "translate(-15%, -15%)", spacing: 1.5, opacity: revealOnHover ? 0 : 1, transition: "opacity 0.2s ease", children: [isEditable && (_jsx(Tooltip, { label: "Edit", "aria-label": "Edit", hasArrow: true, children: _jsx(IconButton, { icon: _jsx(SquarePen, { size: 14 }), isRound: isRound, size: editIconSize, onClick: handleClick, "aria-label": "Edit photo", bg: (_j = c.primary) === null || _j === void 0 ? void 0 : _j[500], color: (_k = c.white) !== null && _k !== void 0 ? _k : DEFAULT_WHITE, border: `0.125rem solid ${(_l = c.white) !== null && _l !== void 0 ? _l : DEFAULT_WHITE}`, boxShadow: (_m = theme.shadows) === null || _m === void 0 ? void 0 : _m.md, style: style, transition: "transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease", _hover: {
62
- bg: (_o = c.primary) === null || _o === void 0 ? void 0 : _o[600],
60
+ }, children: [_jsx(Box, { className: "ppv-media", borderRadius: imageBorderRadius, transition: "box-shadow 0.2s ease", children: renderMedia() }), hasActions && (_jsxs(_Fragment, { children: [_jsx(Box, { className: "ppv-overlay", position: "absolute", inset: 0, borderRadius: imageBorderRadius, bg: "blackAlpha.300", opacity: 0, transition: "opacity 0.2s ease", pointerEvents: "none" }), _jsxs(HStack, { className: "ppv-actions", position: "absolute", right: editIconPositionRight, bottom: editIconPositionBottom, transform: "translate(-15%, -15%)", spacing: 1.5, opacity: revealOnHover ? 0 : 1, transition: "opacity 0.2s ease", children: [isEditable && (_jsx(Tooltip, { label: "Edit", "aria-label": "Edit", hasArrow: true, children: _jsx(IconButton, { icon: _jsx(SquarePen, { size: 14 }), isRound: isRound, size: editIconSize, onClick: handleClick, "aria-label": "Edit photo", bg: c.primary[500], color: onFilled(c.primary[500], c.white, c.black), border: `0.125rem solid ${c.background[50]}`, boxShadow: (_b = theme.shadows) === null || _b === void 0 ? void 0 : _b.md, style: style, transition: "transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease", _hover: {
61
+ bg: c.primary[600],
62
+ color: onFilled(c.primary[600], c.white, c.black),
63
63
  transform: "scale(1.1)",
64
- boxShadow: (_p = theme.shadows) === null || _p === void 0 ? void 0 : _p.lg,
65
- }, _active: { bg: (_q = c.primary) === null || _q === void 0 ? void 0 : _q[700] } }) })), isView && (_jsx(Tooltip, { label: "View", "aria-label": "View", hasArrow: true, children: _jsx(IconButton, { icon: _jsx(Eye, { size: 14 }), isRound: isRound, size: editIconSize, onClick: handleIsView, "aria-label": "View photo", bg: (_s = (_r = c.background) === null || _r === void 0 ? void 0 : _r[50]) !== null && _s !== void 0 ? _s : DEFAULT_WHITE, color: (_t = c.gray) === null || _t === void 0 ? void 0 : _t[700], border: `0.063rem solid ${border}`, boxShadow: (_u = theme.shadows) === null || _u === void 0 ? void 0 : _u.md, style: style, transition: "transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease", _hover: {
66
- bg: (_v = c.gray) === null || _v === void 0 ? void 0 : _v[50],
67
- color: (_w = c.primary) === null || _w === void 0 ? void 0 : _w[600],
64
+ boxShadow: (_c = theme.shadows) === null || _c === void 0 ? void 0 : _c.lg,
65
+ }, _active: {
66
+ bg: c.primary[700],
67
+ color: onFilled(c.primary[700], c.white, c.black),
68
+ } }) })), isView && (_jsx(Tooltip, { label: "View", "aria-label": "View", hasArrow: true, children: _jsx(IconButton, { icon: _jsx(Eye, { size: 14 }), isRound: isRound, size: editIconSize, onClick: handleIsView, "aria-label": "View photo", bg: c.background[50], color: c.text[700], border: `0.063rem solid ${border}`, boxShadow: (_d = theme.shadows) === null || _d === void 0 ? void 0 : _d.md, style: style, transition: "transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease", _hover: {
69
+ bg: c.gray[50],
70
+ color: accentTextOnCanvas(c.primary, c.gray[50]),
68
71
  transform: "scale(1.1)",
69
- boxShadow: (_x = theme.shadows) === null || _x === void 0 ? void 0 : _x.lg,
70
- }, _active: { bg: (_y = c.gray) === null || _y === void 0 ? void 0 : _y[100] } }) }))] }), isEditable && (_jsx(Input, { type: "file", accept: "image/*", onChange: handlePhotoChange, hidden: true, ref: fileInputRef }))] }))] }));
72
+ boxShadow: (_e = theme.shadows) === null || _e === void 0 ? void 0 : _e.lg,
73
+ }, _active: { bg: c.gray[100] } }) }))] }), isEditable && (_jsx(Input, { type: "file", accept: "image/*", onChange: handlePhotoChange, hidden: true, ref: fileInputRef }))] }))] }));
71
74
  }
@@ -4,7 +4,7 @@ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
4
  import { TextLabel } from "../Common/FormLabel.js";
5
5
  const RadioButton = ({ label, colorScheme, isChecked, onChange, isDisabled, size, value, defaultChecked, labelFontSize = "0.75rem", labelClampLines = 2, showLabelTooltip = (label || "").length > 18, labelTooltip = label, }) => {
6
6
  const theme = useCustomTheme();
7
- return (_jsx(ChakraRadio, { colorScheme: colorScheme, isChecked: isChecked, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.gray[500], borderWidth: "1.6px", _hover: {
7
+ return (_jsx(ChakraRadio, { colorScheme: colorScheme, isChecked: isChecked, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.boxborder[500], borderWidth: "1.6px", _hover: {
8
8
  borderColor: theme.colors.primary[500],
9
9
  backgroundColor: theme.colors.background[100],
10
10
  }, sx: {