pixelize-design-library 2.4.2-beta.62 → 2.4.2-beta.63
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/CHANGELOG.md +75 -2
- package/COMPONENT-GOTCHAS.md +25 -6
- package/DESIGN-GUIDE.md +12 -5
- package/dist/Components/Button/Button.styles.js +51 -21
- package/dist/Components/Card/CardProps.d.ts +2 -2
- package/dist/Components/ConfirmDialog/ConfirmDialog.js +2 -1
- package/dist/Components/CustomModulesTable/CustomModulesTable.js +6 -4
- package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -1
- package/dist/Components/DatePicker/RangeDatePicker.js +2 -1
- package/dist/Components/DatePicker/SingleDatePicker.js +2 -1
- package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -1
- package/dist/Components/DatePicker/dayStates.js +2 -1
- package/dist/Components/Drawer/Drawer.js +2 -1
- package/dist/Components/Dropdown/DropDown.js +2 -1
- package/dist/Components/FileUpload/FileUpload.js +9 -2
- package/dist/Components/FilterSidebar/FilterSidebar.js +7 -4
- package/dist/Components/KanbanBoard/AccountCard.js +4 -2
- package/dist/Components/NavigationBar/NavigationBar.js +3 -2
- package/dist/Components/Notification/Notification.js +4 -3
- package/dist/Components/NotificationBell/NotificationPanel.js +4 -3
- package/dist/Components/OrganizationDetails/CreateOrgModal.js +2 -1
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +5 -3
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +7 -3
- package/dist/Components/SearchSelect/SearchSelect.js +42 -21
- package/dist/Components/SearchSelect/searchSelectNav.d.ts +13 -0
- package/dist/Components/SearchSelect/searchSelectNav.js +40 -0
- package/dist/Components/Select/SelectPopup.js +2 -1
- package/dist/Components/SelectSearch/SelectSearch.js +2 -1
- package/dist/Components/SettingRow/SettingRow.js +2 -1
- package/dist/Components/SettingRow/SettingsSection.js +2 -1
- package/dist/Components/SideBar/SecondaryBar.js +4 -3
- package/dist/Components/SideBar/SideBar.js +16 -13
- package/dist/Components/SideBar/SideBarProps.d.ts +1 -1
- package/dist/Components/SideBar/components/MenuItemBox.js +7 -4
- package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -1
- package/dist/Components/SideBar/components/OtherApps.js +2 -1
- package/dist/Components/SideBar/components/PinnedSection.js +7 -4
- package/dist/Components/SideBar/sidebarMotion.d.ts +2 -0
- package/dist/Components/SideBar/sidebarMotion.js +6 -0
- package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -4
- package/dist/Components/StageProgress/StageItem.js +5 -2
- package/dist/Components/StageProgress/StepperStage.js +2 -2
- package/dist/Components/StatCard/StatCard.js +2 -1
- package/dist/Components/Table/Table.js +6 -2
- package/dist/Components/Table/components/TableActions.js +3 -2
- package/dist/Components/Table/filters/CompactSelect.js +2 -1
- package/dist/Components/Table/settings/TableSettings.js +7 -2
- package/dist/Components/Table/variants/classic.js +3 -2
- package/dist/Components/Timeline/Timeline.js +11 -4
- package/dist/Components/Toaster/Toaster.js +19 -8
- package/dist/Components/Toggle/TableToggle.js +5 -2
- package/dist/Components/UserDetails/AddUserModal.js +2 -1
- package/dist/Components/UserDetails/ChangeRoleModal.js +2 -1
- package/dist/Components/UserDetails/UserDetails.js +3 -1
- package/dist/Theme/chakra/Card.styles.d.ts +7 -1
- package/dist/Theme/chakra/Card.styles.js +4 -1
- package/dist/Theme/chakra/Menu.styles.d.ts +3 -5
- package/dist/Theme/chakra/Menu.styles.js +3 -0
- package/dist/Theme/chakra/Popover.styles.d.ts +2 -11
- package/dist/Theme/chakra/Popover.styles.js +2 -0
- package/dist/Theme/chakra/common.web.d.ts +4 -0
- package/dist/Theme/chakra/componentStyles.d.ts +11 -3
- package/dist/Theme/chakra/componentStyles.js +10 -6
- package/dist/Theme/chakra/motion.d.ts +1 -0
- package/dist/Theme/chakra/motion.js +2 -1
- package/dist/Theme/chakra/overlay.styles.d.ts +5 -0
- package/dist/Theme/chakra/overlay.styles.js +4 -1
- package/dist/Theme/themeProps.d.ts +4 -0
- package/dist/Theme/tokens/brands/index.d.ts +1 -0
- package/dist/Theme/tokens/brands/index.js +17 -1
- package/dist/Theme/tokens/brands/radiant/palette.light.js +15 -0
- package/dist/Theme/tokens/brands/rosewood/palette.light.js +10 -10
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +7 -29
- package/dist/Theme/tokens/brands/zinc/palette.dark.js +3 -35
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +6 -1
- package/dist/Theme/tokens/builders/buildDarkPalette.js +37 -8
- package/dist/Theme/tokens/builders/mutedText.d.ts +1 -1
- package/dist/Theme/tokens/builders/mutedText.js +13 -3
- package/dist/Theme/tokens/builders/planeStep.d.ts +4 -0
- package/dist/Theme/tokens/builders/planeStep.js +20 -0
- package/dist/Theme/tokens/builders/planes.d.ts +4 -0
- package/dist/Theme/tokens/builders/planes.js +33 -0
- package/dist/Theme/tokens/builders/skeletonShimmer.d.ts +9 -0
- package/dist/Theme/tokens/builders/skeletonShimmer.js +25 -0
- package/dist/Theme/tokens/builders/surfaceRaised.d.ts +3 -1
- package/dist/Theme/tokens/builders/surfaceRaised.js +18 -8
- package/dist/Theme/tokens/builders/surfaceRungs.js +3 -1
- package/dist/Theme/tokens/primitives/index.d.ts +2 -2
- package/dist/Theme/tokens/primitives/index.js +4 -1
- package/dist/Theme/tokens/primitives/motion.d.ts +1 -0
- package/dist/Theme/tokens/primitives/motion.js +2 -1
- package/dist/Theme/tokens/primitives/shadows.d.ts +16 -0
- package/dist/Theme/tokens/primitives/shadows.js +56 -6
- package/dist/Theme/tokens/primitives/typography.js +1 -1
- package/dist/esm/Components/Button/Button.styles.js +54 -24
- package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +2 -1
- package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +6 -4
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -1
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +2 -1
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +2 -1
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -1
- package/dist/esm/Components/DatePicker/dayStates.js +2 -1
- package/dist/esm/Components/Drawer/Drawer.js +2 -1
- package/dist/esm/Components/Dropdown/DropDown.js +2 -1
- package/dist/esm/Components/FileUpload/FileUpload.js +10 -3
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +7 -4
- package/dist/esm/Components/KanbanBoard/AccountCard.js +4 -2
- package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -2
- package/dist/esm/Components/Notification/Notification.js +4 -3
- package/dist/esm/Components/NotificationBell/NotificationPanel.js +4 -3
- package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +2 -1
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -3
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +7 -3
- package/dist/esm/Components/SearchSelect/SearchSelect.js +42 -21
- package/dist/esm/Components/SearchSelect/searchSelectNav.js +32 -0
- package/dist/esm/Components/Select/SelectPopup.js +2 -1
- package/dist/esm/Components/SelectSearch/SelectSearch.js +2 -1
- package/dist/esm/Components/SettingRow/SettingRow.js +2 -1
- package/dist/esm/Components/SettingRow/SettingsSection.js +2 -1
- package/dist/esm/Components/SideBar/SecondaryBar.js +4 -3
- package/dist/esm/Components/SideBar/SideBar.js +17 -14
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +7 -4
- package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -1
- package/dist/esm/Components/SideBar/components/OtherApps.js +2 -1
- package/dist/esm/Components/SideBar/components/PinnedSection.js +7 -4
- package/dist/esm/Components/SideBar/sidebarMotion.js +3 -0
- package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -4
- package/dist/esm/Components/StageProgress/StageItem.js +5 -2
- package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
- package/dist/esm/Components/StatCard/StatCard.js +2 -1
- package/dist/esm/Components/Table/Table.js +8 -4
- package/dist/esm/Components/Table/components/TableActions.js +3 -2
- package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
- package/dist/esm/Components/Table/settings/TableSettings.js +8 -3
- package/dist/esm/Components/Table/variants/classic.js +3 -2
- package/dist/esm/Components/Timeline/Timeline.js +11 -4
- package/dist/esm/Components/Toaster/Toaster.js +20 -9
- package/dist/esm/Components/Toggle/TableToggle.js +5 -2
- package/dist/esm/Components/UserDetails/AddUserModal.js +2 -1
- package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -1
- package/dist/esm/Components/UserDetails/UserDetails.js +3 -1
- package/dist/esm/Theme/chakra/Card.styles.js +4 -1
- package/dist/esm/Theme/chakra/Menu.styles.js +3 -0
- package/dist/esm/Theme/chakra/Popover.styles.js +2 -0
- package/dist/esm/Theme/chakra/componentStyles.js +10 -6
- package/dist/esm/Theme/chakra/motion.js +1 -0
- package/dist/esm/Theme/chakra/overlay.styles.js +3 -0
- package/dist/esm/Theme/tokens/brands/index.js +16 -0
- package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +15 -0
- package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +10 -10
- package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -35
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +38 -9
- package/dist/esm/Theme/tokens/builders/mutedText.js +12 -2
- package/dist/esm/Theme/tokens/builders/planeStep.js +14 -0
- package/dist/esm/Theme/tokens/builders/planes.js +28 -0
- package/dist/esm/Theme/tokens/builders/skeletonShimmer.js +21 -0
- package/dist/esm/Theme/tokens/builders/surfaceRaised.js +16 -7
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +3 -1
- package/dist/esm/Theme/tokens/primitives/index.js +1 -1
- package/dist/esm/Theme/tokens/primitives/motion.js +1 -0
- package/dist/esm/Theme/tokens/primitives/shadows.js +54 -5
- package/dist/esm/Theme/tokens/primitives/typography.js +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -5
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ const react_1 = require("@chakra-ui/react");
|
|
|
8
8
|
const lucide_react_1 = require("lucide-react");
|
|
9
9
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
10
10
|
const tone_1 = require("../../Theme/tokens/builders/tone");
|
|
11
|
+
const planeStep_1 = require("../../Theme/tokens/builders/planeStep");
|
|
11
12
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
12
13
|
const typography_1 = require("../../Theme/tokens/primitives/typography");
|
|
13
14
|
const motion_2 = require("../../Theme/chakra/motion");
|
|
@@ -38,7 +39,7 @@ const StatCard = ({ label, value, delta, trend, goodDirection = "up", hint, spar
|
|
|
38
39
|
px: 5,
|
|
39
40
|
py: 4,
|
|
40
41
|
};
|
|
41
|
-
const content = isLoading ? ((0, jsx_runtime_1.jsx)(StatCardSkeleton, { hasIcon: !!Icon })) : ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", direction: "column", gap: 3, children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: 2, children: [Icon && ((0, jsx_runtime_1.jsx)(react_1.Flex, { as: "span", boxSize: 8, flexShrink: 0, align: "center", justify: "center", borderRadius: "lg", bg: chip.bg, color: chip.fg, "data-icon-tone": iconTone, children: (0, jsx_runtime_1.jsx)(Icon, { size: 16, "aria-hidden": true }) })), (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "xs", fontWeight: 500, color: colors.textMuted, children: label })] }), (0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", justify: "space-between", gap: 3, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", display: "block", fontSize: "2xl", fontWeight: 700, letterSpacing: "-0.02em", lineHeight: "short", color: colors.header[900], sx: typography_1.NUMERIC_TEXT, children: value }), sparkline && ((0, jsx_runtime_1.jsx)(react_1.Flex, { as: "span", align: "center", justify: "center", flexShrink: 0, h: 8, minW: 16, maxW: 24, overflow: "hidden", "data-testid": "stat-sparkline", children: sparkline }))] }), (delta !== undefined || hint) && ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: 1.5, wrap: "wrap", children: [delta !== undefined && ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: 0.5, color: deltaColor, "data-testid": "stat-delta", children: [trend && (0, jsx_runtime_1.jsx)(DeltaIcon, { size: 14, "aria-hidden": true }), trend && (0, jsx_runtime_1.jsx)(react_1.VisuallyHidden, { children: trend === "up" ? "Up" : "Down" }), (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "xs", fontWeight: 600, sx: typography_1.NUMERIC_TEXT, children: delta })] })), hint && ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "xs", color: colors.textMuted, children: hint }))] })), footer && ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", pt: 3, borderTopWidth: "1px", borderColor: colors
|
|
42
|
+
const content = isLoading ? ((0, jsx_runtime_1.jsx)(StatCardSkeleton, { hasIcon: !!Icon })) : ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", direction: "column", gap: 3, children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: 2, children: [Icon && ((0, jsx_runtime_1.jsx)(react_1.Flex, { as: "span", boxSize: 8, flexShrink: 0, align: "center", justify: "center", borderRadius: "lg", bg: chip.bg, color: chip.fg, "data-icon-tone": iconTone, children: (0, jsx_runtime_1.jsx)(Icon, { size: 16, "aria-hidden": true }) })), (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "xs", fontWeight: 500, color: colors.textMuted, children: label })] }), (0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", justify: "space-between", gap: 3, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", display: "block", fontSize: "2xl", fontWeight: 700, letterSpacing: "-0.02em", lineHeight: "short", color: colors.header[900], sx: typography_1.NUMERIC_TEXT, children: value }), sparkline && ((0, jsx_runtime_1.jsx)(react_1.Flex, { as: "span", align: "center", justify: "center", flexShrink: 0, h: 8, minW: 16, maxW: 24, overflow: "hidden", "data-testid": "stat-sparkline", children: sparkline }))] }), (delta !== undefined || hint) && ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: 1.5, wrap: "wrap", children: [delta !== undefined && ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: 0.5, color: deltaColor, "data-testid": "stat-delta", children: [trend && (0, jsx_runtime_1.jsx)(DeltaIcon, { size: 14, "aria-hidden": true }), trend && (0, jsx_runtime_1.jsx)(react_1.VisuallyHidden, { children: trend === "up" ? "Up" : "Down" }), (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "xs", fontWeight: 600, sx: typography_1.NUMERIC_TEXT, children: delta })] })), hint && ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "xs", color: colors.textMuted, children: hint }))] })), footer && ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", pt: 3, borderTopWidth: "1px", borderColor: (0, planeStep_1.cardRule)(colors), "data-testid": "stat-footer", children: footer }))] }));
|
|
42
43
|
if (!isInteractive) {
|
|
43
44
|
return ((0, jsx_runtime_1.jsx)(react_1.Box, { ...rest, ...surface, "aria-busy": isLoading || undefined, "data-testid": testId, children: content }));
|
|
44
45
|
}
|
|
@@ -13,6 +13,7 @@ const LeftFilterPane_1 = __importDefault(require("./filters/LeftFilterPane"));
|
|
|
13
13
|
const variants_1 = require("./variants");
|
|
14
14
|
const TableVariantContext_1 = require("./variants/TableVariantContext");
|
|
15
15
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
16
|
+
const planeStep_1 = require("../../Theme/tokens/builders/planeStep");
|
|
16
17
|
const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
|
|
17
18
|
const Pagination_1 = __importDefault(require("./components/Pagination"));
|
|
18
19
|
const TableHeader_1 = __importDefault(require("./components/TableHeader"));
|
|
@@ -38,6 +39,8 @@ const Button_1 = __importDefault(require("../Button/Button"));
|
|
|
38
39
|
const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
|
|
39
40
|
const lucide_react_1 = require("lucide-react");
|
|
40
41
|
const MotionBox = (0, framer_motion_1.motion)(react_2.Box);
|
|
42
|
+
// NOTE: MOTION_EASE as framer bezier points; the motion tokens have no points form yet.
|
|
43
|
+
const PANE_EASE = [0.2, 0, 0, 1];
|
|
41
44
|
/** Data table: virtualized-height rows, pagination, filters, selection, and an optional Monday-style grouped board. */
|
|
42
45
|
function Table({ data, columns, onSelection, isLoading, isCheckbox = false, freezedBgColor, freezedTextColor, noBorders = false, isPagination = true, onRowClick, selections, isActionFreeze = true, preferences = {
|
|
43
46
|
url: "",
|
|
@@ -49,6 +52,7 @@ function Table({ data, columns, onSelection, isLoading, isCheckbox = false, free
|
|
|
49
52
|
}, paginationMode = "client", infiniteScroll = false, hasMore, isLoadingMore = false, groupLoadMore = false, loadMoreText = "Load more", loadMorePosition = "top", loadMoreChunkSize, noOfRowsPerPage = 50, totalRecords = 0, onPagination, isTableSettings = false, headerActions, onGlobalSearch, onNoOfRowsPerPageChange, paginationSelectOptions, tableMaxHeight, minVisibleRows, maxVisibleRows, autoFitViewport, tableSettings, filterSidebar, loadingSkeletonRows, defaultVisibleColumns, density = "normal", variant = "classic", stripe = false, renderRowDetail, expandedRows, onExpandedRowsChange, groupColors, onAddItem, emptyState, onRefresh, isGlobalSearch = true, }) {
|
|
50
53
|
var _a, _b, _c, _d, _e;
|
|
51
54
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
55
|
+
const prefersReducedMotion = (0, motion_2.usePrefersReducedMotion)();
|
|
52
56
|
const clearFiltersTone = (0, react_1.useMemo)(() => (0, filledSurface_1.resolveFilledSurface)(theme.colors.semantic.error, theme.colors), [theme.colors]);
|
|
53
57
|
const variantTokens = (0, react_1.useMemo)(() => variants_1.TABLE_VARIANTS[variant](theme.colors, (0, accentText_1.isDarkCanvas)(theme.colors.backgroundColor.main)), [variant, theme.colors]);
|
|
54
58
|
const [columnsSearch, setColumnsSearch] = (0, react_1.useState)({});
|
|
@@ -388,7 +392,7 @@ function Table({ data, columns, onSelection, isLoading, isCheckbox = false, free
|
|
|
388
392
|
from { transform: rotate(0deg); }
|
|
389
393
|
to { transform: rotate(360deg); }
|
|
390
394
|
}
|
|
391
|
-
` }), (0, jsx_runtime_1.jsxs)(react_2.Box, { bg: theme.colors.background[50], border: `0.063rem solid ${theme.colors.boxborder[200]}`, borderRadius: "xl", overflow: "hidden", children: [filterSidebar && filterMode === "modal" && ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isFilterModalOpen, onClose: onFilterModalClose, size: "4xl", scrollBehavior: "inside", children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, {}), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: theme.colors.surfaceRaised, my: 0, top: "10%", position: "fixed", left: "auto", right: "auto", children: [(0, jsx_runtime_1.jsx)(react_2.ModalCloseButton, { size: "sm" }), (0, jsx_runtime_1.jsx)(react_2.ModalBody, { p: 0, children: (0, jsx_runtime_1.jsx)(LeftFilterPane_1.default, { theme: theme, sections: (_d = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.sidebarOptions) !== null && _d !== void 0 ? _d : [], selected: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.selected, onApply: (sel) => { var _a; (_a = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onApply) === null || _a === void 0 ? void 0 : _a.call(filterSidebar, sel); onFilterModalClose(); }, onClear: () => { var _a; (_a = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onClearAllHandler) === null || _a === void 0 ? void 0 : _a.call(filterSidebar); }, isApplyLoading: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isApplyLoading, filterMode: filterMode }) })] })] })), (0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "start", children: [filterMode === "sidebar" && ((0, jsx_runtime_1.jsx)(MotionBox, { "data-testid": "filter-sidebar-pane", initial:
|
|
395
|
+
` }), (0, jsx_runtime_1.jsxs)(react_2.Box, { bg: theme.colors.background[50], border: `0.063rem solid ${theme.colors.boxborder[200]}`, borderRadius: "xl", overflow: "hidden", children: [filterSidebar && filterMode === "modal" && ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isFilterModalOpen, onClose: onFilterModalClose, size: "4xl", scrollBehavior: "inside", children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, {}), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: theme.colors.surfaceRaised, my: 0, top: "10%", position: "fixed", left: "auto", right: "auto", children: [(0, jsx_runtime_1.jsx)(react_2.ModalCloseButton, { size: "sm" }), (0, jsx_runtime_1.jsx)(react_2.ModalBody, { p: 0, children: (0, jsx_runtime_1.jsx)(LeftFilterPane_1.default, { theme: theme, sections: (_d = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.sidebarOptions) !== null && _d !== void 0 ? _d : [], selected: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.selected, onApply: (sel) => { var _a; (_a = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onApply) === null || _a === void 0 ? void 0 : _a.call(filterSidebar, sel); onFilterModalClose(); }, onClear: () => { var _a; (_a = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onClearAllHandler) === null || _a === void 0 ? void 0 : _a.call(filterSidebar); }, isApplyLoading: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isApplyLoading, filterMode: filterMode }) })] })] })), (0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "start", children: [filterMode === "sidebar" && ((0, jsx_runtime_1.jsx)(MotionBox, { "data-testid": "filter-sidebar-pane", initial: false, animate: { width: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? 180 : 0 }, transition: { type: "tween", ease: PANE_EASE, duration: prefersReducedMotion ? 0 : motion_1.MOTION_MS.base / 1000 }, overflow: "hidden", flexShrink: 0, borderRight: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? "1px solid" : "none", borderColor: (0, planeStep_1.cardRule)(theme.colors), style: { height: rowMetrics_1.TOOLBAR_HEIGHT + formulaMaxH }, minHeight: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? "32rem" : "auto", children: (0, jsx_runtime_1.jsx)(LeftFilterPane_1.default, { height: rowMetrics_1.TOOLBAR_HEIGHT + formulaMaxH, theme: theme, sections: (_e = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.sidebarOptions) !== null && _e !== void 0 ? _e : [], selected: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.selected, onApply: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onApply, onClear: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onClearAllHandler, isApplyLoading: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isApplyLoading, filterMode: filterMode }) })), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: "1", minW: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", justifyContent: "space-between", px: 3, py: 0, height: `${rowMetrics_1.TOOLBAR_HEIGHT}px`, gap: 3, flexWrap: "nowrap", bg: theme.colors.background[50], borderBottom: `0.063rem solid ${(0, planeStep_1.cardRule)(theme.colors)}`, children: [[
|
|
392
396
|
filterSidebar && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: "Filter", placement: "top", children: (0, jsx_runtime_1.jsxs)(react_2.Box, { position: "relative", display: "inline-block", children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", "aria-label": "Filter", "aria-haspopup": filterMode === "modal" ? "dialog" : undefined, "aria-expanded": filterMode === "modal"
|
|
393
397
|
? isFilterModalOpen
|
|
394
398
|
: !!(filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar), display: "inline-flex", alignItems: "center", justifyContent: "center", p: 0, bg: "transparent", border: "none", borderRadius: "md", cursor: "pointer", onClick: filterMode === "modal" ? onFilterModalOpen : filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.filterSidebarToggle, _hover: {
|
|
@@ -452,5 +456,5 @@ function Table({ data, columns, onSelection, isLoading, isCheckbox = false, free
|
|
|
452
456
|
backgroundColor: "transparent",
|
|
453
457
|
zIndex: 999,
|
|
454
458
|
},
|
|
455
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_3.Thead, { position: "sticky", top: 0, zIndex: 4, bg: variantTokens.header.bg, children: (0, jsx_runtime_1.jsx)(TableHeader_1.default, { columns: columnsList, isCheckbox: isCheckbox, freezedTextColor: freezedTextColor !== null && freezedTextColor !== void 0 ? freezedTextColor : theme.colors.text[500], handleSort: handleSort, headerRefs: headerRefs, columnWidths: columnWidths, slotRef: slotRef, slotWidth: slotWidth, columnsSort: columnsSort, noBorders: noBorders, handleCheckbox: handleCheckbox, isLoading: isTableLoading, checked: headerChecked, isContent: isContent, isLink: isLink, hasDetail: !!rowDetail, isActionFreeze: isActionFreeze, setColumnsSearch: setColumnsSearch, columnsSearch: columnsSearch, isSelecting: isSelecting }) }), (0, jsx_runtime_1.jsx)(react_3.Tbody, { children: (0, jsx_runtime_1.jsx)(TableBody_1.default, { data: isGrouped ? groupedSource : _filteredData, groups: renderGroups, onAddItem: onAddItem, columns: columnsList, startRow: isGrouped ? 0 : startRow, rowsPerPage: rowsPerPage, scrollContainerRef: tableContainerRef, isCheckbox: isCheckbox, columnWidths: columnWidths, slotWidth: slotWidth, noBorders: noBorders, freezedBgColor: freezedBgColor !== null && freezedBgColor !== void 0 ? freezedBgColor : theme.colors.backgroundColor.secondary, freezedTextColor: freezedTextColor !== null && freezedTextColor !== void 0 ? freezedTextColor : theme.colors.text[500], handleCheckbox: handleCheckbox, selections: selection, isLoading: isTableLoading, loadingSkeletonRows: loadingSkeletonRows, onRowClick: onRowClick, isContent: isContent, isLink: isLink, rowDetail: rowDetail, expandedIds: expandedIds, isActionFreeze: isActionFreeze, density: densityState, stripe: stripe, emptyState: emptyState }) })] }), canInfinite && isLoadingMore && ((0, jsx_runtime_1.jsxs)(react_2.Flex, { justify: "center", align: "center", py: 3, gap: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "sm", color: theme.colors.accentText }), (0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "0.75rem", color: theme.colors.text[500], children: "Loading more\u2026" })] }))] }), groupLoadMoreActive && loadMorePosition === "bottom" && (groupLoadMoreCaption || canGroupLoadMore) && ((0, jsx_runtime_1.jsxs)(react_2.Flex, { justify: "center", align: "center", gap: 3, py: 3, borderTop: `0.063rem solid ${theme.colors
|
|
459
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_3.Thead, { position: "sticky", top: 0, zIndex: 4, bg: variantTokens.header.bg, children: (0, jsx_runtime_1.jsx)(TableHeader_1.default, { columns: columnsList, isCheckbox: isCheckbox, freezedTextColor: freezedTextColor !== null && freezedTextColor !== void 0 ? freezedTextColor : theme.colors.text[500], handleSort: handleSort, headerRefs: headerRefs, columnWidths: columnWidths, slotRef: slotRef, slotWidth: slotWidth, columnsSort: columnsSort, noBorders: noBorders, handleCheckbox: handleCheckbox, isLoading: isTableLoading, checked: headerChecked, isContent: isContent, isLink: isLink, hasDetail: !!rowDetail, isActionFreeze: isActionFreeze, setColumnsSearch: setColumnsSearch, columnsSearch: columnsSearch, isSelecting: isSelecting }) }), (0, jsx_runtime_1.jsx)(react_3.Tbody, { children: (0, jsx_runtime_1.jsx)(TableBody_1.default, { data: isGrouped ? groupedSource : _filteredData, groups: renderGroups, onAddItem: onAddItem, columns: columnsList, startRow: isGrouped ? 0 : startRow, rowsPerPage: rowsPerPage, scrollContainerRef: tableContainerRef, isCheckbox: isCheckbox, columnWidths: columnWidths, slotWidth: slotWidth, noBorders: noBorders, freezedBgColor: freezedBgColor !== null && freezedBgColor !== void 0 ? freezedBgColor : theme.colors.backgroundColor.secondary, freezedTextColor: freezedTextColor !== null && freezedTextColor !== void 0 ? freezedTextColor : theme.colors.text[500], handleCheckbox: handleCheckbox, selections: selection, isLoading: isTableLoading, loadingSkeletonRows: loadingSkeletonRows, onRowClick: onRowClick, isContent: isContent, isLink: isLink, rowDetail: rowDetail, expandedIds: expandedIds, isActionFreeze: isActionFreeze, density: densityState, stripe: stripe, emptyState: emptyState }) })] }), canInfinite && isLoadingMore && ((0, jsx_runtime_1.jsxs)(react_2.Flex, { justify: "center", align: "center", py: 3, gap: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "sm", color: theme.colors.accentText }), (0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "0.75rem", color: theme.colors.text[500], children: "Loading more\u2026" })] }))] }), groupLoadMoreActive && loadMorePosition === "bottom" && (groupLoadMoreCaption || canGroupLoadMore) && ((0, jsx_runtime_1.jsxs)(react_2.Flex, { justify: "center", align: "center", gap: 3, py: 3, borderTop: `0.063rem solid ${(0, planeStep_1.cardRule)(theme.colors)}`, children: [groupLoadMoreCaption && ((0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "0.75rem", color: theme.colors.text[500], 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 }))] }))] })] })] })] }));
|
|
456
460
|
}
|
|
@@ -38,6 +38,7 @@ const react_1 = __importStar(require("react"));
|
|
|
38
38
|
const react_2 = require("@chakra-ui/react");
|
|
39
39
|
const lucide_react_1 = require("lucide-react");
|
|
40
40
|
const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
|
|
41
|
+
const surfaceRaised_1 = require("../../../Theme/tokens/builders/surfaceRaised");
|
|
41
42
|
const assignRef = (ref, value) => {
|
|
42
43
|
if (typeof ref === "function")
|
|
43
44
|
ref(value);
|
|
@@ -88,11 +89,11 @@ const TableActions = react_1.default.memo(({ row }) => {
|
|
|
88
89
|
// ✅ if row itself is missing, render nothing
|
|
89
90
|
if (!row)
|
|
90
91
|
return null;
|
|
91
|
-
return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, children: [(0, jsx_runtime_1.jsx)(react_2.IconButton, { ref: triggerRef, id: `popover-trigger-${popoverId}`, "aria-label": "Actions", "aria-haspopup": "dialog", "aria-expanded": isOpen, "aria-controls": `popover-content-${popoverId}`, color: theme.colors.text[900], icon: (0, jsx_runtime_1.jsx)(lucide_react_1.EllipsisVertical, { size: 17 }), size: "sm", p: 0, variant: "ghost", _hover: { transform: "scale(1.2)" }, onClick: () => (isOpen ? handleClose() : handleOpen()) }), isOpen && ((0, jsx_runtime_1.jsxs)(react_2.Popover, { id: popoverId, placement: "bottom-start", isOpen: true, onClose: handleClose, closeOnBlur: false, returnFocusOnClose: false, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverAnchor, { children: (0, jsx_runtime_1.jsx)(TriggerAnchor, { target: triggerRef }) }), (0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { w: "auto", minW: "100px", boxShadow: "lg", p: 0, zIndex: 999, bg: theme.colors.surfaceRaised, children: (0, jsx_runtime_1.jsx)(react_2.PopoverBody, { p: 0, m: 0, children: (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "stretch", spacing: 1, p: 0, m: 0, children: [row.onLink && ((0, jsx_runtime_1.jsxs)(react_2.Button, { size: "sm", variant: "ghost", justifyContent: "flex-start", borderBottom: `1px solid ${theme.colors
|
|
92
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, children: [(0, jsx_runtime_1.jsx)(react_2.IconButton, { ref: triggerRef, id: `popover-trigger-${popoverId}`, "aria-label": "Actions", "aria-haspopup": "dialog", "aria-expanded": isOpen, "aria-controls": `popover-content-${popoverId}`, color: theme.colors.text[900], icon: (0, jsx_runtime_1.jsx)(lucide_react_1.EllipsisVertical, { size: 17 }), size: "sm", p: 0, variant: "ghost", _hover: { transform: "scale(1.2)" }, onClick: () => (isOpen ? handleClose() : handleOpen()) }), isOpen && ((0, jsx_runtime_1.jsxs)(react_2.Popover, { id: popoverId, placement: "bottom-start", isOpen: true, onClose: handleClose, closeOnBlur: false, returnFocusOnClose: false, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverAnchor, { children: (0, jsx_runtime_1.jsx)(TriggerAnchor, { target: triggerRef }) }), (0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { w: "auto", minW: "100px", boxShadow: "lg", p: 0, zIndex: 999, bg: theme.colors.surfaceRaised, children: (0, jsx_runtime_1.jsx)(react_2.PopoverBody, { p: 0, m: 0, children: (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "stretch", spacing: 1, p: 0, m: 0, children: [row.onLink && ((0, jsx_runtime_1.jsxs)(react_2.Button, { size: "sm", variant: "ghost", justifyContent: "flex-start", borderBottom: `1px solid ${(0, surfaceRaised_1.raisedRule)(theme.colors)}`, borderRadius: 0, gap: 2, onClick: () => {
|
|
92
93
|
var _a;
|
|
93
94
|
(_a = row.onLink) === null || _a === void 0 ? void 0 : _a.call(row, row);
|
|
94
95
|
handleClose();
|
|
95
|
-
}, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { size: 17 }), " View"] })), row.onEdit && ((0, jsx_runtime_1.jsxs)(react_2.Button, { size: "sm", variant: "ghost", justifyContent: "flex-start", gap: 2, borderBottom: `1px solid ${theme.colors
|
|
96
|
+
}, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { size: 17 }), " View"] })), row.onEdit && ((0, jsx_runtime_1.jsxs)(react_2.Button, { size: "sm", variant: "ghost", justifyContent: "flex-start", gap: 2, borderBottom: `1px solid ${(0, surfaceRaised_1.raisedRule)(theme.colors)}`, borderRadius: 0, onClick: () => {
|
|
96
97
|
var _a;
|
|
97
98
|
(_a = row.onEdit) === null || _a === void 0 ? void 0 : _a.call(row, row);
|
|
98
99
|
handleClose();
|
|
@@ -5,6 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const react_2 = require("@chakra-ui/react");
|
|
6
6
|
const lucide_react_1 = require("lucide-react");
|
|
7
7
|
const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
|
|
8
|
+
const surfaceRaised_1 = require("../../../Theme/tokens/builders/surfaceRaised");
|
|
8
9
|
const rowStates_1 = require("../../../Theme/tokens/builders/rowStates");
|
|
9
10
|
const optionRowSizes_1 = require("../../../Theme/tokens/primitives/optionRowSizes");
|
|
10
11
|
const optionRowInk_1 = require("../../Select/optionRowInk");
|
|
@@ -56,7 +57,7 @@ const CompactSelect = ({ options, value, placeholder = "Select", height = "22px"
|
|
|
56
57
|
e.preventDefault();
|
|
57
58
|
focusOption(0);
|
|
58
59
|
}
|
|
59
|
-
}, sx: { fontSize: "0.75rem", height: "22px" } }), (0, jsx_runtime_1.jsxs)(react_2.Box, { role: "listbox", "aria-label": placeholder, maxH: "12rem", overflowY: "auto", borderTop: "1px solid", borderColor: theme.colors
|
|
60
|
+
}, sx: { fontSize: "0.75rem", height: "22px" } }), (0, jsx_runtime_1.jsxs)(react_2.Box, { role: "listbox", "aria-label": placeholder, maxH: "12rem", overflowY: "auto", borderTop: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(theme.colors), onKeyDown: handleListKeyDown, children: [filtered.map((opt, i) => {
|
|
60
61
|
const selected = (value === null || value === void 0 ? void 0 : value.id) === opt.id;
|
|
61
62
|
const isActive = i === activeIndex;
|
|
62
63
|
const rowBg = selected
|
|
@@ -10,13 +10,17 @@ 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 surfaceRaised_1 = require("../../../Theme/tokens/builders/surfaceRaised");
|
|
13
14
|
const scrollbar_1 = require("../../../Theme/tokens/builders/scrollbar");
|
|
14
15
|
const columnLabel_1 = require("../columnLabel");
|
|
15
16
|
const lucide_react_1 = require("lucide-react");
|
|
16
17
|
const ToolTip_1 = __importDefault(require("../../ToolTip/ToolTip"));
|
|
17
18
|
const rowStates_1 = require("../../../Theme/tokens/builders/rowStates");
|
|
18
19
|
const motion_1 = require("../../../Theme/tokens/primitives/motion");
|
|
20
|
+
const motion_2 = require("../../../Theme/chakra/motion");
|
|
19
21
|
const MotionModalContent = (0, framer_motion_1.motion)(react_1.ModalContent);
|
|
22
|
+
const SHEET_ENTER = (0, motion_1.motionTransition)("enter", "out");
|
|
23
|
+
const SHEET_EXIT = (0, motion_1.motionTransition)("exit", "in");
|
|
20
24
|
const DENSITY_OPTIONS = [
|
|
21
25
|
{ value: "compact", label: "Compact", desc: "Tight rows — fit more data on screen" },
|
|
22
26
|
{ value: "normal", label: "Normal", desc: "Balanced default spacing" },
|
|
@@ -24,6 +28,7 @@ const DENSITY_OPTIONS = [
|
|
|
24
28
|
];
|
|
25
29
|
const TableSettings = ({ columns, onSave, density = "normal", onDensityChange, groupBy, }) => {
|
|
26
30
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
31
|
+
const sheetOffset = (0, motion_2.usePrefersReducedMotion)() ? 0 : "-100%";
|
|
27
32
|
const rowBackgrounds = (0, react_2.useMemo)(() => (0, rowStates_1.listRowBackgrounds)(theme.colors), [theme.colors]);
|
|
28
33
|
const childInputMethodsRef = (0, react_2.useRef)({});
|
|
29
34
|
const [settingsOpen, setSettingsOpen] = (0, react_2.useState)(false);
|
|
@@ -57,7 +62,7 @@ const TableSettings = ({ columns, onSave, density = "normal", onDensityChange, g
|
|
|
57
62
|
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: (0, motion_1.transitionFor)(["color", "transform"], "base"), color: theme.colors.text[500], _hover: {
|
|
58
63
|
transform: "scale(1.1)",
|
|
59
64
|
color: theme.colors.accentText
|
|
60
|
-
} }) }), (0, jsx_runtime_1.jsxs)(react_1.Modal, { isOpen: settingsOpen, onClose: () => setSettingsOpen(false), size: { base: "full", md: "md" }, children: [(0, jsx_runtime_1.jsx)(react_1.ModalOverlay, {}), (0, jsx_runtime_1.jsxs)(MotionModalContent, { mt: "0", top: "0", left: { base: 0, md: "auto" }, right: { base: 0, md: "auto" }, position: "absolute", borderTopRadius: "none", initial: { y:
|
|
65
|
+
} }) }), (0, jsx_runtime_1.jsxs)(react_1.Modal, { isOpen: settingsOpen, onClose: () => setSettingsOpen(false), size: { base: "full", md: "md" }, children: [(0, jsx_runtime_1.jsx)(react_1.ModalOverlay, {}), (0, jsx_runtime_1.jsxs)(MotionModalContent, { mt: "0", top: "0", left: { base: 0, md: "auto" }, right: { base: 0, md: "auto" }, position: "absolute", borderTopRadius: "none", initial: { y: sheetOffset, opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: sheetOffset, opacity: 0, transition: SHEET_EXIT }, transition: SHEET_ENTER, padding: "0", minW: { base: "auto", md: "620px" }, minH: { base: "auto", md: "520px" }, maxH: "90vh", display: "flex", flexDirection: "column", bg: theme.colors.surfaceRaised, 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: (0, surfaceRaised_1.raisedRule)(theme.colors), 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) => {
|
|
61
66
|
const selected = density === opt.value;
|
|
62
67
|
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 ? rowBackgrounds.selected : theme.colors.transparent, transition: (0, motion_1.transitionFor)(["background-color", "border-color"]), _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));
|
|
63
68
|
}) }) }), (0, jsx_runtime_1.jsx)(react_1.TabPanel, { px: 0, py: 0, children: (0, jsx_runtime_1.jsx)(react_1.Box, { sx: {
|
|
@@ -78,6 +83,6 @@ const TableSettings = ({ columns, onSave, density = "normal", onDensityChange, g
|
|
|
78
83
|
var _a;
|
|
79
84
|
const selected = selectedGroup === opt.id;
|
|
80
85
|
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 ? rowBackgrounds.selected : theme.colors.transparent, transition: (0, motion_1.transitionFor)(["background-color", "border-color"]), _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__")));
|
|
81
|
-
}) })] })] }) })] }), (0, jsx_runtime_1.jsxs)(react_1.ModalFooter, { gap: "0.5rem", borderTop: "1px solid", borderColor: theme.colors
|
|
86
|
+
}) })] })] }) })] }), (0, jsx_runtime_1.jsxs)(react_1.ModalFooter, { gap: "0.5rem", borderTop: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(theme.colors), 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 })] })] })] })] }));
|
|
82
87
|
};
|
|
83
88
|
exports.default = TableSettings;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.classicPreset = void 0;
|
|
4
4
|
const accentText_1 = require("../../../Theme/tokens/builders/accentText");
|
|
5
|
+
const planeStep_1 = require("../../../Theme/tokens/builders/planeStep");
|
|
5
6
|
const tableRowHoverStyle_1 = require("../components/tableRowHoverStyle");
|
|
6
7
|
const stripe_1 = require("./stripe");
|
|
7
8
|
/**
|
|
@@ -19,14 +20,14 @@ const classicPreset = (colors, isDark) => {
|
|
|
19
20
|
textTransform: "capitalize",
|
|
20
21
|
letterSpacing: "normal",
|
|
21
22
|
height: "45px",
|
|
22
|
-
ruleColor: colors
|
|
23
|
+
ruleColor: (0, planeStep_1.cardRule)(colors),
|
|
23
24
|
showColumnRule: true,
|
|
24
25
|
actions: "always",
|
|
25
26
|
},
|
|
26
27
|
row: {
|
|
27
28
|
hoverBg: (0, tableRowHoverStyle_1.getTableRowHoverStyle)(colors, isDark).backgroundColor,
|
|
28
29
|
hoverScope: "cell",
|
|
29
|
-
ruleColor: colors
|
|
30
|
+
ruleColor: (0, planeStep_1.cardRule)(colors),
|
|
30
31
|
frozenRuleColor: colors.boxborder[300],
|
|
31
32
|
selectedBg: colors.primary.opacity[16],
|
|
32
33
|
selectedBarColor: colors.primary[500],
|
|
@@ -9,6 +9,7 @@ const lucide_react_1 = require("lucide-react");
|
|
|
9
9
|
const react_2 = __importDefault(require("react"));
|
|
10
10
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
11
11
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
12
|
+
const planeStep_1 = require("../../Theme/tokens/builders/planeStep");
|
|
12
13
|
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
13
14
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
14
15
|
const borderWidths_1 = require("../../Theme/tokens/primitives/borderWidths");
|
|
@@ -157,12 +158,14 @@ const NoteItem = react_2.default.memo(function NoteItem({ note, event, index, co
|
|
|
157
158
|
var _a, _b;
|
|
158
159
|
const isEditing = activeEditNoteId === note.log_note_id;
|
|
159
160
|
const isDeleting = deletingNoteId != null && deletingNoteId === note.log_note_id;
|
|
161
|
+
const noteChip = (0, planeStep_1.bandOn)(colors.primary[50], colors.gray[50]);
|
|
162
|
+
const noteChipInk = (0, accentText_1.accentTextOnCanvas)(colors.primary, noteChip);
|
|
160
163
|
if (isEditing) {
|
|
161
164
|
return ((0, jsx_runtime_1.jsx)(react_1.Box, { children: (0, jsx_runtime_1.jsx)(NoteTextArea_1.default, { isEditable: true, value: (_a = note.note) !== null && _a !== void 0 ? _a : "", title: (_b = note.title) !== null && _b !== void 0 ? _b : "", saveButtonLoading: editNoteLoading, handleSubmit: (n, t, f) => onEditNote === null || onEditNote === void 0 ? void 0 : onEditNote(note.log_note_id, n, t, f, event, index), handleCancel: () => setActiveEditNoteId(null) }) }));
|
|
162
165
|
}
|
|
163
166
|
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { position: "relative", zIndex: 1, bg: colors.gray[50], border: `${borderWidths_1.BORDER_WIDTHS.hairline} solid ${colors.boxborder[200]}`, borderRadius: "lg", px: 2.5, py: 2, opacity: isDeleting ? 0.6 : 1, _hover: { ".timeline-note-actions": { opacity: 1 } }, _focusWithin: { ".timeline-note-actions": { opacity: 1 } }, children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", gap: 1.5, mb: note.note ? 1 : 0, children: [(0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", color: (0, accentText_1.accentTextOnCanvas)(colors.primary, colors.gray[50]), display: "inline-flex", children: (0, jsx_runtime_1.jsx)(lucide_react_1.StickyNote, { size: 12 }) }), note.title && ((0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: typography_1.fontSizes["xs-minus"], fontWeight: 700, color: colors.text[800], noOfLines: 1, children: note.title })), (onEditNote || onDeleteNote) && ((0, jsx_runtime_1.jsx)(react_1.Flex, { className: "timeline-note-actions", align: "center", gap: 0.5, ml: "auto", flexShrink: 0, opacity: isDeleting ? 1 : 0, transition: REVEAL_TRANSITION, sx: (0, motion_2.reducedMotionSx)(), children: isDeleting ? ((0, jsx_runtime_1.jsx)(react_1.Spinner, { size: "xs", color: colors.textMuted })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [onEditNote && ((0, jsx_runtime_1.jsx)(react_1.Tooltip, { label: "Edit", placement: "top", hasArrow: true, children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "button", type: "button", "aria-label": "Edit note", sx: (0, focusRing_styles_1.focusVisibleStyles)(colors), display: "inline-flex", alignItems: "center", justifyContent: "center", p: 1, borderRadius: "md", color: colors.textMuted, bg: "transparent", cursor: "pointer", _hover: {
|
|
164
|
-
bg:
|
|
165
|
-
color:
|
|
167
|
+
bg: noteChip,
|
|
168
|
+
color: noteChipInk,
|
|
166
169
|
}, onClick: (e) => {
|
|
167
170
|
e.stopPropagation();
|
|
168
171
|
setActiveEditNoteId(note.log_note_id);
|
|
@@ -172,7 +175,7 @@ const NoteItem = react_2.default.memo(function NoteItem({ note, event, index, co
|
|
|
172
175
|
}, onClick: (e) => {
|
|
173
176
|
e.stopPropagation();
|
|
174
177
|
onDeleteNote === null || onDeleteNote === void 0 ? void 0 : onDeleteNote(note.log_note_id, event, index);
|
|
175
|
-
}, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Trash2, { size: 12 }) }) }))] })) }))] }), note.note && ((0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: typography_1.fontSizes["xs-minus"], color: colors.text[700], whiteSpace: "pre-wrap", children: note.note })), note.attachments && note.attachments.length > 0 && ((0, jsx_runtime_1.jsx)(react_1.Flex, { wrap: "wrap", gap: 1.5, mt: 1.5, children: note.attachments.map((att, attIndex) => ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "a", href: att.url, target: "_blank", rel: "noopener noreferrer", onClick: (e) => e.stopPropagation(), align: "center", gap: 1, px: 1.5, py: 0.5, borderRadius: "full", bg:
|
|
178
|
+
}, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Trash2, { size: 12 }) }) }))] })) }))] }), note.note && ((0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: typography_1.fontSizes["xs-minus"], color: colors.text[700], whiteSpace: "pre-wrap", children: note.note })), note.attachments && note.attachments.length > 0 && ((0, jsx_runtime_1.jsx)(react_1.Flex, { wrap: "wrap", gap: 1.5, mt: 1.5, children: note.attachments.map((att, attIndex) => ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "a", href: att.url, target: "_blank", rel: "noopener noreferrer", onClick: (e) => e.stopPropagation(), align: "center", gap: 1, px: 1.5, py: 0.5, borderRadius: "full", bg: noteChip, color: noteChipInk, fontSize: MIN_TEXT, maxW: "100%", _hover: { bg: colors.primary[100] }, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Paperclip, { size: 10 }), (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", noOfLines: 1, maxW: "9rem", children: att.name || "attachment" })] }, attIndex))) })), (note.created_by || note.created_at) && ((0, jsx_runtime_1.jsxs)(react_1.Text, { fontSize: MIN_TEXT, color: colors.textMuted, mt: 1, children: [note.created_by ? formatName(note.created_by) : "", note.created_by && note.created_at ? " · " : "", note.created_at ? formatTimestamp(note.created_at, "time") : ""] }))] }));
|
|
176
179
|
});
|
|
177
180
|
// The colored event card (shared by both the desktop "tree" and mobile rail).
|
|
178
181
|
// `accent` decides which edge carries the colored bar (pointing toward the spine).
|
|
@@ -182,6 +185,7 @@ const EventCard = react_2.default.memo(function EventCard({ event, index, accent
|
|
|
182
185
|
const changes = (0, react_3.useMemo)(() => parseChanges(event.changes), [event.changes]);
|
|
183
186
|
const clickable = typeof onEventClick === "function";
|
|
184
187
|
const actor = formatName(event.action_by);
|
|
188
|
+
const addNoteHover = (0, planeStep_1.bandOn)(colors.primary[50], colors.background[50]);
|
|
185
189
|
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, { position: "relative", zIndex: 1, bg: colors.background[50], border: `${borderWidths_1.BORDER_WIDTHS.hairline} 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, ...(clickable && {
|
|
186
190
|
transition: CARD_TRANSITION,
|
|
187
191
|
_hover: {
|
|
@@ -194,7 +198,10 @@ const EventCard = react_2.default.memo(function EventCard({ event, index, accent
|
|
|
194
198
|
e.stopPropagation();
|
|
195
199
|
setActiveNoteEventIndex(isActiveNote ? null : index);
|
|
196
200
|
}, position: "relative", zIndex: 1, opacity: isActiveNote ? 1 : 0, transition: REVEAL_TRANSITION, sx: { ...(0, focusRing_styles_1.focusVisibleStyles)(colors), ...(0, motion_2.reducedMotionSx)() }, px: 2, py: 1, borderRadius: "md", fontSize: typography_1.fontSizes.xs, fontWeight: 600, color: (0, accentText_1.accentTextOnCanvas)(colors.primary, colors.background[50]), bg: "transparent", cursor: "pointer", _hover: {
|
|
197
|
-
bg:
|
|
201
|
+
bg: addNoteHover,
|
|
202
|
+
color: addNoteHover === colors.primary[50]
|
|
203
|
+
? undefined
|
|
204
|
+
: (0, accentText_1.accentTextOnCanvas)(colors.primary, addNoteHover),
|
|
198
205
|
}, children: isActiveNote ? "Hide note" : "Add note" }))] }), event.notes && event.notes.length > 0 && ((0, jsx_runtime_1.jsx)(react_1.Flex, { direction: "column", gap: 2, mt: 2, pt: 2, borderTop: `${borderWidths_1.BORDER_WIDTHS.hairline} solid ${colors.boxborder[200]}`, children: event.notes.map((note, noteIndex) => {
|
|
199
206
|
var _a;
|
|
200
207
|
return ((0, jsx_runtime_1.jsx)(NoteItem, { note: note, event: event, index: index, colors: colors, activeEditNoteId: activeEditNoteId, setActiveEditNoteId: setActiveEditNoteId, editNoteLoading: editNoteLoading, deletingNoteId: deletingNoteId, onEditNote: onEditNote, onDeleteNote: onDeleteNote }, (_a = note.log_note_id) !== null && _a !== void 0 ? _a : noteIndex));
|
|
@@ -17,6 +17,7 @@ const motion_1 = require("../../Theme/chakra/motion");
|
|
|
17
17
|
const motion_2 = require("../../Theme/tokens/primitives/motion");
|
|
18
18
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
19
19
|
const tone_1 = require("../../Theme/tokens/builders/tone");
|
|
20
|
+
const color_1 = require("../../Theme/tokens/builders/color");
|
|
20
21
|
const ToasterContext = (0, react_1.createContext)(undefined);
|
|
21
22
|
const shrink = (0, react_3.keyframes) `
|
|
22
23
|
from { transform: scaleX(1); }
|
|
@@ -24,11 +25,13 @@ const shrink = (0, react_3.keyframes) `
|
|
|
24
25
|
`;
|
|
25
26
|
// One-shot ring pulse on the status icon — a subtle "just happened" beat.
|
|
26
27
|
const iconPulse = (0, react_3.keyframes) `
|
|
27
|
-
0% {
|
|
28
|
-
70% {
|
|
29
|
-
100% {
|
|
28
|
+
0% { transform: scale(1); opacity: 1; }
|
|
29
|
+
70% { transform: scale(1.5); opacity: 0; }
|
|
30
|
+
100% { transform: scale(1.5); opacity: 0; }
|
|
30
31
|
`;
|
|
31
32
|
const MotionBox = (0, framer_motion_1.motion)(react_2.Box);
|
|
33
|
+
const TOAST_ENTER = (0, motion_2.motionTransition)("enter", "out");
|
|
34
|
+
const TOAST_EXIT = (0, motion_2.motionTransition)("exit", "in");
|
|
32
35
|
// Presentational toast card — owns hover state so auto-dismiss pauses while the pointer is over it.
|
|
33
36
|
function ToastCard({ onClose, title, description, actions, isClosable, duration, meta, colors: c, isUrgent, }) {
|
|
34
37
|
const [paused, setPaused] = (0, react_1.useState)(false);
|
|
@@ -40,15 +43,23 @@ function ToastCard({ onClose, title, description, actions, isClosable, duration,
|
|
|
40
43
|
, {
|
|
41
44
|
// The single live-region root: an explicit aria-live here, on the card's own
|
|
42
45
|
// root, keeps errors from being announced a second time by a duplicate wrapper.
|
|
43
|
-
role: isUrgent ? "alert" : undefined, "aria-live": isUrgent ? "assertive" : undefined, initial: { opacity: 0, x: 24 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: 24
|
|
46
|
+
role: isUrgent ? "alert" : undefined, "aria-live": isUrgent ? "assertive" : undefined, initial: { opacity: 0, x: 24 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: 24, transition: TOAST_EXIT }, transition: TOAST_ENTER, onHoverStart: () => setPaused(true), onHoverEnd: () => setPaused(false), position: "relative", bg: c.surfaceRaised, border: `0.0625rem solid ${c.boxborder[200]}`, boxShadow: "md", borderRadius: "xl", overflow: "hidden", minW: "22.5rem", maxW: "26rem", sx: {
|
|
44
47
|
isolation: "isolate",
|
|
45
48
|
transition: (0, motion_2.transitionFor)(["box-shadow"]),
|
|
46
49
|
_hover: { boxShadow: "lg" },
|
|
47
50
|
...(0, motion_1.reducedMotionSx)(),
|
|
48
|
-
}, 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: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
}, 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", position: "relative", bg: (0, color_1.compositeOver)(tone.bg, c.surfaceRaised), color: tone.fg, sx: {
|
|
52
|
+
"&::after": {
|
|
53
|
+
content: '""',
|
|
54
|
+
position: "absolute",
|
|
55
|
+
inset: 0,
|
|
56
|
+
borderRadius: "full",
|
|
57
|
+
bg: tone.border,
|
|
58
|
+
zIndex: -1,
|
|
59
|
+
opacity: 0,
|
|
60
|
+
animation: `${iconPulse} 900ms ease-out 1`,
|
|
61
|
+
...(0, motion_1.reducedMotionSx)(),
|
|
62
|
+
},
|
|
52
63
|
}, children: meta.icon }), (0, jsx_runtime_1.jsxs)(react_2.VisuallyHidden, { children: [meta.label, ":"] }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: "1", minW: 0, children: [title && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: 600, fontSize: "0.875rem", lineHeight: "1.3", color: c.text[800], children: title })), description && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "0.8125rem", lineHeight: "1.45", color: c.textMuted, mt: title ? "0.125rem" : 0, children: description })), actions && ((0, jsx_runtime_1.jsx)(react_2.Flex, { gap: 2, mt: 2.5, align: "center", wrap: "wrap", children: actions(onClose) }))] }), isClosable && ((0, jsx_runtime_1.jsx)(react_2.CloseButton, { onClick: onClose, size: "sm", color: c.textMuted, borderRadius: "md", alignSelf: "flex-start", _hover: {
|
|
53
64
|
bg: c.gray[100],
|
|
54
65
|
color: c.text[700],
|
|
@@ -13,9 +13,12 @@ const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
|
|
|
13
13
|
const useSlidingPill_1 = require("../SegmentedControl/useSlidingPill");
|
|
14
14
|
const controlSizes_1 = require("../../Theme/tokens/primitives/controlSizes");
|
|
15
15
|
const borderWidths_1 = require("../../Theme/tokens/primitives/borderWidths");
|
|
16
|
+
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
16
17
|
const MODES = ["grid", "list"];
|
|
17
18
|
const TRACK_HEIGHT = controlSizes_1.BUTTON_SIZES.sm.height;
|
|
18
19
|
const SEGMENT_HEIGHT = `calc(${TRACK_HEIGHT} - 0.25rem)`;
|
|
20
|
+
const INK_TRANSITION = (0, motion_1.transitionFor)(["color"], "base");
|
|
21
|
+
const PILL_TRANSITION = (0, motion_1.transitionFor)(["transform", "width"], "base", "out");
|
|
19
22
|
/** Two icon-only IconButtons (Grid/List), aria-pressed marks the active one; shares variant with SegmentedControl (see MODULE.md). */
|
|
20
23
|
const TableToggle = ({ value, onChange, variant = "default" }) => {
|
|
21
24
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
@@ -76,10 +79,10 @@ const TableToggle = ({ value, onChange, variant = "default" }) => {
|
|
|
76
79
|
? colors.accentText
|
|
77
80
|
: hoverInk,
|
|
78
81
|
},
|
|
79
|
-
transition:
|
|
82
|
+
transition: INK_TRANSITION,
|
|
80
83
|
}),
|
|
81
84
|
};
|
|
82
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { ref: trackRef, ...styles.container, children: [isBrandSlide && pill && ((0, jsx_runtime_1.jsx)(react_1.Box, { "aria-hidden": "true", position: "absolute", top: "0.125rem", left: 0, h: SEGMENT_HEIGHT, w: `${pill.width}px`, borderRadius: "lg", bg: brandFill.fill, boxShadow: `0 0.125rem 0.5rem ${colors.boxShadow.primary}`, transform: `translateX(${pill.left}px)`, transition:
|
|
85
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { ref: trackRef, ...styles.container, children: [isBrandSlide && pill && ((0, jsx_runtime_1.jsx)(react_1.Box, { "aria-hidden": "true", position: "absolute", top: "0.125rem", left: 0, h: SEGMENT_HEIGHT, w: `${pill.width}px`, borderRadius: "lg", bg: brandFill.fill, boxShadow: `0 0.125rem 0.5rem ${colors.boxShadow.primary}`, transform: `translateX(${pill.left}px)`, transition: PILL_TRANSITION })), isUnderlineSlide && pill && ((0, jsx_runtime_1.jsx)(react_1.Box, { "aria-hidden": "true", position: "absolute", bottom: `-${borderWidths_1.BORDER_WIDTHS.hairline}`, left: 0, h: "0.125rem", w: `${pill.width}px`, borderRadius: "full", bg: colors.primary[500], transform: `translateX(${pill.left}px)`, transition: PILL_TRANSITION })), (0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: "Grid View", placement: "top", fontSize: "xs", hasArrow: true, children: (0, jsx_runtime_1.jsx)(react_1.IconButton, { ref: (node) => {
|
|
83
86
|
refs.current[0] = node;
|
|
84
87
|
}, "aria-label": "Grid View", "aria-pressed": value === "grid", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Table2, { size: "1.25rem" }), variant: "ghost", onClick: () => onChange("grid"), ...styles.button("grid") }) }), (0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: "List View", placement: "top", fontSize: "xs", hasArrow: true, children: (0, jsx_runtime_1.jsx)(react_1.IconButton, { ref: (node) => {
|
|
85
88
|
refs.current[1] = node;
|
|
@@ -7,6 +7,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const react_2 = require("@chakra-ui/react");
|
|
9
9
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
10
|
+
const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
|
|
10
11
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
11
12
|
const TextInput_1 = __importDefault(require("../Input/TextInput"));
|
|
12
13
|
const SearchSelect_1 = __importDefault(require("../SearchSelect/SearchSelect"));
|
|
@@ -80,7 +81,7 @@ const AddUserModal = ({ isOpen, onClose, roleOptions, isLoading, onSubmit, onAdd
|
|
|
80
81
|
type: "email",
|
|
81
82
|
},
|
|
82
83
|
];
|
|
83
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, trapFocus: false, isCentered: true, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: colors
|
|
84
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, trapFocus: false, isCentered: true, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(colors), children: [labels.addNewUser, upgradeNotice] }), (0, jsx_runtime_1.jsx)(react_2.ModalCloseButton, {}), (0, jsx_runtime_1.jsx)(react_2.ModalBody, { py: 5, children: (0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: 4, align: "stretch", children: [textFields.map((field) => ((0, jsx_runtime_1.jsx)(react_2.FormControl, { isInvalid: !!errors[field.id], children: (0, jsx_runtime_1.jsx)(TextInput_1.default, { id: field.id, name: field.id, type: field.type, label: field.label, placeholder: field.placeholder, value: values[field.id], onChange: handleChange(field.id), isRequired: true, error: !!errors[field.id], errorMessage: errors[field.id], width: "100%" }) }, field.id))), (0, jsx_runtime_1.jsx)(react_2.FormControl, { isInvalid: !!errors.role, isRequired: true, children: (0, jsx_runtime_1.jsx)(SearchSelect_1.default, { label: labels.role, options: roleOptions.map((item) => ({
|
|
84
85
|
id: item.id,
|
|
85
86
|
label: item.label,
|
|
86
87
|
})), value: (_a = values.role) !== null && _a !== void 0 ? _a : undefined, onSelect: (option) => {
|
|
@@ -7,6 +7,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const react_2 = require("@chakra-ui/react");
|
|
9
9
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
10
|
+
const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
|
|
10
11
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
11
12
|
const TextInput_1 = __importDefault(require("../Input/TextInput"));
|
|
12
13
|
const SearchSelect_1 = __importDefault(require("../SearchSelect/SearchSelect"));
|
|
@@ -36,7 +37,7 @@ const ChangeRoleModal = ({ isOpen, onClose, userId, email, currentRole, roleOpti
|
|
|
36
37
|
return;
|
|
37
38
|
await (onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit({ userId, roleId: selectedRole.id }));
|
|
38
39
|
};
|
|
39
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, trapFocus: false, isCentered: true, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: colors
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, trapFocus: false, isCentered: true, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(colors), children: labels.changeRoleTitle }), (0, jsx_runtime_1.jsx)(react_2.ModalCloseButton, {}), (0, jsx_runtime_1.jsx)(react_2.ModalBody, { py: 5, children: (0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: 4, align: "stretch", children: [(0, jsx_runtime_1.jsx)(TextInput_1.default, { label: labels.email, value: email !== null && email !== void 0 ? email : "", isDisabled: true, width: "100%" }), (0, jsx_runtime_1.jsx)(react_2.FormControl, { isInvalid: !!error, isRequired: true, children: (0, jsx_runtime_1.jsx)(SearchSelect_1.default, { label: labels.role, options: roleOptions.map((item) => ({
|
|
40
41
|
id: item.id,
|
|
41
42
|
label: item.label,
|
|
42
43
|
})), value: selectedRole !== null && selectedRole !== void 0 ? selectedRole : undefined, onSelect: (option) => {
|
|
@@ -44,6 +44,7 @@ const lucide_react_1 = require("lucide-react");
|
|
|
44
44
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
45
45
|
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
46
46
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
47
|
+
const planeStep_1 = require("../../Theme/tokens/builders/planeStep");
|
|
47
48
|
const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
|
|
48
49
|
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
49
50
|
const EmptyState_1 = __importDefault(require("../EmptyState/EmptyState"));
|
|
@@ -98,6 +99,7 @@ const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], ca
|
|
|
98
99
|
const [actionUserId, setActionUserId] = (0, react_1.useState)(null);
|
|
99
100
|
const border = colors.boxborder[200];
|
|
100
101
|
const surface = colors.background[50];
|
|
102
|
+
const detailTile = (0, planeStep_1.bandOn)(colors.primary[50], surface);
|
|
101
103
|
const rowBackgrounds = (0, react_1.useMemo)(() => (0, rowStates_1.listRowBackgrounds)(colors), [colors]);
|
|
102
104
|
const muted = colors.textMuted;
|
|
103
105
|
const heading = colors.text[900];
|
|
@@ -138,7 +140,7 @@ const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], ca
|
|
|
138
140
|
const Icon = (_a = detail.icon) !== null && _a !== void 0 ? _a : lucide_react_1.UserRound;
|
|
139
141
|
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { gap: 3, px: 3, py: 2.5, _hover: {
|
|
140
142
|
bg: (0, outlineRung_1.resolveHoverTint)(colors.gray[50], surface),
|
|
141
|
-
}, alignItems: "center", transition: "background 0.15s ease", children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "30px", bg:
|
|
143
|
+
}, alignItems: "center", transition: "background 0.15s ease", children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "30px", bg: detailTile, borderRadius: "lg", color: (0, accentText_1.accentTextOnCanvas)(colors.primary, detailTile), flexShrink: 0, children: (0, jsx_runtime_1.jsx)(Icon, { size: 15 }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { minWidth: "110px", children: (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "xs", fontWeight: 600, color: muted, children: detail.label }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { flex: 1, children: (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: heading, fontWeight: 500, children: detail.value }) })] }), index < selectedUser.details.length - 1 && ((0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: border }))] }, index));
|
|
142
144
|
}) })] })] })) : ((0, jsx_runtime_1.jsx)(EmptyState_1.default, { icon: lucide_react_1.UserRound, title: labels.selectTeamMember, description: labels.noUserSelected, minH: "300px" })) })] }), (0, jsx_runtime_1.jsx)(AddUserModal_1.default, { isOpen: isAddUserOpen, onClose: onAddUserClose, roleOptions: roleOptions, isLoading: isAddUserLoading, onSubmit: async (values) => {
|
|
143
145
|
await (onAddUserSubmit === null || onAddUserSubmit === void 0 ? void 0 : onAddUserSubmit(values));
|
|
144
146
|
onAddUserClose();
|
|
@@ -67,10 +67,16 @@ export declare const Card: {
|
|
|
67
67
|
[$shadow.variable]: string;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
+
elevated: {
|
|
71
|
+
container: {
|
|
72
|
+
[$border.variable]: string;
|
|
73
|
+
[$shadow.variable]: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
70
76
|
} | undefined;
|
|
71
77
|
defaultProps?: {
|
|
72
78
|
size?: "sm" | "md" | "lg" | undefined;
|
|
73
|
-
variant?: "outline" | undefined;
|
|
79
|
+
variant?: "elevated" | "outline" | undefined;
|
|
74
80
|
colorScheme?: string | undefined;
|
|
75
81
|
} | undefined;
|
|
76
82
|
parts: ("header" | "container" | "body" | "footer")[];
|
|
@@ -39,10 +39,13 @@ const variants = {
|
|
|
39
39
|
outline: definePartsStyle({
|
|
40
40
|
container: { [$border.variable]: "1px", [$shadow.variable]: "none" },
|
|
41
41
|
}),
|
|
42
|
+
elevated: definePartsStyle({
|
|
43
|
+
container: { [$border.variable]: "0", [$shadow.variable]: "shadows.card" },
|
|
44
|
+
}),
|
|
42
45
|
};
|
|
43
46
|
exports.Card = defineMultiStyleConfig({
|
|
44
47
|
baseStyle,
|
|
45
48
|
sizes,
|
|
46
49
|
variants,
|
|
47
|
-
defaultProps: { variant: "
|
|
50
|
+
defaultProps: { variant: "elevated", size: "md" },
|
|
48
51
|
});
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { StyleFunctionProps } from "@chakra-ui/react";
|
|
2
|
-
declare const $bg: {
|
|
3
|
-
variable: string;
|
|
4
|
-
reference: string;
|
|
5
|
-
};
|
|
6
2
|
declare const $itemBg: {
|
|
7
3
|
variable: string;
|
|
8
4
|
reference: string;
|
|
@@ -10,7 +6,8 @@ declare const $itemBg: {
|
|
|
10
6
|
export declare const Menu: {
|
|
11
7
|
baseStyle?: (({ theme }: StyleFunctionProps) => {
|
|
12
8
|
list: {
|
|
13
|
-
|
|
9
|
+
borderRadius: "xl";
|
|
10
|
+
boxShadow: "md";
|
|
14
11
|
bg: string;
|
|
15
12
|
color: string;
|
|
16
13
|
borderWidth: string;
|
|
@@ -22,6 +19,7 @@ export declare const Menu: {
|
|
|
22
19
|
px: string;
|
|
23
20
|
py: string;
|
|
24
21
|
mx: string;
|
|
22
|
+
width: string;
|
|
25
23
|
fontSize: string;
|
|
26
24
|
borderRadius: "md";
|
|
27
25
|
bg: string;
|
|
@@ -6,6 +6,7 @@ const anatomy_1 = require("@chakra-ui/anatomy");
|
|
|
6
6
|
const rowStates_1 = require("../tokens/builders/rowStates");
|
|
7
7
|
const optionRowSizes_1 = require("../tokens/primitives/optionRowSizes");
|
|
8
8
|
const paletteFromTheme_1 = require("./paletteFromTheme");
|
|
9
|
+
const overlay_styles_1 = require("./overlay.styles");
|
|
9
10
|
const itemRowSpec = optionRowSizes_1.OPTION_ROW_SIZES.sm;
|
|
10
11
|
const { defineMultiStyleConfig, definePartsStyle } = (0, react_1.createMultiStyleConfigHelpers)(anatomy_1.menuAnatomy.keys);
|
|
11
12
|
const $bg = (0, react_1.cssVar)("menu-bg");
|
|
@@ -24,12 +25,14 @@ const baseStyle = definePartsStyle(({ theme }) => {
|
|
|
24
25
|
borderWidth: "1px",
|
|
25
26
|
borderStyle: "solid",
|
|
26
27
|
borderColor: colors.boxborder[200],
|
|
28
|
+
...overlay_styles_1.POPUP_SURFACE,
|
|
27
29
|
},
|
|
28
30
|
item: {
|
|
29
31
|
minH: itemRowSpec.minH,
|
|
30
32
|
px: itemRowSpec.px,
|
|
31
33
|
py: itemRowSpec.py,
|
|
32
34
|
mx: itemRowSpec.mx,
|
|
35
|
+
width: `calc(100% - 2 * ${itemRowSpec.mx})`,
|
|
33
36
|
fontSize: itemRowSpec.fontSize,
|
|
34
37
|
borderRadius: optionRowSizes_1.OPTION_ROW_RADIUS,
|
|
35
38
|
bg: "transparent",
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import type { StyleFunctionProps } from "@chakra-ui/react";
|
|
2
|
-
declare const $popperBg: {
|
|
3
|
-
variable: string;
|
|
4
|
-
reference: string;
|
|
5
|
-
};
|
|
6
|
-
declare const $arrowShadowColor: {
|
|
7
|
-
variable: string;
|
|
8
|
-
reference: string;
|
|
9
|
-
};
|
|
10
2
|
export declare const Popover: {
|
|
11
3
|
baseStyle?: (({ theme }: StyleFunctionProps) => {
|
|
12
4
|
content: {
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
borderRadius: "xl";
|
|
6
|
+
boxShadow: "md";
|
|
15
7
|
bg: string;
|
|
16
8
|
color: string;
|
|
17
9
|
borderWidth: string;
|
|
@@ -36,4 +28,3 @@ export declare const Popover: {
|
|
|
36
28
|
} | undefined;
|
|
37
29
|
parts: ("header" | "content" | "body" | "footer" | "closeButton" | "popper" | "arrow")[];
|
|
38
30
|
};
|
|
39
|
-
export {};
|
|
@@ -4,6 +4,7 @@ exports.Popover = void 0;
|
|
|
4
4
|
const react_1 = require("@chakra-ui/react");
|
|
5
5
|
const anatomy_1 = require("@chakra-ui/anatomy");
|
|
6
6
|
const paletteFromTheme_1 = require("./paletteFromTheme");
|
|
7
|
+
const overlay_styles_1 = require("./overlay.styles");
|
|
7
8
|
const { defineMultiStyleConfig, definePartsStyle } = (0, react_1.createMultiStyleConfigHelpers)(anatomy_1.popoverAnatomy.keys);
|
|
8
9
|
const $popperBg = (0, react_1.cssVar)("popper-bg");
|
|
9
10
|
const $arrowShadowColor = (0, react_1.cssVar)("popper-arrow-shadow-color");
|
|
@@ -19,6 +20,7 @@ const baseStyle = definePartsStyle(({ theme }) => {
|
|
|
19
20
|
borderWidth: "1px",
|
|
20
21
|
borderStyle: "solid",
|
|
21
22
|
borderColor: colors.boxborder[200],
|
|
23
|
+
...overlay_styles_1.POPUP_SURFACE,
|
|
22
24
|
},
|
|
23
25
|
};
|
|
24
26
|
});
|