@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
|
@@ -32,17 +32,17 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
32
32
|
readonly previewText: "#f4f6f8";
|
|
33
33
|
readonly group: "dark";
|
|
34
34
|
}, {
|
|
35
|
-
readonly id: "
|
|
35
|
+
readonly id: "deliveries-dark";
|
|
36
36
|
readonly label: {
|
|
37
|
-
readonly ru: "
|
|
38
|
-
readonly en: "
|
|
37
|
+
readonly ru: "Deliveries";
|
|
38
|
+
readonly en: "Deliveries";
|
|
39
39
|
};
|
|
40
40
|
readonly description: {
|
|
41
41
|
readonly ru: "Плотная тема для повторяющейся операционной работы.";
|
|
42
|
-
readonly en: "Dense theme for
|
|
42
|
+
readonly en: "Dense theme for deliveries workflows.";
|
|
43
43
|
};
|
|
44
44
|
readonly mode: "dark";
|
|
45
|
-
readonly surface: "
|
|
45
|
+
readonly surface: "deliveries";
|
|
46
46
|
readonly accent: "#34d399";
|
|
47
47
|
readonly previewBg: "#07140f";
|
|
48
48
|
readonly previewPanel: "#0d2119";
|
|
@@ -159,24 +159,24 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
159
159
|
readonly surface: "#122f3a";
|
|
160
160
|
};
|
|
161
161
|
};
|
|
162
|
-
readonly
|
|
162
|
+
readonly radius: {
|
|
163
163
|
readonly md: "5px";
|
|
164
164
|
readonly lg: "7px";
|
|
165
165
|
readonly xl: "10px";
|
|
166
166
|
};
|
|
167
167
|
};
|
|
168
168
|
}, {
|
|
169
|
-
readonly id: "
|
|
169
|
+
readonly id: "beauty-dark";
|
|
170
170
|
readonly label: {
|
|
171
|
-
readonly ru: "
|
|
172
|
-
readonly en: "
|
|
171
|
+
readonly ru: "Beauty dark";
|
|
172
|
+
readonly en: "Beauty dark";
|
|
173
173
|
};
|
|
174
174
|
readonly description: {
|
|
175
175
|
readonly ru: "Мягкая темная тема для контентных интерфейсов.";
|
|
176
176
|
readonly en: "Soft dark theme for content-heavy interfaces.";
|
|
177
177
|
};
|
|
178
178
|
readonly mode: "dark";
|
|
179
|
-
readonly surface: "
|
|
179
|
+
readonly surface: "beauty";
|
|
180
180
|
readonly accent: "#f0a6d8";
|
|
181
181
|
readonly previewBg: "#141116";
|
|
182
182
|
readonly previewPanel: "#1d1820";
|
|
@@ -204,17 +204,17 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
204
204
|
};
|
|
205
205
|
};
|
|
206
206
|
}, {
|
|
207
|
-
readonly id: "
|
|
207
|
+
readonly id: "jewelry-dark";
|
|
208
208
|
readonly label: {
|
|
209
|
-
readonly ru: "
|
|
210
|
-
readonly en: "
|
|
209
|
+
readonly ru: "Jewelry dark";
|
|
210
|
+
readonly en: "Jewelry dark";
|
|
211
211
|
};
|
|
212
212
|
readonly description: {
|
|
213
213
|
readonly ru: "Точная темная тема для структурированных каталогов.";
|
|
214
214
|
readonly en: "Precise dark theme for structured index surfaces.";
|
|
215
215
|
};
|
|
216
216
|
readonly mode: "dark";
|
|
217
|
-
readonly surface: "
|
|
217
|
+
readonly surface: "jewelry";
|
|
218
218
|
readonly accent: "#e6c26a";
|
|
219
219
|
readonly previewBg: "#11100d";
|
|
220
220
|
readonly previewPanel: "#191712";
|
|
@@ -276,17 +276,17 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
276
276
|
readonly previewText: "#111827";
|
|
277
277
|
readonly group: "light";
|
|
278
278
|
}, {
|
|
279
|
-
readonly id: "
|
|
279
|
+
readonly id: "deliveries-light";
|
|
280
280
|
readonly label: {
|
|
281
|
-
readonly ru: "
|
|
282
|
-
readonly en: "
|
|
281
|
+
readonly ru: "Deliveries light";
|
|
282
|
+
readonly en: "Deliveries light";
|
|
283
283
|
};
|
|
284
284
|
readonly description: {
|
|
285
285
|
readonly ru: "Плотная светлая тема для повторяющейся операционной работы.";
|
|
286
286
|
readonly en: "Dense light theme for repeated operational work.";
|
|
287
287
|
};
|
|
288
288
|
readonly mode: "light";
|
|
289
|
-
readonly surface: "
|
|
289
|
+
readonly surface: "deliveries";
|
|
290
290
|
readonly accent: "#047857";
|
|
291
291
|
readonly previewBg: "#eefbf4";
|
|
292
292
|
readonly previewPanel: "#ffffff";
|
|
@@ -308,17 +308,17 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
308
308
|
};
|
|
309
309
|
};
|
|
310
310
|
}, {
|
|
311
|
-
readonly id: "
|
|
311
|
+
readonly id: "beauty-light";
|
|
312
312
|
readonly label: {
|
|
313
|
-
readonly ru: "
|
|
314
|
-
readonly en: "
|
|
313
|
+
readonly ru: "Beauty light";
|
|
314
|
+
readonly en: "Beauty light";
|
|
315
315
|
};
|
|
316
316
|
readonly description: {
|
|
317
317
|
readonly ru: "Мягкая светлая тема для контентных интерфейсов.";
|
|
318
318
|
readonly en: "Soft light theme for content-heavy interfaces.";
|
|
319
319
|
};
|
|
320
320
|
readonly mode: "light";
|
|
321
|
-
readonly surface: "
|
|
321
|
+
readonly surface: "beauty";
|
|
322
322
|
readonly accent: "#db2777";
|
|
323
323
|
readonly previewBg: "#fff1f8";
|
|
324
324
|
readonly previewPanel: "#ffffff";
|
|
@@ -340,17 +340,17 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
340
340
|
};
|
|
341
341
|
};
|
|
342
342
|
}, {
|
|
343
|
-
readonly id: "
|
|
343
|
+
readonly id: "jewelry-light";
|
|
344
344
|
readonly label: {
|
|
345
|
-
readonly ru: "
|
|
346
|
-
readonly en: "
|
|
345
|
+
readonly ru: "Jewelry light";
|
|
346
|
+
readonly en: "Jewelry light";
|
|
347
347
|
};
|
|
348
348
|
readonly description: {
|
|
349
349
|
readonly ru: "Теплая светлая тема для структурированных каталогов.";
|
|
350
350
|
readonly en: "Warm light theme for structured index surfaces.";
|
|
351
351
|
};
|
|
352
352
|
readonly mode: "light";
|
|
353
|
-
readonly surface: "
|
|
353
|
+
readonly surface: "jewelry";
|
|
354
354
|
readonly accent: "#9b6f12";
|
|
355
355
|
readonly previewBg: "#fbfaf6";
|
|
356
356
|
readonly previewPanel: "#ffffff";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleThemePlayground.d.ts","sourceRoot":"","sources":["../../src/example/ExampleThemePlayground.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"ExampleThemePlayground.d.ts","sourceRoot":"","sources":["../../src/example/ExampleThemePlayground.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAEpG,OAAO,EAOH,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EAExB,KAAK,eAAe,EACvB,MAAM,IAAI,CAAC;AAEZ,KAAK,aAAa,GAAG,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,CAAC;IACrB,WAAW,EAAE,aAAa,CAAC;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyaY,CAAC;AAOhD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAE1E,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,aAAa,GAAG,WAAW,CAEvE;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,UAE5E;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,UAElF;AA0GD,wBAAgB,sBAAsB,CAAC,EACnC,cAAc,EACd,KAAK,EACL,MAAM,EACN,cAAc,EACd,sBAAsB,GACzB,EAAE;IACC,cAAc,EAAE,aAAa,CAAC;IAC9B,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;IACxB,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,sBAAsB,EAAE,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC,CAAC;CAC3E,2CAwFA;AAED,wBAAgB,mBAAmB,CAAC,EAChC,cAAc,EACd,MAAM,EACN,cAAc,GACjB,EAAE;IACC,cAAc,EAAE,aAAa,CAAC;IAC9B,MAAM,EAAE,eAAe,CAAC;IACxB,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CACjD,2CAoDA;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,GAMlD,aAAa,CACrB"}
|
|
@@ -22,17 +22,17 @@ export const themePlaygroundPresets = [
|
|
|
22
22
|
group: 'dark',
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
id: '
|
|
25
|
+
id: 'deliveries-dark',
|
|
26
26
|
label: {
|
|
27
|
-
ru: '
|
|
28
|
-
en: '
|
|
27
|
+
ru: 'Deliveries',
|
|
28
|
+
en: 'Deliveries',
|
|
29
29
|
},
|
|
30
30
|
description: {
|
|
31
31
|
ru: 'Плотная тема для повторяющейся операционной работы.',
|
|
32
|
-
en: 'Dense theme for
|
|
32
|
+
en: 'Dense theme for deliveries workflows.',
|
|
33
33
|
},
|
|
34
34
|
mode: 'dark',
|
|
35
|
-
surface: '
|
|
35
|
+
surface: 'deliveries',
|
|
36
36
|
accent: '#34d399',
|
|
37
37
|
previewBg: '#07140f',
|
|
38
38
|
previewPanel: '#0d2119',
|
|
@@ -151,7 +151,7 @@ export const themePlaygroundPresets = [
|
|
|
151
151
|
surface: '#122f3a',
|
|
152
152
|
},
|
|
153
153
|
},
|
|
154
|
-
|
|
154
|
+
radius: {
|
|
155
155
|
md: '5px',
|
|
156
156
|
lg: '7px',
|
|
157
157
|
xl: '10px',
|
|
@@ -159,17 +159,17 @@ export const themePlaygroundPresets = [
|
|
|
159
159
|
},
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
|
-
id: '
|
|
162
|
+
id: 'beauty-dark',
|
|
163
163
|
label: {
|
|
164
|
-
ru: '
|
|
165
|
-
en: '
|
|
164
|
+
ru: 'Beauty dark',
|
|
165
|
+
en: 'Beauty dark',
|
|
166
166
|
},
|
|
167
167
|
description: {
|
|
168
168
|
ru: 'Мягкая темная тема для контентных интерфейсов.',
|
|
169
169
|
en: 'Soft dark theme for content-heavy interfaces.',
|
|
170
170
|
},
|
|
171
171
|
mode: 'dark',
|
|
172
|
-
surface: '
|
|
172
|
+
surface: 'beauty',
|
|
173
173
|
accent: '#f0a6d8',
|
|
174
174
|
previewBg: '#141116',
|
|
175
175
|
previewPanel: '#1d1820',
|
|
@@ -198,17 +198,17 @@ export const themePlaygroundPresets = [
|
|
|
198
198
|
},
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
|
-
id: '
|
|
201
|
+
id: 'jewelry-dark',
|
|
202
202
|
label: {
|
|
203
|
-
ru: '
|
|
204
|
-
en: '
|
|
203
|
+
ru: 'Jewelry dark',
|
|
204
|
+
en: 'Jewelry dark',
|
|
205
205
|
},
|
|
206
206
|
description: {
|
|
207
207
|
ru: 'Точная темная тема для структурированных каталогов.',
|
|
208
208
|
en: 'Precise dark theme for structured index surfaces.',
|
|
209
209
|
},
|
|
210
210
|
mode: 'dark',
|
|
211
|
-
surface: '
|
|
211
|
+
surface: 'jewelry',
|
|
212
212
|
accent: '#e6c26a',
|
|
213
213
|
previewBg: '#11100d',
|
|
214
214
|
previewPanel: '#191712',
|
|
@@ -273,17 +273,17 @@ export const themePlaygroundPresets = [
|
|
|
273
273
|
group: 'light',
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
|
-
id: '
|
|
276
|
+
id: 'deliveries-light',
|
|
277
277
|
label: {
|
|
278
|
-
ru: '
|
|
279
|
-
en: '
|
|
278
|
+
ru: 'Deliveries light',
|
|
279
|
+
en: 'Deliveries light',
|
|
280
280
|
},
|
|
281
281
|
description: {
|
|
282
282
|
ru: 'Плотная светлая тема для повторяющейся операционной работы.',
|
|
283
283
|
en: 'Dense light theme for repeated operational work.',
|
|
284
284
|
},
|
|
285
285
|
mode: 'light',
|
|
286
|
-
surface: '
|
|
286
|
+
surface: 'deliveries',
|
|
287
287
|
accent: '#047857',
|
|
288
288
|
previewBg: '#eefbf4',
|
|
289
289
|
previewPanel: '#ffffff',
|
|
@@ -306,17 +306,17 @@ export const themePlaygroundPresets = [
|
|
|
306
306
|
},
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
|
-
id: '
|
|
309
|
+
id: 'beauty-light',
|
|
310
310
|
label: {
|
|
311
|
-
ru: '
|
|
312
|
-
en: '
|
|
311
|
+
ru: 'Beauty light',
|
|
312
|
+
en: 'Beauty light',
|
|
313
313
|
},
|
|
314
314
|
description: {
|
|
315
315
|
ru: 'Мягкая светлая тема для контентных интерфейсов.',
|
|
316
316
|
en: 'Soft light theme for content-heavy interfaces.',
|
|
317
317
|
},
|
|
318
318
|
mode: 'light',
|
|
319
|
-
surface: '
|
|
319
|
+
surface: 'beauty',
|
|
320
320
|
accent: '#db2777',
|
|
321
321
|
previewBg: '#fff1f8',
|
|
322
322
|
previewPanel: '#ffffff',
|
|
@@ -339,17 +339,17 @@ export const themePlaygroundPresets = [
|
|
|
339
339
|
},
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
|
-
id: '
|
|
342
|
+
id: 'jewelry-light',
|
|
343
343
|
label: {
|
|
344
|
-
ru: '
|
|
345
|
-
en: '
|
|
344
|
+
ru: 'Jewelry light',
|
|
345
|
+
en: 'Jewelry light',
|
|
346
346
|
},
|
|
347
347
|
description: {
|
|
348
348
|
ru: 'Теплая светлая тема для структурированных каталогов.',
|
|
349
349
|
en: 'Warm light theme for structured index surfaces.',
|
|
350
350
|
},
|
|
351
351
|
mode: 'light',
|
|
352
|
-
surface: '
|
|
352
|
+
surface: 'jewelry',
|
|
353
353
|
accent: '#9b6f12',
|
|
354
354
|
previewBg: '#fbfaf6',
|
|
355
355
|
previewPanel: '#ffffff',
|
|
@@ -443,19 +443,28 @@ export function themePresetDescription(preset, locale) {
|
|
|
443
443
|
}
|
|
444
444
|
const flatTokenSections = [
|
|
445
445
|
'colors',
|
|
446
|
-
'
|
|
446
|
+
'radius',
|
|
447
447
|
'spacing',
|
|
448
448
|
'breakpoints',
|
|
449
449
|
'shadows',
|
|
450
|
-
'
|
|
450
|
+
'text',
|
|
451
451
|
'motion',
|
|
452
452
|
'toast',
|
|
453
|
+
'scrollbar',
|
|
453
454
|
'states',
|
|
454
455
|
'density',
|
|
455
456
|
'zIndex',
|
|
456
457
|
'components',
|
|
457
458
|
];
|
|
458
|
-
const statusKeys = [
|
|
459
|
+
const statusKeys = [
|
|
460
|
+
'neutral',
|
|
461
|
+
'primary',
|
|
462
|
+
'secondary',
|
|
463
|
+
'success',
|
|
464
|
+
'warning',
|
|
465
|
+
'danger',
|
|
466
|
+
'info',
|
|
467
|
+
];
|
|
459
468
|
const COLOR_TOKEN_COMMIT_DELAY_MS = 180;
|
|
460
469
|
const themePlaygroundCopy = {
|
|
461
470
|
ru: {
|
|
@@ -471,13 +480,14 @@ const themePlaygroundCopy = {
|
|
|
471
480
|
statuses: 'Статусы',
|
|
472
481
|
tokenSections: {
|
|
473
482
|
colors: 'Цвета',
|
|
474
|
-
|
|
483
|
+
radius: 'Радиус',
|
|
475
484
|
spacing: 'Отступы',
|
|
476
485
|
breakpoints: 'Брейкпоинты',
|
|
477
486
|
shadows: 'Тени',
|
|
478
|
-
|
|
487
|
+
text: 'Текст',
|
|
479
488
|
motion: 'Движение',
|
|
480
489
|
toast: 'Toast',
|
|
490
|
+
scrollbar: 'Scrollbar',
|
|
481
491
|
states: 'Состояния',
|
|
482
492
|
density: 'Плотность',
|
|
483
493
|
zIndex: 'Z-index',
|
|
@@ -497,13 +507,14 @@ const themePlaygroundCopy = {
|
|
|
497
507
|
statuses: 'Statuses',
|
|
498
508
|
tokenSections: {
|
|
499
509
|
colors: 'Colors',
|
|
500
|
-
|
|
510
|
+
radius: 'Radius',
|
|
501
511
|
spacing: 'Spacing',
|
|
502
512
|
breakpoints: 'Breakpoints',
|
|
503
513
|
shadows: 'Shadows',
|
|
504
|
-
|
|
514
|
+
text: 'Text',
|
|
505
515
|
motion: 'Motion',
|
|
506
516
|
toast: 'Toast',
|
|
517
|
+
scrollbar: 'Scrollbar',
|
|
507
518
|
states: 'States',
|
|
508
519
|
density: 'Density',
|
|
509
520
|
zIndex: 'Z-index',
|
|
@@ -514,7 +525,7 @@ const themePlaygroundCopy = {
|
|
|
514
525
|
export function ExampleThemePlayground({ activePresetId, theme, locale, onPresetChange, onThemeOverridesChange, }) {
|
|
515
526
|
const activePreset = getThemePlaygroundPreset(activePresetId);
|
|
516
527
|
const copy = themePlaygroundCopy[locale];
|
|
517
|
-
return (_jsxs("section", { id:
|
|
528
|
+
return (_jsxs("section", { id: "theme", className: "oui-section oui-ui-section", children: [_jsx("div", { className: "oui-ui-section-head", children: _jsxs("div", { children: [_jsx("h2", { className: "oui-ui-section-title", children: copy.title }), _jsx("p", { className: "oui-ui-description", children: copy.description })] }) }), _jsxs("div", { className: "oui-theme-playground", children: [_jsx(Stack, { className: "oui-theme-playground-presets", g: 2, children: _jsx(ThemePresetSelector, { activePresetId: activePreset.id, locale: locale, onPresetChange: onPresetChange }) }), _jsxs("div", { className: "oui-section oui-theme-preview", children: [_jsxs("div", { className: "oui-theme-preview-head", children: [_jsx(Text, { fw: 760, children: copy.tokenEditor }), _jsx(Button, { size: 1, v: "surface", onClick: () => onPresetChange(activePreset), children: copy.resetPreset })] }), _jsxs(ScrollArea, { className: "oui-theme-preview-scroll", highlights: true, highlightColor: "var(--oui-section-nested-solid-bg)", highlightTop: {
|
|
518
529
|
start: 2,
|
|
519
530
|
fadeDistance: 28,
|
|
520
531
|
maxOpacity: 0.94,
|
|
@@ -522,10 +533,10 @@ export function ExampleThemePlayground({ activePresetId, theme, locale, onPreset
|
|
|
522
533
|
start: 2,
|
|
523
534
|
fadeDistance: 28,
|
|
524
535
|
maxOpacity: 0.94,
|
|
525
|
-
}, children: [_jsxs("div", { className:
|
|
536
|
+
}, children: [_jsxs("div", { className: "oui-theme-token-editor", children: [flatTokenSections.map((section) => (_jsx(TokenSection, { title: tokenSectionLabel(section, locale), section: section, values: tokenSectionValues(theme, section), onTokenChange: (key, value) => updateFlatToken(onThemeOverridesChange, section, key, value) }, section))), statusKeys.map((statusKey) => (_jsx(TokenSection, { title: `${copy.statuses} / ${statusKey}`, section: "status", statusKey: statusKey, values: theme.status[statusKey], onTokenChange: (key, value) => updateStatusToken(onThemeOverridesChange, statusKey, key, String(value)) }, `status-${statusKey}`)))] }), _jsxs(Flex, { g: 2, wrap: true, children: [_jsx(Button, { size: 1, children: copy.primaryAction }), _jsx(Button, { size: 1, v: "surface", children: copy.surface }), _jsx(Button, { size: 1, v: "ghost", children: copy.secondary }), _jsx(Badge, { tone: "success", children: copy.ready }), _jsx(Badge, { tone: "warning", children: copy.warning })] })] })] })] })] }));
|
|
526
537
|
}
|
|
527
538
|
export function ThemePresetSelector({ activePresetId, locale, onPresetChange, }) {
|
|
528
|
-
return (_jsx("div", { className:
|
|
539
|
+
return (_jsx("div", { className: "oui-theme-preset-grid", children: themePresetGroups.map((group) => (_jsxs("div", { className: "oui-theme-preset-group", children: [_jsx("div", { className: "oui-theme-preset-group-label", children: group.label[locale] }), _jsx(ScrollArea, { className: "oui-theme-preset-scroll", highlights: true, highlightColor: "var(--oui-section-solid-bg)", highlightTop: {
|
|
529
540
|
start: 1,
|
|
530
541
|
fadeDistance: 18,
|
|
531
542
|
maxOpacity: 0.94,
|
|
@@ -533,9 +544,9 @@ export function ThemePresetSelector({ activePresetId, locale, onPresetChange, })
|
|
|
533
544
|
start: 1,
|
|
534
545
|
fadeDistance: 18,
|
|
535
546
|
maxOpacity: 0.94,
|
|
536
|
-
}, children: _jsx("div", { className:
|
|
547
|
+
}, children: _jsx("div", { className: "oui-theme-preset-list", children: themePlaygroundPresets
|
|
537
548
|
.filter((preset) => preset.group === group.key)
|
|
538
|
-
.map((preset) => (_jsxs("button", { type:
|
|
549
|
+
.map((preset) => (_jsxs("button", { type: "button", className: "oui-theme-preset-card", "data-active": activePresetId === preset.id ? 'true' : undefined, style: themePresetPreviewStyle(preset), onClick: () => onPresetChange(preset), children: [_jsxs("span", { className: "oui-theme-preset-preview", children: [_jsx("span", {}), _jsx("span", {}), _jsx("span", {})] }), _jsxs("span", { className: "oui-theme-preset-body", children: [_jsx("strong", { children: themePresetLabel(preset, locale) }), _jsx("span", { children: themePresetDescription(preset, locale) })] })] }, preset.id))) }) })] }, group.key))) }));
|
|
539
550
|
}
|
|
540
551
|
export function themePresetPreviewStyle(preset) {
|
|
541
552
|
return {
|
|
@@ -546,7 +557,7 @@ export function themePresetPreviewStyle(preset) {
|
|
|
546
557
|
};
|
|
547
558
|
}
|
|
548
559
|
function TokenSection({ title, section, statusKey, values, onTokenChange, }) {
|
|
549
|
-
return (_jsxs("div", { className:
|
|
560
|
+
return (_jsxs("div", { className: "oui-theme-token-section", children: [_jsx(Text, { fs: "12px", fw: 760, tone: "muted", children: title }), _jsx("div", { className: "oui-theme-token-grid", children: Object.entries(values).map(([key, value]) => (_jsx(ThemeTokenControl, { label: readableTokenName(key), path: statusKey ? `${statusKey}.${key}` : key, section: section, value: value, onChange: (next) => onTokenChange(key, next) }, `${title}-${key}`))) })] }));
|
|
550
561
|
}
|
|
551
562
|
function ThemeTokenControl({ label, path, section, value, onChange, }) {
|
|
552
563
|
const valueText = String(value);
|
|
@@ -568,11 +579,14 @@ function ThemeTokenControl({ label, path, section, value, onChange, }) {
|
|
|
568
579
|
return;
|
|
569
580
|
onChange(colorDraft);
|
|
570
581
|
};
|
|
571
|
-
return (_jsxs("div", { className:
|
|
572
|
-
background: visibleColorValue ??
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
582
|
+
return (_jsxs("div", { className: "oui-theme-token oui-theme-token-control", children: [_jsx("span", { className: "oui-theme-token-swatch", style: {
|
|
583
|
+
background: visibleColorValue ??
|
|
584
|
+
(section === 'colors' || section === 'status'
|
|
585
|
+
? valueText
|
|
586
|
+
: 'var(--oui-primary-surface)'),
|
|
587
|
+
}, children: colorInputValue ? (_jsx("input", { className: "oui-theme-token-swatch-input", type: "color", value: visibleColorValue ?? colorInputValue, "aria-label": `${label} color`, onChange: (event) => setColorDraft(event.target.value), onBlur: commitColorDraft })) : null }), _jsxs("span", { className: "oui-theme-token-text", children: [_jsx(Text, { fs: "12px", fw: 700, children: label }), _jsx(Text, { fs: "11px", tone: "muted", children: path })] }), _jsx("span", { className: "oui-theme-token-control-field", children: selectOptions ? (_jsx("select", { value: valueText, "aria-label": label, onChange: (event) => onChange(event.target.value), children: selectOptions.map((option) => (_jsx("option", { value: option, children: option }, option))) })) : (_jsx("input", { type: typeof value === 'number' ? 'number' : 'text', value: valueText, "aria-label": label, onChange: (event) => onChange(typeof value === 'number'
|
|
588
|
+
? Number(event.target.value)
|
|
589
|
+
: event.target.value) })) })] }));
|
|
576
590
|
}
|
|
577
591
|
function updateFlatToken(updateOverrides, section, key, value) {
|
|
578
592
|
if (section === 'colors' && key.includes('.')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiExamplePage.d.ts","sourceRoot":"","sources":["../../src/example/UiExamplePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UiExamplePage.d.ts","sourceRoot":"","sources":["../../src/example/UiExamplePage.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAaH,KAAK,eAAe,EACvB,MAAM,IAAI,CAAC;AAolBZ,MAAM,MAAM,kBAAkB,GAAG;IAC7B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC1B,MAAM,EAAE,gBAAgB,EACxB,aAAoB,EACpB,cAAc,GACjB,GAAE,kBAAuB,2CAmDzB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
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,
|
|
5
|
-
import { AppShell, AppShellContent, AppShellHeader, AppSidebar, OrcestrUiProvider, ScrollArea, useOrcestrTheme, useToast, } from '..';
|
|
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
8
|
import { ApplicationSection } from './ExampleApplicationSection';
|
|
9
9
|
import { FieldsSection } from './ExampleFieldsSection';
|
|
@@ -22,6 +22,18 @@ const UI_EXAMPLE_SCROLL_LEAD = 50;
|
|
|
22
22
|
const UI_EXAMPLE_ACTIVE_PROBE_OFFSET = UI_EXAMPLE_SCROLL_LEAD + 220;
|
|
23
23
|
const UI_EXAMPLE_CLICK_TARGET_TOP_TOLERANCE = 180;
|
|
24
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);
|
|
25
37
|
function scrollUiExampleSection(id, behavior = 'auto') {
|
|
26
38
|
const node = document.getElementById(id);
|
|
27
39
|
const scrollRoot = document.querySelector('.oui-app-shell-content-scroll .oui-scroll-area-viewport');
|
|
@@ -38,9 +50,7 @@ function uiExampleSectionScrollTop(node, scrollRoot) {
|
|
|
38
50
|
const maxTop = scrollRoot
|
|
39
51
|
? Math.max(0, scrollRoot.scrollHeight - scrollRoot.clientHeight)
|
|
40
52
|
: Number.POSITIVE_INFINITY;
|
|
41
|
-
const targetTop = scrollRoot
|
|
42
|
-
? uiExampleSectionAbsoluteTop(node, scrollRoot)
|
|
43
|
-
: node.offsetTop;
|
|
53
|
+
const targetTop = scrollRoot ? uiExampleSectionAbsoluteTop(node, scrollRoot) : node.offsetTop;
|
|
44
54
|
return Math.min(maxTop, Math.max(0, targetTop - UI_EXAMPLE_SCROLL_LEAD));
|
|
45
55
|
}
|
|
46
56
|
function uiExampleSectionAbsoluteTop(node, scrollRoot) {
|
|
@@ -79,6 +89,7 @@ function UiExampleContent({ activePresetId, onThemePresetChange, onThemeOverride
|
|
|
79
89
|
from: '2026-06-01',
|
|
80
90
|
to: '2026-06-26',
|
|
81
91
|
});
|
|
92
|
+
const openPalette = useCallback(() => setPaletteOpen(true), []);
|
|
82
93
|
useEffect(() => {
|
|
83
94
|
document.documentElement.classList.add('oui-ui-document-lock');
|
|
84
95
|
document.body.classList.add('oui-ui-document-lock');
|
|
@@ -173,7 +184,7 @@ function UiExampleContent({ activePresetId, onThemePresetChange, onThemeOverride
|
|
|
173
184
|
},
|
|
174
185
|
];
|
|
175
186
|
}, [locale, toast]);
|
|
176
|
-
return (_jsxs(AppShell, { sidebarOpen: mobileNavOpen, onSidebarOpenChange: setMobileNavOpen, header: _jsx(AppShellHeader, {
|
|
187
|
+
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 })] }));
|
|
177
188
|
}
|
|
178
189
|
function UiExampleThemeRail({ activePresetId, locale, onThemePresetChange, }) {
|
|
179
190
|
const presets = useMemo(() => {
|
|
@@ -189,7 +200,7 @@ function UiExampleThemeRail({ activePresetId, locale, onThemePresetChange, }) {
|
|
|
189
200
|
}
|
|
190
201
|
return next;
|
|
191
202
|
}, []);
|
|
192
|
-
return (_jsxs("aside", { className:
|
|
203
|
+
return (_jsxs("aside", { className: "oui-ui-theme-rail", "aria-label": "Theme presets", children: [_jsx("div", { className: "oui-ui-theme-rail-title", children: "Themes" }), _jsx(ScrollArea, { className: "oui-ui-theme-rail-scroll", highlights: true, highlightColor: "var(--oui-ui-theme-rail-highlight-bg)", highlightTop: {
|
|
193
204
|
start: 18,
|
|
194
205
|
fadeDistance: 90,
|
|
195
206
|
maxOpacity: 0.94,
|
|
@@ -197,7 +208,7 @@ function UiExampleThemeRail({ activePresetId, locale, onThemePresetChange, }) {
|
|
|
197
208
|
start: 12,
|
|
198
209
|
fadeDistance: 90,
|
|
199
210
|
maxOpacity: 0.94,
|
|
200
|
-
}, children: _jsx("div", { className:
|
|
211
|
+
}, children: _jsx("div", { className: "oui-ui-theme-rail-list", children: presets.map((preset) => (_jsxs("button", { type: "button", className: "oui-ui-theme-rail-item", "data-active": activePresetId === preset.id ? 'true' : undefined, style: themePresetPreviewStyle(preset), onClick: () => onThemePresetChange(preset), children: [_jsxs("span", { className: "oui-ui-theme-rail-preview", "aria-hidden": true, children: [_jsx("span", {}), _jsx("span", {})] }), _jsx("span", { className: "oui-ui-theme-rail-name", children: themePresetLabel(preset, locale) })] }, preset.id))) }) })] }));
|
|
201
212
|
}
|
|
202
213
|
function UiExampleSidebar({ onNavigate }) {
|
|
203
214
|
const [activeSection, setActiveSection] = useState('theme');
|
|
@@ -206,7 +217,7 @@ function UiExampleSidebar({ onNavigate }) {
|
|
|
206
217
|
const scrollNavigationReleaseTimerRef = useRef(null);
|
|
207
218
|
const setActiveSectionValue = useCallback((id) => {
|
|
208
219
|
activeSectionRef.current = id;
|
|
209
|
-
setActiveSection((current) => current === id ? current : id);
|
|
220
|
+
setActiveSection((current) => (current === id ? current : id));
|
|
210
221
|
}, []);
|
|
211
222
|
const lockScrollNavigationTarget = useCallback((id) => {
|
|
212
223
|
scrollNavigationTargetRef.current = id;
|
|
@@ -247,15 +258,13 @@ function UiExampleSidebar({ onNavigate }) {
|
|
|
247
258
|
}
|
|
248
259
|
return;
|
|
249
260
|
}
|
|
250
|
-
const bottomDistance = scrollRoot.scrollHeight
|
|
251
|
-
- scrollRoot.clientHeight
|
|
252
|
-
- scrollRoot.scrollTop;
|
|
261
|
+
const bottomDistance = scrollRoot.scrollHeight - scrollRoot.clientHeight - scrollRoot.scrollTop;
|
|
253
262
|
const top = scrollRoot.scrollTop + UI_EXAMPLE_ACTIVE_PROBE_OFFSET;
|
|
254
263
|
const next = bottomDistance <= 2
|
|
255
264
|
? nodes.at(-1)?.id
|
|
256
|
-
: nodes
|
|
265
|
+
: (nodes
|
|
257
266
|
.filter((node) => uiExampleSectionAbsoluteTop(node, scrollRoot) <= top)
|
|
258
|
-
.at(-1)?.id ?? nodes[0]?.id;
|
|
267
|
+
.at(-1)?.id ?? nodes[0]?.id);
|
|
259
268
|
if (next && next !== activeSectionRef.current)
|
|
260
269
|
setActiveSectionValue(next);
|
|
261
270
|
};
|
|
@@ -287,53 +296,31 @@ function UiExampleSidebar({ onNavigate }) {
|
|
|
287
296
|
items: group.items.map((item) => ({
|
|
288
297
|
key: item.id,
|
|
289
298
|
label: item.label,
|
|
290
|
-
icon: uiExampleNavIcon(item.id),
|
|
291
299
|
active: activeSection === item.id,
|
|
292
300
|
onSelect: () => navigateToSection(item.id),
|
|
293
301
|
})),
|
|
294
302
|
})), [activeSection, navigateToSection]);
|
|
295
|
-
return (_jsx(AppSidebar, { className:
|
|
296
|
-
}
|
|
297
|
-
function UiExampleHeaderTitle({ locale }) {
|
|
298
|
-
const title = locale === 'ru'
|
|
299
|
-
? 'Единый язык компонентов для всех модулей.'
|
|
300
|
-
: 'One component language for every module.';
|
|
301
|
-
const subtitle = locale === 'ru'
|
|
302
|
-
? 'Одна тема, предсказуемый интерфейс.'
|
|
303
|
-
: 'One theme, predictable interface.';
|
|
304
|
-
return (_jsxs("div", { className: 'oui-ui-header-title', children: [_jsx("strong", { children: title }), _jsx("span", { children: subtitle })] }));
|
|
305
|
-
}
|
|
306
|
-
function uiExampleNavIcon(id) {
|
|
307
|
-
const size = 16;
|
|
308
|
-
if (id === 'theme')
|
|
309
|
-
return _jsx(LuSettings, { size: size });
|
|
310
|
-
if (id === 'foundations')
|
|
311
|
-
return _jsx(LuLayoutDashboard, { size: size });
|
|
312
|
-
if (id === 'buttons-example')
|
|
313
|
-
return _jsx(LuMousePointerClick, { size: size });
|
|
314
|
-
if (id === 'text-fields-example')
|
|
315
|
-
return _jsx(LuFileText, { size: size });
|
|
316
|
-
if (id === 'selects-example')
|
|
317
|
-
return _jsx(LuCheck, { size: size });
|
|
318
|
-
if (id === 'data-table-example')
|
|
319
|
-
return _jsx(LuClipboardList, { size: size });
|
|
320
|
-
if (id === 'toast-example')
|
|
321
|
-
return _jsx(LuBell, { size: size });
|
|
322
|
-
if (id === 'app-shell-example')
|
|
323
|
-
return _jsx(LuPanelTop, { size: size });
|
|
324
|
-
if (id === 'app-sidebar-example')
|
|
325
|
-
return _jsx(LuLayoutDashboard, { size: size });
|
|
326
|
-
if (id === 'special-modal-example')
|
|
327
|
-
return _jsx(LuBox, { size: size });
|
|
328
|
-
if (id === 'date-range-example')
|
|
329
|
-
return _jsx(LuCalendar, { size: size });
|
|
330
|
-
return null;
|
|
303
|
+
return (_jsx(AppSidebar, { className: "oui-ui-main-sidebar", header: _jsx(UiExampleBrand, {}), itemH: 34, groups: sidebarNavGroups }));
|
|
331
304
|
}
|
|
332
305
|
function UiExampleBrand({ compact = false }) {
|
|
333
|
-
return (_jsxs("div", { className:
|
|
306
|
+
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" }) })] }));
|
|
334
307
|
}
|
|
335
308
|
function UiExampleHeaderActions({ compact = false, locale, onLocaleChange, }) {
|
|
336
|
-
|
|
309
|
+
const languageItems = useMemo(() => [
|
|
310
|
+
{
|
|
311
|
+
key: 'ru',
|
|
312
|
+
label: 'RU',
|
|
313
|
+
icon: locale === 'ru' ? _jsx(LuCheck, { size: 14 }) : undefined,
|
|
314
|
+
onSelect: () => onLocaleChange('ru'),
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
key: 'en',
|
|
318
|
+
label: 'EN',
|
|
319
|
+
icon: locale === 'en' ? _jsx(LuCheck, { size: 14 }) : undefined,
|
|
320
|
+
onSelect: () => onLocaleChange('en'),
|
|
321
|
+
},
|
|
322
|
+
], [locale, onLocaleChange]);
|
|
323
|
+
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" })] })] }));
|
|
337
324
|
}
|
|
338
325
|
export function UiExamplePage({ locale: controlledLocale, defaultLocale = 'ru', onLocaleChange, } = {}) {
|
|
339
326
|
const firstPreset = getThemePlaygroundPreset('orcestr-dark');
|