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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/dist/Components/Accordion/Accordion.js +13 -15
  2. package/dist/Components/Accordion/accordionColors.js +6 -9
  3. package/dist/Components/AlertDialog/AlertDialog.js +1 -2
  4. package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
  5. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
  6. package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
  7. package/dist/Components/AppearanceSettings/AppearanceSettings.js +9 -7
  8. package/dist/Components/Button/Button.styles.js +4 -10
  9. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +9 -10
  10. package/dist/Components/Common/ErrorComponent.js +5 -8
  11. package/dist/Components/Common/ErrorMessage.js +2 -8
  12. package/dist/Components/Common/FormLabel.js +1 -3
  13. package/dist/Components/Common/FormattedDescription.js +3 -1
  14. package/dist/Components/Common/Label.js +3 -8
  15. package/dist/Components/Common/fieldStyles.js +6 -7
  16. package/dist/Components/ContactForm/ContactForm.js +1 -2
  17. package/dist/Components/CopyButton/CopyButton.js +3 -6
  18. package/dist/Components/CustomModulesTable/CustomModulesTable.js +7 -10
  19. package/dist/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
  20. package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -3
  21. package/dist/Components/DatePicker/CalendarPanel.js +2 -3
  22. package/dist/Components/DatePicker/RangeDatePicker.js +9 -9
  23. package/dist/Components/DatePicker/SingleDatePicker.js +11 -11
  24. package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -2
  25. package/dist/Components/DatePicker/TimePicker.js +6 -7
  26. package/dist/Components/DatePicker/TimePickerInput.js +6 -7
  27. package/dist/Components/Divider/Divider.js +1 -2
  28. package/dist/Components/Drawer/Drawer.js +1 -2
  29. package/dist/Components/Dropdown/DropDown.js +22 -26
  30. package/dist/Components/Editor/Editor.js +10 -13
  31. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -2
  32. package/dist/Components/EmptyState/EmptyState.js +11 -11
  33. package/dist/Components/FieldSelectModal/FieldSelectModal.js +1 -1
  34. package/dist/Components/FilePreview/FilePreview.js +2 -2
  35. package/dist/Components/FileUpload/FileUpload.js +18 -24
  36. package/dist/Components/FileUploader/FileUploader.js +5 -6
  37. package/dist/Components/FilterSidebar/FilterSidebar.js +156 -160
  38. package/dist/Components/Form/FormWrapper.js +1 -2
  39. package/dist/Components/Header/Header.js +6 -6
  40. package/dist/Components/Header/HeaderActions.d.ts +3 -1
  41. package/dist/Components/Header/HeaderActions.js +8 -4
  42. package/dist/Components/Header/components/desktopMenu.js +7 -20
  43. package/dist/Components/Header/components/mobileMenu.js +3 -15
  44. package/dist/Components/Input/Input/Input.js +13 -17
  45. package/dist/Components/Input/TextInput.styles.js +10 -13
  46. package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -1
  47. package/dist/Components/InputTextArea/InputTextArea.style.js +10 -11
  48. package/dist/Components/KanbanBoard/AccountCard.js +10 -4
  49. package/dist/Components/KanbanBoard/AccountRow.js +1 -2
  50. package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  51. package/dist/Components/KanbanBoard/KanbanBoard.js +21 -28
  52. package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
  53. package/dist/Components/LimitReachedModal/LimitReachedModal.js +3 -15
  54. package/dist/Components/Loading/Loading.js +1 -1
  55. package/dist/Components/Modal/Modal.js +3 -1
  56. package/dist/Components/MoreItems/MoreItems.js +3 -7
  57. package/dist/Components/MultiSelect/MultiSelect.js +5 -6
  58. package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -1
  59. package/dist/Components/NavigationBar/NavigationBar.js +22 -18
  60. package/dist/Components/NavigationBar/NavigationBarProps.d.ts +5 -0
  61. package/dist/Components/NoteTextArea/NoteTextArea.js +4 -8
  62. package/dist/Components/Notification/Notification.js +17 -15
  63. package/dist/Components/NumberInput/NumberInput.styles.js +10 -11
  64. package/dist/Components/OrgSwitcher/OrgSwitcher.js +6 -7
  65. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +2 -0
  66. package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +6 -2
  67. package/dist/Components/OrganizationDetails/CreateOrgModal.js +1 -2
  68. package/dist/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
  69. package/dist/Components/OrganizationDetails/OrganizationDetails.js +25 -22
  70. package/dist/Components/PdfViewer/PdfViewer.js +1 -1
  71. package/dist/Components/PinInputs/PinInputs.js +7 -14
  72. package/dist/Components/PlanPill/PlanPill.js +5 -8
  73. package/dist/Components/PlanPill/planPillGradient.d.ts +19 -0
  74. package/dist/Components/PlanPill/planPillGradient.js +30 -1
  75. package/dist/Components/ProductCard/ProductPrice.js +6 -6
  76. package/dist/Components/ProductCard/ProductReview.js +4 -1
  77. package/dist/Components/ProductCard/ProductTags.js +4 -4
  78. package/dist/Components/ProductDetails/ProductDetails.js +3 -1
  79. package/dist/Components/ProductDetails/ProductDtlPrice.js +3 -3
  80. package/dist/Components/ProfileCard/ProfileCard.js +4 -4
  81. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +19 -16
  82. package/dist/Components/Reorder/Reorder.js +3 -4
  83. package/dist/Components/RolesPermission/DeleteRoleModal.js +5 -4
  84. package/dist/Components/RolesPermission/RolesPermission.js +12 -14
  85. package/dist/Components/ScrollToTop/ScrollToTop.js +2 -3
  86. package/dist/Components/SearchSelect/SearchSelect.js +25 -28
  87. package/dist/Components/Select/Select.styles.js +33 -37
  88. package/dist/Components/SelectSearch/SelectSearch.js +8 -8
  89. package/dist/Components/SelectV2/SelectV2.js +14 -20
  90. package/dist/Components/SideBar/SecondaryBar.js +10 -15
  91. package/dist/Components/SideBar/SideBar.d.ts +1 -1
  92. package/dist/Components/SideBar/SideBar.js +41 -34
  93. package/dist/Components/SideBar/SideBarProps.d.ts +6 -0
  94. package/dist/Components/SideBar/components/MenuItemBox.js +10 -12
  95. package/dist/Components/SideBar/components/MenuItems.js +3 -1
  96. package/dist/Components/SideBar/components/MenuPopoverContent.js +7 -9
  97. package/dist/Components/SideBar/components/OtherApps.js +4 -4
  98. package/dist/Components/SideBar/sidebarAccentColors.d.ts +4 -17
  99. package/dist/Components/SideBar/sidebarAccentColors.js +6 -33
  100. package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -7
  101. package/dist/Components/Slider/Slider.js +2 -2
  102. package/dist/Components/StageProgress/StageProgressProps.js +9 -13
  103. package/dist/Components/Table/Table.js +10 -10
  104. package/dist/Components/Table/components/HeaderActions.js +6 -7
  105. package/dist/Components/Table/components/Pagination.js +1 -1
  106. package/dist/Components/Table/components/TableActions.js +4 -4
  107. package/dist/Components/Table/components/TableBody.js +18 -20
  108. package/dist/Components/Table/components/TableGroupRow.js +1 -2
  109. package/dist/Components/Table/components/TableHeader.js +8 -12
  110. package/dist/Components/Table/components/TableSearch.js +1 -2
  111. package/dist/Components/Table/components/tableRowHoverStyle.js +2 -3
  112. package/dist/Components/Table/filters/ActiveFilters.js +5 -8
  113. package/dist/Components/Table/filters/CompactSelect.js +4 -5
  114. package/dist/Components/Table/filters/LeftFilterPane.js +4 -5
  115. package/dist/Components/Table/filters/TableFilters.js +1 -2
  116. package/dist/Components/Table/hooks/useTable.js +8 -11
  117. package/dist/Components/Table/settings/ManageColumns.js +1 -1
  118. package/dist/Components/Table/settings/TableSettings.js +12 -14
  119. package/dist/Components/Tag/Tag.styles.js +8 -6
  120. package/dist/Components/Timeline/Timeline.js +32 -45
  121. package/dist/Components/Toaster/Toaster.js +43 -44
  122. package/dist/Components/ToolTip/ToolTip.js +1 -6
  123. package/dist/Components/Trail/EditableCell.js +4 -1
  124. package/dist/Components/Trail/TrailWorks.js +3 -3
  125. package/dist/Components/UpgradeButton/UpgradeButton.js +2 -4
  126. package/dist/Components/UserDetails/AddUserModal.js +3 -3
  127. package/dist/Components/UserDetails/ChangeRoleModal.js +2 -2
  128. package/dist/Components/UserDetails/DeactivateConfirmModal.js +5 -5
  129. package/dist/Components/UserDetails/UserDetails.js +14 -16
  130. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
  131. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
  132. package/dist/Theme/assertPalette.d.ts +11 -0
  133. package/dist/Theme/assertPalette.js +55 -0
  134. package/dist/Theme/chakra/Avatar.styles.d.ts +5 -5
  135. package/dist/Theme/chakra/Avatar.styles.js +2 -2
  136. package/dist/Theme/chakra/Drawer.styles.d.ts +5 -5
  137. package/dist/Theme/chakra/Drawer.styles.js +8 -10
  138. package/dist/Theme/chakra/Modal.styles.d.ts +5 -5
  139. package/dist/Theme/chakra/Modal.styles.js +8 -10
  140. package/dist/Theme/chakra/Popover.styles.d.ts +3 -3
  141. package/dist/Theme/chakra/Slider.styles.d.ts +1 -1
  142. package/dist/Theme/chakra/Slider.styles.js +7 -9
  143. package/dist/Theme/chakra/Tabs.styles.d.ts +2 -2
  144. package/dist/Theme/chakra/Tabs.styles.js +13 -18
  145. package/dist/Theme/chakra/componentStyles.d.ts +54 -21
  146. package/dist/Theme/chakra/componentStyles.js +52 -43
  147. package/dist/Theme/chakra/paletteFromTheme.d.ts +10 -0
  148. package/dist/Theme/chakra/paletteFromTheme.js +14 -0
  149. package/dist/Theme/provider/PixelizeThemeProvider.js +5 -0
  150. package/dist/Theme/testing/testPalette.d.ts +16 -0
  151. package/dist/Theme/testing/testPalette.js +24 -0
  152. package/dist/Theme/tokens/brands/emerald/palette.light.d.ts +2 -373
  153. package/dist/Theme/tokens/brands/emerald/palette.light.js +5 -7
  154. package/dist/Theme/tokens/brands/index.d.ts +3 -2
  155. package/dist/Theme/tokens/brands/index.js +29 -23
  156. package/dist/Theme/tokens/brands/lavender/palette.light.d.ts +2 -373
  157. package/dist/Theme/tokens/brands/lavender/palette.light.js +3 -110
  158. package/dist/Theme/tokens/brands/meadow/palette.light.d.ts +2 -373
  159. package/dist/Theme/tokens/brands/meadow/palette.light.js +5 -7
  160. package/dist/Theme/tokens/brands/neutrals.d.ts +8 -0
  161. package/dist/Theme/tokens/brands/neutrals.js +119 -0
  162. package/dist/Theme/tokens/brands/radiant/palette.light.d.ts +2 -373
  163. package/dist/Theme/tokens/brands/radiant/palette.light.js +5 -7
  164. package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts +2 -373
  165. package/dist/Theme/tokens/brands/rosewood/palette.light.js +5 -7
  166. package/dist/Theme/tokens/brands/skyline/palette.light.d.ts +2 -373
  167. package/dist/Theme/tokens/brands/skyline/palette.light.js +5 -7
  168. package/dist/Theme/tokens/brands/slate/palette.light.d.ts +2 -373
  169. package/dist/Theme/tokens/brands/slate/palette.light.js +6 -8
  170. package/dist/Theme/tokens/brands/storefront/palette.light.d.ts +2 -373
  171. package/dist/Theme/tokens/brands/storefront/palette.light.js +5 -7
  172. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +5 -3
  173. package/dist/Theme/tokens/brands/zinc/palette.dark.js +2 -1
  174. package/dist/Theme/tokens/brands/zinc/palette.light.d.ts +2 -373
  175. package/dist/Theme/tokens/builders/accentText.d.ts +2 -2
  176. package/dist/Theme/tokens/builders/accentText.js +8 -27
  177. package/dist/Theme/tokens/builders/brandInk.d.ts +11 -0
  178. package/dist/Theme/tokens/builders/brandInk.js +106 -0
  179. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +2 -2
  180. package/dist/Theme/tokens/builders/buildDarkPalette.js +16 -8
  181. package/dist/Theme/tokens/builders/mutedText.d.ts +5 -0
  182. package/dist/Theme/tokens/builders/mutedText.js +9 -0
  183. package/dist/Theme/tokens/builders/outlineRung.d.ts +7 -6
  184. package/dist/Theme/tokens/builders/outlineRung.js +20 -18
  185. package/dist/Theme/tokens/builders/resolvedRungs.d.ts +7 -0
  186. package/dist/Theme/tokens/builders/resolvedRungs.js +25 -0
  187. package/dist/Theme/tokens/builders/semanticText.d.ts +10 -0
  188. package/dist/Theme/tokens/builders/semanticText.js +22 -0
  189. package/dist/Theme/tokens/builders/sidebarAccent.d.ts +9 -0
  190. package/dist/Theme/tokens/builders/sidebarAccent.js +29 -0
  191. package/dist/Theme/tokens/builders/statusTone.js +3 -4
  192. package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -0
  193. package/dist/Theme/tokens/builders/surfaceRungs.js +39 -0
  194. package/dist/Theme/tokens/types.d.ts +41 -13
  195. package/dist/Theme/useCustomTheme.js +4 -1
  196. package/dist/Utils/table.d.ts +1 -7
  197. package/dist/Utils/table.js +27 -35
  198. package/dist/esm/Components/Accordion/Accordion.js +14 -16
  199. package/dist/esm/Components/Accordion/accordionColors.js +6 -9
  200. package/dist/esm/Components/AlertDialog/AlertDialog.js +1 -2
  201. package/dist/esm/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
  202. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
  203. package/dist/esm/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
  204. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +9 -7
  205. package/dist/esm/Components/Button/Button.styles.js +4 -10
  206. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +9 -10
  207. package/dist/esm/Components/Common/ErrorComponent.js +6 -9
  208. package/dist/esm/Components/Common/ErrorMessage.js +2 -8
  209. package/dist/esm/Components/Common/FormLabel.js +1 -3
  210. package/dist/esm/Components/Common/FormattedDescription.js +3 -1
  211. package/dist/esm/Components/Common/Label.js +3 -8
  212. package/dist/esm/Components/Common/fieldStyles.js +6 -7
  213. package/dist/esm/Components/ContactForm/ContactForm.js +1 -2
  214. package/dist/esm/Components/CopyButton/CopyButton.js +3 -6
  215. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +7 -10
  216. package/dist/esm/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
  217. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -3
  218. package/dist/esm/Components/DatePicker/CalendarPanel.js +2 -3
  219. package/dist/esm/Components/DatePicker/RangeDatePicker.js +9 -9
  220. package/dist/esm/Components/DatePicker/SingleDatePicker.js +11 -11
  221. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -2
  222. package/dist/esm/Components/DatePicker/TimePicker.js +6 -7
  223. package/dist/esm/Components/DatePicker/TimePickerInput.js +6 -7
  224. package/dist/esm/Components/Divider/Divider.js +1 -2
  225. package/dist/esm/Components/Drawer/Drawer.js +1 -2
  226. package/dist/esm/Components/Dropdown/DropDown.js +22 -26
  227. package/dist/esm/Components/Editor/Editor.js +11 -14
  228. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -2
  229. package/dist/esm/Components/EmptyState/EmptyState.js +11 -11
  230. package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +1 -1
  231. package/dist/esm/Components/FilePreview/FilePreview.js +2 -2
  232. package/dist/esm/Components/FileUpload/FileUpload.js +18 -24
  233. package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
  234. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +157 -161
  235. package/dist/esm/Components/Form/FormWrapper.js +1 -2
  236. package/dist/esm/Components/Header/Header.js +6 -6
  237. package/dist/esm/Components/Header/HeaderActions.js +9 -5
  238. package/dist/esm/Components/Header/components/desktopMenu.js +8 -21
  239. package/dist/esm/Components/Header/components/mobileMenu.js +3 -15
  240. package/dist/esm/Components/Input/Input/Input.js +14 -18
  241. package/dist/esm/Components/Input/TextInput.styles.js +10 -13
  242. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +10 -11
  243. package/dist/esm/Components/KanbanBoard/AccountCard.js +10 -4
  244. package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -2
  245. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  246. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +21 -28
  247. package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
  248. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +4 -16
  249. package/dist/esm/Components/Loading/Loading.js +1 -1
  250. package/dist/esm/Components/Modal/Modal.js +3 -1
  251. package/dist/esm/Components/MoreItems/MoreItems.js +3 -7
  252. package/dist/esm/Components/MultiSelect/MultiSelect.js +5 -6
  253. package/dist/esm/Components/NavigationBar/NavigationBar.js +23 -19
  254. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +4 -8
  255. package/dist/esm/Components/Notification/Notification.js +18 -16
  256. package/dist/esm/Components/NumberInput/NumberInput.styles.js +10 -11
  257. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +7 -8
  258. package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +5 -1
  259. package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +1 -2
  260. package/dist/esm/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
  261. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +25 -22
  262. package/dist/esm/Components/PdfViewer/PdfViewer.js +1 -1
  263. package/dist/esm/Components/PinInputs/PinInputs.js +8 -15
  264. package/dist/esm/Components/PlanPill/PlanPill.js +6 -9
  265. package/dist/esm/Components/PlanPill/planPillGradient.js +24 -0
  266. package/dist/esm/Components/ProductCard/ProductPrice.js +6 -6
  267. package/dist/esm/Components/ProductCard/ProductReview.js +4 -1
  268. package/dist/esm/Components/ProductCard/ProductTags.js +5 -5
  269. package/dist/esm/Components/ProductDetails/ProductDetails.js +3 -1
  270. package/dist/esm/Components/ProductDetails/ProductDtlPrice.js +3 -3
  271. package/dist/esm/Components/ProfileCard/ProfileCard.js +5 -5
  272. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +20 -17
  273. package/dist/esm/Components/Reorder/Reorder.js +3 -4
  274. package/dist/esm/Components/RolesPermission/DeleteRoleModal.js +5 -4
  275. package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -14
  276. package/dist/esm/Components/ScrollToTop/ScrollToTop.js +2 -3
  277. package/dist/esm/Components/SearchSelect/SearchSelect.js +25 -28
  278. package/dist/esm/Components/Select/Select.styles.js +33 -37
  279. package/dist/esm/Components/SelectSearch/SelectSearch.js +8 -8
  280. package/dist/esm/Components/SelectV2/SelectV2.js +14 -20
  281. package/dist/esm/Components/SideBar/SecondaryBar.js +11 -16
  282. package/dist/esm/Components/SideBar/SideBar.js +43 -36
  283. package/dist/esm/Components/SideBar/components/MenuItemBox.js +11 -13
  284. package/dist/esm/Components/SideBar/components/MenuItems.js +3 -1
  285. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +8 -10
  286. package/dist/esm/Components/SideBar/components/OtherApps.js +4 -4
  287. package/dist/esm/Components/SideBar/sidebarAccentColors.js +5 -31
  288. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -7
  289. package/dist/esm/Components/Slider/Slider.js +2 -2
  290. package/dist/esm/Components/StageProgress/StageProgressProps.js +9 -13
  291. package/dist/esm/Components/Table/Table.js +10 -10
  292. package/dist/esm/Components/Table/components/HeaderActions.js +6 -7
  293. package/dist/esm/Components/Table/components/Pagination.js +1 -1
  294. package/dist/esm/Components/Table/components/TableActions.js +4 -4
  295. package/dist/esm/Components/Table/components/TableBody.js +18 -20
  296. package/dist/esm/Components/Table/components/TableGroupRow.js +1 -2
  297. package/dist/esm/Components/Table/components/TableHeader.js +8 -12
  298. package/dist/esm/Components/Table/components/TableSearch.js +1 -2
  299. package/dist/esm/Components/Table/components/tableRowHoverStyle.js +2 -3
  300. package/dist/esm/Components/Table/filters/ActiveFilters.js +5 -8
  301. package/dist/esm/Components/Table/filters/CompactSelect.js +4 -5
  302. package/dist/esm/Components/Table/filters/LeftFilterPane.js +4 -5
  303. package/dist/esm/Components/Table/filters/TableFilters.js +1 -2
  304. package/dist/esm/Components/Table/hooks/useTable.js +8 -11
  305. package/dist/esm/Components/Table/settings/ManageColumns.js +1 -1
  306. package/dist/esm/Components/Table/settings/TableSettings.js +12 -14
  307. package/dist/esm/Components/Tag/Tag.styles.js +9 -7
  308. package/dist/esm/Components/Timeline/Timeline.js +33 -46
  309. package/dist/esm/Components/Toaster/Toaster.js +44 -45
  310. package/dist/esm/Components/ToolTip/ToolTip.js +1 -6
  311. package/dist/esm/Components/Trail/EditableCell.js +4 -1
  312. package/dist/esm/Components/Trail/TrailWorks.js +4 -4
  313. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +2 -4
  314. package/dist/esm/Components/UserDetails/AddUserModal.js +3 -3
  315. package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -2
  316. package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +5 -5
  317. package/dist/esm/Components/UserDetails/UserDetails.js +15 -17
  318. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
  319. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
  320. package/dist/esm/Theme/assertPalette.js +50 -0
  321. package/dist/esm/Theme/chakra/Avatar.styles.js +2 -2
  322. package/dist/esm/Theme/chakra/Drawer.styles.js +8 -10
  323. package/dist/esm/Theme/chakra/Modal.styles.js +8 -10
  324. package/dist/esm/Theme/chakra/Slider.styles.js +7 -9
  325. package/dist/esm/Theme/chakra/Tabs.styles.js +13 -18
  326. package/dist/esm/Theme/chakra/componentStyles.js +53 -44
  327. package/dist/esm/Theme/chakra/paletteFromTheme.js +9 -0
  328. package/dist/esm/Theme/provider/PixelizeThemeProvider.js +5 -0
  329. package/dist/esm/Theme/testing/testPalette.js +19 -0
  330. package/dist/esm/Theme/tokens/brands/emerald/palette.light.js +5 -4
  331. package/dist/esm/Theme/tokens/brands/index.js +28 -23
  332. package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +3 -110
  333. package/dist/esm/Theme/tokens/brands/meadow/palette.light.js +5 -4
  334. package/dist/esm/Theme/tokens/brands/neutrals.js +116 -0
  335. package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +5 -4
  336. package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +5 -4
  337. package/dist/esm/Theme/tokens/brands/skyline/palette.light.js +5 -4
  338. package/dist/esm/Theme/tokens/brands/slate/palette.light.js +6 -5
  339. package/dist/esm/Theme/tokens/brands/storefront/palette.light.js +5 -4
  340. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -2
  341. package/dist/esm/Theme/tokens/builders/accentText.js +8 -27
  342. package/dist/esm/Theme/tokens/builders/brandInk.js +103 -0
  343. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +17 -9
  344. package/dist/esm/Theme/tokens/builders/mutedText.js +5 -0
  345. package/dist/esm/Theme/tokens/builders/outlineRung.js +21 -19
  346. package/dist/esm/Theme/tokens/builders/resolvedRungs.js +20 -0
  347. package/dist/esm/Theme/tokens/builders/semanticText.js +17 -0
  348. package/dist/esm/Theme/tokens/builders/sidebarAccent.js +23 -0
  349. package/dist/esm/Theme/tokens/builders/statusTone.js +3 -4
  350. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +33 -0
  351. package/dist/esm/Theme/useCustomTheme.js +4 -1
  352. package/dist/esm/Utils/table.js +28 -36
  353. package/dist/esm/index.js +1 -0
  354. package/dist/index.d.ts +1 -0
  355. package/dist/index.js +9 -2
  356. package/package.json +1 -1
