@mks2508/mks-ui 0.7.0 → 0.8.1
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/react-ui/blocks/Terminal/TerminalDisplay.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/TerminalDisplay.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/components/LogLineBadges/LogLineBadges.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge/TerminalLogBadge.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge/TerminalLogBadge.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/controls/TerminalActionBar/TerminalActionBar.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/controls/TerminalActionBar/TerminalActionBar.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/controls/TerminalConnectionStatus/TerminalConnectionStatus.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/controls/TerminalConnectionStatus/TerminalConnectionStatus.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/controls/TerminalFontControls/TerminalFontControls.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/controls/TerminalFontControls/TerminalFontControls.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/controls/TerminalSplitButton/TerminalSplitButton.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/controls/TerminalSplitButton/TerminalSplitButton.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/controls/TerminalStatusBar/TerminalStatusBar.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/controls/TerminalStatusBar/TerminalStatusBar.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel/TerminalDebugPanel.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel/TerminalDebugPanel.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown/TerminalFilterDropdown.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown/TerminalFilterDropdown.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs/TerminalFilterTabs.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs/TerminalFilterTabs.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelWterm.d.ts +0 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelWterm.d.ts.map +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelWterm.js +56 -18
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel/TerminalLogsPanel.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel/TerminalLogsPanel.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter/TerminalPanelFooter.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter/TerminalPanelFooter.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader/TerminalPanelHeader.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader/TerminalPanelHeader.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar/TerminalPanelToolbar.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar/TerminalPanelToolbar.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl/TerminalSessionControl.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl/TerminalSessionControl.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs/TerminalSessionTabs.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs/TerminalSessionTabs.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover/TerminalSettingsPopover.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover/TerminalSettingsPopover.types.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector/TerminalThemeSelector.styles.d.ts +1 -1
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector/TerminalThemeSelector.types.d.ts +1 -1
- package/dist/react-ui/components/MorphingPopover/MorphingPopover.types.d.ts +8 -3
- package/dist/react-ui/components/MorphingPopover/MorphingPopover.types.d.ts.map +1 -1
- package/dist/react-ui/index.js +24 -1
- package/dist/react-ui/primitives/AutoHeight/index.d.ts +1 -1
- package/dist/react-ui/primitives/CountingNumber/index.d.ts +1 -1
- package/dist/react-ui/primitives/DotMatrix/DotMatrix.types.d.ts +109 -0
- package/dist/react-ui/primitives/DotMatrix/DotMatrix.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/DotMatrix/dot-matrix-B8DHjPGb.css +364 -0
- package/dist/react-ui/primitives/DotMatrix/dot-matrix.js +0 -0
- package/dist/react-ui/primitives/DotMatrix/index.d.ts +7 -0
- package/dist/react-ui/primitives/DotMatrix/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/DotMatrix/index.js +185 -0
- package/dist/react-ui/primitives/DotMatrix/patterns.d.ts +32 -0
- package/dist/react-ui/primitives/DotMatrix/patterns.d.ts.map +1 -0
- package/dist/react-ui/primitives/DotMatrix/patterns.js +175 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/GooeyMorphingSurface.types.d.ts +100 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/GooeyMorphingSurface.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/GooeyMorphingSurface.types.js +20 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/gooey-morphing-surface-DfdjAg5U.css +112 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/gooey-morphing-surface.js +0 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/index.d.ts +36 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/index.js +141 -0
- package/dist/react-ui/primitives/index.d.ts +2 -0
- package/dist/react-ui/primitives/index.d.ts.map +1 -1
- package/dist/react-ui/primitives/index.js +4 -0
- package/dist/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.styles.d.ts +1 -1
- package/dist/react-ui/primitives/waapi/SlidingText/SlidingText.styles.d.ts +1 -1
- package/dist/react-ui/ui/Accordion/Accordion.styles.d.ts +1 -1
- package/dist/react-ui/ui/Accordion/Accordion.types.d.ts +1 -1
- package/dist/react-ui/ui/AlertDialog/AlertDialog.styles.d.ts +1 -1
- package/dist/react-ui/ui/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/react-ui/ui/Badge/Badge.styles.d.ts +2 -2
- package/dist/react-ui/ui/Badge/Badge.types.d.ts +1 -1
- package/dist/react-ui/ui/Button/Button.styles.d.ts +2 -2
- package/dist/react-ui/ui/Button/Button.types.d.ts +1 -1
- package/dist/react-ui/ui/Card/Card.styles.d.ts +1 -1
- package/dist/react-ui/ui/Card/Card.types.d.ts +1 -1
- package/dist/react-ui/ui/Checkbox/Checkbox.styles.d.ts +1 -1
- package/dist/react-ui/ui/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/react-ui/ui/Combobox/Combobox.styles.d.ts +1 -1
- package/dist/react-ui/ui/Combobox/Combobox.types.d.ts +1 -1
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.d.ts +1 -1
- package/dist/react-ui/ui/CornerBracket/CornerBracket.types.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/DataCard.styles.d.ts +2 -2
- package/dist/react-ui/ui/DataCard/DataCard.types.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/index.d.ts +1 -1
- package/dist/react-ui/ui/Dialog/Dialog.styles.d.ts +1 -1
- package/dist/react-ui/ui/Dialog/Dialog.types.d.ts +1 -1
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.styles.d.ts +1 -1
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.types.d.ts +1 -1
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.styles.d.ts +1 -1
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.types.d.ts +1 -1
- package/dist/react-ui/ui/Field/Field.styles.d.ts +1 -1
- package/dist/react-ui/ui/Field/Field.types.d.ts +1 -1
- package/dist/react-ui/ui/FileIcon/FileIcon.styles.d.ts +25 -0
- package/dist/react-ui/ui/FileIcon/FileIcon.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/FileIcon/FileIcon.styles.js +31 -0
- package/dist/react-ui/ui/FileIcon/FileIcon.types.d.ts +89 -0
- package/dist/react-ui/ui/FileIcon/FileIcon.types.d.ts.map +1 -0
- package/dist/react-ui/ui/FileIcon/index.d.ts +46 -0
- package/dist/react-ui/ui/FileIcon/index.d.ts.map +1 -0
- package/dist/react-ui/ui/FileIcon/index.js +138 -0
- package/dist/react-ui/ui/FileItem/FileItem.styles.d.ts +47 -0
- package/dist/react-ui/ui/FileItem/FileItem.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/FileItem/FileItem.styles.js +60 -0
- package/dist/react-ui/ui/FileItem/FileItem.types.d.ts +84 -0
- package/dist/react-ui/ui/FileItem/FileItem.types.d.ts.map +1 -0
- package/dist/react-ui/ui/FileItem/index.d.ts +48 -0
- package/dist/react-ui/ui/FileItem/index.d.ts.map +1 -0
- package/dist/react-ui/ui/FileItem/index.js +124 -0
- package/dist/react-ui/ui/FilePanel/FilePanel.styles.d.ts +34 -0
- package/dist/react-ui/ui/FilePanel/FilePanel.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/FilePanel/FilePanel.styles.js +57 -0
- package/dist/react-ui/ui/FilePanel/FilePanel.types.d.ts +55 -0
- package/dist/react-ui/ui/FilePanel/FilePanel.types.d.ts.map +1 -0
- package/dist/react-ui/ui/FilePanel/index.d.ts +55 -0
- package/dist/react-ui/ui/FilePanel/index.d.ts.map +1 -0
- package/dist/react-ui/ui/FilePanel/index.js +107 -0
- package/dist/react-ui/ui/FileTree/FileTree.styles.d.ts +31 -0
- package/dist/react-ui/ui/FileTree/FileTree.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/FileTree/FileTree.styles.js +45 -0
- package/dist/react-ui/ui/FileTree/FileTree.types.d.ts +95 -0
- package/dist/react-ui/ui/FileTree/FileTree.types.d.ts.map +1 -0
- package/dist/react-ui/ui/FileTree/index.d.ts +60 -0
- package/dist/react-ui/ui/FileTree/index.d.ts.map +1 -0
- package/dist/react-ui/ui/FileTree/index.js +226 -0
- package/dist/react-ui/ui/GooeyButton/GooeyButton.types.d.ts +35 -0
- package/dist/react-ui/ui/GooeyButton/GooeyButton.types.d.ts.map +1 -0
- package/dist/react-ui/ui/GooeyButton/gooey-button-8rHWiw0w.css +47 -0
- package/dist/react-ui/ui/GooeyButton/gooey-button.js +0 -0
- package/dist/react-ui/ui/GooeyButton/index.d.ts +26 -0
- package/dist/react-ui/ui/GooeyButton/index.d.ts.map +1 -0
- package/dist/react-ui/ui/GooeyButton/index.js +118 -0
- package/dist/react-ui/ui/Input/Input.styles.d.ts +1 -1
- package/dist/react-ui/ui/Input/Input.types.d.ts +1 -1
- package/dist/react-ui/ui/InputGroup/InputGroup.styles.d.ts +1 -1
- package/dist/react-ui/ui/InputGroup/InputGroup.types.d.ts +1 -1
- package/dist/react-ui/ui/Label/Label.styles.d.ts +1 -1
- package/dist/react-ui/ui/Label/Label.types.d.ts +1 -1
- package/dist/react-ui/ui/Menu/Menu.styles.d.ts +1 -1
- package/dist/react-ui/ui/Menu/Menu.types.d.ts +2 -2
- package/dist/react-ui/ui/MiddleTruncatePath/MiddleTruncatePath.styles.d.ts +23 -0
- package/dist/react-ui/ui/MiddleTruncatePath/MiddleTruncatePath.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/MiddleTruncatePath/MiddleTruncatePath.styles.js +32 -0
- package/dist/react-ui/ui/MiddleTruncatePath/MiddleTruncatePath.types.d.ts +43 -0
- package/dist/react-ui/ui/MiddleTruncatePath/MiddleTruncatePath.types.d.ts.map +1 -0
- package/dist/react-ui/ui/MiddleTruncatePath/index.d.ts +33 -0
- package/dist/react-ui/ui/MiddleTruncatePath/index.d.ts.map +1 -0
- package/dist/react-ui/ui/MiddleTruncatePath/index.js +60 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.context.d.ts +17 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.context.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.context.js +27 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.styles.d.ts +19 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.styles.js +39 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.types.d.ts +188 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.types.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/index.d.ts +45 -0
- package/dist/react-ui/ui/OperationCard/index.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/index.js +118 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardActions.d.ts +3 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardActions.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardActions.js +86 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardHeader.d.ts +14 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardHeader.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardHeader.js +62 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardProgress.d.ts +3 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardProgress.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardProgress.js +37 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardStats.d.ts +3 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardStats.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardStats.js +42 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardVisualizer.d.ts +3 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardVisualizer.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardVisualizer.js +53 -0
- package/dist/react-ui/ui/Popover/Popover.styles.d.ts +1 -1
- package/dist/react-ui/ui/Popover/Popover.types.d.ts +1 -1
- package/dist/react-ui/ui/Progress/Progress.styles.d.ts +1 -1
- package/dist/react-ui/ui/Progress/Progress.types.d.ts +2 -2
- package/dist/react-ui/ui/Select/Select.styles.d.ts +1 -1
- package/dist/react-ui/ui/Select/Select.types.d.ts +1 -1
- package/dist/react-ui/ui/Separator/Separator.styles.d.ts +1 -1
- package/dist/react-ui/ui/Separator/Separator.types.d.ts +1 -1
- package/dist/react-ui/ui/Switch/Switch.styles.d.ts +1 -1
- package/dist/react-ui/ui/Switch/Switch.types.d.ts +1 -1
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts +4 -4
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts +3 -3
- package/dist/react-ui/ui/TextFlow/TextFlow.styles.d.ts +1 -1
- package/dist/react-ui/ui/Textarea/Textarea.styles.d.ts +1 -1
- package/dist/react-ui/ui/Textarea/Textarea.types.d.ts +1 -1
- package/dist/react-ui/ui/Tooltip/Tooltip.styles.d.ts +1 -1
- package/dist/react-ui/ui/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/react-ui/ui/index.d.ts +7 -0
- package/dist/react-ui/ui/index.d.ts.map +1 -1
- package/dist/react-ui/ui/index.js +19 -0
- package/package.json +2 -2
- package/dist/index.css +0 -1059
- package/dist/react-ui/blocks/Sidebar/animations/tooltip.css +0 -330
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown/terminal-filter-dropdown.module.css +0 -60
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs/terminal-session-tabs.module.css +0 -60
- package/dist/react-ui/components/MorphingPopover/morphing-popover.module.css +0 -154
- package/dist/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.module.css +0 -20
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.css +0 -369
- package/dist/react-ui/ui/Tabs/Tabs.css +0 -38
- /package/dist/{css/blocks-Sidebar-animations-tooltip.css → react-ui/blocks/Sidebar/animations/tooltip-keyframes-DRT9W6Xj.css} +0 -0
- /package/dist/{css/blocks-Terminal-panel-TerminalFilterDropdown-terminal-filter-dropdown.module.css → react-ui/blocks/Terminal/panel/TerminalFilterDropdown/terminal-filter-dropdown.module-G5zpw08N.css} +0 -0
- /package/dist/{css/blocks-Terminal-panel-TerminalSessionTabs-terminal-session-tabs.module.css → react-ui/blocks/Terminal/panel/TerminalSessionTabs/terminal-session-tabs.module-BAOuAeiX.css} +0 -0
- /package/dist/{css/components-MorphingPopover-morphing-popover.module.css → react-ui/components/MorphingPopover/morphing-popover.module-T3s-wJN-.css} +0 -0
- /package/dist/{css/primitives-waapi-Morph-techniques-useViewTransitions.module.css → react-ui/primitives/waapi/Morph/techniques/useViewTransitions.module-DNDWYN8q.css} +0 -0
- /package/dist/{css/ui-DynamicToggle-DynamicToggle.css → react-ui/ui/DynamicToggle/DynamicToggle-DY2Hle7P.css} +0 -0
- /package/dist/{css/ui-Tabs-Tabs.css → react-ui/ui/Tabs/Tabs-DqzZRGB3.css} +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { useOperationCard } from "../OperationCard.context.js";
|
|
5
|
+
import { OperationCardStyles } from "../OperationCard.styles.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/react-ui/ui/OperationCard/parts/OperationCardActions.tsx
|
|
9
|
+
/**
|
|
10
|
+
* OperationCardActions — footer row with inline meta actions + Cancel /
|
|
11
|
+
* Retry + Esc hint.
|
|
12
|
+
*
|
|
13
|
+
* Rendering rules:
|
|
14
|
+
* - `state.meta.actions[]` win. They render in order; `recommended`
|
|
15
|
+
* (or `variant: 'primary'`) actions use the primary treatment.
|
|
16
|
+
* - `status='pending'` adds a Cancel button. If
|
|
17
|
+
* `state.meta.remainingSeconds` is set, the label shows the live
|
|
18
|
+
* countdown ("Cancel (3s)").
|
|
19
|
+
* - `status='failed'` adds a default Retry button **only** when no
|
|
20
|
+
* `meta.actions` are provided — scenario-specific actions replace it
|
|
21
|
+
* (e.g. "Pull & push" after a non-fast-forward push).
|
|
22
|
+
* - `children` appends custom buttons after the built-ins.
|
|
23
|
+
*
|
|
24
|
+
* @module @mks2508/mks-ui/react/ui/OperationCard
|
|
25
|
+
*/
|
|
26
|
+
/** Resolve the visual variant for an action button. @internal */
|
|
27
|
+
function variantFor(a) {
|
|
28
|
+
if (a.variant) return a.variant;
|
|
29
|
+
if (a.recommended) return "primary";
|
|
30
|
+
return "secondary";
|
|
31
|
+
}
|
|
32
|
+
const BTN_BASE = "inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors disabled:pointer-events-none disabled:opacity-50";
|
|
33
|
+
const BTN_VARIANT = {
|
|
34
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
35
|
+
secondary: "border border-border bg-background hover:bg-accent hover:text-accent-foreground",
|
|
36
|
+
ghost: "text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
37
|
+
};
|
|
38
|
+
function OperationCardActions({ showEscHint = true, className, children }) {
|
|
39
|
+
const { state, onCancel, onRetry } = useOperationCard();
|
|
40
|
+
const { status, meta } = state;
|
|
41
|
+
const pending = status === "pending";
|
|
42
|
+
const failed = status === "failed";
|
|
43
|
+
const secs = meta?.remainingSeconds;
|
|
44
|
+
const hasCountdown = pending && typeof secs === "number" && secs > 0;
|
|
45
|
+
const metaActions = meta?.actions ?? [];
|
|
46
|
+
const hasMetaActions = metaActions.length > 0;
|
|
47
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
"data-slot": "operation-card-actions",
|
|
49
|
+
className: cn(OperationCardStyles.actions, className),
|
|
50
|
+
children: [showEscHint ? /* @__PURE__ */ jsx("span", {
|
|
51
|
+
className: "text-[10px] uppercase tracking-wider text-muted-foreground",
|
|
52
|
+
children: "Esc to close"
|
|
53
|
+
}) : /* @__PURE__ */ jsx("span", {}), /* @__PURE__ */ jsxs("div", {
|
|
54
|
+
className: "flex items-center gap-2",
|
|
55
|
+
children: [
|
|
56
|
+
children,
|
|
57
|
+
metaActions.map((action, i) => {
|
|
58
|
+
const v = variantFor(action);
|
|
59
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
60
|
+
type: "button",
|
|
61
|
+
onClick: action.onClick,
|
|
62
|
+
disabled: action.disabled,
|
|
63
|
+
className: cn(BTN_BASE, BTN_VARIANT[v]),
|
|
64
|
+
children: [action.icon, /* @__PURE__ */ jsx("span", { children: action.label })]
|
|
65
|
+
}, `${action.label}-${i}`);
|
|
66
|
+
}),
|
|
67
|
+
failed && !hasMetaActions && onRetry && /* @__PURE__ */ jsx("button", {
|
|
68
|
+
type: "button",
|
|
69
|
+
onClick: onRetry,
|
|
70
|
+
className: cn(BTN_BASE, BTN_VARIANT.secondary),
|
|
71
|
+
children: "Retry"
|
|
72
|
+
}),
|
|
73
|
+
pending && onCancel && /* @__PURE__ */ jsx("button", {
|
|
74
|
+
type: "button",
|
|
75
|
+
onClick: onCancel,
|
|
76
|
+
className: cn(BTN_BASE, BTN_VARIANT.secondary),
|
|
77
|
+
"aria-label": "Cancel operation",
|
|
78
|
+
children: hasCountdown ? `Cancel (${secs}s)` : "Cancel"
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
export { OperationCardActions };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IOperationCardHeaderProps } from '../OperationCard.types';
|
|
2
|
+
/**
|
|
3
|
+
* Header row of the operation card.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <OperationCardRoot state={state}>
|
|
8
|
+
* <OperationCardHeader />
|
|
9
|
+
* ...
|
|
10
|
+
* </OperationCardRoot>
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare function OperationCardHeader({ className }: IOperationCardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=OperationCardHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationCardHeader.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/ui/OperationCard/parts/OperationCardHeader.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,EAAE,yBAAyB,2CAiC3E"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { CountingNumber } from "../../../primitives/CountingNumber/index.js";
|
|
5
|
+
import { SlidingText } from "../../../primitives/waapi/SlidingText/index.js";
|
|
6
|
+
import { useOperationCard } from "../OperationCard.context.js";
|
|
7
|
+
import { OperationCardStyles } from "../OperationCard.styles.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region src/react-ui/ui/OperationCard/parts/OperationCardHeader.tsx
|
|
11
|
+
/**
|
|
12
|
+
* OperationCardHeader — title + animated phase label + percent badge.
|
|
13
|
+
*
|
|
14
|
+
* Reads state from OperationCardContext. Uses SlidingText to crossfade
|
|
15
|
+
* phase labels and CountingNumber to animate the percent badge.
|
|
16
|
+
*
|
|
17
|
+
* @module @mks2508/mks-ui/react/ui/OperationCard
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Header row of the operation card.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <OperationCardRoot state={state}>
|
|
25
|
+
* <OperationCardHeader />
|
|
26
|
+
* ...
|
|
27
|
+
* </OperationCardRoot>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
function OperationCardHeader({ className }) {
|
|
31
|
+
const { state } = useOperationCard();
|
|
32
|
+
const percent = Math.round(state.progress * 100);
|
|
33
|
+
const hasPhase = Boolean(state.phaseLabel);
|
|
34
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
35
|
+
"data-slot": "operation-card-header",
|
|
36
|
+
className: cn(OperationCardStyles.header, className),
|
|
37
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
38
|
+
className: "min-w-0 flex-1",
|
|
39
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
40
|
+
className: OperationCardStyles.title,
|
|
41
|
+
children: state.title
|
|
42
|
+
}), hasPhase && /* @__PURE__ */ jsx("div", {
|
|
43
|
+
className: OperationCardStyles.phase,
|
|
44
|
+
children: /* @__PURE__ */ jsx(SlidingText, {
|
|
45
|
+
text: state.phaseLabel ?? "",
|
|
46
|
+
mode: "word",
|
|
47
|
+
direction: "vertical",
|
|
48
|
+
duration: 220,
|
|
49
|
+
staggerDelay: 12,
|
|
50
|
+
blur: true
|
|
51
|
+
})
|
|
52
|
+
})]
|
|
53
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
54
|
+
"data-slot": "operation-card-percent",
|
|
55
|
+
className: OperationCardStyles.percent,
|
|
56
|
+
children: [/* @__PURE__ */ jsx(CountingNumber, { number: percent }), "%"]
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
export { OperationCardHeader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationCardProgress.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/ui/OperationCard/parts/OperationCardProgress.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE1E,wBAAgB,qBAAqB,CAAC,EACrC,SAAS,GACT,EAAE,2BAA2B,2CAgC7B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { useOperationCard } from "../OperationCard.context.js";
|
|
5
|
+
import { OperationCardStyles } from "../OperationCard.styles.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/react-ui/ui/OperationCard/parts/OperationCardProgress.tsx
|
|
9
|
+
/**
|
|
10
|
+
* OperationCardProgress — thin progress bar driven by state.progress.
|
|
11
|
+
*
|
|
12
|
+
* Plain CSS transition on width. Uses the `destructive` token when the
|
|
13
|
+
* operation failed so the bar turns red without changing layout.
|
|
14
|
+
*
|
|
15
|
+
* @module @mks2508/mks-ui/react/ui/OperationCard
|
|
16
|
+
*/
|
|
17
|
+
function OperationCardProgress({ className }) {
|
|
18
|
+
const { state } = useOperationCard();
|
|
19
|
+
const pct = Math.round(Math.min(1, Math.max(0, state.progress)) * 100);
|
|
20
|
+
const fillClass = state.status === "failed" ? "bg-destructive" : state.status === "cancelled" ? "bg-foreground/40" : state.status === "success" ? "bg-foreground" : "bg-foreground/80";
|
|
21
|
+
return /* @__PURE__ */ jsx("div", {
|
|
22
|
+
"data-slot": "operation-card-progress",
|
|
23
|
+
"data-status": state.status,
|
|
24
|
+
className: cn(OperationCardStyles.progress, className),
|
|
25
|
+
role: "progressbar",
|
|
26
|
+
"aria-valuemin": 0,
|
|
27
|
+
"aria-valuemax": 100,
|
|
28
|
+
"aria-valuenow": pct,
|
|
29
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: cn("h-full transition-[width] duration-300 ease-out", fillClass),
|
|
31
|
+
style: { width: `${pct}%` }
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { OperationCardProgress };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IOperationCardStatsProps } from '../OperationCard.types';
|
|
2
|
+
export declare function OperationCardStats<TTransfer = unknown>({ children, className, }: IOperationCardStatsProps<TTransfer>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=OperationCardStats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationCardStats.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/ui/OperationCard/parts/OperationCardStats.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,wBAAgB,kBAAkB,CAAC,SAAS,GAAG,OAAO,EAAE,EACvD,QAAQ,EACR,SAAS,GACT,EAAE,wBAAwB,CAAC,SAAS,CAAC,2CAWrC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { useOperationCard } from "../OperationCard.context.js";
|
|
5
|
+
import { OperationCardStyles } from "../OperationCard.styles.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/react-ui/ui/OperationCard/parts/OperationCardStats.tsx
|
|
9
|
+
/**
|
|
10
|
+
* OperationCardStats — render prop that receives the transfer payload.
|
|
11
|
+
*
|
|
12
|
+
* The compound is generic in `TTransfer`; the consumer owns the layout
|
|
13
|
+
* and the individual cells. Typical use:
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <OperationCardStats>
|
|
17
|
+
* {(t: ITransferProgress) => (
|
|
18
|
+
* <>
|
|
19
|
+
* <StatCell label="Objects">
|
|
20
|
+
* <SlidingNumber value={t.receivedObjects} />
|
|
21
|
+
* {' / '}
|
|
22
|
+
* <SlidingNumber value={t.totalObjects} />
|
|
23
|
+
* </StatCell>
|
|
24
|
+
* ...
|
|
25
|
+
* </>
|
|
26
|
+
* )}
|
|
27
|
+
* </OperationCardStats>
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @module @mks2508/mks-ui/react/ui/OperationCard
|
|
31
|
+
*/
|
|
32
|
+
function OperationCardStats({ children, className }) {
|
|
33
|
+
const { state } = useOperationCard();
|
|
34
|
+
return /* @__PURE__ */ jsx("div", {
|
|
35
|
+
"data-slot": "operation-card-stats",
|
|
36
|
+
className: cn(OperationCardStyles.stats, className),
|
|
37
|
+
children: children(state.transfer)
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { OperationCardStats };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IOperationCardVisualizerProps } from '../OperationCard.types';
|
|
2
|
+
export declare function OperationCardVisualizer({ rows, cols, pattern, color, bloom, accentRow, children, className, }: IOperationCardVisualizerProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=OperationCardVisualizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationCardVisualizer.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/ui/OperationCard/parts/OperationCardVisualizer.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EACX,6BAA6B,EAE7B,MAAM,wBAAwB,CAAC;AAOhC,wBAAgB,uBAAuB,CAAC,EACvC,IAAQ,EACR,IAAS,EACT,OAAO,EACP,KAAK,EACL,KAAK,EACL,SAAS,EACT,QAAQ,EACR,SAAS,GACT,EAAE,6BAA6B,2CA8B/B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { DotMatrix } from "../../../primitives/DotMatrix/index.js";
|
|
5
|
+
import { useOperationCard } from "../OperationCard.context.js";
|
|
6
|
+
import { OperationCardStyles } from "../OperationCard.styles.js";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/react-ui/ui/OperationCard/parts/OperationCardVisualizer.tsx
|
|
10
|
+
/**
|
|
11
|
+
* OperationCardVisualizer — the "what's happening" visual layer.
|
|
12
|
+
*
|
|
13
|
+
* Default rendering: a `<DotMatrix>` driven by the context state. Maps
|
|
14
|
+
* the OperationCard lifecycle → DotMatrix lifecycle:
|
|
15
|
+
*
|
|
16
|
+
* idle → idle (all cells off)
|
|
17
|
+
* pending → running (pattern cycle plays)
|
|
18
|
+
* success → success (all cells forced on, glow)
|
|
19
|
+
* failed → failed (cycle frozen; on→red, off→muted)
|
|
20
|
+
* cancelled → cancelled (cycle frozen; on→muted)
|
|
21
|
+
*
|
|
22
|
+
* Pattern + palette + bloom come from `state.meta` so the consumer
|
|
23
|
+
* adapts the visual language per operation kind.
|
|
24
|
+
*
|
|
25
|
+
* @module @mks2508/mks-ui/react/ui/OperationCard
|
|
26
|
+
*/
|
|
27
|
+
function mapStatus(op) {
|
|
28
|
+
if (op === "pending") return "running";
|
|
29
|
+
return op;
|
|
30
|
+
}
|
|
31
|
+
function OperationCardVisualizer({ rows = 6, cols = 18, pattern, color, bloom, accentRow, children, className }) {
|
|
32
|
+
const { state } = useOperationCard();
|
|
33
|
+
const meta = state.meta;
|
|
34
|
+
return /* @__PURE__ */ jsx("div", {
|
|
35
|
+
"data-slot": "operation-card-visualizer",
|
|
36
|
+
className: cn(OperationCardStyles.visualizer, className),
|
|
37
|
+
children: children ?? /* @__PURE__ */ jsx(DotMatrix, {
|
|
38
|
+
rows,
|
|
39
|
+
cols,
|
|
40
|
+
status: mapStatus(state.status),
|
|
41
|
+
pattern: pattern ?? meta?.pattern ?? "snake",
|
|
42
|
+
color: color ?? meta?.color ?? "primary",
|
|
43
|
+
bloom: bloom ?? meta?.bloom ?? true,
|
|
44
|
+
variant: "glow",
|
|
45
|
+
progress: state.progress,
|
|
46
|
+
accentCount: meta?.accentCount,
|
|
47
|
+
accentRow: accentRow ?? meta?.accentRow ?? "top"
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { OperationCardVisualizer };
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @mks2508/mks-ui/react/ui/Popover/Popover.styles
|
|
8
8
|
*/
|
|
9
|
-
import type { StyleSlots } from '
|
|
9
|
+
import type { StyleSlots } from '@/core/types';
|
|
10
10
|
import type { PopoverSlot } from './Popover.types';
|
|
11
11
|
/**
|
|
12
12
|
* Default Tailwind classes for each Popover visual region.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import type * as React from 'react';
|
|
10
10
|
import type { Popover as PopoverPrimitive } from '@base-ui/react/popover';
|
|
11
11
|
import type { HTMLMotionProps } from 'motion/react';
|
|
12
|
-
import type { SlotOverrides, IBaseConfig } from '
|
|
12
|
+
import type { SlotOverrides, IBaseConfig } from '@/core/types';
|
|
13
13
|
/**
|
|
14
14
|
* Visual regions available for class-name overrides via the `slots` prop.
|
|
15
15
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module @mks2508/mks-ui/react/ui/Progress/Progress.styles
|
|
5
5
|
*/
|
|
6
|
-
import type { StyleSlots } from '
|
|
6
|
+
import type { StyleSlots } from '@/core/types';
|
|
7
7
|
import type { ProgressSlot } from './Progress.types';
|
|
8
8
|
/**
|
|
9
9
|
* Default style slots for the Progress component.
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @module @mks2508/mks-ui/react/ui/Progress/Progress.types
|
|
5
5
|
*/
|
|
6
6
|
import type { Progress as ProgressPrimitives } from '@base-ui/react/progress';
|
|
7
|
-
import type { IBaseConfig, SlotOverrides } from '
|
|
8
|
-
import type { ICountingNumberProps } from '
|
|
7
|
+
import type { IBaseConfig, SlotOverrides } from '@/core/types';
|
|
8
|
+
import type { ICountingNumberProps } from '@/react-ui/primitives/CountingNumber';
|
|
9
9
|
/**
|
|
10
10
|
* Available style slot names for the Progress component.
|
|
11
11
|
* Each slot maps to a visual region that can be customized via the `slots` prop.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StyleSlots } from '
|
|
1
|
+
import type { StyleSlots } from '@/core/types';
|
|
2
2
|
/** Visual regions for the Select component family. */
|
|
3
3
|
type SelectSlot = 'root' | 'trigger' | 'content' | 'item' | 'label' | 'separator' | 'group' | 'value' | 'scrollButton';
|
|
4
4
|
declare const selectStyles: StyleSlots<SelectSlot>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Select as SelectPrimitive } from '@base-ui/react/select';
|
|
2
|
-
import type { SlotOverrides } from '
|
|
2
|
+
import type { SlotOverrides } from '@/core/types';
|
|
3
3
|
import type { SelectSlot } from './Select.styles';
|
|
4
4
|
/** Props for the Select root. */
|
|
5
5
|
type ISelectProps = SelectPrimitive.Root.Props<any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
2
|
-
import type { SlotOverrides } from '
|
|
2
|
+
import type { SlotOverrides } from '@/core/types';
|
|
3
3
|
import type { SeparatorSlot } from './Separator.styles';
|
|
4
4
|
/** Props for the Separator component. */
|
|
5
5
|
interface ISeparatorProps extends SeparatorPrimitive.Props {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module @mks2508/mks-ui/react/ui/Switch/Switch.styles
|
|
5
5
|
*/
|
|
6
|
-
import type { StyleSlots } from '
|
|
6
|
+
import type { StyleSlots } from '@/core/types';
|
|
7
7
|
import type { SwitchSlot } from './Switch.types';
|
|
8
8
|
/**
|
|
9
9
|
* Default style slots for the Switch component.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { Switch as SwitchPrimitives } from '@base-ui/react/switch';
|
|
7
7
|
import type { HTMLMotionProps, LegacyAnimationControls, TargetAndTransition, VariantLabels } from 'motion/react';
|
|
8
|
-
import type { IBaseConfig, SlotOverrides } from '
|
|
8
|
+
import type { IBaseConfig, SlotOverrides } from '@/core/types';
|
|
9
9
|
/**
|
|
10
10
|
* Available style slot names for the Switch component.
|
|
11
11
|
* Each slot maps to a visual region that can be customized via the `slots` prop.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module @mks2508/mks-ui/react/ui/Tabs/Tabs.styles
|
|
12
12
|
*/
|
|
13
|
-
import type { StyleSlots } from '
|
|
13
|
+
import type { StyleSlots } from '@/core/types';
|
|
14
14
|
/**
|
|
15
15
|
* Union of all visual regions (slots) in the Tabs component tree.
|
|
16
16
|
*/
|
|
@@ -31,7 +31,7 @@ export declare const tabsStyles: StyleSlots<TabsSlot>;
|
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
33
|
export declare const tabsListVariants: (props?: ({
|
|
34
|
-
variant?: "default" | "outline" | "underline" | "
|
|
34
|
+
variant?: "default" | "outline" | "underline" | "pill" | "ghost" | null | undefined;
|
|
35
35
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
36
36
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
37
37
|
/**
|
|
@@ -45,7 +45,7 @@ export declare const tabsListVariants: (props?: ({
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
export declare const tabsTabVariants: (props?: ({
|
|
48
|
-
variant?: "default" | "outline" | "underline" | "
|
|
48
|
+
variant?: "default" | "outline" | "underline" | "pill" | "ghost" | null | undefined;
|
|
49
49
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
50
50
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
51
51
|
/**
|
|
@@ -56,6 +56,6 @@ export declare const tabsTabVariants: (props?: ({
|
|
|
56
56
|
* and animated via WAAPI transitions in CSS.
|
|
57
57
|
*/
|
|
58
58
|
export declare const tabsIndicatorVariants: (props?: ({
|
|
59
|
-
variant?: "default" | "outline" | "underline" | "
|
|
59
|
+
variant?: "default" | "outline" | "underline" | "pill" | "ghost" | null | undefined;
|
|
60
60
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
61
61
|
//# sourceMappingURL=Tabs.styles.d.ts.map
|
|
@@ -10,9 +10,9 @@ import type * as React from 'react';
|
|
|
10
10
|
import type { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
|
|
11
11
|
import type { HTMLMotionProps, Transition } from 'motion/react';
|
|
12
12
|
import type { VariantProps } from 'class-variance-authority';
|
|
13
|
-
import type { IBaseConfig, SlotOverrides } from '
|
|
14
|
-
import type { IHighlightProps, IHighlightItemProps } from '
|
|
15
|
-
import type { IAutoHeightProps } from '
|
|
13
|
+
import type { IBaseConfig, SlotOverrides } from '@/core/types';
|
|
14
|
+
import type { IHighlightProps, IHighlightItemProps } from '@/react-ui/primitives/Highlight';
|
|
15
|
+
import type { IAutoHeightProps } from '@/react-ui/primitives/AutoHeight';
|
|
16
16
|
import type { TabsSlot, tabsListVariants, tabsTabVariants } from './Tabs.styles';
|
|
17
17
|
/**
|
|
18
18
|
* Configuration interface for Tabs behavior and animation.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SlotOverrides } from '
|
|
1
|
+
import type { SlotOverrides } from '@/core/types';
|
|
2
2
|
import type { TextareaSlot } from './Textarea.styles';
|
|
3
3
|
/** Props for the Textarea component. */
|
|
4
4
|
interface ITextareaProps extends React.ComponentProps<'textarea'> {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @mks2508/mks-ui/react/ui/Tooltip/Tooltip.styles
|
|
8
8
|
*/
|
|
9
|
-
import type { StyleSlots } from '
|
|
9
|
+
import type { StyleSlots } from '@/core/types';
|
|
10
10
|
import type { TooltipSlot } from './Tooltip.types';
|
|
11
11
|
/**
|
|
12
12
|
* Default Tailwind classes for each Tooltip visual region.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import type * as React from 'react';
|
|
10
10
|
import type { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
|
|
11
11
|
import type { HTMLMotionProps, MotionValue, SpringOptions } from 'motion/react';
|
|
12
|
-
import type { SlotOverrides, IBaseConfig } from '
|
|
12
|
+
import type { SlotOverrides, IBaseConfig } from '@/core/types';
|
|
13
13
|
/**
|
|
14
14
|
* Visual regions available for class-name overrides via the `slots` prop.
|
|
15
15
|
*
|
|
@@ -18,13 +18,20 @@ export * from './Tooltip';
|
|
|
18
18
|
export * from './Badge';
|
|
19
19
|
export * from './Button';
|
|
20
20
|
export * from './Card';
|
|
21
|
+
export * from './GooeyButton';
|
|
21
22
|
export * from './Combobox';
|
|
22
23
|
export * from './CornerBracket';
|
|
23
24
|
export * from './DropdownMenu';
|
|
24
25
|
export * from './Field';
|
|
26
|
+
export * from './FileIcon';
|
|
27
|
+
export * from './FileItem';
|
|
28
|
+
export * from './FilePanel';
|
|
29
|
+
export * from './FileTree';
|
|
25
30
|
export * from './Input';
|
|
26
31
|
export * from './InputGroup';
|
|
27
32
|
export * from './Label';
|
|
33
|
+
export * from './MiddleTruncatePath';
|
|
34
|
+
export * from './OperationCard';
|
|
28
35
|
export * from './Select';
|
|
29
36
|
export * from './Separator';
|
|
30
37
|
export * from './Textarea';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react-ui/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAG3B,cAAc,YAAY,CAAC;AAG3B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react-ui/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAG3B,cAAc,YAAY,CAAC;AAG3B,cAAc,iBAAiB,CAAC"}
|
|
@@ -23,6 +23,7 @@ import { buttonStateStyles, buttonVariants } from "./Button/Button.styles.js";
|
|
|
23
23
|
import { Button } from "./Button/index.js";
|
|
24
24
|
import { cardVariants } from "./Card/Card.styles.js";
|
|
25
25
|
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./Card/index.js";
|
|
26
|
+
import { GooeyButton } from "./GooeyButton/index.js";
|
|
26
27
|
import { Input } from "./Input/index.js";
|
|
27
28
|
import { Textarea } from "./Textarea/index.js";
|
|
28
29
|
import { inputGroupAddonVariants, inputGroupButtonVariants } from "./InputGroup/InputGroup.styles.js";
|
|
@@ -35,6 +36,24 @@ import { Label } from "./Label/index.js";
|
|
|
35
36
|
import { Separator } from "./Separator/index.js";
|
|
36
37
|
import { fieldVariants } from "./Field/Field.styles.js";
|
|
37
38
|
import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle } from "./Field/index.js";
|
|
39
|
+
import { FileIconStyles, FolderIconStyles, fileIconVariants, folderIconVariants } from "./FileIcon/FileIcon.styles.js";
|
|
40
|
+
import { FileIcon, FolderIcon } from "./FileIcon/index.js";
|
|
41
|
+
import { MiddleTruncatePathStyles, middleTruncatePathVariants } from "./MiddleTruncatePath/MiddleTruncatePath.styles.js";
|
|
42
|
+
import { MiddleTruncatePath } from "./MiddleTruncatePath/index.js";
|
|
43
|
+
import { FileItemGitStatusClasses, FileItemStyles, fileItemVariants } from "./FileItem/FileItem.styles.js";
|
|
44
|
+
import { FileItem } from "./FileItem/index.js";
|
|
45
|
+
import { FilePanelStyles, filePanelVariants } from "./FilePanel/FilePanel.styles.js";
|
|
46
|
+
import { FilePanel } from "./FilePanel/index.js";
|
|
47
|
+
import { FileTreeStyles, fileTreeVariants } from "./FileTree/FileTree.styles.js";
|
|
48
|
+
import { FileTree } from "./FileTree/index.js";
|
|
49
|
+
import { useOperationCard } from "./OperationCard/OperationCard.context.js";
|
|
50
|
+
import { OperationCardStyles, operationCardVariants } from "./OperationCard/OperationCard.styles.js";
|
|
51
|
+
import { OperationCardHeader } from "./OperationCard/parts/OperationCardHeader.js";
|
|
52
|
+
import { OperationCardVisualizer } from "./OperationCard/parts/OperationCardVisualizer.js";
|
|
53
|
+
import { OperationCardStats } from "./OperationCard/parts/OperationCardStats.js";
|
|
54
|
+
import { OperationCardProgress } from "./OperationCard/parts/OperationCardProgress.js";
|
|
55
|
+
import { OperationCardActions } from "./OperationCard/parts/OperationCardActions.js";
|
|
56
|
+
import { OperationCard, OperationCardRoot } from "./OperationCard/index.js";
|
|
38
57
|
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./Select/index.js";
|
|
39
58
|
import { dataCardStyles, dataCardVariants } from "./DataCard/DataCard.styles.js";
|
|
40
59
|
import { DataCard, DataCardActions, DataCardBracket, DataCardLabel, DataCardToggle, DataCardValue, useDataCard } from "./DataCard/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mks2508/mks-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "UI component library - Shadcn/Animate UI based with DevEnv components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -192,4 +192,4 @@
|
|
|
192
192
|
"publishConfig": {
|
|
193
193
|
"access": "public"
|
|
194
194
|
}
|
|
195
|
-
}
|
|
195
|
+
}
|