@orcestr/ui 0.1.0 → 0.2.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 +11 -11
- package/README.ru.md +10 -10
- package/dist/components/Action/ActionConfirmModal.d.ts.map +1 -1
- package/dist/components/Action/ActionTypes.d.ts +1 -1
- package/dist/components/Action/ActionTypes.d.ts.map +1 -1
- package/dist/components/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/AppShell/AppShell.d.ts +11 -0
- package/dist/components/AppShell/AppShell.d.ts.map +1 -1
- package/dist/components/AppShell/AppShell.js +15 -14
- package/dist/components/AppSidebar/AppSidebar.d.ts.map +1 -1
- package/dist/components/AppSidebar/AppSidebar.js +84 -15
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/BadgeSelectMenu/BadgeSelectMenu.d.ts.map +1 -1
- package/dist/components/BadgeSelectMenu/BadgeSelectMenu.js +5 -5
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/Box.js +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Collapse/Collapse.d.ts.map +1 -1
- package/dist/components/Collapse/Collapse.js +5 -25
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.js +7 -2
- package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.js +6 -12
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +3 -3
- 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/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +29 -22
- package/dist/components/DataTable/DataTableStateAdapters.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableStateAdapters.js +3 -4
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DatePicker/DatePickerState.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerState.js +3 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DateRangePresetPicker/DateRangePresetPicker.d.ts.map +1 -1
- package/dist/components/DateRangePresetPicker/DateRangePresetPicker.js +1 -1
- package/dist/components/DateRangePresetPicker/DateRangePresetPickerState.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -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 +3 -3
- package/dist/components/EntityPicker/EntityPicker.d.ts.map +1 -1
- package/dist/components/EntityPicker/EntityPicker.js +2 -2
- package/dist/components/Field/Field.d.ts.map +1 -1
- package/dist/components/Field/Field.js +1 -1
- package/dist/components/Flex/Flex.d.ts.map +1 -1
- package/dist/components/Flex/Flex.js +1 -1
- package/dist/components/Grid/Grid.d.ts.map +1 -1
- package/dist/components/Highlight/Highlight.d.ts.map +1 -1
- package/dist/components/Highlight/Highlight.js +1 -1
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.js +3 -3
- package/dist/components/IconText/IconText.d.ts.map +1 -1
- package/dist/components/IconText/IconText.js +3 -1
- package/dist/components/IconTextButton/IconTextButton.d.ts.map +1 -1
- package/dist/components/InlineEdit/InlineEdit.d.ts.map +1 -1
- package/dist/components/InlineEdit/InlineEdit.js +22 -7
- package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
- package/dist/components/LinkButton/LinkButton.js +2 -2
- package/dist/components/Listbox/Listbox.js +2 -2
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/Menu.js +5 -5
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +4 -8
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +5 -7
- package/dist/components/NumberField/NumberField.d.ts.map +1 -1
- package/dist/components/NumberField/NumberField.js +1 -1
- package/dist/components/Overlay/OverlayProvider.d.ts +1 -1
- package/dist/components/Overlay/OverlayProvider.d.ts.map +1 -1
- package/dist/components/Overlay/OverlayProvider.js +3 -7
- package/dist/components/PaginatedCombobox/PaginatedCombobox.d.ts.map +1 -1
- package/dist/components/PaginatedCombobox/PaginatedCombobox.js +9 -8
- package/dist/components/PaginatedCombobox/PaginatedComboboxReactQueryAdapter.d.ts.map +1 -1
- package/dist/components/PaginatedCombobox/PaginatedComboboxReactQueryAdapter.js +2 -2
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/Popover.js +16 -18
- package/dist/components/Portal/Portal.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.js +10 -23
- package/dist/components/Section/Section.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +4 -4
- package/dist/components/Separator/Separator.d.ts.map +1 -1
- package/dist/components/Separator/Separator.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/SpecialModal/SpecialModal.d.ts.map +1 -1
- package/dist/components/SpecialModal/SpecialModal.js +2 -2
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Stack/Stack.d.ts.map +1 -1
- package/dist/components/Stack/Stack.js +1 -1
- package/dist/components/State/State.d.ts.map +1 -1
- package/dist/components/State/State.js +5 -5
- package/dist/components/State/stateIcon.d.ts.map +1 -1
- package/dist/components/StepperInput/StepperInput.js +2 -2
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.js +2 -2
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +24 -15
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.js +2 -2
- package/dist/components/TextField/TextField.d.ts.map +1 -1
- package/dist/components/TextField/TextField.js +3 -3
- package/dist/components/Toast/Toast.d.ts +0 -4
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +63 -45
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +7 -9
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/example/CodePreview.d.ts +2 -1
- package/dist/example/CodePreview.d.ts.map +1 -1
- package/dist/example/CodePreview.js +18 -53
- package/dist/example/ExampleActionsSection.d.ts +1 -1
- package/dist/example/ExampleActionsSection.d.ts.map +1 -1
- package/dist/example/ExampleActionsSection.js +3 -3
- package/dist/example/ExampleApplicationSection.d.ts.map +1 -1
- package/dist/example/ExampleApplicationSection.js +91 -23
- package/dist/example/ExampleBasicsSections.d.ts +1 -1
- package/dist/example/ExampleBasicsSections.d.ts.map +1 -1
- package/dist/example/ExampleBasicsSections.js +22 -8
- package/dist/example/ExampleDataSection.d.ts.map +1 -1
- package/dist/example/ExampleDataSection.js +5 -5
- package/dist/example/ExampleFieldsSection.d.ts.map +1 -1
- package/dist/example/ExampleFieldsSection.js +8 -10
- package/dist/example/ExampleFoundationsSection.d.ts +1 -1
- package/dist/example/ExampleFoundationsSection.d.ts.map +1 -1
- package/dist/example/ExampleFoundationsSection.js +4 -4
- package/dist/example/ExampleOverlays.d.ts.map +1 -1
- package/dist/example/ExampleOverlays.js +4 -4
- package/dist/example/ExampleOverlaysSection.d.ts.map +1 -1
- package/dist/example/ExampleOverlaysSection.js +22 -35
- package/dist/example/ExampleSelectionSection.d.ts.map +1 -1
- package/dist/example/ExampleSelectionSection.js +8 -8
- package/dist/example/ExampleStateSection.d.ts +3 -3
- package/dist/example/ExampleStateSection.d.ts.map +1 -1
- package/dist/example/ExampleStateSection.js +15 -14
- package/dist/example/ExampleThemePlayground.d.ts +26 -26
- package/dist/example/ExampleThemePlayground.d.ts.map +1 -1
- package/dist/example/ExampleThemePlayground.js +58 -44
- package/dist/example/UiExamplePage.d.ts.map +1 -1
- package/dist/example/UiExamplePage.js +42 -55
- package/dist/example/UiExampleSection.d.ts.map +1 -1
- package/dist/example/UiExampleSection.js +1 -1
- package/dist/example/codeSamples.d.ts +1 -1
- package/dist/example/codeSamples.d.ts.map +1 -1
- package/dist/example/codeSamples.js +172 -70
- package/dist/example/exampleData.d.ts.map +1 -1
- package/dist/example/exampleData.js +5 -11
- package/dist/example/styles.css +79 -119
- package/dist/hooks/useControllableState.d.ts.map +1 -1
- package/dist/hooks/useControllableState.js +1 -3
- package/dist/hooks/useFloatingLayer.d.ts.map +1 -1
- package/dist/hooks/useFloatingLayer.js +1 -1
- package/dist/hooks/useFloatingPosition.d.ts.map +1 -1
- package/dist/hooks/useFloatingPosition.js +10 -15
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useListNavigation.d.ts.map +1 -1
- package/dist/hooks/useListNavigation.js +2 -4
- package/dist/hooks/useOutsidePointerDown.d.ts.map +1 -1
- package/dist/hooks/useTypeahead.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/locale/LocaleProvider.d.ts.map +1 -1
- package/dist/locale/LocaleProvider.js +1 -1
- package/dist/provider/OrcestrUiProvider.d.ts.map +1 -1
- package/dist/styles/orcestr-ui.css +658 -1033
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.js +21 -29
- package/dist/theme/defaultTheme.d.ts.map +1 -1
- package/dist/theme/defaultTheme.js +200 -89
- package/dist/theme/systemProps.d.ts +2 -2
- package/dist/theme/systemProps.d.ts.map +1 -1
- package/dist/theme/systemProps.js +4 -35
- package/dist/theme/themeTypes.d.ts +24 -19
- package/dist/theme/themeTypes.d.ts.map +1 -1
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/composeRefs.d.ts.map +1 -1
- package/dist/utils/mergeProps.d.ts.map +1 -1
- package/dist/utils/polymorphic.d.ts.map +1 -1
- package/package.json +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiExampleSection.d.ts","sourceRoot":"","sources":["../../src/example/UiExampleSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"UiExampleSection.d.ts","sourceRoot":"","sources":["../../src/example/UiExampleSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,wBAAgB,gBAAgB,CAAC,EAC7B,EAAE,EACF,KAAK,EACL,WAAW,EACX,QAAQ,GACX,EAAE;IACC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACvB,2CAYA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Section } from '../components/Section/Section';
|
|
3
3
|
export function UiExampleSection({ id, title, description, children, }) {
|
|
4
|
-
return (_jsxs(Section, { id: id, className:
|
|
4
|
+
return (_jsxs(Section, { id: id, className: "oui-ui-section", children: [_jsx("div", { className: "oui-ui-section-head", children: _jsxs("div", { children: [_jsx("h2", { className: "oui-ui-section-title", children: title }), description ? _jsx("p", { className: "oui-ui-description", children: description }) : null] }) }), children] }));
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeSamples.d.ts","sourceRoot":"","sources":["../../src/example/codeSamples.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"codeSamples.d.ts","sourceRoot":"","sources":["../../src/example/codeSamples.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAs6CU,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const codeSamples = {
|
|
2
|
-
|
|
2
|
+
text: `import {Badge, Box, Flex, Stack, Text} from '@orcestr/ui';
|
|
3
3
|
|
|
4
4
|
<Stack g={3}>
|
|
5
5
|
<Stack g={1}>
|
|
@@ -28,9 +28,9 @@ export const codeSamples = {
|
|
|
28
28
|
<Text tone='info' fw={700}>Info</Text>
|
|
29
29
|
</Flex>
|
|
30
30
|
|
|
31
|
-
<Box w='100%' p={2} r={3}>
|
|
31
|
+
<Box w='100%' p={2} r={3} style={{background: 'var(--oui-pad-bg)'}}>
|
|
32
32
|
<Text display='block' truncate>
|
|
33
|
-
This is a long single line value that truncates cleanly.
|
|
33
|
+
This is a long single line value that truncates cleanly inside a constrained row.
|
|
34
34
|
</Text>
|
|
35
35
|
</Box>
|
|
36
36
|
|
|
@@ -55,22 +55,31 @@ import {
|
|
|
55
55
|
AppShell,
|
|
56
56
|
AppShellContent,
|
|
57
57
|
AppShellHeader,
|
|
58
|
+
type AppShellSide,
|
|
58
59
|
AppSidebar,
|
|
59
|
-
Badge,
|
|
60
60
|
Button,
|
|
61
61
|
Flex,
|
|
62
62
|
IconButton,
|
|
63
63
|
IconTextButton,
|
|
64
|
+
Menu,
|
|
64
65
|
PageTitleBlock,
|
|
65
66
|
SpecialModal,
|
|
66
|
-
|
|
67
|
+
Tooltip,
|
|
68
|
+
type MenuItem,
|
|
67
69
|
} from '@orcestr/ui';
|
|
68
|
-
import {LuBell, LuBox, LuCalendar, LuClipboardList, LuEllipsis, LuMessageSquare, LuSearch, LuTruck} from 'react-icons/lu';
|
|
70
|
+
import {LuArrowLeft, LuArrowLeftRight, LuBell, LuBox, LuCalendar, LuCheck, LuClipboardList, LuEllipsis, LuLanguages, LuMessageSquare, LuSearch, LuTruck} from 'react-icons/lu';
|
|
69
71
|
|
|
70
72
|
const [open, setOpen] = useState(false);
|
|
71
73
|
const [mobileOpen, setMobileOpen] = useState(false);
|
|
72
74
|
const [previewMode, setPreviewMode] = useState<'desktop' | 'phone'>('desktop');
|
|
75
|
+
const [sidebarSide, setSidebarSide] = useState<AppShellSide>('left');
|
|
73
76
|
const [activeKey, setActiveKey] = useState('requests');
|
|
77
|
+
const [locale, setLocale] = useState<'ru' | 'en'>('en');
|
|
78
|
+
const isPhone = previewMode === 'phone';
|
|
79
|
+
const isRight = sidebarSide === 'right';
|
|
80
|
+
const toggleSidebarSide = () => {
|
|
81
|
+
setSidebarSide((side) => side === 'left' ? 'right' : 'left');
|
|
82
|
+
};
|
|
74
83
|
|
|
75
84
|
const groups = [
|
|
76
85
|
{
|
|
@@ -81,20 +90,23 @@ const groups = [
|
|
|
81
90
|
],
|
|
82
91
|
},
|
|
83
92
|
{
|
|
84
|
-
key: '
|
|
93
|
+
key: 'inventory',
|
|
85
94
|
items: [
|
|
86
95
|
{key: 'products', label: 'Products', icon: <LuBox />, active: activeKey === 'products'},
|
|
87
96
|
{key: 'calendar', label: 'Calendar', icon: <LuCalendar />, active: activeKey === 'calendar'},
|
|
88
97
|
],
|
|
89
98
|
},
|
|
90
99
|
];
|
|
100
|
+
const languageItems: MenuItem[] = [
|
|
101
|
+
{key: 'ru', label: 'RU', icon: locale === 'ru' ? <LuCheck /> : undefined, onSelect: () => setLocale('ru')},
|
|
102
|
+
{key: 'en', label: 'EN', icon: locale === 'en' ? <LuCheck /> : undefined, onSelect: () => setLocale('en')},
|
|
103
|
+
];
|
|
91
104
|
|
|
92
105
|
<>
|
|
93
106
|
<Button onClick={() => setOpen(true)}>Open AppShell preview</Button>
|
|
94
107
|
<SpecialModal open={open} onOpenChange={setOpen} size='full' scroll='body'>
|
|
95
108
|
<SpecialModal.Header
|
|
96
109
|
title='AppShell preview'
|
|
97
|
-
meta={<Badge tone='primary'>{previewMode}</Badge>}
|
|
98
110
|
actions={(
|
|
99
111
|
<>
|
|
100
112
|
<Button size={2} v='surface' onClick={() => setPreviewMode((mode) => mode === 'desktop' ? 'phone' : 'desktop')}>
|
|
@@ -106,8 +118,10 @@ const groups = [
|
|
|
106
118
|
/>
|
|
107
119
|
<SpecialModal.Body>
|
|
108
120
|
<AppShell
|
|
109
|
-
sidebarMode={
|
|
121
|
+
sidebarMode={isPhone ? 'mobile' : 'desktop'}
|
|
122
|
+
sidebarSide={sidebarSide}
|
|
110
123
|
sidebarOpen={mobileOpen}
|
|
124
|
+
desktopSidebarOpen
|
|
111
125
|
onSidebarOpenChange={setMobileOpen}
|
|
112
126
|
sidebarWidth={300}
|
|
113
127
|
contentInset={0}
|
|
@@ -116,21 +130,39 @@ const groups = [
|
|
|
116
130
|
<AppShellHeader
|
|
117
131
|
visibility='always'
|
|
118
132
|
sidebarOpen={mobileOpen}
|
|
119
|
-
onSidebarOpenChange={
|
|
133
|
+
onSidebarOpenChange={setMobileOpen}
|
|
134
|
+
navigationVisibility='mobile'
|
|
120
135
|
actions={(
|
|
121
136
|
<Flex a='c' g={1}>
|
|
122
137
|
<IconTextButton size={2} v='soft' tone='neutral' icon={<LuSearch />}>Quick jump</IconTextButton>
|
|
123
138
|
<IconButton size={2} v='ghost' icon={<LuBell />} badge={64} aria-label='Notifications' />
|
|
124
139
|
<IconButton size={2} v='ghost' icon={<LuMessageSquare />} badge={99} aria-label='Messages' />
|
|
140
|
+
<Menu
|
|
141
|
+
align='end'
|
|
142
|
+
items={languageItems}
|
|
143
|
+
trigger={<IconButton size={2} v='ghost' icon={<LuLanguages />} aria-label={'Language: ' + locale.toUpperCase()} />}
|
|
144
|
+
/>
|
|
125
145
|
</Flex>
|
|
126
146
|
)}
|
|
127
|
-
|
|
128
|
-
<Text fw={760}>Deliveries</Text>
|
|
129
|
-
</AppShellHeader>
|
|
147
|
+
/>
|
|
130
148
|
)}
|
|
131
149
|
sidebar={(
|
|
132
150
|
<AppSidebar
|
|
133
|
-
|
|
151
|
+
side={sidebarSide}
|
|
152
|
+
header={(
|
|
153
|
+
<>
|
|
154
|
+
<div className='oui-app-sidebar-brand'><span className='oui-app-sidebar-logo'>O</span><span className='oui-app-sidebar-title'>Deliveries</span></div>
|
|
155
|
+
<div className='oui-app-sidebar-actions'>
|
|
156
|
+
<Tooltip content='Back'>
|
|
157
|
+
<IconButton size={2} v='ghost' icon={<LuArrowLeft />} aria-label='Back' />
|
|
158
|
+
</Tooltip>
|
|
159
|
+
<Tooltip content={isRight ? 'Move sidebar left' : 'Move sidebar right'}>
|
|
160
|
+
<IconButton size={2} v='ghost' icon={<LuArrowLeftRight />} aria-label={isRight ? 'Move sidebar left' : 'Move sidebar right'} onClick={toggleSidebarSide} />
|
|
161
|
+
</Tooltip>
|
|
162
|
+
<IconButton size={2} v='ghost' icon={<LuEllipsis />} aria-label='Sidebar actions' />
|
|
163
|
+
</div>
|
|
164
|
+
</>
|
|
165
|
+
)}
|
|
134
166
|
itemH={38}
|
|
135
167
|
onNavigate={(item) => setActiveKey(item.key)}
|
|
136
168
|
groups={groups}
|
|
@@ -141,7 +173,6 @@ const groups = [
|
|
|
141
173
|
<PageTitleBlock
|
|
142
174
|
title='Requests'
|
|
143
175
|
caption='Module workspace with responsive header and AppSidebar navigation.'
|
|
144
|
-
badge='shell'
|
|
145
176
|
action={<IconButton size={2} v='pad' icon={<LuEllipsis />} aria-label='More actions' />}
|
|
146
177
|
/>
|
|
147
178
|
{children}
|
|
@@ -165,23 +196,50 @@ const groups = [
|
|
|
165
196
|
</Flex>
|
|
166
197
|
<Flex row g={2} wrap>
|
|
167
198
|
{['Intake', 'Review', 'Complete'].map((item, index) => (
|
|
168
|
-
<Flex
|
|
199
|
+
<Flex
|
|
200
|
+
key={item}
|
|
201
|
+
col
|
|
202
|
+
g={1}
|
|
203
|
+
p={2}
|
|
204
|
+
r={3}
|
|
205
|
+
flex='1 1 150px'
|
|
206
|
+
style={{background: 'var(--oui-pad-bg)'}}
|
|
207
|
+
>
|
|
169
208
|
<Text fs='12px' tone='muted'>Step {index + 1}</Text>
|
|
170
209
|
<Text fw={700}>{item}</Text>
|
|
171
210
|
</Flex>
|
|
172
211
|
))}
|
|
173
212
|
</Flex>
|
|
174
213
|
</Flex>`,
|
|
175
|
-
layoutStack: `import {
|
|
214
|
+
layoutStack: `import {Flex, Stack, Text} from '@orcestr/ui';
|
|
176
215
|
|
|
177
216
|
<Stack g={2}>
|
|
178
217
|
{[
|
|
179
|
-
['Created', 'Draft created from intake'],
|
|
180
|
-
['Reserved', 'Capacity is reserved for review'],
|
|
181
|
-
['Scheduled', 'Review window is confirmed'],
|
|
182
|
-
].map(([title, description]) => (
|
|
183
|
-
<Flex
|
|
184
|
-
|
|
218
|
+
['/gallery/cyberpunk-rain.webp', 'Created', 'Draft created from intake'],
|
|
219
|
+
['/gallery/hollywood-star.webp', 'Reserved', 'Capacity is reserved for review'],
|
|
220
|
+
['/gallery/ice-cave.webp', 'Scheduled', 'Review window is confirmed'],
|
|
221
|
+
].map(([image, title, description]) => (
|
|
222
|
+
<Flex
|
|
223
|
+
key={title}
|
|
224
|
+
row
|
|
225
|
+
g={2}
|
|
226
|
+
a='c'
|
|
227
|
+
w='min(100%, 360px)'
|
|
228
|
+
p='8px 10px'
|
|
229
|
+
r={2}
|
|
230
|
+
style={{background: 'var(--oui-pad-bg)'}}
|
|
231
|
+
>
|
|
232
|
+
<img
|
|
233
|
+
src={image}
|
|
234
|
+
alt=''
|
|
235
|
+
style={{
|
|
236
|
+
width: 34,
|
|
237
|
+
height: 34,
|
|
238
|
+
flex: '0 0 34px',
|
|
239
|
+
borderRadius: 999,
|
|
240
|
+
objectFit: 'cover',
|
|
241
|
+
}}
|
|
242
|
+
/>
|
|
185
243
|
<Stack g={0}>
|
|
186
244
|
<Text fs='13px' fw={700}>{title}</Text>
|
|
187
245
|
<Text fs='12px' tone='muted' lh={1.45}>{description}</Text>
|
|
@@ -202,7 +260,7 @@ const [detailsOpen, setDetailsOpen] = useState(true);
|
|
|
202
260
|
</Button>
|
|
203
261
|
</Flex>
|
|
204
262
|
<Collapse open={detailsOpen}>
|
|
205
|
-
<Stack g={2} p={2} r={3}>
|
|
263
|
+
<Stack g={2} p={2} r={3} style={{background: 'var(--oui-pad-bg)'}}>
|
|
206
264
|
<Flex row g={2} j='sb'>
|
|
207
265
|
<Text tone='muted'>Owner</Text>
|
|
208
266
|
<Text fw={700}>Core team</Text>
|
|
@@ -222,7 +280,7 @@ const [detailsOpen, setDetailsOpen] = useState(true);
|
|
|
222
280
|
|
|
223
281
|
<Grid columns='repeat(3, minmax(0, 1fr))' g={2}>
|
|
224
282
|
{['A', 'B', 'C', 'D', 'E', 'F'].map((item) => (
|
|
225
|
-
<Box key={item} p={2} r={3} ta='center'>
|
|
283
|
+
<Box key={item} p={2} r={3} ta='center' style={{background: 'var(--oui-pad-bg)'}}>
|
|
226
284
|
<Text fs='13px' fw={700}>{item}</Text>
|
|
227
285
|
</Box>
|
|
228
286
|
))}
|
|
@@ -248,11 +306,29 @@ const [detailsOpen, setDetailsOpen] = useState(true);
|
|
|
248
306
|
position='absolute'
|
|
249
307
|
/>
|
|
250
308
|
</div>`,
|
|
251
|
-
scrollArea: `import {Badge, Flex, ScrollArea, Stack, Text} from '@orcestr/ui';
|
|
309
|
+
scrollArea: `import {Badge, Box, Flex, ScrollArea, Stack, Text} from '@orcestr/ui';
|
|
310
|
+
|
|
311
|
+
const scrollRows = Array.from({length: 10}, (_, index) => index + 1);
|
|
312
|
+
const richRows = [
|
|
313
|
+
['Queued', 'No top shade at the initial position.'],
|
|
314
|
+
['Reserved', 'The top shade starts after 50px.'],
|
|
315
|
+
['Packed', 'Opacity reaches maximum over 160px.'],
|
|
316
|
+
['Labeled', 'Bottom shade fades near the end.'],
|
|
317
|
+
['Reviewed', 'Each edge has its own configuration.'],
|
|
318
|
+
['Delivered', 'The gradient uses the solid surface color.'],
|
|
319
|
+
['Checked', 'Content remains readable under the fade.'],
|
|
320
|
+
['Archived', 'The bottom edge disappears at the end.'],
|
|
321
|
+
];
|
|
252
322
|
|
|
253
323
|
<Stack g={2}>
|
|
254
324
|
<ScrollArea h={116} pr={1}>
|
|
255
|
-
<Stack g={1}>
|
|
325
|
+
<Stack g={1}>
|
|
326
|
+
{scrollRows.map((row) => (
|
|
327
|
+
<Box key={row} p={2} r={3} style={{background: 'var(--oui-pad-bg)'}}>
|
|
328
|
+
<Text fs='13px'>Scroll row {row}</Text>
|
|
329
|
+
</Box>
|
|
330
|
+
))}
|
|
331
|
+
</Stack>
|
|
256
332
|
</ScrollArea>
|
|
257
333
|
|
|
258
334
|
<ScrollArea
|
|
@@ -263,7 +339,13 @@ const [detailsOpen, setDetailsOpen] = useState(true);
|
|
|
263
339
|
highlightTop={{h: 28, mode: 'static', maxOpacity: 0.96}}
|
|
264
340
|
highlightBottom={{h: 28, mode: 'static', maxOpacity: 0.96}}
|
|
265
341
|
>
|
|
266
|
-
<Stack g={1}>
|
|
342
|
+
<Stack g={1}>
|
|
343
|
+
{scrollRows.slice(0, 8).map((row) => (
|
|
344
|
+
<Box key={row} p={2} r={3} style={{background: 'var(--oui-pad-bg)'}}>
|
|
345
|
+
<Text fs='13px'>Both edges row {row}</Text>
|
|
346
|
+
</Box>
|
|
347
|
+
))}
|
|
348
|
+
</Stack>
|
|
267
349
|
</ScrollArea>
|
|
268
350
|
|
|
269
351
|
<ScrollArea
|
|
@@ -287,14 +369,22 @@ const [detailsOpen, setDetailsOpen] = useState(true);
|
|
|
287
369
|
}}
|
|
288
370
|
>
|
|
289
371
|
<Stack g={1}>
|
|
290
|
-
{
|
|
291
|
-
<Flex
|
|
372
|
+
{richRows.map(([title, description], index) => (
|
|
373
|
+
<Flex
|
|
374
|
+
key={title}
|
|
375
|
+
row
|
|
376
|
+
g={2}
|
|
377
|
+
p={2}
|
|
378
|
+
r={3}
|
|
379
|
+
a='c'
|
|
380
|
+
style={{background: 'var(--oui-pad-bg)'}}
|
|
381
|
+
>
|
|
292
382
|
<Badge tone={index < 3 ? 'primary' : 'info'}>
|
|
293
383
|
{index + 1}
|
|
294
384
|
</Badge>
|
|
295
385
|
<Stack g={0}>
|
|
296
|
-
<Text fs='13px' fw={700}>{
|
|
297
|
-
<Text fs='12px' tone='muted'>{
|
|
386
|
+
<Text fs='13px' fw={700}>{title}</Text>
|
|
387
|
+
<Text fs='12px' tone='muted'>{description}</Text>
|
|
298
388
|
</Stack>
|
|
299
389
|
</Flex>
|
|
300
390
|
))}
|
|
@@ -305,8 +395,16 @@ const [detailsOpen, setDetailsOpen] = useState(true);
|
|
|
305
395
|
|
|
306
396
|
<Flex g={2} a='c' wrap>
|
|
307
397
|
{[0, 2, 4, 6, 7].map((radius) => (
|
|
308
|
-
<Box
|
|
309
|
-
|
|
398
|
+
<Box
|
|
399
|
+
key={radius}
|
|
400
|
+
size={32}
|
|
401
|
+
r={radius}
|
|
402
|
+
display='flex'
|
|
403
|
+
a='c'
|
|
404
|
+
j='c'
|
|
405
|
+
style={{background: 'var(--oui-pad-bg)'}}
|
|
406
|
+
>
|
|
407
|
+
<Text fs='12px' fw={700}>{radius}</Text>
|
|
310
408
|
</Box>
|
|
311
409
|
))}
|
|
312
410
|
</Flex>
|
|
@@ -329,13 +427,19 @@ const [detailsOpen, setDetailsOpen] = useState(true);
|
|
|
329
427
|
<Text fs='12px' tone='muted'>Quiet grouped content.</Text>
|
|
330
428
|
</Stack>
|
|
331
429
|
</Card>
|
|
430
|
+
<Card v='classic'>
|
|
431
|
+
<Stack g={1}>
|
|
432
|
+
<Text fw={760}>Classic card</Text>
|
|
433
|
+
<Text fs='12px' tone='muted'>More explicit border and background.</Text>
|
|
434
|
+
</Stack>
|
|
435
|
+
</Card>
|
|
332
436
|
</Grid>
|
|
333
437
|
<Separator />
|
|
334
438
|
<Alert title='Inventory sync delayed' action={<Button size={1} v='surface'>Retry</Button>}>
|
|
335
439
|
Check this status before creating the next shipment.
|
|
336
440
|
</Alert>
|
|
337
441
|
</Section>`,
|
|
338
|
-
buttons: `import {Button, Spinner} from '@orcestr/ui';
|
|
442
|
+
buttons: `import {Button, CopyButton, CopyIconButton, Spinner} from '@orcestr/ui';
|
|
339
443
|
import {LuCheck, LuInfo, LuTrash2, LuTriangleAlert} from 'react-icons/lu';
|
|
340
444
|
|
|
341
445
|
<Button size={3}>Solid</Button>
|
|
@@ -367,6 +471,19 @@ import {LuCheck, LuInfo, LuTrash2, LuTriangleAlert} from 'react-icons/lu';
|
|
|
367
471
|
<Button v='surface' pressAnimation='soft'>Press soft</Button>
|
|
368
472
|
<Button v='surface' pressAnimation='none'>Press none</Button>
|
|
369
473
|
|
|
474
|
+
<CopyButton
|
|
475
|
+
text='https://orcestr.dev/requests/PR-2026-0900'
|
|
476
|
+
label='Copy link'
|
|
477
|
+
successMessage='Link copied'
|
|
478
|
+
v='surface'
|
|
479
|
+
/>
|
|
480
|
+
<CopyIconButton
|
|
481
|
+
text='PR-2026-0900'
|
|
482
|
+
label='Copy request number'
|
|
483
|
+
successMessage='Request number copied'
|
|
484
|
+
v='surface'
|
|
485
|
+
/>
|
|
486
|
+
|
|
370
487
|
<Button size={3} loading>Loading</Button>
|
|
371
488
|
<Button size={3} v='surface' loading leftIcon={<LuCheck size={16} />}>Save</Button>
|
|
372
489
|
<Button size={3} tone='success' loading leftIcon={<LuCheck size={16} />}>Success</Button>
|
|
@@ -999,6 +1116,19 @@ const toast = useToast();
|
|
|
999
1116
|
>
|
|
1000
1117
|
Success
|
|
1001
1118
|
</Button>
|
|
1119
|
+
<Button
|
|
1120
|
+
onClick={() =>
|
|
1121
|
+
toast.success({
|
|
1122
|
+
title: 'Endless',
|
|
1123
|
+
message: 'This success toast stays until you click it.',
|
|
1124
|
+
position: 'bottom-right',
|
|
1125
|
+
duration: null,
|
|
1126
|
+
dedupeKey: 'endless-success-toast',
|
|
1127
|
+
})
|
|
1128
|
+
}
|
|
1129
|
+
>
|
|
1130
|
+
Endless
|
|
1131
|
+
</Button>
|
|
1002
1132
|
<Button
|
|
1003
1133
|
onClick={() =>
|
|
1004
1134
|
toast.warning({
|
|
@@ -1043,31 +1173,14 @@ const toast = useToast();
|
|
|
1043
1173
|
onClick={() =>
|
|
1044
1174
|
toast.info({
|
|
1045
1175
|
title: 'Glass background',
|
|
1046
|
-
message: '
|
|
1176
|
+
message: 'Theme blur and translucent background.',
|
|
1047
1177
|
position: 'bottom-right',
|
|
1048
|
-
background: 'rgb(18 24 34 / 72%)',
|
|
1049
|
-
blur: 18,
|
|
1050
|
-
borderColor: 'rgb(255 255 255 / 18%)',
|
|
1051
1178
|
duration: 5200,
|
|
1052
1179
|
})
|
|
1053
1180
|
}
|
|
1054
1181
|
>
|
|
1055
1182
|
Glass
|
|
1056
1183
|
</Button>
|
|
1057
|
-
<Button
|
|
1058
|
-
onClick={() =>
|
|
1059
|
-
toast.info({
|
|
1060
|
-
title: 'Static background',
|
|
1061
|
-
message: 'Blur can be disabled per toast.',
|
|
1062
|
-
position: 'bottom-left',
|
|
1063
|
-
background: 'var(--oui-floating-bg)',
|
|
1064
|
-
blur: false,
|
|
1065
|
-
duration: 5200,
|
|
1066
|
-
})
|
|
1067
|
-
}
|
|
1068
|
-
>
|
|
1069
|
-
Static
|
|
1070
|
-
</Button>
|
|
1071
1184
|
|
|
1072
1185
|
const toastPositions: Array<{position: ToastPosition; label: string}> = [
|
|
1073
1186
|
{position: 'top-left', label: 'Top left'},
|
|
@@ -1083,51 +1196,42 @@ const toastPositionVariants: Array<{
|
|
|
1083
1196
|
label: string;
|
|
1084
1197
|
tone: ToastTone;
|
|
1085
1198
|
message: string;
|
|
1086
|
-
background?: string;
|
|
1087
|
-
blur?: number | string | false;
|
|
1088
1199
|
}> = [
|
|
1089
1200
|
{
|
|
1090
1201
|
position: 'top-left',
|
|
1091
1202
|
label: 'Status synced',
|
|
1092
1203
|
tone: 'success',
|
|
1093
|
-
message: '
|
|
1094
|
-
blur: 14,
|
|
1204
|
+
message: 'Default glass toast from the left edge.',
|
|
1095
1205
|
},
|
|
1096
1206
|
{
|
|
1097
1207
|
position: 'top-center',
|
|
1098
1208
|
label: 'Command ready',
|
|
1099
1209
|
tone: 'info',
|
|
1100
|
-
message: 'Centered toast
|
|
1101
|
-
background: 'rgb(18 28 42 / 88%)',
|
|
1102
|
-
blur: 10,
|
|
1210
|
+
message: 'Centered toast uses the same glass surface.',
|
|
1103
1211
|
},
|
|
1104
1212
|
{
|
|
1105
1213
|
position: 'top-right',
|
|
1106
1214
|
label: 'Needs attention',
|
|
1107
1215
|
tone: 'warning',
|
|
1108
|
-
message: 'Right edge
|
|
1109
|
-
blur: 12,
|
|
1216
|
+
message: 'Right edge toast keeps the same translucent surface.',
|
|
1110
1217
|
},
|
|
1111
1218
|
{
|
|
1112
1219
|
position: 'bottom-left',
|
|
1113
1220
|
label: 'Import queued',
|
|
1114
1221
|
tone: 'info',
|
|
1115
|
-
message: '
|
|
1116
|
-
blur: false,
|
|
1222
|
+
message: 'Bottom left toast keeps the same theme blur.',
|
|
1117
1223
|
},
|
|
1118
1224
|
{
|
|
1119
1225
|
position: 'bottom-center',
|
|
1120
1226
|
label: 'Batch completed',
|
|
1121
1227
|
tone: 'success',
|
|
1122
|
-
message: 'Bottom center
|
|
1123
|
-
blur: 16,
|
|
1228
|
+
message: 'Bottom center toast uses the theme defaults.',
|
|
1124
1229
|
},
|
|
1125
1230
|
{
|
|
1126
1231
|
position: 'bottom-right',
|
|
1127
1232
|
label: 'Export failed',
|
|
1128
1233
|
tone: 'danger',
|
|
1129
1234
|
message: 'Actionable toast from the right edge.',
|
|
1130
|
-
blur: 12,
|
|
1131
1235
|
},
|
|
1132
1236
|
];
|
|
1133
1237
|
|
|
@@ -1139,7 +1243,7 @@ const toastPositionVariants: Array<{
|
|
|
1139
1243
|
onClick={() =>
|
|
1140
1244
|
toast.info({
|
|
1141
1245
|
title: item.label,
|
|
1142
|
-
message: 'Positioned toast with
|
|
1246
|
+
message: 'Positioned toast with the default glass surface.',
|
|
1143
1247
|
position: item.position,
|
|
1144
1248
|
duration: 3600,
|
|
1145
1249
|
})
|
|
@@ -1161,8 +1265,6 @@ const toastPositionVariants: Array<{
|
|
|
1161
1265
|
message: item.message,
|
|
1162
1266
|
position: item.position,
|
|
1163
1267
|
tone: item.tone,
|
|
1164
|
-
background: item.background,
|
|
1165
|
-
blur: item.blur,
|
|
1166
1268
|
duration: 4200 + index * 220,
|
|
1167
1269
|
});
|
|
1168
1270
|
}, index * 120);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exampleData.d.ts","sourceRoot":"","sources":["../../src/example/exampleData.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"exampleData.d.ts","sourceRoot":"","sources":["../../src/example/exampleData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,IAAI,CAAC;AAErF,MAAM,MAAM,cAAc,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,EAoFtC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,cAAc,EAA8C,CAAC;AACpF,eAAO,MAAM,aAAa,+BAAyD,CAAC;AA0GpF,MAAM,MAAM,YAAY,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAgBF,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,iBAErD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,wBAEtD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe;;;IAEpD;AAMD,wBAAsB,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;GAgBzF"}
|
|
@@ -6,7 +6,7 @@ export const navGroups = [
|
|
|
6
6
|
items: [
|
|
7
7
|
{ id: 'theme', label: 'Themes' },
|
|
8
8
|
{ id: 'foundations', label: 'Foundations' },
|
|
9
|
-
{ id: '
|
|
9
|
+
{ id: 'text', label: 'Text' },
|
|
10
10
|
{ id: 'skeleton-example', label: 'Skeleton' },
|
|
11
11
|
{ id: 'icon-text-example', label: 'IconText' },
|
|
12
12
|
],
|
|
@@ -33,6 +33,8 @@ export const navGroups = [
|
|
|
33
33
|
{ id: 'icon-text-buttons-example', label: 'Icon text buttons' },
|
|
34
34
|
{ id: 'icon-buttons-example', label: 'Icon buttons' },
|
|
35
35
|
{ id: 'context-menu-example', label: 'Context menu' },
|
|
36
|
+
{ id: 'state-card-example', label: 'StateCard' },
|
|
37
|
+
{ id: 'badges-example', label: 'Badge' },
|
|
36
38
|
],
|
|
37
39
|
},
|
|
38
40
|
{
|
|
@@ -55,14 +57,6 @@ export const navGroups = [
|
|
|
55
57
|
{ id: 'tabs-example', label: 'Tabs' },
|
|
56
58
|
],
|
|
57
59
|
},
|
|
58
|
-
{
|
|
59
|
-
key: 'states',
|
|
60
|
-
label: 'States',
|
|
61
|
-
items: [
|
|
62
|
-
{ id: 'state-card-example', label: 'StateCard' },
|
|
63
|
-
{ id: 'badges-example', label: 'Badge' },
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
60
|
{
|
|
67
61
|
key: 'data',
|
|
68
62
|
label: 'Data',
|
|
@@ -127,7 +121,7 @@ const ruCommandItems = [
|
|
|
127
121
|
group: 'Навигация',
|
|
128
122
|
},
|
|
129
123
|
{
|
|
130
|
-
key: 'open-
|
|
124
|
+
key: 'open-queue',
|
|
131
125
|
label: 'Открыть очередь',
|
|
132
126
|
description: 'Перейти к рабочей очереди.',
|
|
133
127
|
shortcut: 'G D',
|
|
@@ -164,7 +158,7 @@ const enCommandItems = [
|
|
|
164
158
|
group: 'Navigation',
|
|
165
159
|
},
|
|
166
160
|
{
|
|
167
|
-
key: 'open-
|
|
161
|
+
key: 'open-queue',
|
|
168
162
|
label: 'Open queue',
|
|
169
163
|
description: 'Go to the work queue.',
|
|
170
164
|
shortcut: 'G D',
|