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
@@ -4,7 +4,6 @@ import { DragDropContext, Droppable, Draggable, } from "@hello-pangea/dnd";
4
4
  import { BetweenHorizonalStart, GripVertical, X } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
6
  const ReorderList = ({ label = "", items, onReorder, showRemoveIcon = false, onRemove, }) => {
7
- var _a;
8
7
  const { colors } = useCustomTheme();
9
8
  const handleDragEnd = (result) => {
10
9
  if (!result.destination)
@@ -14,9 +13,9 @@ const ReorderList = ({ label = "", items, onReorder, showRemoveIcon = false, onR
14
13
  reordered.splice(result.destination.index, 0, moved);
15
14
  onReorder(reordered);
16
15
  };
17
- return (_jsxs(Box, { borderWidth: "0.063rem", borderRadius: "md", px: 3, py: 2, bg: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[50], children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(BetweenHorizonalStart, {}), _jsx(Text, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 14, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", py: 4, children: label })] }), _jsx(Divider, {}), _jsx("br", {}), _jsx(DragDropContext, { onDragEnd: handleDragEnd, children: _jsx(Droppable, { droppableId: "item-list", direction: "horizontal", children: (provided) => (_jsxs(HStack, { ref: provided.innerRef, ...provided.droppableProps, spacing: 4, overflowX: "auto", children: [items.map((item, index) => (_jsx(Draggable, { draggableId: item.id, index: index, children: (provided) => {
18
- var _a, _b, _c, _d;
19
- return (_jsxs(Box, { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, position: "relative", border: "0.063rem solid", borderColor: (_a = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _a === void 0 ? void 0 : _a[300], borderRadius: "md", overflow: "hidden", children: [_jsx(Image, { src: item.previewUrl, alt: (_b = item.name) !== null && _b !== void 0 ? _b : `item-${index}`, boxSize: "7.5rem", objectFit: "cover" }), _jsx(IconButton, { icon: _jsx(GripVertical, { size: 16, color: (_c = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _c === void 0 ? void 0 : _c[500] }), "aria-label": "Drag", size: "sm", position: "absolute", top: 1, left: 1, variant: "ghost" }), _jsx(Badge, { position: "absolute", colorScheme: "gray", variant: "solid", bottom: 1, right: 1, children: index + 1 }), showRemoveIcon && (_jsx(IconButton, { icon: _jsx(X, { size: 16, color: (_d = colors === null || colors === void 0 ? void 0 : colors.red) === null || _d === void 0 ? void 0 : _d[500] }), "aria-label": "Remove", size: "sm", position: "absolute", top: 1, right: 1, variant: "ghost", onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.id) }))] }));
16
+ return (_jsxs(Box, { borderWidth: "0.063rem", borderRadius: "md", px: 3, py: 2, bg: colors.background[50], children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(BetweenHorizonalStart, {}), _jsx(Text, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 14, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", py: 4, children: label })] }), _jsx(Divider, {}), _jsx("br", {}), _jsx(DragDropContext, { onDragEnd: handleDragEnd, children: _jsx(Droppable, { droppableId: "item-list", direction: "horizontal", children: (provided) => (_jsxs(HStack, { ref: provided.innerRef, ...provided.droppableProps, spacing: 4, overflowX: "auto", children: [items.map((item, index) => (_jsx(Draggable, { draggableId: item.id, index: index, children: (provided) => {
17
+ var _a;
18
+ return (_jsxs(Box, { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, position: "relative", border: "0.063rem solid", borderColor: colors.boxborder[200], borderRadius: "md", overflow: "hidden", children: [_jsx(Image, { src: item.previewUrl, alt: (_a = item.name) !== null && _a !== void 0 ? _a : `item-${index}`, boxSize: "7.5rem", objectFit: "cover" }), _jsx(IconButton, { icon: _jsx(GripVertical, { size: 16, color: colors.textMuted }), "aria-label": "Drag", size: "sm", position: "absolute", top: 1, left: 1, variant: "ghost" }), _jsx(Badge, { position: "absolute", colorScheme: "gray", variant: "solid", bottom: 1, right: 1, children: index + 1 }), showRemoveIcon && (_jsx(IconButton, { icon: _jsx(X, { size: 16, color: colors.semanticText.error }), "aria-label": "Remove", size: "sm", position: "absolute", top: 1, right: 1, variant: "ghost", onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.id) }))] }));
20
19
  } }, item.id))), provided.placeholder] })) }) })] }));
21
20
  };
22
21
  export default ReorderList;
@@ -2,12 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, Flex, HStack, Text, } from "@chakra-ui/react";
3
3
  import { AlertTriangle, Trash2 } from "lucide-react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
+ import { isDarkCanvas } from "../../Theme/tokens/builders/accentText.js";
6
+ import { resolveStatusTone } from "../../Theme/tokens/builders/statusTone.js";
5
7
  import Button from "../Button/Button.js";
6
8
  const DeleteRoleModal = ({ isOpen, onClose, onConfirm, isLoading, labels, }) => {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
8
9
  const { colors } = useCustomTheme();
9
- return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[50], borderRadius: "2xl", overflow: "hidden", children: [_jsxs(ModalHeader, { borderBottom: "1px solid", borderColor: (_c = (_b = colors === null || colors === void 0 ? void 0 : colors.boxborder) === null || _b === void 0 ? void 0 : _b[200]) !== null && _c !== void 0 ? _c : (_d = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _d === void 0 ? void 0 : _d[200], display: "flex", alignItems: "center", gap: 3, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full",
10
- // Pale badge bg: `red` reverses in dark; `semantic.error` is lifted and would stay near-white.
11
- bg: (_e = colors === null || colors === void 0 ? void 0 : colors.red) === null || _e === void 0 ? void 0 : _e[50], color: (_h = (_g = (_f = colors === null || colors === void 0 ? void 0 : colors.semantic) === null || _f === void 0 ? void 0 : _f.error) === null || _g === void 0 ? void 0 : _g[500]) !== null && _h !== void 0 ? _h : (_j = colors === null || colors === void 0 ? void 0 : colors.red) === null || _j === void 0 ? void 0 : _j[500], children: _jsx(AlertTriangle, { size: 18 }) }), _jsx(Text, { fontSize: "1.05rem", fontWeight: 600, children: labels.deleteRole })] }), _jsx(ModalCloseButton, {}), _jsxs(ModalBody, { py: 6, children: [_jsx(Text, { color: (_k = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _k === void 0 ? void 0 : _k[600], fontSize: "sm", mb: 5, children: labels.deleteRoleConfirm }), _jsxs(HStack, { justifyContent: "flex-end", spacing: 3, children: [_jsx(Button, { label: labels.cancel, onClick: onClose, variant: "outline", colorScheme: "gray", size: "sm" }), _jsx(Button, { label: labels.delete, onClick: onConfirm, colorScheme: "red", size: "sm", isLoading: isLoading, leftIcon: _jsx(Trash2, { size: 15 }) })] })] })] })] }));
10
+ const mode = isDarkCanvas(colors.backgroundColor.main) ? "dark" : "light";
11
+ const errorTone = resolveStatusTone(colors.semantic.error, mode);
12
+ return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.background[50], borderRadius: "2xl", overflow: "hidden", children: [_jsxs(ModalHeader, { borderBottom: "1px solid", borderColor: colors.boxborder[200], display: "flex", alignItems: "center", gap: 3, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: errorTone.bg, color: errorTone.fg, children: _jsx(AlertTriangle, { size: 18 }) }), _jsx(Text, { fontSize: "1.05rem", fontWeight: 600, children: labels.deleteRole })] }), _jsx(ModalCloseButton, {}), _jsxs(ModalBody, { py: 6, children: [_jsx(Text, { color: colors.textMuted, fontSize: "sm", mb: 5, children: labels.deleteRoleConfirm }), _jsxs(HStack, { justifyContent: "flex-end", spacing: 3, children: [_jsx(Button, { label: labels.cancel, onClick: onClose, variant: "outline", colorScheme: "gray", size: "sm" }), _jsx(Button, { label: labels.delete, onClick: onConfirm, colorScheme: "red", size: "sm", isLoading: isLoading, leftIcon: _jsx(Trash2, { size: 15 }) })] })] })] })] }));
12
13
  };
13
14
  export default DeleteRoleModal;
@@ -3,6 +3,7 @@ import { useMemo, useState } from "react";
3
3
  import { Badge, Box, Checkbox, Divider, Flex, Heading, HStack, IconButton, Skeleton, Table, Tbody, Td, Text, Th, Thead, Tooltip, Tr, VStack, } from "@chakra-ui/react";
4
4
  import { ArrowLeft, Check, Pencil, Plus, ShieldCheck, SquareArrowOutUpRight, Trash2, } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
+ import { resolveHoverTint } from "../../Theme/tokens/builders/outlineRung.js";
6
7
  import Button from "../Button/Button.js";
7
8
  import TextInput from "../Input/TextInput.js";
8
9
  import EmptyState from "../EmptyState/EmptyState.js";
@@ -51,15 +52,15 @@ const DEFAULT_KEYS = [
51
52
  "export",
52
53
  ];
