pixelize-design-library 2.4.2-beta.4 → 2.4.2-beta.40

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 (525) hide show
  1. package/COMPONENT-GOTCHAS.md +1087 -0
  2. package/README.md +26 -0
  3. package/dist/Components/Accordion/Accordion.d.ts +1 -0
  4. package/dist/Components/Accordion/Accordion.js +4 -1
  5. package/dist/Components/Accordion/AccordionProps.d.ts +2 -0
  6. package/dist/Components/AlertDialog/AlertDialog.d.ts +1 -0
  7. package/dist/Components/AlertDialog/AlertDialog.js +1 -0
  8. package/dist/Components/AlertDialog/AlertDialogProps.d.ts +2 -0
  9. package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.d.ts +1 -0
  10. package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +1 -0
  11. package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChartProps.d.ts +4 -0
  12. package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.d.ts +1 -0
  13. package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.js +1 -0
  14. package/dist/Components/Apexcharts/ApexBarChart/ApexBarChartProps.d.ts +6 -0
  15. package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.d.ts +1 -0
  16. package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
  17. package/dist/Components/Apexcharts/ApexLineChart/ApexLineChartProps.d.ts +8 -0
  18. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.d.ts +1 -0
  19. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +1 -0
  20. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.d.ts +6 -0
  21. package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.d.ts +1 -0
  22. package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +1 -0
  23. package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarChartsProps.d.ts +3 -0
  24. package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.d.ts +1 -0
  25. package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +1 -0
  26. package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChartProps.d.ts +3 -0
  27. package/dist/Components/AppSwitcher/AppMark.d.ts +19 -0
  28. package/dist/Components/AppSwitcher/AppMark.js +62 -0
  29. package/dist/Components/AppSwitcher/AppSwitcher.d.ts +4 -0
  30. package/dist/Components/AppSwitcher/AppSwitcher.js +278 -0
  31. package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +70 -0
  32. package/dist/Components/AppSwitcher/AppSwitcherProps.js +86 -0
  33. package/dist/Components/AppSwitcher/useAppSwitcherShortcut.d.ts +3 -0
  34. package/dist/Components/AppSwitcher/useAppSwitcherShortcut.js +31 -0
  35. package/dist/Components/AppearanceSettings/AppearanceSettings.js +2 -1
  36. package/dist/Components/AppearanceSettings/AppearanceSettingsProps.d.ts +2 -0
  37. package/dist/Components/Breadcrumbs/BreadcrumbsProps.d.ts +3 -0
  38. package/dist/Components/Button/Button.d.ts +2 -2
  39. package/dist/Components/Button/Button.js +4 -3
  40. package/dist/Components/Button/Button.styles.js +37 -23
  41. package/dist/Components/Button/ButtonProps.d.ts +9 -1
  42. package/dist/Components/ButtonGroupIcon/ButtonGoupIconProps.d.ts +7 -0
  43. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +2 -4
  44. package/dist/Components/Buttons/ButtonsProps.d.ts +2 -0
  45. package/dist/Components/Card/Card.d.ts +1 -1
  46. package/dist/Components/Card/Card.js +2 -2
  47. package/dist/Components/Card/CardProps.d.ts +3 -1
  48. package/dist/Components/Card/PaymentCard/PaymentCard.js +21 -12
  49. package/dist/Components/Card/PaymentCard/PaymentCardProps.d.ts +6 -0
  50. package/dist/Components/Checkbox/Checkbox.d.ts +1 -0
  51. package/dist/Components/Checkbox/Checkbox.js +2 -1
  52. package/dist/Components/Checkbox/Checkbox.styles.js +12 -7
  53. package/dist/Components/Checkbox/CheckboxProps.d.ts +4 -0
  54. package/dist/Components/Common/ErrorComponent.d.ts +2 -0
  55. package/dist/Components/Common/ErrorComponent.js +7 -5
  56. package/dist/Components/Common/ErrorMessage.js +2 -2
  57. package/dist/Components/Common/FormLabel.d.ts +4 -0
  58. package/dist/Components/Common/FormLabel.js +1 -0
  59. package/dist/Components/Common/FormattedDescription.d.ts +2 -0
  60. package/dist/Components/Common/FormattedDescription.js +1 -0
  61. package/dist/Components/Common/HelperText.d.ts +2 -0
  62. package/dist/Components/Common/HelperText.js +2 -0
  63. package/dist/Components/Common/Label.d.ts +1 -0
  64. package/dist/Components/Common/Label.js +1 -0
  65. package/dist/Components/Common/fieldStyles.js +1 -1
  66. package/dist/Components/ContactForm/ContactForm.d.ts +1 -0
  67. package/dist/Components/ContactForm/ContactForm.js +1 -0
  68. package/dist/Components/ContactForm/ContactFormProps.d.ts +4 -0
  69. package/dist/Components/CopyButton/CopyButton.d.ts +3 -1
  70. package/dist/Components/CopyButton/CopyButton.js +9 -3
  71. package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +8 -0
  72. package/dist/Components/DatePicker/CalendarPanel.d.ts +6 -0
  73. package/dist/Components/DatePicker/CalendarPanel.js +37 -15
  74. package/dist/Components/DatePicker/DatePicker.d.ts +1 -0
  75. package/dist/Components/DatePicker/DatePicker.js +1 -0
  76. package/dist/Components/DatePicker/DatePickerProps.d.ts +30 -0
  77. package/dist/Components/DatePicker/RangeDatePicker.d.ts +1 -0
  78. package/dist/Components/DatePicker/RangeDatePicker.js +30 -5
  79. package/dist/Components/DatePicker/SingleDatePicker.d.ts +1 -0
  80. package/dist/Components/DatePicker/SingleDatePicker.js +49 -14
  81. package/dist/Components/DatePicker/ThemeDatePicker.d.ts +1 -0
  82. package/dist/Components/DatePicker/ThemeDatePicker.js +1 -0
  83. package/dist/Components/DatePicker/TimeOnlyPicker.d.ts +1 -0
  84. package/dist/Components/DatePicker/TimeOnlyPicker.js +11 -2
  85. package/dist/Components/DatePicker/TimePicker.d.ts +1 -0
  86. package/dist/Components/DatePicker/TimePicker.js +4 -3
  87. package/dist/Components/DatePicker/TimePickerInput.d.ts +1 -0
  88. package/dist/Components/DatePicker/TimePickerInput.js +2 -1
  89. package/dist/Components/DatePicker/dayStates.d.ts +56 -0
  90. package/dist/Components/DatePicker/dayStates.js +87 -0
  91. package/dist/Components/Divider/Divider.d.ts +1 -0
  92. package/dist/Components/Divider/Divider.js +1 -0
  93. package/dist/Components/Drawer/DrawerProps.d.ts +2 -0
  94. package/dist/Components/Dropdown/DropDown.d.ts +1 -0
  95. package/dist/Components/Dropdown/DropDown.js +22 -6
  96. package/dist/Components/Dropdown/DropdownProps.d.ts +3 -0
  97. package/dist/Components/Editor/Editor.d.ts +1 -0
  98. package/dist/Components/Editor/Editor.js +1 -0
  99. package/dist/Components/Editor/EditorProps.d.ts +2 -0
  100. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.d.ts +1 -0
  101. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -5
  102. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +4 -0
  103. package/dist/Components/EmptyState/EmptyState.d.ts +1 -0
  104. package/dist/Components/EmptyState/EmptyState.js +4 -2
  105. package/dist/Components/EmptyState/EmptyStateProps.d.ts +3 -0
  106. package/dist/Components/FeedbackForm/FeedbackForm.d.ts +3 -0
  107. package/dist/Components/FeedbackForm/FeedbackForm.js +1 -0
  108. package/dist/Components/FieldSelectModal/FieldSelectModal.d.ts +3 -2
  109. package/dist/Components/FieldSelectModal/FieldSelectModal.js +1 -0
  110. package/dist/Components/FilePreview/FilePreview.d.ts +1 -0
  111. package/dist/Components/FilePreview/FilePreview.js +3 -1
  112. package/dist/Components/FilePreview/FilePreviewProps.d.ts +5 -2
  113. package/dist/Components/FileUpload/FileUpload.d.ts +1 -0
  114. package/dist/Components/FileUpload/FileUpload.js +7 -5
  115. package/dist/Components/FileUpload/FileUploadProps.d.ts +7 -1
  116. package/dist/Components/FileUpload/constants.js +1 -0
  117. package/dist/Components/FileUploader/FileUploader.d.ts +1 -0
  118. package/dist/Components/FileUploader/FileUploader.js +1 -0
  119. package/dist/Components/FileUploader/FileUploaderProps.d.ts +2 -0
  120. package/dist/Components/FilterSidebar/FilterSidebar.d.ts +3 -0
  121. package/dist/Components/FilterSidebar/FilterSidebar.js +5 -5
  122. package/dist/Components/FilterSidebar/filterHoverStyle.d.ts +2 -10
  123. package/dist/Components/FilterSidebar/filterHoverStyle.js +3 -10
  124. package/dist/Components/Form/FormWrapper.d.ts +3 -0
  125. package/dist/Components/Form/FormWrapper.js +2 -1
  126. package/dist/Components/Header/HeaderProps.d.ts +5 -0
  127. package/dist/Components/Header/components/mobileMenu.js +12 -3
  128. package/dist/Components/Input/Input/InputProps.d.ts +2 -0
  129. package/dist/Components/Input/PhoneNumberInput.d.ts +1 -0
  130. package/dist/Components/Input/PhoneNumberInput.js +1 -0
  131. package/dist/Components/Input/PhoneNumberInputProps.d.ts +3 -0
  132. package/dist/Components/Input/Switch/InputSwitch.d.ts +2 -0
  133. package/dist/Components/Input/Switch/InputSwitch.js +1 -0
  134. package/dist/Components/Input/TextInput.js +1 -0
  135. package/dist/Components/Input/TextInput.styles.js +8 -10
  136. package/dist/Components/Input/TextInputProps.d.ts +2 -0
  137. package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -0
  138. package/dist/Components/InputTextArea/InputTextArea.js +1 -0
  139. package/dist/Components/InputTextArea/InputTextArea.style.js +7 -6
  140. package/dist/Components/InputTextArea/InputTextAreaProps.d.ts +1 -0
  141. package/dist/Components/KanbanBoard/AccountCard.d.ts +3 -0
  142. package/dist/Components/KanbanBoard/AccountCard.js +1 -0
  143. package/dist/Components/KanbanBoard/AccountRow.d.ts +1 -0
  144. package/dist/Components/KanbanBoard/AccountRow.js +1 -0
  145. package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.d.ts +2 -0
  146. package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  147. package/dist/Components/KanbanBoard/KanbanBoard.d.ts +1 -0
  148. package/dist/Components/KanbanBoard/KanbanBoard.js +1 -0
  149. package/dist/Components/KanbanBoard/KanbanBoardProps.d.ts +39 -14
  150. package/dist/Components/KanbanBoard/MeasuredItem.d.ts +1 -0
  151. package/dist/Components/KanbanBoard/MeasuredItem.js +1 -0
  152. package/dist/Components/LazyWrapper/LazyWrapper.d.ts +3 -2
  153. package/dist/Components/LazyWrapper/LazyWrapper.js +1 -0
  154. package/dist/Components/LimitReachedModal/LimitReachedModalProps.d.ts +4 -1
  155. package/dist/Components/LimitReachedModal/limitReachedCopy.d.ts +2 -0
  156. package/dist/Components/LimitReachedModal/limitReachedCopy.js +2 -0
  157. package/dist/Components/Loading/Loading.d.ts +1 -0
  158. package/dist/Components/Loading/Loading.js +16 -14
  159. package/dist/Components/Loading/LoadingProps.d.ts +2 -0
  160. package/dist/Components/Modal/ModalProps.d.ts +2 -0
  161. package/dist/Components/MoreItems/MoreItems.d.ts +1 -0
  162. package/dist/Components/MoreItems/MoreItems.js +4 -1
  163. package/dist/Components/MoreItems/MoreItemsProps.d.ts +4 -2
  164. package/dist/Components/MultiSelect/MultiSelect.js +2 -2
  165. package/dist/Components/MultiSelect/MultiSelectProps.d.ts +2 -0
  166. package/dist/Components/NavigationBar/NavigationBar.js +9 -10
  167. package/dist/Components/NavigationBar/NavigationBarProps.d.ts +3 -0
  168. package/dist/Components/NoteTextArea/NoteTextArea.d.ts +1 -0
  169. package/dist/Components/NoteTextArea/NoteTextArea.js +10 -4
  170. package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +2 -0
  171. package/dist/Components/Notification/Notification.d.ts +1 -0
  172. package/dist/Components/Notification/Notification.js +1 -0
  173. package/dist/Components/Notification/NotificationProps.d.ts +6 -0
  174. package/dist/Components/NumberInput/NumberInput.d.ts +1 -0
  175. package/dist/Components/NumberInput/NumberInput.js +4 -1
  176. package/dist/Components/NumberInput/NumberInput.styles.js +7 -6
  177. package/dist/Components/NumberInput/NumberInputProps.d.ts +3 -0
  178. package/dist/Components/OrgSwitcher/OrgSwitcher.js +14 -10
  179. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +6 -1
  180. package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +1 -0
  181. package/dist/Components/OrganizationDetails/OrganizationDetails.d.ts +1 -0
  182. package/dist/Components/OrganizationDetails/OrganizationDetails.js +4 -2
  183. package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +16 -4
  184. package/dist/Components/PdfViewer/PdfViewer.d.ts +2 -1
  185. package/dist/Components/PdfViewer/PdfViewer.js +7 -1
  186. package/dist/Components/PinInput/PinInput.d.ts +1 -0
  187. package/dist/Components/PinInput/PinInput.js +1 -0
  188. package/dist/Components/PinInput/PinInputProps.d.ts +2 -0
  189. package/dist/Components/PinInputs/PinInputs.d.ts +1 -0
  190. package/dist/Components/PinInputs/PinInputs.js +1 -0
  191. package/dist/Components/PinInputs/PinInputsProps.d.ts +1 -0
  192. package/dist/Components/PlanBadge/PlanBadgeProps.d.ts +2 -0
  193. package/dist/Components/PlanPill/PlanPillProps.d.ts +2 -0
  194. package/dist/Components/Primitives/Primitives.d.ts +6 -0
  195. package/dist/Components/Primitives/Primitives.js +113 -0
  196. package/dist/Components/ProductCard/ProductCardProps.d.ts +10 -0
  197. package/dist/Components/ProductCard/ProductReview.d.ts +1 -0
  198. package/dist/Components/ProductCard/ProductReview.js +6 -1
  199. package/dist/Components/ProductCard/ProductTags.js +1 -1
  200. package/dist/Components/ProductDetails/ProductDetailsProps.d.ts +7 -0
  201. package/dist/Components/ProfileCard/ProfileCard.js +1 -1
  202. package/dist/Components/ProfileCard/ProfileCardProps.d.ts +3 -0
  203. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +1 -0
  204. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +5 -3
  205. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.d.ts +9 -1
  206. package/dist/Components/ProgressBar/ProgressBar.d.ts +1 -0
  207. package/dist/Components/ProgressBar/ProgressBar.js +1 -0
  208. package/dist/Components/ProgressBar/ProgressBarProps.d.ts +2 -0
  209. package/dist/Components/RadioButton/RadioButton.js +3 -2
  210. package/dist/Components/RadioButton/RadioButtonProps.d.ts +2 -0
  211. package/dist/Components/Reorder/Reorder.d.ts +2 -0
  212. package/dist/Components/Reorder/Reorder.js +1 -0
  213. package/dist/Components/Reorder/ReorderProps.d.ts +3 -0
  214. package/dist/Components/RolesPermission/RolesPermission.d.ts +1 -0
  215. package/dist/Components/RolesPermission/RolesPermission.js +5 -3
  216. package/dist/Components/RolesPermission/RolesPermissionProps.d.ts +16 -1
  217. package/dist/Components/ScrollToTop/ScrollToTop.d.ts +3 -2
  218. package/dist/Components/ScrollToTop/ScrollToTop.js +4 -1
  219. package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +7 -0
  220. package/dist/Components/ScrollbarBox/ScrollbarBox.js +1 -0
  221. package/dist/Components/Search/Search.d.ts +1 -0
  222. package/dist/Components/Search/Search.js +3 -2
  223. package/dist/Components/Search/SearchProps.d.ts +2 -0
  224. package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -0
  225. package/dist/Components/SearchSelect/SearchSelect.js +48 -37
  226. package/dist/Components/SearchSelect/SearchSelectProps.d.ts +23 -0
  227. package/dist/Components/SegmentedControl/SegmentedControl.d.ts +3 -0
  228. package/dist/Components/SegmentedControl/SegmentedControl.js +89 -0
  229. package/dist/Components/SegmentedControl/SegmentedControlProps.d.ts +23 -0
  230. package/dist/Components/SegmentedControl/SegmentedControlProps.js +2 -0
  231. package/dist/Components/Select/Select.d.ts +1 -1
  232. package/dist/Components/Select/Select.js +4 -2
  233. package/dist/Components/Select/Select.styles.js +3 -2
  234. package/dist/Components/Select/SelectProps.d.ts +6 -0
  235. package/dist/Components/SelectSearch/SelectSearch.d.ts +1 -0
  236. package/dist/Components/SelectSearch/SelectSearch.js +37 -15
  237. package/dist/Components/SelectSearch/SelectSearchProps.d.ts +5 -0
  238. package/dist/Components/SelectV2/SelectV2.d.ts +1 -0
  239. package/dist/Components/SelectV2/SelectV2.js +20 -5
  240. package/dist/Components/SelectV2/SelectV2Props.d.ts +6 -1
  241. package/dist/Components/SideBar/SecondaryBar.js +1 -1
  242. package/dist/Components/SideBar/SideBar.js +5 -3
  243. package/dist/Components/SideBar/SideBarProps.d.ts +38 -24
  244. package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -2
  245. package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +3 -0
  246. package/dist/Components/Skeletons/SkeletonProps.d.ts +2 -0
  247. package/dist/Components/Skeletons/Skeletons.d.ts +1 -0
  248. package/dist/Components/Skeletons/Skeletons.js +1 -0
  249. package/dist/Components/Slider/Slider.d.ts +3 -0
  250. package/dist/Components/Slider/Slider.js +9 -1
  251. package/dist/Components/StageProgress/StageItem.d.ts +1 -0
  252. package/dist/Components/StageProgress/StageItem.js +1 -0
  253. package/dist/Components/StageProgress/StageProgress.d.ts +1 -0
  254. package/dist/Components/StageProgress/StageProgress.js +1 -0
  255. package/dist/Components/StageProgress/StageProgressProps.d.ts +45 -4
  256. package/dist/Components/StageProgress/StageProgressProps.js +6 -4
  257. package/dist/Components/StageProgress/StepperStage.js +2 -2
  258. package/dist/Components/Switch/Switch.d.ts +1 -0
  259. package/dist/Components/Switch/Switch.js +1 -0
  260. package/dist/Components/Switch/SwitchProps.d.ts +1 -0
  261. package/dist/Components/Table/Table.d.ts +2 -1
  262. package/dist/Components/Table/Table.js +15 -5
  263. package/dist/Components/Table/TableProps.d.ts +47 -0
  264. package/dist/Components/Table/components/Pagination.js +1 -1
  265. package/dist/Components/Table/components/TableActions.js +2 -2
  266. package/dist/Components/Table/components/TableBody.js +44 -18
  267. package/dist/Components/Table/components/TableGroupRow.js +1 -1
  268. package/dist/Components/Table/components/TableHeader.js +21 -8
  269. package/dist/Components/Table/components/TableSearch.js +1 -1
  270. package/dist/Components/Table/filters/CompactSelect.d.ts +1 -0
  271. package/dist/Components/Table/filters/CompactSelect.js +29 -8
  272. package/dist/Components/Table/filters/LeftFilterPane.d.ts +9 -1
  273. package/dist/Components/Table/filters/LeftFilterPane.js +1 -1
  274. package/dist/Components/Table/settings/ManageColumns.js +8 -5
  275. package/dist/Components/Table/settings/TableSettings.js +6 -4
  276. package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
  277. package/dist/Components/Table/variants/TableVariantContext.js +17 -0
  278. package/dist/Components/Table/variants/classic.d.ts +6 -0
  279. package/dist/Components/Table/variants/classic.js +47 -0
  280. package/dist/Components/Table/variants/index.d.ts +7 -0
  281. package/dist/Components/Table/variants/index.js +27 -0
  282. package/dist/Components/Table/variants/pillInk.d.ts +6 -0
  283. package/dist/Components/Table/variants/pillInk.js +21 -0
  284. package/dist/Components/Table/variants/studio.d.ts +6 -0
  285. package/dist/Components/Table/variants/studio.js +50 -0
  286. package/dist/Components/Table/variants/tokens.d.ts +49 -0
  287. package/dist/Components/Table/variants/tokens.js +2 -0
  288. package/dist/Components/Tag/Tag.d.ts +1 -0
  289. package/dist/Components/Tag/Tag.js +1 -0
  290. package/dist/Components/Tag/Tag.styles.js +16 -11
  291. package/dist/Components/Tag/TagProps.d.ts +7 -0
  292. package/dist/Components/Timeline/Timeline.d.ts +1 -0
  293. package/dist/Components/Timeline/Timeline.js +1 -0
  294. package/dist/Components/Timeline/TimelineProps.d.ts +8 -0
  295. package/dist/Components/Toaster/Toaster.d.ts +1 -0
  296. package/dist/Components/Toaster/Toaster.js +1 -0
  297. package/dist/Components/Toaster/ToasterProps.d.ts +3 -0
  298. package/dist/Components/Toggle/TableToggle.d.ts +1 -0
  299. package/dist/Components/Toggle/TableToggle.js +73 -18
  300. package/dist/Components/Toggle/TableToggleProps.d.ts +6 -0
  301. package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +3 -0
  302. package/dist/Components/ToggleSwitch/ToggleSwitch.js +19 -0
  303. package/dist/Components/ToggleSwitch/ToggleSwitchProps.d.ts +13 -0
  304. package/dist/Components/ToggleSwitch/ToggleSwitchProps.js +2 -0
  305. package/dist/Components/ToolTip/ToolTip.d.ts +1 -0
  306. package/dist/Components/ToolTip/ToolTip.js +7 -6
  307. package/dist/Components/ToolTip/ToolTipProps.d.ts +5 -1
  308. package/dist/Components/Trail/EditableCell.d.ts +2 -0
  309. package/dist/Components/Trail/EditableCell.js +2 -1
  310. package/dist/Components/Trail/SelectAllCheckbox.d.ts +1 -0
  311. package/dist/Components/Trail/SelectAllCheckbox.js +1 -0
  312. package/dist/Components/Trail/TrailWorks.d.ts +1 -0
  313. package/dist/Components/Trail/TrailWorks.js +2 -1
  314. package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +6 -2
  315. package/dist/Components/UserDetails/DeactivateConfirmModal.js +1 -1
  316. package/dist/Components/UserDetails/UserDetails.d.ts +1 -0
  317. package/dist/Components/UserDetails/UserDetails.js +6 -3
  318. package/dist/Components/UserDetails/UserDetailsProps.d.ts +30 -1
  319. package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +6 -1
  320. package/dist/Hooks/exclusiveOverlay.d.ts +4 -0
  321. package/dist/Hooks/exclusiveOverlay.js +22 -0
  322. package/dist/Hooks/useExclusiveOverlay.d.ts +5 -0
  323. package/dist/Hooks/useExclusiveOverlay.js +24 -0
  324. package/dist/Theme/assertPalette.d.ts +1 -1
  325. package/dist/Theme/assertPalette.js +3 -2
  326. package/dist/Theme/chakra/Menu.styles.d.ts +2 -0
  327. package/dist/Theme/chakra/Menu.styles.js +9 -5
  328. package/dist/Theme/chakra/Popover.styles.d.ts +3 -0
  329. package/dist/Theme/chakra/Popover.styles.js +5 -1
  330. package/dist/Theme/chakra/componentStyles.d.ts +5 -0
  331. package/dist/Theme/chakra/componentStyles.js +16 -9
  332. package/dist/Theme/chakra/createBrandTheme.js +22 -9
  333. package/dist/Theme/chakra/focusRing.styles.d.ts +52 -0
  334. package/dist/Theme/chakra/focusRing.styles.js +46 -0
  335. package/dist/Theme/provider/ThemeSwitcher.js +5 -2
  336. package/dist/Theme/tokens/brands/index.js +6 -1
  337. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +1 -0
  338. package/dist/Theme/tokens/builders/buildDarkPalette.js +6 -1
  339. package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  340. package/dist/Theme/tokens/builders/filledSurface.d.ts +29 -0
  341. package/dist/Theme/tokens/builders/filledSurface.js +74 -0
  342. package/dist/Theme/tokens/builders/focusRing.d.ts +52 -0
  343. package/dist/Theme/tokens/builders/focusRing.js +92 -0
  344. package/dist/Theme/tokens/builders/index.d.ts +2 -0
  345. package/dist/Theme/tokens/builders/index.js +2 -0
  346. package/dist/Theme/tokens/builders/outlineRung.d.ts +41 -3
  347. package/dist/Theme/tokens/builders/outlineRung.js +82 -5
  348. package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
  349. package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
  350. package/dist/Theme/tokens/builders/resolvedRungs.d.ts +5 -1
  351. package/dist/Theme/tokens/builders/resolvedRungs.js +7 -2
  352. package/dist/Theme/tokens/builders/rowStates.d.ts +13 -0
  353. package/dist/Theme/tokens/builders/rowStates.js +19 -0
  354. package/dist/Theme/tokens/builders/scrollShadow.d.ts +2 -0
  355. package/dist/Theme/tokens/builders/scrollShadow.js +16 -0
  356. package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -2
  357. package/dist/Theme/tokens/builders/surfaceRungs.js +19 -9
  358. package/dist/Theme/tokens/types.d.ts +21 -1
  359. package/dist/Utils/table.d.ts +3 -0
  360. package/dist/Utils/table.js +49 -3
  361. package/dist/esm/Components/Accordion/Accordion.js +4 -1
  362. package/dist/esm/Components/AlertDialog/AlertDialog.js +1 -0
  363. package/dist/esm/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +1 -0
  364. package/dist/esm/Components/Apexcharts/ApexBarChart/ApexBarChart.js +1 -0
  365. package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
  366. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +1 -0
  367. package/dist/esm/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +1 -0
  368. package/dist/esm/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +1 -0
  369. package/dist/esm/Components/AppSwitcher/AppMark.js +56 -0
  370. package/dist/esm/Components/AppSwitcher/AppSwitcher.js +243 -0
  371. package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +78 -0
  372. package/dist/esm/Components/AppSwitcher/useAppSwitcherShortcut.js +27 -0
  373. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +2 -1
  374. package/dist/esm/Components/Button/Button.js +5 -4
  375. package/dist/esm/Components/Button/Button.styles.js +38 -24
  376. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +2 -4
  377. package/dist/esm/Components/Card/Card.js +2 -2
  378. package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +21 -12
  379. package/dist/esm/Components/Checkbox/Checkbox.js +2 -1
  380. package/dist/esm/Components/Checkbox/Checkbox.styles.js +13 -8
  381. package/dist/esm/Components/Common/ErrorComponent.js +7 -5
  382. package/dist/esm/Components/Common/ErrorMessage.js +2 -2
  383. package/dist/esm/Components/Common/FormLabel.js +1 -0
  384. package/dist/esm/Components/Common/FormattedDescription.js +1 -0
  385. package/dist/esm/Components/Common/HelperText.js +2 -0
  386. package/dist/esm/Components/Common/Label.js +1 -0
  387. package/dist/esm/Components/Common/fieldStyles.js +1 -1
  388. package/dist/esm/Components/ContactForm/ContactForm.js +1 -0
  389. package/dist/esm/Components/CopyButton/CopyButton.js +10 -4
  390. package/dist/esm/Components/DatePicker/CalendarPanel.js +38 -16
  391. package/dist/esm/Components/DatePicker/DatePicker.js +1 -0
  392. package/dist/esm/Components/DatePicker/RangeDatePicker.js +31 -6
  393. package/dist/esm/Components/DatePicker/SingleDatePicker.js +50 -15
  394. package/dist/esm/Components/DatePicker/ThemeDatePicker.js +1 -0
  395. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +11 -2
  396. package/dist/esm/Components/DatePicker/TimePicker.js +4 -3
  397. package/dist/esm/Components/DatePicker/TimePickerInput.js +2 -1
  398. package/dist/esm/Components/DatePicker/dayStates.js +79 -0
  399. package/dist/esm/Components/Divider/Divider.js +1 -0
  400. package/dist/esm/Components/Dropdown/DropDown.js +23 -7
  401. package/dist/esm/Components/Editor/Editor.js +1 -0
  402. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -5
  403. package/dist/esm/Components/EmptyState/EmptyState.js +4 -2
  404. package/dist/esm/Components/FeedbackForm/FeedbackForm.js +1 -0
  405. package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +1 -0
  406. package/dist/esm/Components/FilePreview/FilePreview.js +3 -1
  407. package/dist/esm/Components/FileUpload/FileUpload.js +8 -6
  408. package/dist/esm/Components/FileUpload/constants.js +1 -0
  409. package/dist/esm/Components/FileUploader/FileUploader.js +1 -0
  410. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +5 -5
  411. package/dist/esm/Components/FilterSidebar/filterHoverStyle.js +3 -10
  412. package/dist/esm/Components/Form/FormWrapper.js +2 -1
  413. package/dist/esm/Components/Header/components/mobileMenu.js +12 -3
  414. package/dist/esm/Components/Input/PhoneNumberInput.js +1 -0
  415. package/dist/esm/Components/Input/Switch/InputSwitch.js +1 -0
  416. package/dist/esm/Components/Input/TextInput.js +1 -0
  417. package/dist/esm/Components/Input/TextInput.styles.js +8 -10
  418. package/dist/esm/Components/InputTextArea/InputTextArea.js +1 -0
  419. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +7 -6
  420. package/dist/esm/Components/KanbanBoard/AccountCard.js +1 -0
  421. package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -0
  422. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  423. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +1 -0
  424. package/dist/esm/Components/KanbanBoard/MeasuredItem.js +1 -0
  425. package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -0
  426. package/dist/esm/Components/LimitReachedModal/limitReachedCopy.js +2 -0
  427. package/dist/esm/Components/Loading/Loading.js +13 -11
  428. package/dist/esm/Components/MoreItems/MoreItems.js +4 -1
  429. package/dist/esm/Components/MultiSelect/MultiSelect.js +2 -2
  430. package/dist/esm/Components/NavigationBar/NavigationBar.js +9 -10
  431. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +10 -4
  432. package/dist/esm/Components/Notification/Notification.js +1 -0
  433. package/dist/esm/Components/NumberInput/NumberInput.js +5 -2
  434. package/dist/esm/Components/NumberInput/NumberInput.styles.js +7 -6
  435. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +14 -10
  436. package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +1 -0
  437. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -3
  438. package/dist/esm/Components/PdfViewer/PdfViewer.js +7 -1
  439. package/dist/esm/Components/PinInput/PinInput.js +1 -0
  440. package/dist/esm/Components/PinInputs/PinInputs.js +1 -0
  441. package/dist/esm/Components/Primitives/Primitives.js +6 -0
  442. package/dist/esm/Components/ProductCard/ProductReview.js +6 -1
  443. package/dist/esm/Components/ProductCard/ProductTags.js +1 -1
  444. package/dist/esm/Components/ProfileCard/ProfileCard.js +1 -1
  445. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +6 -4
  446. package/dist/esm/Components/ProgressBar/ProgressBar.js +1 -0
  447. package/dist/esm/Components/RadioButton/RadioButton.js +3 -2
  448. package/dist/esm/Components/Reorder/Reorder.js +1 -0
  449. package/dist/esm/Components/RolesPermission/RolesPermission.js +5 -3
  450. package/dist/esm/Components/ScrollToTop/ScrollToTop.js +4 -1
  451. package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +1 -0
  452. package/dist/esm/Components/Search/Search.js +3 -2
  453. package/dist/esm/Components/SearchSelect/SearchSelect.js +48 -37
  454. package/dist/esm/Components/SegmentedControl/SegmentedControl.js +86 -0
  455. package/dist/esm/Components/SegmentedControl/SegmentedControlProps.js +1 -0
  456. package/dist/esm/Components/Select/Select.js +5 -3
  457. package/dist/esm/Components/Select/Select.styles.js +3 -2
  458. package/dist/esm/Components/SelectSearch/SelectSearch.js +37 -15
  459. package/dist/esm/Components/SelectV2/SelectV2.js +20 -5
  460. package/dist/esm/Components/SideBar/SecondaryBar.js +1 -1
  461. package/dist/esm/Components/SideBar/SideBar.js +5 -3
  462. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -2
  463. package/dist/esm/Components/Skeletons/Skeletons.js +1 -0
  464. package/dist/esm/Components/Slider/Slider.js +9 -1
  465. package/dist/esm/Components/StageProgress/StageItem.js +1 -0
  466. package/dist/esm/Components/StageProgress/StageProgress.js +1 -0
  467. package/dist/esm/Components/StageProgress/StageProgressProps.js +7 -5
  468. package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
  469. package/dist/esm/Components/Switch/Switch.js +1 -0
  470. package/dist/esm/Components/Table/Table.js +15 -5
  471. package/dist/esm/Components/Table/components/Pagination.js +1 -1
  472. package/dist/esm/Components/Table/components/TableActions.js +2 -2
  473. package/dist/esm/Components/Table/components/TableBody.js +44 -18
  474. package/dist/esm/Components/Table/components/TableGroupRow.js +1 -1
  475. package/dist/esm/Components/Table/components/TableHeader.js +21 -8
  476. package/dist/esm/Components/Table/components/TableSearch.js +1 -1
  477. package/dist/esm/Components/Table/filters/CompactSelect.js +29 -8
  478. package/dist/esm/Components/Table/filters/LeftFilterPane.js +1 -1
  479. package/dist/esm/Components/Table/settings/ManageColumns.js +8 -5
  480. package/dist/esm/Components/Table/settings/TableSettings.js +7 -5
  481. package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
  482. package/dist/esm/Components/Table/variants/classic.js +43 -0
  483. package/dist/esm/Components/Table/variants/index.js +9 -0
  484. package/dist/esm/Components/Table/variants/pillInk.js +18 -0
  485. package/dist/esm/Components/Table/variants/studio.js +46 -0
  486. package/dist/esm/Components/Table/variants/tokens.js +1 -0
  487. package/dist/esm/Components/Tag/Tag.js +1 -0
  488. package/dist/esm/Components/Tag/Tag.styles.js +17 -12
  489. package/dist/esm/Components/Timeline/Timeline.js +1 -0
  490. package/dist/esm/Components/Toaster/Toaster.js +1 -0
  491. package/dist/esm/Components/Toggle/TableToggle.js +72 -17
  492. package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +16 -0
  493. package/dist/esm/Components/ToggleSwitch/ToggleSwitchProps.js +1 -0
  494. package/dist/esm/Components/ToolTip/ToolTip.js +7 -6
  495. package/dist/esm/Components/Trail/EditableCell.js +2 -1
  496. package/dist/esm/Components/Trail/SelectAllCheckbox.js +1 -0
  497. package/dist/esm/Components/Trail/TrailWorks.js +2 -1
  498. package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +1 -1
  499. package/dist/esm/Components/UserDetails/UserDetails.js +6 -3
  500. package/dist/esm/Hooks/exclusiveOverlay.js +16 -0
  501. package/dist/esm/Hooks/useExclusiveOverlay.js +20 -0
  502. package/dist/esm/Theme/assertPalette.js +3 -2
  503. package/dist/esm/Theme/chakra/Menu.styles.js +9 -5
  504. package/dist/esm/Theme/chakra/Popover.styles.js +5 -1
  505. package/dist/esm/Theme/chakra/componentStyles.js +16 -9
  506. package/dist/esm/Theme/chakra/createBrandTheme.js +22 -9
  507. package/dist/esm/Theme/chakra/focusRing.styles.js +40 -0
  508. package/dist/esm/Theme/provider/ThemeSwitcher.js +5 -2
  509. package/dist/esm/Theme/tokens/brands/index.js +6 -1
  510. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +6 -1
  511. package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  512. package/dist/esm/Theme/tokens/builders/filledSurface.js +67 -0
  513. package/dist/esm/Theme/tokens/builders/focusRing.js +85 -0
  514. package/dist/esm/Theme/tokens/builders/index.js +2 -0
  515. package/dist/esm/Theme/tokens/builders/outlineRung.js +78 -4
  516. package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
  517. package/dist/esm/Theme/tokens/builders/resolvedRungs.js +7 -2
  518. package/dist/esm/Theme/tokens/builders/rowStates.js +15 -0
  519. package/dist/esm/Theme/tokens/builders/scrollShadow.js +13 -0
  520. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +20 -10
  521. package/dist/esm/Utils/table.js +50 -5
  522. package/dist/esm/index.js +26 -1
  523. package/dist/index.d.ts +26 -3
  524. package/dist/index.js +67 -4
  525. package/package.json +11 -4
