@orcestr/ui 0.0.3 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +13 -0
- package/dist/components/AppShell/AppShell.d.ts.map +1 -1
- package/dist/components/AppShell/AppShell.js +14 -9
- 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 +117 -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/Collapse/Collapse.d.ts.map +1 -1
- package/dist/components/Collapse/Collapse.js +5 -25
- 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/CopyButton/CopyButton.d.ts +24 -0
- package/dist/components/CopyButton/CopyButton.d.ts.map +1 -0
- package/dist/components/CopyButton/CopyButton.js +81 -0
- 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 +2 -1
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.js +4 -4
- 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 +201 -5
- 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 -4
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +72 -37
- 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 +2 -1
- package/dist/example/CodePreview.d.ts.map +1 -1
- package/dist/example/CodePreview.js +16 -51
- 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 +88 -0
- package/dist/example/ExampleBasicsSections.d.ts +1 -1
- package/dist/example/ExampleBasicsSections.d.ts.map +1 -1
- package/dist/example/ExampleBasicsSections.js +15 -13
- 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 +20 -30
- 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 +65 -9
- package/dist/example/ExampleThemePlayground.d.ts +84 -54
- package/dist/example/ExampleThemePlayground.d.ts.map +1 -1
- package/dist/example/ExampleThemePlayground.js +129 -63
- package/dist/example/UiExamplePage.d.ts.map +1 -1
- package/dist/example/UiExamplePage.js +39 -19
- package/dist/example/codeSamples.d.ts +8 -1
- package/dist/example/codeSamples.d.ts.map +1 -1
- package/dist/example/codeSamples.js +590 -119
- package/dist/example/exampleData.d.ts.map +1 -1
- package/dist/example/exampleData.js +18 -10
- package/dist/example/styles.css +277 -146
- 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 +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/styles/orcestr-ui.css +3002 -872
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.js +109 -53
- package/dist/theme/defaultTheme.d.ts.map +1 -1
- package/dist/theme/defaultTheme.js +356 -223
- 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 +44 -35
- 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 +4 -1
- 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,46 +1,65 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
2
|
+
export type SemanticTone = 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
|
|
3
|
+
export type ColorTone = 'blue' | 'sky' | 'cyan' | 'teal' | 'indigo' | 'violet' | 'purple' | 'iris' | 'green' | 'jade' | 'mint' | 'grass' | 'lime' | 'yellow' | 'amber' | 'orange' | 'brown' | 'red' | 'ruby' | 'crimson' | 'pink' | 'tomato';
|
|
4
|
+
export type Tone = SemanticTone | ColorTone;
|
|
5
|
+
export type ToneInput = Tone | 'muted' | 'gray' | 'mauve' | 'slate' | 'sage' | 'olive' | 'sand' | 'blue' | 'sky' | 'cyan' | 'teal' | 'indigo' | 'violet' | 'purple' | 'iris' | 'green' | 'jade' | 'mint' | 'grass' | 'lime' | 'yellow' | 'amber' | 'orange' | 'brown' | 'red' | 'ruby' | 'crimson' | 'pink' | 'tomato' | (string & {});
|
|
6
|
+
export type UiSize = 1 | 2 | 3 | 4 | '1' | '2' | '3' | '4';
|
|
4
7
|
export type RadiusScale = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
5
|
-
export type AlignShort = 's' | 'c' | 'e' | 'st' | 'b';
|
|
6
|
-
export type JustifyShort = 's' | 'c' | 'e' | 'sb' | 'sa' | 'se';
|
|
8
|
+
export type AlignShort = 's' | 'c' | 'e' | 'st' | 'b' | 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
9
|
+
export type JustifyShort = 's' | 'c' | 'e' | 'sb' | 'sa' | 'se' | 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
10
|
+
export type ResponsiveValue<T> = T | {
|
|
11
|
+
initial?: T;
|
|
12
|
+
sm?: T;
|
|
13
|
+
md?: T;
|
|
14
|
+
lg?: T;
|
|
15
|
+
xl?: T;
|
|
16
|
+
};
|
|
7
17
|
export type SystemProps = {
|
|
8
|
-
m?: number | string
|
|
9
|
-
mt?: number | string
|
|
10
|
-
mr?: number | string
|
|
11
|
-
mb?: number | string
|
|
12
|
-
ml?: number | string
|
|
13
|
-
mx?: number | string
|
|
14
|
-
my?: number | string
|
|
15
|
-
p?: number | string
|
|
16
|
-
pt?: number | string
|
|
17
|
-
pr?: number | string
|
|
18
|
-
pb?: number | string
|
|
19
|
-
pl?: number | string
|
|
20
|
-
px?: number | string
|
|
21
|
-
py?: number | string
|
|
22
|
-
g?: number | string
|
|
23
|
-
w?: number | string
|
|
24
|
-
minW?: number | string
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
m?: ResponsiveValue<number | string>;
|
|
19
|
+
mt?: ResponsiveValue<number | string>;
|
|
20
|
+
mr?: ResponsiveValue<number | string>;
|
|
21
|
+
mb?: ResponsiveValue<number | string>;
|
|
22
|
+
ml?: ResponsiveValue<number | string>;
|
|
23
|
+
mx?: ResponsiveValue<number | string>;
|
|
24
|
+
my?: ResponsiveValue<number | string>;
|
|
25
|
+
p?: ResponsiveValue<number | string>;
|
|
26
|
+
pt?: ResponsiveValue<number | string>;
|
|
27
|
+
pr?: ResponsiveValue<number | string>;
|
|
28
|
+
pb?: ResponsiveValue<number | string>;
|
|
29
|
+
pl?: ResponsiveValue<number | string>;
|
|
30
|
+
px?: ResponsiveValue<number | string>;
|
|
31
|
+
py?: ResponsiveValue<number | string>;
|
|
32
|
+
g?: ResponsiveValue<number | string>;
|
|
33
|
+
w?: ResponsiveValue<number | string>;
|
|
34
|
+
minW?: ResponsiveValue<number | string>;
|
|
35
|
+
minWidth?: ResponsiveValue<number | string>;
|
|
36
|
+
maxW?: ResponsiveValue<number | string>;
|
|
37
|
+
maxWidth?: ResponsiveValue<number | string>;
|
|
38
|
+
size?: ResponsiveValue<number | string>;
|
|
39
|
+
h?: ResponsiveValue<number | string>;
|
|
40
|
+
minH?: ResponsiveValue<number | string>;
|
|
41
|
+
minHeight?: ResponsiveValue<number | string>;
|
|
42
|
+
maxH?: ResponsiveValue<number | string>;
|
|
43
|
+
maxHeight?: ResponsiveValue<number | string>;
|
|
30
44
|
display?: CSSProperties['display'];
|
|
31
45
|
position?: CSSProperties['position'];
|
|
32
46
|
overflow?: CSSProperties['overflow'];
|
|
33
47
|
flex?: CSSProperties['flex'];
|
|
48
|
+
flexGrow?: CSSProperties['flexGrow'];
|
|
49
|
+
flexShrink?: CSSProperties['flexShrink'];
|
|
50
|
+
flexBasis?: CSSProperties['flexBasis'];
|
|
51
|
+
alignSelf?: CSSProperties['alignSelf'];
|
|
34
52
|
a?: AlignShort;
|
|
35
53
|
j?: JustifyShort;
|
|
36
54
|
row?: boolean;
|
|
37
55
|
col?: boolean;
|
|
56
|
+
direction?: CSSProperties['flexDirection'];
|
|
38
57
|
wrap?: boolean;
|
|
39
58
|
nowrap?: boolean;
|
|
40
59
|
inline?: boolean;
|
|
41
|
-
fs?: number | string
|
|
60
|
+
fs?: ResponsiveValue<number | string>;
|
|
42
61
|
fw?: CSSProperties['fontWeight'];
|
|
43
|
-
lh?: number | string
|
|
62
|
+
lh?: ResponsiveValue<number | string>;
|
|
44
63
|
ta?: CSSProperties['textAlign'];
|
|
45
64
|
color?: CSSProperties['color'];
|
|
46
65
|
r?: RadiusScale | `${RadiusScale}` | string;
|
|
@@ -50,4 +69,5 @@ export declare function splitSystemProps<P extends Record<string, unknown>>(prop
|
|
|
50
69
|
systemStyle: CSSProperties;
|
|
51
70
|
restProps: Omit<P, keyof SystemProps>;
|
|
52
71
|
};
|
|
72
|
+
export declare function normalizeTone(value: ToneInput | undefined, fallback?: Tone): Tone;
|
|
53
73
|
//# sourceMappingURL=systemProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemProps.d.ts","sourceRoot":"","sources":["../../src/theme/systemProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAEzC,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"systemProps.d.ts","sourceRoot":"","sources":["../../src/theme/systemProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAEzC,MAAM,MAAM,YAAY,GAClB,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,QAAQ,GACR,MAAM,CAAC;AACb,MAAM,MAAM,SAAS,GACf,MAAM,GACN,KAAK,GACL,MAAM,GACN,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,KAAK,GACL,MAAM,GACN,SAAS,GACT,MAAM,GACN,QAAQ,CAAC;AACf,MAAM,MAAM,IAAI,GAAG,YAAY,GAAG,SAAS,CAAC;AAC5C,MAAM,MAAM,SAAS,GACf,IAAI,GACJ,OAAO,GACP,MAAM,GACN,OAAO,GACP,OAAO,GACP,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,GACN,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,KAAK,GACL,MAAM,GACN,SAAS,GACT,MAAM,GACN,QAAQ,GACR,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AACpB,MAAM,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACxD,MA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CAqKA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,QAAQ,GAAE,IAAgB,GAAG,IAAI,CAc5F"}
|
|
@@ -16,19 +16,28 @@ const systemKeys = new Set([
|
|
|
16
16
|
'g',
|
|
17
17
|
'w',
|
|
18
18
|
'minW',
|
|
19
|
+
'minWidth',
|
|
19
20
|
'maxW',
|
|
21
|
+
'maxWidth',
|
|
20
22
|
'size',
|
|
21
23
|
'h',
|
|
22
24
|
'minH',
|
|
25
|
+
'minHeight',
|
|
23
26
|
'maxH',
|
|
27
|
+
'maxHeight',
|
|
24
28
|
'display',
|
|
25
29
|
'position',
|
|
26
30
|
'overflow',
|
|
27
31
|
'flex',
|
|
32
|
+
'flexGrow',
|
|
33
|
+
'flexShrink',
|
|
34
|
+
'flexBasis',
|
|
35
|
+
'alignSelf',
|
|
28
36
|
'a',
|
|
29
37
|
'j',
|
|
30
38
|
'row',
|
|
31
39
|
'col',
|
|
40
|
+
'direction',
|
|
32
41
|
'wrap',
|
|
33
42
|
'nowrap',
|
|
34
43
|
'inline',
|
|
@@ -40,13 +49,30 @@ const systemKeys = new Set([
|
|
|
40
49
|
'r',
|
|
41
50
|
'truncate',
|
|
42
51
|
]);
|
|
43
|
-
const spacing = [
|
|
52
|
+
const spacing = [
|
|
53
|
+
'0',
|
|
54
|
+
'4px',
|
|
55
|
+
'8px',
|
|
56
|
+
'12px',
|
|
57
|
+
'16px',
|
|
58
|
+
'24px',
|
|
59
|
+
'32px',
|
|
60
|
+
'40px',
|
|
61
|
+
'48px',
|
|
62
|
+
'64px',
|
|
63
|
+
];
|
|
44
64
|
const radiusScale = ['0', '2px', '4px', '6px', '8px', '10px', '12px', '999px'];
|
|
45
65
|
function sizeValue(value) {
|
|
46
66
|
if (value === undefined)
|
|
47
67
|
return undefined;
|
|
68
|
+
if (typeof value === 'object') {
|
|
69
|
+
return sizeValue(value.initial ?? value.md ?? value.lg ?? value.sm ?? value.xl);
|
|
70
|
+
}
|
|
48
71
|
if (typeof value === 'number')
|
|
49
72
|
return spacing[value] ?? `${value}px`;
|
|
73
|
+
const normalized = value.trim();
|
|
74
|
+
if (/^[0-9]$/.test(normalized))
|
|
75
|
+
return spacing[Number(normalized)];
|
|
50
76
|
return value;
|
|
51
77
|
}
|
|
52
78
|
function radiusValue(value) {
|
|
@@ -61,30 +87,41 @@ function radiusValue(value) {
|
|
|
61
87
|
}
|
|
62
88
|
function alignValue(value) {
|
|
63
89
|
switch (value) {
|
|
90
|
+
case 'start':
|
|
64
91
|
case 's':
|
|
65
92
|
return 'flex-start';
|
|
93
|
+
case 'center':
|
|
66
94
|
case 'c':
|
|
67
95
|
return 'center';
|
|
96
|
+
case 'end':
|
|
68
97
|
case 'e':
|
|
69
98
|
return 'flex-end';
|
|
99
|
+
case 'stretch':
|
|
70
100
|
case 'st':
|
|
71
101
|
return 'stretch';
|
|
102
|
+
case 'baseline':
|
|
72
103
|
case 'b':
|
|
73
104
|
return 'baseline';
|
|
74
105
|
}
|
|
75
106
|
}
|
|
76
107
|
function justifyValue(value) {
|
|
77
108
|
switch (value) {
|
|
109
|
+
case 'start':
|
|
78
110
|
case 's':
|
|
79
111
|
return 'flex-start';
|
|
112
|
+
case 'center':
|
|
80
113
|
case 'c':
|
|
81
114
|
return 'center';
|
|
115
|
+
case 'end':
|
|
82
116
|
case 'e':
|
|
83
117
|
return 'flex-end';
|
|
118
|
+
case 'between':
|
|
84
119
|
case 'sb':
|
|
85
120
|
return 'space-between';
|
|
121
|
+
case 'around':
|
|
86
122
|
case 'sa':
|
|
87
123
|
return 'space-around';
|
|
124
|
+
case 'evenly':
|
|
88
125
|
case 'se':
|
|
89
126
|
return 'space-evenly';
|
|
90
127
|
}
|
|
@@ -149,9 +186,11 @@ export function splitSystemProps(props) {
|
|
|
149
186
|
systemStyle.width = sizeValue(value);
|
|
150
187
|
break;
|
|
151
188
|
case 'minW':
|
|
189
|
+
case 'minWidth':
|
|
152
190
|
systemStyle.minWidth = sizeValue(value);
|
|
153
191
|
break;
|
|
154
192
|
case 'maxW':
|
|
193
|
+
case 'maxWidth':
|
|
155
194
|
systemStyle.maxWidth = sizeValue(value);
|
|
156
195
|
break;
|
|
157
196
|
case 'size': {
|
|
@@ -164,9 +203,11 @@ export function splitSystemProps(props) {
|
|
|
164
203
|
systemStyle.height = sizeValue(value);
|
|
165
204
|
break;
|
|
166
205
|
case 'minH':
|
|
206
|
+
case 'minHeight':
|
|
167
207
|
systemStyle.minHeight = sizeValue(value);
|
|
168
208
|
break;
|
|
169
209
|
case 'maxH':
|
|
210
|
+
case 'maxHeight':
|
|
170
211
|
systemStyle.maxHeight = sizeValue(value);
|
|
171
212
|
break;
|
|
172
213
|
case 'display':
|
|
@@ -181,6 +222,18 @@ export function splitSystemProps(props) {
|
|
|
181
222
|
case 'flex':
|
|
182
223
|
systemStyle.flex = value;
|
|
183
224
|
break;
|
|
225
|
+
case 'flexGrow':
|
|
226
|
+
systemStyle.flexGrow = value;
|
|
227
|
+
break;
|
|
228
|
+
case 'flexShrink':
|
|
229
|
+
systemStyle.flexShrink = value;
|
|
230
|
+
break;
|
|
231
|
+
case 'flexBasis':
|
|
232
|
+
systemStyle.flexBasis = value;
|
|
233
|
+
break;
|
|
234
|
+
case 'alignSelf':
|
|
235
|
+
systemStyle.alignSelf = value;
|
|
236
|
+
break;
|
|
184
237
|
case 'a':
|
|
185
238
|
systemStyle.alignItems = alignValue(value);
|
|
186
239
|
break;
|
|
@@ -195,6 +248,9 @@ export function splitSystemProps(props) {
|
|
|
195
248
|
if (value)
|
|
196
249
|
systemStyle.flexDirection = 'column';
|
|
197
250
|
break;
|
|
251
|
+
case 'direction':
|
|
252
|
+
systemStyle.flexDirection = value;
|
|
253
|
+
break;
|
|
198
254
|
case 'wrap':
|
|
199
255
|
if (value)
|
|
200
256
|
systemStyle.flexWrap = 'wrap';
|
|
@@ -238,3 +294,49 @@ export function splitSystemProps(props) {
|
|
|
238
294
|
}
|
|
239
295
|
return { systemStyle, restProps: restProps };
|
|
240
296
|
}
|
|
297
|
+
export function normalizeTone(value, fallback = 'neutral') {
|
|
298
|
+
switch (value) {
|
|
299
|
+
case undefined:
|
|
300
|
+
case 'muted':
|
|
301
|
+
case 'gray':
|
|
302
|
+
case 'mauve':
|
|
303
|
+
case 'slate':
|
|
304
|
+
case 'sage':
|
|
305
|
+
case 'olive':
|
|
306
|
+
case 'sand':
|
|
307
|
+
return value === undefined ? fallback : 'neutral';
|
|
308
|
+
default:
|
|
309
|
+
return isTone(value) ? value : fallback;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
function isTone(value) {
|
|
313
|
+
return (value === 'neutral' ||
|
|
314
|
+
value === 'primary' ||
|
|
315
|
+
value === 'secondary' ||
|
|
316
|
+
value === 'success' ||
|
|
317
|
+
value === 'warning' ||
|
|
318
|
+
value === 'danger' ||
|
|
319
|
+
value === 'info' ||
|
|
320
|
+
value === 'blue' ||
|
|
321
|
+
value === 'sky' ||
|
|
322
|
+
value === 'cyan' ||
|
|
323
|
+
value === 'teal' ||
|
|
324
|
+
value === 'indigo' ||
|
|
325
|
+
value === 'violet' ||
|
|
326
|
+
value === 'purple' ||
|
|
327
|
+
value === 'iris' ||
|
|
328
|
+
value === 'green' ||
|
|
329
|
+
value === 'jade' ||
|
|
330
|
+
value === 'mint' ||
|
|
331
|
+
value === 'grass' ||
|
|
332
|
+
value === 'lime' ||
|
|
333
|
+
value === 'yellow' ||
|
|
334
|
+
value === 'amber' ||
|
|
335
|
+
value === 'orange' ||
|
|
336
|
+
value === 'brown' ||
|
|
337
|
+
value === 'red' ||
|
|
338
|
+
value === 'ruby' ||
|
|
339
|
+
value === 'crimson' ||
|
|
340
|
+
value === 'pink' ||
|
|
341
|
+
value === 'tomato');
|
|
342
|
+
}
|
|
@@ -3,6 +3,13 @@ export type OrcestrThemeMode = 'dark' | 'light';
|
|
|
3
3
|
export type OrcestrThemeSurface = 'orcestr' | 'operations' | 'media' | 'catalog';
|
|
4
4
|
export type ButtonPressAnimation = 'translate' | 'scale' | 'soft' | 'none';
|
|
5
5
|
export type ModalAnimation = 'zoom-blur' | 'rise' | 'fade';
|
|
6
|
+
export type OrcestrThemeColorRole = {
|
|
7
|
+
base: string;
|
|
8
|
+
text: string;
|
|
9
|
+
surface: string;
|
|
10
|
+
border: string;
|
|
11
|
+
contrast: string;
|
|
12
|
+
};
|
|
6
13
|
export type OrcestrTheme = {
|
|
7
14
|
mode: OrcestrThemeMode;
|
|
8
15
|
surface: OrcestrThemeSurface;
|
|
@@ -16,20 +23,13 @@ export type OrcestrTheme = {
|
|
|
16
23
|
muted: string;
|
|
17
24
|
border: string;
|
|
18
25
|
borderStrong: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
dangerSoft: string;
|
|
27
|
-
success: string;
|
|
28
|
-
successSoft: string;
|
|
29
|
-
warning: string;
|
|
30
|
-
warningSoft: string;
|
|
31
|
-
info: string;
|
|
32
|
-
infoSoft: string;
|
|
26
|
+
primary: OrcestrThemeColorRole;
|
|
27
|
+
secondary: OrcestrThemeColorRole;
|
|
28
|
+
neutral: OrcestrThemeColorRole;
|
|
29
|
+
danger: OrcestrThemeColorRole;
|
|
30
|
+
success: OrcestrThemeColorRole;
|
|
31
|
+
warning: OrcestrThemeColorRole;
|
|
32
|
+
info: OrcestrThemeColorRole;
|
|
33
33
|
selected: string;
|
|
34
34
|
focusRing: string;
|
|
35
35
|
disabled: string;
|
|
@@ -41,7 +41,7 @@ export type OrcestrTheme = {
|
|
|
41
41
|
padHover: string;
|
|
42
42
|
skeletonShimmer: string;
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
radius: {
|
|
45
45
|
sm: string;
|
|
46
46
|
md: string;
|
|
47
47
|
lg: string;
|
|
@@ -72,24 +72,25 @@ export type OrcestrTheme = {
|
|
|
72
72
|
section: string;
|
|
73
73
|
focus: string;
|
|
74
74
|
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
75
|
+
text: {
|
|
76
|
+
family: string;
|
|
77
|
+
mono: string;
|
|
78
|
+
title: string;
|
|
79
|
+
heading: string;
|
|
80
|
+
body: string;
|
|
81
|
+
compact: string;
|
|
82
|
+
label: string;
|
|
83
|
+
line: string;
|
|
84
|
+
headingLine: string;
|
|
85
|
+
regular: number;
|
|
86
|
+
medium: number;
|
|
87
|
+
bold: number;
|
|
88
88
|
letterSpacing: string;
|
|
89
89
|
};
|
|
90
90
|
status: {
|
|
91
91
|
neutral: OrcestrThemeStatus;
|
|
92
|
-
|
|
92
|
+
primary: OrcestrThemeStatus;
|
|
93
|
+
secondary: OrcestrThemeStatus;
|
|
93
94
|
success: OrcestrThemeStatus;
|
|
94
95
|
warning: OrcestrThemeStatus;
|
|
95
96
|
danger: OrcestrThemeStatus;
|
|
@@ -110,12 +111,16 @@ export type OrcestrTheme = {
|
|
|
110
111
|
toast: {
|
|
111
112
|
background: string;
|
|
112
113
|
blur: number | string | false;
|
|
113
|
-
borderColor: string;
|
|
114
114
|
shadow: string;
|
|
115
115
|
animationDuration: string;
|
|
116
116
|
exitDuration: string;
|
|
117
117
|
progressHeight: string;
|
|
118
118
|
};
|
|
119
|
+
scrollbar: {
|
|
120
|
+
thumb: string;
|
|
121
|
+
thumbHover: string;
|
|
122
|
+
track: string;
|
|
123
|
+
};
|
|
119
124
|
states: {
|
|
120
125
|
hoverOpacity: number;
|
|
121
126
|
activeOpacity: number;
|
|
@@ -145,21 +150,21 @@ export type OrcestrTheme = {
|
|
|
145
150
|
tableHeaderHeight: string;
|
|
146
151
|
fieldGap: string;
|
|
147
152
|
modalMaxWidth: string;
|
|
148
|
-
pipelineStepMinWidth: string;
|
|
149
153
|
};
|
|
150
154
|
};
|
|
151
|
-
export type OrcestrThemeOverrides = Partial<Omit<OrcestrTheme, 'colors' | 'mode' | 'surface' | 'motion' | '
|
|
152
|
-
colors?:
|
|
153
|
-
|
|
155
|
+
export type OrcestrThemeOverrides = Partial<Omit<OrcestrTheme, 'colors' | 'mode' | 'surface' | 'motion' | 'radius' | 'spacing' | 'breakpoints' | 'shadows' | 'density' | 'zIndex' | 'toast' | 'scrollbar' | 'text' | 'status' | 'states' | 'components'>> & {
|
|
156
|
+
colors?: PartialColorOverrides;
|
|
157
|
+
radius?: Partial<OrcestrTheme['radius']>;
|
|
154
158
|
spacing?: Partial<OrcestrTheme['spacing']>;
|
|
155
159
|
breakpoints?: Partial<OrcestrTheme['breakpoints']>;
|
|
156
160
|
shadows?: Partial<OrcestrTheme['shadows']>;
|
|
157
|
-
|
|
161
|
+
text?: Partial<OrcestrTheme['text']>;
|
|
158
162
|
status?: PartialStatusOverrides;
|
|
159
163
|
motion?: Partial<OrcestrTheme['motion']>;
|
|
160
164
|
density?: Partial<OrcestrTheme['density']>;
|
|
161
165
|
zIndex?: Partial<OrcestrTheme['zIndex']>;
|
|
162
166
|
toast?: Partial<OrcestrTheme['toast']>;
|
|
167
|
+
scrollbar?: Partial<OrcestrTheme['scrollbar']>;
|
|
163
168
|
states?: Partial<OrcestrTheme['states']>;
|
|
164
169
|
components?: Partial<OrcestrTheme['components']>;
|
|
165
170
|
};
|
|
@@ -172,10 +177,14 @@ export type OrcestrThemeStatus = {
|
|
|
172
177
|
type PartialStatusOverrides = Partial<{
|
|
173
178
|
[K in keyof OrcestrTheme['status']]: Partial<OrcestrThemeStatus>;
|
|
174
179
|
}>;
|
|
180
|
+
type PartialColorOverrides = Partial<Omit<OrcestrTheme['colors'], 'primary' | 'secondary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info'>> & {
|
|
181
|
+
[K in 'primary' | 'secondary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info']?: Partial<OrcestrThemeColorRole>;
|
|
182
|
+
};
|
|
175
183
|
export type OrcestrThemeContextValue = {
|
|
176
184
|
mode: OrcestrThemeMode;
|
|
177
185
|
surface: OrcestrThemeSurface;
|
|
178
186
|
theme: OrcestrTheme;
|
|
187
|
+
cssVariables: CSSProperties;
|
|
179
188
|
setMode: (mode: OrcestrThemeMode) => void;
|
|
180
189
|
setSurface: (surface: OrcestrThemeSurface) => void;
|
|
181
190
|
toggleMode: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeTypes.d.ts","sourceRoot":"","sources":["../../src/theme/themeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC;AAChD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;AACjF,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAC3E,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"themeTypes.d.ts","sourceRoot":"","sources":["../../src/theme/themeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC;AAChD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;AACjF,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAC3E,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAC3D,MAAM,MAAM,qBAAqB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CA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EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAChD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACzD,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type CSSProperties, type HTMLAttributes, type ReactElement, type ReactNode, type Ref } from 'react';
|
|
2
|
+
type SlotChildProps = HTMLAttributes<HTMLElement> & {
|
|
3
|
+
ref?: Ref<HTMLElement>;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function renderSlot(children: ReactNode, props: SlotChildProps & {
|
|
7
|
+
ref?: Ref<HTMLElement>;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
}): ReactElement<SlotChildProps, string | import("react").JSXElementConstructor<any>> | null;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../src/utils/slot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,GAAG,EACX,MAAM,OAAO,CAAC;AAKf,KAAK,cAAc,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IAChD,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,wBAAgB,UAAU,CACtB,QAAQ,EAAE,SAAS,EACnB,KAAK,EAAE,cAAc,GAAG;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IACvB,KAAK,CAAC,EAAE,aAAa,CAAC;CACzB,4FAgBJ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cloneElement, isValidElement, } from 'react';
|
|
2
|
+
import { cn } from './cn';
|
|
3
|
+
import { composeRefs } from './composeRefs';
|
|
4
|
+
export function renderSlot(children, props) {
|
|
5
|
+
if (!isValidElement(children))
|
|
6
|
+
return null;
|
|
7
|
+
const child = children;
|
|
8
|
+
const { className, style, ref, ...restProps } = props;
|
|
9
|
+
return cloneElement(child, {
|
|
10
|
+
...restProps,
|
|
11
|
+
ref: composeRefs(child.props.ref, ref),
|
|
12
|
+
className: cn(className, child.props.className),
|
|
13
|
+
style: {
|
|
14
|
+
...style,
|
|
15
|
+
...child.props.style,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orcestr/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Shared React UI package for Orcestr products.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"build": "npm run clean && tsc -p tsconfig.build.json && npm run build:styles",
|
|
47
47
|
"build:styles": "sass src/styles/orcestr-ui.sass dist/styles/orcestr-ui.css --no-source-map && sass src/example/styles.sass dist/example/styles.css --no-source-map",
|
|
48
48
|
"check": "npm run typecheck",
|
|
49
|
+
"format": "prettier --write \"**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs,json,md,yml,yaml}\"",
|
|
50
|
+
"format:check": "prettier --check \"**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs,json,md,yml,yaml}\"",
|
|
49
51
|
"pack:dry-run": "npm pack --dry-run",
|
|
50
52
|
"release:patch": "node scripts/release.mjs patch",
|
|
51
53
|
"release:minor": "node scripts/release.mjs minor",
|
|
@@ -69,6 +71,7 @@
|
|
|
69
71
|
"@types/node": "25.6.0",
|
|
70
72
|
"@types/react": "19.2.14",
|
|
71
73
|
"@types/react-dom": "19.2.3",
|
|
74
|
+
"prettier": "^3.9.4",
|
|
72
75
|
"react": "19.2.5",
|
|
73
76
|
"react-dom": "19.2.5",
|
|
74
77
|
"react-icons": "5.6.0",
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import type { Tone } from '../../theme/systemProps';
|
|
3
|
-
import type { OrcestrActionItem } from '../Action/ActionTypes';
|
|
4
|
-
export type StatusBadgeProps = {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
tone?: Tone;
|
|
7
|
-
size?: 1 | 2 | 3 | 4;
|
|
8
|
-
testId?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function StatusBadge({ children, tone, size, testId }: StatusBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export type TimelineItem = {
|
|
12
|
-
key: string;
|
|
13
|
-
title: ReactNode;
|
|
14
|
-
description?: ReactNode;
|
|
15
|
-
meta?: ReactNode;
|
|
16
|
-
tone?: Tone;
|
|
17
|
-
icon?: ReactNode;
|
|
18
|
-
};
|
|
19
|
-
export declare function Timeline({ items, className, testId, ...props }: HTMLAttributes<HTMLOListElement> & {
|
|
20
|
-
items: ReadonlyArray<TimelineItem>;
|
|
21
|
-
testId?: string;
|
|
22
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export type WorkflowStepStatus = 'active' | 'blocked' | 'done' | 'error' | 'pending' | 'processing';
|
|
24
|
-
export type PipelineStep = {
|
|
25
|
-
key: string;
|
|
26
|
-
label?: ReactNode;
|
|
27
|
-
title?: ReactNode;
|
|
28
|
-
detail?: ReactNode;
|
|
29
|
-
description?: ReactNode;
|
|
30
|
-
meta?: ReactNode;
|
|
31
|
-
tooltip?: ReactNode;
|
|
32
|
-
disabledReason?: ReactNode;
|
|
33
|
-
status?: WorkflowStepStatus;
|
|
34
|
-
tone?: Tone;
|
|
35
|
-
active?: boolean;
|
|
36
|
-
complete?: boolean;
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
loading?: boolean;
|
|
39
|
-
onSelect?: () => void;
|
|
40
|
-
};
|
|
41
|
-
export declare function Pipeline({ steps, loading, loadingSteps, disabled, className, testId, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
42
|
-
steps?: ReadonlyArray<PipelineStep>;
|
|
43
|
-
loading?: boolean;
|
|
44
|
-
loadingSteps?: number;
|
|
45
|
-
disabled?: boolean;
|
|
46
|
-
testId?: string;
|
|
47
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
48
|
-
export type WorkflowSummaryBadge = {
|
|
49
|
-
key: string;
|
|
50
|
-
label: ReactNode;
|
|
51
|
-
value?: ReactNode;
|
|
52
|
-
tone?: Tone;
|
|
53
|
-
};
|
|
54
|
-
export declare function WorkflowSummaryBar({ items, className, testId, }: {
|
|
55
|
-
items: ReadonlyArray<WorkflowSummaryBadge>;
|
|
56
|
-
className?: string;
|
|
57
|
-
testId?: string;
|
|
58
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
export type LifecycleBlockReason = {
|
|
60
|
-
key: string;
|
|
61
|
-
title?: ReactNode;
|
|
62
|
-
message: ReactNode;
|
|
63
|
-
tone?: Exclude<Tone, 'brand'>;
|
|
64
|
-
actionLabel?: ReactNode;
|
|
65
|
-
onAction?: () => void;
|
|
66
|
-
};
|
|
67
|
-
export declare function LifecycleBlockReasonCallout({ reason, }: {
|
|
68
|
-
reason: LifecycleBlockReason;
|
|
69
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
70
|
-
export type LifecycleAction = Omit<OrcestrActionItem, 'children' | 'onSelect'> & {
|
|
71
|
-
disabledReason?: ReactNode;
|
|
72
|
-
onSelect: () => void;
|
|
73
|
-
};
|
|
74
|
-
export declare function LifecycleActionPanel({ title, meta, reasons, actions, className, testId, }: {
|
|
75
|
-
title?: ReactNode;
|
|
76
|
-
meta?: ReactNode;
|
|
77
|
-
reasons?: ReadonlyArray<LifecycleBlockReason>;
|
|
78
|
-
actions: ReadonlyArray<LifecycleAction>;
|
|
79
|
-
className?: string;
|
|
80
|
-
testId?: string;
|
|
81
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
82
|
-
//# sourceMappingURL=Workflow.d.ts.map
|