@@ -6,18 +6,17 @@ import Accordion from "../Accordion/Accordion.js";
6
6
  import CheckBox from "../Checkbox/Checkbox.js";
7
7
  import ToolTip from "../ToolTip/ToolTip.js";
8
8
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
9
- import { DEFAULT_CANVAS, accentTextOnCanvas, isDarkCanvas, onFilled } from "../../Theme/tokens/builders/accentText.js";
9
+ import { accentTextOnCanvas, isDarkCanvas, onFilled } from "../../Theme/tokens/builders/accentText.js";
10
10
  import { getFilterHoverBg } from "./filterHoverStyle.js";
11
11
  const FilterSidebar = ({ sidebarOptions, selected, onChange, maxVisible = 10, width = 280, variant = "minimal", containerPadding, containerHeight,
12
12
  // headerPadding = 2,
13
13
  panelPadding = 3, clearAllButton = true, onClearAllHandler,
14
14
  // sliderMode = "native",
15
15
  }) => {
16
- var _a, _b;
17
16
  const theme = useCustomTheme();
18
17
  // `gray[50]` (this file's hover fill throughout) is a pale light-mode tint that collapses to
19
18
  // ~1.08:1 against the dark-mode canvas — see `filterHoverStyle.ts` for the fix + numbers.
20
- const isDark = isDarkCanvas((_b = (_a = theme.colors.backgroundColor) === null || _a === void 0 ? void 0 : _a.main) !== null && _b !== void 0 ? _b : DEFAULT_CANVAS);
19
+ const isDark = isDarkCanvas(theme.colors.backgroundColor.main);
21
20
  const hoverBg = useMemo(() => getFilterHoverBg(theme.colors, isDark), [theme.colors, isDark]);
22
21
  const [openPrice, setOpenPrice] = useState({});
23
22
  // Determine if the component is controlled (prop provided) or uncontrolled (internal state)
@@ -79,34 +78,32 @@ panelPadding = 3, clearAllButton = true, onClearAllHandler,
79
78
  return next;
80
79
  });
