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

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 (335) hide show
  1. package/dist/Components/Accordion/Accordion.js +13 -15
  2. package/dist/Components/Accordion/accordionColors.js +6 -9
  3. package/dist/Components/AlertDialog/AlertDialog.js +1 -2
  4. package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
  5. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
  6. package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
  7. package/dist/Components/AppearanceSettings/AppearanceSettings.js +9 -7
  8. package/dist/Components/Button/Button.styles.js +4 -10
  9. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +9 -10
  10. package/dist/Components/Common/ErrorComponent.js +5 -8
  11. package/dist/Components/Common/ErrorMessage.js +2 -8
  12. package/dist/Components/Common/FormLabel.js +1 -3
  13. package/dist/Components/Common/FormattedDescription.js +3 -1
  14. package/dist/Components/Common/Label.js +3 -8
  15. package/dist/Components/Common/fieldStyles.js +6 -7
  16. package/dist/Components/ContactForm/ContactForm.js +1 -2
  17. package/dist/Components/CopyButton/CopyButton.js +3 -6
  18. package/dist/Components/CustomModulesTable/CustomModulesTable.js +7 -10
  19. package/dist/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
  20. package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -3
  21. package/dist/Components/DatePicker/CalendarPanel.js +2 -3
  22. package/dist/Components/DatePicker/RangeDatePicker.js +9 -9
  23. package/dist/Components/DatePicker/SingleDatePicker.js +11 -11
  24. package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -2
  25. package/dist/Components/DatePicker/TimePicker.js +6 -7
  26. package/dist/Components/DatePicker/TimePickerInput.js +6 -7
  27. package/dist/Components/Divider/Divider.js +1 -2
  28. package/dist/Components/Drawer/Drawer.js +1 -2
  29. package/dist/Components/Dropdown/DropDown.js +22 -26
  30. package/dist/Components/Editor/Editor.js +10 -13
  31. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -2
  32. package/dist/Components/EmptyState/EmptyState.js +11 -11
  33. package/dist/Components/FieldSelectModal/FieldSelectModal.js +1 -1
  34. package/dist/Components/FilePreview/FilePreview.js +2 -2
  35. package/dist/Components/FileUpload/FileUpload.js +18 -24
  36. package/dist/Components/FileUploader/FileUploader.js +5 -6
  37. package/dist/Components/FilterSidebar/FilterSidebar.js +156 -160
  38. package/dist/Components/Form/FormWrapper.js +1 -2
  39. package/dist/Components/Header/Header.js +6 -6
  40. package/dist/Components/Header/HeaderActions.js +3 -3
  41. package/dist/Components/Header/components/desktopMenu.js +7 -20
  42. package/dist/Components/Header/components/mobileMenu.js +3 -15
  43. package/dist/Components/Input/Input/Input.js +13 -17
  44. package/dist/Components/Input/TextInput.styles.js +10 -13
  45. package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -1
  46. package/dist/Components/InputTextArea/InputTextArea.style.js +10 -11
  47. package/dist/Components/KanbanBoard/AccountCard.js +10 -4
  48. package/dist/Components/KanbanBoard/AccountRow.js +1 -2
  49. package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  50. package/dist/Components/KanbanBoard/KanbanBoard.js +21 -28
  51. package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
  52. package/dist/Components/LimitReachedModal/LimitReachedModal.js +3 -15
  53. package/dist/Components/Loading/Loading.js +1 -1
  54. package/dist/Components/Modal/Modal.js +3 -1
  55. package/dist/Components/MoreItems/MoreItems.js +3 -7
  56. package/dist/Components/MultiSelect/MultiSelect.js +5 -6
  57. package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -1
  58. package/dist/Components/NavigationBar/NavigationBar.js +22 -18
  59. package/dist/Components/NavigationBar/NavigationBarProps.d.ts +5 -0
  60. package/dist/Components/NoteTextArea/NoteTextArea.js +4 -8
  61. package/dist/Components/Notification/Notification.js +17 -15
  62. package/dist/Components/NumberInput/NumberInput.styles.js +10 -11
  63. package/dist/Components/OrgSwitcher/OrgSwitcher.js +6 -7
  64. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +2 -0
  65. package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +6 -2
  66. package/dist/Components/OrganizationDetails/CreateOrgModal.js +1 -2
  67. package/dist/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
  68. package/dist/Components/OrganizationDetails/OrganizationDetails.js +25 -22
  69. package/dist/Components/PdfViewer/PdfViewer.js +1 -1
  70. package/dist/Components/PinInputs/PinInputs.js +7 -14
  71. package/dist/Components/PlanPill/PlanPill.js +4 -7
  72. package/dist/Components/PlanPill/planPillGradient.d.ts +19 -0
  73. package/dist/Components/PlanPill/planPillGradient.js +30 -1
  74. package/dist/Components/ProductCard/ProductPrice.js +6 -6
  75. package/dist/Components/ProductCard/ProductReview.js +4 -1
  76. package/dist/Components/ProductCard/ProductTags.js +4 -4
  77. package/dist/Components/ProductDetails/ProductDetails.js +3 -1
  78. package/dist/Components/ProductDetails/ProductDtlPrice.js +3 -3
  79. package/dist/Components/ProfileCard/ProfileCard.js +4 -4
  80. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +19 -16
  81. package/dist/Components/Reorder/Reorder.js +3 -4
  82. package/dist/Components/RolesPermission/DeleteRoleModal.js +5 -4
  83. package/dist/Components/RolesPermission/RolesPermission.js +12 -14
  84. package/dist/Components/ScrollToTop/ScrollToTop.js +2 -3
  85. package/dist/Components/SearchSelect/SearchSelect.js +25 -28
  86. package/dist/Components/Select/Select.styles.js +33 -37
  87. package/dist/Components/SelectSearch/SelectSearch.js +8 -8
  88. package/dist/Components/SelectV2/SelectV2.js +14 -20
  89. package/dist/Components/SideBar/SecondaryBar.js +10 -15
  90. package/dist/Components/SideBar/SideBar.d.ts +1 -1
  91. package/dist/Components/SideBar/SideBar.js +41 -34
  92. package/dist/Components/SideBar/SideBarProps.d.ts +6 -0
  93. package/dist/Components/SideBar/components/MenuItemBox.js +10 -12
  94. package/dist/Components/SideBar/components/MenuItems.js +3 -1
  95. package/dist/Components/SideBar/components/MenuPopoverContent.js +7 -9
  96. package/dist/Components/SideBar/components/OtherApps.js +4 -4
  97. package/dist/Components/SideBar/sidebarAccentColors.d.ts +4 -17
  98. package/dist/Components/SideBar/sidebarAccentColors.js +6 -33
  99. package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -7
  100. package/dist/Components/Slider/Slider.js +2 -2
  101. package/dist/Components/StageProgress/StageProgressProps.js +9 -13
  102. package/dist/Components/Table/Table.js +10 -10
  103. package/dist/Components/Table/components/HeaderActions.js +6 -7
  104. package/dist/Components/Table/components/Pagination.js +1 -1
  105. package/dist/Components/Table/components/TableActions.js +4 -4
  106. package/dist/Components/Table/components/TableBody.js +18 -20
  107. package/dist/Components/Table/components/TableGroupRow.js +1 -2
  108. package/dist/Components/Table/components/TableHeader.js +8 -12
  109. package/dist/Components/Table/components/TableSearch.js +1 -2
  110. package/dist/Components/Table/components/tableRowHoverStyle.js +2 -3
  111. package/dist/Components/Table/filters/ActiveFilters.js +5 -8
  112. package/dist/Components/Table/filters/CompactSelect.js +4 -5
  113. package/dist/Components/Table/filters/LeftFilterPane.js +4 -5
  114. package/dist/Components/Table/filters/TableFilters.js +1 -2
  115. package/dist/Components/Table/hooks/useTable.js +8 -11
  116. package/dist/Components/Table/settings/ManageColumns.js +1 -1
  117. package/dist/Components/Table/settings/TableSettings.js +12 -14
  118. package/dist/Components/Tag/Tag.styles.js +8 -6
  119. package/dist/Components/Timeline/Timeline.js +32 -45
  120. package/dist/Components/Toaster/Toaster.js +43 -44
  121. package/dist/Components/ToolTip/ToolTip.js +1 -6
  122. package/dist/Components/Trail/EditableCell.js +4 -1
  123. package/dist/Components/Trail/TrailWorks.js +3 -3
  124. package/dist/Components/UpgradeButton/UpgradeButton.js +2 -4
  125. package/dist/Components/UserDetails/AddUserModal.js +3 -3
  126. package/dist/Components/UserDetails/ChangeRoleModal.js +2 -2
  127. package/dist/Components/UserDetails/DeactivateConfirmModal.js +5 -5
  128. package/dist/Components/UserDetails/UserDetails.js +14 -16
  129. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
  130. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
  131. package/dist/Theme/assertPalette.d.ts +11 -0
  132. package/dist/Theme/assertPalette.js +55 -0
  133. package/dist/Theme/chakra/Avatar.styles.d.ts +5 -5
  134. package/dist/Theme/chakra/Avatar.styles.js +2 -2
  135. package/dist/Theme/chakra/Drawer.styles.d.ts +5 -5
  136. package/dist/Theme/chakra/Drawer.styles.js +8 -10
  137. package/dist/Theme/chakra/Modal.styles.d.ts +5 -5
  138. package/dist/Theme/chakra/Modal.styles.js +8 -10
  139. package/dist/Theme/chakra/Popover.styles.d.ts +3 -3
  140. package/dist/Theme/chakra/Slider.styles.d.ts +1 -1
  141. package/dist/Theme/chakra/Slider.styles.js +7 -9
  142. package/dist/Theme/chakra/Tabs.styles.d.ts +2 -2
  143. package/dist/Theme/chakra/Tabs.styles.js +13 -18
  144. package/dist/Theme/chakra/componentStyles.d.ts +54 -21
  145. package/dist/Theme/chakra/componentStyles.js +52 -43
  146. package/dist/Theme/chakra/paletteFromTheme.d.ts +10 -0
  147. package/dist/Theme/chakra/paletteFromTheme.js +14 -0
  148. package/dist/Theme/provider/PixelizeThemeProvider.js +5 -0
  149. package/dist/Theme/testing/testPalette.d.ts +16 -0
  150. package/dist/Theme/testing/testPalette.js +24 -0
  151. package/dist/Theme/tokens/brands/emerald/palette.light.d.ts +2 -373
  152. package/dist/Theme/tokens/brands/index.d.ts +3 -2
  153. package/dist/Theme/tokens/brands/index.js +29 -23
  154. package/dist/Theme/tokens/brands/lavender/palette.light.d.ts +2 -373
  155. package/dist/Theme/tokens/brands/meadow/palette.light.d.ts +2 -373
  156. package/dist/Theme/tokens/brands/radiant/palette.light.d.ts +2 -373
  157. package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts +2 -373
  158. package/dist/Theme/tokens/brands/skyline/palette.light.d.ts +2 -373
  159. package/dist/Theme/tokens/brands/slate/palette.light.d.ts +2 -373
  160. package/dist/Theme/tokens/brands/slate/palette.light.js +1 -1
  161. package/dist/Theme/tokens/brands/storefront/palette.light.d.ts +2 -373
  162. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +5 -3
  163. package/dist/Theme/tokens/brands/zinc/palette.dark.js +2 -1
  164. package/dist/Theme/tokens/brands/zinc/palette.light.d.ts +2 -373
  165. package/dist/Theme/tokens/builders/accentText.d.ts +2 -2
  166. package/dist/Theme/tokens/builders/accentText.js +8 -27
  167. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +2 -2
  168. package/dist/Theme/tokens/builders/buildDarkPalette.js +16 -8
  169. package/dist/Theme/tokens/builders/mutedText.d.ts +5 -0
  170. package/dist/Theme/tokens/builders/mutedText.js +9 -0
  171. package/dist/Theme/tokens/builders/outlineRung.d.ts +7 -6
  172. package/dist/Theme/tokens/builders/outlineRung.js +20 -18
  173. package/dist/Theme/tokens/builders/resolvedRungs.d.ts +7 -0
  174. package/dist/Theme/tokens/builders/resolvedRungs.js +25 -0
  175. package/dist/Theme/tokens/builders/semanticText.d.ts +10 -0
  176. package/dist/Theme/tokens/builders/semanticText.js +22 -0
  177. package/dist/Theme/tokens/builders/sidebarAccent.d.ts +9 -0
  178. package/dist/Theme/tokens/builders/sidebarAccent.js +29 -0
  179. package/dist/Theme/tokens/builders/statusTone.js +3 -4
  180. package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -0
  181. package/dist/Theme/tokens/builders/surfaceRungs.js +39 -0
  182. package/dist/Theme/tokens/types.d.ts +36 -13
  183. package/dist/Theme/useCustomTheme.js +4 -1
  184. package/dist/Utils/table.d.ts +1 -7
  185. package/dist/Utils/table.js +27 -35
  186. package/dist/esm/Components/Accordion/Accordion.js +14 -16
  187. package/dist/esm/Components/Accordion/accordionColors.js +6 -9
  188. package/dist/esm/Components/AlertDialog/AlertDialog.js +1 -2
  189. package/dist/esm/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
  190. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
  191. package/dist/esm/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
  192. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +9 -7
  193. package/dist/esm/Components/Button/Button.styles.js +4 -10
  194. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +9 -10
  195. package/dist/esm/Components/Common/ErrorComponent.js +6 -9
  196. package/dist/esm/Components/Common/ErrorMessage.js +2 -8
  197. package/dist/esm/Components/Common/FormLabel.js +1 -3
  198. package/dist/esm/Components/Common/FormattedDescription.js +3 -1
  199. package/dist/esm/Components/Common/Label.js +3 -8
  200. package/dist/esm/Components/Common/fieldStyles.js +6 -7
  201. package/dist/esm/Components/ContactForm/ContactForm.js +1 -2
  202. package/dist/esm/Components/CopyButton/CopyButton.js +3 -6
  203. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +7 -10
  204. package/dist/esm/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
  205. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -3
  206. package/dist/esm/Components/DatePicker/CalendarPanel.js +2 -3
  207. package/dist/esm/Components/DatePicker/RangeDatePicker.js +9 -9
  208. package/dist/esm/Components/DatePicker/SingleDatePicker.js +11 -11
  209. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -2
  210. package/dist/esm/Components/DatePicker/TimePicker.js +6 -7
  211. package/dist/esm/Components/DatePicker/TimePickerInput.js +6 -7
  212. package/dist/esm/Components/Divider/Divider.js +1 -2
  213. package/dist/esm/Components/Drawer/Drawer.js +1 -2
  214. package/dist/esm/Components/Dropdown/DropDown.js +22 -26
  215. package/dist/esm/Components/Editor/Editor.js +11 -14
  216. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -2
  217. package/dist/esm/Components/EmptyState/EmptyState.js +11 -11
  218. package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +1 -1
  219. package/dist/esm/Components/FilePreview/FilePreview.js +2 -2
  220. package/dist/esm/Components/FileUpload/FileUpload.js +18 -24
  221. package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
  222. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +157 -161
  223. package/dist/esm/Components/Form/FormWrapper.js +1 -2
  224. package/dist/esm/Components/Header/Header.js +6 -6
  225. package/dist/esm/Components/Header/HeaderActions.js +3 -3
  226. package/dist/esm/Components/Header/components/desktopMenu.js +8 -21
  227. package/dist/esm/Components/Header/components/mobileMenu.js +3 -15
  228. package/dist/esm/Components/Input/Input/Input.js +14 -18
  229. package/dist/esm/Components/Input/TextInput.styles.js +10 -13
  230. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +10 -11
  231. package/dist/esm/Components/KanbanBoard/AccountCard.js +10 -4
  232. package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -2
  233. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  234. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +21 -28
  235. package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
  236. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +4 -16
  237. package/dist/esm/Components/Loading/Loading.js +1 -1
  238. package/dist/esm/Components/Modal/Modal.js +3 -1
  239. package/dist/esm/Components/MoreItems/MoreItems.js +3 -7
  240. package/dist/esm/Components/MultiSelect/MultiSelect.js +5 -6
  241. package/dist/esm/Components/NavigationBar/NavigationBar.js +23 -19
  242. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +4 -8
  243. package/dist/esm/Components/Notification/Notification.js +18 -16
  244. package/dist/esm/Components/NumberInput/NumberInput.styles.js +10 -11
  245. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +7 -8
  246. package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +5 -1
  247. package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +1 -2
  248. package/dist/esm/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
  249. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +25 -22
  250. package/dist/esm/Components/PdfViewer/PdfViewer.js +1 -1
  251. package/dist/esm/Components/PinInputs/PinInputs.js +8 -15
  252. package/dist/esm/Components/PlanPill/PlanPill.js +5 -8
  253. package/dist/esm/Components/PlanPill/planPillGradient.js +24 -0
  254. package/dist/esm/Components/ProductCard/ProductPrice.js +6 -6
  255. package/dist/esm/Components/ProductCard/ProductReview.js +4 -1
  256. package/dist/esm/Components/ProductCard/ProductTags.js +5 -5
  257. package/dist/esm/Components/ProductDetails/ProductDetails.js +3 -1
  258. package/dist/esm/Components/ProductDetails/ProductDtlPrice.js +3 -3
  259. package/dist/esm/Components/ProfileCard/ProfileCard.js +5 -5
  260. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +20 -17
  261. package/dist/esm/Components/Reorder/Reorder.js +3 -4
  262. package/dist/esm/Components/RolesPermission/DeleteRoleModal.js +5 -4
  263. package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -14
  264. package/dist/esm/Components/ScrollToTop/ScrollToTop.js +2 -3
  265. package/dist/esm/Components/SearchSelect/SearchSelect.js +25 -28
  266. package/dist/esm/Components/Select/Select.styles.js +33 -37
  267. package/dist/esm/Components/SelectSearch/SelectSearch.js +8 -8
  268. package/dist/esm/Components/SelectV2/SelectV2.js +14 -20
  269. package/dist/esm/Components/SideBar/SecondaryBar.js +11 -16
  270. package/dist/esm/Components/SideBar/SideBar.js +43 -36
  271. package/dist/esm/Components/SideBar/components/MenuItemBox.js +11 -13
  272. package/dist/esm/Components/SideBar/components/MenuItems.js +3 -1
  273. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +8 -10
  274. package/dist/esm/Components/SideBar/components/OtherApps.js +4 -4
  275. package/dist/esm/Components/SideBar/sidebarAccentColors.js +5 -31
  276. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -7
  277. package/dist/esm/Components/Slider/Slider.js +2 -2
  278. package/dist/esm/Components/StageProgress/StageProgressProps.js +9 -13
  279. package/dist/esm/Components/Table/Table.js +10 -10
  280. package/dist/esm/Components/Table/components/HeaderActions.js +6 -7
  281. package/dist/esm/Components/Table/components/Pagination.js +1 -1
  282. package/dist/esm/Components/Table/components/TableActions.js +4 -4
  283. package/dist/esm/Components/Table/components/TableBody.js +18 -20
  284. package/dist/esm/Components/Table/components/TableGroupRow.js +1 -2
  285. package/dist/esm/Components/Table/components/TableHeader.js +8 -12
  286. package/dist/esm/Components/Table/components/TableSearch.js +1 -2
  287. package/dist/esm/Components/Table/components/tableRowHoverStyle.js +2 -3
  288. package/dist/esm/Components/Table/filters/ActiveFilters.js +5 -8
  289. package/dist/esm/Components/Table/filters/CompactSelect.js +4 -5
  290. package/dist/esm/Components/Table/filters/LeftFilterPane.js +4 -5
  291. package/dist/esm/Components/Table/filters/TableFilters.js +1 -2
  292. package/dist/esm/Components/Table/hooks/useTable.js +8 -11
  293. package/dist/esm/Components/Table/settings/ManageColumns.js +1 -1
  294. package/dist/esm/Components/Table/settings/TableSettings.js +12 -14
  295. package/dist/esm/Components/Tag/Tag.styles.js +9 -7
  296. package/dist/esm/Components/Timeline/Timeline.js +33 -46
  297. package/dist/esm/Components/Toaster/Toaster.js +44 -45
  298. package/dist/esm/Components/ToolTip/ToolTip.js +1 -6
  299. package/dist/esm/Components/Trail/EditableCell.js +4 -1
  300. package/dist/esm/Components/Trail/TrailWorks.js +4 -4
  301. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +2 -4
  302. package/dist/esm/Components/UserDetails/AddUserModal.js +3 -3
  303. package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -2
  304. package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +5 -5
  305. package/dist/esm/Components/UserDetails/UserDetails.js +15 -17
  306. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
  307. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
  308. package/dist/esm/Theme/assertPalette.js +50 -0
  309. package/dist/esm/Theme/chakra/Avatar.styles.js +2 -2
  310. package/dist/esm/Theme/chakra/Drawer.styles.js +8 -10
  311. package/dist/esm/Theme/chakra/Modal.styles.js +8 -10
  312. package/dist/esm/Theme/chakra/Slider.styles.js +7 -9
  313. package/dist/esm/Theme/chakra/Tabs.styles.js +13 -18
  314. package/dist/esm/Theme/chakra/componentStyles.js +53 -44
  315. package/dist/esm/Theme/chakra/paletteFromTheme.js +9 -0
  316. package/dist/esm/Theme/provider/PixelizeThemeProvider.js +5 -0
  317. package/dist/esm/Theme/testing/testPalette.js +19 -0
  318. package/dist/esm/Theme/tokens/brands/index.js +28 -23
  319. package/dist/esm/Theme/tokens/brands/slate/palette.light.js +1 -1
  320. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -2
  321. package/dist/esm/Theme/tokens/builders/accentText.js +8 -27
  322. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +17 -9
  323. package/dist/esm/Theme/tokens/builders/mutedText.js +5 -0
  324. package/dist/esm/Theme/tokens/builders/outlineRung.js +21 -19
  325. package/dist/esm/Theme/tokens/builders/resolvedRungs.js +20 -0
  326. package/dist/esm/Theme/tokens/builders/semanticText.js +17 -0
  327. package/dist/esm/Theme/tokens/builders/sidebarAccent.js +23 -0
  328. package/dist/esm/Theme/tokens/builders/statusTone.js +3 -4
  329. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +33 -0
  330. package/dist/esm/Theme/useCustomTheme.js +4 -1
  331. package/dist/esm/Utils/table.js +28 -36
  332. package/dist/esm/index.js +1 -0
  333. package/dist/index.d.ts +1 -0
  334. package/dist/index.js +9 -2
  335. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { paletteOf } from "./paletteFromTheme.js";
