pixelize-design-library 2.4.1-beta.1 → 2.4.1-beta.3

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 (380) hide show
  1. package/dist/Assets/defaultLogo.d.ts.map +1 -1
  2. package/dist/Assets/defaultLogo.js +1 -3
  3. package/dist/Assets/defaultLogo.tsx +4 -8
  4. package/dist/Components/Accordion/accordionColors.d.ts.map +1 -1
  5. package/dist/Components/Accordion/accordionColors.js +17 -3
  6. package/dist/Components/Checkbox/Checkbox.styles.d.ts.map +1 -1
  7. package/dist/Components/Checkbox/Checkbox.styles.js +13 -2
  8. package/dist/Components/CustomModulesTable/EditModuleModal.d.ts.map +1 -1
  9. package/dist/Components/CustomModulesTable/EditModuleModal.js +5 -1
  10. package/dist/Components/DatePicker/CalendarPanel.d.ts.map +1 -1
  11. package/dist/Components/DatePicker/CalendarPanel.js +15 -4
  12. package/dist/Components/DatePicker/SingleDatePicker.d.ts.map +1 -1
  13. package/dist/Components/DatePicker/SingleDatePicker.js +11 -9
  14. package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -2
  15. package/dist/Components/DatePicker/TimePicker.d.ts.map +1 -1
  16. package/dist/Components/DatePicker/TimePicker.js +14 -2
  17. package/dist/Components/DatePicker/TimePickerInput.d.ts.map +1 -1
  18. package/dist/Components/DatePicker/TimePickerInput.js +9 -1
  19. package/dist/Components/Editor/joditThemeVars.d.ts.map +1 -1
  20. package/dist/Components/Editor/joditThemeVars.js +9 -0
  21. package/dist/Components/FilePreview/FilePreview.d.ts.map +1 -1
  22. package/dist/Components/FilePreview/FilePreview.js +3 -1
  23. package/dist/Components/FileUploader/FileUploader.js +2 -2
  24. package/dist/Components/FilterSidebar/FilterSidebar.js +1 -1
  25. package/dist/Components/NavigationBar/NavigationBar.d.ts.map +1 -1
  26. package/dist/Components/NavigationBar/NavigationBar.js +10 -6
  27. package/dist/Components/OrgSwitcher/OrgSwitcher.d.ts.map +1 -1
  28. package/dist/Components/OrgSwitcher/OrgSwitcher.js +22 -3
  29. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +1 -0
  30. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts.map +1 -1
  31. package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +3 -3
  32. package/dist/Components/OrganizationDetails/CreateOrgModal.js +6 -4
  33. package/dist/Components/OrganizationDetails/OrganizationDetails.d.ts.map +1 -1
  34. package/dist/Components/OrganizationDetails/OrganizationDetails.js +55 -7
  35. package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +24 -14
  36. package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts.map +1 -1
  37. package/dist/Components/PlanPill/PlanPill.d.ts +5 -0
  38. package/dist/Components/PlanPill/PlanPill.d.ts.map +1 -0
  39. package/dist/Components/PlanPill/PlanPill.js +41 -0
  40. package/dist/Components/PlanPill/PlanPillProps.d.ts +28 -0
  41. package/dist/Components/PlanPill/PlanPillProps.d.ts.map +1 -0
  42. package/dist/Components/PlanPill/PlanPillProps.js +2 -0
  43. package/dist/Components/Search/Search.d.ts.map +1 -1
  44. package/dist/Components/Search/Search.js +4 -2
  45. package/dist/Components/Select/Select.styles.d.ts.map +1 -1
  46. package/dist/Components/Select/Select.styles.js +29 -20
  47. package/dist/Components/SelectSearch/SelectSearch.js +1 -1
  48. package/dist/Components/SelectV2/SelectV2.d.ts +3 -0
  49. package/dist/Components/SelectV2/SelectV2.d.ts.map +1 -0
  50. package/dist/Components/SelectV2/SelectV2.js +185 -0
  51. package/dist/Components/SelectV2/SelectV2Props.d.ts +67 -0
  52. package/dist/Components/SelectV2/SelectV2Props.d.ts.map +1 -0
  53. package/dist/Components/SelectV2/SelectV2Props.js +2 -0
  54. package/dist/Components/SideBar/SecondaryBar.d.ts.map +1 -1
  55. package/dist/Components/SideBar/SecondaryBar.js +10 -2
  56. package/dist/Components/SideBar/SideBar.js +2 -2
  57. package/dist/Components/SideBar/components/MenuItemBox.d.ts.map +1 -1
  58. package/dist/Components/SideBar/components/MenuItemBox.js +7 -6
  59. package/dist/Components/Table/components/tableRowHoverStyle.d.ts +9 -8
  60. package/dist/Components/Table/components/tableRowHoverStyle.d.ts.map +1 -1
  61. package/dist/Components/Table/components/tableRowHoverStyle.js +12 -12
  62. package/dist/Components/Table/settings/ManageColumns.js +2 -2
  63. package/dist/Components/UpgradeButton/UpgradeButton.d.ts.map +1 -1
  64. package/dist/Components/UpgradeButton/UpgradeButton.js +25 -7
  65. package/dist/Components/UserDetails/UserDetails.d.ts.map +1 -1
  66. package/dist/Components/UserDetails/UserDetails.js +5 -2
  67. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +2 -1
  68. package/dist/Components/WorkspaceWindow/WorkspaceWindow.d.ts +2 -2
  69. package/dist/Components/WorkspaceWindow/WorkspaceWindow.d.ts.map +1 -1
  70. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +25 -4
  71. package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +18 -0
  72. package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts.map +1 -1
  73. package/dist/Theme/chakra/Avatar.styles.d.ts +33 -0
  74. package/dist/Theme/chakra/Avatar.styles.d.ts.map +1 -0
  75. package/dist/Theme/chakra/Avatar.styles.js +28 -0
  76. package/dist/Theme/chakra/Drawer.styles.d.ts +32 -0
  77. package/dist/Theme/chakra/Drawer.styles.d.ts.map +1 -0
  78. package/dist/Theme/chakra/Drawer.styles.js +26 -0
  79. package/dist/Theme/chakra/Menu.styles.d.ts +70 -0
  80. package/dist/Theme/chakra/Menu.styles.d.ts.map +1 -0
  81. package/dist/Theme/chakra/Menu.styles.js +50 -0
  82. package/dist/Theme/chakra/Modal.styles.d.ts +32 -0
  83. package/dist/Theme/chakra/Modal.styles.d.ts.map +1 -0
  84. package/dist/Theme/chakra/Modal.styles.js +26 -0
  85. package/dist/Theme/chakra/Popover.styles.d.ts +37 -0
  86. package/dist/Theme/chakra/Popover.styles.d.ts.map +1 -0
  87. package/dist/Theme/chakra/Popover.styles.js +30 -0
  88. package/dist/Theme/chakra/Slider.styles.d.ts +31 -0
  89. package/dist/Theme/chakra/Slider.styles.d.ts.map +1 -0
  90. package/dist/Theme/chakra/Slider.styles.js +25 -0
  91. package/dist/Theme/chakra/Switch.styles.d.ts +31 -0
  92. package/dist/Theme/chakra/Switch.styles.d.ts.map +1 -0
  93. package/dist/Theme/chakra/Switch.styles.js +24 -0
  94. package/dist/Theme/chakra/Tabs.styles.d.ts +43 -0
  95. package/dist/Theme/chakra/Tabs.styles.d.ts.map +1 -0
  96. package/dist/Theme/chakra/Tabs.styles.js +41 -0
  97. package/dist/Theme/chakra/componentStyles.d.ts +230 -1
  98. package/dist/Theme/chakra/componentStyles.d.ts.map +1 -1
  99. package/dist/Theme/chakra/componentStyles.js +136 -0
  100. package/dist/Theme/chakra/createBrandTheme.d.ts.map +1 -1
  101. package/dist/Theme/chakra/createBrandTheme.js +47 -0
  102. package/dist/Theme/provider/PixelizeThemeProvider.d.ts +11 -1
  103. package/dist/Theme/provider/PixelizeThemeProvider.d.ts.map +1 -1
  104. package/dist/Theme/provider/PixelizeThemeProvider.js +35 -2
  105. package/dist/Theme/provider/ThemeSwitcher.d.ts.map +1 -1
  106. package/dist/Theme/provider/ThemeSwitcher.js +23 -11
  107. package/dist/Theme/tokens/brands/index.d.ts.map +1 -1
  108. package/dist/Theme/tokens/brands/index.js +20 -18
  109. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts.map +1 -1
  110. package/dist/Theme/tokens/brands/zinc/palette.dark.js +4 -2
  111. package/dist/Theme/tokens/builders/outlineRung.d.ts +35 -0
  112. package/dist/Theme/tokens/builders/outlineRung.d.ts.map +1 -0
  113. package/dist/Theme/tokens/builders/outlineRung.js +69 -0
  114. package/dist/Theme/tokens/builders/statusTone.d.ts +35 -0
  115. package/dist/Theme/tokens/builders/statusTone.d.ts.map +1 -0
  116. package/dist/Theme/tokens/builders/statusTone.js +63 -0
  117. package/dist/Utils/planExpiry.d.ts +19 -0
  118. package/dist/Utils/planExpiry.d.ts.map +1 -0
  119. package/dist/Utils/planExpiry.js +61 -0
  120. package/dist/index.d.ts +9 -1
  121. package/dist/index.d.ts.map +1 -1
  122. package/dist/index.js +23 -3
  123. package/package.json +5 -1
  124. package/.claude/settings.local.json +0 -51
  125. package/.cursor/TASK-SETUP.md +0 -43
  126. package/.cursor/agents/be-impl.md +0 -37
  127. package/.cursor/agents/fe-impl.md +0 -39
  128. package/.cursor/agents/task-plan.md +0 -56
  129. package/.cursor/agents/test-create.md +0 -31
  130. package/.cursor/agents/test-exec.md +0 -26
  131. package/.cursor/hooks/task-hint.env +0 -1
  132. package/.cursor/hooks/task-skill-nudge.sh +0 -71
  133. package/.cursor/hooks/task-slash-guard.sh +0 -31
  134. package/.cursor/hooks.json +0 -13
  135. package/.cursor/modules/account-management/MODULE.md +0 -34
  136. package/.cursor/modules/buttons/MODULE.md +0 -47
  137. package/.cursor/modules/cards/MODULE.md +0 -55
  138. package/.cursor/modules/charts/MODULE.md +0 -40
  139. package/.cursor/modules/common/MODULE.md +0 -36
  140. package/.cursor/modules/contact-auth/MODULE.md +0 -19
  141. package/.cursor/modules/data-display/MODULE.md +0 -42
  142. package/.cursor/modules/feedback/MODULE.md +0 -32
  143. package/.cursor/modules/form/MODULE.md +0 -13
  144. package/.cursor/modules/inputs-basic/MODULE.md +0 -42
  145. package/.cursor/modules/inputs-date-file/MODULE.md +0 -56
  146. package/.cursor/modules/inputs-select/MODULE.md +0 -27
  147. package/.cursor/modules/inputs-toggle/MODULE.md +0 -18
  148. package/.cursor/modules/kanban/MODULE.md +0 -22
  149. package/.cursor/modules/layout-navigation/MODULE.md +0 -269
  150. package/.cursor/modules/overlays/MODULE.md +0 -69
  151. package/.cursor/modules/playground/MODULE.md +0 -28
  152. package/.cursor/modules/table/MODULE.md +0 -78
  153. package/.cursor/modules/theme/MODULE.md +0 -314
  154. package/.cursor/modules/types-exports/MODULE.md +0 -17
  155. package/.cursor/modules/utility-ui/MODULE.md +0 -50
  156. package/.cursor/modules/utils-hooks/MODULE.md +0 -35
  157. package/.cursor/pixelize-task-statusline.sh +0 -64
  158. package/.cursor/plans/blocked/.gitkeep +0 -0
  159. package/.cursor/plans/current.md +0 -12
  160. package/.cursor/plans/current.theme-tokens-dark-mode.md +0 -77
  161. package/.cursor/plans/current.theme-tokens-dark.md +0 -155
  162. package/.cursor/plans/done/.gitkeep +0 -0
  163. package/.cursor/rules +0 -31
  164. package/.cursor/skills/task/SKILL.md +0 -167
  165. package/CLAUDE.md +0 -148
  166. package/__mocks__/styleMock.js +0 -8
  167. package/coverage/clover.xml +0 -405
  168. package/coverage/coverage-final.json +0 -16
  169. package/coverage/coverage-summary.json +0 -50
  170. package/coverage/lcov-report/Button/Button.tsx.html +0 -244
  171. package/coverage/lcov-report/Button/index.html +0 -116
  172. package/coverage/lcov-report/Checkbox/Checkbox.tsx.html +0 -433
  173. package/coverage/lcov-report/Checkbox/index.html +0 -116
  174. package/coverage/lcov-report/Common/ErrorMessage.tsx.html +0 -148
  175. package/coverage/lcov-report/Common/FormLabel.tsx.html +0 -331
  176. package/coverage/lcov-report/Common/HelperText.tsx.html +0 -124
  177. package/coverage/lcov-report/Common/index.html +0 -146
  178. package/coverage/lcov-report/Components/Button/Button.tsx.html +0 -244
  179. package/coverage/lcov-report/Components/Button/index.html +0 -116
  180. package/coverage/lcov-report/Components/Checkbox/Checkbox.tsx.html +0 -433
  181. package/coverage/lcov-report/Components/Checkbox/index.html +0 -116
  182. package/coverage/lcov-report/Components/Common/ErrorMessage.tsx.html +0 -148
  183. package/coverage/lcov-report/Components/Common/FormLabel.tsx.html +0 -331
  184. package/coverage/lcov-report/Components/Common/HelperText.tsx.html +0 -124
  185. package/coverage/lcov-report/Components/Common/index.html +0 -146
  186. package/coverage/lcov-report/Components/CustomModulesTable/CustomModulesTable.tsx.html +0 -712
  187. package/coverage/lcov-report/Components/CustomModulesTable/DeleteModuleModal.tsx.html +0 -343
  188. package/coverage/lcov-report/Components/CustomModulesTable/EditModuleModal.tsx.html +0 -313
  189. package/coverage/lcov-report/Components/CustomModulesTable/index.html +0 -146
  190. package/coverage/lcov-report/Components/Divider/Divider.tsx.html +0 -133
  191. package/coverage/lcov-report/Components/Divider/index.html +0 -116
  192. package/coverage/lcov-report/Components/Dropdown/DropDown.tsx.html +0 -994
  193. package/coverage/lcov-report/Components/Dropdown/index.html +0 -116
  194. package/coverage/lcov-report/Components/EmptyState/EmptyState.tsx.html +0 -466
  195. package/coverage/lcov-report/Components/EmptyState/index.html +0 -116
  196. package/coverage/lcov-report/Components/Header/HeaderActions.tsx.html +0 -373
  197. package/coverage/lcov-report/Components/Header/index.html +0 -116
  198. package/coverage/lcov-report/Components/Input/TextInput.tsx.html +0 -487
  199. package/coverage/lcov-report/Components/Input/index.html +0 -116
  200. package/coverage/lcov-report/Components/Input/textInputIconSize.ts.html +0 -205
  201. package/coverage/lcov-report/Components/KanbanBoard/AccountCard.tsx.html +0 -547
  202. package/coverage/lcov-report/Components/KanbanBoard/AccountRow.tsx.html +0 -190
  203. package/coverage/lcov-report/Components/KanbanBoard/KanbanActions/KanbanActions.tsx.html +0 -247
  204. package/coverage/lcov-report/Components/KanbanBoard/KanbanActions/index.html +0 -116
  205. package/coverage/lcov-report/Components/KanbanBoard/KanbanBoard.tsx.html +0 -3598
  206. package/coverage/lcov-report/Components/KanbanBoard/MeasuredItem.tsx.html +0 -283
  207. package/coverage/lcov-report/Components/KanbanBoard/index.html +0 -161
  208. package/coverage/lcov-report/Components/OrganizationDetails/CreateOrgModal.tsx.html +0 -511
  209. package/coverage/lcov-report/Components/OrganizationDetails/DeleteOrgModal.tsx.html +0 -334
  210. package/coverage/lcov-report/Components/OrganizationDetails/OrganizationDetails.tsx.html +0 -1519
  211. package/coverage/lcov-report/Components/OrganizationDetails/index.html +0 -146
  212. package/coverage/lcov-report/Components/RolesPermission/DeleteRoleModal.tsx.html +0 -328
  213. package/coverage/lcov-report/Components/RolesPermission/RolesPermission.tsx.html +0 -1732
  214. package/coverage/lcov-report/Components/RolesPermission/index.html +0 -131
  215. package/coverage/lcov-report/Components/SearchSelect/SearchSelect.tsx.html +0 -2575
  216. package/coverage/lcov-report/Components/SearchSelect/SelectTruncatedLabel.tsx.html +0 -202
  217. package/coverage/lcov-report/Components/SearchSelect/index.html +0 -146
  218. package/coverage/lcov-report/Components/SearchSelect/searchSelectSize.ts.html +0 -496
  219. package/coverage/lcov-report/Components/Select/Select.tsx.html +0 -361
  220. package/coverage/lcov-report/Components/Select/index.html +0 -116
  221. package/coverage/lcov-report/Components/SideBar/components/OtherApps.tsx.html +0 -562
  222. package/coverage/lcov-report/Components/SideBar/components/OverflowTooltipText.tsx.html +0 -346
  223. package/coverage/lcov-report/Components/SideBar/components/index.html +0 -116
  224. package/coverage/lcov-report/Components/SignInActivityTable/SignInActivityTable.tsx.html +0 -490
  225. package/coverage/lcov-report/Components/SignInActivityTable/index.html +0 -116
  226. package/coverage/lcov-report/Components/Table/components/TableActions.tsx.html +0 -595
  227. package/coverage/lcov-report/Components/Table/components/TableBody.tsx.html +0 -2212
  228. package/coverage/lcov-report/Components/Table/components/TableGroupRow.tsx.html +0 -358
  229. package/coverage/lcov-report/Components/Table/components/TableLoading.tsx.html +0 -358
  230. package/coverage/lcov-report/Components/Table/components/index.html +0 -161
  231. package/coverage/lcov-report/Components/Table/settings/ManageColumns.tsx.html +0 -856
  232. package/coverage/lcov-report/Components/Table/settings/index.html +0 -116
  233. package/coverage/lcov-report/Components/Tag/Tag.styles.tsx.html +0 -331
  234. package/coverage/lcov-report/Components/Tag/Tag.tsx.html +0 -256
  235. package/coverage/lcov-report/Components/Tag/index.html +0 -131
  236. package/coverage/lcov-report/Components/ToolTip/ToolTip.tsx.html +0 -286
  237. package/coverage/lcov-report/Components/ToolTip/index.html +0 -116
  238. package/coverage/lcov-report/Components/UserDetails/AddUserModal.tsx.html +0 -709
  239. package/coverage/lcov-report/Components/UserDetails/ChangeRoleModal.tsx.html +0 -505
  240. package/coverage/lcov-report/Components/UserDetails/DeactivateConfirmModal.tsx.html +0 -379
  241. package/coverage/lcov-report/Components/UserDetails/UserDetails.tsx.html +0 -1900
  242. package/coverage/lcov-report/Components/UserDetails/index.html +0 -161
  243. package/coverage/lcov-report/EmptyState/EmptyState.tsx.html +0 -466
  244. package/coverage/lcov-report/EmptyState/index.html +0 -116
  245. package/coverage/lcov-report/Hooks/index.html +0 -116
  246. package/coverage/lcov-report/Hooks/usePreferences.ts.html +0 -421
  247. package/coverage/lcov-report/Input/TextInput.tsx.html +0 -487
  248. package/coverage/lcov-report/Input/index.html +0 -131
  249. package/coverage/lcov-report/Input/textInputIconSize.ts.html +0 -205
  250. package/coverage/lcov-report/KanbanBoard.tsx.html +0 -3481
  251. package/coverage/lcov-report/OrganizationDetails/CreateOrgModal.tsx.html +0 -511
  252. package/coverage/lcov-report/OrganizationDetails/DeleteOrgModal.tsx.html +0 -334
  253. package/coverage/lcov-report/OrganizationDetails/OrganizationDetails.tsx.html +0 -1519
  254. package/coverage/lcov-report/OrganizationDetails/index.html +0 -146
  255. package/coverage/lcov-report/RolesPermission/DeleteRoleModal.tsx.html +0 -328
  256. package/coverage/lcov-report/RolesPermission/RolesPermission.tsx.html +0 -1732
  257. package/coverage/lcov-report/RolesPermission/index.html +0 -116
  258. package/coverage/lcov-report/SearchSelect/SearchSelect.tsx.html +0 -2575
  259. package/coverage/lcov-report/SearchSelect/SelectTruncatedLabel.tsx.html +0 -202
  260. package/coverage/lcov-report/SearchSelect/index.html +0 -146
  261. package/coverage/lcov-report/SearchSelect/searchSelectSize.ts.html +0 -496
  262. package/coverage/lcov-report/Table/CompactSelect.tsx.html +0 -379
  263. package/coverage/lcov-report/Table/Components/ActiveFilters.tsx.html +0 -514
  264. package/coverage/lcov-report/Table/Components/HeaderActions.tsx.html +0 -373
  265. package/coverage/lcov-report/Table/Components/Pagination.tsx.html +0 -574
  266. package/coverage/lcov-report/Table/Components/TableActions.tsx.html +0 -574
  267. package/coverage/lcov-report/Table/Components/TableBody.tsx.html +0 -1027
  268. package/coverage/lcov-report/Table/Components/TableFilters.tsx.html +0 -397
  269. package/coverage/lcov-report/Table/Components/TableHeader.tsx.html +0 -1060
  270. package/coverage/lcov-report/Table/Components/TableLoading.tsx.html +0 -361
  271. package/coverage/lcov-report/Table/Components/TableSearch.tsx.html +0 -337
  272. package/coverage/lcov-report/Table/Components/index.html +0 -266
  273. package/coverage/lcov-report/Table/Components/useDebounce.ts.html +0 -178
  274. package/coverage/lcov-report/Table/Components/useTable.ts.html +0 -778
  275. package/coverage/lcov-report/Table/LeftFilterPane.tsx.html +0 -1810
  276. package/coverage/lcov-report/Table/SelectOperationControls.tsx.html +0 -178
  277. package/coverage/lcov-report/Table/Table.tsx.html +0 -1567
  278. package/coverage/lcov-report/Table/TableProps.tsx.html +0 -658
  279. package/coverage/lcov-report/Table/TableSettings/ManageColumns.tsx.html +0 -619
  280. package/coverage/lcov-report/Table/TableSettings/TableFilters.tsx.html +0 -229
  281. package/coverage/lcov-report/Table/TableSettings/TableSettings.tsx.html +0 -532
  282. package/coverage/lcov-report/Table/TableSettings/index.html +0 -146
  283. package/coverage/lcov-report/Table/TableToDo.tsx.html +0 -973
  284. package/coverage/lcov-report/Table/TextOperationControls.tsx.html +0 -271
  285. package/coverage/lcov-report/Table/filterTypes.ts.html +0 -97
  286. package/coverage/lcov-report/Table/index.html +0 -176
  287. package/coverage/lcov-report/Table/settings/ManageColumns.tsx.html +0 -856
  288. package/coverage/lcov-report/Table/settings/index.html +0 -116
  289. package/coverage/lcov-report/Tag/Tag.tsx.html +0 -256
  290. package/coverage/lcov-report/Tag/index.html +0 -116
  291. package/coverage/lcov-report/Theme/buildBrandTokens.ts.html +0 -175
  292. package/coverage/lcov-report/Theme/chartColorsFromTheme.ts.html +0 -214
  293. package/coverage/lcov-report/Theme/index.html +0 -131
  294. package/coverage/lcov-report/Theme/useCustomTheme.ts.html +0 -100
  295. package/coverage/lcov-report/ToolTip/ToolTip.tsx.html +0 -286
  296. package/coverage/lcov-report/ToolTip/index.html +0 -116
  297. package/coverage/lcov-report/UserDetails/AddUserModal.tsx.html +0 -709
  298. package/coverage/lcov-report/UserDetails/ChangeRoleModal.tsx.html +0 -505
  299. package/coverage/lcov-report/UserDetails/index.html +0 -116
  300. package/coverage/lcov-report/Utils/functions.ts.html +0 -106
  301. package/coverage/lcov-report/Utils/index.html +0 -116
  302. package/coverage/lcov-report/Utils/table.ts.html +0 -1189
  303. package/coverage/lcov-report/base.css +0 -224
  304. package/coverage/lcov-report/block-navigation.js +0 -87
  305. package/coverage/lcov-report/favicon.png +0 -0
  306. package/coverage/lcov-report/index.html +0 -251
  307. package/coverage/lcov-report/prettify.css +0 -1
  308. package/coverage/lcov-report/prettify.js +0 -2
  309. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  310. package/coverage/lcov-report/sorter.js +0 -210
  311. package/coverage/lcov.info +0 -981
  312. package/dist/Theme/Dark/theme.d.ts +0 -3
  313. package/dist/Theme/Dark/theme.d.ts.map +0 -1
  314. package/dist/Theme/Dark/theme.js +0 -277
  315. package/dist/Theme/Default/palette.d.ts +0 -375
  316. package/dist/Theme/Default/palette.d.ts.map +0 -1
  317. package/dist/Theme/Default/palette.js +0 -306
  318. package/dist/Theme/Default/theme.d.ts +0 -3
  319. package/dist/Theme/Default/theme.d.ts.map +0 -1
  320. package/dist/Theme/Default/theme.js +0 -19
  321. package/dist/Theme/Emerald/palette.d.ts +0 -375
  322. package/dist/Theme/Emerald/palette.d.ts.map +0 -1
  323. package/dist/Theme/Emerald/palette.js +0 -125
  324. package/dist/Theme/Emerald/theme.d.ts +0 -3
  325. package/dist/Theme/Emerald/theme.d.ts.map +0 -1
  326. package/dist/Theme/Emerald/theme.js +0 -19
  327. package/dist/Theme/Meadow/palette.d.ts +0 -375
  328. package/dist/Theme/Meadow/palette.d.ts.map +0 -1
  329. package/dist/Theme/Meadow/palette.js +0 -123
  330. package/dist/Theme/Meadow/theme.d.ts +0 -3
  331. package/dist/Theme/Meadow/theme.d.ts.map +0 -1
  332. package/dist/Theme/Meadow/theme.js +0 -19
  333. package/dist/Theme/Radiant/palette.d.ts +0 -375
  334. package/dist/Theme/Radiant/palette.d.ts.map +0 -1
  335. package/dist/Theme/Radiant/palette.js +0 -125
  336. package/dist/Theme/Radiant/theme.d.ts +0 -3
  337. package/dist/Theme/Radiant/theme.d.ts.map +0 -1
  338. package/dist/Theme/Radiant/theme.js +0 -19
  339. package/dist/Theme/Rosewood/palette.d.ts +0 -375
  340. package/dist/Theme/Rosewood/palette.d.ts.map +0 -1
  341. package/dist/Theme/Rosewood/palette.js +0 -125
  342. package/dist/Theme/Rosewood/theme.d.ts +0 -3
  343. package/dist/Theme/Rosewood/theme.d.ts.map +0 -1
  344. package/dist/Theme/Rosewood/theme.js +0 -19
  345. package/dist/Theme/Skyline/palette.d.ts +0 -375
  346. package/dist/Theme/Skyline/palette.d.ts.map +0 -1
  347. package/dist/Theme/Skyline/palette.js +0 -123
  348. package/dist/Theme/Skyline/theme.d.ts +0 -3
  349. package/dist/Theme/Skyline/theme.d.ts.map +0 -1
  350. package/dist/Theme/Skyline/theme.js +0 -19
  351. package/dist/Theme/Slate/palette.d.ts +0 -375
  352. package/dist/Theme/Slate/palette.d.ts.map +0 -1
  353. package/dist/Theme/Slate/palette.js +0 -123
  354. package/dist/Theme/Slate/theme.d.ts +0 -3
  355. package/dist/Theme/Slate/theme.d.ts.map +0 -1
  356. package/dist/Theme/Slate/theme.js +0 -19
  357. package/dist/Theme/buildBrandTokens.d.ts +0 -16
  358. package/dist/Theme/buildBrandTokens.d.ts.map +0 -1
  359. package/dist/Theme/buildBrandTokens.js +0 -33
  360. package/dist/Theme/chartColorsFromTheme.d.ts +0 -19
  361. package/dist/Theme/chartColorsFromTheme.d.ts.map +0 -1
  362. package/dist/Theme/chartColorsFromTheme.js +0 -34
  363. package/dist/Theme/common.d.ts +0 -167
  364. package/dist/Theme/common.d.ts.map +0 -1
  365. package/dist/Theme/common.js +0 -112
  366. package/dist/Theme/componentStyles.d.ts +0 -10
  367. package/dist/Theme/componentStyles.d.ts.map +0 -1
  368. package/dist/Theme/componentStyles.js +0 -19
  369. package/dist/Theme/fonts.d.ts +0 -37
  370. package/dist/Theme/fonts.d.ts.map +0 -1
  371. package/dist/Theme/fonts.js +0 -41
  372. package/dist/Theme/space.d.ts +0 -34
  373. package/dist/Theme/space.d.ts.map +0 -1
  374. package/dist/Theme/space.js +0 -35
  375. package/dist/Theme/theme.d.ts +0 -3
  376. package/dist/Theme/theme.d.ts.map +0 -1
  377. package/dist/Theme/theme.js +0 -12
  378. package/eslint.config.js +0 -48
  379. package/index.html +0 -13
  380. package/vite.config.ts +0 -13