@@ -4,6 +4,7 @@ import { Box, Input, Button, Menu, MenuButton, MenuList, MenuItem, useOutsideCli
4
4
  import { ChevronDown } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
6
  import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
7
+ /** Inline editable cell driven entirely by parent-owned row state — no internal draft state of its own. */
7
8
  export const EditableCell = ({ row, column, isEditable, handleCellClick, handleCellChange, }) => {
8
9
  const { colors } = useCustomTheme();
9
10
  const cellRef = useRef(null);
@@ -20,7 +21,7 @@ export const EditableCell = ({ row, column, isEditable, handleCellClick, handleC
20
21
  return (_jsx(Box, { width: "50%", ref: cellRef, children: _jsx(Input, { type: "date", value: value, onChange: (e) => handleCellChange(row.id, column.label, e.target.value) }) }));
21
22
  }
22
23
  else if (column.label === "priority") {
23
- return (_jsx(Box, { width: "100%", ref: cellRef, children: _jsxs(Menu, { isOpen: true, children: [_jsx(MenuButton, { as: Button, rightIcon: _jsx(ChevronDown, {}), bg: colors.teal[50], color: accentTextOnCanvas(colors.teal, colors.teal[50]), _hover: { bg: colors.teal[100] }, _active: { bg: colors.teal[200] }, children: value }), _jsxs(MenuList, { children: [_jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "Low"), _hover: { bg: colors.teal[100] }, children: "Low" }), _jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "Medium"), _hover: { bg: colors.teal[100] }, children: "Medium" }), _jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "High"), _hover: { bg: colors.teal[100] }, children: "High" })] })] }) }));
24
+ return (_jsx(Box, { width: "100%", ref: cellRef, children: _jsxs(Menu, { isOpen: true, children: [_jsx(MenuButton, { as: Button, rightIcon: _jsx(ChevronDown, {}), bg: colors.teal[50], color: accentTextOnCanvas(colors.teal, colors.teal[50]), _hover: { bg: colors.teal[100] }, _active: { bg: colors.teal[200] }, children: value }), _jsxs(MenuList, { children: [_jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "Low"), children: "Low" }), _jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "Medium"), children: "Medium" }), _jsx(MenuItem, { onClick: () => handleCellChange(row.id, column.label, "High"), children: "High" })] })] }) }));
24
25
  }
