pixelize-design-library 2.4.2-beta.63 → 2.4.2-beta.65
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 +130 -8
- package/COMPONENT-GOTCHAS.md +63 -7
- package/DESIGN-GUIDE.md +8 -3
- package/dist/Components/Button/Button.styles.js +7 -2
- package/dist/Components/CopyButton/CopyButton.d.ts +3 -1
- package/dist/Components/CopyButton/CopyButton.js +2 -2
- package/dist/Components/Drawer/Drawer.d.ts +1 -1
- package/dist/Components/Drawer/Drawer.js +6 -2
- package/dist/Components/Drawer/DrawerProps.d.ts +4 -0
- package/dist/Components/Dropdown/DropDown.js +2 -9
- package/dist/Components/FilePreview/FilePreview.js +2 -1
- package/dist/Components/FileUploader/FileUploader.js +4 -0
- package/dist/Components/FileUploader/FileUploaderProps.d.ts +1 -1
- package/dist/Components/FormDrawer/FormDrawer.d.ts +1 -1
- package/dist/Components/FormDrawer/FormDrawer.js +3 -3
- package/dist/Components/FormDrawer/FormDrawerProps.d.ts +2 -0
- package/dist/Components/Input/TextInput.styles.js +10 -6
- package/dist/Components/KanbanBoard/KanbanBoard.js +6 -5
- package/dist/Components/Modal/dialogNaming.d.ts +8 -0
- package/dist/Components/Modal/dialogNaming.js +21 -0
- package/dist/Components/NavLauncher/LauncherTabs.js +2 -2
- package/dist/Components/NavLauncher/NavLauncher.d.ts +1 -1
- package/dist/Components/NavLauncher/NavLauncher.js +257 -47
- package/dist/Components/NavLauncher/NavLauncherProps.d.ts +79 -3
- package/dist/Components/NavLauncher/ScopeBar.d.ts +14 -0
- package/dist/Components/NavLauncher/ScopeBar.js +137 -0
- package/dist/Components/NavLauncher/engine/distance.d.ts +4 -0
- package/dist/Components/NavLauncher/engine/distance.js +41 -0
- package/dist/Components/NavLauncher/engine/engine.d.ts +84 -0
- package/dist/Components/NavLauncher/engine/engine.js +471 -0
- package/dist/Components/NavLauncher/engine/fold.d.ts +15 -0
- package/dist/Components/NavLauncher/engine/fold.js +83 -0
- package/dist/Components/NavLauncher/engine/index.d.ts +21 -0
- package/dist/Components/NavLauncher/engine/index.js +17 -0
- package/dist/Components/NavLauncher/launcherParts.d.ts +2 -0
- package/dist/Components/NavLauncher/launcherParts.js +11 -7
- package/dist/Components/NavLauncher/match.d.ts +13 -2
- package/dist/Components/NavLauncher/match.js +26 -12
- package/dist/Components/NavLauncher/searchLayout.d.ts +60 -0
- package/dist/Components/NavLauncher/searchLayout.js +108 -0
- package/dist/Components/NavLauncher/spotlight.d.ts +39 -0
- package/dist/Components/NavLauncher/spotlight.js +202 -0
- package/dist/Components/NavLauncher/spotlightParts.d.ts +49 -0
- package/dist/Components/NavLauncher/spotlightParts.js +108 -0
- package/dist/Components/NavigationBar/NavigationBar.js +2 -1
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +2 -4
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +6 -5
- package/dist/Components/ScrollToTop/ScrollToTop.js +4 -3
- package/dist/Components/SearchSelect/SearchSelect.js +4 -16
- package/dist/Components/Select/SelectPopup.js +1 -3
- package/dist/Components/Select/optionRowInk.d.ts +12 -0
- package/dist/Components/Select/optionRowInk.js +10 -1
- package/dist/Components/SelectSearch/SelectSearch.js +1 -10
- package/dist/Components/Table/Table.js +3 -2
- package/dist/Components/Table/TableProps.d.ts +1 -1
- package/dist/Components/Table/components/TableBody.js +9 -1
- package/dist/Components/Table/components/TableHeader.js +9 -2
- package/dist/Components/Table/components/TableLoading.d.ts +4 -1
- package/dist/Components/Table/components/TableLoading.js +13 -6
- package/dist/Components/Table/filters/CompactSelect.js +1 -10
- package/dist/Components/Table/variants/TableVariantContext.d.ts +1 -1
- package/dist/Components/Table/variants/TableVariantContext.js +3 -3
- package/dist/Components/WizardDialog/WizardDialog.d.ts +1 -1
- package/dist/Components/WizardDialog/WizardDialog.js +15 -3
- package/dist/Components/WizardDialog/WizardDialogProps.d.ts +5 -3
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +4 -0
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.d.ts +2 -2
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +26 -18
- package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +38 -8
- package/dist/Theme/chakra/Menu.styles.d.ts +8 -0
- package/dist/Theme/chakra/Menu.styles.js +7 -0
- package/dist/Theme/chakra/componentStyles.d.ts +8 -0
- package/dist/Theme/chakra/componentStyles.js +2 -2
- package/dist/Theme/chakra/ringShadow.d.ts +3 -0
- package/dist/Theme/chakra/ringShadow.js +7 -0
- package/dist/Theme/tokens/builders/accentText.d.ts +2 -0
- package/dist/Theme/tokens/builders/accentText.js +7 -1
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +1 -1
- package/dist/Theme/tokens/builders/buildDarkPalette.js +5 -5
- package/dist/Theme/tokens/builders/filledSurface.d.ts +5 -1
- package/dist/Theme/tokens/builders/filledSurface.js +17 -4
- package/dist/Theme/tokens/builders/planeStep.d.ts +1 -0
- package/dist/Theme/tokens/builders/planeStep.js +5 -4
- package/dist/Utils/table.js +2 -2
- package/dist/esm/Components/Button/Button.styles.js +8 -3
- package/dist/esm/Components/CopyButton/CopyButton.js +2 -2
- package/dist/esm/Components/Drawer/Drawer.js +6 -2
- package/dist/esm/Components/Dropdown/DropDown.js +2 -9
- package/dist/esm/Components/FilePreview/FilePreview.js +3 -2
- package/dist/esm/Components/FileUploader/FileUploader.js +4 -0
- package/dist/esm/Components/FormDrawer/FormDrawer.js +3 -3
- package/dist/esm/Components/Input/TextInput.styles.js +10 -6
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +6 -5
- package/dist/esm/Components/Modal/dialogNaming.js +18 -0
- package/dist/esm/Components/NavLauncher/LauncherTabs.js +2 -2
- package/dist/esm/Components/NavLauncher/NavLauncher.js +259 -49
- package/dist/esm/Components/NavLauncher/ScopeBar.js +134 -0
- package/dist/esm/Components/NavLauncher/engine/distance.js +37 -0
- package/dist/esm/Components/NavLauncher/engine/engine.js +458 -0
- package/dist/esm/Components/NavLauncher/engine/fold.js +74 -0
- package/dist/esm/Components/NavLauncher/engine/index.js +14 -0
- package/dist/esm/Components/NavLauncher/launcherParts.js +10 -6
- package/dist/esm/Components/NavLauncher/match.js +25 -12
- package/dist/esm/Components/NavLauncher/searchLayout.js +100 -0
- package/dist/esm/Components/NavLauncher/spotlight.js +194 -0
- package/dist/esm/Components/NavLauncher/spotlightParts.js +95 -0
- package/dist/esm/Components/NavigationBar/NavigationBar.js +2 -1
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +2 -4
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +7 -6
- package/dist/esm/Components/ScrollToTop/ScrollToTop.js +5 -4
- package/dist/esm/Components/SearchSelect/SearchSelect.js +6 -18
- package/dist/esm/Components/Select/SelectPopup.js +2 -4
- package/dist/esm/Components/Select/optionRowInk.js +7 -0
- package/dist/esm/Components/SelectSearch/SelectSearch.js +2 -11
- package/dist/esm/Components/Table/Table.js +4 -3
- package/dist/esm/Components/Table/components/TableBody.js +10 -2
- package/dist/esm/Components/Table/components/TableHeader.js +10 -3
- package/dist/esm/Components/Table/components/TableLoading.js +10 -6
- package/dist/esm/Components/Table/filters/CompactSelect.js +2 -11
- package/dist/esm/Components/Table/variants/TableVariantContext.js +3 -3
- package/dist/esm/Components/WizardDialog/WizardDialog.js +15 -3
- package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +4 -0
- package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +28 -20
- package/dist/esm/Theme/chakra/Menu.styles.js +7 -0
- package/dist/esm/Theme/chakra/componentStyles.js +2 -2
- package/dist/esm/Theme/chakra/ringShadow.js +3 -0
- package/dist/esm/Theme/tokens/builders/accentText.js +5 -0
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +5 -5
- package/dist/esm/Theme/tokens/builders/filledSurface.js +18 -5
- package/dist/esm/Theme/tokens/builders/planeStep.js +3 -3
- package/dist/esm/Utils/table.js +2 -2
- package/dist/esm/index.js +6 -5
- package/dist/index.d.ts +10 -8
- package/dist/index.js +14 -6
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import { transitionFor } from "../../Theme/tokens/primitives/index.js";
|
|
|
10
10
|
import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
|
|
11
11
|
import ToolTip from "../ToolTip/ToolTip.js";
|
|
12
12
|
/** Copies `value` to the clipboard in 3 layouts (icon/button/menu-item) — not a full share/export action. */
|
|
13
|
-
const CopyButton = ({ value, variant = "icon", label = "Copy", copiedLabel = "Copied!", tooltip = "Copy", feedbackDuration = 1500, iconSize = 16, size = "sm", onCopy, }) => {
|
|
13
|
+
const CopyButton = ({ value, variant = "icon", label = "Copy", copiedLabel = "Copied!", tooltip = "Copy", feedbackDuration = 1500, iconSize = 16, size = "sm", onCopy, onCopyError, }) => {
|
|
14
14
|
const theme = useCustomTheme();
|
|
15
15
|
const [copied, setCopied] = useState(false);
|
|
16
16
|
const timer = useRef();
|
|
@@ -25,7 +25,7 @@ const CopyButton = ({ value, variant = "icon", label = "Copy", copiedLabel = "Co
|
|
|
25
25
|
timer.current = setTimeout(() => setCopied(false), feedbackDuration);
|
|
26
26
|
}
|
|
27
27
|
catch {
|
|
28
|
-
|
|
28
|
+
onCopyError === null || onCopyError === void 0 ? void 0 : onCopyError(value);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
// NOTE: primary[500] fails AA as canvas ink in 5/7 brands (dark) — accentTextOnCanvas steps to a clearing rung.
|
|
@@ -2,6 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
4
4
|
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
5
|
+
import { DialogNaming } from "../Modal/dialogNaming.js";
|
|
5
6
|
import { warnDroppedSlotChildren } from "../Modal/warnDroppedSlotChildren.js";
|
|
6
7
|
import { Drawer as ChakraDrawer, DrawerBody as ChakraDrawerBody, DrawerFooter as ChakraDrawerFooter, DrawerHeader as ChakraDrawerHeader, DrawerOverlay, DrawerContent, DrawerCloseButton, } from "@chakra-ui/react";
|
|
7
8
|
export const DrawerHeader = ({ children }) => {
|
|
@@ -29,12 +30,15 @@ const findSlot = (children, slot) => {
|
|
|
29
30
|
}
|
|
30
31
|
return undefined;
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
+
function DialogContent({ label, labelledBy, ...props }) {
|
|
34
|
+
return (_jsx(DialogNaming, { label: label, labelledBy: labelledBy, children: _jsx(DrawerContent, { ...props }) }));
|
|
35
|
+
}
|
|
36
|
+
export default function Drawer({ isOpen, onClose, placement = "right", size = "xl", id, variant, vaiant, initialFocusRef, finalFocusRef, closeOnOverlayClick, closeOnEsc, contentProps, hideCloseButton, portalChildren, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }) {
|
|
33
37
|
var _a, _b;
|
|
34
38
|
const { colors } = useCustomTheme();
|
|
35
39
|
const headerSlot = findSlot(children, DrawerHeader);
|
|
36
40
|
const bodySlot = findSlot(children, DrawerBody);
|
|
37
41
|
const footerSlot = findSlot(children, DrawerFooter);
|
|
38
42
|
warnDroppedSlotChildren("Drawer", children, [DrawerHeader, DrawerBody, DrawerFooter]);
|
|
39
|
-
return (_jsxs(ChakraDrawer, { isOpen: isOpen, placement: placement, onClose: onClose, size: size, variant: (_a = variant !== null && variant !== void 0 ? variant : vaiant) !== null && _a !== void 0 ? _a : "solid", id: id, initialFocusRef: initialFocusRef, finalFocusRef: finalFocusRef, closeOnOverlayClick: closeOnOverlayClick, closeOnEsc: closeOnEsc, children: [_jsx(DrawerOverlay, {}), _jsxs(
|
|
43
|
+
return (_jsxs(ChakraDrawer, { isOpen: isOpen, placement: placement, onClose: onClose, size: size, variant: (_a = variant !== null && variant !== void 0 ? variant : vaiant) !== null && _a !== void 0 ? _a : "solid", id: id, initialFocusRef: initialFocusRef, finalFocusRef: finalFocusRef, closeOnOverlayClick: closeOnOverlayClick, closeOnEsc: closeOnEsc, children: [_jsx(DrawerOverlay, {}), _jsxs(DialogContent, { ...contentProps, label: ariaLabel, labelledBy: ariaLabelledBy, children: [!hideCloseButton && _jsx(DrawerCloseButton, {}), headerSlot && (_jsx(ChakraDrawerHeader, { borderBottomWidth: "1px", borderColor: raisedRule(colors), ...headerSlot.props, children: headerSlot })), _jsx(ChakraDrawerBody, { ...((_b = bodySlot === null || bodySlot === void 0 ? void 0 : bodySlot.props) !== null && _b !== void 0 ? _b : {}), children: bodySlot }), footerSlot && (_jsx(ChakraDrawerFooter, { borderTopWidth: "1px", borderColor: raisedRule(colors), ...footerSlot.props, children: footerSlot })), portalChildren] })] }));
|
|
40
44
|
}
|
|
@@ -6,6 +6,7 @@ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
|
6
6
|
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
7
7
|
import { scrollbarStyles } from "../../Theme/tokens/builders/scrollbar.js";
|
|
8
8
|
import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
|
|
9
|
+
import { optionRowInk } from "../Select/optionRowInk.js";
|
|
9
10
|
import { useExclusiveOverlay } from "../../Hooks/useExclusiveOverlay.js";
|
|
10
11
|
import { ChevronDown } from "lucide-react";
|
|
11
12
|
import { rafThrottle } from "../../Utils/rafThrottle.js";
|
|
@@ -246,16 +247,8 @@ const Dropdown = forwardRef(({ dropDownButtonStyle, ButtonText, options, handleO
|
|
|
246
247
|
}, role: "menuitem", tabIndex: index === activeIndex ? 0 : -1, onClick: () => {
|
|
247
248
|
handleListItemClick(option.id, option.label);
|
|
248
249
|
focusTrigger();
|
|
249
|
-
}, onKeyDown: (e) => handleItemKeyDown(e, option.id, option.label), mx: rowSpec.mx, px: rowSpec.px, py: rowSpec.py, minH: rowSpec.minH, borderRadius: OPTION_ROW_RADIUS, display: "flex", alignItems: "center", gap: rowSpec.gap, fontSize: rowSpec.fontSize, cursor: "pointer", color: theme.colors
|
|
250
|
+
}, onKeyDown: (e) => handleItemKeyDown(e, option.id, option.label), mx: rowSpec.mx, px: rowSpec.px, py: rowSpec.py, minH: rowSpec.minH, borderRadius: OPTION_ROW_RADIUS, display: "flex", alignItems: "center", gap: rowSpec.gap, fontSize: rowSpec.fontSize, cursor: "pointer", color: optionRowInk(theme.colors, false), transition: ROW_TRANSITION, _hover: { bg: hoverTint }, _focus: { bg: hoverTint, outline: "none" }, _focusVisible: {
|
|
250
251
|
bg: hoverTint,
|
|
251
|
-
color: theme.colors.accentText,
|
|
252
|
-
}, _focus: {
|
|
253
|
-
bg: hoverTint,
|
|
254
|
-
color: theme.colors.accentText,
|
|
255
|
-
outline: "none",
|
|
256
|
-
}, _focusVisible: {
|
|
257
|
-
bg: hoverTint,
|
|
258
|
-
color: theme.colors.accentText,
|
|
259
252
|
boxShadow: `inset 0 0 0 2px ${theme.colors.focusRing.ring}`,
|
|
260
253
|
}, borderBottom: divider
|
|
261
254
|
? `${BORDER_WIDTHS.hairline} solid ${raisedRule(theme.colors)}`
|
|
@@ -4,7 +4,7 @@ import { Box, Flex, IconButton, Image, Modal, ModalBody, ModalCloseButton, Modal
|
|
|
4
4
|
import { motion } from "framer-motion";
|
|
5
5
|
import { Download, Eye, FileQuestion, Minus, Plus, RotateCw, } from "lucide-react";
|
|
6
6
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
7
|
-
import {
|
|
7
|
+
import { resolveFilledSurface } from "../../Theme/tokens/builders/filledSurface.js";
|
|
8
8
|
import { hexToRgb } from "../../Theme/tokens/builders/color.js";
|
|
9
9
|
import { overlayScrimStyles } from "../../Theme/chakra/overlay.styles.js";
|
|
10
10
|
import ToolTip from "../ToolTip/ToolTip.js";
|
|
@@ -43,6 +43,7 @@ const downloadFile = async (fileUrl, fileName) => {
|
|
|
43
43
|
/** Modal previewer inferring image/pdf/video/other from the extension — for an always-inline PDF-only panel use PdfViewer. */
|
|
44
44
|
export const FilePreview = ({ isOpen, onClose, fileUrl, fileName, fileType, hideDownload = false, size = "xl", }) => {
|
|
45
45
|
const theme = useCustomTheme();
|
|
46
|
+
const downloadFill = resolveFilledSurface(theme.colors.primary, theme.colors);
|
|
46
47
|
const [zoom, setZoom] = useState(1);
|
|
47
48
|
const [rotation, setRotation] = useState(0);
|
|
48
49
|
const kind = fileType || inferKind(fileUrl, fileName);
|
|
@@ -64,7 +65,7 @@ export const FilePreview = ({ isOpen, onClose, fileUrl, fileName, fileType, hide
|
|
|
64
65
|
if (kind === "video") {
|
|
65
66
|
return (_jsx(Box, { as: "video", src: fileUrl, controls: true, width: "100%", borderRadius: "lg" }));
|
|
66
67
|
}
|
|
67
|
-
return (_jsxs(Flex, { direction: "column", align: "center", justify: "center", py: 12, gap: 3, children: [_jsx(FileQuestion, { size: 48, color: theme.colors.textMuted }), _jsx(Text, { color: theme.colors.textMuted, fontSize: "sm", children: "Preview isn't available for this file type." }), !hideDownload && (_jsxs(Flex, { as: "button", align: "center", gap: 2, px: 4, py: 2, borderRadius: "lg", bg:
|
|
68
|
+
return (_jsxs(Flex, { direction: "column", align: "center", justify: "center", py: 12, gap: 3, children: [_jsx(FileQuestion, { size: 48, color: theme.colors.textMuted }), _jsx(Text, { color: theme.colors.textMuted, fontSize: "sm", children: "Preview isn't available for this file type." }), !hideDownload && (_jsxs(Flex, { as: "button", align: "center", gap: 2, px: 4, py: 2, borderRadius: "lg", bg: downloadFill.fill, color: downloadFill.color, fontSize: "sm", fontWeight: 500, onClick: () => downloadFile(fileUrl, fileName), children: [_jsx(Download, { size: 16 }), " Download file"] }))] }));
|
|
68
69
|
};
|
|
69
70
|
return (_jsxs(Modal, { isOpen: isOpen, onClose: handleClose, size: size, isCentered: true, children: [_jsx(ModalOverlay, { ...overlayScrimStyles(theme.colors) }), _jsxs(MotionContent, { bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", initial: { opacity: 0, scale: 0.96, y: 8 }, animate: { opacity: 1, scale: 1, y: 0 }, transition: { duration: 0.2, ease: "easeOut" }, children: [_jsxs(Flex, { align: "center", justify: "space-between", px: 4, py: 3, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: [_jsx(ToolTip, { label: fileName || "File", placement: "bottom", children: _jsx(Text, { fontSize: "sm", fontWeight: 600, maxW: "60%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: fileName || "Preview" }) }), _jsxs(Flex, { align: "center", gap: 1, children: [kind === "image" && (_jsxs(_Fragment, { children: [_jsx(ToolTip, { label: "Zoom out", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Zoom out", size: "sm", variant: "ghost", icon: _jsx(Minus, { size: 16 }), onClick: () => setZoom((z) => Math.max(0.25, z - 0.25)) }) }), _jsx(ToolTip, { label: "Zoom in", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Zoom in", size: "sm", variant: "ghost", icon: _jsx(Plus, { size: 16 }), onClick: () => setZoom((z) => Math.min(4, z + 0.25)) }) }), _jsx(ToolTip, { label: "Rotate", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Rotate", size: "sm", variant: "ghost", icon: _jsx(RotateCw, { size: 16 }), onClick: () => setRotation((r) => (r + 90) % 360) }) })] })), !hideDownload && (_jsx(ToolTip, { label: "Download", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Download", size: "sm", variant: "ghost", color: theme.colors.semanticText.success, icon: _jsx(Download, { size: 18 }), onClick: () => downloadFile(fileUrl, fileName) }) })), _jsx(ModalCloseButton, { position: "static" })] })] }), _jsx(ModalBody, { p: 5, children: renderBody() })] })] }));
|
|
70
71
|
};
|
|
@@ -8,6 +8,7 @@ import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
|
|
|
8
8
|
import { FIELD_RADIUS } from "../Common/fieldStyles.js";
|
|
9
9
|
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
10
10
|
import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
|
|
11
|
+
const revokePreviews = (files) => files.forEach((f) => f.previewUrl && URL.revokeObjectURL(f.previewUrl));
|
|
11
12
|
/** Self-contained widget; onFilesChange returns {id,name,size,previewUrl} metadata, never real File objects — cannot be used to upload bytes. */
|
|
12
13
|
const FileUploader = ({ maxFiles = 10, maxTotalSize = 20, onFilesChange, acceptTypes = ["jpeg", "jpg", "png"], }) => {
|
|
13
14
|
const { showToast } = useToaster();
|
|
@@ -36,7 +37,9 @@ const FileUploader = ({ maxFiles = 10, maxTotalSize = 20, onFilesChange, acceptT
|
|
|
36
37
|
}));
|
|
37
38
|
const combinedFiles = [...uploadedFiles, ...newFiles].slice(0, maxFiles);
|
|
38
39
|
const totalSizeBytes = combinedFiles.reduce((acc, f) => acc + f.size, 0);
|
|
40
|
+
revokePreviews(newFiles.filter((f) => !combinedFiles.includes(f)));
|
|
39
41
|
if (totalSizeBytes > maxTotalBytes) {
|
|
42
|
+
revokePreviews(newFiles);
|
|
40
43
|
showToast({
|
|
41
44
|
title: `Total file size exceeds ${maxTotalSize} MB limit.`,
|
|
42
45
|
duration: 3000,
|
|
@@ -66,6 +69,7 @@ const FileUploader = ({ maxFiles = 10, maxTotalSize = 20, onFilesChange, acceptT
|
|
|
66
69
|
const handleDragLeave = () => setIsDragOver(false);
|
|
67
70
|
const removeFile = (id) => {
|
|
68
71
|
const filtered = uploadedFiles.filter((f) => f.id !== id);
|
|
72
|
+
revokePreviews(uploadedFiles.filter((f) => f.id === id));
|
|
69
73
|
setUploadedFiles(filtered);
|
|
70
74
|
onFilesChange === null || onFilesChange === void 0 ? void 0 : onFilesChange(filtered);
|
|
71
75
|
};
|
|
@@ -12,7 +12,7 @@ const DEFAULT_LABELS = {
|
|
|
12
12
|
discard: "Discard",
|
|
13
13
|
keepEditing: "Keep editing",
|
|
14
14
|
};
|
|
15
|
-
export default function FormDrawer({ isOpen, onClose, title, description, sections, errors = [], isDirty, onSubmit, isSubmitting = false, submitLabel = "Save", cancelLabel = "Cancel", secondaryAction, size = "md", labels, "data-testid": testId = "form-drawer", }) {
|
|
15
|
+
export default function FormDrawer({ isOpen, onClose, title, description, sections, errors = [], isDirty, onSubmit, isSubmitting = false, isSubmitDisabled = false, submitLabel = "Save", cancelLabel = "Cancel", secondaryAction, size = "md", labels, "data-testid": testId = "form-drawer", }) {
|
|
16
16
|
const { colors } = useCustomTheme();
|
|
17
17
|
const uid = useId();
|
|
18
18
|
const formId = `${uid}-form`;
|
|
@@ -45,7 +45,7 @@ export default function FormDrawer({ isOpen, onClose, title, description, sectio
|
|
|
45
45
|
};
|
|
46
46
|
const submit = (event) => {
|
|
47
47
|
event.preventDefault();
|
|
48
|
-
if (isSubmitting)
|
|
48
|
+
if (isSubmitting || isSubmitDisabled)
|
|
49
49
|
return;
|
|
50
50
|
focusPending.current = true;
|
|
51
51
|
setAttempt((n) => n + 1);
|
|
@@ -54,5 +54,5 @@ export default function FormDrawer({ isOpen, onClose, title, description, sectio
|
|
|
54
54
|
return (_jsxs(Drawer, { isOpen: isOpen, onClose: requestClose, size: size, closeOnEsc: !isSubmitting, closeOnOverlayClick: !isSubmitting, portalChildren: _jsx(AlertDialog, { isOpen: confirmDiscard, onClose: () => setConfirmDiscard(false), leastDestructiveRef: keepEditingRef, isCentered: true, tone: "danger", title: text.discardTitle, content: _jsx(Text, { fontSize: "sm", color: colors.text[800], children: text.discardBody }), cancelButtonText: text.keepEditing, confirmButtonText: text.discard, onConfirm: () => {
|
|
55
55
|
setConfirmDiscard(false);
|
|
56
56
|
onClose();
|
|
57
|
-
} }), children: [_jsxs(DrawerHeader, { children: [_jsx(Heading, { id: titleId, as: "h2", fontSize: "md", fontWeight: 600, color: colors.header[900], children: title }), description ? (_jsx(Text, { mt: 0.5, fontSize: "sm", fontWeight: 400, color: colors.textMuted, children: description })) : null] }), _jsx(DrawerBody, { children: _jsx(Box, { as: "form", id: formId, "aria-labelledby": titleId, onSubmit: submit, noValidate: true, "data-testid": testId, children: _jsxs(Flex, { direction: "column", gap: 5, pt: 2, children: [errors.length ? (_jsxs(Alert, { ref: summaryRef, tabIndex: -1, status: "error", variant: "subtle", borderRadius: "md", alignItems: "flex-start", "data-testid": `${testId}-errors`, children: [_jsx(AlertIcon, {}), _jsxs(Box, { children: [_jsx(AlertTitle, { fontSize: "sm", children: text.fixErrors }), _jsx(AlertDescription, { fontSize: "sm", children: _jsx(UnorderedList, { mt: 1, children: errors.map((message) => (_jsx(ListItem, { children: message }, message))) }) })] })] })) : null, sections.map((section, index) => (_jsxs(Fragment, { children: [index > 0 ? _jsx(Divider, { borderColor: colors.boxborder[200] }) : null, _jsxs(Flex, { as: "section", direction: "column", gap: 4, "aria-label": section.title, children: [section.title ? (_jsxs(Box, { children: [_jsx(Heading, { as: "h3", fontSize: "sm", fontWeight: 600, color: colors.header[900], children: section.title }), section.description ? (_jsx(Text, { mt: 0.5, fontSize: "xs", color: colors.textMuted, children: section.description })) : null] })) : null, section.content] })] }, section.id)))] }) }) }), _jsx(DrawerFooter, { children: _jsxs(Flex, { gap: 2, w: "100%", justify: "flex-end", wrap: "wrap", children: [secondaryAction, _jsx(Button, { variant: "ghost", colorScheme: "gray", onClick: requestClose, isDisabled: isSubmitting, label: cancelLabel }), _jsx(Button, { variant: "solid", colorScheme: "primary", type: "submit", form: formId, isLoading: isSubmitting, loadingText: submitLabel, label: submitLabel, "data-testid": `${testId}-submit` })] }) })] }));
|
|
57
|
+
} }), children: [_jsxs(DrawerHeader, { children: [_jsx(Heading, { id: titleId, as: "h2", fontSize: "md", fontWeight: 600, color: colors.header[900], children: title }), description ? (_jsx(Text, { mt: 0.5, fontSize: "sm", fontWeight: 400, color: colors.textMuted, children: description })) : null] }), _jsx(DrawerBody, { children: _jsx(Box, { as: "form", id: formId, "aria-labelledby": titleId, onSubmit: submit, noValidate: true, "data-testid": testId, children: _jsxs(Flex, { direction: "column", gap: 5, pt: 2, children: [errors.length ? (_jsxs(Alert, { ref: summaryRef, tabIndex: -1, status: "error", variant: "subtle", borderRadius: "md", alignItems: "flex-start", "data-testid": `${testId}-errors`, children: [_jsx(AlertIcon, {}), _jsxs(Box, { children: [_jsx(AlertTitle, { fontSize: "sm", children: text.fixErrors }), _jsx(AlertDescription, { fontSize: "sm", children: _jsx(UnorderedList, { mt: 1, children: errors.map((message) => (_jsx(ListItem, { children: message }, message))) }) })] })] })) : null, sections.map((section, index) => (_jsxs(Fragment, { children: [index > 0 ? _jsx(Divider, { borderColor: colors.boxborder[200] }) : null, _jsxs(Flex, { as: "section", direction: "column", gap: 4, "aria-label": section.title, children: [section.title ? (_jsxs(Box, { children: [_jsx(Heading, { as: "h3", fontSize: "sm", fontWeight: 600, color: colors.header[900], children: section.title }), section.description ? (_jsx(Text, { mt: 0.5, fontSize: "xs", color: colors.textMuted, children: section.description })) : null] })) : null, section.content] })] }, section.id)))] }) }) }), _jsx(DrawerFooter, { children: _jsxs(Flex, { gap: 2, w: "100%", justify: "flex-end", wrap: "wrap", children: [secondaryAction, _jsx(Button, { variant: "ghost", colorScheme: "gray", onClick: requestClose, isDisabled: isSubmitting, label: cancelLabel }), _jsx(Button, { variant: "solid", colorScheme: "primary", type: "submit", form: formId, isLoading: isSubmitting, isDisabled: isSubmitDisabled, loadingText: submitLabel, label: submitLabel, "data-testid": `${testId}-submit` })] }) })] }));
|
|
58
58
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { controlSizeStyles, fieldControlStyles, FIELD_BORDER_WIDTH } from "../Common/fieldStyles.js";
|
|
2
2
|
import { CONTROL_SIZE_NAMES, DEFAULT_CONTROL_SIZE } from "../../Theme/tokens/primitives/controlSizes.js";
|
|
3
3
|
import { fieldFocusVisible } from "../../Theme/chakra/focusRing.styles.js";
|
|
4
|
+
import { bandOn } from "../../Theme/tokens/builders/planeStep.js";
|
|
4
5
|
/** Field look shared by Input, Textarea and NumberInput; `_invalid` also clears Chakra's stock invalid shadow. */
|
|
5
6
|
export const fieldPartStyles = (colors) => {
|
|
6
7
|
const error = colors.semanticText.error;
|
|
@@ -14,12 +15,15 @@ export const fieldPartStyles = (colors) => {
|
|
|
14
15
|
},
|
|
15
16
|
};
|
|
16
17
|
};
|
|
17
|
-
export const fieldFilledStyles = (colors) =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
export const fieldFilledStyles = (colors) => {
|
|
19
|
+
const filledBand = bandOn(colors.background[100], colors.background[50]);
|
|
20
|
+
return {
|
|
21
|
+
...fieldPartStyles(colors),
|
|
22
|
+
bg: filledBand,
|
|
23
|
+
borderColor: "transparent",
|
|
24
|
+
_hover: { bg: filledBand, borderColor: "transparent" },
|
|
25
|
+
};
|
|
26
|
+
};
|
|
23
27
|
export const fieldFlushedStyles = (colors) => ({
|
|
24
28
|
...fieldPartStyles(colors),
|
|
25
29
|
bg: "transparent",
|
|
@@ -12,6 +12,7 @@ import { reducedMotionSx } from "../../Theme/chakra/motion.js";
|
|
|
12
12
|
import { focusVisibleStyles } from "../../Theme/chakra/focusRing.styles.js";
|
|
13
13
|
import { useGetPreferences, useSavePreferences, } from "../../Hooks/usePreferences.js";
|
|
14
14
|
import AccountCard from "./AccountCard.js";
|
|
15
|
+
import { cardRule, ruleOn } from "../../Theme/tokens/builders/planeStep.js";
|
|
15
16
|
import HeaderActions from "../Header/HeaderActions.js";
|
|
16
17
|
import MeasuredItem from "./MeasuredItem.js";
|
|
17
18
|
import OverflowTooltipText from "../SideBar/components/OverflowTooltipText.js";
|
|
@@ -35,7 +36,7 @@ const MIN_LIST_HEIGHT = 120;
|
|
|
35
36
|
const KANBAN_VIRTUALIZE_THRESHOLD = 30;
|
|
36
37
|
const COLUMN_TRANSITION = `${transitionFor(["background-color", "border-color"])}, ${transitionFor(["width"], "base")}`;
|
|
37
38
|
const SKELETON_ROWS = [3, 4, 3];
|
|
38
|
-
const CardSkeleton = ({ colors, rows }) => (_jsx(Box, { "data-testid": "kanban-card-skeleton", borderRadius: "lg", bg: colors.background[50], border: `${BORDER_WIDTHS.hairline} solid ${colors
|
|
39
|
+
const CardSkeleton = ({ colors, rows }) => (_jsx(Box, { "data-testid": "kanban-card-skeleton", borderRadius: "lg", bg: colors.background[50], border: `${BORDER_WIDTHS.hairline} solid ${cardRule(colors)}`, p: 3, minH: "5rem", children: _jsx(Flex, { direction: "column", gap: 2.5, children: Array.from({ length: rows }).map((_, i) => (_jsxs(Flex, { gap: 2, align: "center", children: [_jsx(Skeleton, { h: 2.5, w: "30%", borderRadius: "sm" }), _jsx(Skeleton, { h: 2.5, flex: "1", maxW: i % 2 ? "40%" : "55%", borderRadius: "sm" })] }, i))) }) }));
|
|
39
40
|
// Top buffer above the first card so its border + hover lift aren't clipped by the
|
|
40
41
|
// scroll/virtualized list's top edge.
|
|
41
42
|
const KANBAN_LIST_TOP_PAD = 6;
|
|
@@ -405,14 +406,14 @@ const KanbanBoard = ({ data, customColumns, customizeColumn, onDrag, onDelete, o
|
|
|
405
406
|
return (_jsxs(Box, { ref: provided.innerRef, ...provided.droppableProps, width: isColCollapsed ? COLLAPSED_KANBAN_COLUMN_WIDTH : columnWidth, borderRadius: "xl", background: snapshot.isDraggingOver
|
|
406
407
|
? colors.primary[50]
|
|
407
408
|
: colors.background[100], border: `${BORDER_WIDTHS.hairline} ${snapshot.isDraggingOver ? "dashed" : "solid"} ${snapshot.isDraggingOver
|
|
408
|
-
? colors.
|
|
409
|
-
: colors.
|
|
409
|
+
? colors.focusRing.ring
|
|
410
|
+
: ruleOn(colors, colors.background[100])}`, transition: COLUMN_TRANSITION, display: "flex", flexDirection: "column", flexShrink: 0, overflow: isColCollapsed ? "visible" : "hidden", height: COLUMN_HEIGHT, sx: reducedMotionSx(), onMouseEnter: () => hoveredColumn.set(colId), onMouseLeave: () => hoveredColumn.set(null), onFocus: () => hoveredColumn.set(colId), onBlur: (e) => {
|
|
410
411
|
if (!e.currentTarget.contains(e.relatedTarget))
|
|
411
412
|
hoveredColumn.set(null);
|
|
412
413
|
}, children: [isColCollapsed ? (_jsxs(Flex, { direction: "column", align: "stretch", flex: "1", width: "100%", minH: 0, overflow: "visible", position: "relative", children: [_jsxs(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 ? (_jsx(Flex, { align: "center", justify: "center", flexShrink: 0, cursor: "grab", ...columnDragHandleProps, "aria-label": `Reorder ${column.title} column`, children: _jsx(Box, { as: GripVertical, size: 14, color: colors.textMuted }) })) : null, enableColumnCollapse && (_jsx(Flex, { flexShrink: 0, w: "100%", justify: "center", bg: colors.background[100], position: "relative", zIndex: 3, children: _jsx(IconButton, { "aria-label": "Expand column", icon: _jsx(ChevronRight, { size: 14 }), variant: "ghost", size: "xs", minW: "1.5rem", h: "1.75rem", onClick: () => toggleColumnCollapsed(colId) }) })), _jsx(Text, { as: "span", fontWeight: "700", fontSize: "xs", color: colors.text[700], sx: {
|
|
413
414
|
writingMode: "vertical-rl",
|
|
414
415
|
textOrientation: "mixed",
|
|
415
|
-
}, maxH: `${Math.max(120, containerHeight - 200)}px`, overflow: "hidden", lineHeight: "1.2", title: column.title, children: column.title }), _jsx(Badge, { minW: 5, h: 5, borderRadius: "full", border: `${BORDER_WIDTHS.hairline} solid`, borderColor: colors.
|
|
416
|
+
}, maxH: `${Math.max(120, containerHeight - 200)}px`, overflow: "hidden", lineHeight: "1.2", title: column.title, children: column.title }), _jsx(Badge, { minW: 5, h: 5, borderRadius: "full", border: `${BORDER_WIDTHS.hairline} solid`, borderColor: ruleOn(colors, colors.background[100]), display: "flex", backgroundColor: colors.background[100], alignItems: "center", justifyContent: "center", color: colors.text[900], fontWeight: 600, fontSize: "xs", children: (_b = column === null || column === void 0 ? void 0 : column.items) === null || _b === void 0 ? void 0 : _b.length })] }), column.customNode ? (_jsx(Box, { flexShrink: 0, minH: COLLAPSED_CUSTOM_NODE_TOP_RESERVE, w: "100%", bg: colors.background[100], "aria-hidden": true })) : null, column.customNode ? (_jsx(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: _jsx(Box, { position: "relative", transform: "rotate(90deg)", transformOrigin: "center center", marginTop: '1rem', children: _jsx(VStack, { align: "stretch", spacing: 1, minW: "max-content", fontSize: "xs", color: colors.text[600], children: column.customNode() }) }) })) : (_jsx(Box, { flex: "1", minH: 0 }))] })) : (_jsxs(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: `${BORDER_WIDTHS.hairline} solid ${ruleOn(colors, colors.background[100])}`, children: [_jsxs(Flex, { direction: "column", gap: 1, minW: 0, flex: "1", children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(Box, { boxSize: 2.5, borderRadius: "full", bg: (_e = column.color) !== null && _e !== void 0 ? _e : colors.primary[500], flexShrink: 0 }), enableColumnReorder && columnDragHandleProps ? (_jsx(Flex, { align: "center", justify: "center", flexShrink: 0, cursor: "grab", ...columnDragHandleProps, "aria-label": `Reorder ${column.title} column`, children: _jsx(Box, { as: GripVertical, size: 14, color: colors.textMuted }) })) : null, _jsx(Text, { as: "span", fontWeight: "600", fontSize: "sm", color: colors.text[700], noOfLines: 1, minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", children: column.title }) })] }), column.customNode ? (_jsx(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] }), _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(Badge, { minW: 6, h: 6, px: 2, borderRadius: "full", backgroundColor: colors.backgroundColor.subtle, display: "flex", alignItems: "center", justifyContent: "center", color: colors.text[500], fontWeight: 600, fontSize: "xs", children: (_g = column === null || column === void 0 ? void 0 : column.items) === null || _g === void 0 ? void 0 : _g.length }), enableColumnCollapse && (_jsx(IconButton, { "aria-label": "Collapse column", icon: _jsx(ChevronLeft, { size: 14 }), variant: "ghost", size: "xs", minW: "1.5rem", h: "1.75rem", flexShrink: 0, onClick: () => toggleColumnCollapsed(colId) })), canDelete && column.items.length > 0 ? (_jsx(ColumnDeleteAll, { colId: colId, title: column.title, hoveredColumn: hoveredColumn, colors: colors, onDelete: handleColumnDelete })) : (_jsx(Box, { boxSize: 4, flexShrink: 0 }))] })] })), !isColCollapsed && (_jsxs(Box, { px: 2, flex: "1", overflowY: "auto", width: "100%", sx: {
|
|
416
417
|
...scrollbarStyles(colors),
|
|
417
418
|
overflowY: "auto",
|
|
418
419
|
overflowX: "hidden",
|
|
@@ -454,7 +455,7 @@ const KanbanBoard = ({ data, customColumns, customizeColumn, onDrag, onDelete, o
|
|
|
454
455
|
}
|
|
455
456
|
return renderColumnDroppable(colId, column, null, isColCollapsed);
|
|
456
457
|
});
|
|
457
|
-
const loadingSkeletonRow = Array.from({ length: 4 }).map((_, idx) => (_jsxs(Box, { "aria-hidden": true, width: columnWidth, borderRadius: "xl", bg: colors.background[100], border: `${BORDER_WIDTHS.hairline} solid ${colors.
|
|
458
|
+
const loadingSkeletonRow = Array.from({ length: 4 }).map((_, idx) => (_jsxs(Box, { "aria-hidden": true, width: columnWidth, borderRadius: "xl", bg: colors.background[100], border: `${BORDER_WIDTHS.hairline} solid ${ruleOn(colors, colors.background[100])}`, flexShrink: 0, alignSelf: "flex-start", overflow: "hidden", children: [_jsxs(Flex, { h: "2.75rem", align: "center", gap: 2, px: 3, borderBottom: `${BORDER_WIDTHS.hairline} solid ${ruleOn(colors, colors.background[100])}`, children: [_jsx(SkeletonCircle, { size: "2.5" }), _jsx(Skeleton, { h: 3, w: "40%", borderRadius: "sm" }), _jsx(Skeleton, { h: 6, w: 6, ml: "auto", borderRadius: "full" })] }), _jsx(Flex, { direction: "column", gap: 3, px: 2, pt: 1.5, pb: 3, children: SKELETON_ROWS.slice(0, 3 - (idx % 2)).map((rows, i) => (_jsx(CardSkeleton, { colors: colors, rows: rows }, i))) })] }, idx)));
|
|
458
459
|
return (_jsxs(_Fragment, { children: [_jsx(HeaderActions, { select: kanbanSelect, edit: canDrag ? kanbanEdit : undefined, create: canCreate ? kanbanCreate : undefined }), _jsx(DragDropContext, { onDragEnd: onDragEnd, children: _jsxs(Box, { ref: containerRef, "data-testid": "kanban-board", "aria-busy": isBoardLoading || undefined, bg: colors.backgroundColor.main, h: height !== null && height !== void 0 ? height : `${viewportHeight}px`, maxH: maxH, position: "relative", overflow: "hidden", mt: 2, children: [showAddColumn && !isBoardLoading && !hasAnyColumns && (_jsx(Flex, { position: "absolute", inset: 0, align: "center", justify: "center", pointerEvents: "none", zIndex: 1, children: _jsxs(Flex, { direction: "column", align: "center", justify: "center", gap: 2, pointerEvents: "auto", cursor: "pointer", px: 6, py: 5, borderRadius: "lg", bg: colors.background[100], border: `0.125rem dashed ${colors.boxborder[500]}`, _hover: { borderColor: colors.primary[500] }, ...addColumnKeyboard, children: [_jsx(Box, { as: Plus, size: 20, color: colors.text[700] }), _jsx(Text, { fontSize: "sm", color: colors.text[600], children: (customizeColumn === null || customizeColumn === void 0 ? void 0 : customizeColumn.buttonText) || "Add column" })] }) })), isBoardLoading ? (_jsx(Flex, { role: "status", "aria-label": "Loading board", gap: 4, p: 4, pb: 6, overflowX: "auto", overflowY: "hidden", height: "100%", sx: flexScrollSx, children: loadingSkeletonRow })) : enableColumnReorder ? (_jsx(Droppable, { droppableId: "COLUMN_REORDER", direction: "horizontal", type: "COLUMN", children: (colReorderProvided) => (_jsxs(Flex, { ref: colReorderProvided.innerRef, ...colReorderProvided.droppableProps, gap: 4, p: 4, pb: 6, overflowX: "auto", overflowY: "hidden", height: "100%", sx: flexScrollSx, children: [columnsList, colReorderProvided.placeholder, addColumnBox] })) })) : (_jsxs(Flex, { gap: 4, p: 4, pb: 6, overflowX: "auto", overflowY: "hidden", height: "100%", sx: flexScrollSx, children: [columnsList, addColumnBox] }))] }) })] }));
|
|
459
460
|
};
|
|
460
461
|
export default KanbanBoard;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { ModalContextProvider, useModalContext } from "@chakra-ui/react";
|
|
4
|
+
// Chakra's getDialogProps always points aria-labelledby at the header, so override it at the source.
|
|
5
|
+
export function DialogNaming({ label, labelledBy, children }) {
|
|
6
|
+
const modal = useModalContext();
|
|
7
|
+
const value = useMemo(() => label || labelledBy
|
|
8
|
+
? {
|
|
9
|
+
...modal,
|
|
10
|
+
getDialogProps: ((...args) => ({
|
|
11
|
+
...modal.getDialogProps(...args),
|
|
12
|
+
...(label ? { "aria-label": label } : {}),
|
|
13
|
+
"aria-labelledby": labelledBy,
|
|
14
|
+
})),
|
|
15
|
+
}
|
|
16
|
+
: modal, [modal, label, labelledBy]);
|
|
17
|
+
return _jsx(ModalContextProvider, { value: value, children: children });
|
|
18
|
+
}
|
|
@@ -42,7 +42,7 @@ export function LauncherTabs({ tabs, selected, onSelect, idBase, label, onLeaveU
|
|
|
42
42
|
refs.current.set(tab.id, node);
|
|
43
43
|
else
|
|
44
44
|
refs.current.delete(tab.id);
|
|
45
|
-
}, "aria-selected": isSelected, "aria-controls": isSelected ? panelId(idBase) : undefined, tabIndex: isSelected ? 0 : -1, onClick: () => onSelect(tab.id), position: "relative", flex: { base: 1, md: "none" }, minW: { md: "112px" }, h: "46px", px: { base: "6px", md: "14px" }, whiteSpace: "nowrap", fontSize: "
|
|
45
|
+
}, "aria-selected": isSelected, "aria-controls": isSelected ? panelId(idBase) : undefined, tabIndex: isSelected ? 0 : -1, onClick: () => onSelect(tab.id), position: "relative", flex: { base: 1, md: "none" }, minW: { md: "112px" }, h: "46px", px: { base: "6px", md: "14px" }, whiteSpace: "nowrap", fontSize: "sm", fontWeight: isSelected ? 600 : 500, color: isSelected ? colors.accentText : colors.textMuted, transition: transitionFor(["color"]), _hover: {
|
|
46
46
|
color: isSelected ? colors.accentText : colors.text[900],
|
|
47
47
|
}, _after: {
|
|
48
48
|
content: '""',
|
|
@@ -53,6 +53,6 @@ export function LauncherTabs({ tabs, selected, onSelect, idBase, label, onLeaveU
|
|
|
53
53
|
h: "2px",
|
|
54
54
|
borderRadius: "2px 2px 0 0",
|
|
55
55
|
bg: isSelected ? colors.primary[500] : "transparent",
|
|
56
|
-
}, sx: { ...ring, borderRadius: "
|
|
56
|
+
}, sx: { ...ring, borderRadius: "lg" }, children: tab.label }, tab.id));
|
|
57
57
|
}) }));
|
|
58
58
|
}
|