pixelize-design-library 2.4.2-beta.2 → 2.4.2-beta.21
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.
- package/dist/Components/Accordion/Accordion.js +2 -2
- package/dist/Components/Button/Button.d.ts +2 -2
- package/dist/Components/Button/Button.js +3 -3
- package/dist/Components/Button/Button.styles.js +4 -3
- package/dist/Components/Button/ButtonProps.d.ts +6 -1
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +6 -6
- package/dist/Components/Card/Card.d.ts +1 -1
- package/dist/Components/Card/Card.js +2 -2
- package/dist/Components/Card/CardProps.d.ts +0 -1
- package/dist/Components/Checkbox/Checkbox.js +1 -1
- package/dist/Components/Checkbox/Checkbox.styles.js +2 -0
- package/dist/Components/Common/fieldStyles.js +1 -1
- package/dist/Components/CopyButton/CopyButton.js +1 -1
- package/dist/Components/CustomModulesTable/EditModuleModal.js +1 -1
- package/dist/Components/DatePicker/CalendarPanel.js +1 -1
- package/dist/Components/DatePicker/RangeDatePicker.js +2 -2
- package/dist/Components/DatePicker/SingleDatePicker.js +2 -2
- package/dist/Components/DatePicker/TimeOnlyPicker.js +1 -1
- package/dist/Components/Dropdown/DropDown.js +3 -13
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
- package/dist/Components/FilePreview/FilePreview.js +1 -1
- package/dist/Components/FileUpload/FileUpload.js +3 -2
- package/dist/Components/FileUpload/FileUploadProps.d.ts +2 -1
- package/dist/Components/FileUpload/constants.js +1 -0
- package/dist/Components/FilterSidebar/FilterSidebar.js +4 -4
- package/dist/Components/Form/FormWrapper.js +1 -1
- package/dist/Components/Input/TextInput.styles.js +6 -4
- package/dist/Components/InputTextArea/InputTextArea.style.js +5 -4
- package/dist/Components/KanbanBoard/KanbanBoard.js +5 -45
- package/dist/Components/LimitReachedModal/LimitReachedModal.js +4 -5
- package/dist/Components/MultiSelect/MultiSelect.js +1 -1
- package/dist/Components/NavigationBar/NavigationBar.js +3 -3
- package/dist/Components/NoteTextArea/NoteTextArea.js +5 -3
- package/dist/Components/NumberInput/NumberInput.styles.js +5 -4
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +2 -2
- package/dist/Components/PinInput/PinInput.js +1 -1
- package/dist/Components/PlanPill/PlanPill.js +5 -5
- package/dist/Components/PlanPill/planPillGradient.d.ts +2 -14
- package/dist/Components/PlanPill/planPillGradient.js +3 -15
- package/dist/Components/Primitives/Primitives.d.ts +6 -0
- package/dist/Components/Primitives/Primitives.js +113 -0
- package/dist/Components/ProductCard/ProductPrice.js +1 -1
- package/dist/Components/ProfileCard/ProfileCard.js +1 -1
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
- package/dist/Components/RadioButton/RadioButton.js +1 -1
- package/dist/Components/Reorder/Reorder.js +1 -1
- package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +13 -0
- package/dist/Components/ScrollbarBox/ScrollbarBox.js +11 -0
- package/dist/Components/SearchSelect/SearchSelect.js +5 -4
- package/dist/Components/Select/Select.styles.js +3 -2
- package/dist/Components/SelectSearch/SelectSearch.js +3 -3
- package/dist/Components/SelectV2/SelectV2.js +5 -11
- package/dist/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/Components/StageProgress/StageProgress.js +2 -9
- package/dist/Components/Table/Table.d.ts +1 -1
- package/dist/Components/Table/Table.js +17 -24
- package/dist/Components/Table/TableProps.d.ts +4 -0
- package/dist/Components/Table/components/TableActions.js +2 -2
- package/dist/Components/Table/components/TableBody.js +41 -12
- package/dist/Components/Table/components/TableGroupRow.js +1 -1
- package/dist/Components/Table/components/TableHeader.js +21 -8
- package/dist/Components/Table/components/TableSearch.js +1 -1
- package/dist/Components/Table/filters/ActiveFilters.js +2 -18
- package/dist/Components/Table/settings/ManageColumns.js +3 -17
- package/dist/Components/Table/settings/TableSettings.js +5 -11
- package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
- package/dist/Components/Table/variants/TableVariantContext.js +17 -0
- package/dist/Components/Table/variants/classic.d.ts +6 -0
- package/dist/Components/Table/variants/classic.js +47 -0
- package/dist/Components/Table/variants/index.d.ts +7 -0
- package/dist/Components/Table/variants/index.js +27 -0
- package/dist/Components/Table/variants/pillInk.d.ts +6 -0
- package/dist/Components/Table/variants/pillInk.js +21 -0
- package/dist/Components/Table/variants/studio.d.ts +6 -0
- package/dist/Components/Table/variants/studio.js +50 -0
- package/dist/Components/Table/variants/tokens.d.ts +49 -0
- package/dist/Components/Table/variants/tokens.js +2 -0
- package/dist/Components/Timeline/Timeline.js +2 -2
- package/dist/Components/Toaster/Toaster.js +1 -1
- package/dist/Components/Trail/TrailWorks.js +1 -1
- package/dist/Components/UpgradeButton/UpgradeButton.js +3 -3
- package/dist/Constants/Sidebar.js +3 -2
- package/dist/Theme/chakra/Menu.styles.d.ts +9 -6
- package/dist/Theme/chakra/Menu.styles.js +11 -5
- package/dist/Theme/chakra/Popover.styles.d.ts +6 -3
- package/dist/Theme/chakra/Popover.styles.js +11 -6
- package/dist/Theme/chakra/Switch.styles.d.ts +1 -1
- package/dist/Theme/chakra/Switch.styles.js +7 -9
- package/dist/Theme/chakra/componentStyles.d.ts +15 -9
- package/dist/Theme/chakra/createBrandTheme.js +3 -16
- package/dist/Theme/provider/PixelizeThemeProvider.js +18 -20
- package/dist/Theme/provider/ThemeSwitcher.js +13 -20
- package/dist/Theme/tokens/brands/lavender/palette.light.js +2 -6
- package/dist/Theme/tokens/brands/slate/palette.light.js +1 -5
- package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/Theme/tokens/builders/gradientInk.d.ts +22 -0
- package/dist/Theme/tokens/builders/gradientInk.js +28 -0
- package/dist/Theme/tokens/builders/index.d.ts +3 -0
- package/dist/Theme/tokens/builders/index.js +3 -0
- package/dist/Theme/tokens/builders/outlineRung.d.ts +32 -3
- package/dist/Theme/tokens/builders/outlineRung.js +74 -5
- package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
- package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
- package/dist/Theme/tokens/builders/resolvedRungs.d.ts +5 -1
- package/dist/Theme/tokens/builders/resolvedRungs.js +7 -2
- package/dist/Theme/tokens/builders/scrollbar.d.ts +12 -0
- package/dist/Theme/tokens/builders/scrollbar.js +57 -0
- package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -0
- package/dist/Theme/tokens/builders/surfaceRungs.js +20 -5
- package/dist/esm/Components/Accordion/Accordion.js +2 -2
- package/dist/esm/Components/Button/Button.js +4 -4
- package/dist/esm/Components/Button/Button.styles.js +5 -4
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +6 -6
- package/dist/esm/Components/Card/Card.js +2 -2
- package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
- package/dist/esm/Components/Checkbox/Checkbox.styles.js +2 -0
- package/dist/esm/Components/Common/fieldStyles.js +1 -1
- package/dist/esm/Components/CopyButton/CopyButton.js +1 -1
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +1 -1
- package/dist/esm/Components/DatePicker/CalendarPanel.js +1 -1
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +2 -2
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +2 -2
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +1 -1
- package/dist/esm/Components/Dropdown/DropDown.js +3 -13
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
- package/dist/esm/Components/FilePreview/FilePreview.js +1 -1
- package/dist/esm/Components/FileUpload/FileUpload.js +4 -3
- package/dist/esm/Components/FileUpload/constants.js +1 -0
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +4 -4
- package/dist/esm/Components/Form/FormWrapper.js +1 -1
- package/dist/esm/Components/Input/TextInput.styles.js +6 -4
- package/dist/esm/Components/InputTextArea/InputTextArea.style.js +5 -4
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +5 -45
- package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +4 -5
- package/dist/esm/Components/MultiSelect/MultiSelect.js +1 -1
- package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -3
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +5 -3
- package/dist/esm/Components/NumberInput/NumberInput.styles.js +5 -4
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +2 -2
- package/dist/esm/Components/PinInput/PinInput.js +1 -1
- package/dist/esm/Components/PlanPill/PlanPill.js +6 -6
- package/dist/esm/Components/PlanPill/planPillGradient.js +3 -15
- package/dist/esm/Components/Primitives/Primitives.js +6 -0
- package/dist/esm/Components/ProductCard/ProductPrice.js +1 -1
- package/dist/esm/Components/ProfileCard/ProfileCard.js +1 -1
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
- package/dist/esm/Components/RadioButton/RadioButton.js +1 -1
- package/dist/esm/Components/Reorder/Reorder.js +1 -1
- package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -0
- package/dist/esm/Components/SearchSelect/SearchSelect.js +5 -4
- package/dist/esm/Components/Select/Select.styles.js +3 -2
- package/dist/esm/Components/SelectSearch/SelectSearch.js +3 -3
- package/dist/esm/Components/SelectV2/SelectV2.js +5 -11
- package/dist/esm/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/esm/Components/StageProgress/StageProgress.js +2 -9
- package/dist/esm/Components/Table/Table.js +17 -24
- package/dist/esm/Components/Table/components/TableActions.js +2 -2
- package/dist/esm/Components/Table/components/TableBody.js +42 -13
- package/dist/esm/Components/Table/components/TableGroupRow.js +1 -1
- package/dist/esm/Components/Table/components/TableHeader.js +21 -8
- package/dist/esm/Components/Table/components/TableSearch.js +1 -1
- package/dist/esm/Components/Table/filters/ActiveFilters.js +2 -18
- package/dist/esm/Components/Table/settings/ManageColumns.js +3 -17
- package/dist/esm/Components/Table/settings/TableSettings.js +5 -11
- package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
- package/dist/esm/Components/Table/variants/classic.js +43 -0
- package/dist/esm/Components/Table/variants/index.js +9 -0
- package/dist/esm/Components/Table/variants/pillInk.js +18 -0
- package/dist/esm/Components/Table/variants/studio.js +46 -0
- package/dist/esm/Components/Table/variants/tokens.js +1 -0
- package/dist/esm/Components/Timeline/Timeline.js +2 -2
- package/dist/esm/Components/Toaster/Toaster.js +1 -1
- package/dist/esm/Components/Trail/TrailWorks.js +1 -1
- package/dist/esm/Components/UpgradeButton/UpgradeButton.js +3 -3
- package/dist/esm/Constants/Sidebar.js +3 -2
- package/dist/esm/Theme/chakra/Menu.styles.js +11 -5
- package/dist/esm/Theme/chakra/Popover.styles.js +11 -6
- package/dist/esm/Theme/chakra/Switch.styles.js +7 -9
- package/dist/esm/Theme/chakra/createBrandTheme.js +3 -16
- package/dist/esm/Theme/provider/PixelizeThemeProvider.js +18 -20
- package/dist/esm/Theme/provider/ThemeSwitcher.js +13 -20
- package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +2 -6
- package/dist/esm/Theme/tokens/brands/slate/palette.light.js +1 -5
- package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/esm/Theme/tokens/builders/gradientInk.js +22 -0
- package/dist/esm/Theme/tokens/builders/index.js +3 -0
- package/dist/esm/Theme/tokens/builders/outlineRung.js +70 -4
- package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
- package/dist/esm/Theme/tokens/builders/resolvedRungs.js +7 -2
- package/dist/esm/Theme/tokens/builders/scrollbar.js +52 -0
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +20 -5
- package/dist/esm/index.js +6 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.js +21 -3
- package/package.json +4 -2
|
@@ -12,6 +12,7 @@ const accentText_1 = require("../../../Theme/tokens/builders/accentText");
|
|
|
12
12
|
const TableFilters_1 = __importDefault(require("../filters/TableFilters"));
|
|
13
13
|
const lucide_react_1 = require("lucide-react");
|
|
14
14
|
const Checkbox_1 = __importDefault(require("../../Checkbox/Checkbox"));
|
|
15
|
+
const TableVariantContext_1 = require("../variants/TableVariantContext");
|
|
15
16
|
const TableHeader = ({ columns, isCheckbox, handleSort, headerRefs, columnWidths, columnsSort, headerBgColor, freezedBgColor, freezedTextColor, noBorders, handleCheckbox, checked, isLoading, isContent, isLink, isActionFreeze, setColumnsSearch, columnsSearch, isSelecting, }) => {
|
|
16
17
|
const [openFilterId, setOpenFilterId] = (0, react_2.useState)(null);
|
|
17
18
|
return ((0, jsx_runtime_1.jsxs)(react_1.Tr, { pr: 0, "aria-rowindex": 1, children: [isContent && (0, jsx_runtime_1.jsx)(ContentSpacerCell, { noBorders: noBorders }), isCheckbox && ((0, jsx_runtime_1.jsx)(SelectAllCell, { freezedTextColor: freezedTextColor, noBorders: noBorders, isSelecting: isSelecting, isLoading: isLoading, checked: checked, handleCheckbox: handleCheckbox })), columns.map((header, index) => {
|
|
@@ -23,30 +24,33 @@ const TableHeader = ({ columns, isCheckbox, handleSort, headerRefs, columnWidths
|
|
|
23
24
|
exports.default = (0, react_2.memo)(TableHeader);
|
|
24
25
|
const SelectAllCell = (0, react_2.memo)(({ freezedTextColor, noBorders, isSelecting, isLoading, checked, handleCheckbox, }) => {
|
|
25
26
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
26
|
-
|
|
27
|
+
const variant = (0, TableVariantContext_1.useTableVariant)();
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Th, { scope: "col", w: variant.slot.width, minW: variant.slot.width, px: variant.slot.centered ? 0 : undefined, textAlign: variant.slot.centered ? "center" : undefined, fontSize: 14, fontWeight: 600, color: freezedTextColor, textTransform: "capitalize", backgroundColor: variant.header.bg, position: "sticky", className: `columns sticky-columns`, left: "0px", zIndex: 9, borderBottom: noBorders ? "none" : `0.063rem solid ${variant.header.ruleColor}`, children: (0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: "center", justifyContent: variant.slot.centered ? "center" : "flex-start", children: isSelecting ? ((0, jsx_runtime_1.jsx)(react_1.Spinner, { size: "sm", color: theme.colors.accentText })) : ((0, jsx_runtime_1.jsx)(Checkbox_1.default, { "aria-label": "Select all rows", variant: "outline", onChange: () => handleCheckbox(0), isChecked: isLoading ? false : checked === true, isIndeterminate: checked === "indeterminate" })) }) }));
|
|
27
29
|
});
|
|
28
30
|
const ContentSpacerCell = (0, react_2.memo)(({ noBorders }) => {
|
|
29
|
-
const
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Th, { scope: "col", w: 6, minW: "35px", p: 0, backgroundColor:
|
|
31
|
+
const variant = (0, TableVariantContext_1.useTableVariant)();
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Th, { scope: "col", w: 6, minW: "35px", p: 0, backgroundColor: variant.header.bg, borderBottom: noBorders ? "none" : `0.063rem solid ${variant.header.ruleColor}`, position: "sticky", className: `columns sticky-columns`, left: "0px", zIndex: 1 }));
|
|
31
33
|
});
|
|
32
34
|
const ViewSpacerCell = (0, react_2.memo)(({ noBorders, isActionFreeze, }) => {
|
|
33
|
-
const
|
|
34
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Th, { scope: "col", w: 2, p: 0, minW: "2.065rem", backgroundColor:
|
|
35
|
+
const variant = (0, TableVariantContext_1.useTableVariant)();
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Th, { scope: "col", w: 2, p: 0, minW: "2.065rem", backgroundColor: variant.header.bg, borderBottom: noBorders ? "none" : `0.063rem solid ${variant.header.ruleColor}`, position: isActionFreeze ? "sticky" : "relative", className: `columns sticky-columns`, right: "0px", zIndex: 1 }));
|
|
35
37
|
});
|
|
36
38
|
const SortingIcon = (0, react_2.memo)(({ label, sortState, isVisible, handleSortClick, }) => {
|
|
37
39
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
40
|
+
const variant = (0, TableVariantContext_1.useTableVariant)();
|
|
38
41
|
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "button", type: "button", "aria-label": `Sort by ${label}`, display: "inline-flex", alignItems: "center", justifyContent: "center", cursor: "pointer", ml: 2, p: 0, border: "none", bg: "transparent", lineHeight: "1", onClick: handleSortClick, transition: "color 0.2s ease-in-out, opacity 0.2s ease-in-out",
|
|
39
42
|
// Kept out of view until hover/focus so the header looks exactly as it did,
|
|
40
43
|
// while staying in the DOM and reachable by Tab.
|
|
41
44
|
opacity: isVisible ? 1 : 0, _focus: { opacity: 1 }, _focusVisible: { opacity: 1 }, color: theme.colors.textMuted, _hover: {
|
|
42
45
|
opacity: 1,
|
|
43
|
-
color: (0, accentText_1.accentTextOnCanvas)(theme.colors.secondary,
|
|
46
|
+
color: (0, accentText_1.accentTextOnCanvas)(theme.colors.secondary, variant.header.bg),
|
|
44
47
|
}, children: [sortState === "none" && (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronsUpDown, { size: 14 }), sortState === "asc" && (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: 14 }), sortState === "desc" && (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 14 })] }));
|
|
45
48
|
});
|
|
46
49
|
const ColumnHeader = (0, react_2.memo)(({ header, index, columnWidths, isCheckbox, noBorders, columnsSort, headerRefs, columnsSearch, setColumnsSearch, handleSort, openFilterId, setOpenFilterId, }) => {
|
|
47
50
|
var _a;
|
|
48
51
|
const [isHovered, setIsHovered] = (0, react_2.useState)(false);
|
|
49
52
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
53
|
+
const variant = (0, TableVariantContext_1.useTableVariant)();
|
|
50
54
|
const isFrozen = header.isFreeze;
|
|
51
55
|
const leftOffset = isFrozen
|
|
52
56
|
? (0, table_1.calculateLeftOffset)(columnWidths, index) + (isCheckbox ? 50 : 0)
|
|
@@ -82,7 +86,16 @@ const ColumnHeader = (0, react_2.memo)(({ header, index, columnWidths, isCheckbo
|
|
|
82
86
|
document.addEventListener("mouseup", onMouseUp);
|
|
83
87
|
};
|
|
84
88
|
const isSortActive = !!(isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) && isSorting.direction !== "none";
|
|
85
|
-
|
|
89
|
+
// Studio keeps the kebab out of the resting header — nine of them read louder than
|
|
90
|
+
// the labels. A column that is filtering or sorting keeps its control on show.
|
|
91
|
+
const showActions = variant.header.actions === "always" ||
|
|
92
|
+
isHovered ||
|
|
93
|
+
isSortActive ||
|
|
94
|
+
openFilterId === header.id ||
|
|
95
|
+
!!columnsSearch[header.id];
|
|
96
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Th, { scope: "col", ref: (el) => (headerRefs.current[index] = el), "aria-sort": ariaSort, textTransform: variant.header.textTransform, fontSize: variant.header.fontSize, fontWeight: variant.header.fontWeight, letterSpacing: variant.header.letterSpacing, position: isFrozen ? "sticky" : undefined, left: isFrozen ? leftOffset : undefined, minWidth: 120, backgroundColor: variant.header.bg, maxWidth: 500, zIndex: isFrozen ? 2 : 1, py: 2, pr: 0, overflow: "hidden", borderTop: "none", borderBottom: noBorders ? "none" : `0.063rem solid ${variant.header.ruleColor}`, borderRight: noBorders || !variant.header.showColumnRule
|
|
97
|
+
? "none"
|
|
98
|
+
: `0.063rem solid ${variant.header.ruleColor}`, className: `columns ${isFrozen ? "sticky-columns" : "scrollable-columns"}`, height: variant.header.height, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", color: variant.header.ink, 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", opacity: showActions ? 1 : 0, transition: "opacity 0.2s ease-in-out", _focusWithin: { opacity: 1 }, 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
99
|
let direction = "asc";
|
|
87
100
|
if ((isSorting === null || isSorting === void 0 ? void 0 : isSorting.direction) === "asc") {
|
|
88
101
|
direction = "desc";
|
|
@@ -91,7 +104,7 @@ const ColumnHeader = (0, react_2.memo)(({ header, index, columnWidths, isCheckbo
|
|
|
91
104
|
direction = "none";
|
|
92
105
|
}
|
|
93
106
|
handleSort(header.id, direction);
|
|
94
|
-
} })), sortPriority > 0 && ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", ml: 1, fontSize: "0.625rem", fontWeight: 700, lineHeight: "1", borderRadius: "full", px: "0.3rem", py: "0.1rem", bg: theme.colors.primary.opacity[16], color: (0, accentText_1.accentTextOnCanvas)(theme.colors.primary,
|
|
107
|
+
} })), sortPriority > 0 && ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", ml: 1, fontSize: "0.625rem", fontWeight: 700, lineHeight: "1", borderRadius: "full", px: "0.3rem", py: "0.1rem", bg: theme.colors.primary.opacity[16], color: (0, accentText_1.accentTextOnCanvas)(theme.colors.primary, variant.header.bg), children: sortPriority })), (0, jsx_runtime_1.jsx)(TableFilters_1.default, { header: header, setColumnsSearch: (searchVal) => setColumnsSearch((prev) => ({
|
|
95
108
|
...prev,
|
|
96
109
|
[header.id]: searchVal,
|
|
97
110
|
})), columnsSearch: columnsSearch[header.id] || "", onClose: () => {
|
|
@@ -30,6 +30,6 @@ const TableSearch = ({ onSearch }) => {
|
|
|
30
30
|
setQuery(value);
|
|
31
31
|
handleDebounce(value);
|
|
32
32
|
};
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", gap: "2", children: [!showInput && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: "Search", placement: "top", children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Search", icon: (0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.Search, transform: "scaleX(-1)", boxSize: 5 }), variant: "unstyled", minW: "auto", h: "auto", display: "flex", cursor: "pointer", color: colors.text[500], onClick: handleSearchClick, _hover: { color: colors.accentText } }) })), showInput ? ((0, jsx_runtime_1.jsxs)(react_2.InputGroup, { maxW: "12.5rem", transition: "all 0.3s ease", children: [(0, jsx_runtime_1.jsx)(react_2.Input, { placeholder: "Search...", value: query, onChange: handleInputChange, size: "sm", borderRadius: "md", borderColor: colors.
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", gap: "2", children: [!showInput && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: "Search", placement: "top", children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Search", icon: (0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.Search, transform: "scaleX(-1)", boxSize: 5 }), variant: "unstyled", minW: "auto", h: "auto", display: "flex", cursor: "pointer", color: colors.text[500], onClick: handleSearchClick, _hover: { color: colors.accentText } }) })), showInput ? ((0, jsx_runtime_1.jsxs)(react_2.InputGroup, { maxW: "12.5rem", transition: "all 0.3s ease", children: [(0, jsx_runtime_1.jsx)(react_2.Input, { placeholder: "Search...", value: query, onChange: handleInputChange, size: "sm", borderRadius: "md", borderColor: colors.boxborder[500], _focus: { borderColor: colors.accentText }, autoFocus: true }), (0, jsx_runtime_1.jsx)(react_2.InputRightElement, { display: "flex", alignItems: "center", height: "2rem", children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Clear search", icon: (0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.X }), variant: "unstyled", minW: "auto", h: "auto", display: "flex", color: colors.text[500], cursor: "pointer", onClick: handleSearchClick }) })] })) : null] }));
|
|
34
34
|
};
|
|
35
35
|
exports.default = TableSearch;
|
|
@@ -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);
|
|
@@ -101,7 +87,7 @@ const ManageColumns = ({ columns, items, setItems, childInputMethodsRef, }) => {
|
|
|
101
87
|
? theme.colors.primary[400]
|
|
102
88
|
: "transparent", cursor: "grab", fontSize: "13px", px: 2, py: "3px", mb: "3px", transition: "all 0.15s ease", _hover: {
|
|
103
89
|
bg: theme.colors.gray[50],
|
|
104
|
-
borderColor: theme.colors.
|
|
90
|
+
borderColor: theme.colors.boxborder[200],
|
|
105
91
|
}, _active: { cursor: "grabbing" }, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", "aria-hidden": "true", display: "inline-flex", cursor: "grab", mr: 1, _hover: { color: theme.colors.gray[500] }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.GripVertical, { size: 14 }) }), (0, jsx_runtime_1.jsx)(Checkbox_1.default, { isChecked: !item.isHidden, label: String(item.label), onChange: () => toggleCheckbox(item.id), size: "sm", labelSx: {
|
|
106
92
|
color: item.isHidden ? theme.colors.gray[500] : theme.colors.gray[700],
|
|
107
93
|
} }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "12px", color: theme.colors.gray[500], ml: 'auto', children: index + 1 }), (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": `Move ${item.label} up`, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: 14 }), variant: "ghost", size: "xs", ml: 1, minW: "auto", h: "auto", p: 0, color: theme.colors.gray[500], isDisabled: realIndex <= 0, onClick: () => moveItem(item.id, -1) }), (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": `Move ${item.label} down`, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 14 }), variant: "ghost", size: "xs", ml: 1, minW: "auto", h: "auto", p: 0, color: theme.colors.gray[500], isDisabled: realIndex === -1 || realIndex >= items.length - 1, onClick: () => moveItem(item.id, 1) })] }, item.id));
|
|
@@ -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.
|
|
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.boxborder[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[
|
|
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[
|
|
83
|
-
}) })] })] }) })] }), (0, jsx_runtime_1.jsxs)(react_1.ModalFooter, { gap: "0.5rem", borderTop: "1px solid", borderColor: theme.colors.
|
|
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__")));
|
|
77
|
+
}) })] })] }) })] }), (0, jsx_runtime_1.jsxs)(react_1.ModalFooter, { gap: "0.5rem", borderTop: "1px solid", borderColor: theme.colors.boxborder[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;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TableVariantTokens } from "./tokens";
|
|
2
|
+
export declare const TableVariantProvider: import("react").Provider<TableVariantTokens | null>;
|
|
3
|
+
/** No provider means the table as it always was — the default is a variant, not a gap. */
|
|
4
|
+
export declare function useTableVariant(): TableVariantTokens;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TableVariantProvider = void 0;
|
|
4
|
+
exports.useTableVariant = useTableVariant;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
|
|
7
|
+
const accentText_1 = require("../../../Theme/tokens/builders/accentText");
|
|
8
|
+
const classic_1 = require("./classic");
|
|
9
|
+
const TableVariantContext = (0, react_1.createContext)(null);
|
|
10
|
+
exports.TableVariantProvider = TableVariantContext.Provider;
|
|
11
|
+
/** No provider means the table as it always was — the default is a variant, not a gap. */
|
|
12
|
+
function useTableVariant() {
|
|
13
|
+
const provided = (0, react_1.useContext)(TableVariantContext);
|
|
14
|
+
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
15
|
+
const isDark = (0, accentText_1.isDarkCanvas)(theme.colors.backgroundColor.main);
|
|
16
|
+
return (0, react_1.useMemo)(() => provided !== null && provided !== void 0 ? provided : (0, classic_1.classicPreset)(theme.colors, isDark), [provided, theme.colors, isDark]);
|
|
17
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.classicPreset = void 0;
|
|
4
|
+
const accentText_1 = require("../../../Theme/tokens/builders/accentText");
|
|
5
|
+
const tableRowHoverStyle_1 = require("../components/tableRowHoverStyle");
|
|
6
|
+
/**
|
|
7
|
+
* The table as it shipped. Pinned by snapshot: every value here is read off the
|
|
8
|
+
* live component, so adding a variant cannot move it.
|
|
9
|
+
*/
|
|
10
|
+
const classicPreset = (colors, isDark) => {
|
|
11
|
+
const headerBg = colors.table.hover[200];
|
|
12
|
+
return {
|
|
13
|
+
header: {
|
|
14
|
+
bg: headerBg,
|
|
15
|
+
ink: (0, accentText_1.accentTextOnCanvas)(colors.secondary, headerBg),
|
|
16
|
+
fontSize: 13,
|
|
17
|
+
fontWeight: 600,
|
|
18
|
+
textTransform: "capitalize",
|
|
19
|
+
letterSpacing: "normal",
|
|
20
|
+
height: "45px",
|
|
21
|
+
ruleColor: colors.boxborder[200],
|
|
22
|
+
showColumnRule: true,
|
|
23
|
+
actions: "always",
|
|
24
|
+
},
|
|
25
|
+
row: {
|
|
26
|
+
hoverBg: (0, tableRowHoverStyle_1.getTableRowHoverStyle)(colors, isDark).backgroundColor,
|
|
27
|
+
hoverScope: "cell",
|
|
28
|
+
ruleColor: colors.boxborder[200],
|
|
29
|
+
frozenRuleColor: colors.boxborder[300],
|
|
30
|
+
selectedBg: colors.primary.opacity[16],
|
|
31
|
+
selectedBarColor: colors.primary[500],
|
|
32
|
+
showSelectedBar: false,
|
|
33
|
+
},
|
|
34
|
+
slot: {
|
|
35
|
+
width: "6",
|
|
36
|
+
rest: "checkbox",
|
|
37
|
+
indexInk: colors.textMuted,
|
|
38
|
+
centered: false,
|
|
39
|
+
},
|
|
40
|
+
cells: {
|
|
41
|
+
ink: colors.text[500],
|
|
42
|
+
statusFill: "bleed",
|
|
43
|
+
pillRadius: "0",
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
exports.classicPreset = classicPreset;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { classicPreset } from "./classic";
|
|
2
|
+
import { studioPreset } from "./studio";
|
|
3
|
+
import type { TableVariant, TableVariantPreset } from "./tokens";
|
|
4
|
+
/** Adding a variant is one file and one union member — no component changes. */
|
|
5
|
+
export declare const TABLE_VARIANTS: Record<TableVariant, TableVariantPreset>;
|
|
6
|
+
export * from "./tokens";
|
|
7
|
+
export { classicPreset, studioPreset };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.studioPreset = exports.classicPreset = exports.TABLE_VARIANTS = void 0;
|
|
18
|
+
const classic_1 = require("./classic");
|
|
19
|
+
Object.defineProperty(exports, "classicPreset", { enumerable: true, get: function () { return classic_1.classicPreset; } });
|
|
20
|
+
const studio_1 = require("./studio");
|
|
21
|
+
Object.defineProperty(exports, "studioPreset", { enumerable: true, get: function () { return studio_1.studioPreset; } });
|
|
22
|
+
/** Adding a variant is one file and one union member — no component changes. */
|
|
23
|
+
exports.TABLE_VARIANTS = {
|
|
24
|
+
classic: classic_1.classicPreset,
|
|
25
|
+
studio: studio_1.studioPreset,
|
|
26
|
+
};
|
|
27
|
+
__exportStar(require("./tokens"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A consumer `statusColors` hex is a FILL, and `pickTableColor` hands it straight back as ink
|
|
3
|
+
* over a 13%-alpha tint of itself — legible reversed out of a solid cell, ~1.9:1 on a pill.
|
|
4
|
+
* The palette path is already resolved by `resolveStatusTone`; this rescues the override path.
|
|
5
|
+
*/
|
|
6
|
+
export declare function resolvePillInk(ink: string, soft: string, surface: string): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvePillInk = resolvePillInk;
|
|
4
|
+
const accentText_1 = require("../../../Theme/tokens/builders/accentText");
|
|
5
|
+
const color_1 = require("../../../Theme/tokens/builders/color");
|
|
6
|
+
const outlineRung_1 = require("../../../Theme/tokens/builders/outlineRung");
|
|
7
|
+
const cache = new Map();
|
|
8
|
+
/**
|
|
9
|
+
* A consumer `statusColors` hex is a FILL, and `pickTableColor` hands it straight back as ink
|
|
10
|
+
* over a 13%-alpha tint of itself — legible reversed out of a solid cell, ~1.9:1 on a pill.
|
|
11
|
+
* The palette path is already resolved by `resolveStatusTone`; this rescues the override path.
|
|
12
|
+
*/
|
|
13
|
+
function resolvePillInk(ink, soft, surface) {
|
|
14
|
+
const key = `${ink}|${soft}|${surface}`;
|
|
15
|
+
const hit = cache.get(key);
|
|
16
|
+
if (hit !== undefined)
|
|
17
|
+
return hit;
|
|
18
|
+
const resolved = (0, outlineRung_1.liftToContrast)(ink, (0, color_1.compositeOver)(soft, surface), accentText_1.AA_NORMAL_TEXT);
|
|
19
|
+
cache.set(key, resolved);
|
|
20
|
+
return resolved;
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TableVariantPreset } from "./tokens";
|
|
2
|
+
/**
|
|
3
|
+
* Quieter chrome, one rule instead of a grid, and a slot that rests on the row
|
|
4
|
+
* number. Every colour is lifted against the surface it actually sits on.
|
|
5
|
+
*/
|
|
6
|
+
export declare const studioPreset: TableVariantPreset;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.studioPreset = void 0;
|
|
4
|
+
const outlineRung_1 = require("../../../Theme/tokens/builders/outlineRung");
|
|
5
|
+
const tableRowHoverStyle_1 = require("../components/tableRowHoverStyle");
|
|
6
|
+
/**
|
|
7
|
+
* Quieter chrome, one rule instead of a grid, and a slot that rests on the row
|
|
8
|
+
* number. Every colour is lifted against the surface it actually sits on.
|
|
9
|
+
*/
|
|
10
|
+
const studioPreset = (colors, isDark) => {
|
|
11
|
+
const surface = colors.background[50];
|
|
12
|
+
// Studio drops the per-column rule, so the one line left has to be visible on
|
|
13
|
+
// every brand — `boxborder[200]` measures as low as 1.09:1 on some of them.
|
|
14
|
+
const rule = (0, outlineRung_1.liftToContrast)(colors.boxborder[200], surface, outlineRung_1.CHROME_RULE);
|
|
15
|
+
return {
|
|
16
|
+
header: {
|
|
17
|
+
bg: surface,
|
|
18
|
+
ink: colors.text[500],
|
|
19
|
+
fontSize: 11,
|
|
20
|
+
fontWeight: 600,
|
|
21
|
+
textTransform: "uppercase",
|
|
22
|
+
letterSpacing: "0.06em",
|
|
23
|
+
height: "40px",
|
|
24
|
+
ruleColor: rule,
|
|
25
|
+
showColumnRule: false,
|
|
26
|
+
actions: "hover",
|
|
27
|
+
},
|
|
28
|
+
row: {
|
|
29
|
+
hoverBg: (0, tableRowHoverStyle_1.getTableRowHoverStyle)(colors, isDark).backgroundColor,
|
|
30
|
+
hoverScope: "row",
|
|
31
|
+
ruleColor: rule,
|
|
32
|
+
frozenRuleColor: rule,
|
|
33
|
+
selectedBg: (0, outlineRung_1.liftToContrast)(colors.primary[50], surface, outlineRung_1.MIN_PERCEPTIBLE_STEP),
|
|
34
|
+
selectedBarColor: colors.primary[500],
|
|
35
|
+
showSelectedBar: true,
|
|
36
|
+
},
|
|
37
|
+
slot: {
|
|
38
|
+
width: "3.5rem",
|
|
39
|
+
rest: "index",
|
|
40
|
+
indexInk: colors.textMuted,
|
|
41
|
+
centered: true,
|
|
42
|
+
},
|
|
43
|
+
cells: {
|
|
44
|
+
ink: colors.text[500],
|
|
45
|
+
statusFill: "pill",
|
|
46
|
+
pillRadius: "0.375rem",
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
exports.studioPreset = studioPreset;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A variant is a resolved token set, never a branch. Components read named tokens;
|
|
3
|
+
* only `Table.tsx` knows which variant is active.
|
|
4
|
+
*
|
|
5
|
+
* PURITY: presets take a palette and return values — no Chakra, no React, no CSS.
|
|
6
|
+
*/
|
|
7
|
+
import type { PaletteProps } from "../../../Theme/tokens/types";
|
|
8
|
+
export type TableVariant = "classic" | "studio";
|
|
9
|
+
export type TableSlotRest = "checkbox" | "index";
|
|
10
|
+
export type TableStatusFill = "bleed" | "pill";
|
|
11
|
+
export type TableHoverScope = "cell" | "row";
|
|
12
|
+
export type TableChromeReveal = "always" | "hover";
|
|
13
|
+
/** Every field required: a preset that forgets one is a compile error, not a runtime gap. */
|
|
14
|
+
export type TableVariantTokens = {
|
|
15
|
+
header: {
|
|
16
|
+
bg: string;
|
|
17
|
+
ink: string;
|
|
18
|
+
fontSize: number;
|
|
19
|
+
fontWeight: number;
|
|
20
|
+
textTransform: "capitalize" | "uppercase";
|
|
21
|
+
letterSpacing: string;
|
|
22
|
+
height: string;
|
|
23
|
+
ruleColor: string;
|
|
24
|
+
showColumnRule: boolean;
|
|
25
|
+
/** When the per-column filter kebab appears. Active columns always show it. */
|
|
26
|
+
actions: TableChromeReveal;
|
|
27
|
+
};
|
|
28
|
+
row: {
|
|
29
|
+
hoverBg: string;
|
|
30
|
+
hoverScope: TableHoverScope;
|
|
31
|
+
ruleColor: string;
|
|
32
|
+
frozenRuleColor: string;
|
|
33
|
+
selectedBg: string;
|
|
34
|
+
selectedBarColor: string;
|
|
35
|
+
showSelectedBar: boolean;
|
|
36
|
+
};
|
|
37
|
+
slot: {
|
|
38
|
+
width: string;
|
|
39
|
+
rest: TableSlotRest;
|
|
40
|
+
indexInk: string;
|
|
41
|
+
centered: boolean;
|
|
42
|
+
};
|
|
43
|
+
cells: {
|
|
44
|
+
ink: string;
|
|
45
|
+
statusFill: TableStatusFill;
|
|
46
|
+
pillRadius: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type TableVariantPreset = (colors: PaletteProps, isDark: boolean) => TableVariantTokens;
|
|
@@ -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[
|
|
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[
|
|
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[
|
|
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: {
|
|
@@ -5,7 +5,7 @@ const react_1 = require("@chakra-ui/react");
|
|
|
5
5
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
6
6
|
const TrailWorks = () => {
|
|
7
7
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
8
|
-
const cellBorder = colors.
|
|
8
|
+
const cellBorder = colors.boxborder[200];
|
|
9
9
|
const data = [
|
|
10
10
|
{
|
|
11
11
|
contact: "John Doe",
|
|
@@ -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
|
|
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
|
|
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:
|
|
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:
|
|
23
|
+
width: scrollbar_1.SCROLLBAR_WIDTH,
|
|
23
24
|
},
|
|
24
25
|
"&::-webkit-scrollbar-track": {
|
|
25
26
|
background: theme.colors.sidebar.background[500],
|