1
2
  import { createMultiStyleConfigHelpers, cssVar } from "@chakra-ui/react";
2
3
  import { sliderAnatomy } from "@chakra-ui/anatomy";
3
4
  const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(sliderAnatomy.keys);
@@ -8,15 +9,12 @@ const $thumbBg = cssVar("slider-thumb-bg");
8
9
  * every bare `<SliderThumb>` renders a literal white circle on the dark canvas regardless of mode,
9
10
  * same bug class as Menu/Modal but without even the dead `_dark` branch.
10
11
  */
11
- const baseStyle = definePartsStyle(({ theme }) => {
12
- var _a, _b, _c, _d, _e, _f;
13
- return ({
14
- thumb: {
15
- [$thumbBg.variable]: (_f = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.light) !== null && _c !== void 0 ? _c : (_e = (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.background) === null || _e === void 0 ? void 0 : _e[50]) !== null && _f !== void 0 ? _f : "#fff",
16
- bg: $thumbBg.reference,
17
- },
18
- });
19
- });
12
+ const baseStyle = definePartsStyle(({ theme }) => ({
13
+ thumb: {
14
+ [$thumbBg.variable]: paletteOf(theme).backgroundColor.light,
15
+ bg: $thumbBg.reference,
16
+ },
17
+ }));
20
18
  export const Slider = defineMultiStyleConfig({
21
19
  baseStyle,
22
20
  });
