@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
|
@@ -54,14 +54,19 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
54
54
|
readonly panel: "#0d2119";
|
|
55
55
|
readonly panelSoft: "#133126";
|
|
56
56
|
readonly floating: "#0d2119";
|
|
57
|
-
readonly
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
readonly primary: {
|
|
58
|
+
readonly base: "#059669";
|
|
59
|
+
readonly text: "#86efac";
|
|
60
|
+
readonly surface: "rgb(52 211 153 / 16%)";
|
|
61
|
+
readonly border: "rgb(52 211 153 / 16%)";
|
|
62
|
+
readonly contrast: "#ffffff";
|
|
63
|
+
};
|
|
62
64
|
readonly selected: "rgb(52 211 153 / 14%)";
|
|
63
|
-
readonly info:
|
|
64
|
-
|
|
65
|
+
readonly info: {
|
|
66
|
+
readonly base: "#7dd3fc";
|
|
67
|
+
readonly text: "#7dd3fc";
|
|
68
|
+
readonly surface: "#0b3240";
|
|
69
|
+
};
|
|
65
70
|
};
|
|
66
71
|
};
|
|
67
72
|
}, {
|
|
@@ -96,11 +101,13 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
96
101
|
readonly borderStrong: "rgb(255 255 255 / 12%)";
|
|
97
102
|
readonly text: "#f7f7f7";
|
|
98
103
|
readonly muted: "#9a9a9a";
|
|
99
|
-
readonly
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
readonly primary: {
|
|
105
|
+
readonly base: "#2759c7";
|
|
106
|
+
readonly text: "#b7d1ff";
|
|
107
|
+
readonly surface: "rgb(138 180 255 / 17%)";
|
|
108
|
+
readonly border: "rgb(138 180 255 / 17%)";
|
|
109
|
+
readonly contrast: "#ffffff";
|
|
110
|
+
};
|
|
104
111
|
readonly selected: "rgb(138 180 255 / 14%)";
|
|
105
112
|
readonly focusRing: "0 0 0 3px rgb(138 180 255 / 20%)";
|
|
106
113
|
readonly skeletonShimmer: "rgb(255 255 255 / 7%)";
|
|
@@ -138,16 +145,21 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
138
145
|
readonly panel: "#1a1a1a";
|
|
139
146
|
readonly panelSoft: "#242424";
|
|
140
147
|
readonly floating: "#1b1b1b";
|
|
141
|
-
readonly
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
readonly primary: {
|
|
149
|
+
readonly base: "#5d6f87";
|
|
150
|
+
readonly text: "#e4edf8";
|
|
151
|
+
readonly surface: "rgb(196 211 232 / 14%)";
|
|
152
|
+
readonly border: "rgb(196 211 232 / 14%)";
|
|
153
|
+
readonly contrast: "#ffffff";
|
|
154
|
+
};
|
|
146
155
|
readonly selected: "rgb(196 211 232 / 12%)";
|
|
147
|
-
readonly info:
|
|
148
|
-
|
|
156
|
+
readonly info: {
|
|
157
|
+
readonly base: "#8ecae6";
|
|
158
|
+
readonly text: "#8ecae6";
|
|
159
|
+
readonly surface: "#122f3a";
|
|
160
|
+
};
|
|
149
161
|
};
|
|
150
|
-
readonly
|
|
162
|
+
readonly radius: {
|
|
151
163
|
readonly md: "5px";
|
|
152
164
|
readonly lg: "7px";
|
|
153
165
|
readonly xl: "10px";
|
|
@@ -176,14 +188,19 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
176
188
|
readonly panel: "#1d1820";
|
|
177
189
|
readonly panelSoft: "#29212d";
|
|
178
190
|
readonly floating: "#1d1820";
|
|
179
|
-
readonly
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
191
|
+
readonly primary: {
|
|
192
|
+
readonly base: "#a84486";
|
|
193
|
+
readonly text: "#ffc1e7";
|
|
194
|
+
readonly surface: "rgb(240 166 216 / 17%)";
|
|
195
|
+
readonly border: "rgb(240 166 216 / 17%)";
|
|
196
|
+
readonly contrast: "#ffffff";
|
|
197
|
+
};
|
|
184
198
|
readonly selected: "rgb(240 166 216 / 16%)";
|
|
185
|
-
readonly warning:
|
|
186
|
-
|
|
199
|
+
readonly warning: {
|
|
200
|
+
readonly base: "#fbbf24";
|
|
201
|
+
readonly text: "#fbbf24";
|
|
202
|
+
readonly surface: "#49371c";
|
|
203
|
+
};
|
|
187
204
|
};
|
|
188
205
|
};
|
|
189
206
|
}, {
|
|
@@ -226,14 +243,19 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
226
243
|
readonly panel: "#101a2b";
|
|
227
244
|
readonly panelSoft: "#172338";
|
|
228
245
|
readonly floating: "#101a2b";
|
|
229
|
-
readonly
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
246
|
+
readonly primary: {
|
|
247
|
+
readonly base: "#0369a1";
|
|
248
|
+
readonly text: "#bae6fd";
|
|
249
|
+
readonly surface: "rgb(125 211 252 / 16%)";
|
|
250
|
+
readonly border: "rgb(125 211 252 / 16%)";
|
|
251
|
+
readonly contrast: "#ffffff";
|
|
252
|
+
};
|
|
234
253
|
readonly selected: "rgb(125 211 252 / 13%)";
|
|
235
|
-
readonly info:
|
|
236
|
-
|
|
254
|
+
readonly info: {
|
|
255
|
+
readonly base: "#22d3ee";
|
|
256
|
+
readonly text: "#22d3ee";
|
|
257
|
+
readonly surface: "#083344";
|
|
258
|
+
};
|
|
237
259
|
};
|
|
238
260
|
};
|
|
239
261
|
}, {
|
|
@@ -275,11 +297,13 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
275
297
|
readonly bg: "#eefbf4";
|
|
276
298
|
readonly panel: "#ffffff";
|
|
277
299
|
readonly panelSoft: "#ddf4e8";
|
|
278
|
-
readonly
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
300
|
+
readonly primary: {
|
|
301
|
+
readonly base: "#047857";
|
|
302
|
+
readonly text: "#065f46";
|
|
303
|
+
readonly surface: "rgb(4 120 87 / 12%)";
|
|
304
|
+
readonly border: "rgb(4 120 87 / 12%)";
|
|
305
|
+
readonly contrast: "#ffffff";
|
|
306
|
+
};
|
|
283
307
|
readonly selected: "rgb(4 120 87 / 10%)";
|
|
284
308
|
};
|
|
285
309
|
};
|
|
@@ -305,11 +329,13 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
305
329
|
readonly bg: "#fff1f8";
|
|
306
330
|
readonly panel: "#ffffff";
|
|
307
331
|
readonly panelSoft: "#ffe4f2";
|
|
308
|
-
readonly
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
332
|
+
readonly primary: {
|
|
333
|
+
readonly base: "#db2777";
|
|
334
|
+
readonly text: "#be185d";
|
|
335
|
+
readonly surface: "rgb(219 39 119 / 12%)";
|
|
336
|
+
readonly border: "rgb(219 39 119 / 12%)";
|
|
337
|
+
readonly contrast: "#ffffff";
|
|
338
|
+
};
|
|
313
339
|
readonly selected: "rgb(219 39 119 / 10%)";
|
|
314
340
|
};
|
|
315
341
|
};
|
|
@@ -352,11 +378,13 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
352
378
|
readonly bg: "#f8f5ff";
|
|
353
379
|
readonly panel: "#ffffff";
|
|
354
380
|
readonly panelSoft: "#ede9fe";
|
|
355
|
-
readonly
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
381
|
+
readonly primary: {
|
|
382
|
+
readonly base: "#7c3aed";
|
|
383
|
+
readonly text: "#5b21b6";
|
|
384
|
+
readonly surface: "rgb(124 58 237 / 10%)";
|
|
385
|
+
readonly border: "rgb(124 58 237 / 10%)";
|
|
386
|
+
readonly contrast: "#ffffff";
|
|
387
|
+
};
|
|
360
388
|
readonly selected: "rgb(124 58 237 / 8%)";
|
|
361
389
|
readonly section: "rgb(124 58 237 / 3%)";
|
|
362
390
|
readonly sectionNested: "rgb(124 58 237 / 2%)";
|
|
@@ -387,11 +415,13 @@ export declare const themePlaygroundPresets: readonly [{
|
|
|
387
415
|
readonly bg: "#f4fbf8";
|
|
388
416
|
readonly panel: "#ffffff";
|
|
389
417
|
readonly panelSoft: "#eaf7f1";
|
|
390
|
-
readonly
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
418
|
+
readonly primary: {
|
|
419
|
+
readonly base: "#0f9f6e";
|
|
420
|
+
readonly text: "#087a54";
|
|
421
|
+
readonly surface: "rgb(15 159 110 / 11%)";
|
|
422
|
+
readonly border: "rgb(15 159 110 / 11%)";
|
|
423
|
+
readonly contrast: "#ffffff";
|
|
424
|
+
};
|
|
395
425
|
readonly selected: "rgb(15 159 110 / 9%)";
|
|
396
426
|
};
|
|
397
427
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleThemePlayground.d.ts","sourceRoot":"","sources":["../../src/example/ExampleThemePlayground.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAC,MAAM,OAAO,CAAC;AAElG,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
|
|
1
|
+
{"version":3,"file":"ExampleThemePlayground.d.ts","sourceRoot":"","sources":["../../src/example/ExampleThemePlayground.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAC,MAAM,OAAO,CAAC;AAElG,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;AA6FD,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,2CAkDA;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,GAMlD,aAAa,CACrB"}
|
|
@@ -44,14 +44,19 @@ export const themePlaygroundPresets = [
|
|
|
44
44
|
panel: '#0d2119',
|
|
45
45
|
panelSoft: '#133126',
|
|
46
46
|
floating: '#0d2119',
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
primary: {
|
|
48
|
+
base: '#059669',
|
|
49
|
+
text: '#86efac',
|
|
50
|
+
surface: 'rgb(52 211 153 / 16%)',
|
|
51
|
+
border: 'rgb(52 211 153 / 16%)',
|
|
52
|
+
contrast: '#ffffff',
|
|
53
|
+
},
|
|
52
54
|
selected: 'rgb(52 211 153 / 14%)',
|
|
53
|
-
info:
|
|
54
|
-
|
|
55
|
+
info: {
|
|
56
|
+
base: '#7dd3fc',
|
|
57
|
+
text: '#7dd3fc',
|
|
58
|
+
surface: '#0b3240',
|
|
59
|
+
},
|
|
55
60
|
},
|
|
56
61
|
},
|
|
57
62
|
},
|
|
@@ -87,11 +92,13 @@ export const themePlaygroundPresets = [
|
|
|
87
92
|
borderStrong: 'rgb(255 255 255 / 12%)',
|
|
88
93
|
text: '#f7f7f7',
|
|
89
94
|
muted: '#9a9a9a',
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
primary: {
|
|
96
|
+
base: '#2759c7',
|
|
97
|
+
text: '#b7d1ff',
|
|
98
|
+
surface: 'rgb(138 180 255 / 17%)',
|
|
99
|
+
border: 'rgb(138 180 255 / 17%)',
|
|
100
|
+
contrast: '#ffffff',
|
|
101
|
+
},
|
|
95
102
|
selected: 'rgb(138 180 255 / 14%)',
|
|
96
103
|
focusRing: '0 0 0 3px rgb(138 180 255 / 20%)',
|
|
97
104
|
skeletonShimmer: 'rgb(255 255 255 / 7%)',
|
|
@@ -130,16 +137,21 @@ export const themePlaygroundPresets = [
|
|
|
130
137
|
panel: '#1a1a1a',
|
|
131
138
|
panelSoft: '#242424',
|
|
132
139
|
floating: '#1b1b1b',
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
primary: {
|
|
141
|
+
base: '#5d6f87',
|
|
142
|
+
text: '#e4edf8',
|
|
143
|
+
surface: 'rgb(196 211 232 / 14%)',
|
|
144
|
+
border: 'rgb(196 211 232 / 14%)',
|
|
145
|
+
contrast: '#ffffff',
|
|
146
|
+
},
|
|
138
147
|
selected: 'rgb(196 211 232 / 12%)',
|
|
139
|
-
info:
|
|
140
|
-
|
|
148
|
+
info: {
|
|
149
|
+
base: '#8ecae6',
|
|
150
|
+
text: '#8ecae6',
|
|
151
|
+
surface: '#122f3a',
|
|
152
|
+
},
|
|
141
153
|
},
|
|
142
|
-
|
|
154
|
+
radius: {
|
|
143
155
|
md: '5px',
|
|
144
156
|
lg: '7px',
|
|
145
157
|
xl: '10px',
|
|
@@ -169,14 +181,19 @@ export const themePlaygroundPresets = [
|
|
|
169
181
|
panel: '#1d1820',
|
|
170
182
|
panelSoft: '#29212d',
|
|
171
183
|
floating: '#1d1820',
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
184
|
+
primary: {
|
|
185
|
+
base: '#a84486',
|
|
186
|
+
text: '#ffc1e7',
|
|
187
|
+
surface: 'rgb(240 166 216 / 17%)',
|
|
188
|
+
border: 'rgb(240 166 216 / 17%)',
|
|
189
|
+
contrast: '#ffffff',
|
|
190
|
+
},
|
|
177
191
|
selected: 'rgb(240 166 216 / 16%)',
|
|
178
|
-
warning:
|
|
179
|
-
|
|
192
|
+
warning: {
|
|
193
|
+
base: '#fbbf24',
|
|
194
|
+
text: '#fbbf24',
|
|
195
|
+
surface: '#49371c',
|
|
196
|
+
},
|
|
180
197
|
},
|
|
181
198
|
},
|
|
182
199
|
},
|
|
@@ -221,14 +238,19 @@ export const themePlaygroundPresets = [
|
|
|
221
238
|
panel: '#101a2b',
|
|
222
239
|
panelSoft: '#172338',
|
|
223
240
|
floating: '#101a2b',
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
241
|
+
primary: {
|
|
242
|
+
base: '#0369a1',
|
|
243
|
+
text: '#bae6fd',
|
|
244
|
+
surface: 'rgb(125 211 252 / 16%)',
|
|
245
|
+
border: 'rgb(125 211 252 / 16%)',
|
|
246
|
+
contrast: '#ffffff',
|
|
247
|
+
},
|
|
229
248
|
selected: 'rgb(125 211 252 / 13%)',
|
|
230
|
-
info:
|
|
231
|
-
|
|
249
|
+
info: {
|
|
250
|
+
base: '#22d3ee',
|
|
251
|
+
text: '#22d3ee',
|
|
252
|
+
surface: '#083344',
|
|
253
|
+
},
|
|
232
254
|
},
|
|
233
255
|
},
|
|
234
256
|
},
|
|
@@ -272,11 +294,13 @@ export const themePlaygroundPresets = [
|
|
|
272
294
|
bg: '#eefbf4',
|
|
273
295
|
panel: '#ffffff',
|
|
274
296
|
panelSoft: '#ddf4e8',
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
297
|
+
primary: {
|
|
298
|
+
base: '#047857',
|
|
299
|
+
text: '#065f46',
|
|
300
|
+
surface: 'rgb(4 120 87 / 12%)',
|
|
301
|
+
border: 'rgb(4 120 87 / 12%)',
|
|
302
|
+
contrast: '#ffffff',
|
|
303
|
+
},
|
|
280
304
|
selected: 'rgb(4 120 87 / 10%)',
|
|
281
305
|
},
|
|
282
306
|
},
|
|
@@ -303,11 +327,13 @@ export const themePlaygroundPresets = [
|
|
|
303
327
|
bg: '#fff1f8',
|
|
304
328
|
panel: '#ffffff',
|
|
305
329
|
panelSoft: '#ffe4f2',
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
330
|
+
primary: {
|
|
331
|
+
base: '#db2777',
|
|
332
|
+
text: '#be185d',
|
|
333
|
+
surface: 'rgb(219 39 119 / 12%)',
|
|
334
|
+
border: 'rgb(219 39 119 / 12%)',
|
|
335
|
+
contrast: '#ffffff',
|
|
336
|
+
},
|
|
311
337
|
selected: 'rgb(219 39 119 / 10%)',
|
|
312
338
|
},
|
|
313
339
|
},
|
|
@@ -352,11 +378,13 @@ export const themePlaygroundPresets = [
|
|
|
352
378
|
bg: '#f8f5ff',
|
|
353
379
|
panel: '#ffffff',
|
|
354
380
|
panelSoft: '#ede9fe',
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
381
|
+
primary: {
|
|
382
|
+
base: '#7c3aed',
|
|
383
|
+
text: '#5b21b6',
|
|
384
|
+
surface: 'rgb(124 58 237 / 10%)',
|
|
385
|
+
border: 'rgb(124 58 237 / 10%)',
|
|
386
|
+
contrast: '#ffffff',
|
|
387
|
+
},
|
|
360
388
|
selected: 'rgb(124 58 237 / 8%)',
|
|
361
389
|
section: 'rgb(124 58 237 / 3%)',
|
|
362
390
|
sectionNested: 'rgb(124 58 237 / 2%)',
|
|
@@ -388,11 +416,13 @@ export const themePlaygroundPresets = [
|
|
|
388
416
|
bg: '#f4fbf8',
|
|
389
417
|
panel: '#ffffff',
|
|
390
418
|
panelSoft: '#eaf7f1',
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
419
|
+
primary: {
|
|
420
|
+
base: '#0f9f6e',
|
|
421
|
+
text: '#087a54',
|
|
422
|
+
surface: 'rgb(15 159 110 / 11%)',
|
|
423
|
+
border: 'rgb(15 159 110 / 11%)',
|
|
424
|
+
contrast: '#ffffff',
|
|
425
|
+
},
|
|
396
426
|
selected: 'rgb(15 159 110 / 9%)',
|
|
397
427
|
},
|
|
398
428
|
},
|
|
@@ -413,19 +443,20 @@ export function themePresetDescription(preset, locale) {
|
|
|
413
443
|
}
|
|
414
444
|
const flatTokenSections = [
|
|
415
445
|
'colors',
|
|
416
|
-
'
|
|
446
|
+
'radius',
|
|
417
447
|
'spacing',
|
|
418
448
|
'breakpoints',
|
|
419
449
|
'shadows',
|
|
420
|
-
'
|
|
450
|
+
'text',
|
|
421
451
|
'motion',
|
|
422
452
|
'toast',
|
|
453
|
+
'scrollbar',
|
|
423
454
|
'states',
|
|
424
455
|
'density',
|
|
425
456
|
'zIndex',
|
|
426
457
|
'components',
|
|
427
458
|
];
|
|
428
|
-
const statusKeys = ['neutral', '
|
|
459
|
+
const statusKeys = ['neutral', 'primary', 'secondary', 'success', 'warning', 'danger', 'info'];
|
|
429
460
|
const COLOR_TOKEN_COMMIT_DELAY_MS = 180;
|
|
430
461
|
const themePlaygroundCopy = {
|
|
431
462
|
ru: {
|
|
@@ -441,13 +472,14 @@ const themePlaygroundCopy = {
|
|
|
441
472
|
statuses: 'Статусы',
|
|
442
473
|
tokenSections: {
|
|
443
474
|
colors: 'Цвета',
|
|
444
|
-
|
|
475
|
+
radius: 'Радиус',
|
|
445
476
|
spacing: 'Отступы',
|
|
446
477
|
breakpoints: 'Брейкпоинты',
|
|
447
478
|
shadows: 'Тени',
|
|
448
|
-
|
|
479
|
+
text: 'Текст',
|
|
449
480
|
motion: 'Движение',
|
|
450
481
|
toast: 'Toast',
|
|
482
|
+
scrollbar: 'Scrollbar',
|
|
451
483
|
states: 'Состояния',
|
|
452
484
|
density: 'Плотность',
|
|
453
485
|
zIndex: 'Z-index',
|
|
@@ -467,13 +499,14 @@ const themePlaygroundCopy = {
|
|
|
467
499
|
statuses: 'Statuses',
|
|
468
500
|
tokenSections: {
|
|
469
501
|
colors: 'Colors',
|
|
470
|
-
|
|
502
|
+
radius: 'Radius',
|
|
471
503
|
spacing: 'Spacing',
|
|
472
504
|
breakpoints: 'Breakpoints',
|
|
473
505
|
shadows: 'Shadows',
|
|
474
|
-
|
|
506
|
+
text: 'Text',
|
|
475
507
|
motion: 'Motion',
|
|
476
508
|
toast: 'Toast',
|
|
509
|
+
scrollbar: 'Scrollbar',
|
|
477
510
|
states: 'States',
|
|
478
511
|
density: 'Density',
|
|
479
512
|
zIndex: 'Z-index',
|
|
@@ -492,7 +525,7 @@ export function ExampleThemePlayground({ activePresetId, theme, locale, onPreset
|
|
|
492
525
|
start: 2,
|
|
493
526
|
fadeDistance: 28,
|
|
494
527
|
maxOpacity: 0.94,
|
|
495
|
-
}, children: [_jsxs("div", { className: 'oui-theme-token-editor', children: [flatTokenSections.map((section) => (_jsx(TokenSection, { title: tokenSectionLabel(section, locale), section: section, values: theme
|
|
528
|
+
}, 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 })] })] })] })] })] }));
|
|
496
529
|
}
|
|
497
530
|
export function ThemePresetSelector({ activePresetId, locale, onPresetChange, }) {
|
|
498
531
|
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: {
|
|
@@ -541,10 +574,24 @@ function ThemeTokenControl({ label, path, section, value, onChange, }) {
|
|
|
541
574
|
return (_jsxs("div", { className: 'oui-theme-token oui-theme-token-control', children: [_jsx("span", { className: 'oui-theme-token-swatch', style: {
|
|
542
575
|
background: visibleColorValue ?? (section === 'colors' || section === 'status'
|
|
543
576
|
? valueText
|
|
544
|
-
: 'var(--oui-
|
|
577
|
+
: 'var(--oui-primary-surface)'),
|
|
545
578
|
}, 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' ? Number(event.target.value) : event.target.value) })) })] }));
|
|
546
579
|
}
|
|
547
580
|
function updateFlatToken(updateOverrides, section, key, value) {
|
|
581
|
+
if (section === 'colors' && key.includes('.')) {
|
|
582
|
+
const [roleKey, slotKey] = key.split('.', 2);
|
|
583
|
+
updateOverrides((current) => ({
|
|
584
|
+
...current,
|
|
585
|
+
colors: {
|
|
586
|
+
...current.colors,
|
|
587
|
+
[roleKey]: {
|
|
588
|
+
...current.colors?.[roleKey],
|
|
589
|
+
[slotKey]: value,
|
|
590
|
+
},
|
|
591
|
+
},
|
|
592
|
+
}));
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
548
595
|
updateOverrides((current) => ({
|
|
549
596
|
...current,
|
|
550
597
|
[section]: {
|
|
@@ -553,6 +600,25 @@ function updateFlatToken(updateOverrides, section, key, value) {
|
|
|
553
600
|
},
|
|
554
601
|
}));
|
|
555
602
|
}
|
|
603
|
+
function tokenSectionValues(theme, section) {
|
|
604
|
+
const values = theme[section];
|
|
605
|
+
if (section !== 'colors')
|
|
606
|
+
return values;
|
|
607
|
+
return flattenTokenValues(values);
|
|
608
|
+
}
|
|
609
|
+
function flattenTokenValues(values, prefix = '') {
|
|
610
|
+
return Object.entries(values).reduce((result, [key, value]) => {
|
|
611
|
+
const path = prefix ? `${prefix}.${key}` : key;
|
|
612
|
+
if (typeof value === 'string' || typeof value === 'number' || value === false) {
|
|
613
|
+
result[path] = value;
|
|
614
|
+
return result;
|
|
615
|
+
}
|
|
616
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
617
|
+
Object.assign(result, flattenTokenValues(value, path));
|
|
618
|
+
}
|
|
619
|
+
return result;
|
|
620
|
+
}, {});
|
|
621
|
+
}
|
|
556
622
|
function updateStatusToken(updateOverrides, statusKey, key, value) {
|
|
557
623
|
updateOverrides((current) => ({
|
|
558
624
|
...current,
|
|
@@ -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":"AAYA,OAAO,EAaH,KAAK,eAAe,EACvB,MAAM,IAAI,CAAC;AAwlBZ,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,2CA8CzB"}
|