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

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 (111) hide show
  1. package/dist/Components/Accordion/Accordion.js +2 -2
  2. package/dist/Components/Button/Button.styles.js +4 -3
  3. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +5 -5
  4. package/dist/Components/Common/fieldStyles.js +1 -1
  5. package/dist/Components/CopyButton/CopyButton.js +1 -1
  6. package/dist/Components/CustomModulesTable/EditModuleModal.js +1 -1
  7. package/dist/Components/DatePicker/CalendarPanel.js +1 -1
  8. package/dist/Components/DatePicker/RangeDatePicker.js +1 -1
  9. package/dist/Components/DatePicker/SingleDatePicker.js +1 -1
  10. package/dist/Components/DatePicker/TimeOnlyPicker.js +1 -1
  11. package/dist/Components/Dropdown/DropDown.js +3 -13
  12. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
  13. package/dist/Components/FilePreview/FilePreview.js +1 -1
  14. package/dist/Components/FilterSidebar/FilterSidebar.js +2 -2
  15. package/dist/Components/Input/TextInput.styles.js +5 -1
  16. package/dist/Components/KanbanBoard/KanbanBoard.js +5 -45
  17. package/dist/Components/LimitReachedModal/LimitReachedModal.js +4 -5
  18. package/dist/Components/MultiSelect/MultiSelect.js +1 -1
  19. package/dist/Components/OrgSwitcher/OrgSwitcher.js +2 -2
  20. package/dist/Components/PinInput/PinInput.js +1 -1
  21. package/dist/Components/PlanPill/PlanPill.js +5 -5
  22. package/dist/Components/PlanPill/planPillGradient.d.ts +2 -14
  23. package/dist/Components/PlanPill/planPillGradient.js +3 -15
  24. package/dist/Components/ProductCard/ProductPrice.js +1 -1
  25. package/dist/Components/ProfileCard/ProfileCard.js +1 -1
  26. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
  27. package/dist/Components/Reorder/Reorder.js +1 -1
  28. package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +13 -0
  29. package/dist/Components/ScrollbarBox/ScrollbarBox.js +11 -0
  30. package/dist/Components/SearchSelect/SearchSelect.js +3 -3
  31. package/dist/Components/Select/Select.styles.js +1 -1
  32. package/dist/Components/SelectSearch/SelectSearch.js +3 -3
  33. package/dist/Components/SelectV2/SelectV2.js +3 -10
  34. package/dist/Components/StageProgress/StageProgress.js +2 -9
  35. package/dist/Components/Table/Table.js +7 -20
  36. package/dist/Components/Table/components/TableBody.js +1 -1
  37. package/dist/Components/Table/components/TableHeader.js +1 -1
  38. package/dist/Components/Table/filters/ActiveFilters.js +2 -18
  39. package/dist/Components/Table/settings/ManageColumns.js +2 -16
  40. package/dist/Components/Table/settings/TableSettings.js +4 -10
  41. package/dist/Components/Timeline/Timeline.js +2 -2
  42. package/dist/Components/Toaster/Toaster.js +1 -1
  43. package/dist/Components/UpgradeButton/UpgradeButton.js +3 -3
  44. package/dist/Constants/Sidebar.js +3 -2
  45. package/dist/Theme/chakra/Menu.styles.d.ts +1 -0
  46. package/dist/Theme/chakra/Menu.styles.js +3 -0
  47. package/dist/Theme/chakra/componentStyles.d.ts +1 -0
  48. package/dist/Theme/chakra/createBrandTheme.js +3 -16
  49. package/dist/Theme/tokens/builders/gradientInk.d.ts +22 -0
  50. package/dist/Theme/tokens/builders/gradientInk.js +28 -0
  51. package/dist/Theme/tokens/builders/index.d.ts +2 -0
  52. package/dist/Theme/tokens/builders/index.js +2 -0
  53. package/dist/Theme/tokens/builders/outlineRung.d.ts +5 -0
  54. package/dist/Theme/tokens/builders/outlineRung.js +19 -0
  55. package/dist/Theme/tokens/builders/scrollbar.d.ts +12 -0
  56. package/dist/Theme/tokens/builders/scrollbar.js +57 -0
  57. package/dist/Theme/tokens/builders/surfaceRungs.d.ts +2 -0
  58. package/dist/Theme/tokens/builders/surfaceRungs.js +7 -2
  59. package/dist/esm/Components/Accordion/Accordion.js +2 -2
  60. package/dist/esm/Components/Button/Button.styles.js +5 -4
  61. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +5 -5
  62. package/dist/esm/Components/Common/fieldStyles.js +1 -1
  63. package/dist/esm/Components/CopyButton/CopyButton.js +1 -1
  64. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +1 -1
  65. package/dist/esm/Components/DatePicker/CalendarPanel.js +1 -1
  66. package/dist/esm/Components/DatePicker/RangeDatePicker.js +1 -1
  67. package/dist/esm/Components/DatePicker/SingleDatePicker.js +1 -1
  68. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +1 -1
  69. package/dist/esm/Components/Dropdown/DropDown.js +3 -13
  70. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
  71. package/dist/esm/Components/FilePreview/FilePreview.js +1 -1
  72. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +2 -2
  73. package/dist/esm/Components/Input/TextInput.styles.js +5 -1
  74. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +5 -45
  75. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +4 -5
  76. package/dist/esm/Components/MultiSelect/MultiSelect.js +1 -1
  77. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +2 -2
  78. package/dist/esm/Components/PinInput/PinInput.js +1 -1
  79. package/dist/esm/Components/PlanPill/PlanPill.js +6 -6
  80. package/dist/esm/Components/PlanPill/planPillGradient.js +3 -15
  81. package/dist/esm/Components/ProductCard/ProductPrice.js +1 -1
  82. package/dist/esm/Components/ProfileCard/ProfileCard.js +1 -1
  83. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
  84. package/dist/esm/Components/Reorder/Reorder.js +1 -1
  85. package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -0
  86. package/dist/esm/Components/SearchSelect/SearchSelect.js +3 -3
  87. package/dist/esm/Components/Select/Select.styles.js +1 -1
  88. package/dist/esm/Components/SelectSearch/SelectSearch.js +3 -3
  89. package/dist/esm/Components/SelectV2/SelectV2.js +3 -10
  90. package/dist/esm/Components/StageProgress/StageProgress.js +2 -9
  91. package/dist/esm/Components/Table/Table.js +7 -20
  92. package/dist/esm/Components/Table/components/TableBody.js +1 -1
  93. package/dist/esm/Components/Table/components/TableHeader.js +1 -1
  94. package/dist/esm/Components/Table/filters/ActiveFilters.js +2 -18
  95. package/dist/esm/Components/Table/settings/ManageColumns.js +2 -16
  96. package/dist/esm/Components/Table/settings/TableSettings.js +4 -10
  97. package/dist/esm/Components/Timeline/Timeline.js +2 -2
  98. package/dist/esm/Components/Toaster/Toaster.js +1 -1
  99. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +3 -3
  100. package/dist/esm/Constants/Sidebar.js +3 -2
  101. package/dist/esm/Theme/chakra/Menu.styles.js +3 -0
  102. package/dist/esm/Theme/chakra/createBrandTheme.js +3 -16
  103. package/dist/esm/Theme/tokens/builders/gradientInk.js +22 -0
  104. package/dist/esm/Theme/tokens/builders/index.js +2 -0
  105. package/dist/esm/Theme/tokens/builders/outlineRung.js +18 -0
  106. package/dist/esm/Theme/tokens/builders/scrollbar.js +52 -0
  107. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +7 -2
  108. package/dist/esm/index.js +3 -1
  109. package/dist/index.d.ts +5 -1
  110. package/dist/index.js +9 -3
  111. package/package.json +1 -1
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Flex, Text } from "@chakra-ui/react";
3
3
  import { AlertCircle, Clock, Sparkles } from "lucide-react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
