@elevasis/ui 2.67.0 → 2.69.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/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +3 -3
- package/dist/app/index.d.ts +575 -370
- package/dist/app/index.js +17 -23
- package/dist/auth/index.css +149 -149
- package/dist/auth/index.d.ts +5 -0
- package/dist/auth/index.js +11 -13
- package/dist/charts/index.css +208 -208
- package/dist/charts/index.js +11 -13
- package/dist/{chunk-M535KHLW.js → chunk-26BTE3Z4.js} +1 -1
- package/dist/chunk-3KMDHCAR.js +52 -0
- package/dist/chunk-3MEXPLWT.js +265 -0
- package/dist/chunk-4JHLS234.js +39 -0
- package/dist/chunk-6PZFOHJK.js +1764 -0
- package/dist/chunk-7WJEPTE7.js +194 -0
- package/dist/chunk-AH52XQB7.js +1 -0
- package/dist/{chunk-UFTM5SZZ.js → chunk-AKANHRQ5.js} +9 -3
- package/dist/chunk-BZZCNLT6.js +12 -0
- package/dist/chunk-C75XWBYZ.js +383 -0
- package/dist/chunk-DLR4SDZW.js +51 -0
- package/dist/{chunk-4OEVLV66.js → chunk-FLECOYUS.js} +113 -148
- package/dist/chunk-IRV6KJPV.js +425 -0
- package/dist/chunk-IT7GTJCB.js +10 -0
- package/dist/chunk-LGKLC5MG.js +44 -0
- package/dist/chunk-MFLM7BVC.js +85 -0
- package/dist/chunk-MRVGQLWN.js +1595 -0
- package/dist/{chunk-4DV4ECMG.js → chunk-N7U24M2J.js} +4 -0
- package/dist/{chunk-I7BZVVVU.js → chunk-NM4A63KJ.js} +104 -415
- package/dist/chunk-NU3NBXHP.js +1194 -0
- package/dist/chunk-PDHTXPSF.js +12 -0
- package/dist/chunk-RW64UJWT.js +1934 -0
- package/dist/{chunk-JFBZ6XDW.js → chunk-SNZDFCOQ.js} +3 -49
- package/dist/chunk-TUMSNGTX.js +35 -0
- package/dist/chunk-UD657ICS.js +589 -0
- package/dist/{chunk-XNW3O6QW.js → chunk-VDX6DL7Z.js} +1 -1
- package/dist/chunk-WXHAHKKI.js +16411 -0
- package/dist/chunk-XAZR3T6Y.js +2162 -0
- package/dist/chunk-XQ3ILKYN.js +37 -0
- package/dist/chunk-YCRINA2D.js +67 -0
- package/dist/chunk-YGCMMOY4.js +1484 -0
- package/dist/chunk-YNRYIXUT.js +10945 -0
- package/dist/chunk-ZD6LM53O.js +4528 -0
- package/dist/chunk-ZPTEGGKU.js +631 -0
- package/dist/components/chat/index.js +2 -1
- package/dist/components/index.css +208 -208
- package/dist/components/index.d.ts +1634 -264
- package/dist/components/index.js +2774 -14
- package/dist/components/navigation/index.css +149 -149
- package/dist/components/navigation/index.js +12 -13
- package/dist/features/auth/index.css +149 -149
- package/dist/features/auth/index.d.ts +457 -167
- package/dist/features/auth/index.js +13 -14
- package/dist/features/clients/index.css +208 -208
- package/dist/features/clients/index.d.ts +39 -1
- package/dist/features/clients/index.js +16 -13
- package/dist/features/content/index.d.ts +1788 -0
- package/dist/features/content/index.js +2180 -0
- package/dist/features/crm/index.d.ts +1802 -231
- package/dist/features/crm/index.js +16 -13
- package/dist/features/dashboard/index.d.ts +1 -8
- package/dist/features/dashboard/index.js +17 -13
- package/dist/features/delivery/index.d.ts +457 -167
- package/dist/features/delivery/index.js +16 -13
- package/dist/features/knowledge/index.css +149 -149
- package/dist/features/knowledge/index.js +11 -13
- package/dist/features/lead-gen/index.d.ts +53 -104
- package/dist/features/lead-gen/index.js +17 -13
- package/dist/features/monitoring/index.js +16 -13
- package/dist/features/monitoring/requests/index.js +15 -20
- package/dist/features/operations/index.d.ts +1 -86
- package/dist/features/operations/index.js +22 -12
- package/dist/features/public-agent-chat/index.js +2 -1
- package/dist/features/seo/index.js +2 -1
- package/dist/features/settings/index.d.ts +457 -167
- package/dist/features/settings/index.js +15 -13
- package/dist/hooks/access/index.css +149 -149
- package/dist/hooks/access/index.d.ts +5 -0
- package/dist/hooks/access/index.js +11 -13
- package/dist/hooks/delivery/index.d.ts +457 -167
- package/dist/hooks/delivery/index.js +2 -23
- package/dist/hooks/index.d.ts +2203 -244
- package/dist/hooks/index.js +11 -13
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +1 -8
- package/dist/hooks/published.d.ts +2203 -244
- package/dist/hooks/published.js +11 -13
- package/dist/initialization/index.d.ts +465 -169
- package/dist/knowledge/index.css +149 -149
- package/dist/knowledge/index.d.ts +5 -90
- package/dist/knowledge/index.js +3215 -3203
- package/dist/{knowledge-search-index-6EZNBNSR.js → knowledge-search-index-LP2WVSQX.js} +689 -695
- package/dist/layout/index.css +149 -149
- package/dist/layout/index.js +15 -13
- package/dist/organization/index.d.ts +10 -4
- package/dist/organization/index.js +1 -21
- package/dist/profile/index.d.ts +457 -167
- package/dist/provider/index.d.ts +576 -372
- package/dist/provider/index.js +11 -13
- package/dist/provider/published.css +149 -149
- package/dist/provider/published.d.ts +576 -372
- package/dist/provider/published.js +11 -13
- package/dist/supabase/index.d.ts +906 -347
- package/dist/test-utils/index.d.ts +15 -2
- package/dist/test-utils/index.js +41 -12
- package/dist/test-utils/setup-integration.js +1 -1
- package/dist/test-utils/setup.js +1 -1
- package/dist/theme/index.js +3 -2
- package/dist/theme/presets/index.js +1 -1
- package/dist/typeform/index.js +2049 -1
- package/dist/types/index.d.ts +477 -177
- package/dist/utils/index.d.ts +1 -8
- package/dist/utils/index.js +1 -1
- package/dist/vite/index.js +2 -2
- package/dist/vite-plugin-knowledge/index.js +1 -1
- package/package.json +7 -3
- package/src/features/README.md +28 -28
- package/dist/chunk-5TERYXOO.js +0 -51390
- package/dist/chunk-AUDNF2Q7.js +0 -2050
- package/dist/index.d.ts +0 -17888
- package/dist/index.js +0 -30
- package/dist/{chunk-GMXGDO3I.js → chunk-MISHPEJX.js} +1 -1
- package/dist/{chunk-RBGVNPA6.js → chunk-XQBURFKM.js} +0 -0
- package/dist/{index.css → features/content/index.css} +149 -149
|
@@ -1,116 +1,7 @@
|
|
|
1
|
-
import { PRESETS, getPreset, generateShades } from './chunk-
|
|
1
|
+
import { PRESETS, getPreset, generateShades } from './chunk-XQBURFKM.js';
|
|
2
2
|
import { Tooltip, Tree, Text, TagsInput, Tabs, Table, Stack, SimpleGrid, Select, Combobox, SegmentedControl, ScrollArea, Paper, Popover, Notification, MultiSelect, Modal, Menu, Input, HoverCard, Group, Grid, Flex, Drawer, Code, Divider, Card, Button, Accordion, createTheme } from '@mantine/core';
|
|
3
|
-
import { createContext, useContext
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
4
4
|
|
|
5
|
-
// src/theme/cssVariables.ts
|
|
6
|
-
var TOKEN_VAR_MAP = {
|
|
7
|
-
primary: "--color-primary",
|
|
8
|
-
primaryContrast: "--color-primary-contrast",
|
|
9
|
-
background: "--color-background",
|
|
10
|
-
surface: "--color-surface",
|
|
11
|
-
surfaceHover: "--color-surface-hover",
|
|
12
|
-
elevatedSurface: "--color-elevated",
|
|
13
|
-
text: "--color-text",
|
|
14
|
-
textDimmed: "--color-text-dimmed",
|
|
15
|
-
textSubtle: "--color-text-subtle",
|
|
16
|
-
border: "--color-border",
|
|
17
|
-
error: "--color-error",
|
|
18
|
-
warning: "--color-warning",
|
|
19
|
-
success: "--color-success",
|
|
20
|
-
glassBackground: "--glass-background",
|
|
21
|
-
glassBlur: "--glass-blur",
|
|
22
|
-
shadow: "--standard-box-shadow",
|
|
23
|
-
cardShadow: "--card-shadow",
|
|
24
|
-
durationFast: "--duration-fast",
|
|
25
|
-
durationNormal: "--duration-normal",
|
|
26
|
-
easing: "--easing",
|
|
27
|
-
destructiveFg: "--color-destructive-fg",
|
|
28
|
-
fontHeading: "--font-heading",
|
|
29
|
-
fontSans: "--font-sans"
|
|
30
|
-
};
|
|
31
|
-
var FRAMEWORK_BRIDGE = {
|
|
32
|
-
"--mantine-color-text": "var(--color-text)",
|
|
33
|
-
"--mantine-color-body": "var(--color-background)",
|
|
34
|
-
"--mantine-color-dimmed": "var(--color-text-dimmed)",
|
|
35
|
-
// Primary color functional variants — used by Tabs, SegmentedControl, Badge, Button, etc.
|
|
36
|
-
"--mantine-primary-color-filled": "var(--color-primary)",
|
|
37
|
-
"--mantine-primary-color-filled-hover": "color-mix(in srgb, var(--color-primary) 90%, black)",
|
|
38
|
-
"--mantine-primary-color-light": "color-mix(in srgb, var(--color-primary) 15%, transparent)",
|
|
39
|
-
"--mantine-primary-color-light-hover": "color-mix(in srgb, var(--color-primary) 20%, transparent)",
|
|
40
|
-
"--mantine-primary-color-light-color": "var(--color-primary)",
|
|
41
|
-
"--mantine-primary-color-contrast": "var(--color-primary-contrast)",
|
|
42
|
-
// Active/selected state — used by selectable cards, active filters, plan tiers, etc.
|
|
43
|
-
"--surface-primary-faint": "color-mix(in srgb, var(--color-primary) 5%, var(--color-elevated))",
|
|
44
|
-
"--surface-primary-subtle": "color-mix(in srgb, var(--color-primary) 6%, var(--color-elevated))",
|
|
45
|
-
"--surface-primary-muted": "color-mix(in srgb, var(--color-primary) 8%, var(--color-elevated))",
|
|
46
|
-
"--surface-primary-strong": "color-mix(in srgb, var(--color-primary) 18%, var(--color-elevated))",
|
|
47
|
-
"--border-primary-faint": "color-mix(in srgb, var(--color-primary) 12%, var(--color-border))",
|
|
48
|
-
"--border-primary-soft": "color-mix(in srgb, var(--color-primary) 16%, var(--color-border))",
|
|
49
|
-
"--border-primary-subtle": "color-mix(in srgb, var(--color-primary) 18%, var(--color-border))",
|
|
50
|
-
"--border-primary-muted": "color-mix(in srgb, var(--color-primary) 34%, var(--color-border))",
|
|
51
|
-
"--border-primary-strong": "color-mix(in srgb, var(--color-primary) 40%, var(--color-border))",
|
|
52
|
-
"--active-border": "1px solid var(--border-primary-strong)",
|
|
53
|
-
"--active-background": "var(--surface-primary-muted)",
|
|
54
|
-
"--input-value-background": "var(--surface-primary-strong)",
|
|
55
|
-
"--input-value-border": "1px solid var(--border-primary-muted)"
|
|
56
|
-
};
|
|
57
|
-
var RIGHT_PANEL_BACKGROUND = {
|
|
58
|
-
light: "color-mix(in srgb, var(--color-elevated) 88%, var(--color-background))",
|
|
59
|
-
dark: "color-mix(in srgb, color-mix(in srgb, var(--color-elevated) 82%, var(--glass-background)) 78%, rgba(8, 9, 11, 0.96))"
|
|
60
|
-
};
|
|
61
|
-
function shadesToVars(shades) {
|
|
62
|
-
const vars = {};
|
|
63
|
-
for (let i = 0; i < shades.length; i++) {
|
|
64
|
-
vars[`--mantine-color-primary-${i}`] = shades[i];
|
|
65
|
-
}
|
|
66
|
-
return vars;
|
|
67
|
-
}
|
|
68
|
-
function presetToVars(tokens) {
|
|
69
|
-
const result = {};
|
|
70
|
-
for (const [key, varName] of Object.entries(TOKEN_VAR_MAP)) {
|
|
71
|
-
const value = tokens[key];
|
|
72
|
-
if (value) result[varName] = value;
|
|
73
|
-
}
|
|
74
|
-
return result;
|
|
75
|
-
}
|
|
76
|
-
function mapTokens(tokens) {
|
|
77
|
-
if (!tokens) return {};
|
|
78
|
-
const result = {};
|
|
79
|
-
for (const [key, varName] of Object.entries(TOKEN_VAR_MAP)) {
|
|
80
|
-
const value = tokens[key];
|
|
81
|
-
if (value) result[varName] = value;
|
|
82
|
-
}
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
function createCssVariablesResolver(tokens, preset, presetsMap) {
|
|
86
|
-
const resolved = getPreset(preset ?? "default", presetsMap);
|
|
87
|
-
const lightDefaults = presetToVars(resolved.light);
|
|
88
|
-
const darkDefaults = presetToVars(resolved.dark);
|
|
89
|
-
const flat = mapTokens(tokens);
|
|
90
|
-
const light = mapTokens(tokens?.light);
|
|
91
|
-
const dark = mapTokens(tokens?.dark);
|
|
92
|
-
const lightPrimary = tokens?.light?.primary ?? tokens?.primary ?? resolved.light.primary;
|
|
93
|
-
const darkPrimary = tokens?.dark?.primary ?? tokens?.primary ?? resolved.dark.primary;
|
|
94
|
-
const lightShades = shadesToVars(generateShades(lightPrimary));
|
|
95
|
-
const darkShades = shadesToVars(generateShades(darkPrimary));
|
|
96
|
-
return () => ({
|
|
97
|
-
variables: { ...FRAMEWORK_BRIDGE },
|
|
98
|
-
light: {
|
|
99
|
-
...lightShades,
|
|
100
|
-
...lightDefaults,
|
|
101
|
-
...flat,
|
|
102
|
-
...light,
|
|
103
|
-
"--right-panel-background": RIGHT_PANEL_BACKGROUND.light
|
|
104
|
-
},
|
|
105
|
-
dark: {
|
|
106
|
-
...darkShades,
|
|
107
|
-
...darkDefaults,
|
|
108
|
-
...flat,
|
|
109
|
-
...dark,
|
|
110
|
-
"--right-panel-background": RIGHT_PANEL_BACKGROUND.dark
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
5
|
var DEFAULT_SIZE = "sm";
|
|
115
6
|
var glassBase = {
|
|
116
7
|
backdropFilter: "var(--glass-blur)",
|
|
@@ -418,8 +309,6 @@ var componentThemes = {
|
|
|
418
309
|
})
|
|
419
310
|
// Pagination styles are in custom.css to support :not([data-active]) selector
|
|
420
311
|
};
|
|
421
|
-
|
|
422
|
-
// src/theme/MantineThemeOverride.ts
|
|
423
312
|
var mantineThemeOverride = createTheme({
|
|
424
313
|
defaultRadius: "xs",
|
|
425
314
|
fontFamily: 'Roboto, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
@@ -447,44 +336,120 @@ var mantineThemeOverride = createTheme({
|
|
|
447
336
|
},
|
|
448
337
|
components: componentThemes
|
|
449
338
|
});
|
|
339
|
+
|
|
340
|
+
// src/theme/cssVariables.ts
|
|
341
|
+
var TOKEN_VAR_MAP = {
|
|
342
|
+
primary: "--color-primary",
|
|
343
|
+
primaryContrast: "--color-primary-contrast",
|
|
344
|
+
background: "--color-background",
|
|
345
|
+
surface: "--color-surface",
|
|
346
|
+
surfaceHover: "--color-surface-hover",
|
|
347
|
+
elevatedSurface: "--color-elevated",
|
|
348
|
+
text: "--color-text",
|
|
349
|
+
textDimmed: "--color-text-dimmed",
|
|
350
|
+
textSubtle: "--color-text-subtle",
|
|
351
|
+
border: "--color-border",
|
|
352
|
+
error: "--color-error",
|
|
353
|
+
warning: "--color-warning",
|
|
354
|
+
success: "--color-success",
|
|
355
|
+
glassBackground: "--glass-background",
|
|
356
|
+
glassBlur: "--glass-blur",
|
|
357
|
+
shadow: "--standard-box-shadow",
|
|
358
|
+
cardShadow: "--card-shadow",
|
|
359
|
+
durationFast: "--duration-fast",
|
|
360
|
+
durationNormal: "--duration-normal",
|
|
361
|
+
easing: "--easing",
|
|
362
|
+
destructiveFg: "--color-destructive-fg",
|
|
363
|
+
fontHeading: "--font-heading",
|
|
364
|
+
fontSans: "--font-sans"
|
|
365
|
+
};
|
|
366
|
+
var FRAMEWORK_BRIDGE = {
|
|
367
|
+
"--mantine-color-text": "var(--color-text)",
|
|
368
|
+
"--mantine-color-body": "var(--color-background)",
|
|
369
|
+
"--mantine-color-dimmed": "var(--color-text-dimmed)",
|
|
370
|
+
// Primary color functional variants — used by Tabs, SegmentedControl, Badge, Button, etc.
|
|
371
|
+
"--mantine-primary-color-filled": "var(--color-primary)",
|
|
372
|
+
"--mantine-primary-color-filled-hover": "color-mix(in srgb, var(--color-primary) 90%, black)",
|
|
373
|
+
"--mantine-primary-color-light": "color-mix(in srgb, var(--color-primary) 15%, transparent)",
|
|
374
|
+
"--mantine-primary-color-light-hover": "color-mix(in srgb, var(--color-primary) 20%, transparent)",
|
|
375
|
+
"--mantine-primary-color-light-color": "var(--color-primary)",
|
|
376
|
+
"--mantine-primary-color-contrast": "var(--color-primary-contrast)",
|
|
377
|
+
// Active/selected state — used by selectable cards, active filters, plan tiers, etc.
|
|
378
|
+
"--surface-primary-faint": "color-mix(in srgb, var(--color-primary) 5%, var(--color-elevated))",
|
|
379
|
+
"--surface-primary-subtle": "color-mix(in srgb, var(--color-primary) 6%, var(--color-elevated))",
|
|
380
|
+
"--surface-primary-muted": "color-mix(in srgb, var(--color-primary) 8%, var(--color-elevated))",
|
|
381
|
+
"--surface-primary-strong": "color-mix(in srgb, var(--color-primary) 18%, var(--color-elevated))",
|
|
382
|
+
"--border-primary-faint": "color-mix(in srgb, var(--color-primary) 12%, var(--color-border))",
|
|
383
|
+
"--border-primary-soft": "color-mix(in srgb, var(--color-primary) 16%, var(--color-border))",
|
|
384
|
+
"--border-primary-subtle": "color-mix(in srgb, var(--color-primary) 18%, var(--color-border))",
|
|
385
|
+
"--border-primary-muted": "color-mix(in srgb, var(--color-primary) 34%, var(--color-border))",
|
|
386
|
+
"--border-primary-strong": "color-mix(in srgb, var(--color-primary) 40%, var(--color-border))",
|
|
387
|
+
"--active-border": "1px solid var(--border-primary-strong)",
|
|
388
|
+
"--active-background": "var(--surface-primary-muted)",
|
|
389
|
+
"--input-value-background": "var(--surface-primary-strong)",
|
|
390
|
+
"--input-value-border": "1px solid var(--border-primary-muted)"
|
|
391
|
+
};
|
|
392
|
+
var RIGHT_PANEL_BACKGROUND = {
|
|
393
|
+
light: "color-mix(in srgb, var(--color-elevated) 88%, var(--color-background))",
|
|
394
|
+
dark: "color-mix(in srgb, color-mix(in srgb, var(--color-elevated) 82%, var(--glass-background)) 78%, rgba(8, 9, 11, 0.96))"
|
|
395
|
+
};
|
|
396
|
+
function shadesToVars(shades) {
|
|
397
|
+
const vars = {};
|
|
398
|
+
for (let i = 0; i < shades.length; i++) {
|
|
399
|
+
vars[`--mantine-color-primary-${i}`] = shades[i];
|
|
400
|
+
}
|
|
401
|
+
return vars;
|
|
402
|
+
}
|
|
403
|
+
function presetToVars(tokens) {
|
|
404
|
+
const result = {};
|
|
405
|
+
for (const [key, varName] of Object.entries(TOKEN_VAR_MAP)) {
|
|
406
|
+
const value = tokens[key];
|
|
407
|
+
if (value) result[varName] = value;
|
|
408
|
+
}
|
|
409
|
+
return result;
|
|
410
|
+
}
|
|
411
|
+
function mapTokens(tokens) {
|
|
412
|
+
if (!tokens) return {};
|
|
413
|
+
const result = {};
|
|
414
|
+
for (const [key, varName] of Object.entries(TOKEN_VAR_MAP)) {
|
|
415
|
+
const value = tokens[key];
|
|
416
|
+
if (value) result[varName] = value;
|
|
417
|
+
}
|
|
418
|
+
return result;
|
|
419
|
+
}
|
|
420
|
+
function createCssVariablesResolver(tokens, preset, presetsMap) {
|
|
421
|
+
const resolved = getPreset(preset ?? "default", presetsMap);
|
|
422
|
+
const lightDefaults = presetToVars(resolved.light);
|
|
423
|
+
const darkDefaults = presetToVars(resolved.dark);
|
|
424
|
+
const flat = mapTokens(tokens);
|
|
425
|
+
const light = mapTokens(tokens?.light);
|
|
426
|
+
const dark = mapTokens(tokens?.dark);
|
|
427
|
+
const lightPrimary = tokens?.light?.primary ?? tokens?.primary ?? resolved.light.primary;
|
|
428
|
+
const darkPrimary = tokens?.dark?.primary ?? tokens?.primary ?? resolved.dark.primary;
|
|
429
|
+
const lightShades = shadesToVars(generateShades(lightPrimary));
|
|
430
|
+
const darkShades = shadesToVars(generateShades(darkPrimary));
|
|
431
|
+
return () => ({
|
|
432
|
+
variables: { ...FRAMEWORK_BRIDGE },
|
|
433
|
+
light: {
|
|
434
|
+
...lightShades,
|
|
435
|
+
...lightDefaults,
|
|
436
|
+
...flat,
|
|
437
|
+
...light,
|
|
438
|
+
"--right-panel-background": RIGHT_PANEL_BACKGROUND.light
|
|
439
|
+
},
|
|
440
|
+
dark: {
|
|
441
|
+
...darkShades,
|
|
442
|
+
...darkDefaults,
|
|
443
|
+
...flat,
|
|
444
|
+
...dark,
|
|
445
|
+
"--right-panel-background": RIGHT_PANEL_BACKGROUND.dark
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
}
|
|
450
449
|
var PresetsContext = createContext(PRESETS);
|
|
451
450
|
var PresetsProvider = PresetsContext.Provider;
|
|
452
451
|
function usePresetsContext() {
|
|
453
452
|
return useContext(PresetsContext);
|
|
454
453
|
}
|
|
455
|
-
var BUILT_IN_NAMES = /* @__PURE__ */ new Set([
|
|
456
|
-
"default",
|
|
457
|
-
"tactical",
|
|
458
|
-
"regal",
|
|
459
|
-
"cyber-volt",
|
|
460
|
-
"aurora",
|
|
461
|
-
"rose-gold",
|
|
462
|
-
"midnight",
|
|
463
|
-
"titanium",
|
|
464
|
-
"obsidian",
|
|
465
|
-
"honey",
|
|
466
|
-
"abyss",
|
|
467
|
-
"canopy",
|
|
468
|
-
"slate",
|
|
469
|
-
"cyber-strike",
|
|
470
|
-
"cyber-chrome",
|
|
471
|
-
"cyber-void",
|
|
472
|
-
"quarry"
|
|
473
|
-
]);
|
|
474
|
-
function titleCase(str) {
|
|
475
|
-
return str.replace(/(^|-)(\w)/g, (_, sep, char) => (sep ? " " : "") + char.toUpperCase());
|
|
476
|
-
}
|
|
477
|
-
function useAvailablePresets() {
|
|
478
|
-
const presetsMap = usePresetsContext();
|
|
479
|
-
return useMemo(() => {
|
|
480
|
-
return Object.entries(presetsMap).map(([key, preset]) => ({
|
|
481
|
-
value: key,
|
|
482
|
-
label: preset.label ?? titleCase(key),
|
|
483
|
-
description: preset.description ?? "",
|
|
484
|
-
colors: preset.colors ?? [preset.dark.primary, preset.dark.background, preset.light.background],
|
|
485
|
-
isCustom: !BUILT_IN_NAMES.has(key)
|
|
486
|
-
}));
|
|
487
|
-
}, [presetsMap]);
|
|
488
|
-
}
|
|
489
454
|
|
|
490
|
-
export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, glassBase, mantineThemeOverride,
|
|
455
|
+
export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, glassBase, mantineThemeOverride, usePresetsContext };
|