pixelize-design-library 2.4.2-beta.3 → 2.4.2-beta.30

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 (279) hide show
  1. package/dist/Components/Accordion/Accordion.js +5 -3
  2. package/dist/Components/AppSwitcher/AppMark.d.ts +19 -0
  3. package/dist/Components/AppSwitcher/AppMark.js +62 -0
  4. package/dist/Components/AppSwitcher/AppSwitcher.d.ts +4 -0
  5. package/dist/Components/AppSwitcher/AppSwitcher.js +315 -0
  6. package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +64 -0
  7. package/dist/Components/AppSwitcher/AppSwitcherProps.js +86 -0
  8. package/dist/Components/AppSwitcher/useAppSwitcherShortcut.d.ts +3 -0
  9. package/dist/Components/AppSwitcher/useAppSwitcherShortcut.js +31 -0
  10. package/dist/Components/AppearanceSettings/AppearanceSettings.js +2 -1
  11. package/dist/Components/Button/Button.d.ts +2 -2
  12. package/dist/Components/Button/Button.js +4 -3
  13. package/dist/Components/Button/Button.styles.js +62 -15
  14. package/dist/Components/Button/ButtonProps.d.ts +6 -1
  15. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +6 -6
  16. package/dist/Components/Card/Card.d.ts +1 -1
  17. package/dist/Components/Card/Card.js +2 -2
  18. package/dist/Components/Card/CardProps.d.ts +0 -1
  19. package/dist/Components/Card/PaymentCard/PaymentCard.js +7 -7
  20. package/dist/Components/Checkbox/Checkbox.js +1 -1
  21. package/dist/Components/Checkbox/Checkbox.styles.js +12 -7
  22. package/dist/Components/Common/fieldStyles.js +1 -1
  23. package/dist/Components/CopyButton/CopyButton.js +6 -2
  24. package/dist/Components/CustomModulesTable/EditModuleModal.js +1 -1
  25. package/dist/Components/DatePicker/CalendarPanel.d.ts +5 -0
  26. package/dist/Components/DatePicker/CalendarPanel.js +24 -5
  27. package/dist/Components/DatePicker/DatePickerProps.d.ts +21 -0
  28. package/dist/Components/DatePicker/RangeDatePicker.js +4 -4
  29. package/dist/Components/DatePicker/SingleDatePicker.js +2 -2
  30. package/dist/Components/DatePicker/TimeOnlyPicker.js +1 -1
  31. package/dist/Components/DatePicker/dayStates.d.ts +56 -0
  32. package/dist/Components/DatePicker/dayStates.js +87 -0
  33. package/dist/Components/Dropdown/DropDown.js +7 -15
  34. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
  35. package/dist/Components/EmptyState/EmptyState.js +2 -1
  36. package/dist/Components/FilePreview/FilePreview.js +1 -1
  37. package/dist/Components/FileUpload/FileUpload.js +5 -4
  38. package/dist/Components/FileUpload/FileUploadProps.d.ts +3 -1
  39. package/dist/Components/FileUpload/constants.js +1 -0
  40. package/dist/Components/FilterSidebar/FilterSidebar.js +4 -4
  41. package/dist/Components/FilterSidebar/filterHoverStyle.d.ts +0 -9
  42. package/dist/Components/FilterSidebar/filterHoverStyle.js +4 -10
  43. package/dist/Components/Form/FormWrapper.js +1 -1
  44. package/dist/Components/Header/components/mobileMenu.js +12 -3
  45. package/dist/Components/Input/TextInput.styles.js +6 -4
  46. package/dist/Components/InputTextArea/InputTextArea.style.js +5 -4
  47. package/dist/Components/KanbanBoard/KanbanBoard.js +5 -45
  48. package/dist/Components/LimitReachedModal/LimitReachedModal.js +4 -5
  49. package/dist/Components/Loading/Loading.js +15 -14
  50. package/dist/Components/MultiSelect/MultiSelect.js +1 -1
  51. package/dist/Components/NavigationBar/NavigationBar.js +3 -3
  52. package/dist/Components/NoteTextArea/NoteTextArea.js +9 -4
  53. package/dist/Components/NumberInput/NumberInput.js +3 -1
  54. package/dist/Components/NumberInput/NumberInput.styles.js +5 -4
  55. package/dist/Components/OrgSwitcher/OrgSwitcher.js +2 -2
  56. package/dist/Components/PdfViewer/PdfViewer.js +6 -1
  57. package/dist/Components/PinInput/PinInput.js +1 -1
  58. package/dist/Components/PlanPill/PlanPill.js +5 -5
  59. package/dist/Components/PlanPill/planPillGradient.d.ts +2 -14
  60. package/dist/Components/PlanPill/planPillGradient.js +3 -15
  61. package/dist/Components/Primitives/Primitives.d.ts +6 -0
  62. package/dist/Components/Primitives/Primitives.js +113 -0
  63. package/dist/Components/ProductCard/ProductPrice.js +1 -1
  64. package/dist/Components/ProductCard/ProductReview.js +6 -1
  65. package/dist/Components/ProductCard/ProductTags.js +1 -1
  66. package/dist/Components/ProfileCard/ProfileCard.js +1 -1
  67. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
  68. package/dist/Components/RadioButton/RadioButton.js +3 -2
  69. package/dist/Components/Reorder/Reorder.js +1 -1
  70. package/dist/Components/ScrollToTop/ScrollToTop.js +2 -0
  71. package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +13 -0
  72. package/dist/Components/ScrollbarBox/ScrollbarBox.js +11 -0
  73. package/dist/Components/Search/Search.js +2 -2
  74. package/dist/Components/SearchSelect/SearchSelect.js +14 -9
  75. package/dist/Components/SegmentedControl/SegmentedControl.d.ts +2 -0
  76. package/dist/Components/SegmentedControl/SegmentedControl.js +58 -0
  77. package/dist/Components/SegmentedControl/SegmentedControlProps.d.ts +16 -0
  78. package/dist/Components/SegmentedControl/SegmentedControlProps.js +2 -0
  79. package/dist/Components/Select/Select.d.ts +1 -1
  80. package/dist/Components/Select/Select.js +4 -2
  81. package/dist/Components/Select/Select.styles.js +3 -2
  82. package/dist/Components/Select/SelectProps.d.ts +3 -0
  83. package/dist/Components/SelectSearch/SelectSearch.js +7 -4
  84. package/dist/Components/SelectV2/SelectV2.js +18 -14
  85. package/dist/Components/SideBar/SecondaryBar.js +1 -1
  86. package/dist/Components/SideBar/SideBar.js +1 -1
  87. package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -2
  88. package/dist/Components/Slider/Slider.js +8 -1
  89. package/dist/Components/StageProgress/StageProgress.js +2 -9
  90. package/dist/Components/StageProgress/StepperStage.js +2 -2
  91. package/dist/Components/Table/Table.d.ts +1 -1
  92. package/dist/Components/Table/Table.js +17 -24
  93. package/dist/Components/Table/TableProps.d.ts +4 -0
  94. package/dist/Components/Table/components/Pagination.js +1 -1
  95. package/dist/Components/Table/components/TableActions.js +2 -2
  96. package/dist/Components/Table/components/TableBody.js +41 -12
  97. package/dist/Components/Table/components/TableGroupRow.js +1 -1
  98. package/dist/Components/Table/components/TableHeader.js +21 -8
  99. package/dist/Components/Table/components/TableSearch.js +1 -1
  100. package/dist/Components/Table/filters/ActiveFilters.js +2 -18
  101. package/dist/Components/Table/settings/ManageColumns.js +4 -17
  102. package/dist/Components/Table/settings/TableSettings.js +5 -11
  103. package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
  104. package/dist/Components/Table/variants/TableVariantContext.js +17 -0
  105. package/dist/Components/Table/variants/classic.d.ts +6 -0
  106. package/dist/Components/Table/variants/classic.js +47 -0
  107. package/dist/Components/Table/variants/index.d.ts +7 -0
  108. package/dist/Components/Table/variants/index.js +27 -0
  109. package/dist/Components/Table/variants/pillInk.d.ts +6 -0
  110. package/dist/Components/Table/variants/pillInk.js +21 -0
  111. package/dist/Components/Table/variants/studio.d.ts +6 -0
  112. package/dist/Components/Table/variants/studio.js +50 -0
  113. package/dist/Components/Table/variants/tokens.d.ts +49 -0
  114. package/dist/Components/Table/variants/tokens.js +2 -0
  115. package/dist/Components/Tag/Tag.styles.js +3 -4
  116. package/dist/Components/Timeline/Timeline.js +2 -2
  117. package/dist/Components/Toaster/Toaster.js +1 -1
  118. package/dist/Components/Toggle/TableToggle.js +11 -7
  119. package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +2 -0
  120. package/dist/Components/ToggleSwitch/ToggleSwitch.js +18 -0
  121. package/dist/Components/ToggleSwitch/ToggleSwitchProps.d.ts +11 -0
  122. package/dist/Components/ToggleSwitch/ToggleSwitchProps.js +2 -0
  123. package/dist/Components/ToolTip/ToolTip.js +6 -6
  124. package/dist/Components/ToolTip/ToolTipProps.d.ts +3 -1
  125. package/dist/Components/Trail/TrailWorks.js +1 -1
  126. package/dist/Components/UpgradeButton/UpgradeButton.js +3 -3
  127. package/dist/Constants/Sidebar.js +3 -2
  128. package/dist/Theme/assertPalette.d.ts +1 -1
  129. package/dist/Theme/assertPalette.js +3 -2
  130. package/dist/Theme/chakra/Menu.styles.d.ts +3 -0
  131. package/dist/Theme/chakra/Menu.styles.js +5 -0
  132. package/dist/Theme/chakra/Popover.styles.d.ts +3 -0
  133. package/dist/Theme/chakra/Popover.styles.js +5 -1
  134. package/dist/Theme/chakra/componentStyles.d.ts +6 -0
  135. package/dist/Theme/chakra/createBrandTheme.js +10 -16
  136. package/dist/Theme/chakra/focusRing.styles.d.ts +52 -0
  137. package/dist/Theme/chakra/focusRing.styles.js +46 -0
  138. package/dist/Theme/provider/ThemeSwitcher.js +5 -2
  139. package/dist/Theme/tokens/brands/index.js +6 -1
  140. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +1 -0
  141. package/dist/Theme/tokens/builders/buildDarkPalette.js +6 -1
  142. package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  143. package/dist/Theme/tokens/builders/focusRing.d.ts +52 -0
  144. package/dist/Theme/tokens/builders/focusRing.js +92 -0
  145. package/dist/Theme/tokens/builders/gradientInk.d.ts +22 -0
  146. package/dist/Theme/tokens/builders/gradientInk.js +28 -0
  147. package/dist/Theme/tokens/builders/index.d.ts +4 -0
  148. package/dist/Theme/tokens/builders/index.js +4 -0
  149. package/dist/Theme/tokens/builders/outlineRung.d.ts +46 -3
  150. package/dist/Theme/tokens/builders/outlineRung.js +101 -5
  151. package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
  152. package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
  153. package/dist/Theme/tokens/builders/resolvedRungs.d.ts +5 -1
  154. package/dist/Theme/tokens/builders/resolvedRungs.js +7 -2
  155. package/dist/Theme/tokens/builders/rowStates.d.ts +13 -0
  156. package/dist/Theme/tokens/builders/rowStates.js +19 -0
  157. package/dist/Theme/tokens/builders/scrollbar.d.ts +12 -0
  158. package/dist/Theme/tokens/builders/scrollbar.js +57 -0
  159. package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -0
  160. package/dist/Theme/tokens/builders/surfaceRungs.js +20 -5
  161. package/dist/Theme/tokens/types.d.ts +21 -1
  162. package/dist/esm/Components/Accordion/Accordion.js +5 -3
  163. package/dist/esm/Components/AppSwitcher/AppMark.js +56 -0
  164. package/dist/esm/Components/AppSwitcher/AppSwitcher.js +280 -0
  165. package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +78 -0
  166. package/dist/esm/Components/AppSwitcher/useAppSwitcherShortcut.js +27 -0
  167. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +2 -1
  168. package/dist/esm/Components/Button/Button.js +5 -4
  169. package/dist/esm/Components/Button/Button.styles.js +63 -16
  170. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +6 -6
  171. package/dist/esm/Components/Card/Card.js +2 -2
  172. package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +7 -7
  173. package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
  174. package/dist/esm/Components/Checkbox/Checkbox.styles.js +13 -8
  175. package/dist/esm/Components/Common/fieldStyles.js +1 -1
  176. package/dist/esm/Components/CopyButton/CopyButton.js +7 -3
  177. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +1 -1
  178. package/dist/esm/Components/DatePicker/CalendarPanel.js +24 -5
  179. package/dist/esm/Components/DatePicker/RangeDatePicker.js +4 -4
  180. package/dist/esm/Components/DatePicker/SingleDatePicker.js +2 -2
  181. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +1 -1
  182. package/dist/esm/Components/DatePicker/dayStates.js +79 -0
  183. package/dist/esm/Components/Dropdown/DropDown.js +7 -15
  184. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
  185. package/dist/esm/Components/EmptyState/EmptyState.js +2 -1
  186. package/dist/esm/Components/FilePreview/FilePreview.js +1 -1
  187. package/dist/esm/Components/FileUpload/FileUpload.js +6 -5
  188. package/dist/esm/Components/FileUpload/constants.js +1 -0
  189. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +4 -4
  190. package/dist/esm/Components/FilterSidebar/filterHoverStyle.js +4 -10
  191. package/dist/esm/Components/Form/FormWrapper.js +1 -1
  192. package/dist/esm/Components/Header/components/mobileMenu.js +12 -3
  193. package/dist/esm/Components/Input/TextInput.styles.js +6 -4
  194. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +5 -4
  195. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +5 -45
  196. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +4 -5
  197. package/dist/esm/Components/Loading/Loading.js +12 -11
  198. package/dist/esm/Components/MultiSelect/MultiSelect.js +1 -1
  199. package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -3
  200. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +9 -4
  201. package/dist/esm/Components/NumberInput/NumberInput.js +4 -2
  202. package/dist/esm/Components/NumberInput/NumberInput.styles.js +5 -4
  203. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +2 -2
  204. package/dist/esm/Components/PdfViewer/PdfViewer.js +6 -1
  205. package/dist/esm/Components/PinInput/PinInput.js +1 -1
  206. package/dist/esm/Components/PlanPill/PlanPill.js +6 -6
  207. package/dist/esm/Components/PlanPill/planPillGradient.js +3 -15
  208. package/dist/esm/Components/Primitives/Primitives.js +6 -0
  209. package/dist/esm/Components/ProductCard/ProductPrice.js +1 -1
  210. package/dist/esm/Components/ProductCard/ProductReview.js +6 -1
  211. package/dist/esm/Components/ProductCard/ProductTags.js +1 -1
  212. package/dist/esm/Components/ProfileCard/ProfileCard.js +1 -1
  213. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
  214. package/dist/esm/Components/RadioButton/RadioButton.js +3 -2
  215. package/dist/esm/Components/Reorder/Reorder.js +1 -1
  216. package/dist/esm/Components/ScrollToTop/ScrollToTop.js +2 -0
  217. package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -0
  218. package/dist/esm/Components/Search/Search.js +2 -2
  219. package/dist/esm/Components/SearchSelect/SearchSelect.js +14 -9
  220. package/dist/esm/Components/SegmentedControl/SegmentedControl.js +55 -0
  221. package/dist/esm/Components/SegmentedControl/SegmentedControlProps.js +1 -0
  222. package/dist/esm/Components/Select/Select.js +5 -3
  223. package/dist/esm/Components/Select/Select.styles.js +3 -2
  224. package/dist/esm/Components/SelectSearch/SelectSearch.js +7 -4
  225. package/dist/esm/Components/SelectV2/SelectV2.js +18 -14
  226. package/dist/esm/Components/SideBar/SecondaryBar.js +1 -1
  227. package/dist/esm/Components/SideBar/SideBar.js +1 -1
  228. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -2
  229. package/dist/esm/Components/Slider/Slider.js +8 -1
  230. package/dist/esm/Components/StageProgress/StageProgress.js +2 -9
  231. package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
  232. package/dist/esm/Components/Table/Table.js +17 -24
  233. package/dist/esm/Components/Table/components/Pagination.js +1 -1
  234. package/dist/esm/Components/Table/components/TableActions.js +2 -2
  235. package/dist/esm/Components/Table/components/TableBody.js +42 -13
  236. package/dist/esm/Components/Table/components/TableGroupRow.js +1 -1
  237. package/dist/esm/Components/Table/components/TableHeader.js +21 -8
  238. package/dist/esm/Components/Table/components/TableSearch.js +1 -1
  239. package/dist/esm/Components/Table/filters/ActiveFilters.js +2 -18
  240. package/dist/esm/Components/Table/settings/ManageColumns.js +4 -17
  241. package/dist/esm/Components/Table/settings/TableSettings.js +5 -11
  242. package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
  243. package/dist/esm/Components/Table/variants/classic.js +43 -0
  244. package/dist/esm/Components/Table/variants/index.js +9 -0
  245. package/dist/esm/Components/Table/variants/pillInk.js +18 -0
  246. package/dist/esm/Components/Table/variants/studio.js +46 -0
  247. package/dist/esm/Components/Table/variants/tokens.js +1 -0
  248. package/dist/esm/Components/Tag/Tag.styles.js +3 -4
  249. package/dist/esm/Components/Timeline/Timeline.js +2 -2
  250. package/dist/esm/Components/Toaster/Toaster.js +1 -1
  251. package/dist/esm/Components/Toggle/TableToggle.js +11 -7
  252. package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +15 -0
  253. package/dist/esm/Components/ToggleSwitch/ToggleSwitchProps.js +1 -0
  254. package/dist/esm/Components/ToolTip/ToolTip.js +6 -6
  255. package/dist/esm/Components/Trail/TrailWorks.js +1 -1
  256. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +3 -3
  257. package/dist/esm/Constants/Sidebar.js +3 -2
  258. package/dist/esm/Theme/assertPalette.js +3 -2
  259. package/dist/esm/Theme/chakra/Menu.styles.js +5 -0
  260. package/dist/esm/Theme/chakra/Popover.styles.js +5 -1
  261. package/dist/esm/Theme/chakra/createBrandTheme.js +10 -16
  262. package/dist/esm/Theme/chakra/focusRing.styles.js +40 -0
  263. package/dist/esm/Theme/provider/ThemeSwitcher.js +5 -2
  264. package/dist/esm/Theme/tokens/brands/index.js +6 -1
  265. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +6 -1
  266. package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  267. package/dist/esm/Theme/tokens/builders/focusRing.js +85 -0
  268. package/dist/esm/Theme/tokens/builders/gradientInk.js +22 -0
  269. package/dist/esm/Theme/tokens/builders/index.js +4 -0
  270. package/dist/esm/Theme/tokens/builders/outlineRung.js +96 -4
  271. package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
  272. package/dist/esm/Theme/tokens/builders/resolvedRungs.js +7 -2
  273. package/dist/esm/Theme/tokens/builders/rowStates.js +15 -0
  274. package/dist/esm/Theme/tokens/builders/scrollbar.js +52 -0
  275. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +20 -5
  276. package/dist/esm/index.js +24 -1
  277. package/dist/index.d.ts +27 -3
  278. package/dist/index.js +64 -4
  279. package/package.json +8 -2
