@uipath/apollo-wind 0.10.0 → 0.11.0-pr295.af4e744
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-studio.cjs +133 -0
- package/dist/components/custom/canvas-studio.d.ts +99 -0
- package/dist/components/custom/canvas-studio.js +93 -0
- 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 +49 -0
- package/dist/components/custom/chat-prompt-suggestions.d.ts +18 -0
- package/dist/components/custom/chat-prompt-suggestions.js +15 -0
- package/dist/components/custom/chat-steps-view.cjs +308 -0
- package/dist/components/custom/chat-steps-view.d.ts +38 -0
- package/dist/components/custom/chat-steps-view.js +274 -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 +103 -0
- package/dist/components/custom/flow-properties-bar.d.ts +21 -0
- package/dist/components/custom/flow-properties-bar.js +69 -0
- package/dist/components/custom/flow-properties-expanded.cjs +328 -0
- package/dist/components/custom/flow-properties-expanded.d.ts +21 -0
- package/dist/components/custom/flow-properties-expanded.js +294 -0
- package/dist/components/custom/flow-properties-simple.cjs +364 -0
- package/dist/components/custom/flow-properties-simple.d.ts +62 -0
- package/dist/components/custom/flow-properties-simple.js +330 -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 +422 -0
- package/dist/components/custom/global-header.d.ts +38 -0
- package/dist/components/custom/global-header.js +388 -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/page-header.cjs +92 -0
- package/dist/components/custom/page-header.d.ts +43 -0
- package/dist/components/custom/page-header.js +58 -0
- package/dist/components/custom/panel-delegate.cjs +285 -0
- package/dist/components/custom/panel-delegate.d.ts +34 -0
- package/dist/components/custom/panel-delegate.js +251 -0
- package/dist/components/custom/panel-flow.cjs +262 -0
- package/dist/components/custom/panel-flow.d.ts +38 -0
- package/dist/components/custom/panel-flow.js +225 -0
- package/dist/components/custom/panel-maestro.cjs +74 -0
- package/dist/components/custom/panel-maestro.d.ts +30 -0
- package/dist/components/custom/panel-maestro.js +40 -0
- package/dist/components/custom/panel-studio.cjs +122 -0
- package/dist/components/custom/panel-studio.d.ts +48 -0
- package/dist/components/custom/panel-studio.js +85 -0
- package/dist/components/custom/toolbar-canvas.cjs +124 -0
- package/dist/components/custom/toolbar-canvas.d.ts +15 -0
- package/dist/components/custom/toolbar-canvas.js +90 -0
- package/dist/components/custom/toolbar-view.cjs +121 -0
- package/dist/components/custom/toolbar-view.d.ts +14 -0
- package/dist/components/custom/toolbar-view.js +87 -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/forms/field-renderer.cjs +3 -1
- package/dist/components/forms/field-renderer.js +3 -1
- package/dist/components/forms/form-designer.cjs +13 -2
- package/dist/components/forms/form-designer.js +13 -2
- package/dist/components/forms/rules-engine.d.ts +1 -1
- package/dist/components/ui/breadcrumb.cjs +1 -2
- package/dist/components/ui/breadcrumb.js +1 -2
- package/dist/components/ui/button-group.cjs +5 -3
- package/dist/components/ui/button-group.d.ts +2 -2
- package/dist/components/ui/button-group.js +5 -3
- package/dist/components/ui/button.cjs +3 -3
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/chart.cjs +223 -0
- package/dist/components/ui/chart.d.ts +40 -0
- package/dist/components/ui/chart.js +174 -0
- package/dist/components/ui/code-block.cjs +258 -0
- package/dist/components/ui/code-block.d.ts +48 -0
- package/dist/components/ui/code-block.js +207 -0
- package/dist/components/ui/data-table.cjs +22 -4
- package/dist/components/ui/data-table.d.ts +5 -2
- package/dist/components/ui/data-table.js +23 -5
- package/dist/components/ui/editable-cell.cjs +3 -10
- package/dist/components/ui/editable-cell.js +3 -10
- 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 +8 -0
- package/dist/components/ui/file-upload.js +8 -0
- 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/multi-select.cjs +3 -10
- package/dist/components/ui/multi-select.js +3 -10
- package/dist/components/ui/pagination.cjs +0 -1
- package/dist/components/ui/pagination.js +0 -1
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/tree-view.cjs +1117 -0
- package/dist/components/ui/tree-view.d.ts +95 -0
- package/dist/components/ui/tree-view.js +1083 -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 +25 -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 +131 -221
- package/dist/index.d.ts +4 -3
- package/dist/index.js +3 -4
- package/dist/src/foundation/Future/themes.css +279 -0
- package/dist/styles.css +1941 -605
- package/dist/tailwind.css +874 -87
- package/dist/templates/Admin/settings-admin.d.ts +5 -0
- package/dist/templates/Admin/template-admin.d.ts +86 -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 +57 -0
- package/dist/templates/Maestro/template-maestro.d.ts +52 -0
- package/dist/templates/Studio/template-studio.d.ts +102 -0
- package/dist/templates/{vscode-example.d.ts → VisualStudio/shell.d.ts} +1 -1
- package/package.json +12 -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,87 @@
|
|
|
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
|
+
type: "button",
|
|
8
|
+
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'),
|
|
9
|
+
onClick: onClick,
|
|
10
|
+
"aria-label": label,
|
|
11
|
+
children: icon
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function NodeSizeIcon({ size, isActive }) {
|
|
15
|
+
const label = {
|
|
16
|
+
s: 'S',
|
|
17
|
+
m: 'M',
|
|
18
|
+
l: 'L'
|
|
19
|
+
}[size];
|
|
20
|
+
return /*#__PURE__*/ jsx("button", {
|
|
21
|
+
type: "button",
|
|
22
|
+
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'),
|
|
23
|
+
"aria-label": `Node size ${label}`,
|
|
24
|
+
children: label
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function FlowViewToolbar({ className, activeNodeSize = 's', onAction }) {
|
|
28
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
29
|
+
className: cn('flex flex-col gap-4', className),
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ jsxs("div", {
|
|
32
|
+
className: "flex w-10 flex-col items-center gap-1 rounded-xl bg-surface-raised p-1",
|
|
33
|
+
children: [
|
|
34
|
+
/*#__PURE__*/ jsx(ViewButton, {
|
|
35
|
+
icon: /*#__PURE__*/ jsx(ZoomIn, {
|
|
36
|
+
className: "h-5 w-5"
|
|
37
|
+
}),
|
|
38
|
+
label: "Zoom in",
|
|
39
|
+
onClick: ()=>onAction?.('zoom-in')
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ jsx(ViewButton, {
|
|
42
|
+
icon: /*#__PURE__*/ jsx(ZoomOut, {
|
|
43
|
+
className: "h-5 w-5"
|
|
44
|
+
}),
|
|
45
|
+
label: "Zoom out",
|
|
46
|
+
onClick: ()=>onAction?.('zoom-out')
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ jsx("div", {
|
|
49
|
+
className: "h-px w-6 bg-border-subtle"
|
|
50
|
+
}),
|
|
51
|
+
/*#__PURE__*/ jsx(ViewButton, {
|
|
52
|
+
icon: /*#__PURE__*/ jsx(Maximize2, {
|
|
53
|
+
className: "h-5 w-5"
|
|
54
|
+
}),
|
|
55
|
+
label: "Fit to screen",
|
|
56
|
+
onClick: ()=>onAction?.('fit')
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ jsx(ViewButton, {
|
|
59
|
+
icon: /*#__PURE__*/ jsx(LayoutGrid, {
|
|
60
|
+
className: "h-5 w-5"
|
|
61
|
+
}),
|
|
62
|
+
label: "Toggle grid",
|
|
63
|
+
onClick: ()=>onAction?.('grid')
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ jsxs("div", {
|
|
68
|
+
className: "flex w-10 flex-col items-center gap-2 rounded-[20px] border border-border-deep bg-surface-raised p-1",
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ jsx(NodeSizeIcon, {
|
|
71
|
+
size: "s",
|
|
72
|
+
isActive: 's' === activeNodeSize
|
|
73
|
+
}),
|
|
74
|
+
/*#__PURE__*/ jsx(NodeSizeIcon, {
|
|
75
|
+
size: "m",
|
|
76
|
+
isActive: 'm' === activeNodeSize
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ jsx(NodeSizeIcon, {
|
|
79
|
+
size: "l",
|
|
80
|
+
isActive: 'l' === activeNodeSize
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
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 };
|
|
@@ -90,7 +90,9 @@ function FormFieldRenderer({ field, context, customComponents, disabled: formDis
|
|
|
90
90
|
if ('params' in field.dataSource && field.dataSource.params) Object.values(field.dataSource.params).forEach((value)=>{
|
|
91
91
|
if ('string' == typeof value && value.startsWith('$')) fields.add(value.slice(1));
|
|
92
92
|
});
|
|
93
|
-
if ('computed' === field.dataSource.type && 'dependency' in field.dataSource) field.dataSource.dependency.forEach((dep)=>
|
|
93
|
+
if ('computed' === field.dataSource.type && 'dependency' in field.dataSource) field.dataSource.dependency.forEach((dep)=>{
|
|
94
|
+
fields.add(dep);
|
|
95
|
+
});
|
|
94
96
|
return Array.from(fields);
|
|
95
97
|
}, [
|
|
96
98
|
field.dataSource
|
|
@@ -62,7 +62,9 @@ function FormFieldRenderer({ field, context, customComponents, disabled: formDis
|
|
|
62
62
|
if ('params' in field.dataSource && field.dataSource.params) Object.values(field.dataSource.params).forEach((value)=>{
|
|
63
63
|
if ('string' == typeof value && value.startsWith('$')) fields.add(value.slice(1));
|
|
64
64
|
});
|
|
65
|
-
if ('computed' === field.dataSource.type && 'dependency' in field.dataSource) field.dataSource.dependency.forEach((dep)=>
|
|
65
|
+
if ('computed' === field.dataSource.type && 'dependency' in field.dataSource) field.dataSource.dependency.forEach((dep)=>{
|
|
66
|
+
fields.add(dep);
|
|
67
|
+
});
|
|
66
68
|
return Array.from(fields);
|
|
67
69
|
}, [
|
|
68
70
|
field.dataSource
|
|
@@ -1069,8 +1069,10 @@ function FormDesigner() {
|
|
|
1069
1069
|
})
|
|
1070
1070
|
})
|
|
1071
1071
|
}),
|
|
1072
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("
|
|
1073
|
-
|
|
1072
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
1073
|
+
type: "button",
|
|
1074
|
+
tabIndex: 0,
|
|
1075
|
+
className: "flex-1 min-w-0 cursor-pointer flex items-center gap-1 bg-transparent border-0 p-0 text-left",
|
|
1074
1076
|
onClick: ()=>{
|
|
1075
1077
|
setSelectedSectionId(section.id);
|
|
1076
1078
|
setSelectedFieldId(null);
|
|
@@ -1138,11 +1140,20 @@ function FormDesigner() {
|
|
|
1138
1140
|
className: "space-y-0.5 ml-3 border-l pl-2",
|
|
1139
1141
|
children: [
|
|
1140
1142
|
section.fields.map((field, fieldIndex)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
1143
|
+
role: "button",
|
|
1144
|
+
tabIndex: 0,
|
|
1141
1145
|
className: `group/field flex items-center gap-1 px-2 py-1 rounded cursor-pointer hover:bg-accent transition-colors ${selectedFieldId === field.id ? 'bg-accent' : ''}`,
|
|
1142
1146
|
onClick: ()=>{
|
|
1143
1147
|
setSelectedSectionId(section.id);
|
|
1144
1148
|
setSelectedFieldId(field.id);
|
|
1145
1149
|
},
|
|
1150
|
+
onKeyDown: (e)=>{
|
|
1151
|
+
if ('Enter' === e.key || ' ' === e.key) {
|
|
1152
|
+
e.preventDefault();
|
|
1153
|
+
setSelectedSectionId(section.id);
|
|
1154
|
+
setSelectedFieldId(field.id);
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1146
1157
|
children: [
|
|
1147
1158
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.GripVertical, {
|
|
1148
1159
|
className: "h-3 w-3 text-muted-foreground opacity-0 group-hover/field:opacity-50"
|
|
@@ -1041,8 +1041,10 @@ function FormDesigner() {
|
|
|
1041
1041
|
})
|
|
1042
1042
|
})
|
|
1043
1043
|
}),
|
|
1044
|
-
/*#__PURE__*/ jsxs("
|
|
1045
|
-
|
|
1044
|
+
/*#__PURE__*/ jsxs("button", {
|
|
1045
|
+
type: "button",
|
|
1046
|
+
tabIndex: 0,
|
|
1047
|
+
className: "flex-1 min-w-0 cursor-pointer flex items-center gap-1 bg-transparent border-0 p-0 text-left",
|
|
1046
1048
|
onClick: ()=>{
|
|
1047
1049
|
setSelectedSectionId(section.id);
|
|
1048
1050
|
setSelectedFieldId(null);
|
|
@@ -1110,11 +1112,20 @@ function FormDesigner() {
|
|
|
1110
1112
|
className: "space-y-0.5 ml-3 border-l pl-2",
|
|
1111
1113
|
children: [
|
|
1112
1114
|
section.fields.map((field, fieldIndex)=>/*#__PURE__*/ jsxs("div", {
|
|
1115
|
+
role: "button",
|
|
1116
|
+
tabIndex: 0,
|
|
1113
1117
|
className: `group/field flex items-center gap-1 px-2 py-1 rounded cursor-pointer hover:bg-accent transition-colors ${selectedFieldId === field.id ? 'bg-accent' : ''}`,
|
|
1114
1118
|
onClick: ()=>{
|
|
1115
1119
|
setSelectedSectionId(section.id);
|
|
1116
1120
|
setSelectedFieldId(field.id);
|
|
1117
1121
|
},
|
|
1122
|
+
onKeyDown: (e)=>{
|
|
1123
|
+
if ('Enter' === e.key || ' ' === e.key) {
|
|
1124
|
+
e.preventDefault();
|
|
1125
|
+
setSelectedSectionId(section.id);
|
|
1126
|
+
setSelectedFieldId(field.id);
|
|
1127
|
+
}
|
|
1128
|
+
},
|
|
1118
1129
|
children: [
|
|
1119
1130
|
/*#__PURE__*/ jsx(GripVertical, {
|
|
1120
1131
|
className: "h-3 w-3 text-muted-foreground opacity-0 group-hover/field:opacity-50"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FieldCondition, FieldOption, FieldRule, FormContext } from './form-schema';
|
|
2
2
|
/**
|
|
3
3
|
* Rules Engine - Evaluates conditions and applies effects using jsep
|
|
4
4
|
* Powers show/hide, enable/disable, validation changes, etc.
|
|
@@ -66,9 +66,8 @@ const BreadcrumbLink = /*#__PURE__*/ external_react_namespaceObject.forwardRef((
|
|
|
66
66
|
BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
67
67
|
const BreadcrumbPage = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
68
68
|
ref: ref,
|
|
69
|
-
role: "link",
|
|
70
|
-
"aria-disabled": "true",
|
|
71
69
|
"aria-current": "page",
|
|
70
|
+
"aria-disabled": "true",
|
|
72
71
|
className: (0, index_cjs_namespaceObject.cn)('font-normal text-foreground', className),
|
|
73
72
|
...props
|
|
74
73
|
}));
|
|
@@ -32,9 +32,8 @@ const BreadcrumbLink = /*#__PURE__*/ forwardRef(({ asChild, className, ...props
|
|
|
32
32
|
BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
33
33
|
const BreadcrumbPage = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("span", {
|
|
34
34
|
ref: ref,
|
|
35
|
-
role: "link",
|
|
36
|
-
"aria-disabled": "true",
|
|
37
35
|
"aria-current": "page",
|
|
36
|
+
"aria-disabled": "true",
|
|
38
37
|
className: cn('font-normal text-foreground', className),
|
|
39
38
|
...props
|
|
40
39
|
}));
|
|
@@ -35,14 +35,16 @@ const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
|
35
35
|
const ButtonGroup = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, orientation = 'horizontal', ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
36
36
|
ref: ref,
|
|
37
37
|
role: "group",
|
|
38
|
+
"aria-label": "Button group",
|
|
38
39
|
className: (0, index_cjs_namespaceObject.cn)('inline-flex', 'horizontal' === orientation ? '[&>button]:rounded-none [&>button]:border-r-0 [&>button:first-child]:rounded-l-md [&>button:last-child]:rounded-r-md [&>button:last-child]:border-r' : 'flex-col [&>button]:rounded-none [&>button]:border-b-0 [&>button:first-child]:rounded-t-md [&>button:last-child]:rounded-b-md [&>button:last-child]:border-b', className),
|
|
39
40
|
...props
|
|
40
41
|
}));
|
|
41
42
|
ButtonGroup.displayName = 'ButtonGroup';
|
|
42
|
-
const ButtonGroupSeparator = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, orientation = 'vertical', ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("
|
|
43
|
+
const ButtonGroupSeparator = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, orientation = 'vertical', ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("hr", {
|
|
43
44
|
ref: ref,
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
"aria-orientation": orientation,
|
|
46
|
+
"aria-label": "Separator",
|
|
47
|
+
className: (0, index_cjs_namespaceObject.cn)('bg-border border-0 m-0', 'vertical' === orientation ? 'w-px self-stretch' : 'h-px self-stretch', className),
|
|
46
48
|
...props
|
|
47
49
|
}));
|
|
48
50
|
ButtonGroupSeparator.displayName = 'ButtonGroupSeparator';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
export interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
orientation?: 'horizontal' | 'vertical';
|
|
4
4
|
}
|
|
5
5
|
declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
interface ButtonGroupSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
7
|
orientation?: 'horizontal' | 'vertical';
|
|
8
8
|
}
|
|
9
|
-
declare const ButtonGroupSeparator: React.ForwardRefExoticComponent<ButtonGroupSeparatorProps & React.RefAttributes<
|
|
9
|
+
declare const ButtonGroupSeparator: React.ForwardRefExoticComponent<ButtonGroupSeparatorProps & React.RefAttributes<HTMLHRElement>>;
|
|
10
10
|
interface ButtonGroupTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
11
11
|
asChild?: boolean;
|
|
12
12
|
}
|
|
@@ -5,14 +5,16 @@ import { cn } from "../../lib/index.js";
|
|
|
5
5
|
const ButtonGroup = /*#__PURE__*/ forwardRef(({ className, orientation = 'horizontal', ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
6
6
|
ref: ref,
|
|
7
7
|
role: "group",
|
|
8
|
+
"aria-label": "Button group",
|
|
8
9
|
className: cn('inline-flex', 'horizontal' === orientation ? '[&>button]:rounded-none [&>button]:border-r-0 [&>button:first-child]:rounded-l-md [&>button:last-child]:rounded-r-md [&>button:last-child]:border-r' : 'flex-col [&>button]:rounded-none [&>button]:border-b-0 [&>button:first-child]:rounded-t-md [&>button:last-child]:rounded-b-md [&>button:last-child]:border-b', className),
|
|
9
10
|
...props
|
|
10
11
|
}));
|
|
11
12
|
ButtonGroup.displayName = 'ButtonGroup';
|
|
12
|
-
const ButtonGroupSeparator = /*#__PURE__*/ forwardRef(({ className, orientation = 'vertical', ...props }, ref)=>/*#__PURE__*/ jsx("
|
|
13
|
+
const ButtonGroupSeparator = /*#__PURE__*/ forwardRef(({ className, orientation = 'vertical', ...props }, ref)=>/*#__PURE__*/ jsx("hr", {
|
|
13
14
|
ref: ref,
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
"aria-orientation": orientation,
|
|
16
|
+
"aria-label": "Separator",
|
|
17
|
+
className: cn('bg-border border-0 m-0', 'vertical' === orientation ? 'w-px self-stretch' : 'h-px self-stretch', className),
|
|
16
18
|
...props
|
|
17
19
|
}));
|
|
18
20
|
ButtonGroupSeparator.displayName = 'ButtonGroupSeparator';
|
|
@@ -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
|
},
|