81
80
  };
82
- const items = sidebarOptions.map((section) => {
83
- var _a, _b;
84
- return ({
85
- header: (_jsxs(Flex, { justify: "space-between", align: "center", w: "full", py: 1, children: [_jsx(ToolTip, { label: section.label, hasArrow: true, placement: "top", fontSize: "0.75rem", children: _jsx(Text, { fontWeight: "bold", fontSize: "md", color: theme.colors.gray[700], textAlign: "left", isTruncated: true, flex: "1", minW: 0, children: section.label }) }), (() => {
86
- const sel = internalSelected[section.id];
87
- const hasValue = Array.isArray(sel) ? sel.length > 0 : !!sel;
88
- return hasValue;
89
- })() ? (_jsx(Badge, { colorScheme: "red", variant: "solid", fontSize: "xs", cursor: "pointer", onClick: (e) => {
90
- e.stopPropagation();
91
- clearFilter(section.id);
92
- }, borderRadius: "full", px: 2, children: "Clear" })) : _jsx(ChevronDownIcon, { size: 10 })] })),
93
- content: (_jsx(VStack, { align: "start", spacing: 1, py: 0, children: section.range ? ((() => {
94
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
95
- const range = section.range;
96
- const step = range.step || 1;
97
- const rangeVal = internalSelected[section.id];
98
- const rangeArr = Array.isArray(rangeVal) ? rangeVal : [];
99
- const currentMin = (_a = rangeArr[0]) !== null && _a !== void 0 ? _a : range.min;
100
- const currentMax = (_b = rangeArr[1]) !== null && _b !== void 0 ? _b : range.max;
101
- const values = range.values || Array.from({ length: Math.floor((range.max - range.min) / (step || 1)) + 1 }, (_, i) => range.min + i * (step || 1));
102
- // Calculate percentages
103
- const minPercent = ((currentMin - range.min) / (range.max - range.min)) * 100;
104
- const maxPercent = ((currentMax - range.min) / (range.max - range.min)) * 100;
105
- const primaryColor = (_d = (_c = theme.colors) === null || _c === void 0 ? void 0 : _c.red) === null || _d === void 0 ? void 0 : _d[300];
106
- const secondaryColor = (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.red) === null || _f === void 0 ? void 0 : _f[600];
107
- const primaryGlowColor = (_o = (_k = (_j = (_h = (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.primary) === null || _h === void 0 ? void 0 : _h.opacity) === null || _j === void 0 ? void 0 : _j[32]) !== null && _k !== void 0 ? _k : (_m = (_l = theme.colors) === null || _l === void 0 ? void 0 : _l.primary) === null || _m === void 0 ? void 0 : _m[500]) !== null && _o !== void 0 ? _o : theme.colors.gray[500];
108
- const thumbShadow = theme.shadows.md;
109
- return (_jsxs(Box, { w: "full", px: 3, children: [_jsx("style", { children: `
81
+ const items = sidebarOptions.map((section) => ({
82
+ header: (_jsxs(Flex, { justify: "space-between", align: "center", w: "full", py: 1, children: [_jsx(ToolTip, { label: section.label, hasArrow: true, placement: "top", fontSize: "0.75rem", children: _jsx(Text, { fontWeight: "bold", fontSize: "md", color: theme.colors.text[500], textAlign: "left", isTruncated: true, flex: "1", minW: 0, children: section.label }) }), (() => {
83
+ const sel = internalSelected[section.id];
84
+ const hasValue = Array.isArray(sel) ? sel.length > 0 : !!sel;
85
+ return hasValue;
86
+ })() ? (_jsx(Badge, { colorScheme: "red", variant: "solid", fontSize: "xs", cursor: "pointer", onClick: (e) => {
87
+ e.stopPropagation();
88
+ clearFilter(section.id);
89
+ }, borderRadius: "full", px: 2, children: "Clear" })) : _jsx(ChevronDownIcon, { size: 10 })] })),
90
+ content: (_jsx(VStack, { align: "start", spacing: 1, py: 0, children: section.range ? ((() => {
91
+ var _a, _b;
92
+ const range = section.range;
93
+ const step = range.step || 1;
94
+ const rangeVal = internalSelected[section.id];
95
+ const rangeArr = Array.isArray(rangeVal) ? rangeVal : [];
96
+ const currentMin = (_a = rangeArr[0]) !== null && _a !== void 0 ? _a : range.min;
97
+ const currentMax = (_b = rangeArr[1]) !== null && _b !== void 0 ? _b : range.max;
98
+ const values = range.values || Array.from({ length: Math.floor((range.max - range.min) / (step || 1)) + 1 }, (_, i) => range.min + i * (step || 1));
99
+ // Calculate percentages
100
+ const minPercent = ((currentMin - range.min) / (range.max - range.min)) * 100;
101
+ const maxPercent = ((currentMax - range.min) / (range.max - range.min)) * 100;
102
+ const primaryColor = theme.colors.red[300];
103
+ const secondaryColor = theme.colors.red[600];
104
+ const primaryGlowColor = theme.colors.primary.opacity[32];
105
+ const thumbShadow = theme.shadows.md;
106
+ return (_jsxs(Box, { w: "full", px: 3, children: [_jsx("style", { children: `
110
107
  .custom-range-slider::-webkit-slider-thumb {
111
108
  pointer-events: auto;
112
109
  width: 24px;
@@ -121,138 +118,137 @@ panelPadding = 3, clearAllButton = true, onClearAllHandler,
121
118
  border: none;
122
119
  cursor: pointer;
123
120
  }
124
- ` }), _jsxs(Box, { w: "full", position: "relative", h: { base: "24px", md: "30px" }, display: "flex", alignItems: "center", children: [_jsx(Box, { position: "absolute", left: "0", right: "0", height: "6px", bg: theme.colors.gray[200], borderRadius: "full" }), _jsx(Box, { position: "absolute", left: `${minPercent}%`, width: `${maxPercent - minPercent}%`, height: "6px", style: { background: `linear-gradient(to right, ${primaryColor}, ${secondaryColor})` }, borderRadius: "full", boxShadow: `0 0 8px ${primaryGlowColor}` }), _jsx(Box, { position: "absolute", left: `${minPercent}%`, transform: "translate(-50%, 0)", w: { base: "16px", md: "20px" }, h: { base: "16px", md: "20px" }, borderRadius: "full", bg: theme.colors.background[50], border: "3px solid", borderColor: primaryColor, boxShadow: thumbShadow, zIndex: 2 }), _jsx(Box, { position: "absolute", left: `${maxPercent}%`, transform: "translate(-50%, 0)", w: { base: "16px", md: "20px" }, h: { base: "16px", md: "20px" }, borderRadius: "full", bg: theme.colors.background[50], border: "3px solid", borderColor: secondaryColor, boxShadow: thumbShadow, zIndex: 2 }), _jsxs(Box, { position: "absolute", left: `${minPercent}%`, top: { base: "-18px", md: "-22px" }, transform: "translate(-50%, -100%)", px: 2, py: 1, bg: theme.colors.background[50], border: `1px solid ${theme.colors.gray[200]}`, borderRadius: "md", fontSize: "10px", color: theme.colors.gray[700], boxShadow: "sm", zIndex: 3, children: [currentMin, range.unit ? ` ${range.unit}` : ""] }), _jsxs(Box, { position: "absolute", left: `${maxPercent}%`, top: { base: "-18px", md: "-22px" }, transform: "translate(-50%, -100%)", px: 2, py: 1, bg: theme.colors.background[50], border: `1px solid ${theme.colors.gray[200]}`, borderRadius: "md", fontSize: "10px", color: theme.colors.gray[700], boxShadow: "sm", zIndex: 3, children: [currentMax, range.unit ? ` ${range.unit}` : ""] }), [0, 25, 50, 75, 100].map((p) => (_jsx(Box, { position: "absolute", left: `${p}%`, bottom: "-8px", transform: "translateX(-50%)", w: "1px", h: "8px", bg: theme.colors.gray[300] }, `tick-${p}`))), _jsx("input", { type: "range", min: range.min, max: range.max, step: step, value: currentMin, className: "custom-range-slider", onChange: (e) => {
125
- const min = Math.min(Number(e.target.value), currentMax - (step || 1));
126
- const nextVal = [min, currentMax];
127
- setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
128
- }, style: {
129
- position: 'absolute',
130
- width: '100%',
131
- height: '100%',
132
- opacity: 0,
133
- appearance: 'none',
134
- pointerEvents: 'none', // Allow clicks to pass through track
135
- zIndex: 3,
136
- margin: 0,
137
- } }), _jsx("input", { type: "range", min: range.min, max: range.max, step: step, value: currentMax, className: "custom-range-slider", onChange: (e) => {
138
- const max = Math.max(Number(e.target.value), currentMin + (step || 1));
139
- const nextVal = [currentMin, max];
140
- setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
141
- }, style: {
142
- position: 'absolute',
143
- width: '100%',
144
- height: '100%',
145
- opacity: 0,
146
- appearance: 'none',
147
- pointerEvents: 'none', // Allow clicks to pass through track
148
- zIndex: 3,
149
- margin: 0,
150
- } })] }), _jsxs(SimpleGrid, { columns: 2, spacing: 2, pt: 2, w: "full", children: [_jsxs(Popover, { isOpen: openPrice.id === section.id && openPrice.target === "min", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.gray[50], borderColor: theme.colors.gray[300], cursor: "pointer", onClick: () => setOpenPrice({ id: section.id, target: "min" }), gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "12px", color: theme.colors.gray[800], whiteSpace: "nowrap", children: [currentMin, range.unit ? ` ${range.unit}` : ""] }) }) }) }), _jsx(Portal, { children: _jsx(PopoverContent, { width: "6rem", p: 0, zIndex: 1600, bg: theme.colors.background[50], children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMin === v ? theme.colors.red[50] : theme.colors.background[50], borderLeftWidth: currentMin === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMin === v ? theme.colors.red[400] : "transparent", _hover: { bg: hoverBg }, onClick: () => {
151
- const min = v;
152
- const max = currentMax;
153
- const nextVal = [Math.min(min, max), Math.max(min, max)];
154
- setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
155
- setOpenPrice({});
156
- }, children: [_jsxs(Text, { fontSize: "sm", color: theme.colors.gray[800], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMin === v ? (_jsx(Box, { bg: theme.colors.red[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: _jsx(Check, { size: 9, color: onFilled(theme.colors.red[100], theme.colors.white, theme.colors.black) }) })) : null] }, `min-${v}`))) }) }) }) })] }), _jsxs(Popover, { isOpen: openPrice.id === section.id && openPrice.target === "max", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.gray[50], borderColor: theme.colors.gray[300], cursor: "pointer", onClick: () => setOpenPrice({ id: section.id, target: "max" }), gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "12px", color: theme.colors.gray[800], whiteSpace: "nowrap", children: [currentMax, range.unit ? ` ${range.unit}` : ""] }) }) }) }), _jsx(PopoverContent, { width: "6rem", p: 0, bg: theme.colors.background[50], children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMax === v ? theme.colors.red[50] : theme.colors.background[50], borderLeftWidth: currentMax === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMax === v ? theme.colors.red[400] : "transparent", _hover: { bg: hoverBg }, onClick: () => {
157
- const max = v;
158
- const min = currentMin;
121
+ ` }), _jsxs(Box, { w: "full", position: "relative", h: { base: "24px", md: "30px" }, display: "flex", alignItems: "center", children: [_jsx(Box, { position: "absolute", left: "0", right: "0", height: "6px", bg: theme.colors.gray[200], borderRadius: "full" }), _jsx(Box, { position: "absolute", left: `${minPercent}%`, width: `${maxPercent - minPercent}%`, height: "6px", style: { background: `linear-gradient(to right, ${primaryColor}, ${secondaryColor})` }, borderRadius: "full", boxShadow: `0 0 8px ${primaryGlowColor}` }), _jsx(Box, { position: "absolute", left: `${minPercent}%`, transform: "translate(-50%, 0)", w: { base: "16px", md: "20px" }, h: { base: "16px", md: "20px" }, borderRadius: "full", bg: theme.colors.background[50], border: "3px solid", borderColor: primaryColor, boxShadow: thumbShadow, zIndex: 2 }), _jsx(Box, { position: "absolute", left: `${maxPercent}%`, transform: "translate(-50%, 0)", w: { base: "16px", md: "20px" }, h: { base: "16px", md: "20px" }, borderRadius: "full", bg: theme.colors.background[50], border: "3px solid", borderColor: secondaryColor, boxShadow: thumbShadow, zIndex: 2 }), _jsxs(Box, { position: "absolute", left: `${minPercent}%`, top: { base: "-18px", md: "-22px" }, transform: "translate(-50%, -100%)", px: 2, py: 1, bg: theme.colors.background[50], border: `1px solid ${theme.colors.gray[200]}`, borderRadius: "md", fontSize: "10px", color: theme.colors.text[500], boxShadow: "sm", zIndex: 3, children: [currentMin, range.unit ? ` ${range.unit}` : ""] }), _jsxs(Box, { position: "absolute", left: `${maxPercent}%`, top: { base: "-18px", md: "-22px" }, transform: "translate(-50%, -100%)", px: 2, py: 1, bg: theme.colors.background[50], border: `1px solid ${theme.colors.gray[200]}`, borderRadius: "md", fontSize: "10px", color: theme.colors.text[500], boxShadow: "sm", zIndex: 3, children: [currentMax, range.unit ? ` ${range.unit}` : ""] }), [0, 25, 50, 75, 100].map((p) => (_jsx(Box, { position: "absolute", left: `${p}%`, bottom: "-8px", transform: "translateX(-50%)", w: "1px", h: "8px", bg: theme.colors.gray[300] }, `tick-${p}`))), _jsx("input", { type: "range", min: range.min, max: range.max, step: step, value: currentMin, className: "custom-range-slider", onChange: (e) => {
122
+ const min = Math.min(Number(e.target.value), currentMax - (step || 1));
123
+ const nextVal = [min, currentMax];
124
+ setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
125
+ }, style: {
126
+ position: 'absolute',
127
+ width: '100%',
128
+ height: '100%',
129
+ opacity: 0,
130
+ appearance: 'none',
131
+ pointerEvents: 'none', // Allow clicks to pass through track
132
+ zIndex: 3,
133
+ margin: 0,
134
+ } }), _jsx("input", { type: "range", min: range.min, max: range.max, step: step, value: currentMax, className: "custom-range-slider", onChange: (e) => {
135
+ const max = Math.max(Number(e.target.value), currentMin + (step || 1));
136
+ const nextVal = [currentMin, max];
137
+ setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
138
+ }, style: {
139
+ position: 'absolute',
140
+ width: '100%',
141
+ height: '100%',
142
+ opacity: 0,
143
+ appearance: 'none',
144
+ pointerEvents: 'none', // Allow clicks to pass through track
145
+ zIndex: 3,
146
+ margin: 0,
147
+ } })] }), _jsxs(SimpleGrid, { columns: 2, spacing: 2, pt: 2, w: "full", children: [_jsxs(Popover, { isOpen: openPrice.id === section.id && openPrice.target === "min", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.gray[50], borderColor: theme.colors.gray[300], cursor: "pointer", onClick: () => setOpenPrice({ id: section.id, target: "min" }), gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "12px", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMin, range.unit ? ` ${range.unit}` : ""] }) }) }) }), _jsx(Portal, { children: _jsx(PopoverContent, { width: "6rem", p: 0, zIndex: 1600, bg: theme.colors.background[50], children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMin === v ? theme.colors.red[50] : theme.colors.background[50], borderLeftWidth: currentMin === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMin === v ? theme.colors.red[400] : "transparent", _hover: { bg: hoverBg }, onClick: () => {
148
+ const min = v;
149
+ const max = currentMax;
159
150
  const nextVal = [Math.min(min, max), Math.max(min, max)];
160
151
  setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
161
152
  setOpenPrice({});
162
- }, children: [_jsxs(Text, { fontSize: "sm", color: theme.colors.gray[800], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMax === v ? (_jsx(Box, { bg: theme.colors.red[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: _jsx(Check, { size: 9, color: onFilled(theme.colors.red[100], theme.colors.white, theme.colors.black) }) })) : null] }, `max-${v}`))) }) }) })] })] })] }));
163
- })()) : (_jsxs(_Fragment, { children: [section.id === "rating" ? (_jsx(VStack, { align: "start", spacing: 1, w: "full", children: [4, 3, 2, 1].map((r) => (_jsx(Flex, { align: "center", justify: "space-between", w: "full", p: 1, borderRadius: "md", cursor: "pointer", bg: String(internalSelected[section.id] || "") === String(r) ? theme.colors.red[50] : "transparent", border: String(internalSelected[section.id] || "") === String(r) ? `1px solid ${theme.colors.red[200]}` : "none", _hover: { bg: hoverBg }, onClick: () => {
164
- setInternalSelected((prev) => {
165
- const next = { ...prev, [section.id]: String(r) };
166
- onChange === null || onChange === void 0 ? void 0 : onChange(next);
167
- return next;
168
- });
169
- }, children: _jsxs(HStack, { spacing: 2, align: "center", children: [_jsx(HStack, { spacing: 1, children: (() => {
170
- // orange[500] on background[50] ~2.2:1, fails the 3:1 icon bar — walk the scale like
171
- // Notification's clock icon. Canvas mirrors this row's own bg ternary (red[50] when selected).
172
- const isRowSelected = String(internalSelected[section.id] || "") === String(r);
173
- const starColor = accentTextOnCanvas(theme.colors.orange, isRowSelected ? theme.colors.red[50] : theme.colors.background[50]);
174
- return Array.from({ length: 5 }, (_, i) => (_jsx(Box, { children: _jsx(Star, { size: 16, color: starColor, fill: i < r ? starColor : "none" }) }, `star-${r}-${i}`)));
175
- })() }), _jsx(Text, { fontSize: "sm", color: theme.colors.gray[700], children: "& Up" })] }) }, `rating-${r}`))) })) : null, section.searchable && (_jsx(Input, { size: "xs", h: "26px", fontSize: "xs", placeholder: `Search ${section.label}...`, borderRadius: "md", bg: theme.colors.gray[50], border: "1px solid",
176
- // boxborder[800], not raw gray[200]: WCAG 1.4.11 needs >=3.0 for a control
177
- // boundary against any named surface up to `muted` (lightest); gray[200] fails
178
- // there in dark mode.
179
- borderColor: (_b = (_a = theme.colors.boxborder) === null || _a === void 0 ? void 0 : _a[800]) !== null && _b !== void 0 ? _b : theme.colors.gray[200], _focus: { borderColor: theme.colors.red[400], boxShadow: "none" }, value: searchTerms[section.id] || "", onChange: (e) => {
180
- const v = e.target.value;
181
- setSearchTerms((prev) => ({ ...prev, [section.id]: v }));
182
- if (v)
183
- setExpanded((prev) => ({ ...prev, [section.id]: true }));
184
- } })), section.id !== "rating" && (() => {
185
- const filteredOptions = (expanded[section.id] ? (section.options || []) : (section.options || []).slice(0, maxVisible))
186
- .filter((opt) => !section.searchable || !(searchTerms[section.id]) || opt.label.toLowerCase().includes((searchTerms[section.id] || "").toLowerCase()));
187
- if (filteredOptions.length === 0 && searchTerms[section.id]) {
188
- return (_jsx(Box, { p: 2, w: "full", textAlign: "center", children: _jsx(Text, { fontSize: "xs", color: theme.colors.gray[500], children: "No Data Found" }) }));
189
- }
190
- return ((section.type === "radio") || section.radio) ? (_jsx(RadioGroup, { w: "full", value: internalSelected[section.id] || "", onChange: (val) => {
191
- setInternalSelected((prev) => {
192
- const next = { ...prev, [section.id]: val };
193
- onChange === null || onChange === void 0 ? void 0 : onChange(next);
194
- return next;
195
- });
196
- }, children: _jsx(VStack, { align: "start", spacing: 1, w: "full", children: filteredOptions.map((opt) => (_jsx(Radio, { value: opt.id, size: "sm", colorScheme: "red", children: _jsx(Text, { fontSize: "xs", color: theme.colors.gray[700], children: opt.label }) }, opt.id))) }) })) : (filteredOptions.map((opt) => {
197
- const selectedForSection = internalSelected[section.id];
198
- const selectedIds = Array.isArray(selectedForSection)
199
- ? selectedForSection
200
- : [];
201
- return (_jsxs(Flex, { align: "center", justify: "space-between", w: "full", _hover: { bg: hoverBg, borderRadius: "md" }, p: 0, children: [_jsxs(Flex, { align: "center", gap: 1, children: [_jsx(CheckBox, { isChecked: selectedIds.includes(opt.id), onChange: (e) => {
202
- toggleOption(section.id, opt.id, e.target.checked);
203
- }, size: "sm", iconSize: "0.5rem", sx: {
204
- '.chakra-checkbox__control': {
205
- width: '12px',
206
- height: '12px',
207
- },
208
- marginLeft: "2px",
209
- }, color: "red" }), _jsx(Text, { fontSize: "xs", color: theme.colors.gray[700], cursor: "pointer", onClick: () => {
210
- const isChecked = selectedIds.includes(opt.id);
211
- toggleOption(section.id, opt.id, !isChecked);
212
- }, children: opt.label })] }), typeof opt.count === "number" && (_jsx(Badge, { fontSize: "xs", colorScheme: "gray", borderRadius: "full", px: 2, children: opt.count }))] }, opt.id));
213
- }));
214
- })(), (section.options && section.options.length > maxVisible) && (_jsx(Text, { fontSize: "sm", fontWeight: "medium", color: theme.colors.blue[600], cursor: "pointer", _hover: { textDecoration: "underline" }, onClick: () => setExpanded((prev) => ({ ...prev, [section.id]: !prev[section.id] })), children: expanded[section.id] ? "Show less" : `+ ${(section.options.length - maxVisible)} more` }))] })) })),
215
- itemProps: {
216
- borderTop: "none",
217
- borderBottom: `1px solid ${theme.colors.gray[100]}`,
218
- _last: { borderBottom: "none" }
219
- },
220
- buttonProps: {
221
- _hover: { bg: hoverBg }
222
- },
223
- panelProps: {},
224
- customStyles: {
225
- buttonStyle: variant === "minimal"
226
- ? {
227
- justifyContent: "space-between",
228
- padding: 0,
229
- background: "transparent",
230
- }
231
- : {
232
- justifyContent: "space-between",
233
- padding: 0,
234
- background: theme.colors.gray[50],
235
- borderRadius: theme.radii.lg,
236
- border: `1px solid ${theme.colors.gray[200]}`,
237
- marginBottom: 6,
238
- },
239
- // Reasserts the same hover fill via the `sx` path (belt-and-suspenders alongside
240
- // `buttonProps._hover` above) so the header hover doesn't depend on a single merge path.
241
- hoverbuttonStyle: { background: hoverBg },
242
- panelStyle: variant === "minimal"
243
- ? {
244
- padding: "10px 0 12px 0",
245
- overflow: "visible",
246
- }
247
- : {
248
- padding: panelPadding,
249
- background: theme.colors.background[50],
250
- borderRadius: theme.radii.lg,
251
- overflow: "visible",
252
- },
253
- },
254
- });
255
- });
256
- return (_jsxs(Box, { w: width, bg: variant === "minimal" ? theme.colors.background[50] : theme.colors.gray[50], p: containerPadding !== undefined ? containerPadding : (variant === "minimal" ? 3 : 2), borderRadius: variant === "minimal" ? "lg" : "none", boxShadow: variant === "minimal" ? "sm" : "none", border: variant === "minimal" ? `1px solid ${theme.colors.gray[200]}` : "none", h: "fit-content", maxH: containerHeight !== undefined ? containerHeight : undefined, overflowY: containerHeight !== undefined ? "auto" : "visible", children: [_jsxs(Flex, { className: "filters-header", align: "center", justify: "space-between", mb: 2, borderBottom: "2px solid", borderColor: theme.colors.gray[100], children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", color: theme.colors.gray[800], children: "Filters" }), activeCount > 0 && clearAllButton && (_jsx(_Fragment, { children: _jsx(Button, { size: "xs", variant: "outline", leftIcon: _jsx(X, { size: 12 }), onClick: clearAll, "aria-label": "Clear All", className: "clear-all-btn", colorScheme: "red", children: "Clear All" }) }))] }), _jsx(Accordion, { allowMultiple: true, defaultIndex: sidebarOptions.map((_, i) => i), items: items })] }));
153
+ }, children: [_jsxs(Text, { fontSize: "sm", color: theme.colors.gray[800], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMin === v ? (_jsx(Box, { bg: theme.colors.red[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: _jsx(Check, { size: 9, color: onFilled(theme.colors.red[100], theme.colors.white, theme.colors.black) }) })) : null] }, `min-${v}`))) }) }) }) })] }), _jsxs(Popover, { isOpen: openPrice.id === section.id && openPrice.target === "max", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.gray[50], borderColor: theme.colors.gray[300], cursor: "pointer", onClick: () => setOpenPrice({ id: section.id, target: "max" }), gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "12px", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMax, range.unit ? ` ${range.unit}` : ""] }) }) }) }), _jsx(PopoverContent, { width: "6rem", p: 0, bg: theme.colors.background[50], children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMax === v ? theme.colors.red[50] : theme.colors.background[50], borderLeftWidth: currentMax === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMax === v ? theme.colors.red[400] : "transparent", _hover: { bg: hoverBg }, onClick: () => {
154
+ const max = v;
155
+ const min = currentMin;
156
+ const nextVal = [Math.min(min, max), Math.max(min, max)];
157
+ setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
158
+ setOpenPrice({});
159
+ }, children: [_jsxs(Text, { fontSize: "sm", color: theme.colors.gray[800], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMax === v ? (_jsx(Box, { bg: theme.colors.red[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: _jsx(Check, { size: 9, color: onFilled(theme.colors.red[100], theme.colors.white, theme.colors.black) }) })) : null] }, `max-${v}`))) }) }) })] })] })] }));
160
+ })()) : (_jsxs(_Fragment, { children: [section.id === "rating" ? (_jsx(VStack, { align: "start", spacing: 1, w: "full", children: [4, 3, 2, 1].map((r) => (_jsx(Flex, { align: "center", justify: "space-between", w: "full", p: 1, borderRadius: "md", cursor: "pointer", bg: String(internalSelected[section.id] || "") === String(r) ? theme.colors.red[50] : "transparent", border: String(internalSelected[section.id] || "") === String(r) ? `1px solid ${theme.colors.red[200]}` : "none", _hover: { bg: hoverBg }, onClick: () => {
161
+ setInternalSelected((prev) => {
162
+ const next = { ...prev, [section.id]: String(r) };
163
+ onChange === null || onChange === void 0 ? void 0 : onChange(next);
164
+ return next;
165
+ });
166
+ }, children: _jsxs(HStack, { spacing: 2, align: "center", children: [_jsx(HStack, { spacing: 1, children: (() => {
167
+ // orange[500] on background[50] ~2.2:1, fails the 3:1 icon bar walk the scale like
168
+ // Notification's clock icon. Canvas mirrors this row's own bg ternary (red[50] when selected).
169
+ const isRowSelected = String(internalSelected[section.id] || "") === String(r);
170
+ const starColor = accentTextOnCanvas(theme.colors.orange, isRowSelected ? theme.colors.red[50] : theme.colors.background[50]);
171
+ return Array.from({ length: 5 }, (_, i) => (_jsx(Box, { children: _jsx(Star, { size: 16, color: starColor, fill: i < r ? starColor : "none" }) }, `star-${r}-${i}`)));
172
+ })() }), _jsx(Text, { fontSize: "sm", color: theme.colors.text[500], children: "& Up" })] }) }, `rating-${r}`))) })) : null, section.searchable && (_jsx(Input, { size: "xs", h: "26px", fontSize: "xs", placeholder: `Search ${section.label}...`, borderRadius: "md", bg: theme.colors.gray[50], border: "1px solid",
173
+ // boxborder[800], not raw gray[200]: WCAG 1.4.11 needs >=3.0 for a control
174
+ // boundary against any named surface up to `muted` (lightest); gray[200] fails
175
+ // there in dark mode.
176
+ borderColor: theme.colors.boxborder[800], _focus: { borderColor: theme.colors.red[400], boxShadow: "none" }, value: searchTerms[section.id] || "", onChange: (e) => {
177
+ const v = e.target.value;
178
+ setSearchTerms((prev) => ({ ...prev, [section.id]: v }));
179
+ if (v)
180
+ setExpanded((prev) => ({ ...prev, [section.id]: true }));
181
+ } })), section.id !== "rating" && (() => {
182
+ const filteredOptions = (expanded[section.id] ? (section.options || []) : (section.options || []).slice(0, maxVisible))
183
+ .filter((opt) => !section.searchable || !(searchTerms[section.id]) || opt.label.toLowerCase().includes((searchTerms[section.id] || "").toLowerCase()));
184
+ if (filteredOptions.length === 0 && searchTerms[section.id]) {
185
+ return (_jsx(Box, { p: 2, w: "full", textAlign: "center", children: _jsx(Text, { fontSize: "xs", color: theme.colors.gray[500], children: "No Data Found" }) }));
186
+ }
187
+ return ((section.type === "radio") || section.radio) ? (_jsx(RadioGroup, { w: "full", value: internalSelected[section.id] || "", onChange: (val) => {
188
+ setInternalSelected((prev) => {
189
+ const next = { ...prev, [section.id]: val };
190
+ onChange === null || onChange === void 0 ? void 0 : onChange(next);
191
+ return next;
192
+ });
193
+ }, children: _jsx(VStack, { align: "start", spacing: 1, w: "full", children: filteredOptions.map((opt) => (_jsx(Radio, { value: opt.id, size: "sm", colorScheme: "red", children: _jsx(Text, { fontSize: "xs", color: theme.colors.text[500], children: opt.label }) }, opt.id))) }) })) : (filteredOptions.map((opt) => {
194
+ const selectedForSection = internalSelected[section.id];
195
+ const selectedIds = Array.isArray(selectedForSection)
196
+ ? selectedForSection
197
+ : [];
198
+ return (_jsxs(Flex, { align: "center", justify: "space-between", w: "full", _hover: { bg: hoverBg, borderRadius: "md" }, p: 0, children: [_jsxs(Flex, { align: "center", gap: 1, children: [_jsx(CheckBox, { isChecked: selectedIds.includes(opt.id), onChange: (e) => {
199
+ toggleOption(section.id, opt.id, e.target.checked);
200
+ }, size: "sm", iconSize: "0.5rem", sx: {
201
+ '.chakra-checkbox__control': {
202
+ width: '12px',
203
+ height: '12px',
204
+ },
205
+ marginLeft: "2px",
206
+ }, color: "red" }), _jsx(Text, { fontSize: "xs", color: theme.colors.text[500], cursor: "pointer", onClick: () => {
207
+ const isChecked = selectedIds.includes(opt.id);
208
+ toggleOption(section.id, opt.id, !isChecked);
209
+ }, children: opt.label })] }), typeof opt.count === "number" && (_jsx(Badge, { fontSize: "xs", colorScheme: "gray", borderRadius: "full", px: 2, children: opt.count }))] }, opt.id));
210
+ }));
211
+ })(), (section.options && section.options.length > maxVisible) && (_jsx(Text, { fontSize: "sm", fontWeight: "medium", color: theme.colors.blue[600], cursor: "pointer", _hover: { textDecoration: "underline" }, onClick: () => setExpanded((prev) => ({ ...prev, [section.id]: !prev[section.id] })), children: expanded[section.id] ? "Show less" : `+ ${(section.options.length - maxVisible)} more` }))] })) })),
212
+ itemProps: {
213
+ borderTop: "none",
214
+ borderBottom: `1px solid ${theme.colors.gray[100]}`,
215
+ _last: { borderBottom: "none" }
216
+ },
217
+ buttonProps: {
218
+ _hover: { bg: hoverBg }
219
+ },
220
+ panelProps: {},
221
+ customStyles: {
222
+ buttonStyle: variant === "minimal"
223
+ ? {
224
+ justifyContent: "space-between",
225
+ padding: 0,
226
+ background: "transparent",
227
+ }
228
+ : {
229
+ justifyContent: "space-between",
230
+ padding: 0,
231
+ background: theme.colors.gray[50],
232
+ borderRadius: theme.radii.lg,
233
+ border: `1px solid ${theme.colors.gray[200]}`,
234
+ marginBottom: 6,
235
+ },
236
+ // Reasserts the same hover fill via the `sx` path (belt-and-suspenders alongside
237
+ // `buttonProps._hover` above) so the header hover doesn't depend on a single merge path.
238
+ hoverbuttonStyle: { background: hoverBg },
239
+ panelStyle: variant === "minimal"
240
+ ? {
241
+ padding: "10px 0 12px 0",
242
+ overflow: "visible",
243
+ }
244
+ : {
245
+ padding: panelPadding,
246
+ background: theme.colors.background[50],
247
+ borderRadius: theme.radii.lg,
248
+ overflow: "visible",
249
+ },
250
+ },
251
+ }));
252
+ return (_jsxs(Box, { w: width, bg: variant === "minimal" ? theme.colors.background[50] : theme.colors.gray[50], p: containerPadding !== undefined ? containerPadding : (variant === "minimal" ? 3 : 2), borderRadius: variant === "minimal" ? "lg" : "none", boxShadow: variant === "minimal" ? "sm" : "none", border: variant === "minimal" ? `1px solid ${theme.colors.gray[200]}` : "none", h: "fit-content", maxH: containerHeight !== undefined ? containerHeight : undefined, overflowY: containerHeight !== undefined ? "auto" : "visible", children: [_jsxs(Flex, { className: "filters-header", align: "center", justify: "space-between", mb: 2, borderBottom: "2px solid", borderColor: theme.colors.gray[100], children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", color: theme.colors.text[500], children: "Filters" }), activeCount > 0 && clearAllButton && (_jsx(_Fragment, { children: _jsx(Button, { size: "xs", variant: "outline", leftIcon: _jsx(X, { size: 12 }), onClick: clearAll, "aria-label": "Clear All", className: "clear-all-btn", colorScheme: "red", children: "Clear All" }) }))] }), _jsx(Accordion, { allowMultiple: true, defaultIndex: sidebarOptions.map((_, i) => i), items: items })] }));
257
253
  };
258
254
  export default FilterSidebar;
@@ -2,8 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Icon } from "@chakra-ui/react";
3
3
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
4
  const FormWrapper = ({ icon, text, children, }) => {
5
- var _a, _b, _c, _d, _e;
6
5
  const { colors } = useCustomTheme();
7
- return (_jsxs(Box, { children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, mb: 2, children: [icon && _jsx(Icon, { as: icon, size: "1rem", color: (_a = colors === null || colors === void 0 ? void 0 : colors.header) === null || _a === void 0 ? void 0 : _a[500] }), text && (_jsx(Box, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 12, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", color: (_b = colors === null || colors === void 0 ? void 0 : colors.header) === null || _b === void 0 ? void 0 : _b[500], children: text }))] }), _jsx(Box, { borderRadius: "base", bg: (_c = colors === null || colors === void 0 ? void 0 : colors.background) === null || _c === void 0 ? void 0 : _c[50], border: `0.075rem solid ${(_d = colors === null || colors === void 0 ? void 0 : colors.border) === null || _d === void 0 ? void 0 : _d[500]}`, boxShadow: `0 0.063rem 0.125rem 0 ${(_e = colors === null || colors === void 0 ? void 0 : colors.boxShadow) === null || _e === void 0 ? void 0 : _e.primary}`, p: "1.5rem", children: children })] }));
6
+ return (_jsxs(Box, { children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, mb: 2, children: [icon && _jsx(Icon, { as: icon, size: "1rem", color: colors.header[500] }), text && (_jsx(Box, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 12, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", color: colors.header[500], children: text }))] }), _jsx(Box, { borderRadius: "base", bg: colors.background[50], border: `0.075rem solid ${colors.border[500]}`, boxShadow: `0 0.063rem 0.125rem 0 ${colors.boxShadow.primary}`, p: "1.5rem", children: children })] }));
8
7
  };
9
8
  export default FormWrapper;
@@ -33,15 +33,15 @@ export const pickActiveAccent = (primary, canvas) => {
33
33
  return primary[found !== null && found !== void 0 ? found : order[order.length - 1]];
34
34
  };
35
35
  const Header = ({ logo, menuItems, rightSlot, active, colors, boxShadow, onMobileMenuClose }) => {
36
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
36
+ var _a, _b, _c, _d, _e;
37
37
  const { isOpen, onOpen, onClose } = useDisclosure();
38
38
  const [hoveredMenu, setHoveredMenu] = useState(null);
39
39
  const { colors: themeColor } = useCustomTheme();
40
- const bg = (_a = colors === null || colors === void 0 ? void 0 : colors.bg) !== null && _a !== void 0 ? _a : (_c = (_b = themeColor === null || themeColor === void 0 ? void 0 : themeColor.sidebar) === null || _b === void 0 ? void 0 : _b.background) === null || _c === void 0 ? void 0 : _c[500];
41
- const color = (_d = colors === null || colors === void 0 ? void 0 : colors.color) !== null && _d !== void 0 ? _d : themeColor === null || themeColor === void 0 ? void 0 : themeColor.white;
42
- const activeBg = (_e = colors === null || colors === void 0 ? void 0 : colors.active) !== null && _e !== void 0 ? _e : pickActiveAccent(themeColor.primary, bg);
43
- const hoverBg = (_f = colors === null || colors === void 0 ? void 0 : colors.hover) !== null && _f !== void 0 ? _f : (_h = (_g = themeColor === null || themeColor === void 0 ? void 0 : themeColor.sidebar) === null || _g === void 0 ? void 0 : _g.background) === null || _h === void 0 ? void 0 : _h[400];
44
- const hoverText = (_j = colors === null || colors === void 0 ? void 0 : colors.hoverTextColor) !== null && _j !== void 0 ? _j : themeColor === null || themeColor === void 0 ? void 0 : themeColor.white;
40
+ const bg = (_a = colors === null || colors === void 0 ? void 0 : colors.bg) !== null && _a !== void 0 ? _a : themeColor.sidebar.background[500];
41
+ const color = (_b = colors === null || colors === void 0 ? void 0 : colors.color) !== null && _b !== void 0 ? _b : themeColor.white;
42
+ const activeBg = (_c = colors === null || colors === void 0 ? void 0 : colors.active) !== null && _c !== void 0 ? _c : themeColor.sidebar.activeIcon;
43
+ const hoverBg = (_d = colors === null || colors === void 0 ? void 0 : colors.hover) !== null && _d !== void 0 ? _d : themeColor.sidebar.background[400];
44
+ const hoverText = (_e = colors === null || colors === void 0 ? void 0 : colors.hoverTextColor) !== null && _e !== void 0 ? _e : themeColor.white;
45
45
  const isActive = (href) => href && active === href;
46
46
  const closeMobileMenu = () => {
47
47
  onClose();
@@ -3,21 +3,25 @@ import { Box, Text } from "@chakra-ui/react";
3
3
  import React from "react";
4
4
  import { CirclePlus, SquarePen } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
- import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
6
+ import { AA_NORMAL_TEXT } from "../../Theme/tokens/builders/accentText.js";
7
+ import { AA_NON_TEXT, liftToContrast } from "../../Theme/tokens/builders/outlineRung.js";
7
8
  import Select from "../Select/Select.js";
8
9
  import VeritcalDivider from "../Divider/Divider.js";
9
- const HeaderActions = ({ select, edit, create, }) => {
10
- var _a, _b, _c, _d, _e, _f;
10
+ const HeaderActions = ({ select, edit, create, surface, }) => {
11
+ var _a, _b;
11
12
  const { colors } = useCustomTheme();
13
+ const canvas = surface !== null && surface !== void 0 ? surface : colors.backgroundColor.main;
14
+ const ink = liftToContrast(colors.secondary[500], canvas, AA_NORMAL_TEXT);
15
+ const iconInk = liftToContrast(colors.secondary[500], canvas, AA_NON_TEXT);
12
16
  const elements = [];
13
17
  if (select === null || select === void 0 ? void 0 : select.isSelect) {
14
18
  elements.push(_jsx(Box, { width: (_a = select.width) !== null && _a !== void 0 ? _a : "12.5rem", children: _jsx(Select, { options: (_b = select.options) !== null && _b !== void 0 ? _b : [], placeholder: select.selectPlaceholderText, onChange: (option) => { var _a; return (_a = select.onSelectChange) === null || _a === void 0 ? void 0 : _a.call(select, option); }, value: select.value }, "select") }, "select"));
15
19
  }
16
20
  if (edit === null || edit === void 0 ? void 0 : edit.isEditable) {
17
- elements.push(_jsxs(Box, { display: "flex", alignItems: "center", gap: "0.375rem", cursor: "pointer", fontSize: 14, onClick: () => { var _a; return (_a = edit.onEdit) === null || _a === void 0 ? void 0 : _a.call(edit); }, children: [_jsx(SquarePen, { size: 16, color: (_c = colors === null || colors === void 0 ? void 0 : colors.text) === null || _c === void 0 ? void 0 : _c[500] }), _jsx(Text, { color: accentTextOnCanvas(colors === null || colors === void 0 ? void 0 : colors.secondary, (_d = colors === null || colors === void 0 ? void 0 : colors.backgroundColor) === null || _d === void 0 ? void 0 : _d.main), children: edit.label ? edit.label : "Edit Layout" })] }, "edit"));
21
+ elements.push(_jsxs(Box, { display: "flex", alignItems: "center", gap: "0.375rem", cursor: "pointer", fontSize: 14, onClick: () => { var _a; return (_a = edit.onEdit) === null || _a === void 0 ? void 0 : _a.call(edit); }, children: [_jsx(SquarePen, { size: 16, color: iconInk }), _jsx(Text, { color: ink, children: edit.label ? edit.label : "Edit Layout" })] }, "edit"));
18
22
  }
19
23
  if (create === null || create === void 0 ? void 0 : create.isCreatable) {
20
- elements.push(_jsxs(Box, { display: "flex", alignItems: "center", gap: "0.375rem", cursor: "pointer", fontSize: 14, onClick: () => { var _a; return (_a = create.onCreate) === null || _a === void 0 ? void 0 : _a.call(create); }, children: [_jsx(CirclePlus, { size: 16, color: (_e = colors === null || colors === void 0 ? void 0 : colors.text) === null || _e === void 0 ? void 0 : _e[500] }), _jsxs(Text, { color: accentTextOnCanvas(colors === null || colors === void 0 ? void 0 : colors.secondary, (_f = colors === null || colors === void 0 ? void 0 : colors.backgroundColor) === null || _f === void 0 ? void 0 : _f.main), children: [" ", create.label ? create.label : "Create New", " "] })] }, "create"));
24
+ elements.push(_jsxs(Box, { display: "flex", alignItems: "center", gap: "0.375rem", cursor: "pointer", fontSize: 14, onClick: () => { var _a; return (_a = create.onCreate) === null || _a === void 0 ? void 0 : _a.call(create); }, children: [_jsx(CirclePlus, { size: 16, color: iconInk }), _jsxs(Text, { color: ink, children: [" ", create.label ? create.label : "Create New", " "] })] }, "create"));
21
25
  }
22
26
  return (_jsx(Box, { display: "flex", alignItems: "center", gap: "0.625rem", children: elements.map((el, i) => (_jsxs(React.Fragment, { children: [i > 0 && _jsx(VeritcalDivider, {}), el] }, i))) }));
23
27
  };
@@ -2,31 +2,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, HStack, Stack, Button, Badge, Text, VStack, Collapse, } from "@chakra-ui/react";
3
3
  import { ChevronDown } from "lucide-react";
4
4
  import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
5
- import { DEFAULT_BLACK, DEFAULT_WHITE, onFilled } from "../../../Theme/tokens/builders/accentText.js";
5
+ import { onFilled } from "../../../Theme/tokens/builders/accentText.js";
6
6
  const DesktopMenu = ({ menuItems, rightSlot, setHoveredMenu, isActive, activeBg, hoveredMenu, hoverBg, color, hoverTextColor }) => {
7
7
  const { colors } = useCustomTheme();
8
8
  return (_jsx(HStack, { spacing: 6, align: "center", display: { base: "none", md: "flex" }, mx: rightSlot ? "auto" : 0, wrap: "wrap", padding: "0.5rem 1.5rem", children: menuItems.map((item) => {
9
- var _a, _b, _c, _d, _e, _f;
9
+ var _a, _b, _c, _d;
10
10
  const hasChildren = !!item.children;
11
11
  const isHovered = hoveredMenu === item.label;
12
12
  return (_jsxs(Box, { position: "relative", onMouseEnter: () => hasChildren && setHoveredMenu(item.label), onMouseLeave: () => hasChildren && setHoveredMenu(null), children: [_jsx(Button, { variant: "ghost", onClick: item.onClick, rightIcon: hasChildren ? _jsx(ChevronDown, { size: 14 }) : undefined,
13
- // bg={isActive(item.href) ? activeBg : "transparent"}
14
- // `activeBg` is only readable as an underline accent (WCAG 1.4.11, 3:1) it comes
15
- // from accentTextOnCanvas walking a LIGHT-oriented scale (`themeColor.primary`)
16
- // against this ALWAYS-dark sidebar canvas, which searches the wrong direction and
17
- // can land near-black (measured ~1.0-1.1 contrast). Text stays on `color`, the
18
- // white-family ink Header already uses for every other item on this same canvas.
19
- borderBottom: `2px solid ${isActive(item.href) ? activeBg : "transparent"}`, borderRadius: 0, _hover: { bg: hoverBg, color: hoverTextColor }, color: color, children: _jsxs(VStack, { spacing: 0, children: [item.badge && (_jsx(Badge, { colorScheme: (_b = (_a = item === null || item === void 0 ? void 0 : item.badge) === null || _a === void 0 ? void 0 : _a.colorScheme) !== null && _b !== void 0 ? _b : "blue", variant: "subtle", fontSize: "0.65em", borderRadius: "md", boxShadow: "sm",
20
- // backdropFilter="saturate(180%) blur(6px)"
21
- // bg="whiteAlpha.800"
22
- // color="gray.800"
23
- px: 2, py: 0.5, children: (_c = item.badge) === null || _c === void 0 ? void 0 : _c.label })), _jsx(Text, { children: item.label })] }) }), hasChildren && (_jsx(Collapse, { in: isHovered, animateOpacity: true, children: _jsx(Box, { position: "absolute", top: "100%", bg: (_d = colors === null || colors === void 0 ? void 0 : colors.background) === null || _d === void 0 ? void 0 : _d[50], color: (_e = colors === null || colors === void 0 ? void 0 : colors.text) === null || _e === void 0 ? void 0 : _e[900], rounded: "md", shadow: "md", minW: "10rem", zIndex: 10, children: _jsx(Stack, { spacing: 1, p: 2, children: (_f = item.children) === null || _f === void 0 ? void 0 : _f.map((subItem) => {
24
- var _a, _b, _c, _d, _e, _f;
25
- return (_jsx(Button, { onClick: subItem.onClick, variant: "ghost", justifyContent: "flex-start", w: "full", bg: isActive(subItem.href) ? activeBg : "transparent", _hover: { bg: hoverBg, color: hoverTextColor }, children: _jsxs(VStack, { spacing: 0, align: "start", children: [subItem.badge && (_jsx(Badge, { colorScheme: (_b = (_a = subItem === null || subItem === void 0 ? void 0 : subItem.badge) === null || _a === void 0 ? void 0 : _a.colorScheme) !== null && _b !== void 0 ? _b : "blue", variant: "subtle", fontSize: "0.65em", alignItems: "end", borderRadius: "md", boxShadow: "sm",
26
- // backdropFilter="saturate(180%) blur(6px)"
27
- // bg="whiteAlpha.800"
28
- // color="gray.800"
29
- px: 2, py: 0.5, children: (_c = subItem.badge) === null || _c === void 0 ? void 0 : _c.label })), _jsx(Text
13
+ // `activeBg` is the rail's 3:1 non-text accent; label ink stays on `color`.
14
+ borderBottom: `2px solid ${isActive(item.href) ? activeBg : "transparent"}`, borderRadius: 0, _hover: { bg: hoverBg, color: hoverTextColor }, color: color, children: _jsxs(VStack, { spacing: 0, children: [item.badge && (_jsx(Badge, { colorScheme: (_b = (_a = item === null || item === void 0 ? void 0 : item.badge) === null || _a === void 0 ? void 0 : _a.colorScheme) !== null && _b !== void 0 ? _b : "blue", variant: "subtle", fontSize: "0.65em", borderRadius: "md", boxShadow: "sm", px: 2, py: 0.5, children: (_c = item.badge) === null || _c === void 0 ? void 0 : _c.label })), _jsx(Text, { children: item.label })] }) }), hasChildren && (_jsx(Collapse, { in: isHovered, animateOpacity: true, children: _jsx(Box, { position: "absolute", top: "100%", bg: colors.background[50], color: colors.text[900], rounded: "md", shadow: "md", minW: "10rem", zIndex: 10, children: _jsx(Stack, { spacing: 1, p: 2, children: (_d = item.children) === null || _d === void 0 ? void 0 : _d.map((subItem) => {
15
+ var _a, _b, _c;
16
+ return (_jsx(Button, { onClick: subItem.onClick, variant: "ghost", justifyContent: "flex-start", w: "full", bg: isActive(subItem.href) ? activeBg : "transparent", _hover: { bg: hoverBg, color: hoverTextColor }, children: _jsxs(VStack, { spacing: 0, align: "start", children: [subItem.badge && (_jsx(Badge, { colorScheme: (_b = (_a = subItem === null || subItem === void 0 ? void 0 : subItem.badge) === null || _a === void 0 ? void 0 : _a.colorScheme) !== null && _b !== void 0 ? _b : "blue", variant: "subtle", fontSize: "0.65em", alignItems: "end", borderRadius: "md", boxShadow: "sm", px: 2, py: 0.5, children: (_c = subItem.badge) === null || _c === void 0 ? void 0 : _c.label })), _jsx(Text
30
17
  // text[800] is tuned for the background[50] canvas, not the activeBg
31
18
  // fill this row switches to — onFilled picks whichever of white/black
32
19
  // actually clears AA against that fill instead.
@@ -35,8 +22,8 @@ const DesktopMenu = ({ menuItems, rightSlot, setHoveredMenu, isActive, activeBg,
35
22
  // fill this row switches to — onFilled picks whichever of white/black
36
23
  // actually clears AA against that fill instead.
37
24
  color: isActive(subItem.href)
38
- ? onFilled(activeBg, (_d = colors === null || colors === void 0 ? void 0 : colors.white) !== null && _d !== void 0 ? _d : DEFAULT_WHITE, (_e = colors === null || colors === void 0 ? void 0 : colors.black) !== null && _e !== void 0 ? _e : DEFAULT_BLACK)
39
- : (_f = colors === null || colors === void 0 ? void 0 : colors.text) === null || _f === void 0 ? void 0 : _f[800], _hover: { color: hoverTextColor }, children: subItem.label })] }) }, subItem.label));
25
+ ? onFilled(activeBg, colors.white, colors.black)
26
+ : colors.text[800], _hover: { color: hoverTextColor }, children: subItem.label })] }) }, subItem.label));
40
27
  }) }) }) }))] }, item.label));
41
28
  }) }));
42
29
  };