53
54
  const RolesPermission = ({ view, mode = "create", roles, isRolesLoading = false, permissions, permissionKeys = DEFAULT_KEYS, roleName, roleNameError, isSuperAdmin, isTrackLocation, isShowRecords, isEditing = false, isSaving = false, onNewRole, onViewRole, onEditRole, onDeleteRole, onBack, onRoleNameChange, onToggleSuperAdmin, onToggleTrackLocation, onToggleShowRecords, onPermissionChange, onSave, onCancelForm, footerSlot, checkIcon, labels: labelOverrides, padding = "16px", }) => {
54
- var _a, _b, _c, _d, _e, _f, _g, _h;
55
55
  const { colors } = useCustomTheme();
56
56
  const labels = useMemo(() => ({ ...DEFAULT_LABELS, ...labelOverrides }), [labelOverrides]);
57
57
  const [deleteId, setDeleteId] = useState(null);
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 = (_d = colors === null || colors === void 0 ? void 0 : colors.background) === null || _d === void 0 ? void 0 : _d[50];
60
- const muted = (_e = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _e === void 0 ? void 0 : _e[500];
61
- const heading = (_f = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _f === void 0 ? void 0 : _f[800];
62
- const headBg = (_g = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _g === void 0 ? void 0 : _g[50];
58
+ const border = colors.boxborder[200];
59
+ const surface = colors.background[50];
60
+ const muted = colors.textMuted;
61
+ const heading = colors.text[900];
62
+ const headBg = colors.gray[50];
63
+ const rowHover = resolveHoverTint(colors.gray[50], surface);
63
64
  const isViewMode = mode === "view";
64
65
  const columnLabels = {
65
66
  read: labels.read,
@@ -92,18 +93,15 @@ const RolesPermission = ({ view, mode = "create", roles, isRolesLoading = false,
92
93
  borderColor: border,
93
94
  py: 3,
94
95
  };
95
- const renderGrantedCheck = () => {
96
- var _a;
97
- return checkIcon !== null && checkIcon !== void 0 ? checkIcon : (_jsx(Box, { color: (_a = colors === null || colors === void 0 ? void 0 : colors.green) === null || _a === void 0 ? void 0 : _a[500], display: "inline-flex", children: _jsx(Check, { size: 18, strokeWidth: 3 }) }));
98
- };
96
+ const renderGrantedCheck = () => checkIcon !== null && checkIcon !== void 0 ? checkIcon : (_jsx(Box, { color: colors.semanticText.success, display: "inline-flex", children: _jsx(Check, { size: 18, strokeWidth: 3 }) }));
99
97
  const renderListView = () => (_jsxs(VStack, { align: "stretch", spacing: 4, children: [_jsxs(Box, { ...cardSx, children: [_jsxs(Flex, { ...cardHeaderSx, alignItems: "center", justifyContent: "space-between", children: [_jsxs(HStack, { spacing: 2, children: [onBack && (_jsx(IconButton, { "aria-label": "Go back", icon: _jsx(ArrowLeft, { size: 16 }), variant: "ghost", size: "xs", color: muted, onClick: onBack })), _jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.title }), !isRolesLoading && (_jsxs(Badge, { colorScheme: "blue", variant: "subtle", borderRadius: "full", px: 2, py: 0.5, fontSize: "0.65rem", textTransform: "none", children: [labels.totalRoles, ": ", roles.length] }))] }), _jsx(Button, { label: labels.newRole, onClick: onNewRole, size: "sm", sx: { fontSize: "xs" }, colorScheme: "primary", leftIcon: _jsx(Plus, { size: 15 }) })] }), _jsx(Box, { overflowX: "auto", children: isRolesLoading ? (_jsx(VStack, { spacing: 3, p: 4, align: "stretch", children: Array.from({ length: 6 }).map((_, idx) => (_jsx(Skeleton, { height: "18px", borderRadius: "md" }, idx))) })) : roles.length === 0 ? (_jsx(EmptyState, { icon: ShieldCheck, title: labels.noRoles, size: "sm", minH: "200px" })) : (_jsxs(Table, { variant: "simple", size: "sm", children: [_jsx(Thead, { bg: headBg, children: _jsxs(Tr, { children: [_jsx(Th, { ...thStyle, width: "56px", children: labels.sNo }), _jsx(Th, { ...thStyle, children: labels.roleNameColumn }), _jsx(Th, { ...thStyle, children: labels.createdBy }), _jsx(Th, { ...thStyle, children: labels.createdTime }), _jsx(Th, { ...thStyle, textAlign: "right", children: labels.actions })] }) }), _jsx(Tbody, { children: roles.map((role, index) => {
100
- var _a, _b;
101
- return (_jsxs(Tr, { _hover: { bg: headBg }, transition: "background 0.15s ease", children: [_jsx(Td, { borderColor: border, color: muted, fontSize: "sm", children: index + 1 }), _jsx(Td, { borderColor: border, maxW: "160px", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontSize: "sm", fontWeight: 600, color: heading, children: role.roleName }), _jsx(Td, { borderColor: border, fontSize: "sm", color: muted, children: role.createdBy }), _jsx(Td, { borderColor: border, fontSize: "sm", color: muted, children: role.created_at }), _jsx(Td, { borderColor: border, children: _jsxs(HStack, { spacing: 1, justifyContent: "flex-end", children: [_jsx(Tooltip, { label: labels.view, hasArrow: true, children: _jsx(IconButton, { icon: _jsx(SquareArrowOutUpRight, { size: 15 }), "aria-label": labels.view, variant: "ghost", size: "xs", color: muted, onClick: () => onViewRole === null || onViewRole === void 0 ? void 0 : onViewRole(role) }) }), _jsx(Tooltip, { label: labels.edit, hasArrow: true, children: _jsx(IconButton, { icon: _jsx(Pencil, { size: 15 }), "aria-label": labels.edit, variant: "ghost", size: "xs", color: muted, onClick: () => onEditRole === null || onEditRole === void 0 ? void 0 : onEditRole(role) }) }), _jsx(Tooltip, { label: labels.delete, hasArrow: true, children: _jsx(IconButton, { icon: _jsx(Trash2, { size: 15 }), "aria-label": labels.delete, variant: "ghost", size: "xs", colorScheme: "red", color: (_a = colors === null || colors === void 0 ? void 0 : colors.red) === null || _a === void 0 ? void 0 : _a[400], onClick: () => setDeleteId(Number(role.roles_id)) }) })] }) })] }, (_b = role.roles_id) !== null && _b !== void 0 ? _b : role.roleName));
98
+ var _a;
99
+ return (_jsxs(Tr, { _hover: { bg: rowHover }, transition: "background 0.15s ease", children: [_jsx(Td, { borderColor: border, color: muted, fontSize: "sm", children: index + 1 }), _jsx(Td, { borderColor: border, maxW: "160px", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontSize: "sm", fontWeight: 600, color: heading, children: role.roleName }), _jsx(Td, { borderColor: border, fontSize: "sm", color: muted, children: role.createdBy }), _jsx(Td, { borderColor: border, fontSize: "sm", color: muted, children: role.created_at }), _jsx(Td, { borderColor: border, children: _jsxs(HStack, { spacing: 1, justifyContent: "flex-end", children: [_jsx(Tooltip, { label: labels.view, hasArrow: true, children: _jsx(IconButton, { icon: _jsx(SquareArrowOutUpRight, { size: 15 }), "aria-label": labels.view, variant: "ghost", size: "xs", color: muted, onClick: () => onViewRole === null || onViewRole === void 0 ? void 0 : onViewRole(role) }) }), _jsx(Tooltip, { label: labels.edit, hasArrow: true, children: _jsx(IconButton, { icon: _jsx(Pencil, { size: 15 }), "aria-label": labels.edit, variant: "ghost", size: "xs", color: muted, onClick: () => onEditRole === null || onEditRole === void 0 ? void 0 : onEditRole(role) }) }), _jsx(Tooltip, { label: labels.delete, hasArrow: true, children: _jsx(IconButton, { icon: _jsx(Trash2, { size: 15 }), "aria-label": labels.delete, variant: "ghost", size: "xs", colorScheme: "red", color: colors.semanticText.error, onClick: () => setDeleteId(Number(role.roles_id)) }) })] }) })] }, (_a = role.roles_id) !== null && _a !== void 0 ? _a : role.roleName));
102
100
  }) })] })) })] }), footerSlot] }));
103
101
  const renderFormView = () => (_jsxs(VStack, { align: "stretch", spacing: 4, children: [_jsxs(Box, { ...cardSx, children: [_jsxs(Flex, { ...cardHeaderSx, alignItems: "center", gap: 2, children: [onCancelForm && (_jsx(IconButton, { "aria-label": "Go back", icon: _jsx(ArrowLeft, { size: 16 }), variant: "ghost", size: "xs", color: muted, onClick: onCancelForm })), _jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.roleInformation })] }), _jsxs(Box, { p: 4, children: [_jsx(Box, { maxW: "320px", children: _jsx(Tooltip, { label: isViewMode ? labels.readOnly : "", isDisabled: !isViewMode, children: _jsx(Box, { children: _jsx(TextInput, { label: labels.roleName, value: roleName, placeholder: labels.roleNamePlaceholder, error: !!roleNameError, errorMessage: roleNameError, onChange: (e) => onRoleNameChange === null || onRoleNameChange === void 0 ? void 0 : onRoleNameChange(e.target.value), isRequired: true, width: "100%", isDisabled: isViewMode }) }) }) }), _jsxs(VStack, { align: "stretch", spacing: 3, mt: 4, children: [_jsx(Checkbox, { isChecked: isSuperAdmin, isDisabled: isViewMode, size: "sm", onChange: (e) => onToggleSuperAdmin === null || onToggleSuperAdmin === void 0 ? void 0 : onToggleSuperAdmin(e.target.checked), children: _jsx(Text, { fontSize: "sm", color: heading, children: labels.enableAllPermissions }) }), _jsx(Checkbox, { isChecked: isTrackLocation, isDisabled: isViewMode, size: "sm", onChange: (e) => onToggleTrackLocation === null || onToggleTrackLocation === void 0 ? void 0 : onToggleTrackLocation(e.target.checked), children: _jsx(Text, { fontSize: "sm", color: heading, children: labels.trackLocation }) }), _jsx(Checkbox, { isChecked: isShowRecords, isDisabled: isViewMode, size: "sm", onChange: (e) => onToggleShowRecords === null || onToggleShowRecords === void 0 ? void 0 : onToggleShowRecords(e.target.checked), children: _jsx(Text, { fontSize: "sm", color: heading, children: labels.showAllUserRecords }) })] })] })] }), _jsxs(Box, { ...cardSx, children: [_jsx(Flex, { ...cardHeaderSx, alignItems: "center", children: _jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.permissionSettings }) }), _jsx(Box, { overflowX: "auto", children: _jsxs(Table, { variant: "simple", size: "sm", children: [_jsx(Thead, { bg: headBg, children: _jsxs(Tr, { children: [_jsx(Th, { ...thStyle, children: labels.moduleName }), permissionKeys.map((key) => (_jsx(Th, { ...thStyle, textAlign: "center", children: columnLabels[key] }, key)))] }) }), _jsx(Tbody, { children: permissions.length === 0 ? (_jsx(Tr, { children: _jsx(Td, { colSpan: permissionKeys.length + 1, textAlign: "center", borderColor: border, children: _jsx(Text, { color: muted, fontSize: "sm", py: 4, children: labels.noPermissions }) }) })) : (permissions.map((perm) => {
104
102
  var _a;
105
103
  const isAutomationModule = ((_a = perm.module) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === "automation";
106
- return (_jsxs(Tr, { _hover: { bg: headBg }, transition: "background 0.15s ease", children: [_jsx(Td, { borderColor: border, color: heading, fontSize: "sm", fontWeight: 500, maxW: "160px", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", children: perm.module }), permissionKeys.map((key) => {
104
+ return (_jsxs(Tr, { _hover: { bg: rowHover }, transition: "background 0.15s ease", children: [_jsx(Td, { borderColor: border, color: heading, fontSize: "sm", fontWeight: 500, maxW: "160px", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", children: perm.module }), permissionKeys.map((key) => {
107
105
  const isRead = key === "read";
108
106
  return (_jsx(Td, { textAlign: "center", borderColor: border, children: _jsx(Flex, { justify: "center", children: isViewMode ? (isAutomationModule ? (isRead &&
109
107
  perm.automation &&
@@ -112,7 +110,7 @@ const RolesPermission = ({ view, mode = "create", roles, isRolesLoading = false,
112
110
  : perm[key], isDisabled: isAutomationModule && !isRead, onChange: () => onPermissionChange === null || onPermissionChange === void 0 ? void 0 : onPermissionChange(perm.module, isAutomationModule ? "automation" : key) })) }) }, key));
113
111
  })] }, perm.module));
114
112
  })) })] }) }), !isViewMode && (_jsxs(_Fragment, { children: [_jsx(Divider, { borderColor: border }), _jsxs(Flex, { justifyContent: "flex-end", gap: 3, p: 4, children: [_jsx(Button, { onClick: onCancelForm, size: "sm", sx: { fontSize: "xs" }, label: labels.cancel, colorScheme: "red", variant: "outline" }), _jsx(Button, { onClick: onSave, size: "sm", sx: { fontSize: "xs" }, colorScheme: "primary", isLoading: isSaving, label: isEditing ? labels.updateChanges : labels.saveChanges })] })] }))] })] }));
115
- return (_jsxs(Box, { p: padding, backgroundColor: (_h = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _h === void 0 ? void 0 : _h[50], minHeight: "100%", children: [view === "list" ? renderListView() : renderFormView(), _jsx(DeleteRoleModal, { isOpen: deleteId !== null, onClose: () => setDeleteId(null), onConfirm: () => {
113
+ return (_jsxs(Box, { p: padding, backgroundColor: colors.backgroundColor.main, minHeight: "100%", children: [view === "list" ? renderListView() : renderFormView(), _jsx(DeleteRoleModal, { isOpen: deleteId !== null, onClose: () => setDeleteId(null), onConfirm: () => {
116
114
  if (deleteId !== null)
117
115
  onDeleteRole === null || onDeleteRole === void 0 ? void 0 : onDeleteRole(deleteId);
118
116
  setDeleteId(null);
@@ -6,7 +6,6 @@ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
6
  import ToolTip from "../ToolTip/ToolTip.js";
7
7
  import { rafThrottle } from "../../Utils/rafThrottle.js";
8
8
  const ScrollToTop = ({ children, tooltipLabel = "Scroll to top", threshold = 300, duration = 600, useWindow = false, bottom = "2rem", right = "2rem", }) => {
9
- var _a;
10
9
  const [visible, setVisible] = useState(false);
11
10
  const anchorRef = useRef(null);
12
11
  const theme = useCustomTheme();
@@ -58,8 +57,8 @@ const ScrollToTop = ({ children, tooltipLabel = "Scroll to top", threshold = 300
58
57
  };
59
58
  // eslint-disable-next-line react-hooks/exhaustive-deps
60
59
  }, [useWindow, threshold]);
61
- return (_jsxs(Box, { ref: anchorRef, position: "relative", children: [children, _jsx(ToolTip, { label: tooltipLabel, placement: "left", children: _jsx(Box, { as: "button", type: "button", onClick: scrollToTop, "aria-label": tooltipLabel, border: "none", position: "fixed", bottom: bottom, right: right, zIndex: 1000, display: "flex", alignItems: "center", justifyContent: "center", boxSize: "44px", borderRadius: "full", cursor: "pointer", bg: theme.colors.primary[500], color: theme.colors.white, boxShadow: "md", opacity: visible ? 1 : 0, transform: visible ? "translateY(0) scale(1)" : "translateY(16px) scale(0.85)", pointerEvents: visible ? "auto" : "none", transition: "all 0.25s cubic-bezier(0.16, 1, 0.3, 1)", _hover: {
62
- bg: (_a = theme.colors.primary[600]) !== null && _a !== void 0 ? _a : theme.colors.primary[500],
60
+ return (_jsxs(Box, { ref: anchorRef, position: "relative", children: [children, _jsx(ToolTip, { label: tooltipLabel, placement: "left", children: _jsx(Box, { as: "button", type: "button", onClick: scrollToTop, "aria-label": tooltipLabel, border: "none", position: "fixed", bottom: bottom, right: right, zIndex: 1000, display: "flex", alignItems: "center", justifyContent: "center", boxSize: "44px", borderRadius: "full", cursor: "pointer", bg: theme.colors.primary[500], color: theme.colors.onPrimary, boxShadow: "md", opacity: visible ? 1 : 0, transform: visible ? "translateY(0) scale(1)" : "translateY(16px) scale(0.85)", pointerEvents: visible ? "auto" : "none", transition: "all 0.25s cubic-bezier(0.16, 1, 0.3, 1)", _hover: {
61
+ bg: theme.colors.primary[600],
63
62
  transform: "translateY(-2px) scale(1.05)",
64
63
  boxShadow: "lg",
65
64
  }, _active: { transform: "scale(0.95)" }, children: _jsx(ChevronUp, { size: 24, strokeWidth: 2.5 }) }) })] }));
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from "@chakra-ui/react";
3
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
+ import { scrollbarStyles, } from "../../Theme/tokens/builders/scrollbar.js";
5
+ const ScrollbarBox = ({ children, height, maxHeight, overflowX, overflowY = "auto", variant = "default", scrollContainerRef, }) => {
6
+ const { colors } = useCustomTheme();
7
+ return (_jsx(Box, { ref: scrollContainerRef, height: height, maxHeight: maxHeight, position: "relative", sx: { overflowX, overflowY, ...scrollbarStyles(colors, variant) }, children: children }));
8
+ };
9
+ export default ScrollbarBox;
@@ -5,6 +5,7 @@ import { Check, ChevronDown, ChevronUp, CircleX, Plus, X } from "lucide-react";
5
5
  import { TextLabel } from "../Common/FormLabel.js";
6
6
  import Tag from "../Tag/Tag.js";
7
7
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
8
+ import { placeholderInk } from "../../Theme/tokens/builders/placeholderInk.js";
8
9
  import ErrorMessage from "../Common/ErrorMessage.js";
9
10
  import HelperText from "../Common/HelperText.js";
10
11
  import ToolTip from "../ToolTip/ToolTip.js";
@@ -25,7 +26,7 @@ const normalizeMultiValue = (val) => {
25
26
  return [];
26
27
  };
27
28
  const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading = false, isLoading = false, loadingText = "Loading...", placeholder = "Select", value, searchQuery = "", isMultiple = false, isRequired = false, error = false, errorMessage, helperText, width = "100%", height, size = "md", chip, information, isInformation, informationMessage, rightIcon, addNew, isSelectAll = false, pagination, insideSelect, isRemoveAllIcon, }) => {
28
- var _a, _b, _c, _d, _e, _f, _g;
29
+ var _a, _b;
29
30
  const s = getSearchSelectSizeStyles((size || "md"));
30
31
  const insideSelectBoxHeight = height !== null && height !== void 0 ? height : s.insideSelectDefaultHeight;
31
32
  const [inputValue, setInputValue] = useState(searchQuery);
@@ -433,45 +434,45 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
433
434
  };
434
435
  }, [isOpen, updateDropdownPos]);
435
436
  return (_jsxs(Box, { ref: containerRef, width: width, position: "relative", children: [label && (_jsx(TextLabel, { label: label, id: baseId, isRequired: isRequired, isInformation: isInformation !== null && isInformation !== void 0 ? isInformation : information === null || information === void 0 ? void 0 : information.isInformation, informationMessage: informationMessage !== null && informationMessage !== void 0 ? informationMessage : information === null || information === void 0 ? void 0 : information.informationMessage })), _jsx(InputGroup, { size: size, children: _jsxs(Box, { as: "div", ref: controlRef, w: "100%", minH: s.minH, px: s.px, pr: s.pr, position: "relative", display: "flex", alignItems: "center", flexWrap: "wrap", gap: s.gap, border: "0.063rem solid", borderColor: error
436
- ? theme.colors.semantic.error[500]
437
+ ? theme.colors.semanticText.error
437
438
  : focused
438
439
  ? theme.colors.primary[500]
439
- : (_a = theme.colors.boxborder) === null || _a === void 0 ? void 0 : _a[500], borderRadius: "lg", bg: (_b = theme.colors.gray) === null || _b === void 0 ? void 0 : _b[50], boxShadow: focused
440
+ : theme.colors.boxborder[500], borderRadius: "lg", bg: theme.colors.gray[50], boxShadow: focused
440
441
  ? error
441
- ? `0 0 0 0.125rem ${(_c = theme.colors.boxShadow) === null || _c === void 0 ? void 0 : _c.error}`
442
- : `0 0 0 0.125rem ${(_d = theme.colors.boxShadow) === null || _d === void 0 ? void 0 : _d.primary}`
442
+ ? `0 0 0 0.125rem ${theme.colors.boxShadow.error}`
443
+ : `0 0 0 0.125rem ${theme.colors.boxShadow.primary}`
443
444
  : error
444
- ? `0 0 0 0.125rem ${(_e = theme.colors.boxShadow) === null || _e === void 0 ? void 0 : _e.error}`
445
+ ? `0 0 0 0.125rem ${theme.colors.boxShadow.error}`
445
446
  : "none", transition: "box-shadow 0.2s, border-color 0.2s", onKeyDown: handleControlKeyDown, onFocus: () => setFocused(true), onBlur: () => setFocused(false), onClick: () => {
446
447
  setCustomSelectOpen(false);
447
448
  setIsOpen(true);
448
449
  }, children: [insideSelect && (() => {
449
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
450
+ var _a, _b, _c, _d, _e;
450
451
  const insideLabel = (_a = insideSelect.value) === null || _a === void 0 ? void 0 : _a.label;
451
452
  const insidePlaceholder = (_b = insideSelect.placeholder) !== null && _b !== void 0 ? _b : "Select";
452
- return (_jsxs(Box, { position: "relative", ref: customSelectRef, flexShrink: 0, ml: s.insideSelectMarginLeft, h: "-webkit-fill-available", borderRight: "0.063rem solid", borderColor: (_d = (_c = theme.colors.boxborder) === null || _c === void 0 ? void 0 : _c[300]) !== null && _d !== void 0 ? _d : theme.colors.gray[200], bg: customSelectOpen
453
- ? (_g = (_f = (_e = theme.colors.primary) === null || _e === void 0 ? void 0 : _e.opacity) === null || _f === void 0 ? void 0 : _f[8]) !== null && _g !== void 0 ? _g : theme.colors.gray[100]
454
- : (_j = (_h = theme.colors.background) === null || _h === void 0 ? void 0 : _h[400]) !== null && _j !== void 0 ? _j : theme.colors.white, borderLeftRadius: "md", borderRightRadius: 0, transition: "background 0.15s ease, box-shadow 0.15s ease", boxShadow: customSelectOpen
455
- ? `inset 0 0 0 0.063rem ${(_k = theme.colors.primary) === null || _k === void 0 ? void 0 : _k[500]}`
453
+ return (_jsxs(Box, { position: "relative", ref: customSelectRef, flexShrink: 0, ml: s.insideSelectMarginLeft, h: "-webkit-fill-available", borderRight: "0.063rem solid", borderColor: theme.colors.boxborder[200], bg: customSelectOpen
454
+ ? theme.colors.primary.opacity[8]
455
+ : theme.colors.background[400], borderLeftRadius: "md", borderRightRadius: 0, transition: "background 0.15s ease, box-shadow 0.15s ease", boxShadow: customSelectOpen
456
+ ? `inset 0 0 0 0.063rem ${theme.colors.primary[500]}`
456
457
  : "none", onClick: (e) => {
457
458
  e.stopPropagation();
458
459
  setIsOpen(false);
459
460
  setCustomSelectOpen((prev) => !prev);
460
- }, children: [_jsxs(Box, { minW: "4.5rem", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", gap: 1, width: insideSelect.width, height: insideSelectBoxHeight, pl: "0.5rem", pr: "0.375rem", children: [insideLabel ? (_jsx(SelectTruncatedLabel, { label: insideLabel, maxWidth: insideSelect.width || "6rem", fontSize: s.fieldFontSize })) : (_jsx(Text, { fontSize: s.fieldFontSize, fontWeight: 500, color: theme.colors.gray[500], isTruncated: true, maxW: insideSelect.width || "6rem", children: insidePlaceholder })), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, color: customSelectOpen ? (_l = theme.colors.primary) === null || _l === void 0 ? void 0 : _l[600] : theme.colors.gray[600], transition: "transform 0.2s ease, color 0.15s ease", transform: customSelectOpen ? "rotate(180deg)" : "rotate(0deg)", children: _jsx(ChevronDown, { size: s.chevronSize }) })] }), customSelectOpen && (_jsx(Portal, { children: _jsx(Box, { ref: setInsideSelectMenuRef, id: "custom-select-portal", position: "fixed", top: `${customSelectPos.top}px`, left: `${customSelectPos.left}px`, zIndex: 1510, bg: theme.colors.background[50], border: "0.063rem solid", borderColor: (_o = (_m = theme.colors.boxborder) === null || _m === void 0 ? void 0 : _m[200]) !== null && _o !== void 0 ? _o : theme.colors.gray[200], borderRadius: "lg", boxShadow: (_q = (_p = theme.shadows) === null || _p === void 0 ? void 0 : _p.md) !== null && _q !== void 0 ? _q : "md", minW: `${customSelectPos.width}px`, maxW: "20rem", py: 1, overflow: "hidden", children: (_r = insideSelect.option) === null || _r === void 0 ? void 0 : _r.map((item) => {
461
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
461
+ }, children: [_jsxs(Box, { minW: "4.5rem", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", gap: 1, width: insideSelect.width, height: insideSelectBoxHeight, pl: "0.5rem", pr: "0.375rem", children: [insideLabel ? (_jsx(SelectTruncatedLabel, { label: insideLabel, maxWidth: insideSelect.width || "6rem", fontSize: s.fieldFontSize })) : (_jsx(Text, { fontSize: s.fieldFontSize, fontWeight: 500, color: placeholderInk(theme.colors), isTruncated: true, maxW: insideSelect.width || "6rem", children: insidePlaceholder })), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, color: customSelectOpen ? theme.colors.accentText : theme.colors.textMuted, transition: "transform 0.2s ease, color 0.15s ease", transform: customSelectOpen ? "rotate(180deg)" : "rotate(0deg)", children: _jsx(ChevronDown, { size: s.chevronSize }) })] }), customSelectOpen && (_jsx(Portal, { children: _jsx(Box, { ref: setInsideSelectMenuRef, id: "custom-select-portal", position: "fixed", top: `${customSelectPos.top}px`, left: `${customSelectPos.left}px`, zIndex: 1510, bg: theme.colors.background[50], border: "0.063rem solid", borderColor: theme.colors.boxborder[200], borderRadius: "lg", boxShadow: (_d = (_c = theme.shadows) === null || _c === void 0 ? void 0 : _c.md) !== null && _d !== void 0 ? _d : "md", minW: `${customSelectPos.width}px`, maxW: "20rem", py: 1, overflow: "hidden", children: (_e = insideSelect.option) === null || _e === void 0 ? void 0 : _e.map((item) => {
462
+ var _a;
462
463
  const selected = ((_a = insideSelect.value) === null || _a === void 0 ? void 0 : _a.id) === item.id;
463
464
  return (_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, minH: s.optionRowMinH, py: s.optionRowPy, px: "0.75rem", fontSize: s.dropdownTextFontSize, fontWeight: selected ? 600 : 500, color: selected
464
- ? (_c = (_b = theme.colors.primary) === null || _b === void 0 ? void 0 : _b[700]) !== null && _c !== void 0 ? _c : (_d = theme.colors.primary) === null || _d === void 0 ? void 0 : _d[600]
465
- : (_f = (_e = theme.colors.text) === null || _e === void 0 ? void 0 : _e[700]) !== null && _f !== void 0 ? _f : theme.colors.gray[800], bg: selected
466
- ? (_j = (_h = (_g = theme.colors.primary) === null || _g === void 0 ? void 0 : _g.opacity) === null || _h === void 0 ? void 0 : _h[8]) !== null && _j !== void 0 ? _j : theme.colors.gray[100]
465
+ ? theme.colors.accentText
466
+ : theme.colors.text[700], bg: selected
467
+ ? theme.colors.primary.opacity[8]
467
468
  : "transparent", _hover: {
468
469
  bg: selected
469
- ? (_m = (_l = (_k = theme.colors.primary) === null || _k === void 0 ? void 0 : _k.opacity) === null || _l === void 0 ? void 0 : _l[8]) !== null && _m !== void 0 ? _m : theme.colors.gray[100]
470
- : (_o = theme.colors.gray) === null || _o === void 0 ? void 0 : _o[50],
470
+ ? theme.colors.primary.opacity[8]
471
+ : theme.colors.gray[50],
471
472
  }, cursor: "pointer", onClick: (e) => {
472
473
  e.stopPropagation();
473
474
  handleCustomSelect(item);
474
- }, children: [_jsx(Text, { isTruncated: true, children: item.label }), selected && (_jsx(Check, { size: s.chevronSize - 2, color: (_p = theme.colors.primary) === null || _p === void 0 ? void 0 : _p[600] }))] }, item.id));
475
+ }, children: [_jsx(Text, { isTruncated: true, children: item.label }), selected && (_jsx(Check, { size: s.chevronSize - 2, color: theme.colors.accentText }))] }, item.id));
475
476
  }) }) }))] }));
476
477
  })(), isMultiple
477
478
  ? selectedValues
@@ -480,7 +481,7 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
480
481
  ? item.label.slice(0, chip.maxText) + "…"
481
482
  : item.label, onIconClick: (chip === null || chip === void 0 ? void 0 : chip.onClick) ? () => handleRemove(item === null || item === void 0 ? void 0 : item.id) : undefined, icon: (chip === null || chip === void 0 ? void 0 : chip.onClick) ? CircleX : undefined, colorScheme: "gray", size: s.tagSize }, item.id)))
482
483
  : selectedValues.length === 1 &&
483
- !isOpen && (_jsx(Box, { as: "button", type: "button", ref: triggerButtonRef, id: primaryTarget === "button" ? baseId : undefined, ...comboboxA11yProps("button"), "aria-label": !label ? String((_g = (_f = selectedValues[0]) === null || _f === void 0 ? void 0 : _f.label) !== null && _g !== void 0 ? _g : "") : undefined, onFocus: () => setFocusedTrigger("button"), onBlur: () => setFocusedTrigger((prev) => (prev === "button" ? null : prev)), onClick: () => {
484
+ !isOpen && (_jsx(Box, { as: "button", type: "button", ref: triggerButtonRef, id: primaryTarget === "button" ? baseId : undefined, ...comboboxA11yProps("button"), "aria-label": !label ? String((_b = (_a = selectedValues[0]) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : "") : undefined, onFocus: () => setFocusedTrigger("button"), onBlur: () => setFocusedTrigger((prev) => (prev === "button" ? null : prev)), onClick: () => {
484
485
  setCustomSelectOpen(false);
485
486
  setIsOpen(true);
486
487
  }, fontSize: s.fieldFontSize, color: theme.colors.gray[800], background: "transparent", border: "none", cursor: "pointer", p: 0, display: "flex", alignItems: "center", flex: "1", minW: 0, children: _jsx(SelectTruncatedLabel, { label: String(selectedValues[0].label), maxWidth: "calc(100% - 2rem)", fontSize: s.fieldFontSize }) })), (chip === null || chip === void 0 ? void 0 : chip.maxChips) && isMultiple && selectedValues.length > chip.maxChips && (_jsx(Tag, { label: `+ ${selectedValues.length - chip.maxChips}`, colorScheme: "gray", size: s.tagSize }, "extra-count")), (isOpen || inputValue || !selectedValues.length) && (_jsx(Input, { ref: inputRef, id: primaryTarget === "input" ? baseId : undefined, "aria-autocomplete": "list", ...comboboxA11yProps("input"), variant: "unstyled", size: size, h: s.fieldHeight, minH: s.fieldHeight, fontSize: s.fieldFontSize, flex: "1",
@@ -506,13 +507,10 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
506
507
  setCustomSelectOpen(false);
507
508
  return !prev;
508
509
  });
509
- }, "aria-label": "toggle-dropdown", display: "flex", alignItems: "center", children: isOpen ? (_jsx(ChevronUp, { size: s.chevronSize })) : (_jsx(ChevronDown, { size: s.chevronSize })) }))] })] }) }), isOpen && (_jsx(Portal, { children: _jsxs(Box, { ref: setDropdownMenuRef, id: listboxId, role: "listbox", "aria-multiselectable": isMultiple || undefined, position: "fixed", top: `${dropdownPos.top}px`, left: `${dropdownPos.left}px`, width: `${dropdownPos.width}px`, zIndex: 1500, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.gray[200], borderRadius: "sm", bg: theme.colors.background[50], boxShadow: "md", display: "flex", flexDirection: "column", children: [isMultiple && isSelectAll && (_jsxs(Box, { py: s.optionRowPy, px: 3, cursor: "pointer", onClick: handleSelectAll, display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.gray[100]}`, children: [_jsx(Checkbox, { isChecked: allFilteredSelected, sx: { pointerEvents: "none" }, size: s.checkboxSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), _jsx(Box, { flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: "0.063rem solid", borderColor: theme.colors.gray[200], children: isOptionLoading && filteredOptions.length === 0 ? (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? (_jsx(Text, { p: 3, fontSize: s.dropdownTextFontSize, color: theme.colors.gray[500], children: "No results found" })) : (_jsxs(_Fragment, { children: [filteredOptions.map((option, index) => {
510
- var _a, _b, _c;
511
- return (_jsxs(Box, { id: getOptionId(index), role: "option", "aria-selected": isSelected(option.id), py: s.optionRowPy, px: 3, minH: s.optionRowMinH, cursor: "pointer", bg: index === activeIndex
512
- ? (_c = (_b = (_a = theme.colors.primary) === null || _a === void 0 ? void 0 : _a.opacity) === null || _b === void 0 ? void 0 : _b[8]) !== null && _c !== void 0 ? _c : theme.colors.gray[100]
513
- : isSelected(option.id)
514
- ? theme.colors.gray[100]
515
- : "transparent", _hover: { bg: theme.colors.gray[50] }, onClick: () => handleSelect(option), onMouseEnter: () => setActiveIndex(index), display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.gray[100]}`, children: [isMultiple && (_jsx(Checkbox, { isChecked: isSelected(option.id), sx: { pointerEvents: "none" }, size: s.checkboxSize })), option.view ? (_jsx(_Fragment, { children: option.view })) : (_jsx(Text, { fontSize: s.dropdownTextFontSize, children: option.label }))] }, option.id));
516
- }), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", justifyContent: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && (_jsxs(Box, { py: s.optionRowPy, px: 3, borderTop: "0.063rem solid", borderColor: theme.colors.gray[200], bg: theme.colors.background[50], display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: theme.colors.gray[50] }, children: [addNew.icon || _jsx(Plus, { size: s.addNewIconSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: addNew.text || "Add New" })] }))] }) })), helperText && !error && _jsx(HelperText, { helperText: helperText }), error && _jsx(ErrorMessage, { errorMessage: errorMessage })] }));
510
+ }, "aria-label": "toggle-dropdown", display: "flex", alignItems: "center", children: isOpen ? (_jsx(ChevronUp, { size: s.chevronSize })) : (_jsx(ChevronDown, { size: s.chevronSize })) }))] })] }) }), isOpen && (_jsx(Portal, { children: _jsxs(Box, { ref: setDropdownMenuRef, id: listboxId, role: "listbox", "aria-multiselectable": isMultiple || undefined, position: "fixed", top: `${dropdownPos.top}px`, left: `${dropdownPos.left}px`, width: `${dropdownPos.width}px`, zIndex: 1500, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "sm", bg: theme.colors.background[50], boxShadow: "md", display: "flex", flexDirection: "column", children: [isMultiple && isSelectAll && (_jsxs(Box, { py: s.optionRowPy, px: 3, cursor: "pointer", onClick: handleSelectAll, display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [_jsx(Checkbox, { isChecked: allFilteredSelected, sx: { pointerEvents: "none" }, size: s.checkboxSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), _jsx(Box, { flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: "0.063rem solid", borderColor: theme.colors.boxborder[200], children: isOptionLoading && filteredOptions.length === 0 ? (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? (_jsx(Text, { p: 3, fontSize: s.dropdownTextFontSize, color: theme.colors.textMuted, children: "No results found" })) : (_jsxs(_Fragment, { children: [filteredOptions.map((option, index) => (_jsxs(Box, { id: getOptionId(index), role: "option", "aria-selected": isSelected(option.id), py: s.optionRowPy, px: 3, minH: s.optionRowMinH, cursor: "pointer", bg: index === activeIndex
511
+ ? theme.colors.primary.opacity[8]
512
+ : isSelected(option.id)
513
+ ? theme.colors.gray[100]
514
+ : "transparent", _hover: { bg: theme.colors.gray[50] }, onClick: () => handleSelect(option), onMouseEnter: () => setActiveIndex(index), display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [isMultiple && (_jsx(Checkbox, { isChecked: isSelected(option.id), sx: { pointerEvents: "none" }, size: s.checkboxSize })), option.view ? (_jsx(_Fragment, { children: option.view })) : (_jsx(Text, { fontSize: s.dropdownTextFontSize, children: option.label }))] }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", justifyContent: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && (_jsxs(Box, { py: s.optionRowPy, px: 3, borderTop: "0.063rem solid", borderColor: theme.colors.boxborder[200], bg: theme.colors.background[50], display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: theme.colors.gray[50] }, children: [addNew.icon || _jsx(Plus, { size: s.addNewIconSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: addNew.text || "Add New" })] }))] }) })), helperText && !error && _jsx(HelperText, { helperText: helperText }), error && _jsx(ErrorMessage, { errorMessage: errorMessage })] }));
517
515
  };
518
516
  export default SearchSelect;
@@ -1,35 +1,33 @@
1
+ import { placeholderInk } from "../../Theme/tokens/builders/placeholderInk.js";
1
2
  export const Select = {
2
- baseStyle: ({ theme }) => {
3
- var _a, _b;
4
- return ({
5
- field: {
6
- // Chakra's stock Select sets `--select-bg: colors.white` and swaps it to gray.700 behind
7
- // `.chakra-ui-dark`/`[data-theme="dark"]` — selectors that NEVER match here, because dark
8
- // mode swaps the palette instead of flipping Chakra's colour mode. The variable therefore
9
- // stayed `#fff`, painting the native `<option>` list white-on-white in dark. `background[50]`
10
- // is the canvas-following equivalent: byte-identical `#ffffff` in light, dark in dark.
11
- "--select-bg": (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.background) === null || _b === void 0 ? void 0 : _b[50],
12
- fontWeight: 500,
13
- fontSize: "0.875rem",
14
- letterSpacing: "0.044rem",
15
- borderRadius: "lg",
16
- transition: "border-color 0.2s, box-shadow 0.2s",
17
- minWidth: "0", // allow shrinking inside flex
18
- width: "100%", // full container width
19
- maxWidth: "100%",
20
- _placeholder: {
21
- fontStyle: "italic",
22
- whiteSpace: "nowrap",
23
- overflow: "hidden",
24
- textOverflow: "ellipsis",
25
- },
26
- },
27
- icon: {
28
- width: "1.25rem",
29
- height: "1.25rem",
3
+ baseStyle: ({ theme }) => ({
4
+ field: {
5
+ // Chakra's stock Select sets `--select-bg: colors.white` and swaps it to gray.700 behind
6
+ // `.chakra-ui-dark`/`[data-theme="dark"]` — selectors that NEVER match here, because dark
7
+ // mode swaps the palette instead of flipping Chakra's colour mode. The variable therefore
8
+ // stayed `#fff`, painting the native `<option>` list white-on-white in dark. `background[50]`
9
+ // is the canvas-following equivalent: byte-identical `#ffffff` in light, dark in dark.
10
+ "--select-bg": theme.colors.background[50],
11
+ fontWeight: 500,
12
+ fontSize: "0.875rem",
13
+ letterSpacing: "0.044rem",
14
+ borderRadius: "lg",
15
+ transition: "border-color 0.2s, box-shadow 0.2s",
16
+ minWidth: "0", // allow shrinking inside flex
17
+ width: "100%", // full container width
18
+ maxWidth: "100%",
19
+ _placeholder: {
20
+ color: placeholderInk(theme.colors),
21
+ whiteSpace: "nowrap",
22
+ overflow: "hidden",
23
+ textOverflow: "ellipsis",
30
24
  },
31
- });
32
- },
25
+ },
26
+ icon: {
27
+ width: "1.25rem",
28
+ height: "1.25rem",
29
+ },
30
+ }),
33
31
  sizes: {
34
32
  sm: {
35
33
  field: {
@@ -58,19 +56,18 @@ export const Select = {
58
56
  },
59
57
  variants: {
60
58
  outline: (props) => {
61
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
62
59
  const { theme } = props;
63
- const errorColor = (_c = (_b = (_a = theme.colors.semantic) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b[500]) !== null && _c !== void 0 ? _c : "red.500";
60
+ const errorColor = theme.colors.semanticText.error;
64
61
  // [800], not [500]/[700]: WCAG 1.4.11 needs >=3.0 for a control boundary, measured
65
62
  // against the parent surface — up to `muted` (lightest). [700] fails there (2.41-2.72);
66
63
  // [800] clears all named surfaces with margin (3.44-3.90).
67
- const borderColor = (_e = (_d = theme.colors.boxborder) === null || _d === void 0 ? void 0 : _d[800]) !== null && _e !== void 0 ? _e : "gray.400";
68
- const shadowPrimary = (_g = (_f = theme.colors.boxShadow) === null || _f === void 0 ? void 0 : _f.primary) !== null && _g !== void 0 ? _g : "blue.100";
69
- const shadowError = (_j = (_h = theme.colors.boxShadow) === null || _h === void 0 ? void 0 : _h.error) !== null && _j !== void 0 ? _j : "red.100";
70
- const primary = (_l = (_k = theme.colors.primary) === null || _k === void 0 ? void 0 : _k[500]) !== null && _l !== void 0 ? _l : "blue.500";
64
+ const borderColor = theme.colors.boxborder[500];
65
+ const shadowPrimary = theme.colors.boxShadow.primary;
66
+ const shadowError = theme.colors.boxShadow.error;
67
+ const primary = theme.colors.primary[500];
71
68
  return {
72
69
  field: {
73
- bg: (_o = (_m = theme.colors.gray) === null || _m === void 0 ? void 0 : _m[50]) !== null && _o !== void 0 ? _o : "gray.50",
70
+ bg: theme.colors.gray[50],
74
71
  border: "0.063rem solid",
75
72
  borderColor,
76
73
  _hover: {
@@ -9,7 +9,7 @@ import ErrorMessage from "../Common/ErrorMessage.js";
9
9
  const RenderOptions = ({ isOptionLoading, filteredOptions, loadingText, handleOptionClick, isProfile, isColorOptions, isOptionSelected, activeIndex, optionRefs, }) => {
10
10
  const theme = useCustomTheme();
11
11
  if (isOptionLoading) {
12
- return (_jsxs(VStack, { py: 2, children: [_jsx(Spinner, { size: "sm", color: theme.colors.primary[500] }), _jsx(Text, { color: theme.colors.primary[500], children: loadingText })] }));
12
+ return (_jsxs(VStack, { py: 2, children: [_jsx(Spinner, { size: "sm", color: theme.colors.accentText }), _jsx(Text, { color: theme.colors.accentText, children: loadingText })] }));
13
13
  }
14
14
  if (filteredOptions === null || filteredOptions === void 0 ? void 0 : filteredOptions.length) {
15
15
  return (_jsx(_Fragment, { children: filteredOptions.map((option, index) => (_jsxs(Box, { as: "button", type: "button", ref: (el) => {
@@ -19,18 +19,18 @@ const RenderOptions = ({ isOptionLoading, filteredOptions, loadingText, handleOp
19
19
  e.preventDefault();
20
20
  handleOptionClick(option);
21
21
  }
22
- }, display: "flex", alignItems: "center", gap: "0.5rem", children: [isProfile && (_jsx(Box, { children: _jsx(Avatar, { size: "sm", name: option.label.toLocaleUpperCase(), src: option.profileUrl ? option.profileUrl : undefined }) })), isColorOptions && (_jsx(Box, { width: "0.8rem", height: "0.8rem", content: "", backgroundColor: option === null || option === void 0 ? void 0 : option.color, borderRadius: "50%" })), _jsxs(Box, { children: [_jsx(Box, { children: option.label }), option.email && (_jsx(Box, { fontSize: 12, color: "gray.500", children: option.email }))] })] }, option.id))) }));
22
+ }, display: "flex", alignItems: "center", gap: "0.5rem", children: [isProfile && (_jsx(Box, { children: _jsx(Avatar, { size: "sm", name: option.label.toLocaleUpperCase(), src: option.profileUrl ? option.profileUrl : undefined }) })), isColorOptions && (_jsx(Box, { width: "0.8rem", height: "0.8rem", content: "", backgroundColor: option === null || option === void 0 ? void 0 : option.color, borderRadius: "50%" })), _jsxs(Box, { children: [_jsx(Box, { children: option.label }), option.email && (_jsx(Box, { fontSize: 12, color: theme.colors.textMuted, children: option.email }))] })] }, option.id))) }));
23
23
  }
24
- return (_jsx(Text, { px: 4, py: 2, color: "gray.500", children: "No options found" }));
24
+ return (_jsx(Text, { px: 4, py: 2, color: theme.colors.textMuted, children: "No options found" }));
25
25
  };
26
26
  export default function SelectSearch({ options, initialSelectedOption, onOptionSelect, inputOnchange, id, name, label, inputStyle, isOptionLoading, loadingText = "loading", boxStyle, placeholder = "Select Option", searchQuery = null, isInformation = false, informationMessage, rightIcon, rightElementStyle, isMultipleSelect = false, isRequired = false, onOptionMultiSelect, error = false, isProfile = false, isBottomIcon = false, errorMessage,
27
27
  // BottomIconStyle,
28
28
  BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptions, }) {
29
29
  const theme = useCustomTheme();
30
- const errorBorder = `2px solid ${theme.colors.semantic.error[500]}`;
30
+ const errorBorder = `2px solid ${theme.colors.semanticText.error}`;
31
31
  // [800], not [500]: WCAG 1.4.11 needs >=3.0 for a control boundary against any named surface
32
32
  // up to `muted` (lightest); [500] fails there, [800] clears all with margin.
33
- const defaultBorderThin = `1px solid ${theme.colors.boxborder[800]}`;
33
+ const defaultBorderThin = `1px solid ${theme.colors.boxborder[500]}`;
34
34
  const [selectedOptions, setSelectedOptions] = useState(initialSelectedOption ? [initialSelectedOption] : []);
35
35
  const [inputValue, setInputValue] = useState(searchQuery);
36
36
  const [isOpen, setIsOpen] = useState(false);
@@ -246,13 +246,13 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
246
246
  return;
247
247
  }
248
248
  setIsOpen(true);
249
- }, onChange: (e) => handleInputChange(e.target.value), placeholder: placeholder, onKeyDown: handleKeyDown, id: id, name: name, role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, cursor: "pointer", borderColor: theme.colors.boxborder[800], transition: "border-color 0.2s, box-shadow 0.2s", _hover: {
249
+ }, onChange: (e) => handleInputChange(e.target.value), placeholder: placeholder, onKeyDown: handleKeyDown, id: id, name: name, role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, cursor: "pointer", borderColor: theme.colors.boxborder[500], transition: "border-color 0.2s, box-shadow 0.2s", _hover: {
250
250
  borderColor: error
251
- ? theme.colors.semantic.error[500]
251
+ ? theme.colors.semanticText.error
252
252
  : theme.colors.primary[500],
253
253
  }, _focus: {
254
254
  borderColor: error
255
- ? theme.colors.semantic.error[500]
255
+ ? theme.colors.semanticText.error
256
256
  : theme.colors.primary[500],
257
257
  boxShadow: fieldFocusRing(theme, !!error),
258
258
  }, style: {
@@ -264,7 +264,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
264
264
  fontSize: 15,
265
265
  letterSpacing: 0.7,
266
266
  border: error ? errorBorder : defaultBorderThin,
267
- } }), rightIcon && (_jsx(InputRightElement, { pointerEvents: "none", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && (_jsxs(Box, { ref: dropdownRef, marginTop: "5px", position: "absolute", top: position === "below" ? "100%" : "auto", bottom: position === "above" ? "100%" : "auto", left: 0, right: 0, border: "1px solid", borderColor: "gray.300", borderRadius: "md", bg: theme.colors.background[50], maxHeight: "150px", overflowY: "auto", zIndex: 10, children: [_jsx(Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: _jsx(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs }) }), _jsx("hr", {}), isBottomIcon && (_jsxs(Box, { position: "sticky", bottom: 0, background: theme.colors.background[50], display: "flex", alignItems: "center", pl: "1rem", cursor: "pointer", onClick: handleBottomClick, borderColor: "gray.300", zIndex: 1, borderTop: `1px solid ${theme.colors.border[500]}`, children: [_jsx(Box, { children: BottomIcon ? BottomIcon : _jsx(PlusIcon, { size: "1rem" }) }), _jsx(Box, { fontSize: "0.875rem", color: BottomTextColor
267
+ } }), rightIcon && (_jsx(InputRightElement, { pointerEvents: "none", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && (_jsxs(Box, { ref: dropdownRef, marginTop: "5px", position: "absolute", top: position === "below" ? "100%" : "auto", bottom: position === "above" ? "100%" : "auto", left: 0, right: 0, border: "1px solid", borderColor: theme.colors.boxborder[200], borderRadius: "md", bg: theme.colors.background[50], maxHeight: "150px", overflowY: "auto", zIndex: 10, children: [_jsx(Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: _jsx(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs }) }), _jsx("hr", {}), isBottomIcon && (_jsxs(Box, { position: "sticky", bottom: 0, background: theme.colors.background[50], display: "flex", alignItems: "center", pl: "1rem", cursor: "pointer", onClick: handleBottomClick, borderColor: theme.colors.boxborder[200], zIndex: 1, borderTop: `1px solid ${theme.colors.boxborder[200]}`, children: [_jsx(Box, { children: BottomIcon ? BottomIcon : _jsx(PlusIcon, { size: "1rem" }) }), _jsx(Box, { fontSize: "0.875rem", color: BottomTextColor
268
268
  ? BottomTextColor
269
- : theme.colors.primary[500], padding: "8px 8px", children: BottomText || "Add New" })] }))] })), error && _jsx(ErrorMessage, { errorMessage: errorMessage })] }) }) }));
269
+ : theme.colors.accentText, padding: "8px 8px", children: BottomText || "Add New" })] }))] })), error && _jsx(ErrorMessage, { errorMessage: errorMessage })] }) }) }));
270
270
  }
@@ -3,6 +3,8 @@ import React, { useCallback, useEffect, useId, useMemo, useRef, useState } from
3
3
  import { Box, Checkbox, FormControl, Input, Popover, PopoverAnchor, PopoverContent, Portal, useDisclosure, } from "@chakra-ui/react";
4
4
  import { ChevronDown } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
+ import { placeholderInk } from "../../Theme/tokens/builders/placeholderInk.js";
7
+ import { scrollbarStyles } from "../../Theme/tokens/builders/scrollbar.js";
6
8
  import { getFieldStateStyles } from "../Common/fieldStyles.js";
7
9
  import { TextLabel } from "../Common/FormLabel.js";
8
10
  import ErrorMessage from "../Common/ErrorMessage.js";
@@ -17,15 +19,12 @@ const asIdSet = (values) => new Set((values !== null && values !== void 0 ? valu
17
19
  // Derived from the option's own id (not its index) so it stays stable across filtering/reordering.
18
20
  const optionDomId = (listboxId, id) => `${listboxId}-option-${id.toString().replace(/[^a-zA-Z0-9_-]/g, "-")}`;
19
21
  const OptionRow = React.memo(function OptionRow({ option, index, listboxId, isSelected, isActive, isMulti, theme, renderOption, onSelect, onActivate, }) {
20
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
21
22
  return (_jsxs(Box, { id: optionDomId(listboxId, option.id), "data-index": index, role: "option", "aria-selected": isSelected, "aria-disabled": option.isDisabled, onMouseEnter: () => onActivate(index), onClick: () => onSelect(option), mx: 1.5, px: 2.5, py: 1.5, borderRadius: "md", cursor: option.isDisabled ? "not-allowed" : "pointer", opacity: option.isDisabled ? 0.4 : 1, display: "flex", alignItems: "center", gap: 2, fontSize: "0.8125rem", fontWeight: isSelected && !isMulti ? 600 : 500, color: isSelected && !isMulti
22
- ? (_b = (_a = theme.colors.primary) === null || _a === void 0 ? void 0 : _a[700]) !== null && _b !== void 0 ? _b : (_c = theme.colors.primary) === null || _c === void 0 ? void 0 : _c[600]
23
- : (_e = (_d = theme.colors.text) === null || _d === void 0 ? void 0 : _d[700]) !== null && _e !== void 0 ? _e : (_f = theme.colors.gray) === null || _f === void 0 ? void 0 : _f[700], bg: isActive
24
- ? (_j = (_h = (_g = theme.colors.primary) === null || _g === void 0 ? void 0 : _g.opacity) === null || _h === void 0 ? void 0 : _h[8]) !== null && _j !== void 0 ? _j : (_k = theme.colors.gray) === null || _k === void 0 ? void 0 : _k[100]
25
- : "transparent", transition: "background 0.12s ease, color 0.12s ease", children: [isMulti ? (_jsx(Checkbox, { isChecked: isSelected, isDisabled: option.isDisabled, pointerEvents: "none", tabIndex: -1 })) : null, renderOption ? (_jsx(Box, { flex: 1, minW: 0, children: renderOption(option, { isSelected, isActive }) })) : (_jsxs(_Fragment, { children: [option.icon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: option.icon })) : null, _jsxs(Box, { flex: 1, minW: 0, isTruncated: true, children: [_jsx(Box, { as: "span", isTruncated: true, children: option.label }), option.description ? (_jsx(Box, { as: "span", display: "block", fontSize: "0.75rem", fontWeight: 400, color: (_l = theme.colors.gray) === null || _l === void 0 ? void 0 : _l[500], isTruncated: true, children: option.description })) : null] })] }))] }));
23
+ ? theme.colors.accentText
24
+ : theme.colors.text[700], bg: isActive ? theme.colors.primary.opacity[8] : "transparent", transition: "background 0.12s ease, color 0.12s ease", children: [isMulti ? (_jsx(Checkbox, { isChecked: isSelected, isDisabled: option.isDisabled, pointerEvents: "none", tabIndex: -1 })) : null, renderOption ? (_jsx(Box, { flex: 1, minW: 0, children: renderOption(option, { isSelected, isActive }) })) : (_jsxs(_Fragment, { children: [option.icon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: option.icon })) : null, _jsxs(Box, { flex: 1, minW: 0, isTruncated: true, children: [_jsx(Box, { as: "span", isTruncated: true, children: option.label }), option.description ? (_jsx(Box, { as: "span", display: "block", fontSize: "0.75rem", fontWeight: 400, color: theme.colors.textMuted, isTruncated: true, children: option.description })) : null] })] }))] }));
26
25
  });
27
26
  export default function SelectV2(props) {
28
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
27
+ var _a, _b;
29
28
  const { options = [], placeholder = "Select Option", label, error = false, errorMessage, helperText, isDisabled = false, isRequired = false, size = "md", isSearchable = true, width, formControlStyle, onBlur, onFocus, renderOption, renderValue, maxMenuHeight = "16rem", defaultOpen = false, "data-testid": dataTestId, "aria-label": ariaLabel, } = props;
30
29
  const theme = useCustomTheme();
31
30
  const { isOpen, onOpen, onClose } = useDisclosure({ defaultIsOpen: defaultOpen });
@@ -195,18 +194,7 @@ export default function SelectV2(props) {
195
194
  const triggerId = `selectv2-trigger-${instanceId}`;
196
195
  const activeOption = filteredOptions[activeIndex];
197
196
  const activeDescendantId = activeOption ? optionDomId(listboxId, activeOption.id) : undefined;
198
- const listScrollStyles = useMemo(() => {
199
- var _a, _b;
200
- return ({
201
- scrollbarWidth: "thin",
202
- scrollbarColor: `${(_a = theme.colors.gray) === null || _a === void 0 ? void 0 : _a[300]} transparent`,
203
- "&::-webkit-scrollbar": { width: "6px" },
204
- "&::-webkit-scrollbar-thumb": {
205
- background: (_b = theme.colors.gray) === null || _b === void 0 ? void 0 : _b[300],
206
- borderRadius: "base",
207
- },
208
- });
209
- }, [theme]);
197
+ const listScrollStyles = useMemo(() => scrollbarStyles(theme.colors, "overlay"), [theme]);
210
198
  const defaultTriggerContent = () => {
211
199
  var _a;
212
200
  if (props.isMulti) {
@@ -221,10 +209,10 @@ export default function SelectV2(props) {
221
209
  return selectedOptions[0] ? selectedOptions[0].label : placeholder;
222
210
  };
223
211
  const triggerIcon = !props.isMulti && ((_b = selectedOptions[0]) === null || _b === void 0 ? void 0 : _b.icon) ? selectedOptions[0].icon : null;
224
- return (_jsxs(FormControl, { isInvalid: error, isDisabled: isDisabled, style: formControlStyle, width: width, children: [label && (_jsx(TextLabel, { label: label, id: triggerId, isRequired: isRequired })), _jsxs(Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", matchWidth: true, autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [_jsx(PopoverAnchor, { children: _jsxs(Box, { as: "button", type: "button", id: triggerId, ref: triggerRef, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-activedescendant": activeDescendantId, "aria-disabled": isDisabled, "aria-label": ariaLabel, disabled: isDisabled, onClick: handleOpen, onKeyDown: handleTriggerKeyDown, display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%", h: s.h, px: s.px, fontSize: s.fontSize, fontWeight: 500, textAlign: "left", cursor: isDisabled ? "not-allowed" : "pointer", opacity: isDisabled ? 0.4 : 1, color: selectedOptions.length ? (_c = theme.colors.text) === null || _c === void 0 ? void 0 : _c[900] : (_d = theme.colors.gray) === null || _d === void 0 ? void 0 : _d[500], "data-testid": dataTestId, ...fieldStyles, children: [_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", gap: 1.5, minW: 0, isTruncated: true, children: [triggerIcon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, _jsx(Box, { as: "span", isTruncated: true, fontStyle: selectedOptions.length ? "normal" : "italic", children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] }), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, ml: 2, transition: "transform 0.2s ease", transform: isOpen ? "rotate(180deg)" : "rotate(0deg)", color: (_e = theme.colors.gray) === null || _e === void 0 ? void 0 : _e[500], children: _jsx(ChevronDown, { size: 16 }) })] }) }), _jsx(Portal, { children: _jsxs(PopoverContent, { width: "100%", borderRadius: "xl", border: `0.063rem solid ${(_g = (_f = theme.colors.boxborder) === null || _f === void 0 ? void 0 : _f[200]) !== null && _g !== void 0 ? _g : (_h = theme.colors.gray) === null || _h === void 0 ? void 0 : _h[200]}`, boxShadow: (_j = theme.shadows) === null || _j === void 0 ? void 0 : _j.lg, overflow: "hidden", onKeyDown: handleListKeyDown, children: [isSearchable && (_jsx(Box, { p: 2, borderBottom: `0.063rem solid ${(_l = (_k = theme.colors.boxborder) === null || _k === void 0 ? void 0 : _k[100]) !== null && _l !== void 0 ? _l : (_m = theme.colors.gray) === null || _m === void 0 ? void 0 : _m[200]}`, children: _jsx(Input, { ref: filterInputRef, size: "sm", placeholder: "Type to filter...", value: filterText, onChange: (event) => {
212
+ return (_jsxs(FormControl, { isInvalid: error, isDisabled: isDisabled, style: formControlStyle, width: width, children: [label && (_jsx(TextLabel, { label: label, id: triggerId, isRequired: isRequired })), _jsxs(Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", matchWidth: true, autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [_jsx(PopoverAnchor, { children: _jsxs(Box, { as: "button", type: "button", id: triggerId, ref: triggerRef, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-activedescendant": activeDescendantId, "aria-disabled": isDisabled, "aria-label": ariaLabel, disabled: isDisabled, onClick: handleOpen, onKeyDown: handleTriggerKeyDown, display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%", h: s.h, px: s.px, fontSize: s.fontSize, fontWeight: 500, textAlign: "left", cursor: isDisabled ? "not-allowed" : "pointer", opacity: isDisabled ? 0.4 : 1, color: selectedOptions.length ? theme.colors.text[900] : placeholderInk(theme.colors), "data-testid": dataTestId, ...fieldStyles, children: [_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", gap: 1.5, minW: 0, isTruncated: true, children: [triggerIcon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, _jsx(Box, { as: "span", isTruncated: true, children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] }), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, ml: 2, transition: "transform 0.2s ease", transform: isOpen ? "rotate(180deg)" : "rotate(0deg)", color: theme.colors.textMuted, children: _jsx(ChevronDown, { size: 16 }) })] }) }), _jsx(Portal, { children: _jsxs(PopoverContent, { width: "100%", borderRadius: "xl", boxShadow: theme.shadows.lg, overflow: "hidden", onKeyDown: handleListKeyDown, children: [isSearchable && (_jsx(Box, { p: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: _jsx(Input, { ref: filterInputRef, size: "sm", placeholder: "Type to filter...", value: filterText, onChange: (event) => {
225
213
  setFilterText(event.target.value);
226
214
  setActiveIndex(0);
227
- }, "aria-activedescendant": activeDescendantId, "aria-label": "Filter options" }) })), _jsxs(Box, { id: listboxId, ref: listRef, role: "listbox", "aria-multiselectable": props.isMulti || undefined, maxH: maxMenuHeight, overflowY: "auto", py: 1, sx: listScrollStyles, children: [filteredOptions.length === 0 && (_jsx(Box, { px: 3, py: 2, fontSize: "0.8125rem", color: (_o = theme.colors.gray) === null || _o === void 0 ? void 0 : _o[500], children: "No Options" })), filteredOptions.map((option, index) => {
215
+ }, "aria-activedescendant": activeDescendantId, "aria-label": "Filter options" }) })), _jsxs(Box, { id: listboxId, ref: listRef, role: "listbox", "aria-multiselectable": props.isMulti || undefined, maxH: maxMenuHeight, overflowY: "auto", py: 1, sx: listScrollStyles, children: [filteredOptions.length === 0 && (_jsx(Box, { px: 3, py: 2, fontSize: "0.8125rem", color: theme.colors.textMuted, children: "No Options" })), filteredOptions.map((option, index) => {
228
216
  var _a;
229
217
  return (_jsx(OptionRow, { option: option, index: index, listboxId: listboxId, isSelected: selectedIds.has(option.id.toString()), isActive: index === activeIndex, isMulti: (_a = props.isMulti) !== null && _a !== void 0 ? _a : false, theme: theme, renderOption: renderOption, onSelect: handleSelect, onActivate: setActiveIndex }, option.id));
230
218
  })] })] }) })] }), error && _jsx(ErrorMessage, { errorMessage: errorMessage }), helperText && !error && _jsx(HelperText, { helperText: helperText })] }));