@uipath/apollo-wind 0.9.1 → 0.10.0-pr219.61d64eb
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/custom/canvas.cjs +44 -0
- package/dist/components/custom/canvas.d.ts +14 -0
- package/dist/components/custom/canvas.js +10 -0
- package/dist/components/custom/chat-composer.cjs +105 -0
- package/dist/components/custom/chat-composer.d.ts +15 -0
- package/dist/components/custom/chat-composer.js +71 -0
- package/dist/components/custom/chat-first-experience.cjs +87 -0
- package/dist/components/custom/chat-first-experience.d.ts +24 -0
- package/dist/components/custom/chat-first-experience.js +53 -0
- package/dist/components/custom/chat-prompt-suggestions.cjs +48 -0
- package/dist/components/custom/chat-prompt-suggestions.d.ts +18 -0
- package/dist/components/custom/chat-prompt-suggestions.js +14 -0
- package/dist/components/custom/chat-steps-view.cjs +307 -0
- package/dist/components/custom/chat-steps-view.d.ts +38 -0
- package/dist/components/custom/chat-steps-view.js +273 -0
- package/dist/components/custom/flow-node.cjs +76 -0
- package/dist/components/custom/flow-node.d.ts +20 -0
- package/dist/components/custom/flow-node.js +42 -0
- package/dist/components/custom/flow-properties-bar.cjs +101 -0
- package/dist/components/custom/flow-properties-bar.d.ts +21 -0
- package/dist/components/custom/flow-properties-bar.js +67 -0
- package/dist/components/custom/flow-properties-expanded.cjs +324 -0
- package/dist/components/custom/flow-properties-expanded.d.ts +19 -0
- package/dist/components/custom/flow-properties-expanded.js +290 -0
- package/dist/components/custom/flow-properties-simple.cjs +357 -0
- package/dist/components/custom/flow-properties-simple.d.ts +62 -0
- package/dist/components/custom/flow-properties-simple.js +323 -0
- package/dist/components/custom/flow-properties.cjs +56 -0
- package/dist/components/custom/flow-properties.d.ts +28 -0
- package/dist/components/custom/flow-properties.js +22 -0
- package/dist/components/custom/global-header.cjs +415 -0
- package/dist/components/custom/global-header.d.ts +38 -0
- package/dist/components/custom/global-header.js +381 -0
- package/dist/components/custom/grid-maestro.cjs +62 -0
- package/dist/components/custom/grid-maestro.d.ts +19 -0
- package/dist/components/custom/grid-maestro.js +22 -0
- package/dist/components/custom/panel-delegate.cjs +280 -0
- package/dist/components/custom/panel-delegate.d.ts +34 -0
- package/dist/components/custom/panel-delegate.js +246 -0
- package/dist/components/custom/panel-flow.cjs +260 -0
- package/dist/components/custom/panel-flow.d.ts +38 -0
- package/dist/components/custom/panel-flow.js +223 -0
- package/dist/components/custom/panel-maestro.cjs +73 -0
- package/dist/components/custom/panel-maestro.d.ts +30 -0
- package/dist/components/custom/panel-maestro.js +39 -0
- package/dist/components/custom/toolbar-canvas.cjs +121 -0
- package/dist/components/custom/toolbar-canvas.d.ts +15 -0
- package/dist/components/custom/toolbar-canvas.js +87 -0
- package/dist/components/custom/toolbar-view.cjs +119 -0
- package/dist/components/custom/toolbar-view.d.ts +14 -0
- package/dist/components/custom/toolbar-view.js +85 -0
- package/dist/components/custom/viewport-guard.cjs +92 -0
- package/dist/components/custom/viewport-guard.d.ts +23 -0
- package/dist/components/custom/viewport-guard.js +55 -0
- package/dist/components/ui/button.cjs +3 -3
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/chart.cjs +218 -0
- package/dist/components/ui/chart.d.ts +40 -0
- package/dist/components/ui/chart.js +169 -0
- package/dist/components/ui/data-table.cjs +14 -2
- package/dist/components/ui/data-table.d.ts +4 -1
- package/dist/components/ui/data-table.js +15 -3
- package/dist/components/ui/empty-state.cjs +17 -6
- package/dist/components/ui/empty-state.d.ts +7 -0
- package/dist/components/ui/empty-state.js +17 -6
- package/dist/components/ui/file-upload.cjs +82 -42
- package/dist/components/ui/file-upload.d.ts +3 -1
- package/dist/components/ui/file-upload.js +82 -42
- package/dist/components/ui/index.cjs +289 -149
- package/dist/components/ui/index.d.ts +2 -3
- package/dist/components/ui/index.js +2 -3
- package/dist/components/ui/tree-view.cjs +1101 -0
- package/dist/components/ui/tree-view.d.ts +95 -0
- package/dist/components/ui/tree-view.js +1067 -0
- package/dist/foundation/Future/colors.cjs +92 -0
- package/dist/foundation/Future/colors.d.ts +132 -0
- package/dist/foundation/Future/colors.js +43 -0
- package/dist/foundation/Future/radius.cjs +46 -0
- package/dist/foundation/Future/radius.d.ts +33 -0
- package/dist/foundation/Future/radius.js +12 -0
- package/dist/foundation/Future/responsive.cjs +49 -0
- package/dist/foundation/Future/responsive.d.ts +40 -0
- package/dist/foundation/Future/responsive.js +12 -0
- package/dist/foundation/Future/shadows.cjs +48 -0
- package/dist/foundation/Future/shadows.d.ts +29 -0
- package/dist/foundation/Future/shadows.js +11 -0
- package/dist/foundation/Future/spacing.cjs +71 -0
- package/dist/foundation/Future/spacing.d.ts +80 -0
- package/dist/foundation/Future/spacing.js +31 -0
- package/dist/foundation/Future/strokes.cjs +59 -0
- package/dist/foundation/Future/strokes.d.ts +49 -0
- package/dist/foundation/Future/strokes.js +19 -0
- package/dist/foundation/Future/types.cjs +18 -0
- package/dist/foundation/Future/types.d.ts +18 -0
- package/dist/foundation/Future/types.js +0 -0
- package/dist/foundation/Future/typography.cjs +79 -0
- package/dist/foundation/Future/typography.d.ts +86 -0
- package/dist/foundation/Future/typography.js +33 -0
- package/dist/index.cjs +125 -219
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -4
- package/dist/src/foundation/Future/themes.css +371 -0
- package/dist/styles.css +1704 -582
- package/dist/tailwind.css +4 -0
- package/dist/templates/Admin/settings-admin.d.ts +5 -0
- package/dist/templates/Admin/template-admin.d.ts +105 -0
- package/dist/templates/Delegate/template-delegate.d.ts +26 -0
- package/dist/templates/EmptyErrors/error-components.d.ts +3 -0
- package/dist/templates/Experiments/ideas-AnimatedGradientText.d.ts +23 -0
- package/dist/templates/Flow/template-flow.d.ts +52 -0
- package/dist/templates/Maestro/template-maestro.d.ts +52 -0
- package/dist/templates/{vscode-example.d.ts → VisualStudio/shell.d.ts} +1 -1
- package/package.json +10 -1
- package/dist/components/ui/menubar.cjs +0 -210
- package/dist/components/ui/menubar.d.ts +0 -28
- package/dist/components/ui/menubar.js +0 -131
- package/dist/components/ui/navigation-menu.cjs +0 -122
- package/dist/components/ui/navigation-menu.d.ts +0 -12
- package/dist/components/ui/navigation-menu.js +0 -64
- package/dist/examples/admin-layout-example.cjs +0 -490
- package/dist/examples/admin-layout-example.d.ts +0 -92
- package/dist/examples/admin-layout-example.js +0 -411
- package/dist/examples/app-shell-example.cjs +0 -452
- package/dist/examples/app-shell-example.d.ts +0 -52
- package/dist/examples/app-shell-example.js +0 -418
- package/dist/examples/dashboard-example.cjs +0 -590
- package/dist/examples/dashboard-example.d.ts +0 -11
- package/dist/examples/dashboard-example.js +0 -556
- package/dist/examples/data-management-example.cjs +0 -584
- package/dist/examples/data-management-example.d.ts +0 -1
- package/dist/examples/data-management-example.js +0 -550
- package/dist/examples/flow-editor-layout-example.cjs +0 -309
- package/dist/examples/flow-editor-layout-example.d.ts +0 -22
- package/dist/examples/flow-editor-layout-example.js +0 -269
- package/dist/examples/flow-start-example.cjs +0 -467
- package/dist/examples/flow-start-example.d.ts +0 -30
- package/dist/examples/flow-start-example.js +0 -433
- package/dist/examples/form-builder-example.cjs +0 -674
- package/dist/examples/form-builder-example.js +0 -640
- package/dist/examples/new-project-example.cjs +0 -550
- package/dist/examples/new-project-example.d.ts +0 -30
- package/dist/examples/new-project-example.js +0 -516
- package/dist/examples/settings-example.cjs +0 -864
- package/dist/examples/settings-example.d.ts +0 -1
- package/dist/examples/settings-example.js +0 -830
- package/dist/examples/vscode-example.cjs +0 -340
- package/dist/examples/vscode-example.d.ts +0 -80
- package/dist/examples/vscode-example.js +0 -270
- package/dist/templates/admin-layout-example.d.ts +0 -92
- package/dist/templates/app-shell-example.d.ts +0 -52
- package/dist/templates/dashboard-example.d.ts +0 -11
- package/dist/templates/data-management-example.d.ts +0 -1
- package/dist/templates/flow-editor-layout-example.d.ts +0 -22
- package/dist/templates/flow-start-example.d.ts +0 -30
- package/dist/templates/form-builder-example.d.ts +0 -1
- package/dist/templates/new-project-example.d.ts +0 -30
- package/dist/templates/settings-example.d.ts +0 -1
- /package/dist/{examples → templates/Forms}/form-builder-example.d.ts +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
FlowCanvasToolbar: ()=>FlowCanvasToolbar
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
require("react");
|
|
31
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
+
function ToolbarSeparator() {
|
|
34
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
35
|
+
className: "h-8 w-px bg-border-subtle"
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function ToolbarButton({ icon, label, onClick }) {
|
|
39
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
40
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted transition-colors hover:text-foreground",
|
|
41
|
+
onClick: onClick,
|
|
42
|
+
"aria-label": label,
|
|
43
|
+
children: icon
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function FlowCanvasToolbar({ className, activeMode = 'build', onModeChange }) {
|
|
47
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
48
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-[60px] items-center gap-2 rounded-3xl border border-border bg-surface-raised px-2.5', className),
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
51
|
+
className: "flex h-10 items-center rounded-xl border border-border-deep bg-surface-overlay p-1",
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
54
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5 transition-colors', 'build' === activeMode ? 'border border-border bg-surface text-foreground' : 'text-foreground-subtle hover:text-foreground-hover'),
|
|
55
|
+
onClick: ()=>onModeChange?.('build'),
|
|
56
|
+
children: [
|
|
57
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Workflow, {
|
|
58
|
+
className: "h-5 w-5"
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
61
|
+
children: "Build"
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
66
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5 transition-colors', 'evaluate' === activeMode ? 'border border-border bg-surface text-foreground' : 'text-foreground-subtle hover:text-foreground-hover'),
|
|
67
|
+
onClick: ()=>onModeChange?.('evaluate'),
|
|
68
|
+
children: [
|
|
69
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ListChecks, {
|
|
70
|
+
className: "h-5 w-5"
|
|
71
|
+
}),
|
|
72
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
73
|
+
children: "Evaluate"
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
80
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
81
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Undo2, {
|
|
82
|
+
className: "h-5 w-5"
|
|
83
|
+
}),
|
|
84
|
+
label: "Undo"
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
87
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Redo2, {
|
|
88
|
+
className: "h-5 w-5"
|
|
89
|
+
}),
|
|
90
|
+
label: "Redo"
|
|
91
|
+
}),
|
|
92
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
93
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
94
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Play, {
|
|
95
|
+
className: "h-5 w-5"
|
|
96
|
+
}),
|
|
97
|
+
label: "Run"
|
|
98
|
+
}),
|
|
99
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
100
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
101
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
|
|
102
|
+
className: "h-5 w-5"
|
|
103
|
+
}),
|
|
104
|
+
label: "Add node"
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
107
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.StickyNote, {
|
|
108
|
+
className: "h-5 w-5"
|
|
109
|
+
}),
|
|
110
|
+
label: "Add note"
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
exports.FlowCanvasToolbar = __webpack_exports__.FlowCanvasToolbar;
|
|
116
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
117
|
+
"FlowCanvasToolbar"
|
|
118
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
119
|
+
Object.defineProperty(exports, '__esModule', {
|
|
120
|
+
value: true
|
|
121
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface CanvasToolbarProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
/** Active mode: 'build' | 'evaluate' */
|
|
4
|
+
activeMode?: 'build' | 'evaluate';
|
|
5
|
+
/** Callback when mode changes */
|
|
6
|
+
onModeChange?: (mode: 'build' | 'evaluate') => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Bottom-center toolbar for the Flow canvas.
|
|
10
|
+
*
|
|
11
|
+
* Contains a Build/Evaluate toggle, undo/redo, play, add, and sticky note
|
|
12
|
+
* buttons. Anchored to bottom-center via absolute positioning in the
|
|
13
|
+
* parent layout.
|
|
14
|
+
*/
|
|
15
|
+
export declare function FlowCanvasToolbar({ className, activeMode, onModeChange, }: CanvasToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ListChecks, Play, Plus, Redo2, StickyNote, Undo2, Workflow } from "lucide-react";
|
|
4
|
+
import { cn } from "../../lib/index.js";
|
|
5
|
+
function ToolbarSeparator() {
|
|
6
|
+
return /*#__PURE__*/ jsx("div", {
|
|
7
|
+
className: "h-8 w-px bg-border-subtle"
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function ToolbarButton({ icon, label, onClick }) {
|
|
11
|
+
return /*#__PURE__*/ jsx("button", {
|
|
12
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted transition-colors hover:text-foreground",
|
|
13
|
+
onClick: onClick,
|
|
14
|
+
"aria-label": label,
|
|
15
|
+
children: icon
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function FlowCanvasToolbar({ className, activeMode = 'build', onModeChange }) {
|
|
19
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
20
|
+
className: cn('flex h-[60px] items-center gap-2 rounded-3xl border border-border bg-surface-raised px-2.5', className),
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ jsxs("div", {
|
|
23
|
+
className: "flex h-10 items-center rounded-xl border border-border-deep bg-surface-overlay p-1",
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ jsxs("button", {
|
|
26
|
+
className: cn('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5 transition-colors', 'build' === activeMode ? 'border border-border bg-surface text-foreground' : 'text-foreground-subtle hover:text-foreground-hover'),
|
|
27
|
+
onClick: ()=>onModeChange?.('build'),
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ jsx(Workflow, {
|
|
30
|
+
className: "h-5 w-5"
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ jsx("span", {
|
|
33
|
+
children: "Build"
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
}),
|
|
37
|
+
/*#__PURE__*/ jsxs("button", {
|
|
38
|
+
className: cn('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5 transition-colors', 'evaluate' === activeMode ? 'border border-border bg-surface text-foreground' : 'text-foreground-subtle hover:text-foreground-hover'),
|
|
39
|
+
onClick: ()=>onModeChange?.('evaluate'),
|
|
40
|
+
children: [
|
|
41
|
+
/*#__PURE__*/ jsx(ListChecks, {
|
|
42
|
+
className: "h-5 w-5"
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ jsx("span", {
|
|
45
|
+
children: "Evaluate"
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
}),
|
|
51
|
+
/*#__PURE__*/ jsx(ToolbarSeparator, {}),
|
|
52
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
53
|
+
icon: /*#__PURE__*/ jsx(Undo2, {
|
|
54
|
+
className: "h-5 w-5"
|
|
55
|
+
}),
|
|
56
|
+
label: "Undo"
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
59
|
+
icon: /*#__PURE__*/ jsx(Redo2, {
|
|
60
|
+
className: "h-5 w-5"
|
|
61
|
+
}),
|
|
62
|
+
label: "Redo"
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ jsx(ToolbarSeparator, {}),
|
|
65
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
66
|
+
icon: /*#__PURE__*/ jsx(Play, {
|
|
67
|
+
className: "h-5 w-5"
|
|
68
|
+
}),
|
|
69
|
+
label: "Run"
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ jsx(ToolbarSeparator, {}),
|
|
72
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
73
|
+
icon: /*#__PURE__*/ jsx(Plus, {
|
|
74
|
+
className: "h-5 w-5"
|
|
75
|
+
}),
|
|
76
|
+
label: "Add node"
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
79
|
+
icon: /*#__PURE__*/ jsx(StickyNote, {
|
|
80
|
+
className: "h-5 w-5"
|
|
81
|
+
}),
|
|
82
|
+
label: "Add note"
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
export { FlowCanvasToolbar };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
FlowViewToolbar: ()=>FlowViewToolbar
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
require("react");
|
|
31
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
+
function ViewButton({ icon, label, isActive, onClick }) {
|
|
34
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
35
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted transition-colors hover:text-foreground', isActive && 'rounded-2xl border border-border bg-surface text-foreground'),
|
|
36
|
+
onClick: onClick,
|
|
37
|
+
"aria-label": label,
|
|
38
|
+
children: icon
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function NodeSizeIcon({ size, isActive }) {
|
|
42
|
+
const label = {
|
|
43
|
+
s: 'S',
|
|
44
|
+
m: 'M',
|
|
45
|
+
l: 'L'
|
|
46
|
+
}[size];
|
|
47
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
48
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-8 w-8 items-center justify-center rounded-2xl text-xs font-bold text-foreground-muted transition-colors hover:text-foreground', isActive && 'border border-border bg-surface text-foreground'),
|
|
49
|
+
"aria-label": `Node size ${label}`,
|
|
50
|
+
children: label
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function FlowViewToolbar({ className, activeNodeSize = 's', onAction }) {
|
|
54
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
55
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-col gap-4', className),
|
|
56
|
+
children: [
|
|
57
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
58
|
+
className: "flex w-10 flex-col items-center gap-1 rounded-xl bg-surface-raised p-1",
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewButton, {
|
|
61
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ZoomIn, {
|
|
62
|
+
className: "h-5 w-5"
|
|
63
|
+
}),
|
|
64
|
+
label: "Zoom in",
|
|
65
|
+
onClick: ()=>onAction?.('zoom-in')
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewButton, {
|
|
68
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ZoomOut, {
|
|
69
|
+
className: "h-5 w-5"
|
|
70
|
+
}),
|
|
71
|
+
label: "Zoom out",
|
|
72
|
+
onClick: ()=>onAction?.('zoom-out')
|
|
73
|
+
}),
|
|
74
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
75
|
+
className: "h-px w-6 bg-border-subtle"
|
|
76
|
+
}),
|
|
77
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewButton, {
|
|
78
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Maximize2, {
|
|
79
|
+
className: "h-5 w-5"
|
|
80
|
+
}),
|
|
81
|
+
label: "Fit to screen",
|
|
82
|
+
onClick: ()=>onAction?.('fit')
|
|
83
|
+
}),
|
|
84
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewButton, {
|
|
85
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.LayoutGrid, {
|
|
86
|
+
className: "h-5 w-5"
|
|
87
|
+
}),
|
|
88
|
+
label: "Toggle grid",
|
|
89
|
+
onClick: ()=>onAction?.('grid')
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
}),
|
|
93
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
94
|
+
className: "flex w-10 flex-col items-center gap-2 rounded-[20px] border border-border-deep bg-surface-raised p-1",
|
|
95
|
+
children: [
|
|
96
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NodeSizeIcon, {
|
|
97
|
+
size: "s",
|
|
98
|
+
isActive: 's' === activeNodeSize
|
|
99
|
+
}),
|
|
100
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NodeSizeIcon, {
|
|
101
|
+
size: "m",
|
|
102
|
+
isActive: 'm' === activeNodeSize
|
|
103
|
+
}),
|
|
104
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NodeSizeIcon, {
|
|
105
|
+
size: "l",
|
|
106
|
+
isActive: 'l' === activeNodeSize
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
exports.FlowViewToolbar = __webpack_exports__.FlowViewToolbar;
|
|
114
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
115
|
+
"FlowViewToolbar"
|
|
116
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
117
|
+
Object.defineProperty(exports, '__esModule', {
|
|
118
|
+
value: true
|
|
119
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ViewToolbarProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
/** Active node size: 's' | 'm' | 'l' */
|
|
4
|
+
activeNodeSize?: 's' | 'm' | 'l';
|
|
5
|
+
/** Callback for zoom/view actions */
|
|
6
|
+
onAction?: (action: string) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Bottom-right view controls for the Flow canvas.
|
|
10
|
+
*
|
|
11
|
+
* Contains zoom in/out, fit-to-screen, grid toggle, and node size selector.
|
|
12
|
+
* Anchored to bottom-right via absolute positioning in the parent layout.
|
|
13
|
+
*/
|
|
14
|
+
export declare function FlowViewToolbar({ className, activeNodeSize, onAction, }: ViewToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { LayoutGrid, Maximize2, ZoomIn, ZoomOut } from "lucide-react";
|
|
4
|
+
import { cn } from "../../lib/index.js";
|
|
5
|
+
function ViewButton({ icon, label, isActive, onClick }) {
|
|
6
|
+
return /*#__PURE__*/ jsx("button", {
|
|
7
|
+
className: cn('flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted transition-colors hover:text-foreground', isActive && 'rounded-2xl border border-border bg-surface text-foreground'),
|
|
8
|
+
onClick: onClick,
|
|
9
|
+
"aria-label": label,
|
|
10
|
+
children: icon
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function NodeSizeIcon({ size, isActive }) {
|
|
14
|
+
const label = {
|
|
15
|
+
s: 'S',
|
|
16
|
+
m: 'M',
|
|
17
|
+
l: 'L'
|
|
18
|
+
}[size];
|
|
19
|
+
return /*#__PURE__*/ jsx("button", {
|
|
20
|
+
className: cn('flex h-8 w-8 items-center justify-center rounded-2xl text-xs font-bold text-foreground-muted transition-colors hover:text-foreground', isActive && 'border border-border bg-surface text-foreground'),
|
|
21
|
+
"aria-label": `Node size ${label}`,
|
|
22
|
+
children: label
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function FlowViewToolbar({ className, activeNodeSize = 's', onAction }) {
|
|
26
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
27
|
+
className: cn('flex flex-col gap-4', className),
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ jsxs("div", {
|
|
30
|
+
className: "flex w-10 flex-col items-center gap-1 rounded-xl bg-surface-raised p-1",
|
|
31
|
+
children: [
|
|
32
|
+
/*#__PURE__*/ jsx(ViewButton, {
|
|
33
|
+
icon: /*#__PURE__*/ jsx(ZoomIn, {
|
|
34
|
+
className: "h-5 w-5"
|
|
35
|
+
}),
|
|
36
|
+
label: "Zoom in",
|
|
37
|
+
onClick: ()=>onAction?.('zoom-in')
|
|
38
|
+
}),
|
|
39
|
+
/*#__PURE__*/ jsx(ViewButton, {
|
|
40
|
+
icon: /*#__PURE__*/ jsx(ZoomOut, {
|
|
41
|
+
className: "h-5 w-5"
|
|
42
|
+
}),
|
|
43
|
+
label: "Zoom out",
|
|
44
|
+
onClick: ()=>onAction?.('zoom-out')
|
|
45
|
+
}),
|
|
46
|
+
/*#__PURE__*/ jsx("div", {
|
|
47
|
+
className: "h-px w-6 bg-border-subtle"
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ jsx(ViewButton, {
|
|
50
|
+
icon: /*#__PURE__*/ jsx(Maximize2, {
|
|
51
|
+
className: "h-5 w-5"
|
|
52
|
+
}),
|
|
53
|
+
label: "Fit to screen",
|
|
54
|
+
onClick: ()=>onAction?.('fit')
|
|
55
|
+
}),
|
|
56
|
+
/*#__PURE__*/ jsx(ViewButton, {
|
|
57
|
+
icon: /*#__PURE__*/ jsx(LayoutGrid, {
|
|
58
|
+
className: "h-5 w-5"
|
|
59
|
+
}),
|
|
60
|
+
label: "Toggle grid",
|
|
61
|
+
onClick: ()=>onAction?.('grid')
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ jsxs("div", {
|
|
66
|
+
className: "flex w-10 flex-col items-center gap-2 rounded-[20px] border border-border-deep bg-surface-raised p-1",
|
|
67
|
+
children: [
|
|
68
|
+
/*#__PURE__*/ jsx(NodeSizeIcon, {
|
|
69
|
+
size: "s",
|
|
70
|
+
isActive: 's' === activeNodeSize
|
|
71
|
+
}),
|
|
72
|
+
/*#__PURE__*/ jsx(NodeSizeIcon, {
|
|
73
|
+
size: "m",
|
|
74
|
+
isActive: 'm' === activeNodeSize
|
|
75
|
+
}),
|
|
76
|
+
/*#__PURE__*/ jsx(NodeSizeIcon, {
|
|
77
|
+
size: "l",
|
|
78
|
+
isActive: 'l' === activeNodeSize
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
export { FlowViewToolbar };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
ViewportGuard: ()=>ViewportGuard,
|
|
28
|
+
useViewportAtOrAbove: ()=>useViewportAtOrAbove
|
|
29
|
+
});
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
+
function useViewportBelow(minWidthPx) {
|
|
34
|
+
const [isBelow, setIsBelow] = external_react_namespaceObject.useState(false);
|
|
35
|
+
external_react_namespaceObject.useEffect(()=>{
|
|
36
|
+
const mql = window.matchMedia(`(max-width: ${minWidthPx - 1}px)`);
|
|
37
|
+
const handler = ()=>setIsBelow(mql.matches);
|
|
38
|
+
handler();
|
|
39
|
+
mql.addEventListener('change', handler);
|
|
40
|
+
return ()=>mql.removeEventListener('change', handler);
|
|
41
|
+
}, [
|
|
42
|
+
minWidthPx
|
|
43
|
+
]);
|
|
44
|
+
return isBelow;
|
|
45
|
+
}
|
|
46
|
+
function useViewportAtOrAbove(minWidthPx) {
|
|
47
|
+
const [isAtOrAbove, setIsAtOrAbove] = external_react_namespaceObject.useState(false);
|
|
48
|
+
external_react_namespaceObject.useEffect(()=>{
|
|
49
|
+
const mql = window.matchMedia(`(min-width: ${minWidthPx}px)`);
|
|
50
|
+
const handler = ()=>setIsAtOrAbove(mql.matches);
|
|
51
|
+
handler();
|
|
52
|
+
mql.addEventListener('change', handler);
|
|
53
|
+
return ()=>mql.removeEventListener('change', handler);
|
|
54
|
+
}, [
|
|
55
|
+
minWidthPx
|
|
56
|
+
]);
|
|
57
|
+
return isAtOrAbove;
|
|
58
|
+
}
|
|
59
|
+
const DEFAULT_MESSAGE = 'This view is not available at this screen size. Please use a larger viewport.';
|
|
60
|
+
function ViewportGuard({ minWidth = 769, message = DEFAULT_MESSAGE, className, children }) {
|
|
61
|
+
const isBelow = useViewportBelow(minWidth);
|
|
62
|
+
if (!isBelow) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {
|
|
63
|
+
children: children
|
|
64
|
+
});
|
|
65
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
66
|
+
className: (0, index_cjs_namespaceObject.cn)('fixed inset-0 z-50 flex items-center justify-center', className),
|
|
67
|
+
children: [
|
|
68
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
69
|
+
className: "absolute inset-0 bg-surface backdrop-blur-xl",
|
|
70
|
+
"aria-hidden": "true"
|
|
71
|
+
}),
|
|
72
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
73
|
+
className: "relative mx-4 max-w-sm rounded-2xl border border-border bg-surface-raised px-6 py-5 text-center shadow-xl",
|
|
74
|
+
role: "status",
|
|
75
|
+
"aria-live": "polite",
|
|
76
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
77
|
+
className: "text-sm font-medium leading-5 text-foreground",
|
|
78
|
+
children: message
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
exports.ViewportGuard = __webpack_exports__.ViewportGuard;
|
|
85
|
+
exports.useViewportAtOrAbove = __webpack_exports__.useViewportAtOrAbove;
|
|
86
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
87
|
+
"ViewportGuard",
|
|
88
|
+
"useViewportAtOrAbove"
|
|
89
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
90
|
+
Object.defineProperty(exports, '__esModule', {
|
|
91
|
+
value: true
|
|
92
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true when viewport width is >= minWidthPx (e.g. for "expanded above 1024").
|
|
4
|
+
*/
|
|
5
|
+
export declare function useViewportAtOrAbove(minWidthPx: number): boolean;
|
|
6
|
+
export interface ViewportGuardProps {
|
|
7
|
+
/** Minimum viewport width (px) at which content is shown. Below this, the overlay is shown. Default 769 (so 768px and below get the overlay). */
|
|
8
|
+
minWidth?: number;
|
|
9
|
+
/** Overlay message. Default explains the view is not available at this screen size. */
|
|
10
|
+
message?: string;
|
|
11
|
+
/** Optional class for the overlay container. */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Content to guard; hidden behind the overlay when viewport is too narrow. */
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Renders children when viewport is at or above `minWidth`, and a full-screen
|
|
18
|
+
* blurred overlay with a message when viewport is below that width.
|
|
19
|
+
*
|
|
20
|
+
* Use for templates or layouts that are not designed for small screens
|
|
21
|
+
* (e.g. Delegate templates at 540px / 768px).
|
|
22
|
+
*/
|
|
23
|
+
export declare function ViewportGuard({ minWidth, message, className, children, }: ViewportGuardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { cn } from "../../lib/index.js";
|
|
4
|
+
function useViewportBelow(minWidthPx) {
|
|
5
|
+
const [isBelow, setIsBelow] = useState(false);
|
|
6
|
+
useEffect(()=>{
|
|
7
|
+
const mql = window.matchMedia(`(max-width: ${minWidthPx - 1}px)`);
|
|
8
|
+
const handler = ()=>setIsBelow(mql.matches);
|
|
9
|
+
handler();
|
|
10
|
+
mql.addEventListener('change', handler);
|
|
11
|
+
return ()=>mql.removeEventListener('change', handler);
|
|
12
|
+
}, [
|
|
13
|
+
minWidthPx
|
|
14
|
+
]);
|
|
15
|
+
return isBelow;
|
|
16
|
+
}
|
|
17
|
+
function useViewportAtOrAbove(minWidthPx) {
|
|
18
|
+
const [isAtOrAbove, setIsAtOrAbove] = useState(false);
|
|
19
|
+
useEffect(()=>{
|
|
20
|
+
const mql = window.matchMedia(`(min-width: ${minWidthPx}px)`);
|
|
21
|
+
const handler = ()=>setIsAtOrAbove(mql.matches);
|
|
22
|
+
handler();
|
|
23
|
+
mql.addEventListener('change', handler);
|
|
24
|
+
return ()=>mql.removeEventListener('change', handler);
|
|
25
|
+
}, [
|
|
26
|
+
minWidthPx
|
|
27
|
+
]);
|
|
28
|
+
return isAtOrAbove;
|
|
29
|
+
}
|
|
30
|
+
const DEFAULT_MESSAGE = 'This view is not available at this screen size. Please use a larger viewport.';
|
|
31
|
+
function ViewportGuard({ minWidth = 769, message = DEFAULT_MESSAGE, className, children }) {
|
|
32
|
+
const isBelow = useViewportBelow(minWidth);
|
|
33
|
+
if (!isBelow) return /*#__PURE__*/ jsx(Fragment, {
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
36
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
37
|
+
className: cn('fixed inset-0 z-50 flex items-center justify-center', className),
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ jsx("div", {
|
|
40
|
+
className: "absolute inset-0 bg-surface backdrop-blur-xl",
|
|
41
|
+
"aria-hidden": "true"
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ jsx("div", {
|
|
44
|
+
className: "relative mx-4 max-w-sm rounded-2xl border border-border bg-surface-raised px-6 py-5 text-center shadow-xl",
|
|
45
|
+
role: "status",
|
|
46
|
+
"aria-live": "polite",
|
|
47
|
+
children: /*#__PURE__*/ jsx("p", {
|
|
48
|
+
className: "text-sm font-medium leading-5 text-foreground",
|
|
49
|
+
children: message
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
export { ViewportGuard, useViewportAtOrAbove };
|
|
@@ -32,7 +32,7 @@ const react_slot_namespaceObject = require("@radix-ui/react-slot");
|
|
|
32
32
|
const external_class_variance_authority_namespaceObject = require("class-variance-authority");
|
|
33
33
|
const external_react_namespaceObject = require("react");
|
|
34
34
|
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
35
|
-
const buttonVariants = (0, external_class_variance_authority_namespaceObject.cva)('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-
|
|
35
|
+
const buttonVariants = (0, external_class_variance_authority_namespaceObject.cva)('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer', {
|
|
36
36
|
variants: {
|
|
37
37
|
variant: {
|
|
38
38
|
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
@@ -44,8 +44,8 @@ const buttonVariants = (0, external_class_variance_authority_namespaceObject.cva
|
|
|
44
44
|
},
|
|
45
45
|
size: {
|
|
46
46
|
default: 'h-10 px-4 py-2',
|
|
47
|
-
sm: 'h-9
|
|
48
|
-
lg: 'h-11
|
|
47
|
+
sm: 'h-9 px-3',
|
|
48
|
+
lg: 'h-11 px-8',
|
|
49
49
|
icon: 'h-10 w-10'
|
|
50
50
|
}
|
|
51
51
|
},
|
|
@@ -3,7 +3,7 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { cn } from "../../lib/index.js";
|
|
6
|
-
const buttonVariants = cva('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-
|
|
6
|
+
const buttonVariants = cva('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer', {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
@@ -15,8 +15,8 @@ const buttonVariants = cva('inline-flex items-center justify-center gap-2 whites
|
|
|
15
15
|
},
|
|
16
16
|
size: {
|
|
17
17
|
default: 'h-10 px-4 py-2',
|
|
18
|
-
sm: 'h-9
|
|
19
|
-
lg: 'h-11
|
|
18
|
+
sm: 'h-9 px-3',
|
|
19
|
+
lg: 'h-11 px-8',
|
|
20
20
|
icon: 'h-10 w-10'
|
|
21
21
|
}
|
|
22
22
|
},
|