@@ -1 +1 @@
1
- {"version":3,"file":"PixelizeThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/Theme/provider/PixelizeThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU/E,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,iBAAiB,CAAC;IAChC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uDAAuD;IACvD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AA2BF,eAAO,MAAM,gBAAgB,kDAE5B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,GAAI,8EAMnC,0BAA0B,4CA0D5B,CAAC"}
1
+ {"version":3,"file":"PixelizeThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/Theme/provider/PixelizeThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU/E,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,iBAAiB,CAAC;IAChC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uDAAuD;IACvD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C,CAAC;AA2BF,eAAO,MAAM,gBAAgB,kDAE5B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,GAAI,8FAOnC,0BAA0B,4CA8F5B,CAAC"}
@@ -48,7 +48,7 @@ exports.ThemeModeContext = (0, react_1.createContext)(undefined);
48
48
  * whatever the active palette says. Read the mode from `useThemeMode()` instead. Existing apps are
49
49
  * unaffected: they are light-only, where that argument was always the one returned anyway.
50
50
  */
51
- const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRAND, defaultMode = DEFAULT_MODE, storageKey = DEFAULT_STORAGE_KEY, disablePersistence = false, }) => {
51
+ const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRAND, defaultMode = DEFAULT_MODE, storageKey = DEFAULT_STORAGE_KEY, disablePersistence = false, themeOverrides, }) => {
52
52
  const [mode, setModeState] = (0, react_1.useState)(defaultMode);
53
53
  const [brand, setBrandState] = (0, react_1.useState)(brandProp);
54
54
  // Deterministic on the server and on the first client render — the real OS value lands in
@@ -67,6 +67,22 @@ const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRAND, def
67
67
  if (stored.brand)
68
68
  setBrandState(stored.brand);
69
69
  }, [disablePersistence, storageKey]);
