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

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 +4 -1
  109. package/dist/index.d.ts +7 -1
  110. package/dist/index.js +13 -3
  111. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("@chakra-ui/react");
5
+ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
6
+ const scrollbar_1 = require("../../Theme/tokens/builders/scrollbar");
7
+ const ScrollbarBox = ({ children, height, maxHeight, overflowX, overflowY = "auto", variant = "default", scrollContainerRef, }) => {
8
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
9
+ return ((0, jsx_runtime_1.jsx)(react_1.Box, { ref: scrollContainerRef, height: height, maxHeight: maxHeight, position: "relative", sx: { overflowX, overflowY, ...(0, scrollbar_1.scrollbarStyles)(colors, variant) }, children: children }));
10
+ };
11
+ exports.default = ScrollbarBox;
@@ -487,7 +487,7 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
487
487
  var _a, _b, _c, _d, _e;
488
488
  const insideLabel = (_a = insideSelect.value) === null || _a === void 0 ? void 0 : _a.label;
489
489
  const insidePlaceholder = (_b = insideSelect.placeholder) !== null && _b !== void 0 ? _b : "Select";
490
- return ((0, jsx_runtime_1.jsxs)(react_2.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
490
+ return ((0, jsx_runtime_1.jsxs)(react_2.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
491
491
  ? theme.colors.primary.opacity[8]
492
492
  : theme.colors.background[400], borderLeftRadius: "md", borderRightRadius: 0, transition: "background 0.15s ease, box-shadow 0.15s ease", boxShadow: customSelectOpen
493
493
  ? `inset 0 0 0 0.063rem ${theme.colors.primary[500]}`
@@ -544,10 +544,10 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
544
544
  setCustomSelectOpen(false);
545
545
  return !prev;
546
546
  });
547
- }, "aria-label": "toggle-dropdown", display: "flex", alignItems: "center", children: isOpen ? ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: s.chevronSize })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: s.chevronSize })) }))] })] }) }), isOpen && ((0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsxs)(react_2.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 && ((0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsx)(Checkbox_1.default, { isChecked: allFilteredSelected, sx: { pointerEvents: "none" }, size: s.checkboxSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), (0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: "0.063rem solid", borderColor: theme.colors.boxborder[200], children: isOptionLoading && filteredOptions.length === 0 ? ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: s.spinnerSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? ((0, jsx_runtime_1.jsx)(react_2.Text, { p: 3, fontSize: s.dropdownTextFontSize, color: theme.colors.textMuted, children: "No results found" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [filteredOptions.map((option, index) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { id: getOptionId(index), role: "option", "aria-selected": isSelected(option.id), py: s.optionRowPy, px: 3, minH: s.optionRowMinH, cursor: "pointer", bg: index === activeIndex
547
+ }, "aria-label": "toggle-dropdown", display: "flex", alignItems: "center", children: isOpen ? ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: s.chevronSize })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: s.chevronSize })) }))] })] }) }), isOpen && ((0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsxs)(react_2.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 && ((0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsx)(Checkbox_1.default, { isChecked: allFilteredSelected, sx: { pointerEvents: "none" }, size: s.checkboxSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), (0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: "0.063rem solid", borderColor: theme.colors.boxborder[200], children: isOptionLoading && filteredOptions.length === 0 ? ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: s.spinnerSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? ((0, jsx_runtime_1.jsx)(react_2.Text, { p: 3, fontSize: s.dropdownTextFontSize, color: theme.colors.textMuted, children: "No results found" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [filteredOptions.map((option, index) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { id: getOptionId(index), role: "option", "aria-selected": isSelected(option.id), py: s.optionRowPy, px: 3, minH: s.optionRowMinH, cursor: "pointer", bg: index === activeIndex
548
548
  ? theme.colors.primary.opacity[8]
549
549
  : isSelected(option.id)
550
550
  ? theme.colors.gray[100]
551
- : "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 && ((0, jsx_runtime_1.jsx)(Checkbox_1.default, { isChecked: isSelected(option.id), sx: { pointerEvents: "none" }, size: s.checkboxSize })), option.view ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: option.view })) : ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: option.label }))] }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", justifyContent: "center", gap: 2, minH: s.optionRowMinH, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: s.spinnerSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && ((0, jsx_runtime_1.jsxs)(react_2.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 || (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: s.addNewIconSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: addNew.text || "Add New" })] }))] }) })), helperText && !error && (0, jsx_runtime_1.jsx)(HelperText_1.default, { helperText: helperText }), error && (0, jsx_runtime_1.jsx)(ErrorMessage_1.default, { errorMessage: errorMessage })] }));
551
+ : "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 && ((0, jsx_runtime_1.jsx)(Checkbox_1.default, { isChecked: isSelected(option.id), sx: { pointerEvents: "none" }, size: s.checkboxSize })), option.view ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: option.view })) : ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: option.label }))] }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", justifyContent: "center", gap: 2, minH: s.optionRowMinH, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: s.spinnerSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && ((0, jsx_runtime_1.jsxs)(react_2.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 || (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: s.addNewIconSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: addNew.text || "Add New" })] }))] }) })), helperText && !error && (0, jsx_runtime_1.jsx)(HelperText_1.default, { helperText: helperText }), error && (0, jsx_runtime_1.jsx)(ErrorMessage_1.default, { errorMessage: errorMessage })] }));
552
552
  };
553
553
  exports.default = SearchSelect;
@@ -63,7 +63,7 @@ exports.Select = {
63
63
  // [800], not [500]/[700]: WCAG 1.4.11 needs >=3.0 for a control boundary, measured
64
64
  // against the parent surface — up to `muted` (lightest). [700] fails there (2.41-2.72);
65
65
  // [800] clears all named surfaces with margin (3.44-3.90).
66
- const borderColor = theme.colors.boxborder[800];
66
+ const borderColor = theme.colors.boxborder[500];
67
67
  const shadowPrimary = theme.colors.boxShadow.primary;
68
68
  const shadowError = theme.colors.boxShadow.error;
69
69
  const primary = theme.colors.primary[500];
@@ -36,7 +36,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
36
36
  const errorBorder = `2px solid ${theme.colors.semanticText.error}`;
37
37
  // [800], not [500]: WCAG 1.4.11 needs >=3.0 for a control boundary against any named surface
38
38
  // up to `muted` (lightest); [500] fails there, [800] clears all with margin.
39
- const defaultBorderThin = `1px solid ${theme.colors.boxborder[800]}`;
39
+ const defaultBorderThin = `1px solid ${theme.colors.boxborder[500]}`;
40
40
  const [selectedOptions, setSelectedOptions] = (0, react_1.useState)(initialSelectedOption ? [initialSelectedOption] : []);
41
41
  const [inputValue, setInputValue] = (0, react_1.useState)(searchQuery);
42
42
  const [isOpen, setIsOpen] = (0, react_1.useState)(false);
@@ -252,7 +252,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
252
252
  return;
253
253
  }
