pixelize-design-library 2.4.2-beta.2 → 2.4.2-beta.20
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/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/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 +5 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.js +17 -3
- package/package.json +4 -2
|
@@ -43,6 +43,7 @@ const dnd_1 = require("@hello-pangea/dnd");
|
|
|
43
43
|
const lucide_react_1 = require("lucide-react");
|
|
44
44
|
const react_window_1 = require("react-window");
|
|
45
45
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
46
|
+
const scrollbar_1 = require("../../Theme/tokens/builders/scrollbar");
|
|
46
47
|
const usePreferences_1 = require("../../Hooks/usePreferences");
|
|
47
48
|
const AccountCard_1 = __importDefault(require("./AccountCard"));
|
|
48
49
|
const HeaderActions_1 = __importDefault(require("../Header/HeaderActions"));
|
|
@@ -402,37 +403,15 @@ const KanbanBoard = ({ data, customColumns, customizeColumn, onDrag, onDelete, o
|
|
|
402
403
|
: colors.boxborder[200]}`, transition: "background 0.15s ease, border-color 0.15s ease, width 0.2s ease", display: "flex", flexDirection: "column", flexShrink: 0, overflow: isColCollapsed ? "visible" : "hidden", height: `${containerHeight - 60}px`, onMouseEnter: () => setHoveredColumn(colId), onMouseLeave: () => setHoveredColumn(null), children: [isColCollapsed ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { direction: "column", align: "stretch", flex: "1", width: "100%", minH: 0, overflow: "visible", position: "relative", children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "header", direction: "column", align: "center", flexShrink: 0, width: "100%", py: 3, px: 1, gap: 3, borderTop: "0.25rem solid", borderTopColor: (_a = column.color) !== null && _a !== void 0 ? _a : colors.primary[500], bg: colors.background[100], position: "relative", zIndex: 1, children: [enableColumnReorder && columnDragHandleProps ? ((0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", flexShrink: 0, cursor: "grab", ...columnDragHandleProps, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.GripVertical, size: 14, color: colors.textMuted }) })) : null, enableColumnCollapse && ((0, jsx_runtime_1.jsx)(react_2.Flex, { flexShrink: 0, w: "100%", justify: "center", bg: colors.background[100], position: "relative", zIndex: 3, children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Expand column", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 14 }), variant: "ghost", size: "xs", minW: "1.5rem", h: "1.75rem", onClick: () => toggleColumnCollapsed(colId) }) })), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", fontWeight: "700", fontSize: "0.75rem", color: colors.text[700], sx: {
|
|
403
404
|
writingMode: "vertical-rl",
|
|
404
405
|
textOrientation: "mixed",
|
|
405
|
-
}, maxH: `${Math.max(120, containerHeight - 200)}px`, overflow: "hidden", lineHeight: "1.2", title: column.title, children: column.title }), (0, jsx_runtime_1.jsx)(react_2.Badge, { minW: "1.25rem", h: "1.25rem", borderRadius: "full", border: "1px solid", borderColor: colors.boxborder[200], display: "flex", backgroundColor: colors.background[100], alignItems: "center", justifyContent: "center", color: colors.text[900], fontWeight: 600, fontSize: "10px", children: (_b = column === null || column === void 0 ? void 0 : column.items) === null || _b === void 0 ? void 0 : _b.length })] }), column.customNode ? ((0, jsx_runtime_1.jsx)(react_2.Box, { flexShrink: 0, minH: COLLAPSED_CUSTOM_NODE_TOP_RESERVE, w: "100%", bg: colors.background[100], "aria-hidden": true })) : null, column.customNode ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "section", "aria-label": "Column summary", flex: "1", minH: 0, w: "100%", overflow: "visible", py: 2, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "flex-start", bg: colors.background[100], position: "relative", zIndex: 2, children: (0, jsx_runtime_1.jsx)(react_2.Box, { position: "relative", transform: "rotate(90deg)", transformOrigin: "center center", marginTop: '1rem', children: (0, jsx_runtime_1.jsx)(react_2.VStack, { align: "stretch", spacing: 1, minW: "max-content", fontSize: "xs", color: colors.text[600], children: column.customNode() }) }) })) : ((0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1", minH: 0 }))] })) : ((0, jsx_runtime_1.jsxs)(react_2.Flex, { width: "100%", h: !isColCollapsed && !!((_c = column.customNode) === null || _c === void 0 ? void 0 : _c.call(column)) ? "auto" : "2.75rem", align: !isColCollapsed && !!((_d = column.customNode) === null || _d === void 0 ? void 0 : _d.call(column)) ? "flex-start" : "center", px: 3, py: 2, flexShrink: 0, justifyContent: "space-between", position: "relative", gap: 2, borderBottom: `0.063rem solid ${colors.boxborder[
|
|
406
|
+
}, maxH: `${Math.max(120, containerHeight - 200)}px`, overflow: "hidden", lineHeight: "1.2", title: column.title, children: column.title }), (0, jsx_runtime_1.jsx)(react_2.Badge, { minW: "1.25rem", h: "1.25rem", borderRadius: "full", border: "1px solid", borderColor: colors.boxborder[200], display: "flex", backgroundColor: colors.background[100], alignItems: "center", justifyContent: "center", color: colors.text[900], fontWeight: 600, fontSize: "10px", children: (_b = column === null || column === void 0 ? void 0 : column.items) === null || _b === void 0 ? void 0 : _b.length })] }), column.customNode ? ((0, jsx_runtime_1.jsx)(react_2.Box, { flexShrink: 0, minH: COLLAPSED_CUSTOM_NODE_TOP_RESERVE, w: "100%", bg: colors.background[100], "aria-hidden": true })) : null, column.customNode ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "section", "aria-label": "Column summary", flex: "1", minH: 0, w: "100%", overflow: "visible", py: 2, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "flex-start", bg: colors.background[100], position: "relative", zIndex: 2, children: (0, jsx_runtime_1.jsx)(react_2.Box, { position: "relative", transform: "rotate(90deg)", transformOrigin: "center center", marginTop: '1rem', children: (0, jsx_runtime_1.jsx)(react_2.VStack, { align: "stretch", spacing: 1, minW: "max-content", fontSize: "xs", color: colors.text[600], children: column.customNode() }) }) })) : ((0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1", minH: 0 }))] })) : ((0, jsx_runtime_1.jsxs)(react_2.Flex, { width: "100%", h: !isColCollapsed && !!((_c = column.customNode) === null || _c === void 0 ? void 0 : _c.call(column)) ? "auto" : "2.75rem", align: !isColCollapsed && !!((_d = column.customNode) === null || _d === void 0 ? void 0 : _d.call(column)) ? "flex-start" : "center", px: 3, py: 2, flexShrink: 0, justifyContent: "space-between", position: "relative", gap: 2, borderBottom: `0.063rem solid ${colors.boxborder[200]}`, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { direction: "column", gap: 1, minW: 0, flex: "1", children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { boxSize: "0.625rem", borderRadius: "full", bg: (_e = column.color) !== null && _e !== void 0 ? _e : colors.primary[500], flexShrink: 0 }), enableColumnReorder && columnDragHandleProps ? ((0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", flexShrink: 0, cursor: "grab", ...columnDragHandleProps, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.GripVertical, size: 14, color: colors.textMuted }) })) : null, (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", fontWeight: "600", fontSize: "0.875rem", color: colors.text[700], noOfLines: 1, minW: 0, children: (0, jsx_runtime_1.jsx)(OverflowTooltipText_1.default, { placement: "top", children: column.title }) })] }), column.customNode ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "section", "aria-label": "Column summary", width: "100%", flexShrink: 0, fontSize: "xs", color: colors.text[600], children: (_f = column.customNode) === null || _f === void 0 ? void 0 : _f.call(column) })) : null] }), (0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", gap: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Badge, { minW: "1.5rem", h: "1.5rem", px: 2, borderRadius: "full", backgroundColor: colors.gray[100], display: "flex", alignItems: "center", justifyContent: "center", color: colors.text[700], fontWeight: 600, fontSize: "0.625rem", children: (_g = column === null || column === void 0 ? void 0 : column.items) === null || _g === void 0 ? void 0 : _g.length }), enableColumnCollapse && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Collapse column", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { size: 14 }), variant: "ghost", size: "xs", minW: "1.5rem", h: "1.75rem", flexShrink: 0, onClick: () => toggleColumnCollapsed(colId) })), canDelete &&
|
|
406
407
|
hoveredColumn === colId &&
|
|
407
408
|
column.items.length > 0 && ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.Trash2, size: 16, cursor: "pointer", color: colors.text[600], _hover: { color: colors.semanticText.error }, onClick: () => handleColumnDelete(colId), transition: "color 0.2s ease", flexShrink: 0 })), !(canDelete &&
|
|
408
409
|
hoveredColumn === colId &&
|
|
409
410
|
column.items.length > 0) && (0, jsx_runtime_1.jsx)(react_2.Box, { width: "16px", height: "16px", flexShrink: 0 })] })] })), !isColCollapsed && ((0, jsx_runtime_1.jsxs)(react_2.Box, { px: 2, flex: "1", overflowY: "auto", width: "100%", sx: {
|
|
411
|
+
...(0, scrollbar_1.scrollbarStyles)(colors),
|
|
410
412
|
overflowY: "auto",
|
|
411
413
|
overflowX: "hidden",
|
|
412
|
-
|
|
413
|
-
scrollbarColor: `${colors.gray[300]} transparent`,
|
|
414
|
-
"&::-webkit-scrollbar": {
|
|
415
|
-
width: "6px !important",
|
|
416
|
-
height: "6px !important",
|
|
417
|
-
},
|
|
418
|
-
"&::-webkit-scrollbar-track": {
|
|
419
|
-
background: colors.gray[100],
|
|
420
|
-
borderRadius: "base",
|
|
421
|
-
marginTop: "4px",
|
|
422
|
-
marginBottom: "4px",
|
|
423
|
-
},
|
|
424
|
-
"&::-webkit-scrollbar-thumb": {
|
|
425
|
-
background: colors.gray[300],
|
|
426
|
-
borderRadius: "base",
|
|
427
|
-
border: "1px solid",
|
|
428
|
-
borderColor: colors.gray[100],
|
|
429
|
-
},
|
|
430
|
-
"&::-webkit-scrollbar-thumb:hover": {
|
|
431
|
-
background: colors.gray[400],
|
|
432
|
-
},
|
|
433
|
-
"&": {
|
|
434
|
-
scrollbarGutter: "stable both-edges",
|
|
435
|
-
},
|
|
414
|
+
"&": { scrollbarGutter: "stable both-edges" },
|
|
436
415
|
cursor: canDrag ? "grab" : "not-allowed",
|
|
437
416
|
}, children: [(noItems === null || noItems === void 0 ? void 0 : noItems.isVisible) && column.items.length === 0 && ((0, jsx_runtime_1.jsx)(NoItemsTemplate, { column: column, noItems: noItems, colors: colors })), virtualization ? ((0, jsx_runtime_1.jsx)(react_window_1.VariableSizeList, { ref: (el) => {
|
|
438
417
|
if (el)
|
|
@@ -447,26 +426,7 @@ const KanbanBoard = ({ data, customColumns, customizeColumn, onDrag, onDelete, o
|
|
|
447
426
|
return null;
|
|
448
427
|
const showAddColumn = Boolean(customizeColumn === null || customizeColumn === void 0 ? void 0 : customizeColumn.isVisible);
|
|
449
428
|
const hasAnyColumns = Object.keys(columns).length > 0;
|
|
450
|
-
const flexScrollSx =
|
|
451
|
-
"&::-webkit-scrollbar": {
|
|
452
|
-
height: "6px",
|
|
453
|
-
},
|
|
454
|
-
"&::-webkit-scrollbar-track": {
|
|
455
|
-
background: colors.gray[100],
|
|
456
|
-
borderRadius: "base",
|
|
457
|
-
margin: "0 4px",
|
|
458
|
-
},
|
|
459
|
-
"&::-webkit-scrollbar-thumb": {
|
|
460
|
-
background: colors.gray[400],
|
|
461
|
-
borderRadius: "base",
|
|
462
|
-
border: `1px solid ${colors.gray[100]}`,
|
|
463
|
-
},
|
|
464
|
-
"&::-webkit-scrollbar-thumb:hover": {
|
|
465
|
-
background: colors.gray[500],
|
|
466
|
-
},
|
|
467
|
-
scrollbarWidth: "thin",
|
|
468
|
-
scrollbarColor: `${colors.gray[400]} ${colors.gray[100]}`,
|
|
469
|
-
};
|
|
429
|
+
const flexScrollSx = (0, scrollbar_1.scrollbarStyles)(colors);
|
|
470
430
|
const addColumnBox = !isBoardLoading && showAddColumn && hasAnyColumns && ((0, jsx_runtime_1.jsx)(react_2.Box, { width: columnWidth, borderRadius: "lg", border: `0.125rem dashed ${colors.boxborder[500]}`, bg: colors.background[100], flexShrink: 0, height: `${containerHeight - 60}px`, display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", _hover: { borderColor: colors.primary[500] }, onClick: () => { var _a; return (_a = customizeColumn === null || customizeColumn === void 0 ? void 0 : customizeColumn.onAddColumn) === null || _a === void 0 ? void 0 : _a.call(customizeColumn); }, children: (0, jsx_runtime_1.jsxs)(react_2.Flex, { direction: "column", align: "center", gap: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.Plus, size: 20, color: colors.text[700] }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: colors.text[600], children: (customizeColumn === null || customizeColumn === void 0 ? void 0 : customizeColumn.buttonText) || "Add column" })] }) }));
|
|
471
431
|
const columnsList = Object.entries(columns).map(([colId, column], colIndex) => {
|
|
472
432
|
const isColCollapsed = enableColumnCollapse && Boolean(collapsedColumns[colId]);
|
|
@@ -9,7 +9,7 @@ const lucide_react_1 = require("lucide-react");
|
|
|
9
9
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
10
10
|
const UpgradeButton_1 = __importDefault(require("../UpgradeButton/UpgradeButton"));
|
|
11
11
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
12
|
-
const
|
|
12
|
+
const gradientInk_1 = require("../../Theme/tokens/builders/gradientInk");
|
|
13
13
|
const limitReachedCopy_1 = require("./limitReachedCopy");
|
|
14
14
|
const KIND_ICON = {
|
|
15
15
|
record: lucide_react_1.Crown,
|
|
@@ -24,10 +24,9 @@ const LimitReachedModal = ({ isOpen, onClose, kind, limit = null, used = null, c
|
|
|
24
24
|
const copy = (0, limitReachedCopy_1.resolveLimitCopy)(kind, canManageBilling);
|
|
25
25
|
const usage = (0, limitReachedCopy_1.formatLimitUsage)(kind, used, limit);
|
|
26
26
|
const KindIcon = KIND_ICON[kind];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const ink = (0, accentText_1.onGradient)(gradient.from, gradient.to, colors.white, colors.black);
|
|
27
|
+
// Header banner uses the brand gradient so it reads correctly across all 9 brands.
|
|
28
|
+
const gradient = (0, gradientInk_1.resolveGradient)(colors.gradient, colors.white, colors.black);
|
|
29
|
+
const ink = gradient.ink;
|
|
31
30
|
return ((0, jsx_runtime_1.jsxs)(react_1.Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, size: "lg", motionPreset: "slideInBottom", children: [(0, jsx_runtime_1.jsx)(react_1.ModalOverlay, { backdropFilter: "blur(5px)" }), (0, jsx_runtime_1.jsxs)(react_1.ModalContent, { borderRadius: "xl", overflow: "hidden", boxShadow: "2xl", mx: 4, children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { bgGradient: `linear(to-r, ${gradient.from}, ${gradient.to})`, color: ink, children: [(0, jsx_runtime_1.jsx)(react_1.ModalHeader, { pb: 4, children: (0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", children: [(0, jsx_runtime_1.jsx)(react_1.Icon, { as: KindIcon, boxSize: "24px", mr: "12px" }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "xl", fontWeight: "bold", children: title !== null && title !== void 0 ? title : copy.title })] }) }), (0, jsx_runtime_1.jsx)(react_1.ModalCloseButton, { "aria-label": "Dismiss", color: ink, _hover: { opacity: 0.7 } })] }), (0, jsx_runtime_1.jsxs)(react_1.ModalBody, { py: 6, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { textAlign: "center", fontSize: "md", fontWeight: 600, color: colors.text[700], children: message !== null && message !== void 0 ? message : copy.message }), usage && ((0, jsx_runtime_1.jsx)(react_1.Text, { textAlign: "center", fontSize: "sm", color: colors.textMuted, mt: 2, children: usage })), features && features.length > 0 && ((0, jsx_runtime_1.jsx)(react_1.List, { spacing: 2, mt: 5, children: features.map((feature) => ((0, jsx_runtime_1.jsxs)(react_1.ListItem, { display: "flex", alignItems: "center", fontSize: "sm", color: colors.text[600], children: [(0, jsx_runtime_1.jsx)(react_1.ListIcon, { as: lucide_react_1.CheckCircle, color: colors.semanticText.success }), feature] }, feature))) }))] }), (0, jsx_runtime_1.jsx)(react_1.Divider, {}), (0, jsx_runtime_1.jsx)(react_1.ModalFooter, { children: (0, jsx_runtime_1.jsxs)(react_1.HStack, { spacing: 3, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: canManageBilling ? "Maybe later" : "Close", variant: "outline", colorScheme: "gray", size: "md", onClick: onClose }), canManageBilling && ((0, jsx_runtime_1.jsx)(UpgradeButton_1.default, { label: "Upgrade plan", size: "md", onClick: () => onUpgrade === null || onUpgrade === void 0 ? void 0 : onUpgrade() }))] }) })] })] }));
|
|
32
31
|
};
|
|
33
32
|
exports.default = LimitReachedModal;
|
|
@@ -61,7 +61,7 @@ function MultiSelect({ value, onValueChange, width = "100%", label = "label", is
|
|
|
61
61
|
// surface up to `muted` (lightest); [500] fails there, [800] clears all with margin.
|
|
62
62
|
borderColor: error || localError
|
|
63
63
|
? theme.colors.semanticText.error
|
|
64
|
-
: theme.colors.boxborder[
|
|
64
|
+
: theme.colors.boxborder[500], borderRadius: "lg", bg: theme.colors.gray[50], minH: s.minH, transition: "border-color 0.2s, box-shadow 0.2s", _focusWithin: {
|
|
65
65
|
borderColor: error || localError
|
|
66
66
|
? theme.colors.semanticText.error
|
|
67
67
|
: theme.colors.primary[500],
|
|
@@ -48,17 +48,17 @@ function NavBar({ userAvathar, userName, userRole, navMenu, moreIcon, handleNavO
|
|
|
48
48
|
_focus: { bg: menuHoverBg, color: menuHoverInk },
|
|
49
49
|
_active: { bg: menuHoverBg, color: menuHoverInk },
|
|
50
50
|
};
|
|
51
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: theme.colors.
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: (0, jsx_runtime_1.jsxs)(react_1.Flex, { h: 16, alignItems: "center", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", gap: 1.5, alignItems: "center", children: [(0, jsx_runtime_1.jsx)(react_1.Box, { as: "button", type: "button", onClick: () => onSideBarToggole === null || onSideBarToggole === void 0 ? void 0 : onSideBarToggole(), onMouseEnter: onSideBarPeek, onFocus: onSideBarPeek, "aria-label": sideBarToggole ? "Close navigation menu" : "Open navigation menu", "aria-expanded": !!sideBarToggole, ...iconButtonStyle, display: forceSideBarToggle ? "flex" : { base: "flex", lg: "none" }, w: SIDEBAR_TOGGLE_HIT, h: SIDEBAR_TOGGLE_HIT, children: sideBarToggole ? ((0, jsx_runtime_1.jsx)(lucide_react_1.PanelLeftClose, { size: "1.25rem" })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.PanelRightClose, { size: "1.25rem" })) }), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) && ((0, jsx_runtime_1.jsx)(react_1.Box, { ...iconButtonStyle, as: "button", type: "button", "aria-label": "Go back", display: "flex", onClick: () => { var _a; return (_a = navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) === null || _a === void 0 ? void 0 : _a.call(navigationBarText); }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.CircleArrowLeft, { size: "1.25rem", color: theme.colors.text[500] }) })), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text) && ((0, jsx_runtime_1.jsx)(react_1.Text, { color: (0, accentText_1.accentTextOnCanvas)(theme.colors.secondary, theme.colors.backgroundColor.light), fontSize: "1.25rem", fontWeight: 600, fontFamily: "open-sans, sans-serif", letterSpacing: "-0.013rem", children: navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text }))] }), (0, jsx_runtime_1.jsx)(react_1.Flex, { minW: 0, flexShrink: 1, children: (0, jsx_runtime_1.jsxs)(react_1.Stack, { direction: "row", alignItems: "center", spacing: 4, minW: 0, children: [moreIcon && ((0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: "center", minW: 0, children: moreIcon })), (0, jsx_runtime_1.jsxs)(react_1.Menu, { children: [(0, jsx_runtime_1.jsx)(react_1.MenuButton, { as: react_1.Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0, flexShrink: 0, children: (0, jsx_runtime_1.jsx)(react_1.Avatar, { size: "sm", name: userName, src: userAvathar }) }), (0, jsx_runtime_1.jsx)(react_1.MenuList, { alignItems: "center", zIndex: 5, p: 0, py: "0.375rem",
|
|
52
52
|
// Without a cap one long title stretches the whole dropdown; titles truncate instead.
|
|
53
53
|
maxW: "18rem", bg: theme.colors.backgroundColor.light,
|
|
54
54
|
// Chakra's MenuItem renders `background: var(--menu-bg)` at rest; its MenuList
|
|
55
55
|
// baseStyle hardcodes that var to "#fff" (gated behind `_dark`, which this theme-swap
|
|
56
56
|
// app never triggers). The `bg` prop above only recolors the list itself, not the
|
|
57
57
|
// inherited var, so items fall back to white until hover/focus — set the var too.
|
|
58
|
-
sx: { "--menu-bg": theme.colors.backgroundColor.light },
|
|
58
|
+
sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", color: theme.colors.text[900], overflow: "hidden", children: (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", flexDirection: "column", maxH: "90vh", children: [(0, jsx_runtime_1.jsx)(react_1.Center, { pt: 4, pb: 2, children: (0, jsx_runtime_1.jsx)(react_1.Avatar, { size: "xl", name: userName, src: userAvathar }) }), (0, jsx_runtime_1.jsxs)(react_1.Center, { flexDirection: "column", gap: "0.125rem", pb: 2, px: 4, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontWeight: 600, fontSize: "14px", color: theme.colors.text[900], isTruncated: true, maxW: "100%", children: userName }), userRole && ((0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "11px", color: theme.colors.text[500], isTruncated: true, maxW: "100%", children: userRole }))] }), (0, jsx_runtime_1.jsx)(react_1.MenuDivider, { borderColor: theme.colors.boxborder[200] }), (0, jsx_runtime_1.jsx)(react_1.Box, { flex: 1, overflowY: "auto", overflowX: "hidden", children: navMenu === null || navMenu === void 0 ? void 0 : navMenu.map((menu, idx) => {
|
|
59
59
|
var _a, _b, _c, _d;
|
|
60
60
|
return ((0, jsx_runtime_1.jsxs)(react_1.MenuItem, { onClick: () => handleNavOnClick(menu.url), sx: menuItemStyle, children: [menu.icon && ((0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: "center", flexShrink: 0, sx: { "& svg": { width: "16px", height: "16px" } }, children: menu === null || menu === void 0 ? void 0 : menu.icon })), (0, jsx_runtime_1.jsx)(react_1.Box, { minW: 0, isTruncated: true, title: String((_a = menu.title) !== null && _a !== void 0 ? _a : ""), children: menu.title })] }, `${String((_d = (_c = (_b = menu.id) !== null && _b !== void 0 ? _b : menu.url) !== null && _c !== void 0 ? _c : menu.title) !== null && _d !== void 0 ? _d : idx)}-${idx}`));
|
|
61
|
-
}) }), (0, jsx_runtime_1.jsx)(react_1.MenuDivider, { borderColor: theme.colors.
|
|
61
|
+
}) }), (0, jsx_runtime_1.jsx)(react_1.MenuDivider, { borderColor: theme.colors.boxborder[200] }), (0, jsx_runtime_1.jsxs)(react_1.MenuItem, { onClick: handleLogout, sx: {
|
|
62
62
|
...menuItemStyle,
|
|
63
63
|
color: theme.colors.semanticText.error,
|
|
64
64
|
_hover: { bg: dangerTone.bg, color: dangerTone.fg },
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const react_2 = require("@chakra-ui/react");
|
|
7
7
|
const lucide_react_1 = require("lucide-react");
|
|
8
8
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
9
|
+
const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
|
|
9
10
|
const fieldStyles_1 = require("../Common/fieldStyles");
|
|
10
11
|
const countWords = (text = "") => {
|
|
11
12
|
const t = text.trim();
|
|
@@ -122,9 +123,10 @@ function NoteTextArea({ width = "100%", handleSubmit, handleCancel, value, title
|
|
|
122
123
|
setTitleShow(false);
|
|
123
124
|
setTitleValue(e.target.value);
|
|
124
125
|
}, placeholder: "Add a title...", variant: "unstyled", px: 3, pt: 2.5, pb: 1.5, fontWeight: 600, fontSize: "0.875rem", color: theme.colors.text[700], _placeholder: {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
127
|
+
} }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: theme.colors.gray[200] })] })), (0, jsx_runtime_1.jsx)(react_2.Box, { bg: theme.colors.background[50], minH: "76px", px: 3, pt: 2.5, position: "relative", children: (0, jsx_runtime_1.jsx)(react_2.Textarea, { ref: noteAreaRef, value: noteValue, onChange: handleNoteChange, placeholder: customPlaceholder, variant: "unstyled", resize: "none", minH: "76px", fontSize: "0.75rem", color: theme.colors.text[700], _placeholder: {
|
|
128
|
+
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
129
|
+
}, style: { overflow: "hidden" }, p: 0 }) })] }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: theme.colors.gray[200] }), (0, jsx_runtime_1.jsxs)(react_2.Box, { px: 3, py: 2.5, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", justify: "space-between", w: "100%", gap: 3, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: "Attach files", hasArrow: true, placement: "top", children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "label", htmlFor: "file-upload", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", w: "1.75rem", h: "1.75rem", borderRadius: "md", color: theme.colors.textMuted, transition: "background 0.15s", _hover: { bg: theme.colors.gray[100] }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Paperclip, { size: 16 }) }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { h: "1rem", w: "1px", bg: theme.colors.gray[200] }), !titleShow ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", onClick: () => setTitleShow(true), px: 2, py: 1, borderRadius: "md", color: theme.colors.textMuted, fontWeight: 500, fontSize: "sm", transition: "background 0.15s", _hover: { bg: theme.colors.gray[100] }, children: "+ Add a title" })) : ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: titleValue, hasArrow: true, isDisabled: !titleValue, children: (0, jsx_runtime_1.jsx)(react_2.Text, { color: theme.colors.textMuted, fontSize: "sm", fontWeight: 500, isTruncated: true, maxW: "180px", children: titleValue || "Title" }) }))] }), (0, jsx_runtime_1.jsxs)(react_2.Flex, { gap: 2.5, align: "center", ml: "auto", flexShrink: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "xs", fontWeight: 500, color: isOverLimit ? theme.colors.semanticText.error : theme.colors.textMuted, whiteSpace: "nowrap", children: [noteWordCount, "/", maxNoteWordCount] }), cancelButtonHide ? null : ((0, jsx_runtime_1.jsx)(react_2.Button, { size: "sm", variant: "ghost", colorScheme: "gray", onClick: handleCloseTextArea, children: "Cancel" })), (0, jsx_runtime_1.jsxs)(react_2.Button, { size: "sm", variant: "solid", isLoading: !!saveButtonLoading, isDisabled: !noteValue || isSaveDisabled, onClick: () => handleSubmit(noteValue, titleValue, files), children: [saveButtonLoading ? ((0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "xs", thickness: "2px", mr: 2 })) : null, "Save"] })] })] }), (0, jsx_runtime_1.jsx)("input", { id: "file-upload", type: "file", style: { display: "none" }, onChange: (e) => {
|
|
128
130
|
const newFiles = Array.from(e.target.files || []);
|
|
129
131
|
const validFiles = newFiles.filter((f) => f.size <= maxFileSize);
|
|
130
132
|
const invalidFiles = newFiles.filter((f) => f.size > maxFileSize);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NumberInput = void 0;
|
|
4
|
+
const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
|
|
4
5
|
exports.NumberInput = {
|
|
5
|
-
baseStyle: {
|
|
6
|
+
baseStyle: ({ theme }) => ({
|
|
6
7
|
field: {
|
|
7
8
|
fontWeight: 500,
|
|
8
9
|
fontSize: "0.875rem",
|
|
@@ -12,10 +13,10 @@ exports.NumberInput = {
|
|
|
12
13
|
borderRadius: "lg",
|
|
13
14
|
transition: "border-color 0.2s, box-shadow 0.2s",
|
|
14
15
|
_placeholder: {
|
|
15
|
-
|
|
16
|
+
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
16
17
|
},
|
|
17
18
|
},
|
|
18
|
-
},
|
|
19
|
+
}),
|
|
19
20
|
sizes: {
|
|
20
21
|
md: {
|
|
21
22
|
field: {
|
|
@@ -38,7 +39,7 @@ exports.NumberInput = {
|
|
|
38
39
|
border: "0.063rem solid",
|
|
39
40
|
borderColor,
|
|
40
41
|
_placeholder: {
|
|
41
|
-
color: theme.colors
|
|
42
|
+
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
42
43
|
},
|
|
43
44
|
_hover: {
|
|
44
45
|
borderColor: primary,
|
|
@@ -65,11 +65,11 @@ const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSear
|
|
|
65
65
|
focusOption(filtered.length - 1);
|
|
66
66
|
}
|
|
67
67
|
}, [activeIndex, filtered.length, focusOption]);
|
|
68
|
-
// boxborder[
|
|
68
|
+
// boxborder[500], not raw gray[200]: this styles a real `<button>` (Flex as="button" below),
|
|
69
69
|
// so its border is a control boundary — WCAG 1.4.11 needs >=3.0 against any named surface up
|
|
70
70
|
// to `muted` (lightest); gray[200] fails there in dark mode.
|
|
71
71
|
const triggerStyles = triggerVariant === "outline"
|
|
72
|
-
? { border: "1px solid", borderColor: theme.colors.boxborder[
|
|
72
|
+
? { border: "1px solid", borderColor: theme.colors.boxborder[500], bg: theme.colors.background[50] }
|
|
73
73
|
: triggerVariant === "subtle"
|
|
74
74
|
? { bg: theme.colors.gray[50] }
|
|
75
75
|
: { bg: "transparent" };
|
|
@@ -11,7 +11,7 @@ function PinInputs({ otp, mask, defaultValue, placeholder, manageFocus, errorBor
|
|
|
11
11
|
// [800], not [300]/[700]: WCAG 1.4.11 needs >=3.0 for a control boundary, measured
|
|
12
12
|
// against the parent surface — up to `muted` (lightest). [700] fails there (2.41-2.72);
|
|
13
13
|
// [800] clears all named surfaces with margin (3.44-3.90).
|
|
14
|
-
borderColor: theme.colors.boxborder[
|
|
14
|
+
borderColor: theme.colors.boxborder[500], _focus: {
|
|
15
15
|
borderColor: theme.colors.primary[500],
|
|
16
16
|
boxShadow: `0 0 0 0.063rem ${theme.colors.primary[500]}`,
|
|
17
17
|
} }, index))) }) })] }));
|
|
@@ -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 planPillGradient_1 = require("./planPillGradient");
|
|
9
9
|
const TONE_ICON = {
|
|
10
10
|
normal: lucide_react_1.Sparkles,
|
|
@@ -15,15 +15,15 @@ const PlanPill = ({ label, mobileLabel, status, tone = "normal", icon, gradient,
|
|
|
15
15
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
16
16
|
const c = theme.colors;
|
|
17
17
|
const toneGradient = {
|
|
18
|
-
normal:
|
|
18
|
+
normal: c.gradient,
|
|
19
19
|
warning: (0, planPillGradient_1.statusGradient)(c.semantic.warning),
|
|
20
20
|
danger: (0, planPillGradient_1.statusGradient)(c.semantic.error),
|
|
21
21
|
};
|
|
22
|
-
const resolved = (0,
|
|
23
|
-
const ink =
|
|
22
|
+
const resolved = (0, gradientInk_1.resolveGradient)(gradient !== null && gradient !== void 0 ? gradient : toneGradient[tone], c.white, c.black);
|
|
23
|
+
const ink = resolved.ink;
|
|
24
24
|
const Icon = icon === undefined ? TONE_ICON[tone] : icon;
|
|
25
25
|
const hasMobile = !!mobileLabel && mobileLabel !== label;
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "button", type: "button", "aria-label": ariaLabel || (status ? `${label} — ${status}` : label), onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage:
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "button", type: "button", "aria-label": ariaLabel || (status ? `${label} — ${status}` : label), onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage: (0, gradientInk_1.gradientCss)(resolved), color: ink, borderRadius: "full", whiteSpace: "nowrap", cursor: "pointer", transition: "transform 0.2s ease, box-shadow 0.2s ease", _hover: {
|
|
27
27
|
transform: "translateY(-1px)",
|
|
28
28
|
boxShadow: `0 6px 18px ${resolved.from}59`,
|
|
29
29
|
}, _focusVisible: {
|
|
@@ -5,20 +5,8 @@ export type Gradient = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const STATUS_INK = "#ffffff";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* not
|
|
10
|
-
*
|
|
11
|
-
* Its tone carries meaning (normal / warning / danger), and a brand gradient can
|
|
12
|
-
* collide with that: rosewood's `#c74962 → #ea0727` is red, so a healthy plan
|
|
13
|
-
* rendered as if it had expired. Greyscale brands failed the other way, sinking
|
|
14
|
-
* the badge into the header chrome.
|
|
15
|
-
*
|
|
16
|
-
* One accent for both color modes is deliberate: a lighter dark-mode variant was
|
|
17
|
-
* tried and flipped `onGradient`'s ink to black, which read as a washed-out candy
|
|
18
|
-
* pill on dark chrome. These stops keep white ink in both modes, so the badge looks
|
|
19
|
-
* like the same component everywhere. Verified at AA (>= 4.5:1) on both stops.
|
|
20
|
-
*
|
|
21
|
-
* Consumers who genuinely want another colour still pass `gradient`.
|
|
8
|
+
* Opt-in accent for consumers who want a fixed badge colour instead of the brand `gradient`.
|
|
9
|
+
* One hue, like every brand gradient — a second hue reads as a status change, not a style.
|
|
22
10
|
*/
|
|
23
11
|
export declare const ACCENT_GRADIENT: Gradient;
|
|
24
12
|
/**
|
|
@@ -5,22 +5,10 @@ const statusTone_1 = require("../../Theme/tokens/builders/statusTone");
|
|
|
5
5
|
const color_1 = require("../../Theme/tokens/builders/color");
|
|
6
6
|
exports.STATUS_INK = "#ffffff";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* not
|
|
10
|
-
*
|
|
11
|
-
* Its tone carries meaning (normal / warning / danger), and a brand gradient can
|
|
12
|
-
* collide with that: rosewood's `#c74962 → #ea0727` is red, so a healthy plan
|
|
13
|
-
* rendered as if it had expired. Greyscale brands failed the other way, sinking
|
|
14
|
-
* the badge into the header chrome.
|
|
15
|
-
*
|
|
16
|
-
* One accent for both color modes is deliberate: a lighter dark-mode variant was
|
|
17
|
-
* tried and flipped `onGradient`'s ink to black, which read as a washed-out candy
|
|
18
|
-
* pill on dark chrome. These stops keep white ink in both modes, so the badge looks
|
|
19
|
-
* like the same component everywhere. Verified at AA (>= 4.5:1) on both stops.
|
|
20
|
-
*
|
|
21
|
-
* Consumers who genuinely want another colour still pass `gradient`.
|
|
8
|
+
* Opt-in accent for consumers who want a fixed badge colour instead of the brand `gradient`.
|
|
9
|
+
* One hue, like every brand gradient — a second hue reads as a status change, not a style.
|
|
22
10
|
*/
|
|
23
|
-
exports.ACCENT_GRADIENT = { from: "#
|
|
11
|
+
exports.ACCENT_GRADIENT = { from: "#8b3fc8", to: "#762d9d" };
|
|
24
12
|
/**
|
|
25
13
|
* Sinks both stops until WHITE ink clears AA, keeping each stop's hue. Any mid-tone gradient —
|
|
26
14
|
* a brand `gradient` token, a status scale — otherwise flips `onGradient` to black ink, so the
|
|
@@ -109,7 +109,7 @@ const ProductPrice = ({ options, size, onSelect, rightSlot }) => {
|
|
|
109
109
|
}, templateColumns: { base: '1fr auto', md: '1fr auto' },
|
|
110
110
|
// columnGap={{ base: 2, md: 3 }}
|
|
111
111
|
// rowGap={{ base: 1.5, md: 2 }}
|
|
112
|
-
alignItems: "center", children: [(0, jsx_runtime_1.jsx)(react_2.HStack, { gridColumn: 1, gridRow: 1, spacing: 2, align: "center", minW: 0, mb: 0, children: (0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1", minW: 0, children: (0, jsx_runtime_1.jsx)(OverflowTooltipText_1.default, { placement: "top", maxWidth: "100%", fontSize: { base: "xs", md: "sm" }, fontWeight: "medium", whiteSpace: "nowrap", children: option.label }) }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { gridColumn: 1, gridRow: 2, mt: 0, textAlign: "left", children: (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, align: "center", children: [option.offer > 0 && ((0, jsx_runtime_1.jsx)(react_2.Badge, { bg: theme.colors.green[100], color: (0, accentText_1.accentTextOnCanvas)(theme.colors.green, theme.colors.green[100]), borderRadius: "md", px: { base: 0, md: 0.5 }, py: { base: 0, md: 0.25 }, fontWeight: "bold", fontSize: "10px", flexShrink: 0, children: isMobile ? `${option.offer}%` : `${option.offer}% OFF` })), (0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "sm", fontWeight: "bold", color: (0, accentText_1.accentTextOnCanvas)(theme.colors.red, isSelected ? theme.colors.red[50] : theme.colors.background[50]), whiteSpace: "nowrap", children: ["\u20B9", discounted] }), option.offer > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "xs", color: theme.colors.textMuted, textDecoration: "line-through", whiteSpace: "nowrap", children: ["\u20B9", option.price] }))] }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { gridColumn: 2, gridRow: 1, ml: { base: 0, md: 0 }, justifySelf: "end", w: { base: "0.625rem", md: "0.75rem" }, h: { base: "0.625rem", md: "0.75rem" }, minW: { base: "0.625rem", md: "0.75rem" }, borderRadius: "full", border: "0.125rem solid", borderColor: isSelected ? theme.colors.red[500] : theme.colors.boxborder[
|
|
112
|
+
alignItems: "center", children: [(0, jsx_runtime_1.jsx)(react_2.HStack, { gridColumn: 1, gridRow: 1, spacing: 2, align: "center", minW: 0, mb: 0, children: (0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1", minW: 0, children: (0, jsx_runtime_1.jsx)(OverflowTooltipText_1.default, { placement: "top", maxWidth: "100%", fontSize: { base: "xs", md: "sm" }, fontWeight: "medium", whiteSpace: "nowrap", children: option.label }) }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { gridColumn: 1, gridRow: 2, mt: 0, textAlign: "left", children: (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, align: "center", children: [option.offer > 0 && ((0, jsx_runtime_1.jsx)(react_2.Badge, { bg: theme.colors.green[100], color: (0, accentText_1.accentTextOnCanvas)(theme.colors.green, theme.colors.green[100]), borderRadius: "md", px: { base: 0, md: 0.5 }, py: { base: 0, md: 0.25 }, fontWeight: "bold", fontSize: "10px", flexShrink: 0, children: isMobile ? `${option.offer}%` : `${option.offer}% OFF` })), (0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "sm", fontWeight: "bold", color: (0, accentText_1.accentTextOnCanvas)(theme.colors.red, isSelected ? theme.colors.red[50] : theme.colors.background[50]), whiteSpace: "nowrap", children: ["\u20B9", discounted] }), option.offer > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "xs", color: theme.colors.textMuted, textDecoration: "line-through", whiteSpace: "nowrap", children: ["\u20B9", option.price] }))] }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { gridColumn: 2, gridRow: 1, ml: { base: 0, md: 0 }, justifySelf: "end", w: { base: "0.625rem", md: "0.75rem" }, h: { base: "0.625rem", md: "0.75rem" }, minW: { base: "0.625rem", md: "0.75rem" }, borderRadius: "full", border: "0.125rem solid", borderColor: isSelected ? theme.colors.red[500] : theme.colors.boxborder[500], bg: theme.colors.background[50], display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "none", children: isSelected && ((0, jsx_runtime_1.jsx)(react_2.Box, { w: { base: "0.25rem", md: "0.3125rem" }, h: { base: "0.25rem", md: "0.3125rem" }, bg: theme.colors.red[500], borderRadius: "full" })) })] }, option.var_id));
|
|
113
113
|
}) }) })), (0, jsx_runtime_1.jsxs)(react_2.Flex, { mt: 2, w: "full", gap: 3, direction: { base: "column", md: "row" }, align: { base: "flex-start", md: "center" }, justify: { base: "flex-start", md: rightSlot ? "space-between" : "flex-start" }, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", fontSize: cfg.price, gap: 2, minW: 0, children: [selected.offer > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Text, { color: theme.colors.textMuted, textDecoration: "line-through", children: ["\u20B9", selected.price] })), (0, jsx_runtime_1.jsxs)(react_2.Text, { color: (0, accentText_1.accentTextOnCanvas)(theme.colors.red, theme.colors.backgroundColor.main), fontWeight: "semibold", children: ["\u20B9", getDiscountedPrice(selected)] })] }), rightSlot && ((0, jsx_runtime_1.jsx)(react_2.Box, { flexShrink: 0, mt: { base: 2, md: 0 }, children: rightSlot }))] })] }));
|
|
114
114
|
};
|
|
115
115
|
exports.default = ProductPrice;
|
|
@@ -23,7 +23,7 @@ const ProfileCardFooter = ({ children, }) => {
|
|
|
23
23
|
exports.ProfileCardFooter = ProfileCardFooter;
|
|
24
24
|
function ProfileCard({ maxW, align, variant, direction, justify, children, size, color, overflow, dividercolor, dividersize = "0.5px", dividervariant = "solid", CardStyle, CardHeaderStyle, CardBodyStyle, borderTopColor, borderLeftColor, }) {
|
|
25
25
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
26
|
-
const resolvedDividerColor = dividercolor !== null && dividercolor !== void 0 ? dividercolor : colors.
|
|
26
|
+
const resolvedDividerColor = dividercolor !== null && dividercolor !== void 0 ? dividercolor : colors.boxborder[200];
|
|
27
27
|
const accentBorder = `2px solid ${colors.primary[500]}`;
|
|
28
28
|
const isReactElement = (child) => {
|
|
29
29
|
return child !== null && typeof child === "object" && "type" in child;
|
|
@@ -38,7 +38,7 @@ function ProfilePhotoViewer({ photoUrl, onPhotoChange, imageWidth = "100px", ima
|
|
|
38
38
|
// [800], not [300]: the edit IconButton's border is a control boundary — WCAG 1.4.11 needs
|
|
39
39
|
// >=3.0 against any named surface up to `muted` (lightest); [300] fails there, [800] clears
|
|
40
40
|
// all with margin.
|
|
41
|
-
const border = c.boxborder[
|
|
41
|
+
const border = c.boxborder[500];
|
|
42
42
|
// Shared modern frame for whichever media we render (photo / pdf / fallback).
|
|
43
43
|
const mediaFrame = {
|
|
44
44
|
boxSize: imageWidth,
|
|
@@ -7,7 +7,7 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
|
7
7
|
const FormLabel_1 = require("../Common/FormLabel");
|
|
8
8
|
const RadioButton = ({ label, colorScheme, isChecked, onChange, isDisabled, size, value, defaultChecked, labelFontSize = "0.75rem", labelClampLines = 2, showLabelTooltip = (label || "").length > 18, labelTooltip = label, }) => {
|
|
9
9
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Radio, { colorScheme: colorScheme, isChecked: isChecked, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Radio, { colorScheme: colorScheme, isChecked: isChecked, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.boxborder[500], borderWidth: "1.6px", _hover: {
|
|
11
11
|
borderColor: theme.colors.primary[500],
|
|
12
12
|
backgroundColor: theme.colors.background[100],
|
|
13
13
|
}, sx: {
|
|
@@ -17,7 +17,7 @@ const ReorderList = ({ label = "", items, onReorder, showRemoveIcon = false, onR
|
|
|
17
17
|
};
|
|
18
18
|
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { borderWidth: "0.063rem", borderRadius: "md", px: 3, py: 2, bg: colors.background[50], children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", alignItems: "center", gap: 2, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.BetweenHorizonalStart, {}), (0, jsx_runtime_1.jsx)(react_1.Text, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 14, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", py: 4, children: label })] }), (0, jsx_runtime_1.jsx)(react_1.Divider, {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(dnd_1.DragDropContext, { onDragEnd: handleDragEnd, children: (0, jsx_runtime_1.jsx)(dnd_1.Droppable, { droppableId: "item-list", direction: "horizontal", children: (provided) => ((0, jsx_runtime_1.jsxs)(react_1.HStack, { ref: provided.innerRef, ...provided.droppableProps, spacing: 4, overflowX: "auto", children: [items.map((item, index) => ((0, jsx_runtime_1.jsx)(dnd_1.Draggable, { draggableId: item.id, index: index, children: (provided) => {
|
|
19
19
|
var _a;
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, position: "relative", border: "0.063rem solid", borderColor: colors.boxborder[
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, position: "relative", border: "0.063rem solid", borderColor: colors.boxborder[200], borderRadius: "md", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(react_1.Image, { src: item.previewUrl, alt: (_a = item.name) !== null && _a !== void 0 ? _a : `item-${index}`, boxSize: "7.5rem", objectFit: "cover" }), (0, jsx_runtime_1.jsx)(react_1.IconButton, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.GripVertical, { size: 16, color: colors.textMuted }), "aria-label": "Drag", size: "sm", position: "absolute", top: 1, left: 1, variant: "ghost" }), (0, jsx_runtime_1.jsx)(react_1.Badge, { position: "absolute", colorScheme: "gray", variant: "solid", bottom: 1, right: 1, children: index + 1 }), showRemoveIcon && ((0, jsx_runtime_1.jsx)(react_1.IconButton, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 16, color: colors.semanticText.error }), "aria-label": "Remove", size: "sm", position: "absolute", top: 1, right: 1, variant: "ghost", onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.id) }))] }));
|
|
21
21
|
} }, item.id))), provided.placeholder] })) }) })] }));
|
|
22
22
|
};
|
|
23
23
|
exports.default = ReorderList;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { ScrollbarVariant } from "../../Theme/tokens/builders/scrollbar";
|
|
3
|
+
export interface ScrollbarBoxProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
height?: string;
|
|
6
|
+
maxHeight?: string;
|
|
7
|
+
overflowX?: string;
|
|
8
|
+
overflowY?: string;
|
|
9
|
+
variant?: ScrollbarVariant;
|
|
10
|
+
scrollContainerRef?: React.Ref<HTMLDivElement> | null;
|
|
11
|
+
}
|
|
12
|
+
declare const ScrollbarBox: React.FC<ScrollbarBoxProps>;
|
|
13
|
+
export default ScrollbarBox;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("@chakra-ui/react");
|
|
5
|
+
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
6
|
+
const scrollbar_1 = require("../../Theme/tokens/builders/scrollbar");
|
|
7
|
+
const ScrollbarBox = ({ children, height, maxHeight, overflowX, overflowY = "auto", variant = "default", scrollContainerRef, }) => {
|
|
8
|
+
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Box, { ref: scrollContainerRef, height: height, maxHeight: maxHeight, position: "relative", sx: { overflowX, overflowY, ...(0, scrollbar_1.scrollbarStyles)(colors, variant) }, children: children }));
|
|
10
|
+
};
|
|
11
|
+
exports.default = ScrollbarBox;
|
|
@@ -43,6 +43,7 @@ const lucide_react_1 = require("lucide-react");
|
|
|
43
43
|
const FormLabel_1 = require("../Common/FormLabel");
|
|
44
44
|
const Tag_1 = __importDefault(require("../Tag/Tag"));
|
|
45
45
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
46
|
+
const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
|
|
46
47
|
const ErrorMessage_1 = __importDefault(require("../Common/ErrorMessage"));
|
|
47
48
|
const HelperText_1 = __importDefault(require("../Common/HelperText"));
|
|
48
49
|
const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
|
|
@@ -487,7 +488,7 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
|
|
|
487
488
|
var _a, _b, _c, _d, _e;
|
|
488
489
|
const insideLabel = (_a = insideSelect.value) === null || _a === void 0 ? void 0 : _a.label;
|
|
489
490
|
const insidePlaceholder = (_b = insideSelect.placeholder) !== null && _b !== void 0 ? _b : "Select";
|
|
490
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { position: "relative", ref: customSelectRef, flexShrink: 0, ml: s.insideSelectMarginLeft, h: "-webkit-fill-available", borderRight: "0.063rem solid", borderColor: theme.colors.boxborder[
|
|
491
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { position: "relative", ref: customSelectRef, flexShrink: 0, ml: s.insideSelectMarginLeft, h: "-webkit-fill-available", borderRight: "0.063rem solid", borderColor: theme.colors.boxborder[200], bg: customSelectOpen
|
|
491
492
|
? theme.colors.primary.opacity[8]
|
|
492
493
|
: theme.colors.background[400], borderLeftRadius: "md", borderRightRadius: 0, transition: "background 0.15s ease, box-shadow 0.15s ease", boxShadow: customSelectOpen
|
|
493
494
|
? `inset 0 0 0 0.063rem ${theme.colors.primary[500]}`
|
|
@@ -495,7 +496,7 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
|
|
|
495
496
|
e.stopPropagation();
|
|
496
497
|
setIsOpen(false);
|
|
497
498
|
setCustomSelectOpen((prev) => !prev);
|
|
498
|
-
}, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { minW: "4.5rem", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", gap: 1, width: insideSelect.width, height: insideSelectBoxHeight, pl: "0.5rem", pr: "0.375rem", children: [insideLabel ? ((0, jsx_runtime_1.jsx)(SelectTruncatedLabel_1.default, { label: insideLabel, maxWidth: insideSelect.width || "6rem", fontSize: s.fieldFontSize })) : ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.fieldFontSize, fontWeight: 500, color: theme.colors
|
|
499
|
+
}, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { minW: "4.5rem", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", gap: 1, width: insideSelect.width, height: insideSelectBoxHeight, pl: "0.5rem", pr: "0.375rem", children: [insideLabel ? ((0, jsx_runtime_1.jsx)(SelectTruncatedLabel_1.default, { label: insideLabel, maxWidth: insideSelect.width || "6rem", fontSize: s.fieldFontSize })) : ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.fieldFontSize, fontWeight: 500, color: (0, placeholderInk_1.placeholderInk)(theme.colors), isTruncated: true, maxW: insideSelect.width || "6rem", children: insidePlaceholder })), (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, color: customSelectOpen ? theme.colors.accentText : theme.colors.textMuted, transition: "transform 0.2s ease, color 0.15s ease", transform: customSelectOpen ? "rotate(180deg)" : "rotate(0deg)", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: s.chevronSize }) })] }), customSelectOpen && ((0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsx)(react_2.Box, { ref: setInsideSelectMenuRef, id: "custom-select-portal", position: "fixed", top: `${customSelectPos.top}px`, left: `${customSelectPos.left}px`, zIndex: 1510, bg: theme.colors.background[50], border: "0.063rem solid", borderColor: theme.colors.boxborder[200], borderRadius: "lg", boxShadow: (_d = (_c = theme.shadows) === null || _c === void 0 ? void 0 : _c.md) !== null && _d !== void 0 ? _d : "md", minW: `${customSelectPos.width}px`, maxW: "20rem", py: 1, overflow: "hidden", children: (_e = insideSelect.option) === null || _e === void 0 ? void 0 : _e.map((item) => {
|
|
499
500
|
var _a;
|
|
500
501
|
const selected = ((_a = insideSelect.value) === null || _a === void 0 ? void 0 : _a.id) === item.id;
|
|
501
502
|
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, minH: s.optionRowMinH, py: s.optionRowPy, px: "0.75rem", fontSize: s.dropdownTextFontSize, fontWeight: selected ? 600 : 500, color: selected
|
|
@@ -544,10 +545,10 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
|
|
|
544
545
|
setCustomSelectOpen(false);
|
|
545
546
|
return !prev;
|
|
546
547
|
});
|
|
547
|
-
}, "aria-label": "toggle-dropdown", display: "flex", alignItems: "center", children: isOpen ? ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: s.chevronSize })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: s.chevronSize })) }))] })] }) }), isOpen && ((0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsxs)(react_2.Box, { ref: setDropdownMenuRef, id: listboxId, role: "listbox", "aria-multiselectable": isMultiple || undefined, position: "fixed", top: `${dropdownPos.top}px`, left: `${dropdownPos.left}px`, width: `${dropdownPos.width}px`, zIndex: 1500, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "sm", bg: theme.colors.background[50], boxShadow: "md", display: "flex", flexDirection: "column", children: [isMultiple && isSelectAll && ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: s.optionRowPy, px: 3, cursor: "pointer", onClick: handleSelectAll, display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[
|
|
548
|
+
}, "aria-label": "toggle-dropdown", display: "flex", alignItems: "center", children: isOpen ? ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: s.chevronSize })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: s.chevronSize })) }))] })] }) }), isOpen && ((0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsxs)(react_2.Box, { ref: setDropdownMenuRef, id: listboxId, role: "listbox", "aria-multiselectable": isMultiple || undefined, position: "fixed", top: `${dropdownPos.top}px`, left: `${dropdownPos.left}px`, width: `${dropdownPos.width}px`, zIndex: 1500, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "sm", bg: theme.colors.background[50], boxShadow: "md", display: "flex", flexDirection: "column", children: [isMultiple && isSelectAll && ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: s.optionRowPy, px: 3, cursor: "pointer", onClick: handleSelectAll, display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.default, { isChecked: allFilteredSelected, sx: { pointerEvents: "none" }, size: s.checkboxSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), (0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: "0.063rem solid", borderColor: theme.colors.boxborder[200], children: isOptionLoading && filteredOptions.length === 0 ? ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: s.spinnerSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? ((0, jsx_runtime_1.jsx)(react_2.Text, { p: 3, fontSize: s.dropdownTextFontSize, color: theme.colors.textMuted, children: "No results found" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [filteredOptions.map((option, index) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { id: getOptionId(index), role: "option", "aria-selected": isSelected(option.id), py: s.optionRowPy, px: 3, minH: s.optionRowMinH, cursor: "pointer", bg: index === activeIndex
|
|
548
549
|
? theme.colors.primary.opacity[8]
|
|
549
550
|
: isSelected(option.id)
|
|
550
551
|
? theme.colors.gray[100]
|
|
551
|
-
: "transparent", _hover: { bg: theme.colors.gray[50] }, onClick: () => handleSelect(option), onMouseEnter: () => setActiveIndex(index), display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[
|
|
552
|
+
: "transparent", _hover: { bg: theme.colors.gray[50] }, onClick: () => handleSelect(option), onMouseEnter: () => setActiveIndex(index), display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [isMultiple && ((0, jsx_runtime_1.jsx)(Checkbox_1.default, { isChecked: isSelected(option.id), sx: { pointerEvents: "none" }, size: s.checkboxSize })), option.view ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: option.view })) : ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: option.label }))] }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", justifyContent: "center", gap: 2, minH: s.optionRowMinH, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: s.spinnerSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: s.optionRowPy, px: 3, borderTop: "0.063rem solid", borderColor: theme.colors.boxborder[200], bg: theme.colors.background[50], display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: theme.colors.gray[50] }, children: [addNew.icon || (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: s.addNewIconSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.dropdownTextFontSize, children: addNew.text || "Add New" })] }))] }) })), helperText && !error && (0, jsx_runtime_1.jsx)(HelperText_1.default, { helperText: helperText }), error && (0, jsx_runtime_1.jsx)(ErrorMessage_1.default, { errorMessage: errorMessage })] }));
|
|
552
553
|
};
|
|
553
554
|
exports.default = SearchSelect;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Select = void 0;
|
|
4
|
+
const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
|
|
4
5
|
exports.Select = {
|
|
5
6
|
baseStyle: ({ theme }) => ({
|
|
6
7
|
field: {
|
|
@@ -19,7 +20,7 @@ exports.Select = {
|
|
|
19
20
|
width: "100%", // full container width
|
|
20
21
|
maxWidth: "100%",
|
|
21
22
|
_placeholder: {
|
|
22
|
-
|
|
23
|
+
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
23
24
|
whiteSpace: "nowrap",
|
|
24
25
|
overflow: "hidden",
|
|
25
26
|
textOverflow: "ellipsis",
|
|
@@ -63,7 +64,7 @@ exports.Select = {
|
|
|
63
64
|
// [800], not [500]/[700]: WCAG 1.4.11 needs >=3.0 for a control boundary, measured
|
|
64
65
|
// against the parent surface — up to `muted` (lightest). [700] fails there (2.41-2.72);
|
|
65
66
|
// [800] clears all named surfaces with margin (3.44-3.90).
|
|
66
|
-
const borderColor = theme.colors.boxborder[
|
|
67
|
+
const borderColor = theme.colors.boxborder[500];
|
|
67
68
|
const shadowPrimary = theme.colors.boxShadow.primary;
|
|
68
69
|
const shadowError = theme.colors.boxShadow.error;
|
|
69
70
|
const primary = theme.colors.primary[500];
|
|
@@ -36,7 +36,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
|
|
|
36
36
|
const errorBorder = `2px solid ${theme.colors.semanticText.error}`;
|
|
37
37
|
// [800], not [500]: WCAG 1.4.11 needs >=3.0 for a control boundary against any named surface
|
|
38
38
|
// up to `muted` (lightest); [500] fails there, [800] clears all with margin.
|
|
39
|
-
const defaultBorderThin = `1px solid ${theme.colors.boxborder[
|
|
39
|
+
const defaultBorderThin = `1px solid ${theme.colors.boxborder[500]}`;
|
|
40
40
|
const [selectedOptions, setSelectedOptions] = (0, react_1.useState)(initialSelectedOption ? [initialSelectedOption] : []);
|
|
41
41
|
const [inputValue, setInputValue] = (0, react_1.useState)(searchQuery);
|
|
42
42
|
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
@@ -252,7 +252,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
|
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
254
|
setIsOpen(true);
|
|
255
|
-
}, onChange: (e) => handleInputChange(e.target.value), placeholder: placeholder, onKeyDown: handleKeyDown, id: id, name: name, role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, cursor: "pointer", borderColor: theme.colors.boxborder[
|
|
255
|
+
}, onChange: (e) => handleInputChange(e.target.value), placeholder: placeholder, onKeyDown: handleKeyDown, id: id, name: name, role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, cursor: "pointer", borderColor: theme.colors.boxborder[500], transition: "border-color 0.2s, box-shadow 0.2s", _hover: {
|
|
256
256
|
borderColor: error
|
|
257
257
|
? theme.colors.semanticText.error
|
|
258
258
|
: theme.colors.primary[500],
|
|
@@ -270,7 +270,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
|
|
|
270
270
|
fontSize: 15,
|
|
271
271
|
letterSpacing: 0.7,
|
|
272
272
|
border: error ? errorBorder : defaultBorderThin,
|
|
273
|
-
} }), rightIcon && ((0, jsx_runtime_1.jsx)(react_2.InputRightElement, { pointerEvents: "none", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && ((0, jsx_runtime_1.jsxs)(react_2.Box, { ref: dropdownRef, marginTop: "5px", position: "absolute", top: position === "below" ? "100%" : "auto", bottom: position === "above" ? "100%" : "auto", left: 0, right: 0, border: "1px solid", borderColor: theme.colors.boxborder[
|
|
273
|
+
} }), rightIcon && ((0, jsx_runtime_1.jsx)(react_2.InputRightElement, { pointerEvents: "none", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && ((0, jsx_runtime_1.jsxs)(react_2.Box, { ref: dropdownRef, marginTop: "5px", position: "absolute", top: position === "below" ? "100%" : "auto", bottom: position === "above" ? "100%" : "auto", left: 0, right: 0, border: "1px solid", borderColor: theme.colors.boxborder[200], borderRadius: "md", bg: theme.colors.background[50], maxHeight: "150px", overflowY: "auto", zIndex: 10, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: (0, jsx_runtime_1.jsx)(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs }) }), (0, jsx_runtime_1.jsx)("hr", {}), isBottomIcon && ((0, jsx_runtime_1.jsxs)(react_2.Box, { position: "sticky", bottom: 0, background: theme.colors.background[50], display: "flex", alignItems: "center", pl: "1rem", cursor: "pointer", onClick: handleBottomClick, borderColor: theme.colors.boxborder[200], zIndex: 1, borderTop: `1px solid ${theme.colors.boxborder[200]}`, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { children: BottomIcon ? BottomIcon : (0, jsx_runtime_1.jsx)(lucide_react_1.PlusIcon, { size: "1rem" }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "0.875rem", color: BottomTextColor
|
|
274
274
|
? BottomTextColor
|
|
275
275
|
: theme.colors.accentText, padding: "8px 8px", children: BottomText || "Add New" })] }))] })), error && (0, jsx_runtime_1.jsx)(ErrorMessage_1.default, { errorMessage: errorMessage })] }) }) }));
|
|
276
276
|
}
|