70
+ // `brandProp` only seeds initial state above, so a consumer that re-renders with a new
71
+ // `brand` prop after mount (e.g. persisting the pick through its own store, like tickets'
72
+ // Settings page dispatching Redux instead of calling `setBrand`) would otherwise never see
73
+ // it applied — the same gap `colorMode` has, which callers work around with an effect
74
+ // mirroring `mode`. Sync it here instead so every consumer gets it for free.
75
+ const isFirstBrandPropRun = (0, react_1.useRef)(true);
76
+ (0, react_1.useEffect)(() => {
77
+ if (isFirstBrandPropRun.current) {
78
+ isFirstBrandPropRun.current = false;
79
+ return;
80
+ }
81
+ setBrandState(brandProp);
82
+ // Only re-sync when the prop itself changes — not on every local `setBrand` call (that
83
+ // would fight the user's own in-session brand picking, e.g. via ThemeSwitcher).
84
+ // eslint-disable-next-line react-hooks/exhaustive-deps
85
+ }, [brandProp]);
70
86
  // Skipping the mount run keeps the defaults from being written over a stored value before
71
87
  // the rehydrate effect above has applied it.
72
88
  const isFirstPersistRun = (0, react_1.useRef)(true);
@@ -80,12 +96,29 @@ const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRAND, def
80
96
  (0, colorModeStorage_1.writeStoredTheme)(storageKey, { mode, brand });