254
254
  setIsOpen(true);
255
- }, 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: {
255
+ }, 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: {
256
256
  borderColor: error
257
257
  ? theme.colors.semanticText.error
258
258
  : theme.colors.primary[500],
@@ -270,7 +270,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
270
270
  fontSize: 15,
271
271
  letterSpacing: 0.7,
272
272
  border: error ? errorBorder : defaultBorderThin,
273
- } }), rightIcon && ((0, jsx_runtime_1.jsx)(react_2.InputRightElement, { pointerEvents: "none", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && ((0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsx)(react_2.Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: (0, jsx_runtime_1.jsx)(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs }) }), (0, jsx_runtime_1.jsx)("hr", {}), isBottomIcon && ((0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsx)(react_2.Box, { children: BottomIcon ? BottomIcon : (0, jsx_runtime_1.jsx)(lucide_react_1.PlusIcon, { size: "1rem" }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "0.875rem", color: BottomTextColor
273
+ } }), rightIcon && ((0, jsx_runtime_1.jsx)(react_2.InputRightElement, { pointerEvents: "none", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && ((0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsx)(react_2.Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: (0, jsx_runtime_1.jsx)(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs }) }), (0, jsx_runtime_1.jsx)("hr", {}), isBottomIcon && ((0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsx)(react_2.Box, { children: BottomIcon ? BottomIcon : (0, jsx_runtime_1.jsx)(lucide_react_1.PlusIcon, { size: "1rem" }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "0.875rem", color: BottomTextColor
274
274
  ? BottomTextColor
275
275
  : theme.colors.accentText, padding: "8px 8px", children: BottomText || "Add New" })] }))] })), error && (0, jsx_runtime_1.jsx)(ErrorMessage_1.default, { errorMessage: errorMessage })] }) }) }));
276
276
  }
@@ -42,6 +42,7 @@ const react_1 = __importStar(require("react"));
42
42
  const react_2 = require("@chakra-ui/react");
43
43
  const lucide_react_1 = require("lucide-react");
44
44
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
45
+ const scrollbar_1 = require("../../Theme/tokens/builders/scrollbar");
45
46
  const fieldStyles_1 = require("../Common/fieldStyles");
46
47
  const FormLabel_1 = require("../Common/FormLabel");
47
48
  const ErrorMessage_1 = __importDefault(require("../Common/ErrorMessage"));