25
26
  else {
26
27
  return (_jsx(Box, { width: "100%", ref: cellRef, children: _jsx(Input, { value: value, onChange: (e) => handleCellChange(row.id, column.label, e.target.value) }) }));
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Checkbox } from "@chakra-ui/react";
3
+ /** Purely presentational — isAllSelected/isIndeterminate must be computed and owned entirely by the parent. */
3
4
  export const SelectAllCheckbox = ({ isAllSelected, isIndeterminate, handleSelectAll, }) => {
4
5
  return (_jsx(Checkbox, { isChecked: isAllSelected, isIndeterminate: isIndeterminate, onChange: handleSelectAll }));
5
6
  };
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Thead, Table, Tr, Th, Tbody, Td, Checkbox, } from "@chakra-ui/react";
3
3
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
+ /** Hardcoded 2-row demo table with no props at all — not a reusable grid; use Table for a real editable/selectable list. */
4
5
  const TrailWorks = () => {
5
6
  const { colors } = useCustomTheme();
6
- const cellBorder = colors.border[500];
7
+ const cellBorder = colors.boxborder[200];
7
8
  const data = [
8
9
  {
9
10
  contact: "John Doe",
@@ -9,6 +9,6 @@ const DeactivateConfirmModal = ({ isOpen, onClose, userName, isLoading, onConfir
9
9
  const { colors } = useCustomTheme();
10
10
  const mode = isDarkCanvas(colors.backgroundColor.main) ? "dark" : "light";
11
11
  const errorTone = resolveStatusTone(colors.semantic.error, mode);
12
- return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.background[50], borderRadius: "2xl", overflow: "hidden", children: [_jsxs(ModalHeader, { borderBottom: "1px solid", borderColor: colors.boxborder[200], display: "flex", alignItems: "center", gap: 3, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: errorTone.bg, color: errorTone.fg, children: _jsx(AlertTriangle, { size: 18 }) }), _jsx(Text, { fontSize: "1.05rem", fontWeight: 600, children: labels.confirmDeactivation })] }), _jsx(ModalCloseButton, {}), _jsx(ModalBody, { py: 6, children: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(Text, { fontSize: "md", fontWeight: 500, color: colors.text[900], children: labels.deactivateConfirmQuestion }), _jsx(Box, { bg: colors.gray[50], borderRadius: "lg", p: 4, border: "1px solid", borderColor: colors.boxborder[200], children: _jsxs(Text, { color: colors.textMuted, fontSize: "sm", children: [userName ? `${userName} ` : "", labels.deactivateConfirmDescription] }) }), _jsxs(HStack, { justifyContent: "flex-end", spacing: 3, pt: 2, children: [_jsx(Button, { label: labels.cancel, onClick: onClose, variant: "outline", size: "sm", colorScheme: "gray" }), _jsx(Button, { label: labels.deactivateUser, onClick: onConfirm, colorScheme: "red", size: "sm", isLoading: isLoading, leftIcon: _jsx(Trash2, { size: 16 }) })] })] }) })] })] }));
12
+ return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.background[50], borderRadius: "2xl", overflow: "hidden", children: [_jsxs(ModalHeader, { borderBottom: "1px solid", borderColor: colors.boxborder[200], display: "flex", alignItems: "center", gap: 3, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: errorTone.bg, color: errorTone.fg, children: _jsx(AlertTriangle, { size: 18 }) }), _jsx(Text, { fontSize: "1.05rem", fontWeight: 600, children: labels.confirmDeactivation })] }), _jsx(ModalCloseButton, {}), _jsx(ModalBody, { py: 6, children: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(Text, { fontSize: "md", fontWeight: 500, color: colors.text[900], children: labels.deactivateConfirmQuestion }), _jsx(Box, { bg: colors.background[50], borderRadius: "lg", p: 4, border: "1px solid", borderColor: colors.boxborder[200], children: _jsxs(Text, { color: colors.textMuted, fontSize: "sm", children: [userName ? `${userName} ` : "", labels.deactivateConfirmDescription] }) }), _jsxs(HStack, { justifyContent: "flex-end", spacing: 3, pt: 2, children: [_jsx(Button, { label: labels.cancel, onClick: onClose, variant: "outline", size: "sm", colorScheme: "gray" }), _jsx(Button, { label: labels.deactivateUser, onClick: onConfirm, colorScheme: "red", size: "sm", isLoading: isLoading, leftIcon: _jsx(Trash2, { size: 16 }) })] })] }) })] })] }));
13
13
  };