81
97
  }, [mode, brand, disablePersistence, storageKey]);
82
98
  const resolvedMode = mode === "system" ? systemMode : mode;
99
+ /**
100
+ * Native browser UI (the `<select>` dropdown popup chrome, the `<input type="date">` calendar
101
+ * picker) is painted by the browser's own UA stylesheet keyed off the CSS `color-scheme`
102
+ * property, entirely separate from Chakra/React theming — no component style or palette swap
103
+ * above can reach it. Without this, that chrome always renders light, even on an otherwise dark
104
+ * page. Scoped to this provider (not a global stylesheet) so `withTheme` consumers — deliberately
105
+ * light-only, see the module doc's "Key rules" — are untouched.
106
+ */
107
+ (0, react_1.useEffect)(() => {
108
+ document.documentElement.style.colorScheme = resolvedMode;
109
+ }, [resolvedMode]);
83
110
  const setMode = (0, react_1.useCallback)((next) => setModeState(next), []);
84
111
  const setBrand = (0, react_1.useCallback)((next) => setBrandState(next), []);
85
112
  // From "system", flip to the opposite of what the OS currently gives, so a click always
86
113
  // visibly changes the UI.
87
114
  const toggle = (0, react_1.useCallback)(() => setModeState(resolvedMode === "dark" ? "light" : "dark"), [resolvedMode]);
88
115
  const value = (0, react_1.useMemo)(() => ({ mode, resolvedMode, setMode, toggle, brand, setBrand }), [mode, resolvedMode, setMode, toggle, brand, setBrand]);
89
- return ((0, jsx_runtime_1.jsx)(exports.ThemeModeContext.Provider, { value: value, children: (0, jsx_runtime_1.jsx)(react_2.ChakraProvider, { theme: index_1.brandThemes[brand][resolvedMode], colorModeManager: forcedLightColorModeManager, children: (0, jsx_runtime_1.jsx)(Toaster_1.default, { children: children }) }) }));
116
+ const resolvedTheme = (0, react_1.useMemo)(() => {
117
+ const base = index_1.brandThemes[brand][resolvedMode];
118
+ return themeOverrides
119
+ ? (0, react_2.extendTheme)(base, themeOverrides)
120
+ : base;
121
+ }, [brand, resolvedMode, themeOverrides]);
122
+ return ((0, jsx_runtime_1.jsx)(exports.ThemeModeContext.Provider, { value: value, children: (0, jsx_runtime_1.jsx)(react_2.ChakraProvider, { theme: resolvedTheme, colorModeManager: forcedLightColorModeManager, children: (0, jsx_runtime_1.jsx)(Toaster_1.default, { children: children }) }) }));
90
123
  };
91
124
  exports.PixelizeThemeProvider = PixelizeThemeProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeSwitcher.d.ts","sourceRoot":"","sources":["../../../src/Theme/provider/ThemeSwitcher.tsx"],"names":[],"mappings":"AAoBA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACxC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAgQF,eAAO,MAAM,aAAa,GAAI,8DAK3B,kBAAkB,4CAuBpB,CAAC"}
1
+ {"version":3,"file":"ThemeSwitcher.d.ts","sourceRoot":"","sources":["../../../src/Theme/provider/ThemeSwitcher.tsx"],"names":[],"mappings":"AAqBA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACxC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAkSF,eAAO,MAAM,aAAa,GAAI,8DAK3B,kBAAkB,4CAuBpB,CAAC"}
@@ -19,13 +19,24 @@ const SIZES = {
19
19
  lg: { control: "lg", icon: 18 },
20
20
  };
21
21
  const toBrandLabel = (brand) => brand.charAt(0).toUpperCase() + brand.slice(1);
22
+ /**
23
+ * Same swatch each brand's own theme carries at `colors.primary[500]` (the
24
+ * anchor a filled button reads) — resolved per brand from its OWN palette so
25
+ * the dot always matches what selecting that brand actually looks like,
26
+ * regardless of which brand/mode is currently active.
27
+ */
28
+ const brandSwatchColor = (brand) => {
29
+ var _a, _b, _c, _d, _e;
30
+ return (_e = (_d = (_c = (_b = (_a = index_1.brandThemes[brand]) === null || _a === void 0 ? void 0 : _a.light) === null || _b === void 0 ? void 0 : _b.colors) === null || _c === void 0 ? void 0 : _c.primary) === null || _d === void 0 ? void 0 : _d[500]) !== null && _e !== void 0 ? _e : "gray.400";
31
+ };
32
+ const BrandSwatch = ({ brand }) => ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-block", w: "0.625rem", h: "0.625rem", borderRadius: "full", bg: brandSwatchColor(brand), border: "1px solid", borderColor: "whiteAlpha.300", flexShrink: 0 }));
22
33
  /**
23
34
  * Palette values already differ per color mode (`brandThemes[brand].light|dark`), so tokens
24
35
  * are read straight from the active theme — no `useColorModeValue` pairing needed here.
25
36
  * Fallbacks are Chakra token names, never literal colors, for themes without a brand palette.
26
37
  */