@@ -1,3 +1,4 @@
1
+ import { paletteOf } from "./paletteFromTheme.js";
1
2
  import { createMultiStyleConfigHelpers, cssVar } from "@chakra-ui/react";
2
3
  import { tabsAnatomy } from "@chakra-ui/anatomy";
3
4
  const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(tabsAnatomy.keys);
@@ -10,26 +11,20 @@ const $border = cssVar("tabs-border-color");
10
11
  * gated behind `_dark`, which this theme-swap app never triggers. Every selected `enclosed`/
11
12
  * `enclosed-colored` tab renders a white seam/fill on the dark canvas.
12
13
  */
13
- const variantEnclosed = definePartsStyle(({ theme }) => {
14
- var _a, _b, _c, _d, _e, _f;
15
- return ({
16
- tab: {
17
- _selected: {
18
- [$border.variable]: (_f = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.light) !== null && _c !== void 0 ? _c : (_e = (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.background) === null || _e === void 0 ? void 0 : _e[50]) !== null && _f !== void 0 ? _f : "#fff",
19
- },
14
+ const variantEnclosed = definePartsStyle(({ theme }) => ({
15
+ tab: {
16
+ _selected: {
17
+ [$border.variable]: paletteOf(theme).backgroundColor.light,
20
18
  },
21
- });
22
- });
23
- const variantEnclosedColored = definePartsStyle(({ theme }) => {
24
- var _a, _b, _c, _d, _e, _f;
25
- return ({
26
- tab: {
27
- _selected: {
28
- [$bg.variable]: (_f = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.light) !== null && _c !== void 0 ? _c : (_e = (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.background) === null || _e === void 0 ? void 0 : _e[50]) !== null && _f !== void 0 ? _f : "#fff",
29
- },
19
+ },
20
+ }));
21
+ const variantEnclosedColored = definePartsStyle(({ theme }) => ({
22
+ tab: {
23
+ _selected: {
24
+ [$bg.variable]: paletteOf(theme).backgroundColor.light,
30
25
  },
31
- });
32
- });
26
+ },
27
+ }));
33
28
  export const Tabs = defineMultiStyleConfig({
34
29
  variants: {
35
30
  enclosed: variantEnclosed,
@@ -1,4 +1,6 @@
1
- import { cssVar } from "@chakra-ui/react";
1
+ import { paletteOf, scaleFor } from "./paletteFromTheme.js";
2
+ import { alertAnatomy } from "@chakra-ui/anatomy";
3
+ import { createMultiStyleConfigHelpers, cssVar, } from "@chakra-ui/react";
2
4
  import { Button } from "../../Components/Button/Button.styles.js";
3
5
  import { Checkbox } from "../../Components/Checkbox/Checkbox.styles.js";
4
6
  import { Input } from "../../Components/Input/TextInput.styles.js";
@@ -27,14 +29,12 @@ const isHexColor = (color) => typeof color === "string" && /^#([0-9a-f]{3}|[0-9a
27
29
  const Badge = {
28
30
  variants: {
29
31
  solid: ({ theme, colorScheme = "gray" }) => {
30
- var _a, _b, _c, _d, _e, _f, _g, _h;
31
- const swatch = (_d = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a[colorScheme]) !== null && _b !== void 0 ? _b : (_c = theme.colors) === null || _c === void 0 ? void 0 : _c.gray) !== null && _d !== void 0 ? _d : {};
32
- const bg = swatch === null || swatch === void 0 ? void 0 : swatch[500];
33
- const white = (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.white) !== null && _f !== void 0 ? _f : "#fff";
34
- const black = (_h = (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.black) !== null && _h !== void 0 ? _h : "#000";
32
+ const palette = paletteOf(theme);
33
+ const swatch = scaleFor(palette, colorScheme);
34
+ const bg = swatch[500];
35
35
  return {
36
36
  bg,
37
- color: isHexColor(bg) ? onFilled(bg, white, black) : swatch === null || swatch === void 0 ? void 0 : swatch[800],
37
+ color: isHexColor(bg) ? onFilled(bg, palette.white, palette.black) : swatch[800],
38
38
  };
39
39
  },
40
40
  // Chakra's stock `subtle` picks its bg/color pair via `mode()`, keyed to Chakra's own
@@ -42,11 +42,11 @@ const Badge = {
42
42
  // it always takes the light-mode branch. Applied to our mode-reversed dark scales, that
43
43
  // branch's fixed rung pair (100/800) measures 4.06 in dark mode, just under AA.
44
44
  subtle: ({ theme, colorScheme = "gray" }) => {
45
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
46
- const swatch = (_d = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a[colorScheme]) !== null && _b !== void 0 ? _b : (_c = theme.colors) === null || _c === void 0 ? void 0 : _c.gray) !== null && _d !== void 0 ? _d : {};
47
- const bg = (_e = swatch === null || swatch === void 0 ? void 0 : swatch[100]) !== null && _e !== void 0 ? _e : swatch === null || swatch === void 0 ? void 0 : swatch[50];
45
+ const palette = paletteOf(theme);
46
+ const swatch = scaleFor(palette, colorScheme);
47
+ const bg = swatch[100];
48
48
  if (!isHexColor(bg))
49
- return { bg, color: swatch === null || swatch === void 0 ? void 0 : swatch[800] };
49
+ return { bg, color: swatch[800] };
50
50
  // accentTextOnCanvas keeps brand hue by trying this scale's own rungs first, but some
51
51
  // narrow-gamut hues (e.g. yellow) don't reach far enough at either end to clear AA against
52
52
  // every bg they can land on in dark mode (measured 4.42 for a reversed-yellow badge) — its
@@ -56,9 +56,7 @@ const Badge = {
56
56
  const accent = accentTextOnCanvas(swatch, bg);
57
57
  if (contrastRatio(accent, bg) >= 4.5)
58
58
  return { bg, color: accent };
59
- const white = (_g = (_f = theme.colors) === null || _f === void 0 ? void 0 : _f.white) !== null && _g !== void 0 ? _g : "#fff";
60
- const black = (_j = (_h = theme.colors) === null || _h === void 0 ? void 0 : _h.black) !== null && _j !== void 0 ? _j : "#000";
61
- return { bg, color: onFilled(bg, white, black) };
59
+ return { bg, color: onFilled(bg, palette.white, palette.black) };
62
60
  },
63
61
  },
64
62
  defaultProps: {
@@ -72,16 +70,35 @@ const Badge = {
72
70
  // unfixed.
73
71
  const FormError = {
74
72
  baseStyle: ({ theme }) => {
75
- var _a, _b, _c, _d;
76
73
  // `icon` (FormErrorIcon) shares the same AA gap as `text` — both must be fixed together or
77
74
  // the icon stays on Chakra's raw `red.500`.
78
- const color = accentTextOnCanvas((_a = theme.colors) === null || _a === void 0 ? void 0 : _a.red, (_d = (_c = (_b = theme.colors) === null || _b === void 0 ? void 0 : _b.backgroundColor) === null || _c === void 0 ? void 0 : _c.main) !== null && _d !== void 0 ? _d : "#ffffff");
75
+ const palette = paletteOf(theme);
76
+ const color = accentTextOnCanvas(palette.red, palette.backgroundColor.main);
79
77
  return {
80
78
  text: { color },
81
79
  icon: { color },
82
80
  };
83
81
  },
84
82
  };
83
+ const $alertFg = cssVar("alert-fg");
84
+ const $alertBg = cssVar("alert-bg");
85
+ const { defineMultiStyleConfig: defineAlertStyles, definePartsStyle: defineAlertParts } = createMultiStyleConfigHelpers(alertAnatomy.keys);
86
+ const Alert = defineAlertStyles({
87
+ variants: {
88
+ solid: defineAlertParts(({ theme, colorScheme = "gray" }) => {
89
+ const palette = paletteOf(theme);
90
+ const bg = scaleFor(palette, colorScheme)[500];
91
+ if (!isHexColor(bg))
92
+ return { container: {} };
93
+ return {
94
+ container: {
95
+ [$alertBg.variable]: bg,
96
+ [$alertFg.variable]: onFilled(bg, palette.white, palette.black),
97
+ },
98
+ };
99
+ }),
100
+ },
101
+ });
85
102
  const $tooltipBg = cssVar("tooltip-bg");
86
103
  const $tooltipFg = cssVar("tooltip-fg");
87
104
  /**
@@ -95,13 +112,10 @@ const $tooltipFg = cssVar("tooltip-fg");
95
112
  * deliberately never remaps, so they stay a stable dark-bg/white-text pair in both modes.
96
113
  */
97
114
  const Tooltip = {
98
- baseStyle: ({ theme }) => {
99
- var _a, _b, _c, _d;
100
- return ({
101
- [$tooltipBg.variable]: (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.black) !== null && _b !== void 0 ? _b : "colors.gray.700",
102
- [$tooltipFg.variable]: (_d = (_c = theme.colors) === null || _c === void 0 ? void 0 : _c.white) !== null && _d !== void 0 ? _d : "colors.whiteAlpha.900",
103
- });
104
- },
115
+ baseStyle: ({ theme }) => ({
116
+ [$tooltipBg.variable]: theme.colors.black,
117
+ [$tooltipFg.variable]: theme.colors.white,
118
+ }),
105
119
  };
106
120
  const $skeletonStart = cssVar("skeleton-start-color");
107
121
  const $skeletonEnd = cssVar("skeleton-end-color");
@@ -115,15 +129,12 @@ const $skeletonEnd = cssVar("skeleton-end-color");
115
129
  * prop still wins via that mechanism, this only supplies the default the base style already owns.
116
130
  */
117
131
  const Skeleton = {
118
- baseStyle: ({ theme }) => {
119
- var _a, _b, _c, _d, _e, _f;
120
- return ({
121
- [$skeletonStart.variable]: (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.gray) === null || _b === void 0 ? void 0 : _b[100]) !== null && _c !== void 0 ? _c : "colors.gray.100",
122
- [$skeletonEnd.variable]: (_f = (_e = (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.gray) === null || _e === void 0 ? void 0 : _e[300]) !== null && _f !== void 0 ? _f : "colors.gray.400",
123
- background: $skeletonStart.reference,
124
- borderColor: $skeletonEnd.reference,
125
- });
126
- },
132
+ baseStyle: ({ theme }) => ({
133
+ [$skeletonStart.variable]: paletteOf(theme).gray[100],
134
+ [$skeletonEnd.variable]: paletteOf(theme).gray[300],
135
+ background: $skeletonStart.reference,
136
+ borderColor: $skeletonEnd.reference,
137
+ }),
127
138
  };
128
139
  // Chakra's `extendTheme` does not REPLACE a component's stock baseStyle when ours is also a
129
140
  // function — it calls BOTH and deep-merges the two returned plain objects, key by key. Chakra's
@@ -139,12 +150,9 @@ const Skeleton = {
139
150
  // behavior directly rather than only the function output).
140
151
  const Radio = {
141
152
  baseStyle: ({ theme, colorScheme }) => {
142
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
143
- const swatch = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a[colorScheme];
144
- const fill = (_b = swatch === null || swatch === void 0 ? void 0 : swatch[500]) !== null && _b !== void 0 ? _b : (_d = (_c = theme.colors) === null || _c === void 0 ? void 0 : _c.primary) === null || _d === void 0 ? void 0 : _d[500];
145
- const white = (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.white) !== null && _f !== void 0 ? _f : "#ffffff";
146
- const black = (_h = (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.black) !== null && _h !== void 0 ? _h : "#000000";
147
- const dot = onFilled(fill, white, black);
153
+ const palette = paletteOf(theme);
154
+ const fill = scaleFor(palette, colorScheme)[500];
155
+ const dot = onFilled(fill, palette.white, palette.black);
148
156
  // A browser probe found the checked radio's hover repeating its own resting `fill` —
149
157
  // Chakra's stock checked._hover (inherited from checkbox) lands on the SAME `bg`/`borderColor`
150
158
  // keys we do, so extendTheme's merge is a scalar overwrite here, not a coexisting selector;
@@ -153,7 +161,7 @@ const Radio = {
153
161
  const hoverFill = resolveHoverTint(fill, fill);
154
162
  return {
155
163
  control: {
156
- borderColor: (_k = (_j = theme.colors) === null || _j === void 0 ? void 0 : _j.boxborder) === null || _k === void 0 ? void 0 : _k[500],
164
+ borderColor: palette.boxborder[500],
157
165
  _checked: {
158
166
  bg: `${fill} !important`,
159
167
  borderColor: `${fill} !important`,
@@ -187,16 +195,17 @@ const $closeButtonBg = cssVar("close-button-bg");
187
195
  */
188
196
  const CloseButton = {
189
197
  baseStyle: ({ theme }) => {
190
- var _a, _b, _c, _d, _e;
191
- const dark = isDarkCanvas((_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.main) !== null && _c !== void 0 ? _c : "#ffffff");
192
- const alpha = dark ? (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.whiteAlpha : (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.blackAlpha;
198
+ const palette = paletteOf(theme);
199
+ const dark = isDarkCanvas(palette.backgroundColor.main);
200
+ const alpha = scaleFor(palette, dark ? "whiteAlpha" : "blackAlpha");
193
201
  return {
194
- _hover: { [$closeButtonBg.variable]: alpha === null || alpha === void 0 ? void 0 : alpha[200] },
195
- _active: { [$closeButtonBg.variable]: alpha === null || alpha === void 0 ? void 0 : alpha[300] },
202
+ _hover: { [$closeButtonBg.variable]: alpha[200] },
203
+ _active: { [$closeButtonBg.variable]: alpha[300] },
196
204
  };
197
205
  },
198
206
  };
199
207
  export const componentStyles = {
208
+ Alert,
200
209
  Checkbox,
201
210
  Radio,
202
211
  Input,
@@ -0,0 +1,9 @@
1
+ import { assertPixelizePalette } from "../assertPalette.js";
2
+ /** Chakra hands style functions an untyped theme; this is the boundary that makes it typed. */
3
+ export const paletteOf = (theme) => assertPixelizePalette(theme);
4
+ const asScale = (value) => typeof value === "object" && value !== null ? value : undefined;
5
+ /**
6
+ * `colorScheme` is a consumer-supplied Chakra scale name, so this lookup is genuinely dynamic —
7
+ * it can name a built-in we never themed. An unknown name resolves to the neutral ramp.
8
+ */
9
+ export const scaleFor = (palette, colorScheme) => { var _a; return (_a = asScale(palette[colorScheme])) !== null && _a !== void 0 ? _a : palette.gray; };
@@ -109,6 +109,11 @@ export const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRA
109
109
  useLayoutEffect(() => {
110
110
  document.documentElement.style.colorScheme = resolvedMode;
111
111
  }, [resolvedMode]);
112
+ // Chakra's ColorModeProvider re-writes color-scheme in a passive effect, after the layout
113
+ // effect above, and forcedLightColorModeManager pins it to "light". Re-assert after it.
114
+ useEffect(() => {
115
+ document.documentElement.style.colorScheme = resolvedMode;
116
+ }, [resolvedMode]);
112
117
  // Held in refs so a caller's inline arrow never re-creates `setMode`/`setBrand`, which would
113
118
  // invalidate the context value on every render of the consuming app. Written in a layout
114
119
  // effect, not during render — a render-phase write is unsafe under StrictMode's double
@@ -0,0 +1,19 @@
1
+ import { lightPalettes, darkPalettes } from "../tokens/brands/index.js";
2
+ const isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3
+ const deepMerge = (base, patch) => {
4
+ if (!isPlainObject(base) || !isPlainObject(patch))
5
+ return patch;
6
+ const out = { ...base };
7
+ for (const [key, value] of Object.entries(patch))
8
+ out[key] = deepMerge(base[key], value);
9
+ return out;
10
+ };
11
+ /** A complete palette for tests. Overrides layer onto a real brand, never replace a group. */
12
+ export const testPalette = (options = {}) => {
13
+ const { brand = "lavender", mode = "light", overrides = {} } = options;
14
+ const base = mode === "dark" ? darkPalettes[brand] : lightPalettes[brand];
15
+ return deepMerge(base, overrides);
16
+ };
17
+ export const testTheme = (options = {}) => ({
18
+ colors: testPalette(options),
19
+ });
@@ -16,23 +16,27 @@ import emeraldDark from "./emerald/palette.dark.js";
16
16
  import rosewoodDark from "./rosewood/palette.dark.js";
17
17
  import storefrontDark from "./storefront/palette.dark.js";
18
18
  import zincDark from "./zinc/palette.dark.js";
19
- import { pickAccentText } from "../builders/accentText.js";
19
+ import { pickAccentText, onFilled } from "../builders/accentText.js";
20
20
  import { withOutlineRung } from "../builders/outlineRung.js";
21
- /**
22
- * Derived here rather than hand-written into each brand's literal: it must track that brand's
23
- * own primary scale and canvas, and a stale hand-copied hex would silently fail AA.
24
- * Dark palettes get theirs inside `buildDarkPalette`.
25
- */
26
- const withAccentText = (palette) => {
27
- var _a;
28
- return ({
29
- ...palette,
30
- accentText: (_a = palette.accentText) !== null && _a !== void 0 ? _a : pickAccentText(palette.primary, palette.backgroundColor.main, "light"),
31
- });
32
- };
21
+ import { withSidebarTokens } from "../builders/sidebarAccent.js";
22
+ import { buildMutedText } from "../builders/mutedText.js";
23
+ import { buildSemanticText, buildOnSemantic } from "../builders/semanticText.js";
24
+ import { withPlaceholderRung, withTableHoverRung } from "../builders/resolvedRungs.js";
25
+ import { withSurfaceRungs } from "../builders/surfaceRungs.js";
26
+ /** Derived, never hand-written: a copied hex goes stale the moment a canvas moves. */
27
+ export const finalizeLightPalette = (source) => ({
28
+ ...source,
29
+ sidebar: withSidebarTokens(source),
30
+ accentText: pickAccentText(source.primary, source.backgroundColor.main),
31
+ textMuted: buildMutedText(source.text, source.backgroundColor.main),
32
+ semanticText: buildSemanticText(source.semantic, source.backgroundColor.main),
33
+ onPrimary: onFilled(source.primary[500], source.white, source.black),
34
+ onSemantic: buildOnSemantic(source.semantic, source.white, source.black),
35
+ });
33
36
  export { lavender, meadow, radiant, skyline, slate, emerald, rosewood, storefront, zinc };
34
37
  export { lavenderDark, meadowDark, radiantDark, skylineDark, slateDark, emeraldDark, rosewoodDark, storefrontDark, zincDark, };
35
- const lightBrand = (palette) => withOutlineRung(withAccentText(palette), "light");
38
+ const resolveRungs = (palette) => withSurfaceRungs(withTableHoverRung(withPlaceholderRung(withOutlineRung(palette))));
39
+ const lightBrand = (source) => resolveRungs(finalizeLightPalette(source));
36
40
  /** Light palette per brand. `lavender` is the base the other six extend. */
37
41
  export const lightPalettes = {
38
42
  lavender: lightBrand(lavender),
@@ -46,16 +50,17 @@ export const lightPalettes = {
46
50
  zinc: lightBrand(zinc),
47
51
  };
48
52
  /** Dark palette per brand, derived from the matching light palette. */
53
+ const darkBrand = (dark) => resolveRungs(dark);
49
54
  export const darkPalettes = {
50
- lavender: withOutlineRung(lavenderDark, "dark"),
51
- meadow: withOutlineRung(meadowDark, "dark"),
52
- radiant: withOutlineRung(radiantDark, "dark"),
53
- skyline: withOutlineRung(skylineDark, "dark"),
54
- slate: withOutlineRung(slateDark, "dark"),
55
- emerald: withOutlineRung(emeraldDark, "dark"),
56
- rosewood: withOutlineRung(rosewoodDark, "dark"),
57
- storefront: withOutlineRung(storefrontDark, "dark"),
58
- zinc: withOutlineRung(zincDark, "dark"),
55
+ lavender: darkBrand(lavenderDark),
56
+ meadow: darkBrand(meadowDark),
57
+ radiant: darkBrand(radiantDark),
58
+ skyline: darkBrand(skylineDark),
59
+ slate: darkBrand(slateDark),
60
+ emerald: darkBrand(emeraldDark),
61
+ rosewood: darkBrand(rosewoodDark),
62
+ storefront: darkBrand(storefrontDark),
63
+ zinc: darkBrand(zincDark),
59
64
  };
60
65
  // Built from lightPalettes/darkPalettes (not the raw literals) so accentText can never be
61
66
  // present on one map and missing on the other.
@@ -102,7 +102,7 @@ const palette = {
102
102
  200: "#f1f1f3",
103
103
  300: "#ebebed",
104
104
  400: "#e5e5e8",
105
- 500: "#dfdfе2",
105
+ 500: "#dfdfe2",
106
106
  600: "#cbcbcf",
107
107
  700: "#a0a0a5",
108
108
  800: "#787880",
@@ -1,6 +1,6 @@
1
1
  import { buildDarkPalette } from "../../builders/buildDarkPalette.js";
2
2
  import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
3
- import { pickAccentText } from "../../builders/accentText.js";
3
+ import { pickAccentText, onFilled } from "../../builders/accentText.js";
4
4
  import light from "./palette.light.js";
5
5
  /**
6
6
  * zinc dark is the shadcn dark look and INVERTS the primary: the filled button is near-white
@@ -192,7 +192,8 @@ const palette = {
192
192
  placeholder,
193
193
  disabled,
194
194
  table,
195
- accentText: pickAccentText(primary, derived.backgroundColor.main, "dark"),
195
+ accentText: pickAccentText(primary, derived.backgroundColor.main),
196
+ onPrimary: onFilled(PRIMARY_500, derived.white, derived.black),
196
197
  boxShadow: {
197
198
  primary: buildPrimaryShadowTint(PRIMARY_500),
198
199
  error: derived.boxShadow.error,
@@ -2,19 +2,11 @@ import { contrastRatio, relativeLuminance } from "./color.js";
2
2
  /** WCAG AA for normal-size text. Accent-as-text must clear this against the canvas. */
3
3
  const AA_NORMAL_TEXT = 4.5;
4
4
  /**
5
- * Rungs to try, ordered nearest-to-accent first. `primary[500]` is the true brand accent, so
6
- * it is always tried first and only stepped away from when it fails AA — that keeps brand
7
- * identity as strong as contrast allows instead of flattening every brand to one safe rung.
8
- *
9
- * Light canvases need darker rungs; dark canvases need lighter ones. Both walk 500 -> 900 because
10
- * BOTH ramps put their light end at 900: light mode runs light -> dark (so 900 is the darkest),
11
- * while every dark scale runs dark -> light (so 900 is the lightest). Same direction, opposite
12
- * meaning — walking 500 -> 100 for dark would step toward the canvas and land at ~1.4 contrast.
5
+ * Ordered nearest-to-accent first, so brand identity survives as far as contrast allows.
6
+ * One order serves both modes: light ramps run light -> dark and dark ramps run dark -> light,
7
+ * so 500 -> 900 always steps AWAY from that mode's own canvas.
13
8
  */
14
- const SEARCH_ORDER = {
15
- light: [500, 600, 700, 800, 900],
16
- dark: [500, 600, 700, 800, 900],
17
- };
9
+ const SEARCH_ORDER = [500, 600, 700, 800, 900];
18
10
  /**
19
11
  * Pick the accent rung to use for accent-COLORED TEXT sitting on the canvas.
20
12
  *
@@ -32,20 +24,9 @@ const SEARCH_ORDER = {
32
24
  * sparse test theme mock, a hand-built scale) — treat a missing rung as "doesn't clear AA" and
33
25
  * keep walking rather than crashing `contrastRatio` on `undefined`.
34
26
  */
35
- export const pickAccentText = (primary, canvas, mode) => {
36
- const safeInk = () => (contrastRatio("#ffffff", canvas) >= AA_NORMAL_TEXT ? "#ffffff" : "#000000");
37
- if (!primary)
38
- return safeInk();
39
- const order = SEARCH_ORDER[mode];
40
- const found = order.find((rung) => primary[rung] != null && contrastRatio(primary[rung], canvas) >= AA_NORMAL_TEXT);
41
- if (found !== undefined)
42
- return primary[found];
43
- for (let i = order.length - 1; i >= 0; i--) {
44
- const rung = primary[order[i]];
45
- if (rung != null)
46
- return rung;
47
- }
48
- return safeInk();
27
+ export const pickAccentText = (primary, canvas) => {
28
+ const found = SEARCH_ORDER.find((rung) => contrastRatio(primary[rung], canvas) >= AA_NORMAL_TEXT);
29
+ return primary[found !== null && found !== void 0 ? found : SEARCH_ORDER[SEARCH_ORDER.length - 1]];
49
30
  };
50
31
  /** Canvas assumed when no Pixelize theme is mounted. Never painted; only fed to contrast math. */
51
32
  export const DEFAULT_CANVAS = "#ffffff";
@@ -64,7 +45,7 @@ export const isDarkCanvas = (canvas) => relativeLuminance(canvas) < DARK_CANVAS_
64
45
  * failures (radiant 4.15, emerald 3.24, rosewood 3.29). Those brands now step to the nearest rung
65
46
  * that clears AA, which changes their light pixels — the accepted cost of meeting WCAG.
66
47
  */
67
- export const accentTextOnCanvas = (scale, canvas) => pickAccentText(scale, canvas, relativeLuminance(canvas) < DARK_CANVAS_LUMINANCE ? "dark" : "light");
48
+ export const accentTextOnCanvas = (scale, canvas) => pickAccentText(scale, canvas);
68
49
  /**
69
50
  * Ink for text drawn ON a filled swatch (a button/tag/badge fill), not the canvas. `white`/`black`
70
51
  * must be the mode-stable absolutes (`theme.colors.white` / `theme.colors.black`) — NOT a
@@ -1,6 +1,9 @@
1
1
  import { buildPrimaryOpacity, buildPrimaryShadowTint } from "./buildBrandTokens.js";
2
2
  import { contrastRatio, hexToHsl, hslToHex, withLightness } from "./color.js";
3
- import { pickAccentText } from "./accentText.js";
3
+ import { pickAccentText, onFilled } from "./accentText.js";
4
+ import { withSidebarTokens } from "./sidebarAccent.js";
5
+ import { buildMutedText } from "./mutedText.js";
6
+ import { buildSemanticText, buildOnSemantic } from "./semanticText.js";
4
7
  /**
5
8
  * Derives a brand's dark palette from its light palette.
6
9
  *
@@ -235,6 +238,12 @@ export function buildDarkPalette(light) {
235
238
  ]));
236
239
  const white = light.white;
237
240
  const primary = liftBrand(light.primary, white);
241
+ const semantic = {
242
+ success: liftAccent(light.semantic.success, white),
243
+ error: liftAccent(light.semantic.error, white),
244
+ warning: liftAccent(light.semantic.warning, white),
245
+ info: liftAccent(light.semantic.info, white),
246
+ };
238
247
  return {
239
248
  ...light,
240
249
  // Brand identity: hue preserved, accent lifted as far as the white label allows.
@@ -242,12 +251,7 @@ export function buildDarkPalette(light) {
242
251
  secondary: liftBrand(light.secondary, white),
243
252
  tertiary: liftBrand(light.tertiary, white),
244
253
  gradient: light.gradient,
245
- semantic: {
246
- success: liftAccent(light.semantic.success, white),
247
- error: liftAccent(light.semantic.error, white),
248
- warning: liftAccent(light.semantic.warning, white),
249
- info: liftAccent(light.semantic.info, white),
250
- },
254
+ semantic,
251
255
  // `white` stays white on purpose: it is the label color on filled buttons.
252
256
  transparent: light.transparent,
253
257
  black: light.black,
@@ -276,9 +280,13 @@ export function buildDarkPalette(light) {
276
280
  disabled: fromTargets(hueSource, DISABLED_TARGETS, DISABLED_SAT),
277
281
  // Derived from the LIFTED accent against the dark canvas: the lift stops at the white-label
278
282
  // floor (~4.55), which leaves primary[500] short of AA as text, so text needs its own rung.
279
- accentText: pickAccentText(primary, namedSurfaces.main, "dark"),
283
+ accentText: pickAccentText(primary, namedSurfaces.main),
284
+ textMuted: buildMutedText(fromTargets(hueSource, TEXT_TARGETS, TEXT_SAT), namedSurfaces.main),
285
+ semanticText: buildSemanticText(semantic, namedSurfaces.main),
286
+ onPrimary: onFilled(primary[500], light.white, light.black),
287
+ onSemantic: buildOnSemantic(semantic, light.white, light.black),
280
288
  // Sidebar is already near-black in light mode, so it needs no inversion.
281
- sidebar: light.sidebar,
289
+ sidebar: withSidebarTokens(light),
282
290
  boxShadow: {
283
291
  primary: buildPrimaryShadowTint(primary[500]),
284
292
  error: light.boxShadow.error,
@@ -0,0 +1,5 @@
1
+ import { liftToContrast } from "./outlineRung.js";
2
+ /** WCAG 1.4.3 — muted is still body text. */
3
+ export const AA_NORMAL_TEXT = 4.5;
4
+ /** Seeded from the ramp's muted rung so brand tint survives, then lifted until it clears AA. */
5
+ export const buildMutedText = (text, canvas) => liftToContrast(text[400], canvas, AA_NORMAL_TEXT);
@@ -1,5 +1,4 @@
1
- import { contrastRatio, hexToHsl, withLightness } from "./color.js";
2
- import { isDarkCanvas } from "./accentText.js";
1
+ import { contrastRatio, hexToHsl, relativeLuminance, withLightness } from "./color.js";
3
2
  /**
4
3
  * The floor a hover/active state's step off its own resting surface must clear to be seen at
5
4
  * all — same value the SideBar ladder, Accordion, and NavigationBar hover states are held to.
@@ -9,23 +8,27 @@ export const MIN_PERCEPTIBLE_STEP = 1.15;
9
8
  /** WCAG 1.4.11 — a control outline is a UI component boundary, held to 3:1. */
10
9
  export const AA_NON_TEXT = 3;
11
10
  /**
12
- * Walks a hex toward `target` contrast against `backdrop`, keeping its hue and saturation so the
13
- * result still reads as the same colour. Darkens when `mode` is light, lightens when dark, and
14
- * stops at the FIRST passing step so nothing overshoots to black or white.
11
+ * Walks a hex toward `target` contrast against `backdrop`, keeping hue and saturation.
12
+ * Direction is DERIVED from the backdrop, never passed: a mode argument here was redundant
13
+ * with the backdrop in every call site, and a redundant argument is one that can be wrong.
14
+ * Tries the far side first, falls back to the near side, and stops at the first passing step.
15
15
  */
16
- export function liftToContrast(hex, backdrop, mode, target = AA_NON_TEXT) {
16
+ export function liftToContrast(hex, backdrop, target = AA_NON_TEXT) {
17
17
  if (contrastRatio(hex, backdrop) >= target)
18
18
  return hex;
19
- const { s } = hexToHsl(hex);
20
- const step = mode === "dark" ? 1 : -1;
21
- let { l } = hexToHsl(hex);
22
- while (l > 0 && l < 100) {
23
- l += step;
24
- const next = withLightness(hex, l, s);
25
- if (contrastRatio(next, backdrop) >= target)
26
- return next;
19
+ const { s, l: start } = hexToHsl(hex);
20
+ const away = relativeLuminance(backdrop) < 0.5 ? 1 : -1;
21
+ for (const step of [away, -away]) {
22
+ let l = start;
23
+ while (l > 0 && l < 100) {
24
+ l += step;
25
+ const next = withLightness(hex, l, s);
26
+ if (contrastRatio(next, backdrop) >= target)
27
+ return next;
28
+ }
27
29
  }
28
- return withLightness(hex, mode === "dark" ? 100 : 0, s);
30
+ const ends = [withLightness(hex, 100, s), withLightness(hex, 0, s)];
31
+ return contrastRatio(ends[0], backdrop) >= contrastRatio(ends[1], backdrop) ? ends[0] : ends[1];
29
32
  }
30
33
  /**
31
34
  * `boxborder[500]` is the rung every control outline reads (Checkbox, SearchSelect, the date
@@ -36,7 +39,7 @@ export function liftToContrast(hex, backdrop, mode, target = AA_NON_TEXT) {
36
39
  * `border[*]` is deliberately untouched — that ramp draws table gridlines, which are decorative
37
40
  * and outside 1.4.11.
38
41
  */
39
- export function withOutlineRung(palette, mode) {
42
+ export function withOutlineRung(palette) {
40
43
  const current = palette.boxborder[500];
41
44
  // The border sits between the control's fill and the surface behind it; hold it to the
42
45
  // harder of the two.
@@ -44,7 +47,7 @@ export function withOutlineRung(palette, mode) {
44
47
  contrastRatio(current, palette.background[50])
45
48
  ? palette.backgroundColor.main
46
49
  : palette.background[50];
47
- const resolved = liftToContrast(current, backdrop, mode);
50
+ const resolved = liftToContrast(current, backdrop);
48
51
  if (resolved === current)
49
52
  return palette;
50
53
  return { ...palette, boxborder: { ...palette.boxborder, 500: resolved } };
@@ -58,6 +61,5 @@ export function withOutlineRung(palette, mode) {
58
61
  * its OWN list background, not necessarily the page canvas.
59
62
  */
60
63
  export function resolveHoverTint(seed, restSurface) {
61
- const mode = isDarkCanvas(restSurface) ? "dark" : "light";
62
- return liftToContrast(seed, restSurface, mode, MIN_PERCEPTIBLE_STEP);
64
+ return liftToContrast(seed, restSurface, MIN_PERCEPTIBLE_STEP);
63
65
  }
@@ -0,0 +1,20 @@
1
+ import { liftToContrast, AA_NON_TEXT } from "./outlineRung.js";
2
+ import { AA_NORMAL_TEXT } from "./accentText.js";
3
+ /** Placeholder text measured 4.32:1 on a card for 8 of 9 brands — text, so held to 4.5:1. */
4
+ export function withPlaceholderRung(palette) {
5
+ const resolved = liftToContrast(palette.placeholder[500], palette.background[50], AA_NORMAL_TEXT);
6
+ if (resolved === palette.placeholder[500])
7
+ return palette;
8
+ return { ...palette, placeholder: { ...palette.placeholder, 500: resolved } };
9
+ }
10
+ /** The hover row is a SURFACE, so it steps away from the ink rather than the ink moving. */
11
+ export function withTableHoverRung(palette) {
12
+ const resolved = liftToContrast(palette.table.hover[500], palette.text[500], AA_NORMAL_TEXT);
13
+ if (resolved === palette.table.hover[500])
14
+ return palette;
15
+ return {
16
+ ...palette,
17
+ table: { hover: { ...palette.table.hover, 500: resolved } },
18
+ };
19
+ }
20
+ export { AA_NON_TEXT };
@@ -0,0 +1,17 @@
1
+ import { liftToContrast } from "./outlineRung.js";
2
+ import { AA_NORMAL_TEXT, onFilled } from "./accentText.js";
3
+ export const SEMANTIC_TONES = ["success", "error", "warning", "info"];
4
+ /**
5
+ * `semantic[tone][500]` is a FILL rung — as ink on a light canvas it measures 1.84-3.68:1 across
6
+ * every brand. Each tone is stepped here until it clears AA as text, so a call site that wants
7
+ * "error-coloured text" cannot pick the unreadable one.
8
+ */
9
+ export const buildSemanticText = (semantic, canvas) => SEMANTIC_TONES.reduce((acc, tone) => {
10
+ acc[tone] = liftToContrast(semantic[tone][500], canvas, AA_NORMAL_TEXT);
11
+ return acc;
12
+ }, {});
13
+ /** Ink ON the fill, not on the canvas — the pair a CSS module needs but cannot compute. */
14
+ export const buildOnSemantic = (semantic, white, black) => SEMANTIC_TONES.reduce((acc, tone) => {
15
+ acc[tone] = onFilled(semantic[tone][500], white, black);
16
+ return acc;
17
+ }, {});