14
14
  export default DeactivateConfirmModal;
@@ -5,6 +5,7 @@ import { ChevronLeft, RefreshCw, Send, Shield, Trash2, UserPlus, Users, UserRoun
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
6
  import { resolveHoverTint } from "../../Theme/tokens/builders/outlineRung.js";
7
7
  import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
8
+ import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
8
9
  import EmptyState from "../EmptyState/EmptyState.js";
9
10
  import AddUserModal from "./AddUserModal.js";
10
11
  import ChangeRoleModal from "./ChangeRoleModal.js";
@@ -46,6 +47,7 @@ const DEFAULT_LABELS = {
46
47
  deactivateConfirmQuestion: "Are you sure you want to deactivate this user?",
47
48
  deactivateConfirmDescription: "will no longer have access to the organization. You can reactivate them later if needed.",
48
49
  };
50
+ /** Two-pane user directory + detail panel with bundled Add/Change-Role/Deactivate modals. */
49
51
  const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], canManageUsers = false, isUsersLoading = false, isInviteLoading = false, isDeactivateLoading = false, isAddUserLoading = false, isChangeRoleLoading = false, onSelectUser, onRefresh, onBack, onAddUserSubmit, onChangeRoleSubmit, onReinvite, onDeactivate, onAddRoleClick, addUserUpgradeNotice, labels: labelOverrides, minHeight = "90vh", }) => {
50
52
  const { colors } = useCustomTheme();
51
53
  const labels = useMemo(() => ({ ...DEFAULT_LABELS, ...labelOverrides }), [labelOverrides]);
@@ -55,6 +57,7 @@ const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], ca
55
57
  const [actionUserId, setActionUserId] = useState(null);
