@orcestr/ui 0.0.1 → 0.1.0
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/README.md +4 -0
- package/README.ru.md +4 -0
- package/dist/components/Alert/Alert.d.ts +5 -4
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +5 -2
- package/dist/components/AppShell/AppShell.d.ts +2 -0
- package/dist/components/AppShell/AppShell.d.ts.map +1 -1
- package/dist/components/AppShell/AppShell.js +9 -6
- package/dist/components/AppSidebar/AppSidebar.d.ts +36 -0
- package/dist/components/AppSidebar/AppSidebar.d.ts.map +1 -0
- package/dist/components/AppSidebar/AppSidebar.js +53 -0
- package/dist/components/Badge/Badge.d.ts +8 -6
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +4 -4
- package/dist/components/BadgeSelectMenu/BadgeSelectMenu.d.ts +22 -0
- package/dist/components/BadgeSelectMenu/BadgeSelectMenu.d.ts.map +1 -0
- package/dist/components/BadgeSelectMenu/BadgeSelectMenu.js +50 -0
- package/dist/components/Box/Box.d.ts +2 -0
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/Box.js +15 -2
- package/dist/components/Button/Button.d.ts +7 -3
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +23 -3
- package/dist/components/Card/Card.d.ts +26 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/Card.js +25 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -2
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +13 -4
- package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.js +10 -9
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.js +5 -2
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +2 -2
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +9 -1
- package/dist/components/Dialog/Dialog.d.ts +69 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +48 -1
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/EntityPicker/EntityPicker.d.ts +2 -1
- package/dist/components/EntityPicker/EntityPicker.d.ts.map +1 -1
- package/dist/components/EntityPicker/EntityPicker.js +2 -2
- package/dist/components/Flex/Flex.d.ts +5 -1
- package/dist/components/Flex/Flex.d.ts.map +1 -1
- package/dist/components/Flex/Flex.js +16 -3
- package/dist/components/Grid/Grid.d.ts +9 -2
- package/dist/components/Grid/Grid.d.ts.map +1 -1
- package/dist/components/Grid/Grid.js +22 -1
- package/dist/components/IconButton/IconButton.d.ts +19 -7
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.js +40 -5
- package/dist/components/IconTextButton/IconTextButton.d.ts +20 -0
- package/dist/components/IconTextButton/IconTextButton.d.ts.map +1 -0
- package/dist/components/IconTextButton/IconTextButton.js +24 -0
- package/dist/components/InlineEdit/InlineEdit.d.ts +63 -0
- package/dist/components/InlineEdit/InlineEdit.d.ts.map +1 -0
- package/dist/components/InlineEdit/InlineEdit.js +98 -0
- package/dist/components/LinkButton/LinkButton.d.ts +25 -0
- package/dist/components/LinkButton/LinkButton.d.ts.map +1 -0
- package/dist/components/LinkButton/LinkButton.js +12 -0
- package/dist/components/Modal/Modal.d.ts +29 -6
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +37 -13
- package/dist/components/Overlay/OverlayProvider.d.ts +1 -0
- package/dist/components/Overlay/OverlayProvider.d.ts.map +1 -1
- package/dist/components/Overlay/OverlayProvider.js +18 -1
- package/dist/components/PaginatedCombobox/PaginatedCombobox.d.ts +2 -1
- package/dist/components/PaginatedCombobox/PaginatedCombobox.d.ts.map +1 -1
- package/dist/components/PaginatedCombobox/PaginatedCombobox.js +3 -3
- package/dist/components/Popover/Popover.d.ts +37 -3
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/Popover.js +56 -9
- package/dist/components/ScrollArea/ScrollArea.d.ts +4 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.js +30 -4
- package/dist/components/Section/Section.d.ts +2 -0
- package/dist/components/Section/Section.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +24 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +28 -2
- package/dist/components/Select/Select.d.ts +36 -4
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +70 -3
- package/dist/components/Separator/Separator.d.ts +3 -1
- package/dist/components/Separator/Separator.d.ts.map +1 -1
- package/dist/components/Separator/Separator.js +4 -2
- package/dist/components/SpecialModal/SpecialModal.d.ts +43 -0
- package/dist/components/SpecialModal/SpecialModal.d.ts.map +1 -0
- package/dist/components/SpecialModal/SpecialModal.js +34 -0
- package/dist/components/Spinner/Spinner.d.ts +3 -1
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/State/State.d.ts +8 -1
- package/dist/components/State/State.d.ts.map +1 -1
- package/dist/components/State/State.js +2 -2
- package/dist/components/Switch/Switch.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.js +2 -1
- package/dist/components/Table/Table.d.ts +64 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/Table.js +38 -0
- package/dist/components/Tabs/Tabs.d.ts +33 -2
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +189 -4
- package/dist/components/Text/Text.d.ts +13 -3
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +16 -3
- package/dist/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TextField/TextField.d.ts.map +1 -1
- package/dist/components/TextField/TextField.js +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +19 -8
- package/dist/components/Tooltip/Tooltip.d.ts +11 -3
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +58 -9
- package/dist/example/CodePreview.d.ts.map +1 -1
- package/dist/example/CodePreview.js +3 -3
- package/dist/example/ExampleActionsSection.d.ts.map +1 -1
- package/dist/example/ExampleActionsSection.js +3 -3
- package/dist/example/ExampleApplicationSection.d.ts +7 -0
- package/dist/example/ExampleApplicationSection.d.ts.map +1 -0
- package/dist/example/ExampleApplicationSection.js +68 -0
- package/dist/example/ExampleBasicsSections.d.ts.map +1 -1
- package/dist/example/ExampleBasicsSections.js +5 -9
- package/dist/example/ExampleDataSection.d.ts.map +1 -1
- package/dist/example/ExampleDataSection.js +31 -30
- package/dist/example/ExampleFieldsSection.d.ts.map +1 -1
- package/dist/example/ExampleFieldsSection.js +51 -3
- package/dist/example/ExampleFoundationsSection.js +1 -1
- package/dist/example/ExampleOverlays.d.ts.map +1 -1
- package/dist/example/ExampleOverlays.js +7 -2
- package/dist/example/ExampleOverlaysSection.d.ts.map +1 -1
- package/dist/example/ExampleOverlaysSection.js +5 -2
- package/dist/example/ExampleSelectionSection.d.ts +3 -1
- package/dist/example/ExampleSelectionSection.d.ts.map +1 -1
- package/dist/example/ExampleSelectionSection.js +10 -3
- package/dist/example/ExampleStateSection.d.ts +3 -0
- package/dist/example/ExampleStateSection.d.ts.map +1 -1
- package/dist/example/ExampleStateSection.js +58 -3
- package/dist/example/ExampleThemePlayground.d.ts +101 -71
- package/dist/example/ExampleThemePlayground.d.ts.map +1 -1
- package/dist/example/ExampleThemePlayground.js +137 -74
- package/dist/example/UiExamplePage.d.ts +7 -1
- package/dist/example/UiExamplePage.d.ts.map +1 -1
- package/dist/example/UiExamplePage.js +72 -27
- package/dist/example/codeSamples.d.ts +7 -0
- package/dist/example/codeSamples.d.ts.map +1 -1
- package/dist/example/codeSamples.js +429 -60
- package/dist/example/exampleData.d.ts.map +1 -1
- package/dist/example/exampleData.js +16 -2
- package/dist/example/styles.css +245 -74
- package/dist/hooks/useFloatingPosition.js +1 -1
- package/dist/hooks/usePresence.d.ts.map +1 -1
- package/dist/hooks/usePresence.js +9 -7
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/styles/orcestr-ui.css +2545 -672
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.js +90 -36
- package/dist/theme/defaultTheme.d.ts.map +1 -1
- package/dist/theme/defaultTheme.js +322 -194
- package/dist/theme/systemProps.d.ts +48 -28
- package/dist/theme/systemProps.d.ts.map +1 -1
- package/dist/theme/systemProps.js +103 -1
- package/dist/theme/themeTypes.d.ts +21 -17
- package/dist/theme/themeTypes.d.ts.map +1 -1
- package/dist/utils/slot.d.ts +11 -0
- package/dist/utils/slot.d.ts.map +1 -0
- package/dist/utils/slot.js +18 -0
- package/package.json +2 -2
- package/dist/components/Workflow/Workflow.d.ts +0 -82
- package/dist/components/Workflow/Workflow.d.ts.map +0 -1
- package/dist/components/Workflow/Workflow.js +0 -73
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { LuArrowRight, LuCheck, LuCircleAlert, LuRefreshCw } from 'react-icons/lu';
|
|
4
|
-
import { cn } from '../../utils/cn';
|
|
5
|
-
import { Alert } from '../Alert/Alert';
|
|
6
|
-
import { Badge } from '../Badge/Badge';
|
|
7
|
-
import { Button } from '../Button/Button';
|
|
8
|
-
import { Skeleton } from '../Skeleton/Skeleton';
|
|
9
|
-
import { Tooltip } from '../Tooltip/Tooltip';
|
|
10
|
-
export function StatusBadge({ children, tone = 'neutral', size = 2, testId }) {
|
|
11
|
-
return (_jsx(Badge, { tone: tone, size: size, testId: testId, children: children }));
|
|
12
|
-
}
|
|
13
|
-
export function Timeline({ items, className, testId, ...props }) {
|
|
14
|
-
return (_jsx("ol", { className: cn('oui-timeline', className), "data-testid": testId, ...props, children: items.map((item) => (_jsxs("li", { className: 'oui-timeline-item', "data-tone": item.tone ?? 'neutral', children: [_jsx("span", { className: 'oui-timeline-marker', children: item.icon }), _jsxs("div", { className: 'oui-timeline-content', children: [_jsxs("div", { className: 'oui-timeline-title-row', children: [_jsx("strong", { children: item.title }), item.meta ? _jsx("span", { children: item.meta }) : null] }), item.description ? _jsx("p", { children: item.description }) : null] })] }, item.key))) }));
|
|
15
|
-
}
|
|
16
|
-
export function Pipeline({ steps, loading = false, loadingSteps = 5, disabled = false, className, testId, ...props }) {
|
|
17
|
-
if (loading) {
|
|
18
|
-
return (_jsx("div", { className: cn('oui-pipeline', className), "data-testid": testId, ...props, children: Array.from({ length: loadingSteps }).map((_, index) => (_jsxs("div", { className: 'oui-pipeline-step', "data-loading": 'true', children: [_jsx(Skeleton, { w: 16, h: 16, r: 7 }), _jsxs("span", { className: 'oui-pipeline-step-main', children: [_jsx(Skeleton, { w: '70%', h: 14 }), _jsx(Skeleton, { w: '46%', h: 12 })] })] }, index))) }));
|
|
19
|
-
}
|
|
20
|
-
return (_jsx("div", { className: cn('oui-pipeline', className), "data-testid": testId, ...props, children: (steps ?? []).map((step) => (_jsx(PipelineStepView, { step: step, disabled: disabled }, step.key))) }));
|
|
21
|
-
}
|
|
22
|
-
export function WorkflowSummaryBar({ items, className, testId, }) {
|
|
23
|
-
return (_jsx("div", { className: cn('oui-workflow-summary', className), "data-testid": testId, children: items.map((item) => (_jsxs(StatusBadge, { tone: item.tone ?? 'neutral', children: [item.label, item.value !== undefined ? _jsx("strong", { children: item.value }) : null] }, item.key))) }));
|
|
24
|
-
}
|
|
25
|
-
export function LifecycleBlockReasonCallout({ reason, }) {
|
|
26
|
-
return (_jsx(Alert, { tone: reason.tone ?? 'warning', title: reason.title, icon: _jsx(LuCircleAlert, {}), action: reason.onAction ? (_jsx(Button, { size: 1, v: 'surface', tone: reason.tone ?? 'warning', onClick: reason.onAction, children: reason.actionLabel })) : null, children: reason.message }));
|
|
27
|
-
}
|
|
28
|
-
export function LifecycleActionPanel({ title, meta, reasons = [], actions, className, testId, }) {
|
|
29
|
-
return (_jsxs("div", { className: cn('oui-lifecycle-panel', className), "data-testid": testId, children: [title || meta ? (_jsxs("div", { className: 'oui-lifecycle-panel-head', children: [title ? _jsx("strong", { children: title }) : null, meta ? _jsx("span", { children: meta }) : null] })) : null, reasons.length ? (_jsx("div", { className: 'oui-lifecycle-reasons', children: reasons.map((reason) => (_jsx(LifecycleBlockReasonCallout, { reason: reason }, reason.key))) })) : null, _jsx("div", { className: 'oui-lifecycle-panel-actions', children: actions.map((action) => (_jsx(LifecycleActionButton, { action: action }, action.key))) })] }));
|
|
30
|
-
}
|
|
31
|
-
function PipelineStepView({ step, disabled, }) {
|
|
32
|
-
const status = pipelineStepStatus(step);
|
|
33
|
-
const label = step.label ?? step.title;
|
|
34
|
-
const isDisabled = disabled || step.disabled || !step.onSelect || step.loading;
|
|
35
|
-
const content = (_jsxs("button", { type: 'button', className: 'oui-pipeline-step', "data-tone": step.tone ?? workflowStatusTone(status), "data-status": status, "data-active": status === 'active' ? 'true' : undefined, "data-complete": status === 'done' ? 'true' : undefined, "data-clickable": !isDisabled ? 'true' : undefined, disabled: isDisabled, onClick: step.onSelect, children: [_jsx("span", { className: 'oui-pipeline-dot', children: workflowStatusIcon(status) }), _jsxs("span", { className: 'oui-pipeline-step-main', children: [_jsx("span", { className: 'oui-pipeline-label', children: label }), step.detail ? _jsx("span", { className: 'oui-pipeline-detail', children: step.detail }) : null, step.description ? (_jsx("span", { className: 'oui-pipeline-description', children: step.description })) : null] }), step.meta ? _jsx("span", { className: 'oui-pipeline-meta', children: step.meta }) : null] }));
|
|
36
|
-
const tooltip = step.tooltip ?? step.disabledReason;
|
|
37
|
-
if (!tooltip)
|
|
38
|
-
return content;
|
|
39
|
-
return (_jsx(Tooltip, { content: tooltip, children: _jsx("span", { className: 'oui-pipeline-tooltip-wrap', children: content }) }));
|
|
40
|
-
}
|
|
41
|
-
function LifecycleActionButton({ action }) {
|
|
42
|
-
const button = (_jsx(Button, { size: 1, v: 'surface', tone: action.tone, disabled: action.disabled, loading: action.loading, leftIcon: action.icon, onClick: action.onSelect, children: action.label }));
|
|
43
|
-
if (!action.disabledReason)
|
|
44
|
-
return button;
|
|
45
|
-
return (_jsx(Tooltip, { content: action.disabledReason, children: _jsx("span", { className: 'oui-lifecycle-action-tooltip-wrap', children: button }) }));
|
|
46
|
-
}
|
|
47
|
-
function pipelineStepStatus(step) {
|
|
48
|
-
if (step.status)
|
|
49
|
-
return step.status;
|
|
50
|
-
if (step.complete)
|
|
51
|
-
return 'done';
|
|
52
|
-
if (step.active)
|
|
53
|
-
return 'active';
|
|
54
|
-
return 'pending';
|
|
55
|
-
}
|
|
56
|
-
function workflowStatusTone(status) {
|
|
57
|
-
if (status === 'done')
|
|
58
|
-
return 'success';
|
|
59
|
-
if (status === 'active' || status === 'processing')
|
|
60
|
-
return 'info';
|
|
61
|
-
if (status === 'blocked')
|
|
62
|
-
return 'warning';
|
|
63
|
-
if (status === 'error')
|
|
64
|
-
return 'danger';
|
|
65
|
-
return 'neutral';
|
|
66
|
-
}
|
|
67
|
-
function workflowStatusIcon(status) {
|
|
68
|
-
if (status === 'done')
|
|
69
|
-
return _jsx(LuCheck, { "aria-hidden": true });
|
|
70
|
-
if (status === 'active' || status === 'processing')
|
|
71
|
-
return _jsx(LuRefreshCw, { "aria-hidden": true });
|
|
72
|
-
return _jsx(LuArrowRight, { "aria-hidden": true });
|
|
73
|
-
}
|