- import { onGradient } from "../../Theme/tokens/builders/accentText.js";
6
- import { chipBorder, chipFill, inkSafeGradient, statusGradient, } from "./planPillGradient.js";
5
+ import { resolveGradient, gradientCss } from "../../Theme/tokens/builders/gradientInk.js";
6
+ import { chipBorder, chipFill, statusGradient, } from "./planPillGradient.js";
7
7
  const TONE_ICON = {
8
8
  normal: Sparkles,
9
9
  warning: Clock,
@@ -13,15 +13,15 @@ const PlanPill = ({ label, mobileLabel, status, tone = "normal", icon, gradient,
13
13
  const theme = useCustomTheme();
14
14
  const c = theme.colors;
15
15
  const toneGradient = {
16
- normal: inkSafeGradient(c.gradient),
16
+ normal: c.gradient,
17
17
  warning: statusGradient(c.semantic.warning),
18
18
  danger: statusGradient(c.semantic.error),
19
19
  };
20
- const resolved = inkSafeGradient(gradient !== null && gradient !== void 0 ? gradient : toneGradient[tone]);
21
- const ink = onGradient(resolved.from, resolved.to, c.white, c.black);
20
+ const resolved = resolveGradient(gradient !== null && gradient !== void 0 ? gradient : toneGradient[tone], c.white, c.black);
21
+ const ink = resolved.ink;
22
22
  const Icon = icon === undefined ? TONE_ICON[tone] : icon;
23
23
  const hasMobile = !!mobileLabel && mobileLabel !== label;
24
- return (_jsxs(Box, { as: "button", type: "button", "aria-label": ariaLabel || (status ? `${label} — ${status}` : label), onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage: `linear-gradient(135deg, ${resolved.from} 0%, ${resolved.to} 100%)`, color: ink, borderRadius: "full", whiteSpace: "nowrap", cursor: "pointer", transition: "transform 0.2s ease, box-shadow 0.2s ease", _hover: {
24
+ return (_jsxs(Box, { as: "button", type: "button", "aria-label": ariaLabel || (status ? `${label} — ${status}` : label), onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage: gradientCss(resolved), color: ink, borderRadius: "full", whiteSpace: "nowrap", cursor: "pointer", transition: "transform 0.2s ease, box-shadow 0.2s ease", _hover: {
25
25
  transform: "translateY(-1px)",
26
26
  boxShadow: `0 6px 18px ${resolved.from}59`,
27
27
  }, _focusVisible: {
@@ -2,22 +2,10 @@ import { resolveAvatarFill } from "../../Theme/tokens/builders/statusTone.js";
2
2
  import { relativeLuminance } from "../../Theme/tokens/builders/color.js";
3
3
  export const STATUS_INK = "#ffffff";
4
4
  /**
5
- * The plan badge's `normal` tone is a single fixed accent not brand-driven, and
6
- * not mode-dependent.
7
- *
8
- * Its tone carries meaning (normal / warning / danger), and a brand gradient can
9
- * collide with that: rosewood's `#c74962 → #ea0727` is red, so a healthy plan
10
- * rendered as if it had expired. Greyscale brands failed the other way, sinking
11
- * the badge into the header chrome.
12
- *
13
- * One accent for both color modes is deliberate: a lighter dark-mode variant was
14
- * tried and flipped `onGradient`'s ink to black, which read as a washed-out candy
15
- * pill on dark chrome. These stops keep white ink in both modes, so the badge looks
16
- * like the same component everywhere. Verified at AA (>= 4.5:1) on both stops.
17
- *
18
- * Consumers who genuinely want another colour still pass `gradient`.
5
+ * Opt-in accent for consumers who want a fixed badge colour instead of the brand `gradient`.
6
+ * One hue, like every brand gradient — a second hue reads as a status change, not a style.
19
7
  */
20
- export const ACCENT_GRADIENT = { from: "#8B3FC8", to: "#df187a" };
8
+ export const ACCENT_GRADIENT = { from: "#8b3fc8", to: "#762d9d" };
21
9
  /**
22
10
  * Sinks both stops until WHITE ink clears AA, keeping each stop's hue. Any mid-tone gradient —
23
11
  * a brand `gradient` token, a status scale — otherwise flips `onGradient` to black ink, so the
@@ -104,7 +104,7 @@ const ProductPrice = ({ options, size, onSelect, rightSlot }) => {
104
104
  }, templateColumns: { base: '1fr auto', md: '1fr auto' },
105
105
  // columnGap={{ base: 2, md: 3 }}
106
106
  // rowGap={{ base: 1.5, md: 2 }}
107
- alignItems: "center", children: [_jsx(HStack, { gridColumn: 1, gridRow: 1, spacing: 2, align: "center", minW: 0, mb: 0, children: _jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", maxWidth: "100%", fontSize: { base: "xs", md: "sm" }, fontWeight: "medium", whiteSpace: "nowrap", children: option.label }) }) }), _jsx(Box, { gridColumn: 1, gridRow: 2, mt: 0, textAlign: "left", children: _jsxs(HStack, { spacing: 2, align: "center", children: [option.offer > 0 && (_jsx(Badge, { bg: theme.colors.green[100], color: accentTextOnCanvas(theme.colors.green, theme.colors.green[100]), borderRadius: "md", px: { base: 0, md: 0.5 }, py: { base: 0, md: 0.25 }, fontWeight: "bold", fontSize: "10px", flexShrink: 0, children: isMobile ? `${option.offer}%` : `${option.offer}% OFF` })), _jsxs(Text, { fontSize: "sm", fontWeight: "bold", color: accentTextOnCanvas(theme.colors.red, isSelected ? theme.colors.red[50] : theme.colors.background[50]), whiteSpace: "nowrap", children: ["\u20B9", discounted] }), option.offer > 0 && (_jsxs(Text, { fontSize: "xs", color: theme.colors.textMuted, textDecoration: "line-through", whiteSpace: "nowrap", children: ["\u20B9", option.price] }))] }) }), _jsx(Box, { gridColumn: 2, gridRow: 1, ml: { base: 0, md: 0 }, justifySelf: "end", w: { base: "0.625rem", md: "0.75rem" }, h: { base: "0.625rem", md: "0.75rem" }, minW: { base: "0.625rem", md: "0.75rem" }, borderRadius: "full", border: "0.125rem solid", borderColor: isSelected ? theme.colors.red[500] : theme.colors.boxborder[800], bg: theme.colors.background[50], display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "none", children: isSelected && (_jsx(Box, { w: { base: "0.25rem", md: "0.3125rem" }, h: { base: "0.25rem", md: "0.3125rem" }, bg: theme.colors.red[500], borderRadius: "full" })) })] }, option.var_id));
107
+ alignItems: "center", children: [_jsx(HStack, { gridColumn: 1, gridRow: 1, spacing: 2, align: "center", minW: 0, mb: 0, children: _jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", maxWidth: "100%", fontSize: { base: "xs", md: "sm" }, fontWeight: "medium", whiteSpace: "nowrap", children: option.label }) }) }), _jsx(Box, { gridColumn: 1, gridRow: 2, mt: 0, textAlign: "left", children: _jsxs(HStack, { spacing: 2, align: "center", children: [option.offer > 0 && (_jsx(Badge, { bg: theme.colors.green[100], color: accentTextOnCanvas(theme.colors.green, theme.colors.green[100]), borderRadius: "md", px: { base: 0, md: 0.5 }, py: { base: 0, md: 0.25 }, fontWeight: "bold", fontSize: "10px", flexShrink: 0, children: isMobile ? `${option.offer}%` : `${option.offer}% OFF` })), _jsxs(Text, { fontSize: "sm", fontWeight: "bold", color: accentTextOnCanvas(theme.colors.red, isSelected ? theme.colors.red[50] : theme.colors.background[50]), whiteSpace: "nowrap", children: ["\u20B9", discounted] }), option.offer > 0 && (_jsxs(Text, { fontSize: "xs", color: theme.colors.textMuted, textDecoration: "line-through", whiteSpace: "nowrap", children: ["\u20B9", option.price] }))] }) }), _jsx(Box, { gridColumn: 2, gridRow: 1, ml: { base: 0, md: 0 }, justifySelf: "end", w: { base: "0.625rem", md: "0.75rem" }, h: { base: "0.625rem", md: "0.75rem" }, minW: { base: "0.625rem", md: "0.75rem" }, borderRadius: "full", border: "0.125rem solid", borderColor: isSelected ? theme.colors.red[500] : theme.colors.boxborder[500], bg: theme.colors.background[50], display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "none", children: isSelected && (_jsx(Box, { w: { base: "0.25rem", md: "0.3125rem" }, h: { base: "0.25rem", md: "0.3125rem" }, bg: theme.colors.red[500], borderRadius: "full" })) })] }, option.var_id));
108
108
  }) }) })), _jsxs(Flex, { mt: 2, w: "full", gap: 3, direction: { base: "column", md: "row" }, align: { base: "flex-start", md: "center" }, justify: { base: "flex-start", md: rightSlot ? "space-between" : "flex-start" }, children: [_jsxs(Box, { display: "flex", alignItems: "center", fontSize: cfg.price, gap: 2, minW: 0, children: [selected.offer > 0 && (_jsxs(Text, { color: theme.colors.textMuted, textDecoration: "line-through", children: ["\u20B9", selected.price] })), _jsxs(Text, { color: accentTextOnCanvas(theme.colors.red, theme.colors.backgroundColor.main), fontWeight: "semibold", children: ["\u20B9", getDiscountedPrice(selected)] })] }), rightSlot && (_jsx(Box, { flexShrink: 0, mt: { base: 2, md: 0 }, children: rightSlot }))] })] }));
109
109
  };
110
110
  export default ProductPrice;
@@ -13,7 +13,7 @@ export const ProfileCardFooter = ({ children, }) => {
13
13
  };
14
14
  export default function ProfileCard({ maxW, align, variant, direction, justify, children, size, color, overflow, dividercolor, dividersize = "0.5px", dividervariant = "solid", CardStyle, CardHeaderStyle, CardBodyStyle, borderTopColor, borderLeftColor, }) {
15
15
  const { colors } = useCustomTheme();
16
- const resolvedDividerColor = dividercolor !== null && dividercolor !== void 0 ? dividercolor : colors.border[400];
16
+ const resolvedDividerColor = dividercolor !== null && dividercolor !== void 0 ? dividercolor : colors.border[200];
17
17
  const accentBorder = `2px solid ${colors.primary[500]}`;
18
18
  const isReactElement = (child) => {
19
19
  return child !== null && typeof child === "object" && "type" in child;
@@ -35,7 +35,7 @@ export default function ProfilePhotoViewer({ photoUrl, onPhotoChange, imageWidth
35
35
  // [800], not [300]: the edit IconButton's border is a control boundary — WCAG 1.4.11 needs
36
36
  // >=3.0 against any named surface up to `muted` (lightest); [300] fails there, [800] clears
37
37
  // all with margin.
38
- const border = c.boxborder[800];
38
+ const border = c.boxborder[500];
39
39
  // Shared modern frame for whichever media we render (photo / pdf / fallback).
40
40
  const mediaFrame = {
41
41
  boxSize: imageWidth,
@@ -15,7 +15,7 @@ const ReorderList = ({ label = "", items, onReorder, showRemoveIcon = false, onR
15
15
  };
16
16
  return (_jsxs(Box, { borderWidth: "0.063rem", borderRadius: "md", px: 3, py: 2, bg: colors.background[50], children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(BetweenHorizonalStart, {}), _jsx(Text, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 14, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", py: 4, children: label })] }), _jsx(Divider, {}), _jsx("br", {}), _jsx(DragDropContext, { onDragEnd: handleDragEnd, children: _jsx(Droppable, { droppableId: "item-list", direction: "horizontal", children: (provided) => (_jsxs(HStack, { ref: provided.innerRef, ...provided.droppableProps, spacing: 4, overflowX: "auto", children: [items.map((item, index) => (_jsx(Draggable, { draggableId: item.id, index: index, children: (provided) => {
17
17
  var _a;
18
- return (_jsxs(Box, { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, position: "relative", border: "0.063rem solid", borderColor: colors.boxborder[300], borderRadius: "md", overflow: "hidden", children: [_jsx(Image, { src: item.previewUrl, alt: (_a = item.name) !== null && _a !== void 0 ? _a : `item-${index}`, boxSize: "7.5rem", objectFit: "cover" }), _jsx(IconButton, { icon: _jsx(GripVertical, { size: 16, color: colors.textMuted }), "aria-label": "Drag", size: "sm", position: "absolute", top: 1, left: 1, variant: "ghost" }), _jsx(Badge, { position: "absolute", colorScheme: "gray", variant: "solid", bottom: 1, right: 1, children: index + 1 }), showRemoveIcon && (_jsx(IconButton, { icon: _jsx(X, { size: 16, color: colors.semanticText.error }), "aria-label": "Remove", size: "sm", position: "absolute", top: 1, right: 1, variant: "ghost", onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.id) }))] }));
18
+ return (_jsxs(Box, { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, position: "relative", border: "0.063rem solid", borderColor: colors.boxborder[200], borderRadius: "md", overflow: "hidden", children: [_jsx(Image, { src: item.previewUrl, alt: (_a = item.name) !== null && _a !== void 0 ? _a : `item-${index}`, boxSize: "7.5rem", objectFit: "cover" }), _jsx(IconButton, { icon: _jsx(GripVertical, { size: 16, color: colors.textMuted }), "aria-label": "Drag", size: "sm", position: "absolute", top: 1, left: 1, variant: "ghost" }), _jsx(Badge, { position: "absolute", colorScheme: "gray", variant: "solid", bottom: 1, right: 1, children: index + 1 }), showRemoveIcon && (_jsx(IconButton, { icon: _jsx(X, { size: 16, color: colors.semanticText.error }), "aria-label": "Remove", size: "sm", position: "absolute", top: 1, right: 1, variant: "ghost", onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.id) }))] }));
19
19
  } }, item.id))), provided.placeholder] })) }) })] }));
20
20
  };
21
21
  export default ReorderList;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from "@chakra-ui/react";
3
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
+ import { scrollbarStyles, } from "../../Theme/tokens/builders/scrollbar.js";
5
+ const ScrollbarBox = ({ children, height, maxHeight, overflowX, overflowY = "auto", variant = "default", scrollContainerRef, }) => {
6
+ const { colors } = useCustomTheme();
7
+ return (_jsx(Box, { ref: scrollContainerRef, height: height, maxHeight: maxHeight, position: "relative", sx: { overflowX, overflowY, ...scrollbarStyles(colors, variant) }, children: children }));
8
+ };
9
+ export default ScrollbarBox;
@@ -449,7 +449,7 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
449
449
  var _a, _b, _c, _d, _e;
450
450
  const insideLabel = (_a = insideSelect.value) === null || _a === void 0 ? void 0 : _a.label;
451
451
  const insidePlaceholder = (_b = insideSelect.placeholder) !== null && _b !== void 0 ? _b : "Select";
452
- return (_jsxs(Box, { position: "relative", ref: customSelectRef, flexShrink: 0, ml: s.insideSelectMarginLeft, h: "-webkit-fill-available", borderRight: "0.063rem solid", borderColor: theme.colors.boxborder[300], bg: customSelectOpen
452
+ return (_jsxs(Box, { position: "relative", ref: customSelectRef, flexShrink: 0, ml: s.insideSelectMarginLeft, h: "-webkit-fill-available", borderRight: "0.063rem solid", borderColor: theme.colors.boxborder[200], bg: customSelectOpen
453
453
  ? theme.colors.primary.opacity[8]
454
454
  : theme.colors.background[400], borderLeftRadius: "md", borderRightRadius: 0, transition: "background 0.15s ease, box-shadow 0.15s ease", boxShadow: customSelectOpen
455
455
  ? `inset 0 0 0 0.063rem ${theme.colors.primary[500]}`
@@ -506,10 +506,10 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
506
506
  setCustomSelectOpen(false);
507
507
  return !prev;
508
508
  });
509
- }, "aria-label": "toggle-dropdown", display: "flex", alignItems: "center", children: isOpen ? (_jsx(ChevronUp, { size: s.chevronSize })) : (_jsx(ChevronDown, { size: s.chevronSize })) }))] })] }) }), isOpen && (_jsx(Portal, { children: _jsxs(Box, { ref: setDropdownMenuRef, id: listboxId, role: "listbox", "aria-multiselectable": isMultiple || undefined, position: "fixed", top: `${dropdownPos.top}px`, left: `${dropdownPos.left}px`, width: `${dropdownPos.width}px`, zIndex: 1500, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "sm", bg: theme.colors.background[50], boxShadow: "md", display: "flex", flexDirection: "column", children: [isMultiple && isSelectAll && (_jsxs(Box, { py: s.optionRowPy, px: 3, cursor: "pointer", onClick: handleSelectAll, display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[100]}`, children: [_jsx(Checkbox, { isChecked: allFilteredSelected, sx: { pointerEvents: "none" }, size: s.checkboxSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), _jsx(Box, { flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: "0.063rem solid", borderColor: theme.colors.boxborder[200], children: isOptionLoading && filteredOptions.length === 0 ? (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? (_jsx(Text, { p: 3, fontSize: s.dropdownTextFontSize, color: theme.colors.textMuted, children: "No results found" })) : (_jsxs(_Fragment, { children: [filteredOptions.map((option, index) => (_jsxs(Box, { id: getOptionId(index), role: "option", "aria-selected": isSelected(option.id), py: s.optionRowPy, px: 3, minH: s.optionRowMinH, cursor: "pointer", bg: index === activeIndex
509
+ }, "aria-label": "toggle-dropdown", display: "flex", alignItems: "center", children: isOpen ? (_jsx(ChevronUp, { size: s.chevronSize })) : (_jsx(ChevronDown, { size: s.chevronSize })) }))] })] }) }), isOpen && (_jsx(Portal, { children: _jsxs(Box, { ref: setDropdownMenuRef, id: listboxId, role: "listbox", "aria-multiselectable": isMultiple || undefined, position: "fixed", top: `${dropdownPos.top}px`, left: `${dropdownPos.left}px`, width: `${dropdownPos.width}px`, zIndex: 1500, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "sm", bg: theme.colors.background[50], boxShadow: "md", display: "flex", flexDirection: "column", children: [isMultiple && isSelectAll && (_jsxs(Box, { py: s.optionRowPy, px: 3, cursor: "pointer", onClick: handleSelectAll, display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [_jsx(Checkbox, { isChecked: allFilteredSelected, sx: { pointerEvents: "none" }, size: s.checkboxSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), _jsx(Box, { flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: "0.063rem solid", borderColor: theme.colors.boxborder[200], children: isOptionLoading && filteredOptions.length === 0 ? (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? (_jsx(Text, { p: 3, fontSize: s.dropdownTextFontSize, color: theme.colors.textMuted, children: "No results found" })) : (_jsxs(_Fragment, { children: [filteredOptions.map((option, index) => (_jsxs(Box, { id: getOptionId(index), role: "option", "aria-selected": isSelected(option.id), py: s.optionRowPy, px: 3, minH: s.optionRowMinH, cursor: "pointer", bg: index === activeIndex
510
510
  ? theme.colors.primary.opacity[8]
511
511
  : isSelected(option.id)
512
512
  ? theme.colors.gray[100]
513
- : "transparent", _hover: { bg: theme.colors.gray[50] }, onClick: () => handleSelect(option), onMouseEnter: () => setActiveIndex(index), display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[100]}`, children: [isMultiple && (_jsx(Checkbox, { isChecked: isSelected(option.id), sx: { pointerEvents: "none" }, size: s.checkboxSize })), option.view ? (_jsx(_Fragment, { children: option.view })) : (_jsx(Text, { fontSize: s.dropdownTextFontSize, children: option.label }))] }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", justifyContent: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && (_jsxs(Box, { py: s.optionRowPy, px: 3, borderTop: "0.063rem solid", borderColor: theme.colors.boxborder[200], bg: theme.colors.background[50], display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: theme.colors.gray[50] }, children: [addNew.icon || _jsx(Plus, { size: s.addNewIconSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: addNew.text || "Add New" })] }))] }) })), helperText && !error && _jsx(HelperText, { helperText: helperText }), error && _jsx(ErrorMessage, { errorMessage: errorMessage })] }));
513
+ : "transparent", _hover: { bg: theme.colors.gray[50] }, onClick: () => handleSelect(option), onMouseEnter: () => setActiveIndex(index), display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [isMultiple && (_jsx(Checkbox, { isChecked: isSelected(option.id), sx: { pointerEvents: "none" }, size: s.checkboxSize })), option.view ? (_jsx(_Fragment, { children: option.view })) : (_jsx(Text, { fontSize: s.dropdownTextFontSize, children: option.label }))] }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", justifyContent: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && (_jsxs(Box, { py: s.optionRowPy, px: 3, borderTop: "0.063rem solid", borderColor: theme.colors.boxborder[200], bg: theme.colors.background[50], display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: theme.colors.gray[50] }, children: [addNew.icon || _jsx(Plus, { size: s.addNewIconSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: addNew.text || "Add New" })] }))] }) })), helperText && !error && _jsx(HelperText, { helperText: helperText }), error && _jsx(ErrorMessage, { errorMessage: errorMessage })] }));
514
514
  };
515
515
  export default SearchSelect;
@@ -60,7 +60,7 @@ export const Select = {
60
60
  // [800], not [500]/[700]: WCAG 1.4.11 needs >=3.0 for a control boundary, measured
61
61
  // against the parent surface — up to `muted` (lightest). [700] fails there (2.41-2.72);
62
62
  // [800] clears all named surfaces with margin (3.44-3.90).
63
- const borderColor = theme.colors.boxborder[800];
63
+ const borderColor = theme.colors.boxborder[500];
64
64
  const shadowPrimary = theme.colors.boxShadow.primary;
65
65
  const shadowError = theme.colors.boxShadow.error;
66
66
  const primary = theme.colors.primary[500];
@@ -30,7 +30,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
30
30
  const errorBorder = `2px solid ${theme.colors.semanticText.error}`;
31
31
  // [800], not [500]: WCAG 1.4.11 needs >=3.0 for a control boundary against any named surface
32
32
  // up to `muted` (lightest); [500] fails there, [800] clears all with margin.
33
- const defaultBorderThin = `1px solid ${theme.colors.boxborder[800]}`;
33
+ const defaultBorderThin = `1px solid ${theme.colors.boxborder[500]}`;
34
34
  const [selectedOptions, setSelectedOptions] = useState(initialSelectedOption ? [initialSelectedOption] : []);
35
35
  const [inputValue, setInputValue] = useState(searchQuery);
36
36
  const [isOpen, setIsOpen] = useState(false);
@@ -246,7 +246,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
246
246
  return;
247
247
  }
248
248
  setIsOpen(true);
249
- }, onChange: (e) => handleInputChange(e.target.value), placeholder: placeholder, onKeyDown: handleKeyDown, id: id, name: name, role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, cursor: "pointer", borderColor: theme.colors.boxborder[800], transition: "border-color 0.2s, box-shadow 0.2s", _hover: {
249
+ }, onChange: (e) => handleInputChange(e.target.value), placeholder: placeholder, onKeyDown: handleKeyDown, id: id, name: name, role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, cursor: "pointer", borderColor: theme.colors.boxborder[500], transition: "border-color 0.2s, box-shadow 0.2s", _hover: {
250
250
  borderColor: error
251
251
  ? theme.colors.semanticText.error
252
252
  : theme.colors.primary[500],
@@ -264,7 +264,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
264
264
  fontSize: 15,
265
265
  letterSpacing: 0.7,
266
266
  border: error ? errorBorder : defaultBorderThin,
267
- } }), rightIcon && (_jsx(InputRightElement, { pointerEvents: "none", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && (_jsxs(Box, { ref: dropdownRef, marginTop: "5px", position: "absolute", top: position === "below" ? "100%" : "auto", bottom: position === "above" ? "100%" : "auto", left: 0, right: 0, border: "1px solid", borderColor: theme.colors.boxborder[300], borderRadius: "md", bg: theme.colors.background[50], maxHeight: "150px", overflowY: "auto", zIndex: 10, children: [_jsx(Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: _jsx(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs }) }), _jsx("hr", {}), isBottomIcon && (_jsxs(Box, { position: "sticky", bottom: 0, background: theme.colors.background[50], display: "flex", alignItems: "center", pl: "1rem", cursor: "pointer", onClick: handleBottomClick, borderColor: theme.colors.boxborder[300], zIndex: 1, borderTop: `1px solid ${theme.colors.border[500]}`, children: [_jsx(Box, { children: BottomIcon ? BottomIcon : _jsx(PlusIcon, { size: "1rem" }) }), _jsx(Box, { fontSize: "0.875rem", color: BottomTextColor
267
+ } }), rightIcon && (_jsx(InputRightElement, { pointerEvents: "none", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && (_jsxs(Box, { ref: dropdownRef, marginTop: "5px", position: "absolute", top: position === "below" ? "100%" : "auto", bottom: position === "above" ? "100%" : "auto", left: 0, right: 0, border: "1px solid", borderColor: theme.colors.boxborder[200], borderRadius: "md", bg: theme.colors.background[50], maxHeight: "150px", overflowY: "auto", zIndex: 10, children: [_jsx(Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: _jsx(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs }) }), _jsx("hr", {}), isBottomIcon && (_jsxs(Box, { position: "sticky", bottom: 0, background: theme.colors.background[50], display: "flex", alignItems: "center", pl: "1rem", cursor: "pointer", onClick: handleBottomClick, borderColor: theme.colors.boxborder[200], zIndex: 1, borderTop: `1px solid ${theme.colors.border[500]}`, children: [_jsx(Box, { children: BottomIcon ? BottomIcon : _jsx(PlusIcon, { size: "1rem" }) }), _jsx(Box, { fontSize: "0.875rem", color: BottomTextColor
268
268
  ? BottomTextColor
269
269
  : theme.colors.accentText, padding: "8px 8px", children: BottomText || "Add New" })] }))] })), error && _jsx(ErrorMessage, { errorMessage: errorMessage })] }) }) }));
270
270
  }
@@ -3,6 +3,7 @@ import React, { useCallback, useEffect, useId, useMemo, useRef, useState } from
3
3
  import { Box, Checkbox, FormControl, Input, Popover, PopoverAnchor, PopoverContent, Portal, useDisclosure, } from "@chakra-ui/react";
4
4
  import { ChevronDown } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
+ import { scrollbarStyles } from "../../Theme/tokens/builders/scrollbar.js";
6
7
  import { getFieldStateStyles } from "../Common/fieldStyles.js";
7
8
  import { TextLabel } from "../Common/FormLabel.js";
8
9
  import ErrorMessage from "../Common/ErrorMessage.js";
@@ -192,15 +193,7 @@ export default function SelectV2(props) {
192
193
  const triggerId = `selectv2-trigger-${instanceId}`;
193
194
  const activeOption = filteredOptions[activeIndex];
194
195
  const activeDescendantId = activeOption ? optionDomId(listboxId, activeOption.id) : undefined;
195
- const listScrollStyles = useMemo(() => ({
196
- scrollbarWidth: "thin",
197
- scrollbarColor: `${theme.colors.gray[300]} transparent`,
198
- "&::-webkit-scrollbar": { width: "6px" },
199
- "&::-webkit-scrollbar-thumb": {
200
- background: theme.colors.gray[300],
201
- borderRadius: "base",
202
- },
203
- }), [theme]);
196
+ const listScrollStyles = useMemo(() => scrollbarStyles(theme.colors, "overlay"), [theme]);
204
197
  const defaultTriggerContent = () => {
205
198
  var _a;
206
199
  if (props.isMulti) {
@@ -215,7 +208,7 @@ export default function SelectV2(props) {
215
208
  return selectedOptions[0] ? selectedOptions[0].label : placeholder;
216
209
  };
217
210
  const triggerIcon = !props.isMulti && ((_b = selectedOptions[0]) === null || _b === void 0 ? void 0 : _b.icon) ? selectedOptions[0].icon : null;
218
- return (_jsxs(FormControl, { isInvalid: error, isDisabled: isDisabled, style: formControlStyle, width: width, children: [label && (_jsx(TextLabel, { label: label, id: triggerId, isRequired: isRequired })), _jsxs(Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", matchWidth: true, autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [_jsx(PopoverAnchor, { children: _jsxs(Box, { as: "button", type: "button", id: triggerId, ref: triggerRef, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-activedescendant": activeDescendantId, "aria-disabled": isDisabled, "aria-label": ariaLabel, disabled: isDisabled, onClick: handleOpen, onKeyDown: handleTriggerKeyDown, display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%", h: s.h, px: s.px, fontSize: s.fontSize, fontWeight: 500, textAlign: "left", cursor: isDisabled ? "not-allowed" : "pointer", opacity: isDisabled ? 0.4 : 1, color: selectedOptions.length ? theme.colors.text[900] : theme.colors.placeholder[500], "data-testid": dataTestId, ...fieldStyles, children: [_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", gap: 1.5, minW: 0, isTruncated: true, children: [triggerIcon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, _jsx(Box, { as: "span", isTruncated: true, fontStyle: selectedOptions.length ? "normal" : "italic", children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] }), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, ml: 2, transition: "transform 0.2s ease", transform: isOpen ? "rotate(180deg)" : "rotate(0deg)", color: theme.colors.textMuted, children: _jsx(ChevronDown, { size: 16 }) })] }) }), _jsx(Portal, { children: _jsxs(PopoverContent, { width: "100%", borderRadius: "xl", border: `0.063rem solid ${theme.colors.boxborder[200]}`, boxShadow: (_c = theme.shadows) === null || _c === void 0 ? void 0 : _c.lg, overflow: "hidden", onKeyDown: handleListKeyDown, children: [isSearchable && (_jsx(Box, { p: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[100]}`, children: _jsx(Input, { ref: filterInputRef, size: "sm", placeholder: "Type to filter...", value: filterText, onChange: (event) => {
211
+ return (_jsxs(FormControl, { isInvalid: error, isDisabled: isDisabled, style: formControlStyle, width: width, children: [label && (_jsx(TextLabel, { label: label, id: triggerId, isRequired: isRequired })), _jsxs(Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", matchWidth: true, autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [_jsx(PopoverAnchor, { children: _jsxs(Box, { as: "button", type: "button", id: triggerId, ref: triggerRef, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-activedescendant": activeDescendantId, "aria-disabled": isDisabled, "aria-label": ariaLabel, disabled: isDisabled, onClick: handleOpen, onKeyDown: handleTriggerKeyDown, display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%", h: s.h, px: s.px, fontSize: s.fontSize, fontWeight: 500, textAlign: "left", cursor: isDisabled ? "not-allowed" : "pointer", opacity: isDisabled ? 0.4 : 1, color: selectedOptions.length ? theme.colors.text[900] : theme.colors.placeholder[500], "data-testid": dataTestId, ...fieldStyles, children: [_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", gap: 1.5, minW: 0, isTruncated: true, children: [triggerIcon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, _jsx(Box, { as: "span", isTruncated: true, fontStyle: selectedOptions.length ? "normal" : "italic", children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] }), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, ml: 2, transition: "transform 0.2s ease", transform: isOpen ? "rotate(180deg)" : "rotate(0deg)", color: theme.colors.textMuted, children: _jsx(ChevronDown, { size: 16 }) })] }) }), _jsx(Portal, { children: _jsxs(PopoverContent, { width: "100%", borderRadius: "xl", border: `0.063rem solid ${theme.colors.boxborder[200]}`, boxShadow: (_c = theme.shadows) === null || _c === void 0 ? void 0 : _c.lg, overflow: "hidden", onKeyDown: handleListKeyDown, children: [isSearchable && (_jsx(Box, { p: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: _jsx(Input, { ref: filterInputRef, size: "sm", placeholder: "Type to filter...", value: filterText, onChange: (event) => {
219
212
  setFilterText(event.target.value);
220
213
  setActiveIndex(0);
221
214
  }, "aria-activedescendant": activeDescendantId, "aria-label": "Filter options" }) })), _jsxs(Box, { id: listboxId, ref: listRef, role: "listbox", "aria-multiselectable": props.isMulti || undefined, maxH: maxMenuHeight, overflowY: "auto", py: 1, sx: listScrollStyles, children: [filteredOptions.length === 0 && (_jsx(Box, { px: 3, py: 2, fontSize: "0.8125rem", color: theme.colors.textMuted, children: "No Options" })), filteredOptions.map((option, index) => {
@@ -1,16 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Box, Flex, Skeleton } from "@chakra-ui/react";
3
3
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
+ import { scrollbarStyles } from "../../Theme/tokens/builders/scrollbar.js";
4
5
  import StageItem from "./StageItem.js";
5
6
  import StepperStage from "./StepperStage.js";
6
- const scrollSxFor = (thumb) => ({
7
- "&::-webkit-scrollbar": { height: "4px" },
8
- "&::-webkit-scrollbar-thumb": {
9
- borderRadius: "full",
10
- backgroundColor: thumb,
11
- },
12
- "&::-webkit-scrollbar-track": { background: "transparent" },
13
- });
14
7
  // Gap between items per variant (chevron interlocks via negative margin).
15
8
  const gapFor = {
16
9
  chevron: "0",
@@ -35,7 +28,7 @@ const StageProgress = ({ stages, variant = "chevron", value, onChange, size = "m
35
28
  const total = stages.length;
36
29
  return (_jsx(Box, { display: "flex", alignItems: variant === "stepper" ? "flex-start" : "stretch", gap: gapFor[variant], overflowX: "hidden", p: "0.1rem", sx: {
37
30
  "&:hover": { overflowX: "auto" },
38
- ...scrollSxFor(theme.colors.gray[300]),
31
+ ...scrollbarStyles(theme.colors, "overlay"),
39
32
  }, children: stages.map((stage, index) => {
40
33
  const state = stateFor(index);
41
34
  if (variant === "stepper") {
@@ -8,6 +8,7 @@ import Pagination from "./components/Pagination.js";
8
8
  import TableHeader from "./components/TableHeader.js";
9
9
  import TableBody from "./components/TableBody.js";
10
10
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
11
+ import { scrollbarStyles, SCROLLBAR_WIDTH } from "../../Theme/tokens/builders/scrollbar.js";
11
12
  import useTable from "./hooks/useTable.js";
12
13
  import { searchAndSortData, SortMultiColumnData, groupRows, buildTablePalette, pickTableColor } from "../../Utils/table.js";
13
14
  import { useGetPreferences, useSavePreferences, } from "../../Hooks/usePreferences.js";
@@ -386,29 +387,15 @@ export default function Table({ data, columns, onSelection, isLoading, isCheckbo
386
387
  }, children: _jsx(RefreshCw, { size: 16 }) }) })] })), headerActions && (_jsxs(_Fragment, { children: [_jsx(VeritcalDivider, {}), _jsx(HeaderActions, { actions: headerActions, selections: selection })] })), _jsx(ActiveFilters, { columns: columnsList, columnsSearch: columnsSearch, setColumnsSearch: setColumnsSearch }), _jsxs(Box, { ml: "auto", display: "flex", alignItems: "center", gap: 2, children: [groupLoadMoreActive && loadMorePosition === "top" && (groupLoadMoreCaption || canGroupLoadMore) && (_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, flex: "0 0 auto", children: [groupLoadMoreCaption && (_jsx(Box, { fontSize: "0.75rem", color: theme.colors.text[500], whiteSpace: "nowrap", children: groupLoadMoreCaption })), canGroupLoadMore && (_jsx(Button, { size: "xs", variant: "outline", colorScheme: "gray", isLoading: isLoadingMore, loadingText: loadMoreText, onClick: handleGroupLoadMore, label: loadMoreText }))] })), (isPagination || isServerPagination) && !isGrouped && !canInfinite && !isCompactHeader && (_jsx("div", { children: _jsx(Pagination, { columns: columns, currentPage: currentPage, setCurrentPage: setCurrentPage, rowsPerPage: rowsPerPage, pages: pages, paginationText: tablePaginationText, handlePageSizeChange: handlePageSizeChange, dataLength: tableData.length, isServerPagination: isServerPagination, paginationSelectOptions: paginationSelectOptions, isVisiblity: true }) })), (isPagination || isServerPagination) && !isGrouped && !canInfinite && isCompactHeader && tableData.length > 0 && (_jsxs(Popover, { isOpen: isPaginationPopoverOpen, onClose: () => setIsPaginationPopoverOpen(false), placement: "bottom-end", children: [_jsx(PopoverTrigger, { children: _jsx(IconButton, { "aria-label": "Pagination", size: "sm", variant: "ghost", icon: _jsx(EllipsisVertical, { size: 18 }), color: theme.colors.text[500], _hover: {
387
388
  color: theme.colors.accentText,
388
389
  }, onClick: () => setIsPaginationPopoverOpen((open) => !open) }) }), _jsx(Portal, { children: _jsx(PopoverContent, { maxW: "22rem", p: 2, zIndex: 1600, bg: theme.colors.background[50], boxShadow: "lg", children: _jsx(PopoverBody, { p: 0, children: _jsx(Pagination, { columns: columns, currentPage: currentPage, setCurrentPage: setCurrentPage, rowsPerPage: rowsPerPage, pages: pages, paginationText: tablePaginationText, handlePageSizeChange: handlePageSizeChange, dataLength: tableData.length, isServerPagination: isServerPagination, paginationSelectOptions: paginationSelectOptions, isVisiblity: true }) }) }) })] }))] })] }), _jsxs(TableContainer, { ref: tableContainerRef, position: "relative", h: isTableLoading ? tableMaxH : undefined, maxH: !isTableLoading ? tableMaxH : undefined, pb: isTableLoading ? 0 : compactScrollbarPadding, overflowY: isCompactRows ? "hidden" : "auto", overflowX: "auto", sx: {
390
+ ...scrollbarStyles(theme.colors),
391
+ // Compact rows hide the horizontal bar until hover to keep the row height.
389
392
  '&::-webkit-scrollbar': {
390
- width: '6px',
391
- height: isCompactRows ? '0px' : '6px',
392
- },
393
- '&:hover::-webkit-scrollbar': {
394
- height: '6px',
395
- },
396
- '&::-webkit-scrollbar-track': {
397
- background: theme.colors.gray[100],
398
- borderRadius: 'base',
399
- },
400
- '&::-webkit-scrollbar-thumb': {
401
- background: theme.colors.gray[400],
402
- borderRadius: 'base',
403
- },
404
- '&::-webkit-scrollbar-thumb:hover': {
405
- background: theme.colors.gray[500],
393
+ width: SCROLLBAR_WIDTH,
394
+ height: isCompactRows ? '0px' : SCROLLBAR_WIDTH,
406
395
  },
396
+ '&:hover::-webkit-scrollbar': { height: SCROLLBAR_WIDTH },
407
397
  scrollbarWidth: isCompactRows ? 'none' : 'thin',
408
- '&:hover': {
409
- scrollbarWidth: 'thin',
410
- },
411
- scrollbarColor: `${theme.colors.gray[400]} ${theme.colors.gray[100]}`,
398
+ '&:hover': { scrollbarWidth: 'thin' },
412
399
  }, children: [_jsxs(ChakraTable, { variant: "simple", size: "sm", minW: "100%", role: "grid", "aria-rowcount": isGrouped ? undefined : _filteredData.length + 1, className: "table_wrapper", sx: {
413
400
  width: "100%",
414
401
  // `separate` (not `collapse`) so sticky header cells paint an opaque
@@ -285,7 +285,7 @@ const TableBody = ({ data, isCheckbox, columns, startRow, columnWidths, freezedB
285
285
  return { heights, offsets, totalH: acc };
286
286
  }, [groupItems, groupVirtualize, rowHeight, GROUP_HEADER_H]);
287
287
  if (isLoading && data.length === 0) {
288
- return (_jsx(TableBodyLoading, { noOfColumns: totalVisibleColumns, borderColor: theme.colors.boxborder[300], rowsCount: typeof loadingSkeletonRows === "number" ? loadingSkeletonRows : 4 }));
288
+ return (_jsx(TableBodyLoading, { noOfColumns: totalVisibleColumns, borderColor: theme.colors.boxborder[200], rowsCount: typeof loadingSkeletonRows === "number" ? loadingSkeletonRows : 4 }));
289
289
  }
290
290
  if (!isLoading && data.length === 0) {
291
291
  const isStructured = emptyState && typeof emptyState === "object" && !React.isValidElement(emptyState);
@@ -77,7 +77,7 @@ const ColumnHeader = memo(({ header, index, columnWidths, isCheckbox, noBorders,
77
77
  document.addEventListener("mouseup", onMouseUp);
78
78
  };
79
79
  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: () => {
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[200]}`, 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: () => {
81
81
  let direction = "asc";
82
82
  if ((isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) === "asc") {
83
83
  direction = "desc";
@@ -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,7 @@ 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";
6
7
  import { ChevronDown, ChevronUp, GripVertical } from "lucide-react";
7
8
  const ManageColumns = ({ columns, items, setItems, childInputMethodsRef, }) => {
8
9
  const theme = useCustomTheme();
@@ -69,22 +70,7 @@ const ManageColumns = ({ columns, items, setItems, childInputMethodsRef, }) => {
69
70
  setError(null);
70
71
  }
71
72
  };
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) => {
73
+ 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: scrollbarStyles(theme.colors), children: filteredItems.length > 0 ? (filteredItems.map((item, index) => {
88
74
  const isDraggingThisItem = draggedItemIndex === index;
89
75
  const isDropZone = draggedItemIndex !== null && draggedItemIndex !== index;
90
76
  const realIndex = items.findIndex((i) => i.id === 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.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: 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__")));
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__")));
78
72
  }) })] })] }) })] }), _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 })] })] })] })] }));
79
73
  };
80
74
  export default TableSettings;
@@ -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: {
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Flex, Spinner, Text } from "@chakra-ui/react";
3
3
  import { Sparkles } from "lucide-react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
- import { onGradient } from "../../Theme/tokens/builders/accentText.js";
5
+ import { resolveGradient } from "../../Theme/tokens/builders/gradientInk.js";
6
6
  import { contrastRatio } from "../../Theme/tokens/builders/color.js";
7
7
  import { AA_NON_TEXT } from "../../Theme/tokens/builders/outlineRung.js";
8
8
  /** The brand's gold sparkle accent, kept only where it clears 3:1 on the button's own fill. */
@@ -33,10 +33,10 @@ const UpgradeButton = ({ label, mobileLabel, subtitle, icon = Sparkles, iconColo
33
33
  danger: { from: c.semantic.error[400], to: c.semantic.error[600] },
34
34
  info: { from: c.semantic.info[400], to: c.semantic.info[600] },
35
35
  };
36
- const resolved = gradient !== null && gradient !== void 0 ? gradient : variantGradient[variant];
37
36
  // `iconColor`'s gold default fails AA as body text against this gradient (measured ~1.4-3.3
38
37
  // across brands) — the label/subtitle share this computed ink instead.
39
- const ink = onGradient(resolved.from, resolved.to, c.white, c.black);
38
+ const resolved = resolveGradient(gradient !== null && gradient !== void 0 ? gradient : variantGradient[variant], c.white, c.black);
39
+ const ink = resolved.ink;
40
40
  // The gold only clears 1.4.11's 3:1 on a DARK gradient. zinc dark inverts `primary` to a
41
41
  // near-white fill, where gold-on-near-white measures ~1.3:1 and the icon vanishes, so fall
42
42
  // back to the label's ink whenever the gold misses either stop.
@@ -1,7 +1,8 @@
1
+ import { SCROLLBAR_WIDTH } from "../Theme/tokens/builders/scrollbar.js";
1
2
  export const HEADER_HEIGHT = "4.3rem";
2
3
  export const FlexCss = {
3
4
  "&::-webkit-scrollbar": {
4
- width: "0.188rem",
5
+ width: SCROLLBAR_WIDTH,
5
6
  },
6
7
  "&::-webkit-scrollbar-track": {
7
8
  background: "transparent",
@@ -16,7 +17,7 @@ export const FlexCss = {
16
17
  };
17
18
  export const cssForScrollBar = (theme) => ({
18
19
  "&::-webkit-scrollbar": {
19
- width: "0.125rem",
20
+ width: SCROLLBAR_WIDTH,
20
21
  },
21
22
  "&::-webkit-scrollbar-track": {
22
23
  background: theme.colors.sidebar.background[500],
@@ -28,6 +28,9 @@ const baseStyle = definePartsStyle(({ theme }) => {
28
28
  [$bg.variable]: colors.backgroundColor.light,
29
29
  bg: $bg.reference,
30
30
  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],
31
34
  },
32
35
  // Own CSS var (`--menu-item-bg`), NOT the list's `--menu-bg` — Chakra's stock item
33
36
  // baseStyle rewrites `--menu-bg` itself on hover/focus, so reusing that same var name