56
58
  const border = colors.boxborder[200];
57
59
  const surface = colors.background[50];
60
+ const rowBackgrounds = useMemo(() => listRowBackgrounds(colors), [colors]);
58
61
  const muted = colors.textMuted;
59
62
  const heading = colors.text[900];
60
63
  const avatarBg = colors.primary[100];
@@ -71,10 +74,10 @@ const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], ca
71
74
  const renderStatusBadge = (isActive) => (_jsx(Badge, { variant: "subtle", colorScheme: isActive ? successScheme : dangerScheme, borderRadius: "full", px: 2, py: 0.5, fontSize: "0.65rem", fontWeight: 600, textTransform: "none", children: isActive ? labels.active : labels.inactive }));
72
75
  return (_jsxs(Flex, { backgroundColor: colors.backgroundColor.main, minHeight: minHeight, p: { base: 3, md: 4 }, gap: 3, flexDirection: { base: "column", lg: "row" }, children: [_jsxs(Box, { width: { base: "100%", lg: "300px" }, backgroundColor: surface, borderRadius: "xl", boxShadow: "sm", border: "1px solid", borderColor: border, position: "relative", order: { base: 2, lg: 1 }, overflow: "hidden", display: "flex", flexDirection: "column", children: [_jsxs(Flex, { px: 4, py: 3, borderBottom: "1px solid", borderColor: border, alignItems: "center", justifyContent: "space-between", children: [_jsxs(HStack, { spacing: 2, children: [onBack && (_jsx(IconButton, { "aria-label": "Go back", icon: _jsx(ChevronLeft, { size: 18 }), variant: "ghost", size: "xs", color: muted, onClick: onBack })), _jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.teamMembers }), _jsx(Badge, { colorScheme: "gray", borderRadius: "full", fontSize: "0.65rem", px: 2, children: users.length })] }), onRefresh && (_jsx(IconButton, { "aria-label": labels.refreshList, icon: _jsx(RefreshCw, { size: 15 }), variant: "ghost", size: "xs", color: muted, onClick: onRefresh, isLoading: isUsersLoading }))] }), _jsx(Box, { flex: 1, overflowY: "auto", maxHeight: { base: "380px", lg: `calc(${minHeight} - 80px)` }, children: isUsersLoading ? (_jsx(VStack, { spacing: 2, p: 3, children: Array.from({ length: 6 }).map((_, idx) => (_jsxs(Flex, { alignItems: "center", gap: 3, p: 2, w: "100%", children: [_jsx(SkeletonCircle, { size: "9" }), _jsxs(Box, { flex: 1, children: [_jsx(Skeleton, { height: "12px", mb: 2, width: "80%" }), _jsx(Skeleton, { height: "9px", width: "60%" })] })] }, idx))) })) : users.length === 0 ? (_jsx(EmptyState, { icon: Users, title: labels.noUsers, size: "sm", minH: "220px" })) : (_jsx(VStack, { spacing: 1, p: 2, align: "stretch", children: users.map((user) => {
73
76
  const isSelected = selectedUserId != null && selectedUserId === user.id;
74
- return (_jsxs(Flex, { p: 2.5, w: "100%", cursor: "pointer", alignItems: "center", gap: 2.5, backgroundColor: isSelected ? colors.primary[50] : "transparent", _hover: {
77
+ return (_jsxs(Flex, { p: 2.5, w: "100%", cursor: "pointer", alignItems: "center", gap: 2.5, backgroundColor: isSelected ? rowBackgrounds.selected : "transparent", _hover: {
75
78
  background: isSelected
76
- ? colors.primary[50]
77
- : resolveHoverTint(colors.gray[50], surface),
79
+ ? rowBackgrounds.selectedActive
80
+ : rowBackgrounds.active,
78
81
  }, transition: "background 0.15s ease", borderRadius: "lg", position: "relative", onClick: () => onSelectUser === null || onSelectUser === void 0 ? void 0 : onSelectUser(user), children: [isSelected && (_jsx(Box, { position: "absolute", left: 0, top: "20%", bottom: "20%", width: "3px", borderRadius: "full", bg: colors.primary[500] })), _jsx(Avatar, { size: "sm", name: `${user.firstName} ${user.lastName}`, src: user.profile, bg: avatarBg, color: avatarColor }), _jsxs(Box, { flex: 1, overflow: "hidden", children: [_jsxs(Text, { fontSize: "sm", fontWeight: 600, noOfLines: 1, color: heading, children: [user.firstName, " ", user.lastName] }), _jsx(Text, { fontSize: "xs", color: muted, noOfLines: 1, children: user.email })] }), renderStatusBadge(user.isActive)] }, user.id));
79
82
  }) })) })] }), _jsxs(Box, { flex: 1, backgroundColor: surface, borderRadius: "xl", boxShadow: "sm", border: "1px solid", borderColor: border, display: "flex", flexDirection: "column", order: { base: 1, lg: 2 }, overflow: "hidden", children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", px: 4, py: 3, borderBottom: "1px solid", borderColor: border, children: [_jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: selectedUser ? labels.userDetails : labels.selectTeamMember }), canManageUsers && (_jsx(Button, { size: "sm", colorScheme: "primary", fontSize: "xs", leftIcon: _jsx(UserPlus, { size: 15 }), onClick: onAddUserOpen, children: labels.addUser }))] }), _jsx(Box, { flex: 1, overflowY: "auto", children: isUsersLoading ? (_jsxs(VStack, { spacing: 4, p: 4, align: "stretch", children: [_jsxs(Flex, { align: "center", gap: 4, children: [_jsx(SkeletonCircle, { size: "16" }), _jsxs(Box, { flex: 1, children: [_jsx(Skeleton, { height: "18px", width: "50%", mb: 2 }), _jsx(Skeleton, { height: "12px", width: "35%" })] })] }), Array.from({ length: 4 }).map((_, idx) => (_jsxs(Box, { w: "100%", children: [_jsx(Skeleton, { height: "12px", width: "30%", mb: 2 }), _jsx(Skeleton, { height: "10px", width: "80%" })] }, idx)))] })) : selectedUser ? (_jsxs(_Fragment, { children: [_jsxs(Flex, { direction: { base: "column", md: "row" }, alignItems: { base: "flex-start", md: "center" }, justifyContent: "space-between", gap: 4, p: 4, borderBottom: "1px solid", borderColor: border, children: [_jsxs(Flex, { alignItems: "center", gap: 4, children: [_jsxs(Box, { position: "relative", children: [_jsx(Avatar, { size: "lg", name: selectedUser.name, src: selectedUser.profilePhoto, bg: avatarBg, color: avatarColor }), selectedUser.isCurrent && (_jsx(Badge, { position: "absolute", bottom: -1, right: -1, colorScheme: "blue", variant: "solid", fontSize: "0.6rem", borderRadius: "full", px: 2, py: 0.5, boxShadow: "sm", textTransform: "none", children: labels.you }))] }), _jsxs(Box, { children: [_jsx(Heading, { size: "md", mb: 1, color: heading, children: selectedUser.name }), _jsx(Text, { fontSize: "sm", color: muted, mb: 2, children: selectedUser.role }), _jsxs(HStack, { spacing: 2, children: [renderStatusBadge(selectedUser.isActive), selectedUser.isPending && (_jsx(Badge, { variant: "subtle", borderRadius: "full", px: 2, py: 0.5, fontSize: "0.65rem", fontWeight: 600, colorScheme: "orange", textTransform: "none", children: labels.pendingInvitation }))] })] })] }), canManageUsers &&
80
83
  !selectedUser.isSuperAdmin && (_jsxs(HStack, { spacing: 2, flexWrap: "wrap", children: [!selectedUser.isCurrent && !selectedUser.isActive && (_jsx(Button, { size: "xs", variant: "outline", colorScheme: "blue", fontSize: "xs", leftIcon: _jsx(Send, { size: 13 }), isLoading: isInviteLoading, onClick: () => selectedUser.userId != null &&
@@ -0,0 +1,16 @@
1
+ let active = null;
2
+ export const exclusiveOpen = (id, close) => {
3
+ if (active && active.id !== id) {
4
+ active.close();
5
+ }
6
+ active = { id, close };
7
+ };
8
+ export const exclusiveClose = (id) => {
9
+ if ((active === null || active === void 0 ? void 0 : active.id) === id) {
10
+ active = null;
11
+ }
12
+ };
13
+ /** Test-only reset — not exported from the package root. */
14
+ export const resetExclusiveOverlay = () => {
15
+ active = null;
16
+ };
@@ -0,0 +1,20 @@
1
+ import { useCallback, useEffect, useId, useRef } from "react";
2
+ import { exclusiveClose, exclusiveOpen } from "./exclusiveOverlay.js";
3
+ /**
4
+ * Register this overlay with the global dismiss coordinator. Call `requestOpen()`
5
+ * immediately before opening; `onClose` is invoked when another overlay opens.
6
+ */
7
+ export const useExclusiveOverlay = (isOpen, onClose) => {
8
+ const id = useId();
9
+ const onCloseRef = useRef(onClose);
10
+ onCloseRef.current = onClose;
11
+ const requestOpen = useCallback(() => {
12
+ exclusiveOpen(id, () => onCloseRef.current());
13
+ }, [id]);
14
+ useEffect(() => {
15
+ if (!isOpen) {
16
+ exclusiveClose(id);
17
+ }
18
+ }, [isOpen, id]);
19
+ return requestOpen;
20
+ };
@@ -2,8 +2,8 @@ const REQUIRED_GROUPS = [
2
2
  "gradient", "primary", "secondary", "tertiary", "transparent", "black", "white",
3
3
  "semantic", "gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan",
4
4
  "purple", "pink", "backgroundColor", "background", "text", "header", "placeholder",
5
- "boxShadow", "sidebar", "boxborder", "border", "table", "disabled", "accentText",
6
- "textMuted", "semanticText", "onPrimary", "onSemantic",
5
+ "boxShadow", "focusRing", "sidebar", "boxborder", "border", "table", "disabled",
6
+ "accentText", "textMuted", "semanticText", "onPrimary", "onSemantic",
7
7
  ];
8
8
  export const allPaletteTokensListed = true;
9
9
  const NESTED = [
@@ -14,6 +14,7 @@ const NESTED = [
14
14
  ]],
15
15
  ["semanticText", ["success", "error", "warning", "info"]],
16
16
  ["onSemantic", ["success", "error", "warning", "info"]],
17
+ ["focusRing", ["ring", "halo"]],
17
18
  ["backgroundColor", ["main", "base"]],
18
19
  ["boxShadow", ["primary", "default"]],
19
20
  ];
@@ -1,5 +1,6 @@
1
1
  import { createMultiStyleConfigHelpers, cssVar } from "@chakra-ui/react";
2
2
  import { menuAnatomy } from "@chakra-ui/anatomy";
3
+ import { listRowBackgrounds } from "../tokens/builders/rowStates.js";
3
4
  import { paletteOf } from "./paletteFromTheme.js";
4
5
  const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(menuAnatomy.keys);
5
6
  const $bg = cssVar("menu-bg");
@@ -21,16 +22,19 @@ const $bg = cssVar("menu-bg");
21
22
  const $itemBg = cssVar("menu-item-bg");
22
23
  const baseStyle = definePartsStyle(({ theme }) => {
23
24
  const colors = paletteOf(theme);
24
- const hoverBg = colors.primary.opacity[8];
25
- const activeBg = colors.primary.opacity[16];
25
+ const rowBgs = listRowBackgrounds(colors);
26
+ const hoverBg = rowBgs.active;
27
+ const activeBg = rowBgs.selectedActive;
26
28
  return {
27
29
  list: {
28
30
  [$bg.variable]: colors.backgroundColor.light,
29
31
  bg: $bg.reference,
30
32
  color: colors.text[900],
31
- // Chakra's default is its own gray.200, which reads as a hard rule against our
32
- // surfaces. The menu is already separated by its shadow.
33
- borderColor: colors.border[200],
33
+ // A rule at CHROME_RULE weight, not Chakra's gray.200: that default read as a hard edge,
34
+ // which is why this shipped borderless. At 1.31:1 the edge defines the surface instead.
35
+ borderWidth: "1px",
36
+ borderStyle: "solid",
37
+ borderColor: colors.boxborder[200],
34
38
  },
35
39
  // Own CSS var (`--menu-item-bg`), NOT the list's `--menu-bg` — Chakra's stock item
36
40
  // baseStyle rewrites `--menu-bg` itself on hover/focus, so reusing that same var name
@@ -18,8 +18,12 @@ const baseStyle = definePartsStyle(({ theme }) => {
18
18
  content: {
19
19
  [$popperBg.variable]: colors.backgroundColor.light,
20
20
  bg: $popperBg.reference,
21
- [$arrowShadowColor.variable]: colors.border[200],
21
+ [$arrowShadowColor.variable]: colors.boxborder[200],
22
22
  color: colors.text[900],
23
+ // Matches Menu: a CHROME_RULE-weight edge, not Chakra's gray.200 hard edge.
24
+ borderWidth: "1px",
25
+ borderStyle: "solid",
26
+ borderColor: colors.boxborder[200],
23
27
  },
24
28
  };
25
29
  });
@@ -9,6 +9,7 @@ import { Tag } from "../../Components/Tag/Tag.styles.js";
9
9
  import { Textarea } from "../../Components/InputTextArea/InputTextArea.style.js";
10
10
  import { NumberInput } from "../../Components/NumberInput/NumberInput.styles.js";
11
11
  import { accentTextOnCanvas, isDarkCanvas, onFilled } from "../tokens/builders/accentText.js";
12
+ import { labelOnFill, solidFillRung } from "../tokens/builders/filledSurface.js";
12
13
  import { contrastRatio } from "../tokens/builders/color.js";
13
14
  import { resolveHoverTint } from "../tokens/builders/outlineRung.js";
14
15
  import { Drawer } from "./Drawer.styles.js";
@@ -24,6 +25,14 @@ import { Avatar } from "./Avatar.styles.js";
24
25
  // math (hexToRgb) throws on those on purpose (see color.ts). Guard so those scales fall back to
25
26
  // Chakra's own original fixed rung instead of computing contrast on a color it can't parse.
26
27
  const isHexColor = (color) => typeof color === "string" && /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(color);
28
+ const solidFillStyle = (palette, swatch) => {
29
+ const rung = solidFillRung(swatch, palette.white);
30
+ const bg = swatch[rung];
31
+ return {
32
+ bg,
33
+ color: isHexColor(bg) ? labelOnFill(bg, palette.white, palette.black) : swatch[800],
34
+ };
35
+ };
27
36
  // Badge isn't its own component family (no Components/Badge/), so its style config lives here —
28
37
  // Chakra's stock `solid` variant hardcodes a white label on a variable fill, same AA gap Tag had.
29
38
  const Badge = {
@@ -31,11 +40,7 @@ const Badge = {
31
40
  solid: ({ theme, colorScheme = "gray" }) => {
32
41
  const palette = paletteOf(theme);
33
42
  const swatch = scaleFor(palette, colorScheme);
34
- const bg = swatch[500];
35
- return {
36
- bg,
37
- color: isHexColor(bg) ? onFilled(bg, palette.white, palette.black) : swatch[800],
38
- };
43
+ return solidFillStyle(palette, swatch);
39
44
  },
40
45
  // Chakra's stock `subtle` picks its bg/color pair via `mode()`, keyed to Chakra's own
41
46
  // colorMode — which this app never toggles (dark mode swaps the palette object instead), so
@@ -87,13 +92,14 @@ const Alert = defineAlertStyles({
87
92
  variants: {
88
93
  solid: defineAlertParts(({ theme, colorScheme = "gray" }) => {
89
94
  const palette = paletteOf(theme);
90
- const bg = scaleFor(palette, colorScheme)[500];
95
+ const swatch = scaleFor(palette, colorScheme);
96
+ const { bg, color } = solidFillStyle(palette, swatch);
91
97
  if (!isHexColor(bg))
92
98
  return { container: {} };
93
99
  return {
94
100
  container: {
95
101
  [$alertBg.variable]: bg,
96
- [$alertFg.variable]: onFilled(bg, palette.white, palette.black),
102
+ [$alertFg.variable]: color,
97
103
  },
98
104
  };
99
105
  }),
@@ -151,8 +157,9 @@ const Skeleton = {
151
157
  const Radio = {
152
158
  baseStyle: ({ theme, colorScheme }) => {
153
159
  const palette = paletteOf(theme);
154
- const fill = scaleFor(palette, colorScheme)[500];
155
- const dot = onFilled(fill, palette.white, palette.black);
160
+ const swatch = scaleFor(palette, colorScheme);
161
+ const fill = swatch[solidFillRung(swatch, palette.white)];
162
+ const dot = labelOnFill(fill, palette.white, palette.black);
156
163
  // A browser probe found the checked radio's hover repeating its own resting `fill` —
157
164
  // Chakra's stock checked._hover (inherited from checkbox) lands on the SAME `bg`/`borderColor`
158
165
  // keys we do, so extendTheme's merge is a scalar overwrite here, not a coexisting selector;
@@ -2,8 +2,9 @@ import { extendTheme } from "@chakra-ui/react";
2
2
  import common from "./common.web.js";
3
3
  import fonts from "./fonts.web.js";
4
4
  import { componentStyles } from "./componentStyles.js";
5
- import { onFilled } from "../tokens/builders/accentText.js";
5
+ import { resolveFilledSurface } from "../tokens/builders/filledSurface.js";
6
6
  import { globalScrollbarStyles } from "../tokens/builders/scrollbar.js";
7
+ import { focusRingShadow } from "./focusRing.styles.js";
7
8
  /**
8
9
  * Builds a Chakra theme from a pure brand palette.
9
10
  *
@@ -21,6 +22,12 @@ export const createBrandTheme = (palette, options = {}) => {
21
22
  colors: palette,
22
23
  ...fonts,
23
24
  ...common,
25
+ // `shadows.outline` is what Chakra's stock `_focusVisible` reaches for on EVERY component it
26
+ // themes. The primitive ships one hardcoded blue (`rgba(66,153,225,.6)`), which measured
27
+ // 1.83:1 on the lavender canvas and 1.38:1 on a primary button — below 1.4.11's 3:1 on all
28
+ // nine brands, in both modes. A primitive cannot know the palette; this is the first place
29
+ // that does, so the palette-derived ring is bound here and every stock focus state inherits it.
30
+ shadows: { ...common.shadows, outline: focusRingShadow(palette) },
24
31
  };
25
32
  return extendTheme({
26
33
  ...brand,
@@ -75,14 +82,20 @@ export const createBrandTheme = (palette, options = {}) => {
75
82
  // selecting text anywhere (e.g. a table cell) shows a stray white/lavender patch on
76
83
  // the dark canvas. Brand it instead, with WCAG-safe ink via the same `onFilled` math
77
84
  // used for buttons/badges.
78
- "::selection": {
79
- background: palette.primary[500],
80
- color: onFilled(palette.primary[500], palette.white, palette.black),
81
- },
82
- "::-moz-selection": {
83
- background: palette.primary[500],
84
- color: onFilled(palette.primary[500], palette.white, palette.black),
85
- },
85
+ "::selection": (() => {
86
+ const solid = resolveFilledSurface(palette.primary, palette);
87
+ return {
88
+ background: solid.fill,
89
+ color: solid.color,
90
+ };
91
+ })(),
92
+ "::-moz-selection": (() => {
93
+ const solid = resolveFilledSurface(palette.primary, palette);
94
+ return {
95
+ background: solid.fill,
96
+ color: solid.color,
97
+ };
98
+ })(),
86
99
  // `color-scheme: dark` gives WebKit/Blink a dark scrollbar by default, but it's the
87
100
  // OS's generic dark gray, not brand-aware.
88
101
  ...globalScrollbarStyles(palette),
@@ -0,0 +1,40 @@
1
+ /**
2
+ * WEB binding for the `focusRing` token pair. The colours are derived in
3
+ * `tokens/builders/focusRing.ts` (pure, shared with the mobile library); the CSS shape —
4
+ * box-shadow bands, the forced-colors outline — is web-only and lives here.
5
+ */
6
+ /** Inner band, in the surface tone: separates the ring from the control's own fill. */
7
+ export const FOCUS_HALO_WIDTH = 2;
8
+ /** Outer edge of the brand band. The band itself is the 2px between halo and ring. */
9
+ export const FOCUS_RING_WIDTH = 4;
10
+ /**
11
+ * The two-tone ring as a single `box-shadow`. Drawn OUTSIDE the border box, so it costs no
12
+ * layout and never resizes the control — the reason this is a shadow and not an outline.
13
+ */
14
+ export const focusRingShadow = (colors) => `0 0 0 ${FOCUS_HALO_WIDTH}px ${colors.focusRing.halo}, ` +
15
+ `0 0 0 ${FOCUS_RING_WIDTH}px ${colors.focusRing.ring}`;
16
+ /**
17
+ * `:hover`, `:active` and `:focus-visible` all score the same specificity, so which one paints
18
+ * comes down to source order — and in the merged style object Chakra's own Button baseStyle
19
+ * registers `_focusVisible` BEFORE `_hover`. A focused button that is also hovered would then
20
+ * drop the ring for `_hover`'s `boxShadow: "sm"`. Stacking the pseudo-classes raises the
21
+ * specificity above both, so the ring survives whatever else the state repaints.
22
+ */
23
+ export const FOCUS_VISIBLE_OVER_STATE = "&:hover:focus-visible, &:active:focus-visible, &[data-active]:focus-visible";
24
+ /**
25
+ * `:focus-visible`, never `:focus` — a mouse click must not draw a ring.
26
+ *
27
+ * The transparent outline is not decoration: in Windows High Contrast / `forced-colors` mode
28
+ * box-shadows are dropped entirely, and a transparent outline is the one thing the OS repaints
29
+ * in its own focus colour. Without it, forced-colors users get no indicator at all.
30
+ */
31
+ export const focusVisibleRing = (colors) => ({
32
+ outline: "2px solid transparent",
33
+ outlineOffset: "2px",
34
+ boxShadow: focusRingShadow(colors),
35
+ });
36
+ /** Both selectors a control needs to keep the ring on top of its own hover/active styling. */
37
+ export const focusVisibleStyles = (colors) => {
38
+ const ring = focusVisibleRing(colors);
39
+ return { _focusVisible: ring, [FOCUS_VISIBLE_OVER_STATE]: ring };
40
+ };
@@ -23,7 +23,10 @@ const toBrandLabel = (brand) => brand.charAt(0).toUpperCase() + brand.slice(1);
23
23
  * regardless of which brand/mode is currently active.
24
24
  */
25
25
  const brandSwatchColor = (brand) => brandThemes[brand].light.colors.primary[500];
26
- const BrandSwatch = ({ brand }) => (_jsx(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 }));
26
+ const BrandSwatch = ({ brand }) => {
27
+ const { colors } = useCustomTheme();
28
+ return (_jsx(Box, { as: "span", display: "inline-block", w: "0.625rem", h: "0.625rem", borderRadius: "full", bg: brandSwatchColor(brand), border: "1px solid", borderColor: colors.boxborder[200], flexShrink: 0 }));
29
+ };
27
30
  /**
28
31
  * Palette values already differ per color mode (`brandThemes[brand].light|dark`), so tokens
29
32
  * are read straight from the active theme — no `useColorModeValue` pairing needed here.
@@ -36,7 +39,7 @@ const useSwitcherColors = () => {
36
39
  activeColor: colors.primary[500],
37
40
  mutedColor: colors.text[600],
38
41
  hoverBg: colors.gray[100],
39
- borderColor: colors.border[200],
42
+ borderColor: colors.boxborder[200],
40
43
  // NOTE: menuBg lives in Menu.styles.ts — re-pushing it via `sx` flickers on every render.
41
44
  menuColor: colors.text[900],
42
45
  };
@@ -22,6 +22,7 @@ import { withSidebarTokens } from "../builders/sidebarAccent.js";
22
22
  import { buildMutedText } from "../builders/mutedText.js";
23
23
  import { buildSemanticText, buildOnSemantic } from "../builders/semanticText.js";
24
24
  import { withPlaceholderRung, withTableHoverRung } from "../builders/resolvedRungs.js";
25
+ import { buildFocusRing, withFocusRing } from "../builders/focusRing.js";
25
26
  import { withSurfaceRungs } from "../builders/surfaceRungs.js";
26
27
  /** Derived, never hand-written: a copied hex goes stale the moment a canvas moves. */
27
28
  export const finalizeLightPalette = (source) => ({
@@ -32,10 +33,14 @@ export const finalizeLightPalette = (source) => ({
32
33
  semanticText: buildSemanticText(source.semantic, source.backgroundColor.main),
33
34
  onPrimary: onFilled(source.primary[500], source.white, source.black),
34
35
  onSemantic: buildOnSemantic(source.semantic, source.white, source.black),
36
+ focusRing: buildFocusRing(source),
35
37
  });
36
38
  export { lavender, meadow, radiant, skyline, slate, emerald, rosewood, storefront, zinc };
37
39
  export { lavenderDark, meadowDark, radiantDark, skylineDark, slateDark, emeraldDark, rosewoodDark, storefrontDark, zincDark, };
38
- const resolveRungs = (palette) => withSurfaceRungs(withTableHoverRung(withPlaceholderRung(withOutlineRung(palette))));
40
+ // `withFocusRing` is outermost: it is the only step that reads `primary` and the surfaces
41
+ // TOGETHER, so it must see both after every earlier step — and after a brand file's own
42
+ // post-derivation overrides (zinc dark replaces `primary` and `background` wholesale).
43
+ const resolveRungs = (palette) => withFocusRing(withSurfaceRungs(withTableHoverRung(withPlaceholderRung(withOutlineRung(palette)))));
39
44
  const lightBrand = (source) => resolveRungs(finalizeLightPalette(source));
40
45
  /** Light palette per brand. `lavender` is the base the other six extend. */
41
46
  export const lightPalettes = {
@@ -4,6 +4,7 @@ import { pickAccentText, onFilled } from "./accentText.js";
4
4
  import { withSidebarTokens } from "./sidebarAccent.js";
5
5
  import { buildMutedText } from "./mutedText.js";
6
6
  import { buildSemanticText, buildOnSemantic } from "./semanticText.js";
7
+ import { buildFocusRing } from "./focusRing.js";
7
8
  /**
8
9
  * Derives a brand's dark palette from its light palette.
9
10
  *
@@ -238,6 +239,7 @@ export function buildDarkPalette(light) {
238
239
  ]));
239
240
  const white = light.white;
240
241
  const primary = liftBrand(light.primary, white);
242
+ const background = fromTargets(hueSource, SURFACE_TARGETS, SURFACE_SAT);
241
243
  const semantic = {
242
244
  success: liftAccent(light.semantic.success, white),
243
245
  error: liftAccent(light.semantic.error, white),
@@ -268,7 +270,7 @@ export function buildDarkPalette(light) {
268
270
  purple: reverseScale(light.purple),
269
271
  pink: reverseScale(light.pink),
270
272
  backgroundColor: namedSurfaces,
271
- background: fromTargets(hueSource, SURFACE_TARGETS, SURFACE_SAT),
273
+ background,
272
274
  text: fromTargets(hueSource, TEXT_TARGETS, TEXT_SAT),
273
275
  header: fromTargets(hueSource, TEXT_TARGETS, TEXT_SAT + 2),
274
276
  placeholder: fromTargets(hueSource, PLACEHOLDER_TARGETS, PLACEHOLDER_SAT),
@@ -285,6 +287,9 @@ export function buildDarkPalette(light) {
285
287
  semanticText: buildSemanticText(semantic, namedSurfaces.main),
286
288
  onPrimary: onFilled(primary[500], light.white, light.black),
287
289
  onSemantic: buildOnSemantic(semantic, light.white, light.black),
290
+ // The dark ring is derived from the LIFTED accent against the dark canvas, not copied from
291
+ // light: the two modes squeeze it from opposite sides, so a shared value fails one of them.
292
+ focusRing: buildFocusRing({ primary, background, backgroundColor: namedSurfaces }),
288
293
  // Sidebar is already near-black in light mode, so it needs no inversion.
289
294
  sidebar: withSidebarTokens(light),
290
295
  boxShadow: {
@@ -25,7 +25,7 @@ export function chartInk(colors) {
25
25
  surface,
26
26
  text: colors.text[900],
27
27
  muted: colors.text[500],
28
- grid: colors.border[500],
28
+ grid: colors.boxborder[200],
29
29
  axis: colors.text[500],
30
30
  tooltipBg: colors.backgroundColor.secondary,
31
31
  };
@@ -0,0 +1,67 @@
1
+ import { contrastRatio } from "./color.js";
2
+ import { AA_NORMAL_TEXT, isDarkCanvas, onFilled } from "./accentText.js";
3
+ const RUNGS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
4
+ /**
5
+ * The rung one/two steps DARKER than the accent — what a filled button's hover/active needs so its
6
+ * white label stays legible.
7
+ *
8
+ * Every dark scale runs dark -> light across 50 -> 900 (brand scales are rebuilt that way, utility
9
+ * hues are reversed), the mirror of light mode. So "darker than [500]" is [600]/[700] in light but
10
+ * [400]/[300] in dark.
11
+ */
12
+ const FILL_STEP_RUNGS = { light: [600, 700], dark: [400, 300] };
13
+ /**
14
+ * Lightest rung on `scale` that still carries `white` at WCAG AA. Prefers [500] when it already
15
+ * passes; otherwise walks toward darker rungs. Used for solid fills on buttons, tags, badges and
16
+ * table status pills so consumers never get black ink on a saturated fill when white is achievable.
17
+ */
18
+ export const solidFillRung = (scale, white) => {
19
+ if (contrastRatio(scale[500], white) >= AA_NORMAL_TEXT)
20
+ return 500;
21
+ const passing = RUNGS.filter((r) => scale[r] && contrastRatio(scale[r], white) >= AA_NORMAL_TEXT);
22
+ if (!passing.length)
23
+ return 500;
24
+ return passing.reduce((a, b) => contrastRatio(scale[a], white) <= contrastRatio(scale[b], white) ? a : b);
25
+ };
26
+ const steppedRung = (base, canvas, step) => {
27
+ const dir = isDarkCanvas(canvas) ? -100 : 100;
28
+ return Math.min(900, Math.max(50, base + dir * step));
29
+ };
30
+ /** Hover (step 0) or active (step 1) fill rung, one step darker than `solidFillRung`. */
31
+ export const darkerFillRung = (scale, canvas, white, step) => {
32
+ const base = solidFillRung(scale, white);
33
+ if (base === 500) {
34
+ const mode = isDarkCanvas(canvas) ? "dark" : "light";
35
+ return FILL_STEP_RUNGS[mode][step];
36
+ }
37
+ const stepped = steppedRung(base, canvas, step === 0 ? 1 : 2);
38
+ return stepped;
39
+ };
40
+ /** Label ink for a specific fill swatch — always `onFilled`, exported for style configs. */
41
+ export const labelOnFill = (fill, white, black) => onFilled(fill, white, black);
42
+ /**
43
+ * Consumer-facing helper: given any `ColorScale` (primary, red, semantic.error, …), return the
44
+ * fill rung and matching ink for solid / hover / active states. Use this whenever you paint a
45
+ * `bg` from a scale — never pair `scale[500]` with `onFilled` or `colors.white` by hand.
46
+ */
47
+ export const resolveFilledSurface = (scale, colors) => {
48
+ const { white, black, backgroundColor } = colors;
49
+ const canvas = backgroundColor.main;
50
+ const rung = solidFillRung(scale, white);
51
+ const fill = scale[rung];
52
+ const hoverRung = darkerFillRung(scale, canvas, white, 0);
53
+ const hoverFill = scale[hoverRung];
54
+ const activeRung = darkerFillRung(scale, canvas, white, 1);
55
+ const activeFill = scale[activeRung];
56
+ return {
57
+ rung,
58
+ fill,
59
+ color: labelOnFill(fill, white, black),
60
+ hoverRung,
61
+ hoverFill,
62
+ hoverColor: labelOnFill(hoverFill, white, black),
63
+ activeRung,
64
+ activeFill,
65
+ activeColor: labelOnFill(activeFill, white, black),
66
+ };
67
+ };
@@ -0,0 +1,85 @@
1
+ import { contrastRatio, hexToHsl, withLightness } from "./color.js";
2
+ import { AA_NON_TEXT } from "./outlineRung.js";
3
+ /** Same lightness granularity `buildDarkPalette` walks its accents at. */
4
+ const LIGHTNESS_STEP = 0.5;
5
+ /**
6
+ * The nearest re-lighting of `hex` that clears `target` against EVERY backdrop at once.
7
+ *
8
+ * Not `settleAcross`: that folds one `liftToContrast` per surface, and each lift walks AWAY from
9
+ * the surface it was handed. That is correct when every backdrop sits on the same side of the ink
10
+ * (its case — a set of light surfaces, or a set of dark ones), and wrong here, where a focus ring
11
+ * is squeezed BETWEEN a near-white canvas and a mid-dark button fill: the lift against the fill
12
+ * walks straight back across the canvas it had just cleared. Seeding `settleAcross` with
13
+ * `primary[500]` measured 1.08-1.99 on the light canvas for every brand for exactly that reason.
14
+ *
15
+ * Walking outward from the seed and testing every backdrop at each step keeps the result the
16
+ * CLOSEST passing colour to the brand accent, so the ring still reads as brand chrome. Contrast is
17
+ * a function of relative luminance alone, and lightness sweeps luminance monotonically from 0 to 1,
18
+ * so if any colour on this hue clears the set, this finds it.
19
+ */
20
+ export function settleBetween(hex, backdrops, target = AA_NON_TEXT) {
21
+ const clears = (candidate) => backdrops.every((backdrop) => contrastRatio(candidate, backdrop) >= target);
22
+ if (clears(hex))
23
+ return hex;
24
+ const { l } = hexToHsl(hex);
25
+ for (let step = LIGHTNESS_STEP; step <= 100; step += LIGHTNESS_STEP) {
26
+ const darker = withLightness(hex, l - step);
27
+ if (clears(darker))
28
+ return darker;
29
+ const lighter = withLightness(hex, l + step);
30
+ if (clears(lighter))
31
+ return lighter;
32
+ }
33
+ // Unreachable for every shipped brand (the gate proves it) — a brand whose fill and canvas are
34
+ // close enough to leave no gap would land here. Take the end that is least bad rather than throw
35
+ // at import time, and let `focusRing.test.ts` be what reports it.
36
+ const ends = [withLightness(hex, 0), withLightness(hex, 100)];
37
+ const worst = (candidate) => Math.min(...backdrops.map((backdrop) => contrastRatio(candidate, backdrop)));
38
+ return worst(ends[0]) >= worst(ends[1]) ? ends[0] : ends[1];
39
+ }
40
+ /**
41
+ * The three backdrops a focused button's ring is actually drawn against: the page canvas, a card
42
+ * surface, and — because a solid button's ring sits directly against its own fill — `primary[500]`.
43
+ *
44
+ * Deliberately NOT every named surface. `muted`/`accent`/`quaternary` are mid-tone, and a single
45
+ * band asked to clear those AND a dark brand fill has no solution at any hue — contrast is
46
+ * luminance alone, and `skyline`/`storefront` come out with an empty band. That is what the second
47
+ * tone is for: `halo` owns the fill-side adjacency instead.
48
+ */
49
+ export const focusRingBackdrops = (source) => [
50
+ source.backgroundColor.main,
51
+ source.background[50],
52
+ source.primary[500],
53
+ ];
54
+ /**
55
+ * The two-tone `:focus-visible` indicator.
56
+ *
57
+ * Chakra's stock ring (`shadows.outline`, a fixed `rgba(66,153,225,.6)`) measured 1.83:1 on the
58
+ * lavender canvas and 1.38:1 on a primary button — a focus indicator you cannot see, on all nine
59
+ * brands. It is one hardcoded blue, so no palette could have saved it.
60
+ *
61
+ * `halo` is the surface tone, drawn as the inner band so the indicator separates from a filled
62
+ * control whatever `colorScheme` painted it. `ring` is the brand accent, walked to the nearest
63
+ * lightness that clears 3:1 on all three backdrops at once — including the halo, so the two tones
64
+ * are always told apart.
65
+ */
66
+ export const buildFocusRing = (source) => {
67
+ const halo = settleBetween(source.background[50], [source.primary[500]]);
68
+ return {
69
+ halo,
70
+ ring: settleBetween(source.primary[500], [...focusRingBackdrops(source), halo]),
71
+ };
72
+ };
73
+ /**
74
+ * Re-derives the ring from the FINISHED palette, as the last step of the rung chain.
75
+ *
76
+ * `finalizeLightPalette` and `buildDarkPalette` seed it, but neither is the final word: a brand
77
+ * file may replace `primary` or `background` after the generic derivation runs — `zinc`'s dark
78
+ * palette replaces both, inverting the filled button to near-white — and a ring resolved against
79
+ * the pre-override values is then silently wrong. Same reason `withSurfaceRungs` re-lifts inks the
80
+ * finalizers already derived. `focusRing.test.ts` asserts this is a fixed point.
81
+ */
82
+ export const withFocusRing = (palette) => ({
83
+ ...palette,
84
+ focusRing: buildFocusRing(palette),
85
+ });
@@ -3,5 +3,7 @@ export * from "./buildBrandTokens.js";
3
3
  export * from "./buildDarkPalette.js";
4
4
  export * from "./chartColorsFromTheme.js";
5
5
  export * from "./color.js";
6
+ export * from "./focusRing.js";
6
7
  export * from "./scrollbar.js";
7
8
  export * from "./gradientInk.js";
9
+ export * from "./placeholderInk.js";