@uipath/apollo-wind 0.10.0-pr219.eea0372 → 0.10.0-pr219.fbe6d54
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 +1 -1
- package/dist/components/custom/canvas.js +1 -1
- package/dist/components/custom/canvas.stories.d.ts +12 -0
- package/dist/components/custom/chat-composer.cjs +9 -9
- package/dist/components/custom/chat-composer.js +9 -9
- package/dist/components/custom/chat-composer.stories.d.ts +12 -0
- package/dist/components/custom/chat-first-experience.cjs +2 -2
- package/dist/components/custom/chat-first-experience.js +2 -2
- package/dist/components/custom/chat-first-experience.stories.d.ts +12 -0
- package/dist/components/custom/chat-prompt-suggestions.cjs +2 -1
- package/dist/components/custom/chat-prompt-suggestions.js +2 -1
- package/dist/components/custom/chat-prompt-suggestions.stories.d.ts +12 -0
- package/dist/components/custom/chat-steps-view.cjs +23 -22
- package/dist/components/custom/chat-steps-view.js +23 -22
- package/dist/components/custom/chat-steps-view.stories.d.ts +12 -0
- package/dist/components/custom/flow-node.cjs +6 -6
- package/dist/components/custom/flow-node.js +6 -6
- package/dist/components/custom/flow-node.stories.d.ts +14 -0
- package/dist/components/custom/flow-properties-bar.cjs +10 -8
- package/dist/components/custom/flow-properties-bar.js +10 -8
- package/dist/components/custom/flow-properties-expanded.cjs +30 -26
- package/dist/components/custom/flow-properties-expanded.d.ts +3 -1
- package/dist/components/custom/flow-properties-expanded.js +30 -26
- package/dist/components/custom/flow-properties-simple.cjs +36 -29
- package/dist/components/custom/flow-properties-simple.js +36 -29
- package/dist/components/custom/flow-properties.stories.d.ts +15 -0
- package/dist/components/custom/global-header.cjs +44 -37
- package/dist/components/custom/global-header.d.ts +2 -2
- package/dist/components/custom/global-header.js +44 -37
- package/dist/components/custom/global-header.stories.d.ts +13 -0
- package/dist/components/custom/grid-maestro.cjs +1 -1
- package/dist/components/custom/grid-maestro.js +1 -1
- package/dist/components/custom/grid-maestro.stories.d.ts +10 -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/page-header.stories.d.ts +15 -0
- package/dist/components/custom/panel-delegate.cjs +19 -14
- package/dist/components/custom/panel-delegate.js +19 -14
- package/dist/components/custom/panel-delegate.stories.d.ts +13 -0
- package/dist/components/custom/panel-flow.cjs +21 -19
- package/dist/components/custom/panel-flow.js +21 -19
- package/dist/components/custom/panel-flow.stories.d.ts +13 -0
- package/dist/components/custom/panel-maestro.cjs +7 -6
- package/dist/components/custom/panel-maestro.d.ts +2 -2
- package/dist/components/custom/panel-maestro.js +5 -4
- package/dist/components/custom/panel-maestro.stories.d.ts +13 -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/panel-studio.stories.d.ts +13 -0
- package/dist/components/custom/toolbar-canvas.cjs +9 -6
- package/dist/components/custom/toolbar-canvas.js +9 -6
- package/dist/components/custom/toolbar-canvas.stories.d.ts +12 -0
- package/dist/components/custom/toolbar-view.cjs +7 -5
- package/dist/components/custom/toolbar-view.js +7 -5
- package/dist/components/custom/toolbar-view.stories.d.ts +12 -0
- package/dist/components/custom/viewport-guard.cjs +4 -5
- package/dist/components/custom/viewport-guard.js +4 -5
- package/dist/components/forms/custom-controls.stories.d.ts +61 -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/form-designer.stories.d.ts +6 -0
- package/dist/components/forms/metadata-form.stories.d.ts +143 -0
- package/dist/components/forms/rules-engine.d.ts +1 -1
- package/dist/components/ui/accordion.stories.d.ts +28 -0
- package/dist/components/ui/alert-dialog.stories.d.ts +24 -0
- package/dist/components/ui/alert.stories.d.ts +40 -0
- package/dist/components/ui/aspect-ratio.stories.d.ts +12 -0
- package/dist/components/ui/badge.stories.d.ts +24 -0
- package/dist/components/ui/breadcrumb.cjs +1 -2
- package/dist/components/ui/breadcrumb.js +1 -2
- package/dist/components/ui/breadcrumb.stories.d.ts +24 -0
- 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-group.stories.d.ts +67 -0
- package/dist/components/ui/button.stories.d.ts +31 -0
- package/dist/components/ui/calendar.stories.d.ts +8 -0
- package/dist/components/ui/card.stories.d.ts +21 -0
- package/dist/components/ui/chart.cjs +20 -15
- package/dist/components/ui/chart.d.ts +2 -2
- package/dist/components/ui/chart.js +20 -15
- package/dist/components/ui/checkbox.stories.d.ts +28 -0
- package/dist/components/ui/code-block.cjs +227 -0
- package/dist/components/ui/code-block.d.ts +48 -0
- package/dist/components/ui/code-block.js +193 -0
- package/dist/components/ui/code-block.stories.d.ts +54 -0
- package/dist/components/ui/combobox.stories.d.ts +28 -0
- package/dist/components/ui/command.stories.d.ts +50 -0
- package/dist/components/ui/component-gallery.stories.d.ts +11 -0
- package/dist/components/ui/context-menu.stories.d.ts +28 -0
- package/dist/components/ui/data-table.cjs +8 -2
- package/dist/components/ui/data-table.d.ts +3 -3
- package/dist/components/ui/data-table.js +8 -2
- package/dist/components/ui/data-table.stories.d.ts +62 -0
- package/dist/components/ui/date-picker.stories.d.ts +34 -0
- package/dist/components/ui/datetime-picker.stories.d.ts +34 -0
- package/dist/components/ui/dialog.stories.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.stories.d.ts +32 -0
- package/dist/components/ui/editable-cell.cjs +3 -10
- package/dist/components/ui/editable-cell.js +3 -10
- package/dist/components/ui/empty-state.stories.d.ts +25 -0
- package/dist/components/ui/file-upload.cjs +8 -0
- package/dist/components/ui/file-upload.js +8 -0
- package/dist/components/ui/file-upload.stories.d.ts +42 -0
- package/dist/components/ui/hover-card.stories.d.ts +24 -0
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/input.stories.d.ts +19 -0
- package/dist/components/ui/label.stories.d.ts +21 -0
- package/dist/components/ui/layout/column.stories.d.ts +53 -0
- package/dist/components/ui/layout/grid.stories.d.ts +65 -0
- package/dist/components/ui/layout/row.stories.d.ts +53 -0
- package/dist/components/ui/multi-select.cjs +3 -10
- package/dist/components/ui/multi-select.js +3 -10
- package/dist/components/ui/multi-select.stories.d.ts +42 -0
- package/dist/components/ui/pagination.cjs +0 -1
- package/dist/components/ui/pagination.js +0 -1
- package/dist/components/ui/pagination.stories.d.ts +20 -0
- package/dist/components/ui/popover.stories.d.ts +20 -0
- package/dist/components/ui/progress.stories.d.ts +40 -0
- package/dist/components/ui/radio-group.stories.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/resizable.stories.d.ts +29 -0
- package/dist/components/ui/scroll-area.stories.d.ts +8 -0
- package/dist/components/ui/search.stories.d.ts +38 -0
- package/dist/components/ui/select.stories.d.ts +33 -0
- package/dist/components/ui/separator.stories.d.ts +12 -0
- package/dist/components/ui/sheet.stories.d.ts +24 -0
- package/dist/components/ui/skeleton.stories.d.ts +46 -0
- package/dist/components/ui/slider.stories.d.ts +20 -0
- package/dist/components/ui/sonner.stories.d.ts +44 -0
- package/dist/components/ui/spinner.stories.d.ts +22 -0
- package/dist/components/ui/stats-card.stories.d.ts +27 -0
- package/dist/components/ui/stepper.stories.d.ts +38 -0
- package/dist/components/ui/switch.stories.d.ts +16 -0
- package/dist/components/ui/tabs.stories.d.ts +20 -0
- package/dist/components/ui/textarea.stories.d.ts +21 -0
- package/dist/components/ui/toggle-group.stories.d.ts +44 -0
- package/dist/components/ui/toggle.stories.d.ts +20 -0
- package/dist/components/ui/tooltip.stories.d.ts +36 -0
- package/dist/components/ui/tree-view.cjs +21 -5
- package/dist/components/ui/tree-view.js +21 -5
- package/dist/components/ui/tree-view.stories.d.ts +70 -0
- package/dist/foundation/Future/colors.cjs +34 -34
- package/dist/foundation/Future/colors.d.ts +70 -70
- package/dist/foundation/Future/colors.js +32 -32
- package/dist/foundation/Future/colors.stories.d.ts +10 -0
- package/dist/foundation/Future/icons.stories.d.ts +10 -0
- package/dist/foundation/Future/radius.stories.d.ts +10 -0
- package/dist/foundation/Future/responsive.stories.d.ts +10 -0
- package/dist/foundation/Future/shadows.stories.d.ts +10 -0
- package/dist/foundation/Future/spacing.stories.d.ts +10 -0
- package/dist/foundation/Future/strokes.stories.d.ts +10 -0
- package/dist/foundation/Future/theme.stories.d.ts +10 -0
- package/dist/foundation/Future/types.d.ts +16 -9
- package/dist/foundation/Future/typography.stories.d.ts +10 -0
- package/dist/foundation/colors.stories.d.ts +10 -0
- package/dist/foundation/icons.stories.d.ts +10 -0
- package/dist/foundation/spacing.stories.d.ts +10 -0
- package/dist/foundation/typography.stories.d.ts +10 -0
- package/dist/getting-started/getting-started.stories.d.ts +10 -0
- package/dist/getting-started/prototyping.stories.d.ts +10 -0
- package/dist/index.cjs +13 -9
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/src/foundation/Future/themes.css +279 -0
- package/dist/styles.css +1022 -983
- package/dist/tailwind.css +385 -98
- package/dist/templates/Admin/admin.stories.d.ts +13 -0
- package/dist/templates/Admin/template-admin.d.ts +8 -27
- package/dist/templates/Delegate/delegate.stories.d.ts +17 -0
- package/dist/templates/Delegate/template-delegate.d.ts +2 -2
- package/dist/templates/EmptyErrors/empty-errors.stories.d.ts +33 -0
- package/dist/templates/Experiments/brand-motion.stories.d.ts +10 -0
- package/dist/templates/Experiments/ideas.stories.d.ts +11 -0
- package/dist/templates/Flow/flow.stories.d.ts +14 -0
- package/dist/templates/Flow/template-flow.d.ts +8 -3
- package/dist/templates/Forms/form-builder-example.stories.d.ts +12 -0
- package/dist/templates/Maestro/maestro.stories.d.ts +12 -0
- package/dist/templates/Maestro/template-maestro.d.ts +6 -6
- package/dist/templates/Maestro/visualization.stories.d.ts +10 -0
- package/dist/templates/Studio/studio.stories.d.ts +13 -0
- package/dist/templates/Studio/template-studio.d.ts +102 -0
- package/dist/templates/VisualStudio/visual-studio.stories.d.ts +12 -0
- package/package.json +5 -3
- package/dist/src/foundation/Future/future-theme.css +0 -297
- package/dist/src/foundation/Future/legacy-theme.css +0 -184
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
StudioGrid: ()=>StudioGrid,
|
|
28
|
+
StudioCanvas: ()=>StudioCanvas,
|
|
29
|
+
StudioGridItem: ()=>StudioGridItem
|
|
30
|
+
});
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
34
|
+
const paddingClasses = {
|
|
35
|
+
none: '',
|
|
36
|
+
sm: 'p-4',
|
|
37
|
+
md: 'p-6',
|
|
38
|
+
lg: 'p-8'
|
|
39
|
+
};
|
|
40
|
+
const canvasBackgroundClasses = {
|
|
41
|
+
raised: 'bg-surface-raised',
|
|
42
|
+
surface: 'bg-surface',
|
|
43
|
+
transparent: 'bg-transparent'
|
|
44
|
+
};
|
|
45
|
+
function StudioCanvas({ children, className, padding = 'md', background = 'raised', fullWidth = false }) {
|
|
46
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
47
|
+
className: (0, index_cjs_namespaceObject.cn)('relative flex-1', canvasBackgroundClasses[background], className),
|
|
48
|
+
"data-canvas": true,
|
|
49
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
50
|
+
className: (0, index_cjs_namespaceObject.cn)('absolute inset-0 overflow-y-auto', paddingClasses[padding]),
|
|
51
|
+
children: fullWidth ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
52
|
+
className: "flex justify-center",
|
|
53
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
54
|
+
className: "w-[760px] max-w-full",
|
|
55
|
+
children: children
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const gridColsClasses = {
|
|
62
|
+
1: 'grid-cols-1',
|
|
63
|
+
2: 'grid-cols-2',
|
|
64
|
+
3: 'grid-cols-3',
|
|
65
|
+
4: 'grid-cols-4',
|
|
66
|
+
6: 'grid-cols-6',
|
|
67
|
+
12: 'grid-cols-12'
|
|
68
|
+
};
|
|
69
|
+
const gridGapClasses = {
|
|
70
|
+
none: '',
|
|
71
|
+
sm: 'gap-2',
|
|
72
|
+
md: 'gap-4',
|
|
73
|
+
lg: 'gap-6'
|
|
74
|
+
};
|
|
75
|
+
function StudioGrid({ children, cols = 12, gap = 'md', className }) {
|
|
76
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
77
|
+
className: (0, index_cjs_namespaceObject.cn)('grid', gridColsClasses[cols], gridGapClasses[gap], className),
|
|
78
|
+
children: children
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
const itemColSpanClasses = {
|
|
82
|
+
1: 'col-span-1',
|
|
83
|
+
2: 'col-span-2',
|
|
84
|
+
3: 'col-span-3',
|
|
85
|
+
4: 'col-span-4',
|
|
86
|
+
6: 'col-span-6',
|
|
87
|
+
12: 'col-span-12'
|
|
88
|
+
};
|
|
89
|
+
const itemBackgroundClasses = {
|
|
90
|
+
surface: 'bg-surface',
|
|
91
|
+
raised: 'bg-surface-raised',
|
|
92
|
+
transparent: 'bg-transparent'
|
|
93
|
+
};
|
|
94
|
+
function StudioGridItem({ children, cols = 12, className, background = 'surface', padding = 'md', border = true, canvasResponsive = false }) {
|
|
95
|
+
const [canvasWidth, setCanvasWidth] = external_react_namespaceObject.useState(0);
|
|
96
|
+
const itemRef = external_react_namespaceObject.useRef(null);
|
|
97
|
+
external_react_namespaceObject.useEffect(()=>{
|
|
98
|
+
if (!canvasResponsive) return;
|
|
99
|
+
const update = ()=>{
|
|
100
|
+
const canvas = itemRef.current?.closest('[data-canvas]');
|
|
101
|
+
if (canvas) setCanvasWidth(canvas.offsetWidth);
|
|
102
|
+
};
|
|
103
|
+
update();
|
|
104
|
+
window.addEventListener('resize', update);
|
|
105
|
+
const ro = new ResizeObserver(update);
|
|
106
|
+
const canvas = itemRef.current?.closest('[data-canvas]');
|
|
107
|
+
if (canvas) ro.observe(canvas);
|
|
108
|
+
return ()=>{
|
|
109
|
+
window.removeEventListener('resize', update);
|
|
110
|
+
ro.disconnect();
|
|
111
|
+
};
|
|
112
|
+
}, [
|
|
113
|
+
canvasResponsive
|
|
114
|
+
]);
|
|
115
|
+
const responsiveColClass = canvasResponsive ? canvasWidth < 768 ? 'col-span-12' : canvasWidth < 1024 ? 'col-span-6' : 'col-span-3' : itemColSpanClasses[cols];
|
|
116
|
+
const hasExplicitColSpan = className?.includes('col-span-');
|
|
117
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
118
|
+
ref: itemRef,
|
|
119
|
+
className: (0, index_cjs_namespaceObject.cn)(!hasExplicitColSpan && responsiveColClass, itemBackgroundClasses[background], paddingClasses[padding], border && 'rounded-lg border border-border-subtle', className),
|
|
120
|
+
children: children
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
exports.StudioCanvas = __webpack_exports__.StudioCanvas;
|
|
124
|
+
exports.StudioGrid = __webpack_exports__.StudioGrid;
|
|
125
|
+
exports.StudioGridItem = __webpack_exports__.StudioGridItem;
|
|
126
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
127
|
+
"StudioCanvas",
|
|
128
|
+
"StudioGrid",
|
|
129
|
+
"StudioGridItem"
|
|
130
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
131
|
+
Object.defineProperty(exports, '__esModule', {
|
|
132
|
+
value: true
|
|
133
|
+
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const paddingClasses: {
|
|
3
|
+
readonly none: "";
|
|
4
|
+
readonly sm: "p-4";
|
|
5
|
+
readonly md: "p-6";
|
|
6
|
+
readonly lg: "p-8";
|
|
7
|
+
};
|
|
8
|
+
type PaddingSize = keyof typeof paddingClasses;
|
|
9
|
+
export interface StudioCanvasProps {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Outer padding applied to the scrollable area.
|
|
14
|
+
* @default 'md' (1.5rem / 24px)
|
|
15
|
+
*/
|
|
16
|
+
padding?: PaddingSize;
|
|
17
|
+
/**
|
|
18
|
+
* Background of the canvas workspace.
|
|
19
|
+
* - `'raised'` — slightly elevated surface (default, differentiates from panels)
|
|
20
|
+
* - `'surface'` — base surface color
|
|
21
|
+
* - `'transparent'` — no background
|
|
22
|
+
*/
|
|
23
|
+
background?: 'raised' | 'surface' | 'transparent';
|
|
24
|
+
/**
|
|
25
|
+
* When true, content fills the full canvas width instead of being
|
|
26
|
+
* centered in a 760px column. Use for data-dense layouts like tables.
|
|
27
|
+
*/
|
|
28
|
+
fullWidth?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Center canvas for the Studio template.
|
|
32
|
+
*
|
|
33
|
+
* - Fills remaining horizontal space between panels (`flex-1 relative`)
|
|
34
|
+
* - Scrolls independently via `absolute inset-0 overflow-y-auto`
|
|
35
|
+
* - Centers content in a `w-[760px] max-w-full` column
|
|
36
|
+
* - `data-canvas` attribute allows `StudioGridItem` canvasResponsive tracking
|
|
37
|
+
*
|
|
38
|
+
* Usage:
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <StudioCanvas>
|
|
41
|
+
* <StudioGrid>
|
|
42
|
+
* <StudioGridItem>...</StudioGridItem>
|
|
43
|
+
* </StudioGrid>
|
|
44
|
+
* </StudioCanvas>
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function StudioCanvas({ children, className, padding, background, fullWidth, }: StudioCanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export interface StudioGridProps {
|
|
49
|
+
children: React.ReactNode;
|
|
50
|
+
/** Number of columns in the grid. Default 12. */
|
|
51
|
+
cols?: 1 | 2 | 3 | 4 | 6 | 12;
|
|
52
|
+
/** Gap between grid cells. Default 'md'. */
|
|
53
|
+
gap?: 'none' | 'sm' | 'md' | 'lg';
|
|
54
|
+
className?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Grid wrapper for use inside `StudioCanvas`.
|
|
58
|
+
*
|
|
59
|
+
* Defaults to a 12-column grid with md gap. Pair with `StudioGridItem`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function StudioGrid({ children, cols, gap, className }: StudioGridProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export interface StudioGridItemProps {
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Column span within the parent `StudioGrid`.
|
|
66
|
+
* Ignored if `className` already contains a `col-span-*` class,
|
|
67
|
+
* or if `canvasResponsive` is true (canvas width drives the span).
|
|
68
|
+
* @default 12
|
|
69
|
+
*/
|
|
70
|
+
cols?: 1 | 2 | 3 | 4 | 6 | 12;
|
|
71
|
+
className?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Background of the grid item card.
|
|
74
|
+
* - `'surface'` — base surface color (default, card-like)
|
|
75
|
+
* - `'raised'` — elevated surface
|
|
76
|
+
* - `'transparent'` — no background
|
|
77
|
+
*/
|
|
78
|
+
background?: 'surface' | 'raised' | 'transparent';
|
|
79
|
+
/** Padding inside the card. Default 'md'. */
|
|
80
|
+
padding?: PaddingSize;
|
|
81
|
+
/** Render a border and rounded corners around the card. Default true. */
|
|
82
|
+
border?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* When true, the item measures the nearest `[data-canvas]` ancestor width
|
|
85
|
+
* and overrides `cols` with a responsive span:
|
|
86
|
+
* - < 768px → col-span-12 (full width)
|
|
87
|
+
* - < 1024px → col-span-6 (half width)
|
|
88
|
+
* - ≥ 1024px → col-span-3 (quarter width)
|
|
89
|
+
*/
|
|
90
|
+
canvasResponsive?: boolean;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Grid cell for use inside `StudioGrid`.
|
|
94
|
+
*
|
|
95
|
+
* Renders a card-like container with configurable background, padding, and border.
|
|
96
|
+
* Set `canvasResponsive` to automatically resize based on the canvas width.
|
|
97
|
+
*/
|
|
98
|
+
export declare function StudioGridItem({ children, cols, className, background, padding, border, canvasResponsive, }: StudioGridItemProps): import("react/jsx-runtime").JSX.Element;
|
|
99
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { cn } from "../../lib/index.js";
|
|
4
|
+
const paddingClasses = {
|
|
5
|
+
none: '',
|
|
6
|
+
sm: 'p-4',
|
|
7
|
+
md: 'p-6',
|
|
8
|
+
lg: 'p-8'
|
|
9
|
+
};
|
|
10
|
+
const canvasBackgroundClasses = {
|
|
11
|
+
raised: 'bg-surface-raised',
|
|
12
|
+
surface: 'bg-surface',
|
|
13
|
+
transparent: 'bg-transparent'
|
|
14
|
+
};
|
|
15
|
+
function StudioCanvas({ children, className, padding = 'md', background = 'raised', fullWidth = false }) {
|
|
16
|
+
return /*#__PURE__*/ jsx("div", {
|
|
17
|
+
className: cn('relative flex-1', canvasBackgroundClasses[background], className),
|
|
18
|
+
"data-canvas": true,
|
|
19
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
20
|
+
className: cn('absolute inset-0 overflow-y-auto', paddingClasses[padding]),
|
|
21
|
+
children: fullWidth ? children : /*#__PURE__*/ jsx("div", {
|
|
22
|
+
className: "flex justify-center",
|
|
23
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
24
|
+
className: "w-[760px] max-w-full",
|
|
25
|
+
children: children
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const gridColsClasses = {
|
|
32
|
+
1: 'grid-cols-1',
|
|
33
|
+
2: 'grid-cols-2',
|
|
34
|
+
3: 'grid-cols-3',
|
|
35
|
+
4: 'grid-cols-4',
|
|
36
|
+
6: 'grid-cols-6',
|
|
37
|
+
12: 'grid-cols-12'
|
|
38
|
+
};
|
|
39
|
+
const gridGapClasses = {
|
|
40
|
+
none: '',
|
|
41
|
+
sm: 'gap-2',
|
|
42
|
+
md: 'gap-4',
|
|
43
|
+
lg: 'gap-6'
|
|
44
|
+
};
|
|
45
|
+
function StudioGrid({ children, cols = 12, gap = 'md', className }) {
|
|
46
|
+
return /*#__PURE__*/ jsx("div", {
|
|
47
|
+
className: cn('grid', gridColsClasses[cols], gridGapClasses[gap], className),
|
|
48
|
+
children: children
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
const itemColSpanClasses = {
|
|
52
|
+
1: 'col-span-1',
|
|
53
|
+
2: 'col-span-2',
|
|
54
|
+
3: 'col-span-3',
|
|
55
|
+
4: 'col-span-4',
|
|
56
|
+
6: 'col-span-6',
|
|
57
|
+
12: 'col-span-12'
|
|
58
|
+
};
|
|
59
|
+
const itemBackgroundClasses = {
|
|
60
|
+
surface: 'bg-surface',
|
|
61
|
+
raised: 'bg-surface-raised',
|
|
62
|
+
transparent: 'bg-transparent'
|
|
63
|
+
};
|
|
64
|
+
function StudioGridItem({ children, cols = 12, className, background = 'surface', padding = 'md', border = true, canvasResponsive = false }) {
|
|
65
|
+
const [canvasWidth, setCanvasWidth] = useState(0);
|
|
66
|
+
const itemRef = useRef(null);
|
|
67
|
+
useEffect(()=>{
|
|
68
|
+
if (!canvasResponsive) return;
|
|
69
|
+
const update = ()=>{
|
|
70
|
+
const canvas = itemRef.current?.closest('[data-canvas]');
|
|
71
|
+
if (canvas) setCanvasWidth(canvas.offsetWidth);
|
|
72
|
+
};
|
|
73
|
+
update();
|
|
74
|
+
window.addEventListener('resize', update);
|
|
75
|
+
const ro = new ResizeObserver(update);
|
|
76
|
+
const canvas = itemRef.current?.closest('[data-canvas]');
|
|
77
|
+
if (canvas) ro.observe(canvas);
|
|
78
|
+
return ()=>{
|
|
79
|
+
window.removeEventListener('resize', update);
|
|
80
|
+
ro.disconnect();
|
|
81
|
+
};
|
|
82
|
+
}, [
|
|
83
|
+
canvasResponsive
|
|
84
|
+
]);
|
|
85
|
+
const responsiveColClass = canvasResponsive ? canvasWidth < 768 ? 'col-span-12' : canvasWidth < 1024 ? 'col-span-6' : 'col-span-3' : itemColSpanClasses[cols];
|
|
86
|
+
const hasExplicitColSpan = className?.includes('col-span-');
|
|
87
|
+
return /*#__PURE__*/ jsx("div", {
|
|
88
|
+
ref: itemRef,
|
|
89
|
+
className: cn(!hasExplicitColSpan && responsiveColClass, itemBackgroundClasses[background], paddingClasses[padding], border && 'rounded-lg border border-border-subtle', className),
|
|
90
|
+
children: children
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
export { StudioCanvas, StudioGrid, StudioGridItem };
|
|
@@ -31,7 +31,7 @@ require("react");
|
|
|
31
31
|
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
32
32
|
function Canvas({ className, children }) {
|
|
33
33
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
34
|
-
className: (0, index_cjs_namespaceObject.cn)('flex flex-1 flex-col overflow-auto bg-
|
|
34
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-1 flex-col overflow-auto bg-surface', className),
|
|
35
35
|
children: children
|
|
36
36
|
});
|
|
37
37
|
}
|
|
@@ -3,7 +3,7 @@ import "react";
|
|
|
3
3
|
import { cn } from "../../lib/index.js";
|
|
4
4
|
function Canvas({ className, children }) {
|
|
5
5
|
return /*#__PURE__*/ jsx("div", {
|
|
6
|
-
className: cn('flex flex-1 flex-col overflow-auto bg-
|
|
6
|
+
className: cn('flex flex-1 flex-col overflow-auto bg-surface', className),
|
|
7
7
|
children: children
|
|
8
8
|
});
|
|
9
9
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Canvas } from './canvas';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Canvas;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
@@ -45,12 +45,12 @@ function ChatComposer({ className, placeholder = 'I would like you to automate m
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
48
|
-
className: (0, index_cjs_namespaceObject.cn)('w-full max-w-[800px] rounded-[32px] bg-gradient-to-b from-
|
|
48
|
+
className: (0, index_cjs_namespaceObject.cn)('w-full max-w-[800px] rounded-[32px] bg-gradient-to-b from-surface to-surface-raised p-2', className),
|
|
49
49
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
50
|
-
className: "flex min-h-[124px] flex-col justify-between rounded-3xl border border-
|
|
50
|
+
className: "flex min-h-[124px] flex-col justify-between rounded-3xl border border-border bg-surface-overlay pb-3 pl-4 pr-3 pt-4",
|
|
51
51
|
children: [
|
|
52
52
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("textarea", {
|
|
53
|
-
className: "w-full resize-none bg-transparent text-base font-medium leading-5 text-
|
|
53
|
+
className: "w-full resize-none bg-transparent text-base font-medium leading-5 text-foreground placeholder:text-foreground-subtle focus:outline-none",
|
|
54
54
|
placeholder: placeholder,
|
|
55
55
|
rows: 2,
|
|
56
56
|
value: value,
|
|
@@ -65,29 +65,29 @@ function ChatComposer({ className, placeholder = 'I would like you to automate m
|
|
|
65
65
|
children: [
|
|
66
66
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
67
67
|
type: "button",
|
|
68
|
-
className: "flex h-8 w-8 items-center justify-center rounded-2xl border border-
|
|
68
|
+
className: "flex h-8 w-8 items-center justify-center rounded-2xl border border-border-inverse bg-surface-inverse transition-opacity hover:opacity-80",
|
|
69
69
|
"aria-label": "Add attachment",
|
|
70
70
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
|
|
71
|
-
className: "h-5 w-5 text-
|
|
71
|
+
className: "h-5 w-5 text-foreground-inverse"
|
|
72
72
|
})
|
|
73
73
|
}),
|
|
74
74
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
75
75
|
type: "button",
|
|
76
|
-
className: "flex h-8 w-8 items-center justify-center rounded-2xl border border-
|
|
76
|
+
className: "flex h-8 w-8 items-center justify-center rounded-2xl border border-border-inverse bg-surface-inverse transition-opacity hover:opacity-80",
|
|
77
77
|
"aria-label": "Add workflow",
|
|
78
78
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Workflow, {
|
|
79
|
-
className: "h-5 w-5 text-
|
|
79
|
+
className: "h-5 w-5 text-foreground-inverse"
|
|
80
80
|
})
|
|
81
81
|
})
|
|
82
82
|
]
|
|
83
83
|
}),
|
|
84
84
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
85
85
|
type: "button",
|
|
86
|
-
className: "flex h-8 w-8 items-center justify-center rounded-2xl bg-
|
|
86
|
+
className: "flex h-8 w-8 items-center justify-center rounded-2xl bg-brand transition-opacity hover:opacity-90",
|
|
87
87
|
onClick: handleSubmit,
|
|
88
88
|
"aria-label": "Submit message",
|
|
89
89
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CornerDownLeft, {
|
|
90
|
-
className: "h-5 w-5 -scale-y-100 rotate-90 text-
|
|
90
|
+
className: "h-5 w-5 -scale-y-100 rotate-90 text-foreground-on-accent"
|
|
91
91
|
})
|
|
92
92
|
})
|
|
93
93
|
]
|
|
@@ -17,12 +17,12 @@ function ChatComposer({ className, placeholder = 'I would like you to automate m
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
return /*#__PURE__*/ jsx("div", {
|
|
20
|
-
className: cn('w-full max-w-[800px] rounded-[32px] bg-gradient-to-b from-
|
|
20
|
+
className: cn('w-full max-w-[800px] rounded-[32px] bg-gradient-to-b from-surface to-surface-raised p-2', className),
|
|
21
21
|
children: /*#__PURE__*/ jsxs("div", {
|
|
22
|
-
className: "flex min-h-[124px] flex-col justify-between rounded-3xl border border-
|
|
22
|
+
className: "flex min-h-[124px] flex-col justify-between rounded-3xl border border-border bg-surface-overlay pb-3 pl-4 pr-3 pt-4",
|
|
23
23
|
children: [
|
|
24
24
|
/*#__PURE__*/ jsx("textarea", {
|
|
25
|
-
className: "w-full resize-none bg-transparent text-base font-medium leading-5 text-
|
|
25
|
+
className: "w-full resize-none bg-transparent text-base font-medium leading-5 text-foreground placeholder:text-foreground-subtle focus:outline-none",
|
|
26
26
|
placeholder: placeholder,
|
|
27
27
|
rows: 2,
|
|
28
28
|
value: value,
|
|
@@ -37,29 +37,29 @@ function ChatComposer({ className, placeholder = 'I would like you to automate m
|
|
|
37
37
|
children: [
|
|
38
38
|
/*#__PURE__*/ jsx("button", {
|
|
39
39
|
type: "button",
|
|
40
|
-
className: "flex h-8 w-8 items-center justify-center rounded-2xl border border-
|
|
40
|
+
className: "flex h-8 w-8 items-center justify-center rounded-2xl border border-border-inverse bg-surface-inverse transition-opacity hover:opacity-80",
|
|
41
41
|
"aria-label": "Add attachment",
|
|
42
42
|
children: /*#__PURE__*/ jsx(Plus, {
|
|
43
|
-
className: "h-5 w-5 text-
|
|
43
|
+
className: "h-5 w-5 text-foreground-inverse"
|
|
44
44
|
})
|
|
45
45
|
}),
|
|
46
46
|
/*#__PURE__*/ jsx("button", {
|
|
47
47
|
type: "button",
|
|
48
|
-
className: "flex h-8 w-8 items-center justify-center rounded-2xl border border-
|
|
48
|
+
className: "flex h-8 w-8 items-center justify-center rounded-2xl border border-border-inverse bg-surface-inverse transition-opacity hover:opacity-80",
|
|
49
49
|
"aria-label": "Add workflow",
|
|
50
50
|
children: /*#__PURE__*/ jsx(Workflow, {
|
|
51
|
-
className: "h-5 w-5 text-
|
|
51
|
+
className: "h-5 w-5 text-foreground-inverse"
|
|
52
52
|
})
|
|
53
53
|
})
|
|
54
54
|
]
|
|
55
55
|
}),
|
|
56
56
|
/*#__PURE__*/ jsx("button", {
|
|
57
57
|
type: "button",
|
|
58
|
-
className: "flex h-8 w-8 items-center justify-center rounded-2xl bg-
|
|
58
|
+
className: "flex h-8 w-8 items-center justify-center rounded-2xl bg-brand transition-opacity hover:opacity-90",
|
|
59
59
|
onClick: handleSubmit,
|
|
60
60
|
"aria-label": "Submit message",
|
|
61
61
|
children: /*#__PURE__*/ jsx(CornerDownLeft, {
|
|
62
|
-
className: "h-5 w-5 -scale-y-100 rotate-90 text-
|
|
62
|
+
className: "h-5 w-5 -scale-y-100 rotate-90 text-foreground-on-accent"
|
|
63
63
|
})
|
|
64
64
|
})
|
|
65
65
|
]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ChatComposer } from './chat-composer';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ChatComposer;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
@@ -53,14 +53,14 @@ function ChatFirstExperience({ className, userName = 'David', subtitle = 'What s
|
|
|
53
53
|
className: "flex flex-col items-center text-center",
|
|
54
54
|
children: [
|
|
55
55
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("h1", {
|
|
56
|
-
className: "text-[40px] font-bold leading-9 tracking-[-0.8px] text-
|
|
56
|
+
className: "text-[40px] font-bold leading-9 tracking-[-0.8px] text-foreground",
|
|
57
57
|
children: [
|
|
58
58
|
"Hello ",
|
|
59
59
|
userName
|
|
60
60
|
]
|
|
61
61
|
}),
|
|
62
62
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
63
|
-
className: "mt-1 text-base font-normal leading-9 text-
|
|
63
|
+
className: "mt-1 text-base font-normal leading-9 text-foreground-secondary",
|
|
64
64
|
children: subtitle
|
|
65
65
|
})
|
|
66
66
|
]
|
|
@@ -25,14 +25,14 @@ function ChatFirstExperience({ className, userName = 'David', subtitle = 'What s
|
|
|
25
25
|
className: "flex flex-col items-center text-center",
|
|
26
26
|
children: [
|
|
27
27
|
/*#__PURE__*/ jsxs("h1", {
|
|
28
|
-
className: "text-[40px] font-bold leading-9 tracking-[-0.8px] text-
|
|
28
|
+
className: "text-[40px] font-bold leading-9 tracking-[-0.8px] text-foreground",
|
|
29
29
|
children: [
|
|
30
30
|
"Hello ",
|
|
31
31
|
userName
|
|
32
32
|
]
|
|
33
33
|
}),
|
|
34
34
|
/*#__PURE__*/ jsx("p", {
|
|
35
|
-
className: "mt-1 text-base font-normal leading-9 text-
|
|
35
|
+
className: "mt-1 text-base font-normal leading-9 text-foreground-secondary",
|
|
36
36
|
children: subtitle
|
|
37
37
|
})
|
|
38
38
|
]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ChatFirstExperience } from './chat-first-experience';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ChatFirstExperience;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
@@ -33,7 +33,8 @@ function PromptSuggestions({ className, suggestions = [], onSelect }) {
|
|
|
33
33
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
34
34
|
className: (0, index_cjs_namespaceObject.cn)('flex flex-col items-start gap-2', className),
|
|
35
35
|
children: suggestions.map((suggestion)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
36
|
-
|
|
36
|
+
type: "button",
|
|
37
|
+
className: "flex h-10 items-center rounded-xl border border-border bg-surface-overlay px-4 py-2.5 text-sm font-medium leading-5 text-foreground transition-colors hover:bg-surface-hover",
|
|
37
38
|
onClick: ()=>onSelect?.(suggestion),
|
|
38
39
|
children: suggestion.label
|
|
39
40
|
}, suggestion.id))
|
|
@@ -5,7 +5,8 @@ function PromptSuggestions({ className, suggestions = [], onSelect }) {
|
|
|
5
5
|
return /*#__PURE__*/ jsx("div", {
|
|
6
6
|
className: cn('flex flex-col items-start gap-2', className),
|
|
7
7
|
children: suggestions.map((suggestion)=>/*#__PURE__*/ jsx("button", {
|
|
8
|
-
|
|
8
|
+
type: "button",
|
|
9
|
+
className: "flex h-10 items-center rounded-xl border border-border bg-surface-overlay px-4 py-2.5 text-sm font-medium leading-5 text-foreground transition-colors hover:bg-surface-hover",
|
|
9
10
|
onClick: ()=>onSelect?.(suggestion),
|
|
10
11
|
children: suggestion.label
|
|
11
12
|
}, suggestion.id))
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { PromptSuggestions } from './chat-prompt-suggestions';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof PromptSuggestions;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|