27
38
  const useSwitcherColors = () => {
28
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
39
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
29
40
  const colors = (0, useCustomTheme_1.useCustomTheme)().colors;
30
41
  return {
31
42
  trackBg: (_d = (_b = (_a = colors === null || colors === void 0 ? void 0 : colors.backgroundColor) === null || _a === void 0 ? void 0 : _a.secondary) !== null && _b !== void 0 ? _b : (_c = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _c === void 0 ? void 0 : _c[100]) !== null && _d !== void 0 ? _d : "gray.100",
@@ -34,19 +45,20 @@ const useSwitcherColors = () => {
34
45
  mutedColor: (_q = (_o = (_m = colors === null || colors === void 0 ? void 0 : colors.text) === null || _m === void 0 ? void 0 : _m[600]) !== null && _o !== void 0 ? _o : (_p = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _p === void 0 ? void 0 : _p[600]) !== null && _q !== void 0 ? _q : "gray.600",
35
46
  hoverBg: (_s = (_r = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _r === void 0 ? void 0 : _r[100]) !== null && _s !== void 0 ? _s : "gray.100",
36
47
  borderColor: (_w = (_u = (_t = colors === null || colors === void 0 ? void 0 : colors.border) === null || _t === void 0 ? void 0 : _t[200]) !== null && _u !== void 0 ? _u : (_v = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _v === void 0 ? void 0 : _v[200]) !== null && _w !== void 0 ? _w : "gray.200",
37
- // Chakra's MenuList baseStyle hardcodes `--menu-bg` to "#fff" (gated behind `_dark`,
38
- // which this theme-swap app never triggers) — same bug class already fixed in
39
- // NavigationBar/ButtonGroupIcon. `bg` alone only recolors the list's own box, not the
40
- // var other pseudo-states read, so both must be set.
41
- menuBg: (_0 = (_y = (_x = colors === null || colors === void 0 ? void 0 : colors.backgroundColor) === null || _x === void 0 ? void 0 : _x.light) !== null && _y !== void 0 ? _y : (_z = colors === null || colors === void 0 ? void 0 : colors.background) === null || _z === void 0 ? void 0 : _z[50]) !== null && _0 !== void 0 ? _0 : "white",
42
- menuColor: (_4 = (_2 = (_1 = colors === null || colors === void 0 ? void 0 : colors.text) === null || _1 === void 0 ? void 0 : _1[900]) !== null && _2 !== void 0 ? _2 : (_3 = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _3 === void 0 ? void 0 : _3[900]) !== null && _4 !== void 0 ? _4 : "gray.900",
48
+ // `--menu-bg` (and its hover/focus/active states) is now fixed centrally in the theme's
49
+ // Menu component style (Theme/chakra/Menu.styles.ts) — every MenuList gets it from there.
50
+ // Re-deriving it here too and pushing it back via `sx` on every render caused a redundant
51
+ // Emotion style recompute per render, which showed up as flicker while hovering/scrolling
52
+ // this list. Keep menuColor (Menu.styles.ts doesn't set list `color` per this component's
53
+ // needs) but stop duplicating menuBg.
54
+ menuColor: (_0 = (_y = (_x = colors === null || colors === void 0 ? void 0 : colors.text) === null || _x === void 0 ? void 0 : _x[900]) !== null && _y !== void 0 ? _y : (_z = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _z === void 0 ? void 0 : _z[900]) !== null && _0 !== void 0 ? _0 : "gray.900",
43
55
  };
44
56
  };
45
57
  const BrandMenu = ({ size }) => {
46
58
  const { brand, setBrand } = (0, useThemeMode_1.useThemeMode)();
47
- const { mutedColor, menuBg, menuColor } = useSwitcherColors();
59
+ const { mutedColor, menuColor } = useSwitcherColors();
48
60
  const brands = Object.keys(index_1.brandThemes);
49
- return ((0, jsx_runtime_1.jsxs)(react_2.Menu, { children: [(0, jsx_runtime_1.jsx)(react_2.MenuButton, { as: react_2.Button, size: SIZES[size].control, variant: "ghost", color: mutedColor, borderRadius: "full", fontWeight: 500, "aria-label": `Brand theme, current ${toBrandLabel(brand)}`, _focusVisible: { boxShadow: "outline" }, children: toBrandLabel(brand) }), (0, jsx_runtime_1.jsx)(react_2.MenuList, { minW: "9rem", bg: menuBg, sx: { "--menu-bg": menuBg }, color: menuColor, children: (0, jsx_runtime_1.jsx)(react_2.MenuOptionGroup, { title: "Brand", type: "radio", value: brand, onChange: (value) => setBrand(value), children: brands.map((option) => ((0, jsx_runtime_1.jsx)(react_2.MenuItemOption, { value: option, children: toBrandLabel(option) }, option))) }) })] }));
61
+ return ((0, jsx_runtime_1.jsxs)(react_2.Menu, { children: [(0, jsx_runtime_1.jsx)(react_2.MenuButton, { as: react_2.Button, size: SIZES[size].control, variant: "ghost", color: mutedColor, borderRadius: "full", fontWeight: 500, "aria-label": `Brand theme, current ${toBrandLabel(brand)}`, _focusVisible: { boxShadow: "outline" }, children: (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(BrandSwatch, { brand: brand }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", children: toBrandLabel(brand) })] }) }), (0, jsx_runtime_1.jsx)(react_2.MenuList, { minW: "9rem", color: menuColor, children: (0, jsx_runtime_1.jsx)(react_2.MenuOptionGroup, { title: "Brand", type: "radio", value: brand, onChange: (value) => setBrand(value), children: brands.map((option) => ((0, jsx_runtime_1.jsx)(react_2.MenuItemOption, { value: option, children: (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(BrandSwatch, { brand: option }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", children: toBrandLabel(option) })] }) }, option))) }) })] }));
50
62
  };