@@ -231,15 +232,7 @@ function SelectV2(props) {
231
232
  const triggerId = `selectv2-trigger-${instanceId}`;
232
233
  const activeOption = filteredOptions[activeIndex];
233
234
  const activeDescendantId = activeOption ? optionDomId(listboxId, activeOption.id) : undefined;
234
- const listScrollStyles = (0, react_1.useMemo)(() => ({
235
- scrollbarWidth: "thin",
236
- scrollbarColor: `${theme.colors.gray[300]} transparent`,
237
- "&::-webkit-scrollbar": { width: "6px" },
238
- "&::-webkit-scrollbar-thumb": {
239
- background: theme.colors.gray[300],
240
- borderRadius: "base",
241
- },
242
- }), [theme]);
235
+ const listScrollStyles = (0, react_1.useMemo)(() => (0, scrollbar_1.scrollbarStyles)(theme.colors, "overlay"), [theme]);
243
236
  const defaultTriggerContent = () => {
244
237
  var _a;
245
238
  if (props.isMulti) {
@@ -254,7 +247,7 @@ function SelectV2(props) {
254
247
  return selectedOptions[0] ? selectedOptions[0].label : placeholder;
255
248
  };
256
249
  const triggerIcon = !props.isMulti && ((_b = selectedOptions[0]) === null || _b === void 0 ? void 0 : _b.icon) ? selectedOptions[0].icon : null;
257
- return ((0, jsx_runtime_1.jsxs)(react_2.FormControl, { isInvalid: error, isDisabled: isDisabled, style: formControlStyle, width: width, children: [label && ((0, jsx_runtime_1.jsx)(FormLabel_1.TextLabel, { label: label, id: triggerId, isRequired: isRequired })), (0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", matchWidth: true, autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverAnchor, { children: (0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsxs)(react_2.Box, { as: "span", display: "inline-flex", alignItems: "center", gap: 1.5, minW: 0, isTruncated: true, children: [triggerIcon ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", isTruncated: true, fontStyle: selectedOptions.length ? "normal" : "italic", children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] }), (0, jsx_runtime_1.jsx)(react_2.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: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16 }) })] }) }), (0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsxs)(react_2.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 && ((0, jsx_runtime_1.jsx)(react_2.Box, { p: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[100]}`, children: (0, jsx_runtime_1.jsx)(react_2.Input, { ref: filterInputRef, size: "sm", placeholder: "Type to filter...", value: filterText, onChange: (event) => {
250
+ return ((0, jsx_runtime_1.jsxs)(react_2.FormControl, { isInvalid: error, isDisabled: isDisabled, style: formControlStyle, width: width, children: [label && ((0, jsx_runtime_1.jsx)(FormLabel_1.TextLabel, { label: label, id: triggerId, isRequired: isRequired })), (0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", matchWidth: true, autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverAnchor, { children: (0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsxs)(react_2.Box, { as: "span", display: "inline-flex", alignItems: "center", gap: 1.5, minW: 0, isTruncated: true, children: [triggerIcon ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", isTruncated: true, fontStyle: selectedOptions.length ? "normal" : "italic", children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] }), (0, jsx_runtime_1.jsx)(react_2.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: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16 }) })] }) }), (0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsxs)(react_2.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 && ((0, jsx_runtime_1.jsx)(react_2.Box, { p: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: (0, jsx_runtime_1.jsx)(react_2.Input, { ref: filterInputRef, size: "sm", placeholder: "Type to filter...", value: filterText, onChange: (event) => {
258
251
  setFilterText(event.target.value);
259
252
  setActiveIndex(0);
260
253
  }, "aria-activedescendant": activeDescendantId, "aria-label": "Filter options" }) })), (0, jsx_runtime_1.jsxs)(react_2.Box, { id: listboxId, ref: listRef, role: "listbox", "aria-multiselectable": props.isMulti || undefined, maxH: maxMenuHeight, overflowY: "auto", py: 1, sx: listScrollStyles, children: [filteredOptions.length === 0 && ((0, jsx_runtime_1.jsx)(react_2.Box, { px: 3, py: 2, fontSize: "0.8125rem", color: theme.colors.textMuted, children: "No Options" })), filteredOptions.map((option, index) => {
@@ -6,16 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const react_1 = require("@chakra-ui/react");
8
8
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
9
+ const scrollbar_1 = require("../../Theme/tokens/builders/scrollbar");
9
10
  const StageItem_1 = __importDefault(require("./StageItem"));
10
11
  const StepperStage_1 = __importDefault(require("./StepperStage"));
11
- const scrollSxFor = (thumb) => ({
12
- "&::-webkit-scrollbar": { height: "4px" },
13
- "&::-webkit-scrollbar-thumb": {
14
- borderRadius: "full",
15
- backgroundColor: thumb,
16
- },
17
- "&::-webkit-scrollbar-track": { background: "transparent" },
18
- });
19
12
  // Gap between items per variant (chevron interlocks via negative margin).
20
13
  const gapFor = {
21
14
  chevron: "0",
@@ -40,7 +33,7 @@ const StageProgress = ({ stages, variant = "chevron", value, onChange, size = "m
40
33
  const total = stages.length;
41
34
  return ((0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: variant === "stepper" ? "flex-start" : "stretch", gap: gapFor[variant], overflowX: "hidden", p: "0.1rem", sx: {
42
35
  "&:hover": { overflowX: "auto" },
43
- ...scrollSxFor(theme.colors.gray[300]),
36
+ ...(0, scrollbar_1.scrollbarStyles)(theme.colors, "overlay"),
44
37
  }, children: stages.map((stage, index) => {
45
38
  const state = stateFor(index);
46
39
  if (variant === "stepper") {
@@ -14,6 +14,7 @@ const Pagination_1 = __importDefault(require("./components/Pagination"));
14
14
  const TableHeader_1 = __importDefault(require("./components/TableHeader"));
15
15
  const TableBody_1 = __importDefault(require("./components/TableBody"));
16
16
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
17
+ const scrollbar_1 = require("../../Theme/tokens/builders/scrollbar");
17
18
  const useTable_1 = __importDefault(require("./hooks/useTable"));
18
19
  const table_1 = require("../../Utils/table");
19
20
  const usePreferences_1 = require("../../Hooks/usePreferences");
@@ -392,29 +393,15 @@ function Table({ data, columns, onSelection, isLoading, isCheckbox = false, head
392
393
  }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { size: 16 }) }) })] })), headerActions && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Divider_1.default, {}), (0, jsx_runtime_1.jsx)(HeaderActions_1.default, { actions: headerActions, selections: selection })] })), (0, jsx_runtime_1.jsx)(ActiveFilters_1.default, { columns: columnsList, columnsSearch: columnsSearch, setColumnsSearch: setColumnsSearch }), (0, jsx_runtime_1.jsxs)(react_2.Box, { ml: "auto", display: "flex", alignItems: "center", gap: 2, children: [groupLoadMoreActive && loadMorePosition === "top" && (groupLoadMoreCaption || canGroupLoadMore) && ((0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", gap: 2, flex: "0 0 auto", children: [groupLoadMoreCaption && ((0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "0.75rem", color: theme.colors.text[500], whiteSpace: "nowrap", children: groupLoadMoreCaption })), canGroupLoadMore && ((0, jsx_runtime_1.jsx)(Button_1.default, { size: "xs", variant: "outline", colorScheme: "gray", isLoading: isLoadingMore, loadingText: loadMoreText, onClick: handleGroupLoadMore, label: loadMoreText }))] })), (isPagination || isServerPagination) && !isGrouped && !canInfinite && !isCompactHeader && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Pagination_1.default, { 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 && ((0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: isPaginationPopoverOpen, onClose: () => setIsPaginationPopoverOpen(false), placement: "bottom-end", children: [(0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Pagination", size: "sm", variant: "ghost", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.EllipsisVertical, { size: 18 }), color: theme.colors.text[500], _hover: {
393
394
  color: theme.colors.accentText,
394
395
  }, onClick: () => setIsPaginationPopoverOpen((open) => !open) }) }), (0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { maxW: "22rem", p: 2, zIndex: 1600, bg: theme.colors.background[50], boxShadow: "lg", children: (0, jsx_runtime_1.jsx)(react_2.PopoverBody, { p: 0, children: (0, jsx_runtime_1.jsx)(Pagination_1.default, { columns: columns, currentPage: currentPage, setCurrentPage: setCurrentPage, rowsPerPage: rowsPerPage, pages: pages, paginationText: tablePaginationText, handlePageSizeChange: handlePageSizeChange, dataLength: tableData.length, isServerPagination: isServerPagination, paginationSelectOptions: paginationSelectOptions, isVisiblity: true }) }) }) })] }))] })] }), (0, jsx_runtime_1.jsxs)(react_2.TableContainer, { ref: tableContainerRef, position: "relative", h: isTableLoading ? tableMaxH : undefined, maxH: !isTableLoading ? tableMaxH : undefined, pb: isTableLoading ? 0 : compactScrollbarPadding, overflowY: isCompactRows ? "hidden" : "auto", overflowX: "auto", sx: {
396
+ ...(0, scrollbar_1.scrollbarStyles)(theme.colors),
397
+ // Compact rows hide the horizontal bar until hover to keep the row height.
395
398
  '&::-webkit-scrollbar': {
396
- width: '6px',
397
- height: isCompactRows ? '0px' : '6px',
398
- },
399
- '&:hover::-webkit-scrollbar': {
400
- height: '6px',
401
- },
402
- '&::-webkit-scrollbar-track': {
403
- background: theme.colors.gray[100],
404
- borderRadius: 'base',
405
- },
406
- '&::-webkit-scrollbar-thumb': {
407
- background: theme.colors.gray[400],
408
- borderRadius: 'base',
409
- },
410
- '&::-webkit-scrollbar-thumb:hover': {
411
- background: theme.colors.gray[500],
399
+ width: scrollbar_1.SCROLLBAR_WIDTH,
400
+ height: isCompactRows ? '0px' : scrollbar_1.SCROLLBAR_WIDTH,
412
401
  },
402
+ '&:hover::-webkit-scrollbar': { height: scrollbar_1.SCROLLBAR_WIDTH },
413
403
  scrollbarWidth: isCompactRows ? 'none' : 'thin',
414
- '&:hover': {
415
- scrollbarWidth: 'thin',
416
- },
417
- scrollbarColor: `${theme.colors.gray[400]} ${theme.colors.gray[100]}`,
404
+ '&:hover': { scrollbarWidth: 'thin' },
418
405
  }, children: [(0, jsx_runtime_1.jsxs)(react_3.Table, { variant: "simple", size: "sm", minW: "100%", role: "grid", "aria-rowcount": isGrouped ? undefined : _filteredData.length + 1, className: "table_wrapper", sx: {
419
406
  width: "100%",
420
407
  // `separate` (not `collapse`) so sticky header cells paint an opaque
@@ -323,7 +323,7 @@ const TableBody = ({ data, isCheckbox, columns, startRow, columnWidths, freezedB
323
323
  return { heights, offsets, totalH: acc };
324
324
  }, [groupItems, groupVirtualize, rowHeight, GROUP_HEADER_H]);
325
325
  if (isLoading && data.length === 0) {
326
- return ((0, jsx_runtime_1.jsx)(TableLoading_1.TableBodyLoading, { noOfColumns: totalVisibleColumns, borderColor: theme.colors.boxborder[300], rowsCount: typeof loadingSkeletonRows === "number" ? loadingSkeletonRows : 4 }));
326
+ return ((0, jsx_runtime_1.jsx)(TableLoading_1.TableBodyLoading, { noOfColumns: totalVisibleColumns, borderColor: theme.colors.boxborder[200], rowsCount: typeof loadingSkeletonRows === "number" ? loadingSkeletonRows : 4 }));
327
327
  }
328
328
  if (!isLoading && data.length === 0) {
329
329
  const isStructured = emptyState && typeof emptyState === "object" && !react_2.default.isValidElement(emptyState);
@@ -82,7 +82,7 @@ const ColumnHeader = (0, react_2.memo)(({ header, index, columnWidths, isCheckbo
82
82
  document.addEventListener("mouseup", onMouseUp);
83
83
  };
84
84
  const isSortActive = !!(isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) && isSorting.direction !== "none";
85
- return ((0, jsx_runtime_1.jsx)(react_1.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: (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", color: (0, accentText_1.accentTextOnCanvas)(theme.colors.secondary, theme.colors.table.hover[200]), lineHeight: "1.25rem", justifyContent: "space-between", alignItems: "center", position: "relative", children: [(0, jsx_runtime_1.jsx)(react_1.Box, { textOverflow: "ellipsis", whiteSpace: "nowrap", display: "inline-block", overflow: "hidden", children: header.label }), (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "inline-flex", alignItems: "center", children: [header.isSort && ((0, jsx_runtime_1.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: () => {
85
+ return ((0, jsx_runtime_1.jsx)(react_1.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: (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", color: (0, accentText_1.accentTextOnCanvas)(theme.colors.secondary, theme.colors.table.hover[200]), lineHeight: "1.25rem", justifyContent: "space-between", alignItems: "center", position: "relative", children: [(0, jsx_runtime_1.jsx)(react_1.Box, { textOverflow: "ellipsis", whiteSpace: "nowrap", display: "inline-block", overflow: "hidden", children: header.label }), (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "inline-flex", alignItems: "center", children: [header.isSort && ((0, jsx_runtime_1.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: () => {
86
86
  let direction = "asc";
87
87
  if ((isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) === "asc") {
88
88
  direction = "desc";
@@ -42,6 +42,7 @@ const react_2 = require("@chakra-ui/react");
42
42
  const lucide_react_1 = require("lucide-react");
43
43
  const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
44
44
  const accentText_1 = require("../../../Theme/tokens/builders/accentText");
45
+ const scrollbar_1 = require("../../../Theme/tokens/builders/scrollbar");
45
46
  const Divider_1 = __importDefault(require("../../Divider/Divider"));
46
47
  const ActiveFilters = react_1.default.memo(({ columns, columnsSearch, setColumnsSearch, }) => {
47
48
  const theme = (0, useCustomTheme_1.useCustomTheme)();
@@ -72,24 +73,7 @@ const ActiveFilters = react_1.default.memo(({ columns, columnsSearch, setColumns
72
73
  if (activeFilters.length === 0) {
73
74
  return null;
74
75
  }
75
- return ((0, jsx_runtime_1.jsx)(react_2.Box, { px: 2, py: 1, bg: theme.colors.background[100], overflowX: "auto", sx: {
76
- '&::-webkit-scrollbar': {
77
- height: '6px',
78
- },
79
- '&::-webkit-scrollbar-track': {
80
- background: theme.colors.gray[100],
81
- borderRadius: 'base',
82
- },
83
- '&::-webkit-scrollbar-thumb': {
84
- background: theme.colors.gray[400],
85
- borderRadius: 'base',
86
- },
87
- '&::-webkit-scrollbar-thumb:hover': {
88
- background: theme.colors.gray[500],
89
- },
90
- scrollbarWidth: 'thin',
91
- scrollbarColor: `${theme.colors.gray[400]} ${theme.colors.gray[100]}`,
92
- }, children: (0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", gap: 2, flexWrap: "nowrap", minW: "max-content", children: [activeFilters.length > 0 && (0, jsx_runtime_1.jsx)(Divider_1.default, {}), activeFilters.map((filter) => ((0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "sm", color: (0, accentText_1.accentTextOnCanvas)(theme.colors.blue, theme.colors.blue[50]), whiteSpace: "nowrap", children: [(0, jsx_runtime_1.jsxs)(react_2.Text, { as: "span", fontWeight: 600, children: [filter.label, ":"] }), " ", filter.value] }), (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": `Remove filter for ${filter.label}`, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 14 }), size: "xs", variant: "ghost", onClick: () => handleRemoveFilter(filter.columnId), _hover: {
76
+ return ((0, jsx_runtime_1.jsx)(react_2.Box, { px: 2, py: 1, bg: theme.colors.background[100], overflowX: "auto", sx: (0, scrollbar_1.scrollbarStyles)(theme.colors), children: (0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", gap: 2, flexWrap: "nowrap", minW: "max-content", children: [activeFilters.length > 0 && (0, jsx_runtime_1.jsx)(Divider_1.default, {}), activeFilters.map((filter) => ((0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "sm", color: (0, accentText_1.accentTextOnCanvas)(theme.colors.blue, theme.colors.blue[50]), whiteSpace: "nowrap", children: [(0, jsx_runtime_1.jsxs)(react_2.Text, { as: "span", fontWeight: 600, children: [filter.label, ":"] }), " ", filter.value] }), (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": `Remove filter for ${filter.label}`, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 14 }), size: "xs", variant: "ghost", onClick: () => handleRemoveFilter(filter.columnId), _hover: {
93
77
  bg: theme.colors.blue[100],
94
78
  }, minW: "auto", h: "auto", p: 0.5, flexShrink: 0 })] }, filter.columnId))), activeFilters.length > 1 && ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "p", className: "clear-all-text", "aria-label": "Clear All", fontSize: "sm", color: (0, accentText_1.accentTextOnCanvas)(theme.colors.blue, theme.colors.background[100]), cursor: "pointer", fontWeight: 500, onClick: handleClearAll, _hover: {
95
79
  textDecoration: "underline",
@@ -8,6 +8,7 @@ const react_1 = require("react");
8
8
  const react_2 = require("@chakra-ui/react");
9
9
  const Checkbox_1 = __importDefault(require("../../Checkbox/Checkbox"));
10
10
  const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
11
+ const scrollbar_1 = require("../../../Theme/tokens/builders/scrollbar");
11
12
  const lucide_react_1 = require("lucide-react");
12
13
  const ManageColumns = ({ columns, items, setItems, childInputMethodsRef, }) => {
13
14
  const theme = (0, useCustomTheme_1.useCustomTheme)();
@@ -74,22 +75,7 @@ const ManageColumns = ({ columns, items, setItems, childInputMethodsRef, }) => {
74
75
  setError(null);
75
76
  }
76
77
  };
77
- return ((0, jsx_runtime_1.jsxs)(react_2.Box, { mt: 2, children: [error && ((0, jsx_runtime_1.jsx)(react_2.Box, { mb: 2, px: 3, py: 2, bg: theme.colors.red[50], borderRadius: "md", border: "1px solid", borderColor: theme.colors.red[200], children: (0, jsx_runtime_1.jsx)(react_2.Text, { color: theme.colors.red[600], fontSize: "xs", fontWeight: 500, children: error }) })), (0, jsx_runtime_1.jsx)(react_2.Input, { placeholder: "Search columns...", mb: 2, value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), size: "sm", borderRadius: "md" }), !searchTerm.length && ((0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", mb: 1, bg: theme.colors.gray[100], px: 2, py: 1, borderRadius: "md", children: (0, jsx_runtime_1.jsx)(Checkbox_1.default, { label: "Show all columns", isChecked: allChecked, isIndeterminate: someChecked, onChange: handleSelectAll }) })), (0, jsx_runtime_1.jsx)(react_2.List, { spacing: 0, maxH: "300px", overflowY: "auto", sx: {
78
- "&::-webkit-scrollbar": { width: "3px", height: "3px" },
79
- "&::-webkit-scrollbar-track": {
80
- background: theme.colors.gray[100],
81
- borderRadius: "sm",
82
- },
83
- "&::-webkit-scrollbar-thumb": {
84
- background: theme.colors.gray[400],
85
- borderRadius: "sm",
86
- },
87
- "&::-webkit-scrollbar-thumb:hover": {
88
- background: theme.colors.gray[500],
89
- },
90
- scrollbarWidth: "thin",
91
- scrollbarColor: `${theme.colors.gray[400]} ${theme.colors.gray[100]}`,
92
- }, children: filteredItems.length > 0 ? (filteredItems.map((item, index) => {
78
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { mt: 2, children: [error && ((0, jsx_runtime_1.jsx)(react_2.Box, { mb: 2, px: 3, py: 2, bg: theme.colors.red[50], borderRadius: "md", border: "1px solid", borderColor: theme.colors.red[200], children: (0, jsx_runtime_1.jsx)(react_2.Text, { color: theme.colors.red[600], fontSize: "xs", fontWeight: 500, children: error }) })), (0, jsx_runtime_1.jsx)(react_2.Input, { placeholder: "Search columns...", mb: 2, value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), size: "sm", borderRadius: "md" }), !searchTerm.length && ((0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", mb: 1, bg: theme.colors.gray[100], px: 2, py: 1, borderRadius: "md", children: (0, jsx_runtime_1.jsx)(Checkbox_1.default, { label: "Show all columns", isChecked: allChecked, isIndeterminate: someChecked, onChange: handleSelectAll }) })), (0, jsx_runtime_1.jsx)(react_2.List, { spacing: 0, maxH: "300px", overflowY: "auto", sx: (0, scrollbar_1.scrollbarStyles)(theme.colors), children: filteredItems.length > 0 ? (filteredItems.map((item, index) => {
93
79
  const isDraggingThisItem = draggedItemIndex === index;
94
80
  const isDropZone = draggedItemIndex !== null && draggedItemIndex !== index;
95
81
  const realIndex = items.findIndex((i) => i.id === item.id);
@@ -10,6 +10,7 @@ const framer_motion_1 = require("framer-motion");
10
10
  const ManageColumns_1 = __importDefault(require("./ManageColumns"));
11
11
  const Button_1 = __importDefault(require("../../Button/Button"));
12
12
  const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
13
+ const scrollbar_1 = require("../../../Theme/tokens/builders/scrollbar");
13
14
  const lucide_react_1 = require("lucide-react");
14
15
  const ToolTip_1 = __importDefault(require("../../ToolTip/ToolTip"));
15
16
  const MotionModalContent = (0, framer_motion_1.motion)(react_1.ModalContent);
@@ -52,16 +53,9 @@ const TableSettings = ({ columns, onSave, density = "normal", onDensityChange, g
52
53
  return ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [(0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: "Table Settings", placement: "top", children: (0, jsx_runtime_1.jsx)(react_1.IconButton, { "aria-label": "Table settings", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.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: {
53
54
  transform: "scale(1.1)",
54
55
  color: theme.colors.accentText
55
- } }) }), (0, jsx_runtime_1.jsxs)(react_1.Modal, { isOpen: settingsOpen, onClose: () => setSettingsOpen(false), size: "md", children: [(0, jsx_runtime_1.jsx)(react_1.ModalOverlay, {}), (0, jsx_runtime_1.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: [(0, jsx_runtime_1.jsx)(react_1.ModalCloseButton, { top: 3, right: 3, zIndex: 2 }), (0, jsx_runtime_1.jsxs)(react_1.Tabs, { index: selectedIndex, onChange: setSelectedIndex, variant: "unstyled", display: "flex", flexDirection: "column", flex: "1", minH: 0, children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { pt: 4, px: 4, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontWeight: 600, fontSize: "md", mb: 3, children: "Table Settings" }), (0, jsx_runtime_1.jsxs)(react_1.TabList, { gap: 0, borderBottom: "1px solid", borderColor: theme.colors.border[200], children: [(0, jsx_runtime_1.jsx)(react_1.Tab, { ...tabStyle, children: "Density" }), (0, jsx_runtime_1.jsx)(react_1.Tab, { ...tabStyle, children: "Manage Columns" }), (0, jsx_runtime_1.jsx)(react_1.Tab, { ...tabStyle, children: "Group" })] })] }), (0, jsx_runtime_1.jsx)(react_1.ModalBody, { px: 4, py: 3, flex: "1", overflowY: "auto", sx: {
56
- "&::-webkit-scrollbar": { width: "3px", height: "3px" },
57
- "&::-webkit-scrollbar-track": { background: theme.colors.gray[100], borderRadius: "sm" },
58
- "&::-webkit-scrollbar-thumb": { background: theme.colors.gray[400], borderRadius: "sm" },
59
- "&::-webkit-scrollbar-thumb:hover": { background: theme.colors.gray[500] },
60
- scrollbarWidth: "thin",
61
- scrollbarColor: `${theme.colors.gray[400]} ${theme.colors.gray[100]}`,
62
- }, children: (0, jsx_runtime_1.jsxs)(react_1.TabPanels, { children: [(0, jsx_runtime_1.jsx)(react_1.TabPanel, { px: 0, py: 1, children: (0, jsx_runtime_1.jsx)(react_1.Flex, { direction: "column", gap: 2, children: DENSITY_OPTIONS.map((opt) => {
56
+ } }) }), (0, jsx_runtime_1.jsxs)(react_1.Modal, { isOpen: settingsOpen, onClose: () => setSettingsOpen(false), size: "md", children: [(0, jsx_runtime_1.jsx)(react_1.ModalOverlay, {}), (0, jsx_runtime_1.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: [(0, jsx_runtime_1.jsx)(react_1.ModalCloseButton, { top: 3, right: 3, zIndex: 2 }), (0, jsx_runtime_1.jsxs)(react_1.Tabs, { index: selectedIndex, onChange: setSelectedIndex, variant: "unstyled", display: "flex", flexDirection: "column", flex: "1", minH: 0, children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { pt: 4, px: 4, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontWeight: 600, fontSize: "md", mb: 3, children: "Table Settings" }), (0, jsx_runtime_1.jsxs)(react_1.TabList, { gap: 0, borderBottom: "1px solid", borderColor: theme.colors.border[200], children: [(0, jsx_runtime_1.jsx)(react_1.Tab, { ...tabStyle, children: "Density" }), (0, jsx_runtime_1.jsx)(react_1.Tab, { ...tabStyle, children: "Manage Columns" }), (0, jsx_runtime_1.jsx)(react_1.Tab, { ...tabStyle, children: "Group" })] })] }), (0, jsx_runtime_1.jsx)(react_1.ModalBody, { px: 4, py: 3, flex: "1", overflowY: "auto", sx: (0, scrollbar_1.scrollbarStyles)(theme.colors), children: (0, jsx_runtime_1.jsxs)(react_1.TabPanels, { children: [(0, jsx_runtime_1.jsx)(react_1.TabPanel, { px: 0, py: 1, children: (0, jsx_runtime_1.jsx)(react_1.Flex, { direction: "column", gap: 2, children: DENSITY_OPTIONS.map((opt) => {
63
57
  const selected = density === opt.value;
64
- return ((0, jsx_runtime_1.jsxs)(react_1.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: [(0, jsx_runtime_1.jsx)(react_1.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 && (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: 11, color: theme.colors.accentText, strokeWidth: 3 }) }), (0, jsx_runtime_1.jsxs)(react_1.Box, { textAlign: "left", children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "13px", fontWeight: 600, color: theme.colors.text[700], children: opt.label }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "11px", color: theme.colors.textMuted, children: opt.desc })] })] }, opt.value));
58
+ return ((0, jsx_runtime_1.jsxs)(react_1.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: [(0, jsx_runtime_1.jsx)(react_1.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 && (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: 11, color: theme.colors.accentText, strokeWidth: 3 }) }), (0, jsx_runtime_1.jsxs)(react_1.Box, { textAlign: "left", children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "13px", fontWeight: 600, color: theme.colors.text[700], children: opt.label }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "11px", color: theme.colors.textMuted, children: opt.desc })] })] }, opt.value));
65
59
  }) }) }), (0, jsx_runtime_1.jsx)(react_1.TabPanel, { px: 0, py: 0, children: (0, jsx_runtime_1.jsx)(react_1.Box, { sx: {
66
60
  "& [role='listitem'], & > div > div": {
67
61
  py: "4px !important",
@@ -79,7 +73,7 @@ const TableSettings = ({ columns, onSave, density = "normal", onDensityChange, g
79
73
  .map((opt) => {
80
74
  var _a;
81
75
  const selected = selectedGroup === opt.id;
82
- return ((0, jsx_runtime_1.jsxs)(react_1.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: [(0, jsx_runtime_1.jsx)(react_1.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 && (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: 11, color: theme.colors.accentText, strokeWidth: 3 }) }), (0, jsx_runtime_1.jsx)(react_1.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__")));
76
+ return ((0, jsx_runtime_1.jsxs)(react_1.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: [(0, jsx_runtime_1.jsx)(react_1.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 && (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: 11, color: theme.colors.accentText, strokeWidth: 3 }) }), (0, jsx_runtime_1.jsx)(react_1.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__")));
83
77
  }) })] })] }) })] }), (0, jsx_runtime_1.jsxs)(react_1.ModalFooter, { gap: "0.5rem", borderTop: "1px solid", borderColor: theme.colors.border[200], pt: 3, pb: 3, px: 4, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: "Close", size: "sm", onClick: () => setSettingsOpen(false), variant: "outline", colorScheme: "red" }), (0, jsx_runtime_1.jsx)(Button_1.default, { label: "Save", size: "sm", onClick: handleSave })] })] })] })] }));
84
78
  };
85
79
  exports.default = TableSettings;
@@ -168,7 +168,7 @@ const EventCard = react_2.default.memo(function EventCard({ event, index, accent
168
168
  const scale = getEventScale(colors, event.title);
169
169
  const changes = (0, react_3.useMemo)(() => parseChanges(event.changes), [event.changes]);
170
170
  const clickable = typeof onEventClick === "function";
171
- return ((0, jsx_runtime_1.jsxs)(react_1.Box, { _hover: { ".timeline-add-note": { opacity: 1 } }, _focusWithin: { ".timeline-add-note": { opacity: 1 } }, children: [(0, jsx_runtime_1.jsxs)(react_1.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: {
171
+ return ((0, jsx_runtime_1.jsxs)(react_1.Box, { _hover: { ".timeline-add-note": { opacity: 1 } }, _focusWithin: { ".timeline-add-note": { opacity: 1 } }, children: [(0, jsx_runtime_1.jsxs)(react_1.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: {
172
172
  borderColor: scale[300],
173
173
  boxShadow: (_a = theme.shadows) === null || _a === void 0 ? void 0 : _a.md,
174
174
  transform: clickable ? "translateY(-1px)" : undefined,
@@ -229,7 +229,7 @@ const Timeline = ({ timelineEvents, onEventClick, onAddNote, onEditNote, onDelet
229
229
  // -------------------------------------------------------------------------
230
230
  return ((0, jsx_runtime_1.jsxs)(react_1.Box, { position: "relative", maxW: "60rem", mx: "auto", px: 4, py: 2, children: [(0, jsx_runtime_1.jsx)(react_1.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) => {
231
231
  var _a;
232
- return ((0, jsx_runtime_1.jsxs)(react_1.Box, { mb: 2, children: [(0, jsx_runtime_1.jsx)(react_1.Flex, { justify: "center", mb: 5, mt: 3, position: "relative", zIndex: 2, children: (0, jsx_runtime_1.jsx)(react_1.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) => {
232
+ return ((0, jsx_runtime_1.jsxs)(react_1.Box, { mb: 2, children: [(0, jsx_runtime_1.jsx)(react_1.Flex, { justify: "center", mb: 5, mt: 3, position: "relative", zIndex: 2, children: (0, jsx_runtime_1.jsx)(react_1.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) => {
233
233
  var _a;
234
234
  const isLeft = index % 2 === 0;
235
235
  const scale = getEventScale(colors, event.title);
@@ -50,7 +50,7 @@ function ToastCard({ onClose, title, description, actions, isClosable, duration,
50
50
  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",
51
51
  // Surface token, not `colors.white`: `white` is a foreground token and stays
52
52
  // white in dark mode. `background[50]` is #ffffff in light, near-black in dark.
53
- 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: {
53
+ 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: {
54
54
  transition: "box-shadow 0.18s ease",
55
55
  _hover: { boxShadow: "xl" },
56
56
  }, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { p: 3.5, gap: 3, align: actions ? "flex-start" : "center", children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "2rem", minW: "2rem", borderRadius: "full", bg: tone.bg, color: tone.fg, sx: {
@@ -4,7 +4,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_1 = require("@chakra-ui/react");
5
5
  const lucide_react_1 = require("lucide-react");
6
6
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
7
- const accentText_1 = require("../../Theme/tokens/builders/accentText");
7
+ const gradientInk_1 = require("../../Theme/tokens/builders/gradientInk");
8
8
  const color_1 = require("../../Theme/tokens/builders/color");
9
9
  const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
10
10
  /** The brand's gold sparkle accent, kept only where it clears 3:1 on the button's own fill. */
@@ -35,10 +35,10 @@ const UpgradeButton = ({ label, mobileLabel, subtitle, icon = lucide_react_1.Spa
35
35
  danger: { from: c.semantic.error[400], to: c.semantic.error[600] },
36
36
  info: { from: c.semantic.info[400], to: c.semantic.info[600] },
37
37
  };
38
- const resolved = gradient !== null && gradient !== void 0 ? gradient : variantGradient[variant];
39
38
  // `iconColor`'s gold default fails AA as body text against this gradient (measured ~1.4-3.3
40
39
  // across brands) — the label/subtitle share this computed ink instead.
41
- const ink = (0, accentText_1.onGradient)(resolved.from, resolved.to, c.white, c.black);
40
+ const resolved = (0, gradientInk_1.resolveGradient)(gradient !== null && gradient !== void 0 ? gradient : variantGradient[variant], c.white, c.black);
41
+ const ink = resolved.ink;
42
42
  // The gold only clears 1.4.11's 3:1 on a DARK gradient. zinc dark inverts `primary` to a
43
43
  // near-white fill, where gold-on-near-white measures ~1.3:1 and the icon vanishes, so fall
44
44
  // back to the label's ink whenever the gold misses either stop.
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cssForScrollBar = exports.FlexCss = exports.HEADER_HEIGHT = void 0;
4
+ const scrollbar_1 = require("../Theme/tokens/builders/scrollbar");
4
5
  exports.HEADER_HEIGHT = "4.3rem";
5
6
  exports.FlexCss = {
6
7
  "&::-webkit-scrollbar": {
7
- width: "0.188rem",
8
+ width: scrollbar_1.SCROLLBAR_WIDTH,
8
9
  },
9
10
  "&::-webkit-scrollbar-track": {
10
11
  background: "transparent",
@@ -19,7 +20,7 @@ exports.FlexCss = {
19
20
  };
20
21
  const cssForScrollBar = (theme) => ({
21
22
  "&::-webkit-scrollbar": {
22
- width: "0.125rem",
23
+ width: scrollbar_1.SCROLLBAR_WIDTH,
23
24
  },
24
25
  "&::-webkit-scrollbar-track": {
25
26
  background: theme.colors.sidebar.background[500],
@@ -28,6 +28,7 @@ export declare const Menu: {
28
28
  [$bg.variable]: string;
29
29
  bg: string;
30
30
  color: string;
31
+ borderColor: string;
31
32
  };
32
33
  item: {
33
34
  bg: string;
@@ -31,6 +31,9 @@ const baseStyle = definePartsStyle(({ theme }) => {
31
31
  [$bg.variable]: colors.backgroundColor.light,
32
32
  bg: $bg.reference,
33
33
  color: colors.text[900],
34
+ // Chakra's default is its own gray.200, which reads as a hard rule against our
35
+ // surfaces. The menu is already separated by its shadow.
36
+ borderColor: colors.border[200],
34
37
  },
35
38
  // Own CSS var (`--menu-item-bg`), NOT the list's `--menu-bg` — Chakra's stock item
36
39
  // baseStyle rewrites `--menu-bg` itself on hover/focus, so reusing that same var name
@@ -73,6 +73,7 @@ export declare const componentStyles: {
73
73
  [x: string]: string;
74
74
  bg: string;
75
75
  color: string;
76
+ borderColor: string;
76
77
  };
77
78
  item: {
78
79
  bg: string;
@@ -9,6 +9,7 @@ const common_web_1 = __importDefault(require("./common.web"));
9
9
  const fonts_web_1 = __importDefault(require("./fonts.web"));
10
10
  const componentStyles_1 = require("./componentStyles");
11
11
  const accentText_1 = require("../tokens/builders/accentText");
12
+ const scrollbar_1 = require("../tokens/builders/scrollbar");
12
13
  /**
13
14
  * Builds a Chakra theme from a pure brand palette.
14
15
  *
@@ -89,22 +90,8 @@ const createBrandTheme = (palette, options = {}) => {
89
90
  color: (0, accentText_1.onFilled)(palette.primary[500], palette.white, palette.black),
90
91
  },
91
92
  // `color-scheme: dark` gives WebKit/Blink a dark scrollbar by default, but it's the
92
- // OS's generic dark gray, not brand-aware — style it explicitly so it matches the
93
- // canvas instead of floating as a mismatched gray bar.
94
- "::-webkit-scrollbar": {
95
- width: "10px",
96
- height: "10px",
97
- },
98
- "::-webkit-scrollbar-track": {
99
- background: palette.backgroundColor.main,
100
- },
101
- "::-webkit-scrollbar-thumb": {
102
- background: palette.gray[600],
103
- borderRadius: "6px",
104
- },
105
- "::-webkit-scrollbar-thumb:hover": {
106
- background: palette.gray[500],
107
- },
93
+ // OS's generic dark gray, not brand-aware.
94
+ ...(0, scrollbar_1.globalScrollbarStyles)(palette),
108
95
  // Chrome/Edge autofill paints its own opaque yellow/white fill behind the input
109
96
  // text via `-webkit-box-shadow` (not `background`), so a plain `bg` override never
110
97
  // reaches it — a bright light box survives on every dark autofilled field unless
@@ -0,0 +1,22 @@
1
+ export type Gradient = {
2
+ from: string;
3
+ to: string;
4
+ };
5
+ /** A gradient already safe to paint, plus the ink that is guaranteed legible on it. */
6
+ export type ResolvedGradient = Gradient & {
7
+ ink: string;
8
+ };
9
+ /**
10
+ * Sinks both stops until WHITE ink clears AA, keeping each stop's hue. Any mid-tone gradient
11
+ * otherwise flips `onGradient` to black ink, so the same element reads white-on-colour in one
12
+ * brand and black-on-pastel in the next.
13
+ */
14
+ export declare const inkSafeGradient: (gradient: Gradient) => Gradient;
15
+ /**
16
+ * The only correct way to paint text on a gradient: returns the stops to draw AND the ink for
17
+ * them. Calling `onGradient` on raw stops is the black-text bug — it picks ink for a backdrop
18
+ * that is then painted differently.
19
+ */
20
+ export declare const resolveGradient: (gradient: Gradient, white: string, black: string) => ResolvedGradient;
21
+ /** `linear-gradient(...)` for a resolved pair — one spelling of the CSS everywhere. */
22
+ export declare const gradientCss: (g: Gradient, angle?: string) => string;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.gradientCss = exports.resolveGradient = exports.inkSafeGradient = void 0;
4
+ const accentText_1 = require("./accentText");
5
+ const statusTone_1 = require("./statusTone");
6
+ /**
7
+ * Sinks both stops until WHITE ink clears AA, keeping each stop's hue. Any mid-tone gradient
8
+ * otherwise flips `onGradient` to black ink, so the same element reads white-on-colour in one
9
+ * brand and black-on-pastel in the next.
10
+ */
11
+ const inkSafeGradient = (gradient) => ({
12
+ from: (0, statusTone_1.resolveAvatarFill)(gradient.from),
13
+ to: (0, statusTone_1.resolveAvatarFill)(gradient.to),
14
+ });
15
+ exports.inkSafeGradient = inkSafeGradient;
16
+ /**
17
+ * The only correct way to paint text on a gradient: returns the stops to draw AND the ink for
18
+ * them. Calling `onGradient` on raw stops is the black-text bug — it picks ink for a backdrop
19
+ * that is then painted differently.
20
+ */
21
+ const resolveGradient = (gradient, white, black) => {
22
+ const { from, to } = (0, exports.inkSafeGradient)(gradient);
23
+ return { from, to, ink: (0, accentText_1.onGradient)(from, to, white, black) };
24
+ };
25
+ exports.resolveGradient = resolveGradient;
26
+ /** `linear-gradient(...)` for a resolved pair — one spelling of the CSS everywhere. */
27
+ const gradientCss = (g, angle = "135deg") => `linear-gradient(${angle}, ${g.from} 0%, ${g.to} 100%)`;
28
+ exports.gradientCss = gradientCss;
@@ -3,3 +3,5 @@ export * from "./buildBrandTokens";
3
3
  export * from "./buildDarkPalette";
4
4
  export * from "./chartColorsFromTheme";
5
5
  export * from "./color";
6
+ export * from "./scrollbar";
7
+ export * from "./gradientInk";