@@ -3,13 +3,14 @@ import { Box, IconButton, Spinner, Td, Tr } from "@chakra-ui/react";
3
3
  import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
4
4
  import { normalizeTableCellValue, buildTablePalette, pickTableColor } from "../../../Utils/table.js";
5
5
  import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
6
- import { onFilled, isDarkCanvas } from "../../../Theme/tokens/builders/accentText.js";
6
+ import { onFilled } from "../../../Theme/tokens/builders/accentText.js";
7
7
  import { TableBodyLoading } from "./TableLoading.js";
8
8
  import TableActions from "./TableActions.js";
9
- import { getTableRowHoverStyle } from "./tableRowHoverStyle.js";
10
9
  import { ChevronDown, ChevronRight } from "lucide-react";
11
10
  import CheckBox from "../../Checkbox/Checkbox.js";
12
11
  import TableGroupRow from "./TableGroupRow.js";
12
+ import { useTableVariant } from "../variants/TableVariantContext.js";
13
+ import { resolvePillInk } from "../variants/pillInk.js";
13
14
  // Density → row height (px) + cell vertical padding. The padding (not just the
14
15
  // min-height) is what drives perceived row size, so compact tightens both.
15
16
  const DENSITY_CONFIG = {
@@ -25,6 +26,9 @@ const getRowContent = (row) => typeof row.content === "function"
25
26
  // the label is centered in whichever of white/black clears AA against that fill —
26
27
  // the fill can be a consumer hex we can't know in advance is light or dark.
27
28
  const StatusCell = ({ value, onSolid }) => (_jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", w: "100%", h: "100%", px: "0.5rem", fontSize: "0.75rem", fontWeight: 600, color: onSolid, textAlign: "center", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", children: value }));