51
63
  const IconVariant = ({ size, label, }) => {
52
64
  const { resolvedMode, toggle } = (0, useThemeMode_1.useThemeMode)();
@@ -82,10 +94,10 @@ const SegmentedVariant = ({ size, label, showBrandPicker, }) => {
82
94
  const MenuVariant = ({ size, label, showBrandPicker, }) => {
83
95
  var _a;
84
96
  const { mode, brand, setMode, setBrand } = (0, useThemeMode_1.useThemeMode)();
85
- const { mutedColor, hoverBg, menuBg, menuColor } = useSwitcherColors();
97
+ const { mutedColor, hoverBg, menuColor } = useSwitcherColors();
86
98
  const active = (_a = MODE_OPTIONS.find((option) => option.value === mode)) !== null && _a !== void 0 ? _a : MODE_OPTIONS[0];
87
99
  const brands = Object.keys(index_1.brandThemes);
88
- return ((0, jsx_runtime_1.jsxs)(react_2.Menu, { children: [(0, jsx_runtime_1.jsx)(react_2.MenuButton, { as: react_2.IconButton, "aria-label": label !== null && label !== void 0 ? label : `Color mode, current ${active.label}`, icon: (0, jsx_runtime_1.jsx)(active.Icon, { size: SIZES[size].icon, "aria-hidden": true }), size: SIZES[size].control, variant: "ghost", color: mutedColor, borderRadius: "full", _hover: { bg: hoverBg }, _focusVisible: { boxShadow: "outline" } }), (0, jsx_runtime_1.jsxs)(react_2.MenuList, { minW: "10rem", bg: menuBg, sx: { "--menu-bg": menuBg }, color: menuColor, children: [(0, jsx_runtime_1.jsx)(react_2.MenuOptionGroup, { title: "Appearance", type: "radio", value: mode, onChange: (value) => setMode(value), children: MODE_OPTIONS.map(({ value, label: optionLabel, Icon }) => ((0, jsx_runtime_1.jsx)(react_2.MenuItemOption, { value: value, children: (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(Icon, { size: SIZES[size].icon, "aria-hidden": true }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", children: optionLabel })] }) }, value))) }), showBrandPicker && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.MenuDivider, {}), (0, jsx_runtime_1.jsx)(react_2.MenuOptionGroup, { title: "Brand", type: "radio", value: brand, onChange: (value) => setBrand(value), children: brands.map((option) => ((0, jsx_runtime_1.jsx)(react_2.MenuItemOption, { value: option, children: toBrandLabel(option) }, option))) })] }))] })] }));
100
+ return ((0, jsx_runtime_1.jsxs)(react_2.Menu, { children: [(0, jsx_runtime_1.jsx)(react_2.MenuButton, { as: react_2.IconButton, "aria-label": label !== null && label !== void 0 ? label : `Color mode, current ${active.label}`, icon: (0, jsx_runtime_1.jsx)(active.Icon, { size: SIZES[size].icon, "aria-hidden": true }), size: SIZES[size].control, variant: "ghost", color: mutedColor, borderRadius: "full", _hover: { bg: hoverBg }, _focusVisible: { boxShadow: "outline" } }), (0, jsx_runtime_1.jsxs)(react_2.MenuList, { minW: "10rem", color: menuColor, children: [(0, jsx_runtime_1.jsx)(react_2.MenuOptionGroup, { title: "Appearance", type: "radio", value: mode, onChange: (value) => setMode(value), children: MODE_OPTIONS.map(({ value, label: optionLabel, Icon }) => ((0, jsx_runtime_1.jsx)(react_2.MenuItemOption, { value: value, children: (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(Icon, { size: SIZES[size].icon, "aria-hidden": true }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", children: optionLabel })] }) }, value))) }), showBrandPicker && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.MenuDivider, {}), (0, jsx_runtime_1.jsx)(react_2.MenuOptionGroup, { title: "Brand", type: "radio", value: brand, onChange: (value) => setBrand(value), children: brands.map((option) => ((0, jsx_runtime_1.jsx)(react_2.MenuItemOption, { value: option, children: (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(BrandSwatch, { brand: option }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", children: toBrandLabel(option) })] }) }, option))) })] }))] })] }));
89
101
  };
90
102
  const ThemeSwitcher = ({ variant = "icon", showBrandPicker = false, size = "md", "aria-label": ariaLabel, }) => {
91
103
  if (variant === "segmented") {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Theme/tokens/brands/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,UAAU,MAAM,4BAA4B,CAAC;AACpD,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAExC,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAe3E,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;AAC1F,OAAO,EACL,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,WAAW,EACX,YAAY,EACZ,cAAc,EACd,QAAQ,GACT,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,SAAS,EAAE,YAAY,CAUzD,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,SAAS,EAAE,YAAY,CAUxD,CAAC;AAIF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAU/E,CAAC;AAEF,eAAO,MAAM,UAAU,EAAiC,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Theme/tokens/brands/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,UAAU,MAAM,4BAA4B,CAAC;AACpD,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAExC,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAgB3E,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;AAC1F,OAAO,EACL,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,WAAW,EACX,YAAY,EACZ,cAAc,EACd,QAAQ,GACT,CAAC;AAKF,4EAA4E;AAC5E,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,SAAS,EAAE,YAAY,CAUzD,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,SAAS,EAAE,YAAY,CAUxD,CAAC;AAIF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAU/E,CAAC;AAEF,eAAO,MAAM,UAAU,EAAiC,SAAS,EAAE,CAAC"}
@@ -41,6 +41,7 @@ exports.storefrontDark = palette_dark_8.default;
41
41
  const palette_dark_9 = __importDefault(require("./zinc/palette.dark"));
42
42
  exports.zincDark = palette_dark_9.default;
43
43
  const accentText_1 = require("../builders/accentText");
44
+ const outlineRung_1 = require("../builders/outlineRung");
44
45
  /**
45
46
  * Derived here rather than hand-written into each brand's literal: it must track that brand's
46
47
  * own primary scale and canvas, and a stale hand-copied hex would silently fail AA.
@@ -53,29 +54,30 @@ const withAccentText = (palette) => {
53
54
  accentText: (_a = palette.accentText) !== null && _a !== void 0 ? _a : (0, accentText_1.pickAccentText)(palette.primary, palette.backgroundColor.main, "light"),
54
55
  });
55
56
  };
57
+ const lightBrand = (palette) => (0, outlineRung_1.withOutlineRung)(withAccentText(palette), "light");
56
58
  /** Light palette per brand. `lavender` is the base the other six extend. */
57
59
  exports.lightPalettes = {
58
- lavender: withAccentText(palette_light_1.default),
59
- meadow: withAccentText(palette_light_2.default),
60
- radiant: withAccentText(palette_light_3.default),
61
- skyline: withAccentText(palette_light_4.default),
62
- slate: withAccentText(palette_light_5.default),
63
- emerald: withAccentText(palette_light_6.default),
64
- rosewood: withAccentText(palette_light_7.default),
65
- storefront: withAccentText(palette_light_8.default),
66
- zinc: withAccentText(palette_light_9.default),
60
+ lavender: lightBrand(palette_light_1.default),
61
+ meadow: lightBrand(palette_light_2.default),
62
+ radiant: lightBrand(palette_light_3.default),
63
+ skyline: lightBrand(palette_light_4.default),
64
+ slate: lightBrand(palette_light_5.default),
65
+ emerald: lightBrand(palette_light_6.default),
66
+ rosewood: lightBrand(palette_light_7.default),
67
+ storefront: lightBrand(palette_light_8.default),
68
+ zinc: lightBrand(palette_light_9.default),
67
69
  };
68
70
  /** Dark palette per brand, derived from the matching light palette. */
69
71
  exports.darkPalettes = {
70
- lavender: palette_dark_1.default,
71
- meadow: palette_dark_2.default,
72
- radiant: palette_dark_3.default,
73
- skyline: palette_dark_4.default,
74
- slate: palette_dark_5.default,
75
- emerald: palette_dark_6.default,
76
- rosewood: palette_dark_7.default,
77
- storefront: palette_dark_8.default,
78
- zinc: palette_dark_9.default,
72
+ lavender: (0, outlineRung_1.withOutlineRung)(palette_dark_1.default, "dark"),
73
+ meadow: (0, outlineRung_1.withOutlineRung)(palette_dark_2.default, "dark"),
74
+ radiant: (0, outlineRung_1.withOutlineRung)(palette_dark_3.default, "dark"),
75
+ skyline: (0, outlineRung_1.withOutlineRung)(palette_dark_4.default, "dark"),
76
+ slate: (0, outlineRung_1.withOutlineRung)(palette_dark_5.default, "dark"),
77
+ emerald: (0, outlineRung_1.withOutlineRung)(palette_dark_6.default, "dark"),
78
+ rosewood: (0, outlineRung_1.withOutlineRung)(palette_dark_7.default, "dark"),
79
+ storefront: (0, outlineRung_1.withOutlineRung)(palette_dark_8.default, "dark"),
80
+ zinc: (0, outlineRung_1.withOutlineRung)(palette_dark_9.default, "dark"),
79
81
  };
80
82
  // Built from lightPalettes/darkPalettes (not the raw literals) so accentText can never be
81
83
  // present on one map and missing on the other.
@@ -1 +1 @@
1
- {"version":3,"file":"palette.dark.d.ts","sourceRoot":"","sources":["../../../../../src/Theme/tokens/brands/zinc/palette.dark.ts"],"names":[],"mappings":"AAqLA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"palette.dark.d.ts","sourceRoot":"","sources":["../../../../../src/Theme/tokens/brands/zinc/palette.dark.ts"],"names":[],"mappings":"AAuLA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -93,13 +93,15 @@ const header = {
93
93
  900: "#ffffff",
94
94
  };
95
95
  // muted-foreground = gray[500] = #a1a1aa (5.81:1 on the #27272a muted surface); it also serves
96
- // as the focus ring on the #09090b canvas (7.76:1). gray[400] = the #6b6b75 interactive border.
96
+ // as the focus ring on the #09090b canvas (7.76:1). gray[400] = the interactive border/icon rung:
97
+ // #6b6b75 (matching border[500]) measured 2.95:1 on the LIGHTEST named surface, just under the 3:1
98
+ // non-text bar it is used at, so it is one step lighter than border[500] here.
97
99
  const gray = {
98
100
  50: "#18181b",
99
101
  100: "#27272a",
100
102
  200: "#3f3f46",
101
103
  300: "#52525b",
102
- 400: "#6b6b75",
104
+ 400: "#71717a",
103
105
  500: "#a1a1aa",
104
106
  600: "#b4b4bb",
105
107
  700: "#d4d4d8",
@@ -0,0 +1,35 @@
1
+ import type { PaletteProps, ResolvedColorMode } from "../types";
2
+ /**
3
+ * The floor a hover/active state's step off its own resting surface must clear to be seen at
4
+ * all — same value the SideBar ladder, Accordion, and NavigationBar hover states are held to.
5
+ * A "hover" a user cannot perceive is not a hover.
6
+ */
7
+ export declare const MIN_PERCEPTIBLE_STEP = 1.15;
8
+ /** WCAG 1.4.11 — a control outline is a UI component boundary, held to 3:1. */
9
+ export declare const AA_NON_TEXT = 3;
10
+ /**
11
+ * Walks a hex toward `target` contrast against `backdrop`, keeping its hue and saturation so the
12
+ * result still reads as the same colour. Darkens when `mode` is light, lightens when dark, and
13
+ * stops at the FIRST passing step so nothing overshoots to black or white.
14
+ */
15
+ export declare function liftToContrast(hex: string, backdrop: string, mode: ResolvedColorMode, target?: number): string;
16
+ /**
17
+ * `boxborder[500]` is the rung every control outline reads (Checkbox, SearchSelect, the date
18
+ * pickers, the editor's inputs). It was authored as a decorative value — measured 1.30-2.56:1
19
+ * across brands, so those controls rendered effectively borderless in BOTH modes. Resolved here
20
+ * rather than hand-pinned per brand: a copied hex goes stale the moment a canvas moves.
21
+ *
22
+ * `border[*]` is deliberately untouched — that ramp draws table gridlines, which are decorative
23
+ * and outside 1.4.11.
24
+ */
25
+ export declare function withOutlineRung(palette: PaletteProps, mode: ResolvedColorMode): PaletteProps;
26
+ /**
27
+ * A hover/active tint resolved against the surface it actually sits on, guaranteed to clear
28
+ * `MIN_PERCEPTIBLE_STEP`. Written for the recurring shape found across NavigationBar, UserDetails
29
+ * and Accordion: a pale `primary[50]`/`gray[50]` tint that measures near-1.0 on a near-white
30
+ * surface — invisible — with no dark-mode branch, so the same call site is wrong in both modes at
31
+ * once. `restSurface` is required rather than assumed white/black: a menu item's hover sits on
32
+ * its OWN list background, not necessarily the page canvas.
33
+ */
34
+ export declare function resolveHoverTint(seed: string, restSurface: string): string;
35
+ //# sourceMappingURL=outlineRung.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outlineRung.d.ts","sourceRoot":"","sources":["../../../../src/Theme/tokens/builders/outlineRung.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,+EAA+E;AAC/E,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,iBAAiB,EACvB,MAAM,GAAE,MAAoB,GAC3B,MAAM,CAaR;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,iBAAiB,GAAG,YAAY,CAc5F;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAG1E"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AA_NON_TEXT = exports.MIN_PERCEPTIBLE_STEP = void 0;
4
+ exports.liftToContrast = liftToContrast;
5
+ exports.withOutlineRung = withOutlineRung;
6
+ exports.resolveHoverTint = resolveHoverTint;
7
+ const color_1 = require("./color");
8
+ const accentText_1 = require("./accentText");
9
+ /**
10
+ * The floor a hover/active state's step off its own resting surface must clear to be seen at
11
+ * all — same value the SideBar ladder, Accordion, and NavigationBar hover states are held to.
12
+ * A "hover" a user cannot perceive is not a hover.
13
+ */
14
+ exports.MIN_PERCEPTIBLE_STEP = 1.15;
15
+ /** WCAG 1.4.11 — a control outline is a UI component boundary, held to 3:1. */
16
+ exports.AA_NON_TEXT = 3;
17
+ /**
18
+ * Walks a hex toward `target` contrast against `backdrop`, keeping its hue and saturation so the
19
+ * result still reads as the same colour. Darkens when `mode` is light, lightens when dark, and
20
+ * stops at the FIRST passing step so nothing overshoots to black or white.
21
+ */
22
+ function liftToContrast(hex, backdrop, mode, target = exports.AA_NON_TEXT) {
23
+ if ((0, color_1.contrastRatio)(hex, backdrop) >= target)
24
+ return hex;
25
+ const { s } = (0, color_1.hexToHsl)(hex);
26
+ const step = mode === "dark" ? 1 : -1;
27
+ let { l } = (0, color_1.hexToHsl)(hex);
28
+ while (l > 0 && l < 100) {
29
+ l += step;
30
+ const next = (0, color_1.withLightness)(hex, l, s);
31
+ if ((0, color_1.contrastRatio)(next, backdrop) >= target)
32
+ return next;
33
+ }
34
+ return (0, color_1.withLightness)(hex, mode === "dark" ? 100 : 0, s);
35
+ }
36
+ /**
37
+ * `boxborder[500]` is the rung every control outline reads (Checkbox, SearchSelect, the date
38
+ * pickers, the editor's inputs). It was authored as a decorative value — measured 1.30-2.56:1
39
+ * across brands, so those controls rendered effectively borderless in BOTH modes. Resolved here
40
+ * rather than hand-pinned per brand: a copied hex goes stale the moment a canvas moves.
41
+ *
42
+ * `border[*]` is deliberately untouched — that ramp draws table gridlines, which are decorative
43
+ * and outside 1.4.11.
44
+ */
45
+ function withOutlineRung(palette, mode) {
46
+ const current = palette.boxborder[500];
47
+ // The border sits between the control's fill and the surface behind it; hold it to the
48
+ // harder of the two.
49
+ const backdrop = (0, color_1.contrastRatio)(current, palette.backgroundColor.main) <=
50
+ (0, color_1.contrastRatio)(current, palette.background[50])
51
+ ? palette.backgroundColor.main
52
+ : palette.background[50];
53
+ const resolved = liftToContrast(current, backdrop, mode);
54
+ if (resolved === current)
55
+ return palette;
56
+ return { ...palette, boxborder: { ...palette.boxborder, 500: resolved } };
57
+ }
58
+ /**
59
+ * A hover/active tint resolved against the surface it actually sits on, guaranteed to clear
60
+ * `MIN_PERCEPTIBLE_STEP`. Written for the recurring shape found across NavigationBar, UserDetails
61
+ * and Accordion: a pale `primary[50]`/`gray[50]` tint that measures near-1.0 on a near-white
62
+ * surface — invisible — with no dark-mode branch, so the same call site is wrong in both modes at
63
+ * once. `restSurface` is required rather than assumed white/black: a menu item's hover sits on
64
+ * its OWN list background, not necessarily the page canvas.
65
+ */
66
+ function resolveHoverTint(seed, restSurface) {
67
+ const mode = (0, accentText_1.isDarkCanvas)(restSurface) ? "dark" : "light";
68
+ return liftToContrast(seed, restSurface, mode, exports.MIN_PERCEPTIBLE_STEP);
69
+ }
@@ -0,0 +1,35 @@
1
+ import type { ColorScale, ResolvedColorMode } from "../types";
2
+ export type StatusTone = {
3
+ /** Chip fill. */
4
+ bg: string;
5
+ /** Label ink, guaranteed >= 4.5:1 on `bg`. */
6
+ fg: string;
7
+ /** Chip outline, guaranteed >= 3:1 on `bg`. */
8
+ border: string;
9
+ };
10
+ /**
11
+ * Status chips (open / in-progress / resolved …) were authored as `X.500` text on an `X.100`
12
+ * tint, which measures 3.3-4.4:1 — under the 4.5:1 body-text bar in BOTH modes. The ink is
13
+ * resolved from the scale's own hue instead of pinned, so every brand and both modes land on the
14
+ * lightest ink that still passes rather than a hand-copied hex that goes stale.
15
+ *
16
+ * `reverseScale` flips the utility ramps in dark, so `X.100` is already a dark tint there and the
17
+ * ink walks lighter instead of darker — hence the mode argument.
18
+ */
19
+ export declare function resolveStatusTone(scale: ColorScale, mode: ResolvedColorMode): StatusTone;
20
+ /**
21
+ * Avatar initials are drawn white on a generated fill. The seed hues in use measured 1.92:1
22
+ * (`#eab308`), 2.54:1 (`#10b981`) and 3.76:1 (`#ef4444`) — failing in light mode too, not just
23
+ * dark. Darkening the fill keeps the intended hue and the white-initials look while clearing AA.
24
+ */
25
+ export declare function resolveAvatarFill(hex: string, target?: number): string;
26
+ /**
27
+ * Hue set for generated avatars. Values are seeds, not final fills — always pass them through
28
+ * `resolveAvatarFill` so the white initials stay legible.
29
+ */
30
+ export declare const AVATAR_SEEDS: readonly ["#ef4444", "#f97316", "#eab308", "#22c55e", "#10b981", "#06b6d4", "#3b82f6", "#8b5cf6", "#ec4899"];
31
+ /** Stable per-name avatar fill: same name always yields the same accessible colour. */
32
+ export declare function avatarFillFor(seedText: string): string;
33
+ /** True when `fg` clears the body-text bar on `bg` — exported for consumer assertions. */
34
+ export declare const meetsBodyText: (fg: string, bg: string) => boolean;
35
+ //# sourceMappingURL=statusTone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statusTone.d.ts","sourceRoot":"","sources":["../../../../src/Theme/tokens/builders/statusTone.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG;IACvB,iBAAiB;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,GAAG,UAAU,CAUxF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,MAAuB,GAAG,MAAM,CAGtF;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,8GAUf,CAAC;AAEX,uFAAuF;AACvF,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMtD;AAED,0FAA0F;AAC1F,eAAO,MAAM,aAAa,GAAI,IAAI,MAAM,EAAE,IAAI,MAAM,KAAG,OACd,CAAC"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.meetsBodyText = exports.AVATAR_SEEDS = void 0;
4
+ exports.resolveStatusTone = resolveStatusTone;
5
+ exports.resolveAvatarFill = resolveAvatarFill;
6
+ exports.avatarFillFor = avatarFillFor;
7
+ const color_1 = require("./color");
8
+ const accentText_1 = require("./accentText");
9
+ const outlineRung_1 = require("./outlineRung");
10
+ /**
11
+ * Status chips (open / in-progress / resolved …) were authored as `X.500` text on an `X.100`
12
+ * tint, which measures 3.3-4.4:1 — under the 4.5:1 body-text bar in BOTH modes. The ink is
13
+ * resolved from the scale's own hue instead of pinned, so every brand and both modes land on the
14
+ * lightest ink that still passes rather than a hand-copied hex that goes stale.
15
+ *
16
+ * `reverseScale` flips the utility ramps in dark, so `X.100` is already a dark tint there and the
17
+ * ink walks lighter instead of darker — hence the mode argument.
18
+ */
19
+ function resolveStatusTone(scale, mode) {
20
+ const bg = scale[100];
21
+ const inkSeed = mode === "dark" ? scale[300] : scale[700];
22
+ const edgeSeed = mode === "dark" ? scale[400] : scale[300];
23
+ return {
24
+ bg,
25
+ fg: (0, outlineRung_1.liftToContrast)(inkSeed, bg, mode, accentText_1.AA_NORMAL_TEXT),
26
+ border: (0, outlineRung_1.liftToContrast)(edgeSeed, bg, mode, outlineRung_1.AA_NON_TEXT),
27
+ };
28
+ }
29
+ /**
30
+ * Avatar initials are drawn white on a generated fill. The seed hues in use measured 1.92:1
31
+ * (`#eab308`), 2.54:1 (`#10b981`) and 3.76:1 (`#ef4444`) — failing in light mode too, not just
32
+ * dark. Darkening the fill keeps the intended hue and the white-initials look while clearing AA.
33
+ */
34
+ function resolveAvatarFill(hex, target = accentText_1.AA_NORMAL_TEXT) {
35
+ // "light" walks downward in lightness — i.e. darken until white ink clears the bar.
36
+ return (0, outlineRung_1.liftToContrast)(hex, "#ffffff", "light", target);
37
+ }
38
+ /**
39
+ * Hue set for generated avatars. Values are seeds, not final fills — always pass them through
40
+ * `resolveAvatarFill` so the white initials stay legible.
41
+ */
42
+ exports.AVATAR_SEEDS = [
43
+ "#ef4444",
44
+ "#f97316",
45
+ "#eab308",
46
+ "#22c55e",
47
+ "#10b981",
48
+ "#06b6d4",
49
+ "#3b82f6",
50
+ "#8b5cf6",
51
+ "#ec4899",
52
+ ];
53
+ /** Stable per-name avatar fill: same name always yields the same accessible colour. */
54
+ function avatarFillFor(seedText) {
55
+ let hash = 0;
56
+ for (let i = 0; i < seedText.length; i++) {
57
+ hash = (hash * 31 + seedText.charCodeAt(i)) >>> 0;
58
+ }
59
+ return resolveAvatarFill(exports.AVATAR_SEEDS[hash % exports.AVATAR_SEEDS.length]);
60
+ }
61
+ /** True when `fg` clears the body-text bar on `bg` — exported for consumer assertions. */
62
+ const meetsBodyText = (fg, bg) => (0, color_1.contrastRatio)(fg, bg) >= accentText_1.AA_NORMAL_TEXT;
63
+ exports.meetsBodyText = meetsBodyText;
@@ -0,0 +1,19 @@
1
+ export type PlanExpiryInput = string | number | Date | null | undefined;
2
+ /**
3
+ * Calendar months + leftover days between two dates.
4
+ * Anchoring on a real month boundary keeps "1 month" honest across 28/30/31-day
5
+ * months, so Jan 31 → Feb 28 reads as 28 days rather than a whole month.
6
+ */
7
+ export declare function splitMonthsAndDays(from: Date, to: Date): {
8
+ months: number;
9
+ days: number;
10
+ };
11
+ /**
12
+ * Time left on a plan, compactly: `"3mo left"` once a whole month remains,
13
+ * `"18d left"` below that. Intended for `UpgradeButton`'s `subtitle`, so it
14
+ * stays one short line. Returns `""` when there is no usable date or the plan
15
+ * has already lapsed — an expired plan is a different message, which the
16
+ * consuming app owns.
17
+ */
18
+ export declare function formatPlanExpiry(expiryDate: PlanExpiryInput, now?: Date): string;
19
+ //# sourceMappingURL=planExpiry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planExpiry.d.ts","sourceRoot":"","sources":["../../src/Utils/planExpiry.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;AAoCxE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,IAAI,GACP;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAOlC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,eAAe,EAC3B,GAAG,CAAC,EAAE,IAAI,GACT,MAAM,CAaR"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.splitMonthsAndDays = splitMonthsAndDays;
4
+ exports.formatPlanExpiry = formatPlanExpiry;
5
+ const MS_PER_DAY = 24 * 60 * 60 * 1000;
6
+ function toDate(value) {
7
+ if (value === null || value === undefined || value === "")
8
+ return null;
9
+ const date = value instanceof Date ? new Date(value.getTime()) : new Date(value);
10
+ return isNaN(date.getTime()) ? null : date;
11
+ }
12
+ function startOfDay(date) {
13
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
14
+ }
15
+ function addCalendarMonths(date, months) {
16
+ const lastDayOfTarget = new Date(date.getFullYear(), date.getMonth() + months + 1, 0).getDate();
17
+ return new Date(date.getFullYear(), date.getMonth() + months, Math.min(date.getDate(), lastDayOfTarget));
18
+ }
19
+ function daysBetween(from, to) {
20
+ return Math.round((to.getTime() - from.getTime()) / MS_PER_DAY);
21
+ }
22
+ /** Compact units (`2mo`, `5d`) — this reads inside a badge subtitle, where
23
+ * "2 months 5 days left" wraps. */
24
+ function unit(count, suffix) {
25
+ return `${count}${suffix}`;
26
+ }
27
+ /**
28
+ * Calendar months + leftover days between two dates.
29
+ * Anchoring on a real month boundary keeps "1 month" honest across 28/30/31-day
30
+ * months, so Jan 31 → Feb 28 reads as 28 days rather than a whole month.
31
+ */
32
+ function splitMonthsAndDays(from, to) {
33
+ let months = (to.getFullYear() - from.getFullYear()) * 12 +
34
+ (to.getMonth() - from.getMonth());
35
+ if (to.getDate() < from.getDate())
36
+ months -= 1;
37
+ if (months < 0)
38
+ months = 0;
39
+ return { months, days: daysBetween(addCalendarMonths(from, months), to) };
40
+ }
41
+ /**
42
+ * Time left on a plan, compactly: `"3mo left"` once a whole month remains,
43
+ * `"18d left"` below that. Intended for `UpgradeButton`'s `subtitle`, so it
44
+ * stays one short line. Returns `""` when there is no usable date or the plan
45
+ * has already lapsed — an expired plan is a different message, which the
46
+ * consuming app owns.
47
+ */
48
+ function formatPlanExpiry(expiryDate, now) {
49
+ const expiry = toDate(expiryDate);
50
+ if (!expiry)
51
+ return "";
52
+ const expiryDay = startOfDay(expiry);
53
+ const today = startOfDay(now !== null && now !== void 0 ? now : new Date());
54
+ const daysLeft = daysBetween(today, expiryDay);
55
+ if (daysLeft < 0)
56
+ return "";
57
+ if (daysLeft === 0)
58
+ return "Expires today";
59
+ const { months, days } = splitMonthsAndDays(today, expiryDay);
60
+ return months > 0 ? `${unit(months, "mo")} left` : `${unit(days, "d")} left`;
61
+ }
package/dist/index.d.ts CHANGED
@@ -33,6 +33,7 @@ import { RadioButton, RadioButtonGroup } from "./Components/RadioButton/RadioBut
33
33
  import Reorder from "./Components/Reorder/Reorder";
34
34
  import Search from "./Components/Search/Search";
35
35
  import Select from "./Components/Select/Select";
36
+ import SelectV2 from "./Components/SelectV2/SelectV2";
36
37
  import SearchSelect from "./Components/SearchSelect/SearchSelect";
37
38
  import SelectSearch from "./Components/SelectSearch/SelectSearch";
38
39
  import SideBar from "./Components/SideBar/SideBar";
@@ -77,12 +78,14 @@ import StageProgress from "./Components/StageProgress/StageProgress";
77
78
  import StageItem from "./Components/StageProgress/StageItem";
78
79
  import OrgSwitcher from "./Components/OrgSwitcher/OrgSwitcher";
79
80
  import UpgradeButton from "./Components/UpgradeButton/UpgradeButton";
81
+ import PlanPill from "./Components/PlanPill/PlanPill";
82
+ import { formatPlanExpiry, splitMonthsAndDays } from "./Utils/planExpiry";
80
83
  import UserDetails from "./Components/UserDetails/UserDetails";
81
84
  import RolesPermission from "./Components/RolesPermission/RolesPermission";
82
85
  import CustomModulesTable from "./Components/CustomModulesTable/CustomModulesTable";
83
86
  import SignInActivityTable from "./Components/SignInActivityTable/SignInActivityTable";
84
87
  import OrganizationDetails from "./Components/OrganizationDetails/OrganizationDetails";
85
- export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, EmptyState, WorkspaceWindow, WorkspaceTray, WorkspaceTrayPreview, FieldSelectModal, FilePreview, FilePreviewTrigger, FileUpload, FileUploader, FilterSidebar, FormWrapper, LazyWrapper, MoreItems, PdfViewer, ScrollToTop, CopyButton, StageProgress, StageItem, OrgSwitcher, UpgradeButton, UserDetails, RolesPermission, CustomModulesTable, SignInActivityTable, OrganizationDetails, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, Notification, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SearchSelect, SelectSearch, SideBar, Slider, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp, useSidebarPrefs, useIsTruncated, useCustomTheme, ThemesList, debounce, };
88
+ export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, EmptyState, WorkspaceWindow, WorkspaceTray, WorkspaceTrayPreview, FieldSelectModal, FilePreview, FilePreviewTrigger, FileUpload, FileUploader, FilterSidebar, FormWrapper, LazyWrapper, MoreItems, PdfViewer, ScrollToTop, CopyButton, StageProgress, StageItem, OrgSwitcher, UpgradeButton, PlanPill, formatPlanExpiry, splitMonthsAndDays, UserDetails, RolesPermission, CustomModulesTable, SignInActivityTable, OrganizationDetails, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, Notification, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SelectV2, SearchSelect, SelectSearch, SideBar, Slider, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp, useSidebarPrefs, useIsTruncated, useCustomTheme, ThemesList, debounce, };
86
89
  export default withTheme;
87
90
  export type { UserDetailsProps, UserDetailsLabels, UserListItem, SelectedUserDetail, UserDetailRow, RoleOption, AddUserFormValues, ChangeRoleSubmitPayload, } from "./Components/UserDetails/UserDetailsProps";
88
91
  export type { WorkspaceWindowProps, WorkspaceWindowState, WorkspaceTrayProps, WorkspaceTrayItem, WorkspaceTrayPreviewProps, } from "./Components/WorkspaceWindow/WorkspaceWindowProps";
@@ -97,8 +100,13 @@ export type { PixelizeThemeProviderProps, ThemeModeContextValue, ThemeSwitcherPr
97
100
  export { brandThemes } from "./Theme";
98
101
  export { lightPalettes, darkPalettes, palettes, themeNames, } from "./Theme/tokens/brands";
99
102
  export { buildDarkPalette } from "./Theme/tokens/builders/buildDarkPalette";
103
+ export { AA_NON_TEXT, liftToContrast, withOutlineRung, } from "./Theme/tokens/builders/outlineRung";
104
+ export { AVATAR_SEEDS, avatarFillFor, meetsBodyText, resolveAvatarFill, resolveStatusTone, } from "./Theme/tokens/builders/statusTone";
105
+ export type { StatusTone } from "./Theme/tokens/builders/statusTone";
100
106
  export type { ColorMode, ResolvedColorMode, ThemeName, PaletteProps, ColorScale, BrandScale, SemanticColors, NamedSurfaces, } from "./Theme/tokens/types";
101
107
  export { isDarkCanvas, onFilled, onGradient, accentTextOnCanvas, pickAccentText, AA_NORMAL_TEXT, DARK_CANVAS_LUMINANCE, } from "./Theme/tokens/builders/accentText";
102
108
  export { hexToRgb, hexToRgba, compositeOver, rgbToHex, rgbToHsl, hslToRgb, hexToHsl, hslToHex, withLightness, mix, relativeLuminance, contrastRatio, } from "./Theme/tokens/builders/color";
103
109
  export type { Rgb, Hsl } from "./Theme/tokens/builders/color";
110
+ export type { SelectV2Props, SelectV2Size, OptionProp as SelectV2Option } from "./Components/SelectV2/SelectV2Props";
111
+ export type { PlanPillProps, PlanPillTone } from "./Components/PlanPill/PlanPillProps";
104
112
  //# sourceMappingURL=index.d.ts.map