@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,16 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { LuBell, LuCheck, LuExternalLink, LuRefreshCw, LuTrash2, } from 'react-icons/lu';
|
|
5
|
-
import { AppShell, AppShellContent, AppShellHeader,
|
|
6
|
-
import { LayoutSection,
|
|
3
|
+
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { LuBell, LuCheck, LuExternalLink, LuLanguages, LuRefreshCw, LuTrash2, } from 'react-icons/lu';
|
|
5
|
+
import { AppShell, AppShellContent, AppShellHeader, AppSidebar, IconButton, Menu, OrcestrUiProvider, ScrollArea, useOrcestrTheme, useToast, } from '..';
|
|
6
|
+
import { LayoutSection, TextSection } from './ExampleBasicsSections';
|
|
7
7
|
import { ActionsSection } from './ExampleActionsSection';
|
|
8
|
+
import { ApplicationSection } from './ExampleApplicationSection';
|
|
8
9
|
import { FieldsSection } from './ExampleFieldsSection';
|
|
9
10
|
import { SelectionSection } from './ExampleSelectionSection';
|
|
10
11
|
import { DataSection } from './ExampleDataSection';
|
|
11
12
|
import { OverlaysSection } from './ExampleOverlaysSection';
|
|
12
13
|
import { FoundationsSection } from './ExampleFoundationsSection';
|
|
13
|
-
import { IconTextSection, StateCardSection } from './ExampleStateSection';
|
|
14
|
+
import { BadgeSection, IconTextSection, StateCardSection } from './ExampleStateSection';
|
|
14
15
|
import { ExampleThemePlayground, getThemePlaygroundPreset, themePlaygroundPresets, themePresetLabel, themePresetPreviewStyle, } from './ExampleThemePlayground';
|
|
15
16
|
import { CodePreviewModal } from './CodePreview';
|
|
16
17
|
import { ExampleOverlays } from './ExampleOverlays';
|
|
@@ -21,6 +22,18 @@ const UI_EXAMPLE_SCROLL_LEAD = 50;
|
|
|
21
22
|
const UI_EXAMPLE_ACTIVE_PROBE_OFFSET = UI_EXAMPLE_SCROLL_LEAD + 220;
|
|
22
23
|
const UI_EXAMPLE_CLICK_TARGET_TOP_TOLERANCE = 180;
|
|
23
24
|
const UI_EXAMPLE_SCROLL_LOCK_TIMEOUT_MS = 1600;
|
|
25
|
+
const MemoFoundationsSection = memo(FoundationsSection);
|
|
26
|
+
const MemoTextSection = memo(TextSection);
|
|
27
|
+
const MemoIconTextSection = memo(IconTextSection);
|
|
28
|
+
const MemoLayoutSection = memo(LayoutSection);
|
|
29
|
+
const MemoActionsSection = memo(ActionsSection);
|
|
30
|
+
const MemoFieldsSection = memo(FieldsSection);
|
|
31
|
+
const MemoSelectionSection = memo(SelectionSection);
|
|
32
|
+
const MemoStateCardSection = memo(StateCardSection);
|
|
33
|
+
const MemoBadgeSection = memo(BadgeSection);
|
|
34
|
+
const MemoDataSection = memo(DataSection);
|
|
35
|
+
const MemoOverlaysSection = memo(OverlaysSection);
|
|
36
|
+
const MemoApplicationSection = memo(ApplicationSection);
|
|
24
37
|
function scrollUiExampleSection(id, behavior = 'auto') {
|
|
25
38
|
const node = document.getElementById(id);
|
|
26
39
|
const scrollRoot = document.querySelector('.oui-app-shell-content-scroll .oui-scroll-area-viewport');
|
|
@@ -56,6 +69,7 @@ function UiExampleContent({ activePresetId, onThemePresetChange, onThemeOverride
|
|
|
56
69
|
const [selectPlainValue, setSelectPlainValue] = useState('blocked');
|
|
57
70
|
const [comboValue, setComboValue] = useState('ready');
|
|
58
71
|
const [entityValue, setEntityValue] = useState(null);
|
|
72
|
+
const [paginatedValue, setPaginatedValue] = useState(null);
|
|
59
73
|
const [ownerValues, setOwnerValues] = useState(['anna', 'ops']);
|
|
60
74
|
const [radioValue, setRadioValue] = useState('manual');
|
|
61
75
|
const [tabValue, setTabValue] = useState('overview');
|
|
@@ -77,6 +91,7 @@ function UiExampleContent({ activePresetId, onThemePresetChange, onThemeOverride
|
|
|
77
91
|
from: '2026-06-01',
|
|
78
92
|
to: '2026-06-26',
|
|
79
93
|
});
|
|
94
|
+
const openPalette = useCallback(() => setPaletteOpen(true), []);
|
|
80
95
|
useEffect(() => {
|
|
81
96
|
document.documentElement.classList.add('oui-ui-document-lock');
|
|
82
97
|
document.body.classList.add('oui-ui-document-lock');
|
|
@@ -171,7 +186,7 @@ function UiExampleContent({ activePresetId, onThemePresetChange, onThemeOverride
|
|
|
171
186
|
},
|
|
172
187
|
];
|
|
173
188
|
}, [locale, toast]);
|
|
174
|
-
return (_jsxs(AppShell, { sidebarOpen: mobileNavOpen, onSidebarOpenChange: setMobileNavOpen, header: _jsx(AppShellHeader, {
|
|
189
|
+
return (_jsxs(AppShell, { sidebarOpen: mobileNavOpen, onSidebarOpenChange: setMobileNavOpen, header: _jsx(AppShellHeader, { sidebarOpen: mobileNavOpen, onSidebarOpenChange: setMobileNavOpen, navigationVisibility: 'mobile', actions: _jsx(UiExampleHeaderActions, { compact: true, locale: locale, onLocaleChange: onLocaleChange }) }), sidebar: _jsx(UiExampleSidebar, { onNavigate: () => setMobileNavOpen(false) }), children: [_jsxs("div", { className: 'oui-ui-workspace', children: [_jsx("div", { className: 'oui-ui-workspace-main', children: _jsxs(AppShellContent, { children: [_jsx(ExampleThemePlayground, { activePresetId: activePresetId, theme: theme, locale: locale, onPresetChange: onThemePresetChange, onThemeOverridesChange: onThemeOverridesChange }), _jsx(MemoFoundationsSection, { onOpenCode: setCodeExample }), _jsx(MemoTextSection, { onOpenCode: setCodeExample }), _jsx(MemoIconTextSection, { onOpenCode: setCodeExample }), _jsx(MemoLayoutSection, { onOpenCode: setCodeExample }), _jsx(MemoActionsSection, { menuItems: menuItems, onOpenCode: setCodeExample, onOpenPalette: openPalette }), _jsx(MemoFieldsSection, { stepperValue: stepperValue, onStepperValueChange: setStepperValue, dateValue: dateValue, onDateValueChange: setDateValue, dateRange: dateRange, onDateRangeChange: setDateRange, onOpenCode: setCodeExample }), _jsx(MemoSelectionSection, { locale: locale, segment: segment, onSegmentChange: setSegment, selectValue: selectValue, onSelectValueChange: setSelectValue, selectNoChevronValue: selectNoChevronValue, onSelectNoChevronValueChange: setSelectNoChevronValue, selectPlainValue: selectPlainValue, onSelectPlainValueChange: setSelectPlainValue, comboValue: comboValue, onComboValueChange: setComboValue, entityValue: entityValue, onEntityValueChange: setEntityValue, paginatedValue: paginatedValue, onPaginatedValueChange: setPaginatedValue, ownerValues: ownerValues, onOwnerValuesChange: setOwnerValues, radioValue: radioValue, onRadioValueChange: setRadioValue, tabValue: tabValue, onTabValueChange: setTabValue, onOpenCode: setCodeExample, onToast: toast.push }), _jsx(MemoStateCardSection, { onOpenCode: setCodeExample }), _jsx(MemoBadgeSection, { onOpenCode: setCodeExample }), _jsx(MemoDataSection, { onOpenCode: setCodeExample }), _jsx(MemoOverlaysSection, { setModalOpen: setModalOpen, setBlurModalOpen: setBlurModalOpen, setFastModalOpen: setFastModalOpen, setRiseModalOpen: setRiseModalOpen, setSlowModalOpen: setSlowModalOpen, setDangerModalOpen: setDangerModalOpen, onOpenCode: setCodeExample }), _jsx(MemoApplicationSection, { onOpenCode: setCodeExample })] }) }), _jsx(UiExampleThemeRail, { activePresetId: activePresetId, locale: locale, onThemePresetChange: onThemePresetChange })] }), _jsx(CodePreviewModal, { example: codeExample, onClose: () => setCodeExample(null) }), _jsx(ExampleOverlays, { locale: locale, modalOpen: modalOpen, setModalOpen: setModalOpen, nestedOpen: nestedOpen, setNestedOpen: setNestedOpen, blurModalOpen: blurModalOpen, setBlurModalOpen: setBlurModalOpen, blurNestedOpen: blurNestedOpen, setBlurNestedOpen: setBlurNestedOpen, blurFinalOpen: blurFinalOpen, setBlurFinalOpen: setBlurFinalOpen, fastModalOpen: fastModalOpen, setFastModalOpen: setFastModalOpen, slowModalOpen: slowModalOpen, setSlowModalOpen: setSlowModalOpen, riseModalOpen: riseModalOpen, setRiseModalOpen: setRiseModalOpen, dangerModalOpen: dangerModalOpen, setDangerModalOpen: setDangerModalOpen, paletteOpen: paletteOpen, setPaletteOpen: setPaletteOpen, onToast: toast.push })] }));
|
|
175
190
|
}
|
|
176
191
|
function UiExampleThemeRail({ activePresetId, locale, onThemePresetChange, }) {
|
|
177
192
|
const presets = useMemo(() => {
|
|
@@ -277,11 +292,11 @@ function UiExampleSidebar({ onNavigate }) {
|
|
|
277
292
|
setActiveSectionValue(id);
|
|
278
293
|
lockScrollNavigationTarget(id);
|
|
279
294
|
window.history.replaceState(null, '', `#${id}`);
|
|
280
|
-
scrollUiExampleSection(id);
|
|
295
|
+
scrollUiExampleSection(id, 'smooth');
|
|
281
296
|
onNavigate();
|
|
282
297
|
}, [lockScrollNavigationTarget, onNavigate, setActiveSectionValue]);
|
|
283
298
|
const sidebarNavGroups = useMemo(() => navGroups.map((group) => ({
|
|
284
|
-
|
|
299
|
+
key: group.key,
|
|
285
300
|
items: group.items.map((item) => ({
|
|
286
301
|
key: item.id,
|
|
287
302
|
label: item.label,
|
|
@@ -289,22 +304,27 @@ function UiExampleSidebar({ onNavigate }) {
|
|
|
289
304
|
onSelect: () => navigateToSection(item.id),
|
|
290
305
|
})),
|
|
291
306
|
})), [activeSection, navigateToSection]);
|
|
292
|
-
return (_jsx(
|
|
293
|
-
}
|
|
294
|
-
function UiExampleTopBar({ locale, onLocaleChange, }) {
|
|
295
|
-
const title = locale === 'ru'
|
|
296
|
-
? 'Единый язык компонентов для всех модулей.'
|
|
297
|
-
: 'One component language for every module.';
|
|
298
|
-
const subtitle = locale === 'ru'
|
|
299
|
-
? 'Одна тема, предсказуемый интерфейс.'
|
|
300
|
-
: 'One theme, predictable interface.';
|
|
301
|
-
return (_jsxs("header", { className: 'oui-ui-topbar', children: [_jsxs("div", { className: 'oui-ui-topbar-slogan', children: [_jsx("strong", { children: title }), _jsx("span", { children: subtitle })] }), _jsx(UiExampleHeaderActions, { locale: locale, onLocaleChange: onLocaleChange })] }));
|
|
307
|
+
return (_jsx(AppSidebar, { className: 'oui-ui-main-sidebar', header: _jsx(UiExampleBrand, {}), itemH: 34, groups: sidebarNavGroups }));
|
|
302
308
|
}
|
|
303
309
|
function UiExampleBrand({ compact = false }) {
|
|
304
310
|
return (_jsxs("div", { className: 'oui-ui-brand', "data-compact": compact ? 'true' : undefined, children: [_jsx("span", { className: 'oui-ui-brand-mark', "aria-hidden": 'true', children: _jsx("img", { className: 'oui-ui-brand-logo', src: ORCESTR_LOGO_SRC, alt: '' }) }), _jsx("span", { className: 'oui-ui-brand-text', children: _jsx("strong", { children: "Orcestr UI" }) })] }));
|
|
305
311
|
}
|
|
306
312
|
function UiExampleHeaderActions({ compact = false, locale, onLocaleChange, }) {
|
|
307
|
-
|
|
313
|
+
const languageItems = useMemo(() => [
|
|
314
|
+
{
|
|
315
|
+
key: 'ru',
|
|
316
|
+
label: 'RU',
|
|
317
|
+
icon: locale === 'ru' ? _jsx(LuCheck, { size: 14 }) : undefined,
|
|
318
|
+
onSelect: () => onLocaleChange('ru'),
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
key: 'en',
|
|
322
|
+
label: 'EN',
|
|
323
|
+
icon: locale === 'en' ? _jsx(LuCheck, { size: 14 }) : undefined,
|
|
324
|
+
onSelect: () => onLocaleChange('en'),
|
|
325
|
+
},
|
|
326
|
+
], [locale, onLocaleChange]);
|
|
327
|
+
return (_jsxs("div", { className: 'oui-ui-header-actions', "data-compact": compact ? 'true' : undefined, children: [_jsx(Menu, { items: languageItems, trigger: _jsx(IconButton, { className: 'oui-ui-language-button', size: 2, v: 'pad', icon: _jsx(LuLanguages, { size: 16 }), "aria-label": `Language: ${locale.toUpperCase()}` }) }), _jsxs("a", { className: 'oui-ui-header-link', href: 'https://github.com/Artasov/orcestr', target: '_blank', rel: 'noreferrer', children: [_jsx(LuExternalLink, { size: 14, "aria-hidden": true }), _jsx("span", { children: "GitHub" })] })] }));
|
|
308
328
|
}
|
|
309
329
|
export function UiExamplePage({ locale: controlledLocale, defaultLocale = 'ru', onLocaleChange, } = {}) {
|
|
310
330
|
const firstPreset = getThemePlaygroundPreset('orcestr-dark');
|
|
@@ -3,7 +3,7 @@ export type CodeExample = {
|
|
|
3
3
|
code: string;
|
|
4
4
|
};
|
|
5
5
|
export declare const codeSamples: {
|
|
6
|
-
|
|
6
|
+
text: string;
|
|
7
7
|
skeleton: string;
|
|
8
8
|
appShell: string;
|
|
9
9
|
layoutFlex: string;
|
|
@@ -13,9 +13,13 @@ export declare const codeSamples: {
|
|
|
13
13
|
highlights: string;
|
|
14
14
|
scrollArea: string;
|
|
15
15
|
systemRadius: string;
|
|
16
|
+
surfaces: string;
|
|
16
17
|
buttons: string;
|
|
17
18
|
iconButtons: string;
|
|
19
|
+
iconTextButton: string;
|
|
20
|
+
contextMenu: string;
|
|
18
21
|
textFields: string;
|
|
22
|
+
inlineEdit: string;
|
|
19
23
|
groupedFields: string;
|
|
20
24
|
numberAndDateFields: string;
|
|
21
25
|
dateRangeFields: string;
|
|
@@ -25,6 +29,9 @@ export declare const codeSamples: {
|
|
|
25
29
|
overlays: string;
|
|
26
30
|
toast: string;
|
|
27
31
|
overlaySettings: string;
|
|
32
|
+
tablePagination: string;
|
|
33
|
+
appSidebar: string;
|
|
34
|
+
specialModal: string;
|
|
28
35
|
data: string;
|
|
29
36
|
};
|
|
30
37
|
//# sourceMappingURL=codeSamples.d.ts.map
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAq6Cc,CAAC"}
|