29
+ // Studio's status cell: a contained chip on the tone's soft rung. Same tone pair
30
+ // the group header already uses, so an override hex behaves identically in both.
31
+ const StatusPill = ({ value, soft, ink, radius, }) => (_jsx(Box, { display: "inline-flex", alignItems: "center", maxW: "100%", px: "0.5rem", py: "0.125rem", borderRadius: radius, bg: soft, color: ink, fontSize: "0.75rem", fontWeight: 600, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", children: value }));
28
32
  const EMPTY_HOVER = {};
29
33
  const TableRow = React.memo(({ row, rowIndex, isChecked, isExpanded, isContent, isLink, isCheckbox, isLoading, isActionFreeze, columns, leftOffsets, noBorders, freezedBgColor, freezedTextColor, theme, borderStyle, selectedBg, selectedFrozenBg, hoverStyle, rowHeight, cellPy, palette, accentColor, ariaRowIndex, handleCheckbox, onRowClick, toggleRowExpansion, onMeasure, }) => {
30
34
  // Measured-height virtualization: report this row's real height (main + any
@@ -63,15 +67,38 @@ const TableRow = React.memo(({ row, rowIndex, isChecked, isExpanded, isContent,
63
67
  onRowClick(row, { label: header.label, id: header.id });
64
68
  }
65
69
  }, [row, onRowClick]);
70
+ const variant = useTableVariant();
66
71
  const firstDataColIndex = columns.findIndex((c) => !c.isHidden);
67
72
  const accentSx = accentColor ? `inset 3px 0 0 ${accentColor}` : undefined;
73
+ // A selected row earns the leading bar only where a group accent isn't already
74
+ // claiming that edge — the group's identity is the scarcer signal.
75
+ const leadSx = variant.row.showSelectedBar && isChecked && !accentColor
76
+ ? `inset 3px 0 0 ${variant.row.selectedBarColor}`
77
+ : accentSx;
78
+ const restsOnIndex = variant.slot.rest === "index";
79
+ const rowSx = {
80
+ ...(variant.row.hoverScope === "row"
81
+ ? { "&:hover > td[data-hoverable='true']": { backgroundColor: variant.row.hoverBg } }
82
+ : {}),
83
+ // opacity, not display: a hidden-by-display checkbox leaves the a11y tree and
84
+ // cannot be tabbed to, so `:focus-within` would never fire to bring it back.
85
+ ...(restsOnIndex
86
+ ? {
87
+ "& .table-slot-box": { opacity: isChecked ? 1 : 0 },
88
+ "& .table-slot-index": { opacity: isChecked ? 0 : 1 },
89
+ "&:hover .table-slot-box, &:focus-within .table-slot-box": { opacity: 1 },
90
+ "&:hover .table-slot-index, &:focus-within .table-slot-index": { opacity: 0 },
91
+ }
92
+ : {}),
93
+ };
68
94
  // Pinned/frozen columns get a tinted, opaque background so the frozen pane reads
69
95
  // as one piece with its header (and so sticky cells cover scrolling content).
70
96
  const frozenCellBg = freezedBgColor !== null && freezedBgColor !== void 0 ? freezedBgColor : theme.colors.table.hover[100];
71
97
  const cellStyles = row.cellStyle;
72
98
  const rowStyle = row.rowStyle;
99
+ const chromeHoverable = rowStyle ? "false" : "true";
73
100
  const rowContent = getRowContent(row);
74
- return (_jsxs(React.Fragment, { children: [_jsxs(Tr, { ref: mainRowRef, "aria-rowindex": ariaRowIndex, opacity: isLoading ? 0.4 : 1, pointerEvents: isLoading ? "none" : "auto", transition: "opacity 0.2s", children: [isContent && (_jsx(Td, { w: "6", p: 0, fontSize: 14, background: isChecked ? selectedFrozenBg : frozenCellBg, color: freezedTextColor, position: "sticky", borderBottom: borderStyle, boxShadow: accentSx, boxSizing: "border-box", left: "0px", zIndex: 1, className: "columns sticky-columns", children: !!(row === null || row === void 0 ? void 0 : row.content) && (_jsx(IconButton, { "aria-label": isExpanded ? "Collapse row" : "Expand row", color: theme.colors.textMuted, icon: isExpanded ? (_jsx(ChevronDown, { fontSize: 16 })) : (_jsx(ChevronRight, { fontSize: 16 })), _hover: { transform: "scale(1.1)" }, size: "sm", onClick: () => toggleRowExpansion(rowIndex), variant: "ghost" })) })), isCheckbox && (_jsx(Td, { w: "6", fontSize: 14, fontWeight: 600, color: theme.colors.background[50], textTransform: "capitalize", background: isChecked ? selectedFrozenBg : frozenCellBg, position: "sticky", borderBottom: borderStyle, boxShadow: !isContent ? accentSx : undefined, boxSizing: "border-box", left: "0px", zIndex: 1, className: "columns sticky-columns", children: _jsx(CheckBox, { "aria-label": `Select row ${rowIndex + 1}`, onChange: () => handleCheckbox(getRowId(row)), isChecked: isChecked }) })), columns.map((header, headerIndex) => {
101
+ return (_jsxs(React.Fragment, { children: [_jsxs(Tr, { ref: mainRowRef, "aria-rowindex": ariaRowIndex, opacity: isLoading ? 0.4 : 1, pointerEvents: isLoading ? "none" : "auto", transition: "opacity 0.2s", sx: rowSx, children: [isContent && (_jsx(Td, { w: "6", p: 0, fontSize: 14, background: isChecked ? selectedFrozenBg : frozenCellBg, color: freezedTextColor, position: "sticky", borderBottom: borderStyle, boxShadow: leadSx, boxSizing: "border-box", "data-hoverable": chromeHoverable, left: "0px", zIndex: 1, className: "columns sticky-columns", children: !!(row === null || row === void 0 ? void 0 : row.content) && (_jsx(IconButton, { "aria-label": isExpanded ? "Collapse row" : "Expand row", color: theme.colors.textMuted, icon: isExpanded ? (_jsx(ChevronDown, { fontSize: 16 })) : (_jsx(ChevronRight, { fontSize: 16 })), _hover: { transform: "scale(1.1)" }, size: "sm", onClick: () => toggleRowExpansion(rowIndex), variant: "ghost" })) })), isCheckbox && (_jsx(Td, { w: variant.slot.width, minW: variant.slot.width, px: variant.slot.centered ? 0 : undefined, textAlign: variant.slot.centered ? "center" : undefined, fontSize: 14, fontWeight: 600, color: theme.colors.background[50], textTransform: "capitalize", background: isChecked ? selectedFrozenBg : frozenCellBg, position: "sticky", borderBottom: borderStyle, boxShadow: !isContent ? leadSx : undefined, "data-hoverable": chromeHoverable, boxSizing: "border-box", left: "0px", zIndex: 1, className: "columns sticky-columns", children: _jsxs(Box, { display: restsOnIndex ? "grid" : undefined, placeItems: "center", children: [restsOnIndex && (_jsx(Box, { as: "span", className: "table-slot-index", gridArea: "1 / 1", color: variant.slot.indexInk, fontSize: "0.6875rem", fontWeight: 500, transition: "opacity 0.15s ease-in-out", sx: { fontVariantNumeric: "tabular-nums" }, children: rowIndex + 1 })), _jsx(Box, { as: "span", className: restsOnIndex ? "table-slot-box" : undefined, gridArea: restsOnIndex ? "1 / 1" : undefined, display: "flex", alignItems: "center", justifyContent: "center", transition: "opacity 0.15s ease-in-out", children: _jsx(CheckBox, { "aria-label": `Select row ${rowIndex + 1}`, onChange: () => handleCheckbox(getRowId(row)), isChecked: isChecked }) })] }) })), columns.map((header, headerIndex) => {
75
102
  var _a, _b, _c;
76
103
  if (header.isHidden)
77
104
  return null;
@@ -86,13 +113,15 @@ const TableRow = React.memo(({ row, rowIndex, isChecked, isExpanded, isContent,
86
113
  const statusOnSolid = statusColor
87
114
  ? (_c = statusColor.onSolid) !== null && _c !== void 0 ? _c : onFilled(statusColor.solid, theme.colors.white, theme.colors.black)
88
115
  : undefined;
89
- return (_jsx(Td, { maxWidth: 500, minWidth: 120, height: `${rowHeight}px`, py: isStatus && statusColor ? 0 : cellPy, px: isStatus && statusColor ? 0 : undefined, onClick: () => handleCellClick(header), fontSize: 14, fontWeight: 400, position: isFrozen ? "sticky" : undefined, left: isFrozen ? leftOffsets[headerIndex] : undefined, zIndex: isFrozen ? 1 : 0, background: isStatus && statusColor ? statusColor.solid : isChecked ? (isFrozen ? selectedFrozenBg : selectedBg) : isFrozen ? frozenCellBg : theme.colors.background[50], textOverflow: "ellipsis", boxShadow: isFirstDataCell ? accentSx : undefined, borderBottom: noBorders
116
+ const isBleed = variant.cells.statusFill === "bleed" && !!statusColor;
117
+ const canHover = !isBleed && !((cellStyles === null || cellStyles === void 0 ? void 0 : cellStyles[header.id]) || rowStyle);
118
+ return (_jsx(Td, { maxWidth: 500, minWidth: 120, height: `${rowHeight}px`, py: isBleed ? 0 : cellPy, px: isBleed ? 0 : undefined, onClick: () => handleCellClick(header), fontSize: 14, fontWeight: 400, position: isFrozen ? "sticky" : undefined, left: isFrozen ? leftOffsets[headerIndex] : undefined, zIndex: isFrozen ? 1 : 0, background: isBleed ? statusColor.solid : isChecked ? (isFrozen ? selectedFrozenBg : selectedBg) : isFrozen ? frozenCellBg : theme.colors.background[50], textOverflow: "ellipsis", boxShadow: isFirstDataCell ? leadSx : undefined, borderBottom: noBorders
90
119
  ? "none"
91
- : `0.063rem solid ${theme.colors.boxborder[isFrozen || isChecked ? 300 : 200]}`, className: `columns ${isFrozen ? "sticky-columns" : "scrollable-columns"}`, boxSizing: "border-box", color: isStatus && statusColor ? statusOnSolid : theme.colors.text[500], _hover: isStatus && statusColor
120
+ : `0.063rem solid ${isFrozen || isChecked
121
+ ? variant.row.frozenRuleColor
122
+ : variant.row.ruleColor}`, className: `columns ${isFrozen ? "sticky-columns" : "scrollable-columns"}`, boxSizing: "border-box", color: isBleed ? statusOnSolid : variant.cells.ink, "data-hoverable": canHover ? "true" : "false", _hover: variant.row.hoverScope === "row" || !canHover
92
123
  ? EMPTY_HOVER
93
- : (cellStyles === null || cellStyles === void 0 ? void 0 : cellStyles[header.id]) || rowStyle
94
- ? EMPTY_HOVER
95
- : hoverStyle, children: isStatus && statusColor ? (_jsx(StatusCell, { value: normalizeTableCellValue(row[header.id]), onSolid: statusOnSolid })) : (_jsx(Box, { display: "block", overflow: "hidden", whiteSpace: "normal", overflowWrap: "break-word", children: normalizeTableCellValue(header.node ? header.node(row) : row[header.id]) })) }, headerIndex + 1));
124
+ : hoverStyle, children: isBleed ? (_jsx(StatusCell, { value: normalizeTableCellValue(row[header.id]), onSolid: statusOnSolid })) : isStatus && statusColor ? (_jsx(StatusPill, { value: normalizeTableCellValue(row[header.id]), soft: statusColor.soft, ink: resolvePillInk(statusColor.text, statusColor.soft, theme.colors.background[50]), radius: variant.cells.pillRadius })) : (_jsx(Box, { display: "block", overflow: "hidden", whiteSpace: "normal", overflowWrap: "break-word", children: normalizeTableCellValue(header.node ? header.node(row) : row[header.id]) })) }, headerIndex + 1));
96
125
  }), isLink && (_jsx(Td, { w: 2, p: 0, fontSize: 14, background: isChecked ? (isActionFreeze ? selectedFrozenBg : selectedBg) : isActionFreeze ? frozenCellBg : theme.colors.background[50], color: freezedTextColor, position: isActionFreeze ? "sticky" : "relative", borderBottom: borderStyle, boxSizing: "border-box", right: 0, zIndex: 1, className: `columns sticky-columns${isActionFreeze ? "-right" : ""}`, children: (row.onLink || row.onEdit || row.onDelete) ? (_jsx(TableActions, { row: row })) : null }))] }), rowContent && isExpanded && (_jsx(Tr, { ref: expandedRowRef, children: _jsx(Td, { colSpan: columns.length +
97
126
  (isCheckbox ? 1 : 0) +
98
127
  (isContent ? 1 : 0) +
@@ -101,6 +130,7 @@ const TableRow = React.memo(({ row, rowIndex, isChecked, isExpanded, isContent,
101
130
  const TableBody = ({ data, isCheckbox, columns, startRow, columnWidths, freezedBgColor, freezedTextColor, noBorders, handleCheckbox, selections, isLoading, onRowClick, isContent, isLink, isActionFreeze, loadingSkeletonRows, scrollContainerRef, density, accentColors, groups, onAddItem, emptyState, }) => {
102
131
  var _a, _b, _c;
103
132
  const theme = useCustomTheme();
133
+ const variant = useTableVariant();
104
134
  const [expandedRows, setExpandedRows] = useState(new Set());
105
135
  const [collapsedGroups, setCollapsedGroups] = useState(new Set());
106
136
  const toggleGroup = useCallback((value) => {
@@ -246,17 +276,16 @@ const TableBody = ({ data, isCheckbox, columns, startRow, columnWidths, freezedB
246
276
  const checkboxOffset = isCheckbox ? 50 : 0;
247
277
  return columnWidths.map((_, idx) => columnWidths.slice(0, idx).reduce((sum, w) => sum + w, 0) + checkboxOffset);
248
278
  }, [columnWidths, isCheckbox]);
249
- const borderStyle = useMemo(() => noBorders ? "none" : `0.063rem solid ${theme.colors.border[500]}`, [noBorders, theme.colors.border]);
279
+ const borderStyle = useMemo(() => noBorders ? "none" : `0.063rem solid ${variant.row.ruleColor}`, [noBorders, variant.row.ruleColor]);
250
280
  // Selected-row tint applied per-cell (NOT a blanket `& td` override) so status
251
281
  // cells keep their solid color + white text instead of white-on-tint.
252
- const selectedBg = theme.colors.primary.opacity[16];
282
+ const selectedBg = variant.row.selectedBg;
253
283
  // Sticky/frozen cells overlay scrolling content, so their selected background
254
284
  // must be OPAQUE — paint the (translucent) tint over an opaque base.
255
285
  const selectedFrozenBg = `linear-gradient(0deg, ${selectedBg}, ${selectedBg}), ${theme.colors.background[50]}`;
256
286
  // Dark mode lifts the hover fill to `table.hover[500]`; `[300]` sits ~1.2:1 from the canvas.
257
287
  // No ink flip needed — see `tableRowHoverStyle.ts`.
258
- const isDark = isDarkCanvas(theme.colors.backgroundColor.main);
259
- const hoverStyle = useMemo(() => getTableRowHoverStyle(theme.colors, isDark), [theme.colors, isDark]);
288
+ const hoverStyle = useMemo(() => ({ backgroundColor: variant.row.hoverBg }), [variant.row.hoverBg]);
260
289
  // Flatten groups → one sequence of header/row items so it can be windowed.
261
290
  // Independent of scrollTop, so scrolling reuses it instead of re-flattening.
262
291
  const groupItems = useMemo(() => {
@@ -285,7 +314,7 @@ const TableBody = ({ data, isCheckbox, columns, startRow, columnWidths, freezedB
285
314
  return { heights, offsets, totalH: acc };
286
315
  }, [groupItems, groupVirtualize, rowHeight, GROUP_HEADER_H]);
287
316
  if (isLoading && data.length === 0) {
288
- return (_jsx(TableBodyLoading, { noOfColumns: totalVisibleColumns, borderColor: theme.colors.boxborder[300], rowsCount: typeof loadingSkeletonRows === "number" ? loadingSkeletonRows : 4 }));
317
+ return (_jsx(TableBodyLoading, { noOfColumns: totalVisibleColumns, borderColor: theme.colors.boxborder[200], rowsCount: typeof loadingSkeletonRows === "number" ? loadingSkeletonRows : 4 }));
289
318
  }
290
319
  if (!isLoading && data.length === 0) {
291
320
  const isStructured = emptyState && typeof emptyState === "object" && !React.isValidElement(emptyState);
@@ -5,6 +5,6 @@ import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
5
5
  /** Monday-style colored, collapsible group header row. */
6
6
  export const TableGroupRow = ({ label, value, count, color, collapsed, colSpan, ariaRowIndex, onToggle, onAddItem, }) => {
7
7
  const theme = useCustomTheme();
8
- return (_jsx(Tr, { "aria-rowindex": ariaRowIndex, children: _jsx(Td, { colSpan: colSpan, p: 0, border: "none", children: _jsxs(Flex, { align: "center", gap: 2, px: 3, py: 2, bg: color.soft, boxShadow: `inset 4px 0 0 ${color.solid}`, borderBottom: `0.063rem solid ${theme.colors.border[500]}`, children: [_jsx(IconButton, { "aria-label": collapsed ? "Expand group" : "Collapse group", size: "xs", variant: "ghost", color: color.text, onClick: onToggle, icon: collapsed ? _jsx(ChevronRight, { size: 16 }) : _jsx(ChevronDown, { size: 16 }) }), _jsx(Text, { fontSize: "0.8125rem", fontWeight: 700, color: color.text, isTruncated: true, maxW: "20rem", children: label }), _jsx(Box, { as: "span", fontSize: "0.6875rem", fontWeight: 600, color: color.text, bg: theme.colors.background[50], borderRadius: "full", px: "0.5rem", py: "0.0625rem", children: count }), onAddItem && (_jsxs(Flex, { as: "button", type: "button", align: "center", gap: 1, ml: "auto", px: 2, py: 1, borderRadius: "md", fontSize: "0.75rem", fontWeight: 500, color: theme.colors.text[500], _hover: { bg: theme.colors.background[50], color: color.text }, onClick: () => onAddItem(value), children: [_jsx(Plus, { size: 14 }), " Add item"] }))] }) }) }));
8
+ return (_jsx(Tr, { "aria-rowindex": ariaRowIndex, children: _jsx(Td, { colSpan: colSpan, p: 0, border: "none", children: _jsxs(Flex, { align: "center", gap: 2, px: 3, py: 2, bg: color.soft, boxShadow: `inset 4px 0 0 ${color.solid}`, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [_jsx(IconButton, { "aria-label": collapsed ? "Expand group" : "Collapse group", size: "xs", variant: "ghost", color: color.text, onClick: onToggle, icon: collapsed ? _jsx(ChevronRight, { size: 16 }) : _jsx(ChevronDown, { size: 16 }) }), _jsx(Text, { fontSize: "0.8125rem", fontWeight: 700, color: color.text, isTruncated: true, maxW: "20rem", children: label }), _jsx(Box, { as: "span", fontSize: "0.6875rem", fontWeight: 600, color: color.text, bg: theme.colors.background[50], borderRadius: "full", px: "0.5rem", py: "0.0625rem", children: count }), onAddItem && (_jsxs(Flex, { as: "button", type: "button", align: "center", gap: 1, ml: "auto", px: 2, py: 1, borderRadius: "md", fontSize: "0.75rem", fontWeight: 500, color: theme.colors.text[500], _hover: { bg: theme.colors.background[50], color: color.text }, onClick: () => onAddItem(value), children: [_jsx(Plus, { size: 14 }), " Add item"] }))] }) }) }));
9
9
  };
10
10
  export default TableGroupRow;
@@ -7,6 +7,7 @@ import { accentTextOnCanvas } from "../../../Theme/tokens/builders/accentText.js
7
7
  import TableFilters from "../filters/TableFilters.js";
8
8
  import { ChevronDown, ChevronsUpDown, ChevronUp } from "lucide-react";
9
9
  import CheckBox from "../../Checkbox/Checkbox.js";
10
+ import { useTableVariant } from "../variants/TableVariantContext.js";
10
11
  const TableHeader = ({ columns, isCheckbox, handleSort, headerRefs, columnWidths, columnsSort, headerBgColor, freezedBgColor, freezedTextColor, noBorders, handleCheckbox, checked, isLoading, isContent, isLink, isActionFreeze, setColumnsSearch, columnsSearch, isSelecting, }) => {
11
12
  const [openFilterId, setOpenFilterId] = useState(null);
12
13
  return (_jsxs(Tr, { pr: 0, "aria-rowindex": 1, children: [isContent && _jsx(ContentSpacerCell, { noBorders: noBorders }), isCheckbox && (_jsx(SelectAllCell, { freezedTextColor: freezedTextColor, noBorders: noBorders, isSelecting: isSelecting, isLoading: isLoading, checked: checked, handleCheckbox: handleCheckbox })), columns.map((header, index) => {
@@ -18,30 +19,33 @@ const TableHeader = ({ columns, isCheckbox, handleSort, headerRefs, columnWidths
18
19
  export default memo(TableHeader);
19
20
  const SelectAllCell = memo(({ freezedTextColor, noBorders, isSelecting, isLoading, checked, handleCheckbox, }) => {
20
21
  const theme = useCustomTheme();
21
- return (_jsx(Th, { scope: "col", w: 6, fontSize: 14, fontWeight: 600, color: freezedTextColor, textTransform: "capitalize", backgroundColor: theme.colors.table.hover[200], position: "sticky", className: `columns sticky-columns`, left: "0px", zIndex: 9, borderBottom: noBorders ? "none" : `0.063rem solid ${theme.colors.border[500]}`, children: isSelecting ? (_jsx(Spinner, { size: "sm", color: theme.colors.accentText })) : (_jsx(CheckBox, { "aria-label": "Select all rows", variant: "outline", onChange: () => handleCheckbox(0), isChecked: isLoading ? false : checked === true, isIndeterminate: checked === "indeterminate" })) }));
22
+ const variant = useTableVariant();
23
+ return (_jsx(Th, { scope: "col", w: variant.slot.width, minW: variant.slot.width, px: variant.slot.centered ? 0 : undefined, textAlign: variant.slot.centered ? "center" : undefined, fontSize: 14, fontWeight: 600, color: freezedTextColor, textTransform: "capitalize", backgroundColor: variant.header.bg, position: "sticky", className: `columns sticky-columns`, left: "0px", zIndex: 9, borderBottom: noBorders ? "none" : `0.063rem solid ${variant.header.ruleColor}`, children: _jsx(Box, { display: "flex", alignItems: "center", justifyContent: variant.slot.centered ? "center" : "flex-start", children: isSelecting ? (_jsx(Spinner, { size: "sm", color: theme.colors.accentText })) : (_jsx(CheckBox, { "aria-label": "Select all rows", variant: "outline", onChange: () => handleCheckbox(0), isChecked: isLoading ? false : checked === true, isIndeterminate: checked === "indeterminate" })) }) }));
22
24
  });
23
25
  const ContentSpacerCell = memo(({ noBorders }) => {
24
- const theme = useCustomTheme();
25
- return (_jsx(Th, { scope: "col", w: 6, minW: "35px", p: 0, backgroundColor: theme.colors.table.hover[200], borderBottom: noBorders ? "none" : `0.063rem solid ${theme.colors.border[500]}`, position: "sticky", className: `columns sticky-columns`, left: "0px", zIndex: 1 }));
26
+ const variant = useTableVariant();
27
+ return (_jsx(Th, { scope: "col", w: 6, minW: "35px", p: 0, backgroundColor: variant.header.bg, borderBottom: noBorders ? "none" : `0.063rem solid ${variant.header.ruleColor}`, position: "sticky", className: `columns sticky-columns`, left: "0px", zIndex: 1 }));
26
28
  });
27
29
  const ViewSpacerCell = memo(({ noBorders, isActionFreeze, }) => {
28
- const theme = useCustomTheme();
29
- return (_jsx(Th, { scope: "col", w: 2, p: 0, minW: "2.065rem", backgroundColor: theme.colors.table.hover[200], borderBottom: noBorders ? "none" : `0.063rem solid ${theme.colors.border[500]}`, position: isActionFreeze ? "sticky" : "relative", className: `columns sticky-columns`, right: "0px", zIndex: 1 }));
30
+ const variant = useTableVariant();
31
+ return (_jsx(Th, { scope: "col", w: 2, p: 0, minW: "2.065rem", backgroundColor: variant.header.bg, borderBottom: noBorders ? "none" : `0.063rem solid ${variant.header.ruleColor}`, position: isActionFreeze ? "sticky" : "relative", className: `columns sticky-columns`, right: "0px", zIndex: 1 }));
30
32
  });
31
33
  const SortingIcon = memo(({ label, sortState, isVisible, handleSortClick, }) => {
32
34
  const theme = useCustomTheme();
35
+ const variant = useTableVariant();
33
36
  return (_jsxs(Box, { as: "button", type: "button", "aria-label": `Sort by ${label}`, display: "inline-flex", alignItems: "center", justifyContent: "center", cursor: "pointer", ml: 2, p: 0, border: "none", bg: "transparent", lineHeight: "1", onClick: handleSortClick, transition: "color 0.2s ease-in-out, opacity 0.2s ease-in-out",
34
37
  // Kept out of view until hover/focus so the header looks exactly as it did,
35
38
  // while staying in the DOM and reachable by Tab.
36
39
  opacity: isVisible ? 1 : 0, _focus: { opacity: 1 }, _focusVisible: { opacity: 1 }, color: theme.colors.textMuted, _hover: {
37
40
  opacity: 1,
38
- color: accentTextOnCanvas(theme.colors.secondary, theme.colors.table.hover[200]),
41
+ color: accentTextOnCanvas(theme.colors.secondary, variant.header.bg),
39
42
  }, children: [sortState === "none" && _jsx(ChevronsUpDown, { size: 14 }), sortState === "asc" && _jsx(ChevronUp, { size: 14 }), sortState === "desc" && _jsx(ChevronDown, { size: 14 })] }));
40
43
  });
41
44
  const ColumnHeader = memo(({ header, index, columnWidths, isCheckbox, noBorders, columnsSort, headerRefs, columnsSearch, setColumnsSearch, handleSort, openFilterId, setOpenFilterId, }) => {
42
45
  var _a;
43
46
  const [isHovered, setIsHovered] = useState(false);
44
47
  const theme = useCustomTheme();
48
+ const variant = useTableVariant();
45
49
  const isFrozen = header.isFreeze;
46
50
  const leftOffset = isFrozen
47
51
  ? calculateLeftOffset(columnWidths, index) + (isCheckbox ? 50 : 0)
@@ -77,7 +81,16 @@ const ColumnHeader = memo(({ header, index, columnWidths, isCheckbox, noBorders,
77
81
  document.addEventListener("mouseup", onMouseUp);
78
82
  };
79
83
  const isSortActive = !!(isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) && isSorting.direction !== "none";
80
- return (_jsx(Th, { scope: "col", ref: (el) => (headerRefs.current[index] = el), "aria-sort": ariaSort, textTransform: "capitalize", fontSize: 13, fontWeight: 600, position: isFrozen ? "sticky" : undefined, left: isFrozen ? leftOffset : undefined, minWidth: 120, backgroundColor: theme.colors.table.hover[200], maxWidth: 500, zIndex: isFrozen ? 2 : 1, py: 2, pr: 0, overflow: "hidden", borderTop: "none", borderBottom: noBorders ? "none" : `0.063rem solid ${theme.colors.border[500]}`, borderRight: noBorders ? "none" : `0.063rem solid ${theme.colors.boxborder[300]}`, className: `columns ${isFrozen ? "sticky-columns" : "scrollable-columns"}`, height: 45, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: _jsxs(Box, { display: "flex", color: accentTextOnCanvas(theme.colors.secondary, theme.colors.table.hover[200]), lineHeight: "1.25rem", justifyContent: "space-between", alignItems: "center", position: "relative", children: [_jsx(Box, { textOverflow: "ellipsis", whiteSpace: "nowrap", display: "inline-block", overflow: "hidden", children: header.label }), _jsxs(Box, { display: "inline-flex", alignItems: "center", children: [header.isSort && (_jsx(SortingIcon, { label: String(header.label), sortState: (_a = isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) !== null && _a !== void 0 ? _a : "none", isVisible: isHovered || isSortActive, handleSortClick: () => {
84
+ // Studio keeps the kebab out of the resting header — nine of them read louder than
85
+ // the labels. A column that is filtering or sorting keeps its control on show.
86
+ const showActions = variant.header.actions === "always" ||
87
+ isHovered ||
88
+ isSortActive ||
89
+ openFilterId === header.id ||
90
+ !!columnsSearch[header.id];
91
+ return (_jsx(Th, { scope: "col", ref: (el) => (headerRefs.current[index] = el), "aria-sort": ariaSort, textTransform: variant.header.textTransform, fontSize: variant.header.fontSize, fontWeight: variant.header.fontWeight, letterSpacing: variant.header.letterSpacing, position: isFrozen ? "sticky" : undefined, left: isFrozen ? leftOffset : undefined, minWidth: 120, backgroundColor: variant.header.bg, maxWidth: 500, zIndex: isFrozen ? 2 : 1, py: 2, pr: 0, overflow: "hidden", borderTop: "none", borderBottom: noBorders ? "none" : `0.063rem solid ${variant.header.ruleColor}`, borderRight: noBorders || !variant.header.showColumnRule
92
+ ? "none"
93
+ : `0.063rem solid ${variant.header.ruleColor}`, className: `columns ${isFrozen ? "sticky-columns" : "scrollable-columns"}`, height: variant.header.height, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: _jsxs(Box, { display: "flex", color: variant.header.ink, lineHeight: "1.25rem", justifyContent: "space-between", alignItems: "center", position: "relative", children: [_jsx(Box, { textOverflow: "ellipsis", whiteSpace: "nowrap", display: "inline-block", overflow: "hidden", children: header.label }), _jsxs(Box, { display: "inline-flex", alignItems: "center", opacity: showActions ? 1 : 0, transition: "opacity 0.2s ease-in-out", _focusWithin: { opacity: 1 }, children: [header.isSort && (_jsx(SortingIcon, { label: String(header.label), sortState: (_a = isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) !== null && _a !== void 0 ? _a : "none", isVisible: isHovered || isSortActive, handleSortClick: () => {
81
94
  let direction = "asc";
82
95
  if ((isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) === "asc") {
83
96
  direction = "desc";
@@ -86,7 +99,7 @@ const ColumnHeader = memo(({ header, index, columnWidths, isCheckbox, noBorders,
86
99
  direction = "none";
87
100
  }
88
101
  handleSort(header.id, direction);
89
- } })), sortPriority > 0 && (_jsx(Box, { as: "span", ml: 1, fontSize: "0.625rem", fontWeight: 700, lineHeight: "1", borderRadius: "full", px: "0.3rem", py: "0.1rem", bg: theme.colors.primary.opacity[16], color: accentTextOnCanvas(theme.colors.primary, theme.colors.table.hover[200]), children: sortPriority })), _jsx(TableFilters, { header: header, setColumnsSearch: (searchVal) => setColumnsSearch((prev) => ({
102
+ } })), sortPriority > 0 && (_jsx(Box, { as: "span", ml: 1, fontSize: "0.625rem", fontWeight: 700, lineHeight: "1", borderRadius: "full", px: "0.3rem", py: "0.1rem", bg: theme.colors.primary.opacity[16], color: accentTextOnCanvas(theme.colors.primary, variant.header.bg), children: sortPriority })), _jsx(TableFilters, { header: header, setColumnsSearch: (searchVal) => setColumnsSearch((prev) => ({
90
103
  ...prev,
91
104
  [header.id]: searchVal,
92
105
  })), columnsSearch: columnsSearch[header.id] || "", onClose: () => {
@@ -25,6 +25,6 @@ const TableSearch = ({ onSearch }) => {
25
25
  setQuery(value);
26
26
  handleDebounce(value);
27
27
  };
28
- return (_jsxs(Box, { display: "flex", alignItems: "center", gap: "2", children: [!showInput && (_jsx(ToolTip, { label: "Search", placement: "top", children: _jsx(IconButton, { "aria-label": "Search", icon: _jsx(Icon, { as: Search, transform: "scaleX(-1)", boxSize: 5 }), variant: "unstyled", minW: "auto", h: "auto", display: "flex", cursor: "pointer", color: colors.text[500], onClick: handleSearchClick, _hover: { color: colors.accentText } }) })), showInput ? (_jsxs(InputGroup, { maxW: "12.5rem", transition: "all 0.3s ease", children: [_jsx(Input, { placeholder: "Search...", value: query, onChange: handleInputChange, size: "sm", borderRadius: "md", borderColor: colors.border[500], _focus: { borderColor: colors.accentText }, autoFocus: true }), _jsx(InputRightElement, { display: "flex", alignItems: "center", height: "2rem", children: _jsx(IconButton, { "aria-label": "Clear search", icon: _jsx(Icon, { as: X }), variant: "unstyled", minW: "auto", h: "auto", display: "flex", color: colors.text[500], cursor: "pointer", onClick: handleSearchClick }) })] })) : null] }));
28
+ return (_jsxs(Box, { display: "flex", alignItems: "center", gap: "2", children: [!showInput && (_jsx(ToolTip, { label: "Search", placement: "top", children: _jsx(IconButton, { "aria-label": "Search", icon: _jsx(Icon, { as: Search, transform: "scaleX(-1)", boxSize: 5 }), variant: "unstyled", minW: "auto", h: "auto", display: "flex", cursor: "pointer", color: colors.text[500], onClick: handleSearchClick, _hover: { color: colors.accentText } }) })), showInput ? (_jsxs(InputGroup, { maxW: "12.5rem", transition: "all 0.3s ease", children: [_jsx(Input, { placeholder: "Search...", value: query, onChange: handleInputChange, size: "sm", borderRadius: "md", borderColor: colors.boxborder[500], _focus: { borderColor: colors.accentText }, autoFocus: true }), _jsx(InputRightElement, { display: "flex", alignItems: "center", height: "2rem", children: _jsx(IconButton, { "aria-label": "Clear search", icon: _jsx(Icon, { as: X }), variant: "unstyled", minW: "auto", h: "auto", display: "flex", color: colors.text[500], cursor: "pointer", onClick: handleSearchClick }) })] })) : null] }));
29
29
  };
30
30
  export default TableSearch;
@@ -4,6 +4,7 @@ import { Box, Flex, Text, IconButton } from "@chakra-ui/react";
4
4
  import { X } from "lucide-react";
5
5
  import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
6
6
  import { accentTextOnCanvas } from "../../../Theme/tokens/builders/accentText.js";
7
+ import { scrollbarStyles } from "../../../Theme/tokens/builders/scrollbar.js";
7
8
  import VeritcalDivider from "../../Divider/Divider.js";
8
9
  const ActiveFilters = React.memo(({ columns, columnsSearch, setColumnsSearch, }) => {
9
10
  const theme = useCustomTheme();
@@ -34,24 +35,7 @@ const ActiveFilters = React.memo(({ columns, columnsSearch, setColumnsSearch, })
34
35
  if (activeFilters.length === 0) {
35
36
  return null;
36
37
  }
37
- return (_jsx(Box, { px: 2, py: 1, bg: theme.colors.background[100], overflowX: "auto", sx: {
38
- '&::-webkit-scrollbar': {
39
- height: '6px',
40
- },
41
- '&::-webkit-scrollbar-track': {
42
- background: theme.colors.gray[100],
43
- borderRadius: 'base',
44
- },
45
- '&::-webkit-scrollbar-thumb': {
46
- background: theme.colors.gray[400],
47
- borderRadius: 'base',
48
- },
49
- '&::-webkit-scrollbar-thumb:hover': {
50
- background: theme.colors.gray[500],
51
- },
52
- scrollbarWidth: 'thin',
53
- scrollbarColor: `${theme.colors.gray[400]} ${theme.colors.gray[100]}`,
54
- }, children: _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, flexWrap: "nowrap", minW: "max-content", children: [activeFilters.length > 0 && _jsx(VeritcalDivider, {}), activeFilters.map((filter) => (_jsxs(Flex, { alignItems: "center", gap: 1, px: 2, py: 1, bg: theme.colors.blue[50], borderRadius: "md", border: `0.063rem solid ${theme.colors.blue[200]}`, flexShrink: 0, children: [_jsxs(Text, { fontSize: "sm", color: accentTextOnCanvas(theme.colors.blue, theme.colors.blue[50]), whiteSpace: "nowrap", children: [_jsxs(Text, { as: "span", fontWeight: 600, children: [filter.label, ":"] }), " ", filter.value] }), _jsx(IconButton, { "aria-label": `Remove filter for ${filter.label}`, icon: _jsx(X, { size: 14 }), size: "xs", variant: "ghost", onClick: () => handleRemoveFilter(filter.columnId), _hover: {
38
+ return (_jsx(Box, { px: 2, py: 1, bg: theme.colors.background[100], overflowX: "auto", sx: scrollbarStyles(theme.colors), children: _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, flexWrap: "nowrap", minW: "max-content", children: [activeFilters.length > 0 && _jsx(VeritcalDivider, {}), activeFilters.map((filter) => (_jsxs(Flex, { alignItems: "center", gap: 1, px: 2, py: 1, bg: theme.colors.blue[50], borderRadius: "md", border: `0.063rem solid ${theme.colors.blue[200]}`, flexShrink: 0, children: [_jsxs(Text, { fontSize: "sm", color: accentTextOnCanvas(theme.colors.blue, theme.colors.blue[50]), whiteSpace: "nowrap", children: [_jsxs(Text, { as: "span", fontWeight: 600, children: [filter.label, ":"] }), " ", filter.value] }), _jsx(IconButton, { "aria-label": `Remove filter for ${filter.label}`, icon: _jsx(X, { size: 14 }), size: "xs", variant: "ghost", onClick: () => handleRemoveFilter(filter.columnId), _hover: {
55
39
  bg: theme.colors.blue[100],
56
40
  }, minW: "auto", h: "auto", p: 0.5, flexShrink: 0 })] }, filter.columnId))), activeFilters.length > 1 && (_jsx(Text, { as: "p", className: "clear-all-text", "aria-label": "Clear All", fontSize: "sm", color: accentTextOnCanvas(theme.colors.blue, theme.colors.background[100]), cursor: "pointer", fontWeight: 500, onClick: handleClearAll, _hover: {
57
41
  textDecoration: "underline",
@@ -3,6 +3,8 @@ import { useImperativeHandle, useMemo, useState, useEffect } from "react";
3
3
  import { Box, Flex, IconButton, Input, List, ListItem, Text, } from "@chakra-ui/react";
4
4
  import Checkbox from "../../Checkbox/Checkbox.js";
5
5
  import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
6
+ import { scrollbarStyles } from "../../../Theme/tokens/builders/scrollbar.js";
7
+ import { accentTextOnCanvas } from "../../../Theme/tokens/builders/accentText.js";
6
8
  import { ChevronDown, ChevronUp, GripVertical } from "lucide-react";
7
9
  const ManageColumns = ({ columns, items, setItems, childInputMethodsRef, }) => {
8
10
  const theme = useCustomTheme();
@@ -69,22 +71,7 @@ const ManageColumns = ({ columns, items, setItems, childInputMethodsRef, }) => {
69
71
  setError(null);
70
72
  }
71
73
  };
72
- return (_jsxs(Box, { mt: 2, children: [error && (_jsx(Box, { mb: 2, px: 3, py: 2, bg: theme.colors.red[50], borderRadius: "md", border: "1px solid", borderColor: theme.colors.red[200], children: _jsx(Text, { color: theme.colors.red[600], fontSize: "xs", fontWeight: 500, children: error }) })), _jsx(Input, { placeholder: "Search columns...", mb: 2, value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), size: "sm", borderRadius: "md" }), !searchTerm.length && (_jsx(Flex, { align: "center", mb: 1, bg: theme.colors.gray[100], px: 2, py: 1, borderRadius: "md", children: _jsx(Checkbox, { label: "Show all columns", isChecked: allChecked, isIndeterminate: someChecked, onChange: handleSelectAll }) })), _jsx(List, { spacing: 0, maxH: "300px", overflowY: "auto", sx: {
73
- "&::-webkit-scrollbar": { width: "3px", height: "3px" },
74
- "&::-webkit-scrollbar-track": {
75
- background: theme.colors.gray[100],
76
- borderRadius: "sm",
77
- },
78
- "&::-webkit-scrollbar-thumb": {
79
- background: theme.colors.gray[400],
80
- borderRadius: "sm",
81
- },
82
- "&::-webkit-scrollbar-thumb:hover": {
83
- background: theme.colors.gray[500],
84
- },
85
- scrollbarWidth: "thin",
86
- scrollbarColor: `${theme.colors.gray[400]} ${theme.colors.gray[100]}`,
87
- }, children: filteredItems.length > 0 ? (filteredItems.map((item, index) => {
74
+ return (_jsxs(Box, { mt: 2, children: [error && (_jsx(Box, { mb: 2, px: 3, py: 2, bg: theme.colors.red[50], borderRadius: "md", border: "1px solid", borderColor: theme.colors.red[200], children: _jsx(Text, { color: accentTextOnCanvas(theme.colors.red, theme.colors.red[50]), fontSize: "xs", fontWeight: 500, children: error }) })), _jsx(Input, { placeholder: "Search columns...", mb: 2, value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), size: "sm", borderRadius: "md" }), !searchTerm.length && (_jsx(Flex, { align: "center", mb: 1, bg: theme.colors.gray[100], px: 2, py: 1, borderRadius: "md", children: _jsx(Checkbox, { label: "Show all columns", isChecked: allChecked, isIndeterminate: someChecked, onChange: handleSelectAll }) })), _jsx(List, { spacing: 0, maxH: "300px", overflowY: "auto", sx: scrollbarStyles(theme.colors), children: filteredItems.length > 0 ? (filteredItems.map((item, index) => {
88
75
  const isDraggingThisItem = draggedItemIndex === index;
89
76
  const isDropZone = draggedItemIndex !== null && draggedItemIndex !== index;
90
77
  const realIndex = items.findIndex((i) => i.id === item.id);
@@ -96,7 +83,7 @@ const ManageColumns = ({ columns, items, setItems, childInputMethodsRef, }) => {
96
83
  ? theme.colors.primary[400]
97
84
  : "transparent", cursor: "grab", fontSize: "13px", px: 2, py: "3px", mb: "3px", transition: "all 0.15s ease", _hover: {
98
85
  bg: theme.colors.gray[50],
99
- borderColor: theme.colors.border[200],
86
+ borderColor: theme.colors.boxborder[200],
100
87
  }, _active: { cursor: "grabbing" }, children: [_jsx(Box, { as: "span", "aria-hidden": "true", display: "inline-flex", cursor: "grab", mr: 1, _hover: { color: theme.colors.gray[500] }, children: _jsx(GripVertical, { size: 14 }) }), _jsx(Checkbox, { isChecked: !item.isHidden, label: String(item.label), onChange: () => toggleCheckbox(item.id), size: "sm", labelSx: {
101
88
  color: item.isHidden ? theme.colors.gray[500] : theme.colors.gray[700],
102
89
  } }), _jsx(Text, { fontSize: "12px", color: theme.colors.gray[500], ml: 'auto', children: index + 1 }), _jsx(IconButton, { "aria-label": `Move ${item.label} up`, icon: _jsx(ChevronUp, { size: 14 }), variant: "ghost", size: "xs", ml: 1, minW: "auto", h: "auto", p: 0, color: theme.colors.gray[500], isDisabled: realIndex <= 0, onClick: () => moveItem(item.id, -1) }), _jsx(IconButton, { "aria-label": `Move ${item.label} down`, icon: _jsx(ChevronDown, { size: 14 }), variant: "ghost", size: "xs", ml: 1, minW: "auto", h: "auto", p: 0, color: theme.colors.gray[500], isDisabled: realIndex === -1 || realIndex >= items.length - 1, onClick: () => moveItem(item.id, 1) })] }, item.id));
@@ -5,6 +5,7 @@ import { motion } from "framer-motion";
5
5
  import ManageColumns from "./ManageColumns.js";
6
6
  import Button from "../../Button/Button.js";
7
7
  import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
8
+ import { scrollbarStyles } from "../../../Theme/tokens/builders/scrollbar.js";
8
9
  import { Settings, Check } from "lucide-react";
9
10
  import ToolTip from "../../ToolTip/ToolTip.js";
10
11
  const MotionModalContent = motion(ModalContent);
@@ -47,16 +48,9 @@ const TableSettings = ({ columns, onSave, density = "normal", onDensityChange, g
47
48
  return (_jsxs(Box, { children: [_jsx(ToolTip, { label: "Table Settings", placement: "top", children: _jsx(IconButton, { "aria-label": "Table settings", icon: _jsx(Settings, { size: "1.25rem" }), onClick: handleOpen, variant: "unstyled", minW: "auto", h: "auto", display: "flex", justifyContent: "flex-end", cursor: "pointer", transition: "all 0.2s ease", color: theme.colors.text[500], _hover: {
48
49
  transform: "scale(1.1)",
49
50
  color: theme.colors.accentText
50
- } }) }), _jsxs(Modal, { isOpen: settingsOpen, onClose: () => setSettingsOpen(false), size: "md", children: [_jsx(ModalOverlay, {}), _jsxs(MotionModalContent, { mt: "0", top: "0", position: "absolute", borderTopRadius: "none", initial: { y: "-100%", opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: "-100%", opacity: 0 }, transition: { duration: 0.4, ease: "easeOut" }, padding: "0", minW: "620px", minH: "520px", maxH: "90vh", display: "flex", flexDirection: "column", bg: theme.colors.background[50], overflow: "hidden", children: [_jsx(ModalCloseButton, { top: 3, right: 3, zIndex: 2 }), _jsxs(Tabs, { index: selectedIndex, onChange: setSelectedIndex, variant: "unstyled", display: "flex", flexDirection: "column", flex: "1", minH: 0, children: [_jsxs(Box, { pt: 4, px: 4, children: [_jsx(Text, { fontWeight: 600, fontSize: "md", mb: 3, children: "Table Settings" }), _jsxs(TabList, { gap: 0, borderBottom: "1px solid", borderColor: theme.colors.border[200], children: [_jsx(Tab, { ...tabStyle, children: "Density" }), _jsx(Tab, { ...tabStyle, children: "Manage Columns" }), _jsx(Tab, { ...tabStyle, children: "Group" })] })] }), _jsx(ModalBody, { px: 4, py: 3, flex: "1", overflowY: "auto", sx: {
51
- "&::-webkit-scrollbar": { width: "3px", height: "3px" },
52
- "&::-webkit-scrollbar-track": { background: theme.colors.gray[100], borderRadius: "sm" },
53
- "&::-webkit-scrollbar-thumb": { background: theme.colors.gray[400], borderRadius: "sm" },
54
- "&::-webkit-scrollbar-thumb:hover": { background: theme.colors.gray[500] },
55
- scrollbarWidth: "thin",
56
- scrollbarColor: `${theme.colors.gray[400]} ${theme.colors.gray[100]}`,
57
- }, children: _jsxs(TabPanels, { children: [_jsx(TabPanel, { px: 0, py: 1, children: _jsx(Flex, { direction: "column", gap: 2, children: DENSITY_OPTIONS.map((opt) => {
51
+ } }) }), _jsxs(Modal, { isOpen: settingsOpen, onClose: () => setSettingsOpen(false), size: "md", children: [_jsx(ModalOverlay, {}), _jsxs(MotionModalContent, { mt: "0", top: "0", position: "absolute", borderTopRadius: "none", initial: { y: "-100%", opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: "-100%", opacity: 0 }, transition: { duration: 0.4, ease: "easeOut" }, padding: "0", minW: "620px", minH: "520px", maxH: "90vh", display: "flex", flexDirection: "column", bg: theme.colors.background[50], overflow: "hidden", children: [_jsx(ModalCloseButton, { top: 3, right: 3, zIndex: 2 }), _jsxs(Tabs, { index: selectedIndex, onChange: setSelectedIndex, variant: "unstyled", display: "flex", flexDirection: "column", flex: "1", minH: 0, children: [_jsxs(Box, { pt: 4, px: 4, children: [_jsx(Text, { fontWeight: 600, fontSize: "md", mb: 3, children: "Table Settings" }), _jsxs(TabList, { gap: 0, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: [_jsx(Tab, { ...tabStyle, children: "Density" }), _jsx(Tab, { ...tabStyle, children: "Manage Columns" }), _jsx(Tab, { ...tabStyle, children: "Group" })] })] }), _jsx(ModalBody, { px: 4, py: 3, flex: "1", overflowY: "auto", sx: scrollbarStyles(theme.colors), children: _jsxs(TabPanels, { children: [_jsx(TabPanel, { px: 0, py: 1, children: _jsx(Flex, { direction: "column", gap: 2, children: DENSITY_OPTIONS.map((opt) => {
58
52
  const selected = density === opt.value;
59
- return (_jsxs(Flex, { as: "button", type: "button", align: "center", gap: 3, px: 3, py: 2.5, borderRadius: "lg", border: "1px solid", borderColor: selected ? theme.colors.accentText : theme.colors.boxborder[300], bg: selected ? theme.colors.primary.opacity[8] : theme.colors.transparent, transition: "all 0.15s", _hover: { borderColor: theme.colors.accentText }, onClick: () => onDensityChange === null || onDensityChange === void 0 ? void 0 : onDensityChange(opt.value), children: [_jsx(Box, { boxSize: "1.1rem", borderRadius: "full", border: "2px solid", borderColor: selected ? theme.colors.accentText : theme.colors.boxborder[500], display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, children: selected && _jsx(Check, { size: 11, color: theme.colors.accentText, strokeWidth: 3 }) }), _jsxs(Box, { textAlign: "left", children: [_jsx(Text, { fontSize: "13px", fontWeight: 600, color: theme.colors.text[700], children: opt.label }), _jsx(Text, { fontSize: "11px", color: theme.colors.textMuted, children: opt.desc })] })] }, opt.value));
53
+ return (_jsxs(Flex, { as: "button", type: "button", align: "center", gap: 3, px: 3, py: 2.5, borderRadius: "lg", border: "1px solid", borderColor: selected ? theme.colors.accentText : theme.colors.boxborder[200], bg: selected ? theme.colors.primary.opacity[8] : theme.colors.transparent, transition: "all 0.15s", _hover: { borderColor: theme.colors.accentText }, onClick: () => onDensityChange === null || onDensityChange === void 0 ? void 0 : onDensityChange(opt.value), children: [_jsx(Box, { boxSize: "1.1rem", borderRadius: "full", border: "2px solid", borderColor: selected ? theme.colors.accentText : theme.colors.boxborder[500], display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, children: selected && _jsx(Check, { size: 11, color: theme.colors.accentText, strokeWidth: 3 }) }), _jsxs(Box, { textAlign: "left", children: [_jsx(Text, { fontSize: "13px", fontWeight: 600, color: theme.colors.text[700], children: opt.label }), _jsx(Text, { fontSize: "11px", color: theme.colors.textMuted, children: opt.desc })] })] }, opt.value));
60
54
  }) }) }), _jsx(TabPanel, { px: 0, py: 0, children: _jsx(Box, { sx: {
61
55
  "& [role='listitem'], & > div > div": {
62
56
  py: "4px !important",
@@ -74,7 +68,7 @@ const TableSettings = ({ columns, onSave, density = "normal", onDensityChange, g
74
68
  .map((opt) => {
75
69
  var _a;
76
70
  const selected = selectedGroup === opt.id;
77
- return (_jsxs(Flex, { as: "button", type: "button", align: "center", gap: 3, px: 3, py: 2.5, borderRadius: "lg", border: "1px solid", borderColor: selected ? theme.colors.accentText : theme.colors.boxborder[300], bg: selected ? theme.colors.primary.opacity[8] : theme.colors.transparent, transition: "all 0.15s", _hover: { borderColor: theme.colors.accentText }, onClick: () => setSelectedGroup(opt.id), children: [_jsx(Box, { boxSize: "1.1rem", borderRadius: "full", border: "2px solid", borderColor: selected ? theme.colors.accentText : theme.colors.boxborder[500], display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, children: selected && _jsx(Check, { size: 11, color: theme.colors.accentText, strokeWidth: 3 }) }), _jsx(Text, { fontSize: "13px", fontWeight: 600, color: theme.colors.text[700], textAlign: "left", children: opt.label })] }, String((_a = opt.id) !== null && _a !== void 0 ? _a : "__none__")));
78
- }) })] })] }) })] }), _jsxs(ModalFooter, { gap: "0.5rem", borderTop: "1px solid", borderColor: theme.colors.border[200], pt: 3, pb: 3, px: 4, children: [_jsx(Button, { label: "Close", size: "sm", onClick: () => setSettingsOpen(false), variant: "outline", colorScheme: "red" }), _jsx(Button, { label: "Save", size: "sm", onClick: handleSave })] })] })] })] }));
71
+ return (_jsxs(Flex, { as: "button", type: "button", align: "center", gap: 3, px: 3, py: 2.5, borderRadius: "lg", border: "1px solid", borderColor: selected ? theme.colors.accentText : theme.colors.boxborder[200], bg: selected ? theme.colors.primary.opacity[8] : theme.colors.transparent, transition: "all 0.15s", _hover: { borderColor: theme.colors.accentText }, onClick: () => setSelectedGroup(opt.id), children: [_jsx(Box, { boxSize: "1.1rem", borderRadius: "full", border: "2px solid", borderColor: selected ? theme.colors.accentText : theme.colors.boxborder[500], display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, children: selected && _jsx(Check, { size: 11, color: theme.colors.accentText, strokeWidth: 3 }) }), _jsx(Text, { fontSize: "13px", fontWeight: 600, color: theme.colors.text[700], textAlign: "left", children: opt.label })] }, String((_a = opt.id) !== null && _a !== void 0 ? _a : "__none__")));
72
+ }) })] })] }) })] }), _jsxs(ModalFooter, { gap: "0.5rem", borderTop: "1px solid", borderColor: theme.colors.boxborder[200], pt: 3, pb: 3, px: 4, children: [_jsx(Button, { label: "Close", size: "sm", onClick: () => setSettingsOpen(false), variant: "outline", colorScheme: "red" }), _jsx(Button, { label: "Save", size: "sm", onClick: handleSave })] })] })] })] }));
79
73
  };
80
74
  export default TableSettings;
@@ -0,0 +1,13 @@
1
+ import { createContext, useContext, useMemo } from "react";
2
+ import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
3
+ import { isDarkCanvas } from "../../../Theme/tokens/builders/accentText.js";
4
+ import { classicPreset } from "./classic.js";
5
+ const TableVariantContext = createContext(null);
6
+ export const TableVariantProvider = TableVariantContext.Provider;
7
+ /** No provider means the table as it always was — the default is a variant, not a gap. */
8
+ export function useTableVariant() {
9
+ const provided = useContext(TableVariantContext);
10
+ const theme = useCustomTheme();
11
+ const isDark = isDarkCanvas(theme.colors.backgroundColor.main);
12
+ return useMemo(() => provided !== null && provided !== void 0 ? provided : classicPreset(theme.colors, isDark), [provided, theme.colors, isDark]);
13
+ }
@@ -0,0 +1,43 @@
1
+ import { accentTextOnCanvas } from "../../../Theme/tokens/builders/accentText.js";
2
+ import { getTableRowHoverStyle } from "../components/tableRowHoverStyle.js";
3
+ /**
4
+ * The table as it shipped. Pinned by snapshot: every value here is read off the
5
+ * live component, so adding a variant cannot move it.
6
+ */
7
+ export const classicPreset = (colors, isDark) => {
8
+ const headerBg = colors.table.hover[200];
9
+ return {
10
+ header: {
11
+ bg: headerBg,
12
+ ink: accentTextOnCanvas(colors.secondary, headerBg),
13
+ fontSize: 13,
14
+ fontWeight: 600,
15
+ textTransform: "capitalize",
16
+ letterSpacing: "normal",
17
+ height: "45px",
18
+ ruleColor: colors.boxborder[200],
19
+ showColumnRule: true,
20
+ actions: "always",
21
+ },
22
+ row: {
23
+ hoverBg: getTableRowHoverStyle(colors, isDark).backgroundColor,
24
+ hoverScope: "cell",
25
+ ruleColor: colors.boxborder[200],
26
+ frozenRuleColor: colors.boxborder[300],
27
+ selectedBg: colors.primary.opacity[16],
28
+ selectedBarColor: colors.primary[500],
29
+ showSelectedBar: false,
30
+ },
31
+ slot: {
32
+ width: "6",
33
+ rest: "checkbox",
34
+ indexInk: colors.textMuted,
35
+ centered: false,
36
+ },
37
+ cells: {
38
+ ink: colors.text[500],
39
+ statusFill: "bleed",
40
+ pillRadius: "0",
41
+ },
42
+ };
43
+ };
@@ -0,0 +1,9 @@
1
+ import { classicPreset } from "./classic.js";
2
+ import { studioPreset } from "./studio.js";
3
+ /** Adding a variant is one file and one union member — no component changes. */
4
+ export const TABLE_VARIANTS = {
5
+ classic: classicPreset,
6
+ studio: studioPreset,
7
+ };
8
+ export * from "./tokens.js";
9
+ export { classicPreset, studioPreset };
@@ -0,0 +1,18 @@
1
+ import { AA_NORMAL_TEXT } from "../../../Theme/tokens/builders/accentText.js";
2
+ import { compositeOver } from "../../../Theme/tokens/builders/color.js";
3
+ import { liftToContrast } from "../../../Theme/tokens/builders/outlineRung.js";
4
+ const cache = new Map();
5
+ /**
6
+ * A consumer `statusColors` hex is a FILL, and `pickTableColor` hands it straight back as ink
7
+ * over a 13%-alpha tint of itself — legible reversed out of a solid cell, ~1.9:1 on a pill.
8
+ * The palette path is already resolved by `resolveStatusTone`; this rescues the override path.
9
+ */
10
+ export function resolvePillInk(ink, soft, surface) {
11
+ const key = `${ink}|${soft}|${surface}`;
12
+ const hit = cache.get(key);
13
+ if (hit !== undefined)
14
+ return hit;
15
+ const resolved = liftToContrast(ink, compositeOver(soft, surface), AA_NORMAL_TEXT);
16
+ cache.set(key, resolved);
17
+ return resolved;
18
+ }
@@ -0,0 +1,46 @@
1
+ import { CHROME_RULE, MIN_PERCEPTIBLE_STEP, liftToContrast, } from "../../../Theme/tokens/builders/outlineRung.js";
2
+ import { getTableRowHoverStyle } from "../components/tableRowHoverStyle.js";
3
+ /**
4
+ * Quieter chrome, one rule instead of a grid, and a slot that rests on the row
5
+ * number. Every colour is lifted against the surface it actually sits on.
6
+ */
7
+ export const studioPreset = (colors, isDark) => {
8
+ const surface = colors.background[50];
9
+ // Studio drops the per-column rule, so the one line left has to be visible on
10
+ // every brand — `boxborder[200]` measures as low as 1.09:1 on some of them.
11
+ const rule = liftToContrast(colors.boxborder[200], surface, CHROME_RULE);
12
+ return {
13
+ header: {
14
+ bg: surface,
15
+ ink: colors.text[500],
16
+ fontSize: 11,
17
+ fontWeight: 600,
18
+ textTransform: "uppercase",
19
+ letterSpacing: "0.06em",
20
+ height: "40px",
21
+ ruleColor: rule,
22
+ showColumnRule: false,
23
+ actions: "hover",
24
+ },
25
+ row: {
26
+ hoverBg: getTableRowHoverStyle(colors, isDark).backgroundColor,
27
+ hoverScope: "row",
28
+ ruleColor: rule,
29
+ frozenRuleColor: rule,
30
+ selectedBg: liftToContrast(colors.primary[50], surface, MIN_PERCEPTIBLE_STEP),
31
+ selectedBarColor: colors.primary[500],
32
+ showSelectedBar: true,
33
+ },
34
+ slot: {
35
+ width: "3.5rem",
36
+ rest: "index",
37
+ indexInk: colors.textMuted,
38
+ centered: true,
39
+ },
40
+ cells: {
41
+ ink: colors.text[500],
42
+ statusFill: "pill",
43
+ pillRadius: "0.375rem",
44
+ },
45
+ };
46
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -71,13 +71,12 @@ export const Tag = {
71
71
  outline: ({ theme, colorScheme = "primary" }) => {
72
72
  const c = swatch(theme, colorScheme);
73
73
  const canvas = theme.colors.backgroundColor.main;
74
+ const ink = accentTextOnCanvas(c, canvas);
74
75
  return {
75
76
  container: {
76
77
  border: "0.094rem solid",
77
- borderColor: c[500],
78
- // Text sits directly on the page canvas here — a fixed [600] failed AA for several
79
- // hues (orange 2.51, green 2.94, red 4.09); use the canvas-text helper instead.
80
- color: accentTextOnCanvas(c, canvas),
78
+ borderColor: ink,
79
+ color: ink,
81
80
  bg: "transparent",
82
81
  _hover: { bg: c[50] },
83
82
  _active: { bg: c[100] },
@@ -163,7 +163,7 @@ const EventCard = React.memo(function EventCard({ event, index, accent, colors,
163
163
  const scale = getEventScale(colors, event.title);
164
164
  const changes = useMemo(() => parseChanges(event.changes), [event.changes]);
165
165
  const clickable = typeof onEventClick === "function";
166
- return (_jsxs(Box, { _hover: { ".timeline-add-note": { opacity: 1 } }, _focusWithin: { ".timeline-add-note": { opacity: 1 } }, children: [_jsxs(Box, { as: clickable ? "button" : undefined, type: clickable ? "button" : undefined, display: clickable ? "block" : undefined, w: clickable ? "100%" : undefined, textAlign: clickable ? "start" : undefined, position: "relative", zIndex: 1, bg: colors.background[50], border: `0.063rem solid ${colors.boxborder[300]}`, borderInlineStartWidth: accent === "left" ? "0.1875rem" : undefined, borderInlineEndWidth: accent === "right" ? "0.1875rem" : undefined, borderInlineStartColor: accent === "left" ? scale[400] : undefined, borderInlineEndColor: accent === "right" ? scale[400] : undefined, borderRadius: "xl", px: 3.5, py: 2.5, transition: "all 0.15s ease", cursor: clickable ? "pointer" : "default", onClick: clickable ? () => onEventClick(event, index) : undefined, _hover: {
166
+ return (_jsxs(Box, { _hover: { ".timeline-add-note": { opacity: 1 } }, _focusWithin: { ".timeline-add-note": { opacity: 1 } }, children: [_jsxs(Box, { as: clickable ? "button" : undefined, type: clickable ? "button" : undefined, display: clickable ? "block" : undefined, w: clickable ? "100%" : undefined, textAlign: clickable ? "start" : undefined, position: "relative", zIndex: 1, bg: colors.background[50], border: `0.063rem solid ${colors.boxborder[200]}`, borderInlineStartWidth: accent === "left" ? "0.1875rem" : undefined, borderInlineEndWidth: accent === "right" ? "0.1875rem" : undefined, borderInlineStartColor: accent === "left" ? scale[400] : undefined, borderInlineEndColor: accent === "right" ? scale[400] : undefined, borderRadius: "xl", px: 3.5, py: 2.5, transition: "all 0.15s ease", cursor: clickable ? "pointer" : "default", onClick: clickable ? () => onEventClick(event, index) : undefined, _hover: {
167
167
  borderColor: scale[300],
168
168
  boxShadow: (_a = theme.shadows) === null || _a === void 0 ? void 0 : _a.md,
169
169
  transform: clickable ? "translateY(-1px)" : undefined,
@@ -224,7 +224,7 @@ const Timeline = ({ timelineEvents, onEventClick, onAddNote, onEditNote, onDelet
224
224
  // -------------------------------------------------------------------------
225
225
  return (_jsxs(Box, { position: "relative", maxW: "60rem", mx: "auto", px: 4, py: 2, children: [_jsx(Box, { position: "absolute", left: "50%", top: "0.5rem", bottom: "0.5rem", w: "0.015rem", borderRadius: "full", bg: colors.gray[300], transform: "translateX(-50%)" }), Object.keys(groupedEvents).map((date) => {
226
226
  var _a;
227
- return (_jsxs(Box, { mb: 2, children: [_jsx(Flex, { justify: "center", mb: 5, mt: 3, position: "relative", zIndex: 2, children: _jsx(Text, { fontSize: "0.75rem", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.02em", color: colors.textMuted, bg: colors.background[50], border: `0.063rem solid ${colors.boxborder[300]}`, boxShadow: (_a = theme.shadows) === null || _a === void 0 ? void 0 : _a.xs, borderRadius: "full", px: 4, py: 1.5, whiteSpace: "nowrap", children: date }) }), groupedEvents[date].map(({ event, globalIndex }, index) => {
227
+ return (_jsxs(Box, { mb: 2, children: [_jsx(Flex, { justify: "center", mb: 5, mt: 3, position: "relative", zIndex: 2, children: _jsx(Text, { fontSize: "0.75rem", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.02em", color: colors.textMuted, bg: colors.background[50], border: `0.063rem solid ${colors.boxborder[200]}`, boxShadow: (_a = theme.shadows) === null || _a === void 0 ? void 0 : _a.xs, borderRadius: "full", px: 4, py: 1.5, whiteSpace: "nowrap", children: date }) }), groupedEvents[date].map(({ event, globalIndex }, index) => {
228
228
  var _a;
229
229
  const isLeft = index % 2 === 0;
230
230
  const scale = getEventScale(colors, event.title);
@@ -46,7 +46,7 @@ function ToastCard({ onClose, title, description, actions, isClosable, duration,
46
46
  initial: { opacity: 0, x: 24 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: 24 }, transition: { duration: 0.24, ease: [0.22, 1, 0.36, 1] }, onHoverStart: () => setPaused(true), onHoverEnd: () => setPaused(false), position: "relative",
47
47
  // Surface token, not `colors.white`: `white` is a foreground token and stays
48
48
  // white in dark mode. `background[50]` is #ffffff in light, near-black in dark.
49
- bg: c.background[50], border: `0.063rem solid ${c.boxborder[300]}`, boxShadow: shadowLg !== null && shadowLg !== void 0 ? shadowLg : "lg", borderRadius: "2xl", overflow: "hidden", minW: "22.5rem", maxW: "26rem", willChange: "transform, opacity", sx: {
49
+ bg: c.background[50], border: `0.063rem solid ${c.boxborder[200]}`, boxShadow: shadowLg !== null && shadowLg !== void 0 ? shadowLg : "lg", borderRadius: "2xl", overflow: "hidden", minW: "22.5rem", maxW: "26rem", willChange: "transform, opacity", sx: {
50
50
  transition: "box-shadow 0.18s ease",
51
51
  _hover: { boxShadow: "xl" },
52
52
  }, children: [_jsxs(Flex, { p: 3.5, gap: 3, align: actions ? "flex-start" : "center", children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "2rem", minW: "2rem", borderRadius: "full", bg: tone.bg, color: tone.fg, sx: {