@datalayer/primer-addons 1.0.18 → 1.0.20
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/lib/components/appearance/AppearanceControls.d.ts +3 -2
- package/lib/components/appearance/AppearanceControls.js +71 -3
- package/lib/components/appearance/AppearanceMenu.d.ts +30 -0
- package/lib/components/appearance/AppearanceMenu.js +15 -0
- package/lib/components/appearance/ColorModeCircle.d.ts +28 -0
- package/lib/components/appearance/ColorModeCircle.js +132 -0
- package/lib/components/appearance/ThemeCircle.d.ts +21 -0
- package/lib/components/appearance/ThemeCircle.js +46 -0
- package/lib/components/appearance/ThemePreviewCard.d.ts +12 -0
- package/lib/components/appearance/ThemePreviewCard.js +83 -0
- package/lib/components/appearance/index.d.ts +4 -0
- package/lib/components/appearance/index.js +4 -0
- package/lib/components/box/Box.d.ts +2 -1
- package/lib/components/closeable-flash/CloseableFlash.js +58 -1
- package/lib/components/color/ColorSwatch.d.ts +23 -0
- package/lib/components/color/ColorSwatch.js +62 -0
- package/lib/components/color/index.d.ts +1 -0
- package/lib/components/color/index.js +5 -0
- package/lib/components/index.d.ts +6 -0
- package/lib/components/index.js +6 -0
- package/lib/components/logo/DatalayerLogo.js +49 -1
- package/lib/components/logo/DatalayerTextAI.d.ts +4 -4
- package/lib/components/logo/DatalayerTextAI.js +6 -6
- package/lib/components/logo/index.d.ts +5 -7
- package/lib/components/logo/index.js +5 -7
- package/lib/components/side-overlay/SideOverlay.js +1 -1
- package/lib/components/sliding-panel/SlidingPanel.d.ts +19 -0
- package/lib/components/sliding-panel/SlidingPanel.js +217 -0
- package/lib/components/sliding-panel/SlidingPanel.stories.d.ts +16 -0
- package/lib/components/sliding-panel/SlidingPanel.stories.js +68 -0
- package/lib/components/toolbar/Toolbar.js +18 -1
- package/lib/components/toolbar/ToolbarButton.js +12 -7
- package/lib/components/toolbar/ToolbarRenderer.js +3 -0
- package/lib/components/toolbar/types.d.ts +11 -2
- package/lib/theme/colors/datalayerColors.d.ts +12 -0
- package/lib/theme/colors/datalayerColors.js +13 -0
- package/lib/theme/colors/earthColors.d.ts +12 -0
- package/lib/theme/colors/earthColors.js +13 -0
- package/lib/theme/colors/index.d.ts +3 -0
- package/lib/theme/colors/index.js +9 -0
- package/lib/theme/colors/ivoryColors.d.ts +46 -0
- package/lib/theme/colors/ivoryColors.js +56 -0
- package/lib/theme/colors/lovelyColors.d.ts +12 -0
- package/lib/theme/colors/lovelyColors.js +13 -0
- package/lib/theme/colors/matrixColors.d.ts +12 -0
- package/lib/theme/colors/matrixColors.js +13 -0
- package/lib/theme/colors/sandColors.d.ts +45 -0
- package/lib/theme/colors/sandColors.js +55 -0
- package/lib/theme/colors/spatialColors.d.ts +12 -0
- package/lib/theme/colors/spatialColors.js +13 -0
- package/lib/theme/colors/sunColors.d.ts +45 -0
- package/lib/theme/colors/sunColors.js +55 -0
- package/lib/theme/css/createThemeCSSVars.d.ts +25 -1
- package/lib/theme/css/createThemeCSSVars.js +56 -3
- package/lib/theme/index.d.ts +3 -0
- package/lib/theme/index.js +3 -0
- package/lib/theme/palettes/ColorPalette.js +121 -1
- package/lib/theme/themeRegistry.d.ts +1 -1
- package/lib/theme/themeRegistry.js +151 -1
- package/lib/theme/themes/datalayerTheme.js +58 -7
- package/lib/theme/themes/earthTheme.js +50 -0
- package/lib/theme/themes/ivoryTheme.d.ts +1091 -0
- package/lib/theme/themes/ivoryTheme.js +257 -0
- package/lib/theme/themes/lovelyTheme.js +58 -7
- package/lib/theme/themes/matrixTheme.js +57 -8
- package/lib/theme/themes/sandTheme.d.ts +1091 -0
- package/lib/theme/themes/sandTheme.js +256 -0
- package/lib/theme/themes/spatialTheme.js +58 -7
- package/lib/theme/themes/sunTheme.d.ts +1091 -0
- package/lib/theme/themes/sunTheme.js +257 -0
- package/lib/utils/Helper.d.ts +1 -1
- package/lib/utils/Portals.d.ts +0 -1
- package/lib/utils/Portals.js +0 -1
- package/package.json +9 -5
- package/lib/App.d.ts +0 -13
- package/lib/App.js +0 -25
- package/lib/components/logo/AI.d.ts +0 -17
- package/lib/components/logo/AI.js +0 -18
- package/lib/components/logo/AI2.d.ts +0 -20
- package/lib/components/logo/AI2.js +0 -23
|
@@ -33,11 +33,33 @@
|
|
|
33
33
|
* | Legacy aliases | `--color-btn-primary-bg` |
|
|
34
34
|
* | Brand (custom) | `--brand-color-canvas-default` |
|
|
35
35
|
*/
|
|
36
|
-
export function colorDefsToCSS(defs) {
|
|
36
|
+
export function colorDefsToCSS(defs, mode = 'light') {
|
|
37
37
|
const optional = {};
|
|
38
38
|
if (defs.canvas.subtle) {
|
|
39
39
|
optional['--bgColor-muted'] = defs.canvas.subtle;
|
|
40
40
|
}
|
|
41
|
+
/* ── Semantic role fallbacks ─────────────────────────────────────
|
|
42
|
+
* Themes may override `attention` / `danger` / `severe` / `done`,
|
|
43
|
+
* but when they don't we supply sensible, mode-aware defaults so the
|
|
44
|
+
* full Primer semantic palette is always defined (apps do not load
|
|
45
|
+
* @primer/primitives CSS). */
|
|
46
|
+
const roleFallbacks = mode === 'dark'
|
|
47
|
+
? {
|
|
48
|
+
attention: { fg: '#d29922', emphasis: '#9e6a03', muted: '#bb8009', subtle: '#341a00' },
|
|
49
|
+
danger: { fg: '#f85149', emphasis: '#da3633', muted: '#b62324', subtle: '#25171c' },
|
|
50
|
+
severe: { fg: '#db6d28', emphasis: '#bd561d', muted: '#9e5122', subtle: '#2a1801' },
|
|
51
|
+
done: { fg: '#a371f7', emphasis: '#8957e5', muted: '#6e40c9', subtle: '#221530' },
|
|
52
|
+
}
|
|
53
|
+
: {
|
|
54
|
+
attention: { fg: '#9a6700', emphasis: '#bf8700', muted: '#d4a72c', subtle: '#fff8c5' },
|
|
55
|
+
danger: { fg: '#cf222e', emphasis: '#cf222e', muted: '#ff8182', subtle: '#ffebe9' },
|
|
56
|
+
severe: { fg: '#bc4c00', emphasis: '#bc4c00', muted: '#fdaa7f', subtle: '#fff1e5' },
|
|
57
|
+
done: { fg: '#8250df', emphasis: '#8250df', muted: '#d8b9ff', subtle: '#fbefff' },
|
|
58
|
+
};
|
|
59
|
+
const attention = defs.attention ?? roleFallbacks.attention;
|
|
60
|
+
const danger = defs.danger ?? roleFallbacks.danger;
|
|
61
|
+
const severe = defs.severe ?? roleFallbacks.severe;
|
|
62
|
+
const done = defs.done ?? roleFallbacks.done;
|
|
41
63
|
return {
|
|
42
64
|
/* ── Canvas / Background ─────────────────────────────────────── */
|
|
43
65
|
'--bgColor-default': defs.canvas.default,
|
|
@@ -68,6 +90,30 @@ export function colorDefsToCSS(defs) {
|
|
|
68
90
|
'--bgColor-success-muted': defs.success.subtle ?? defs.success.muted,
|
|
69
91
|
'--borderColor-success-emphasis': defs.success.emphasis,
|
|
70
92
|
'--borderColor-success-muted': defs.success.muted,
|
|
93
|
+
/* ── Attention (amber) ───────────────────────────────────────── */
|
|
94
|
+
'--fgColor-attention': attention.fg,
|
|
95
|
+
'--bgColor-attention-emphasis': attention.emphasis,
|
|
96
|
+
'--bgColor-attention-muted': attention.subtle ?? attention.muted,
|
|
97
|
+
'--borderColor-attention-emphasis': attention.emphasis,
|
|
98
|
+
'--borderColor-attention-muted': attention.muted,
|
|
99
|
+
/* ── Danger (red) ────────────────────────────────────────────── */
|
|
100
|
+
'--fgColor-danger': danger.fg,
|
|
101
|
+
'--bgColor-danger-emphasis': danger.emphasis,
|
|
102
|
+
'--bgColor-danger-muted': danger.subtle ?? danger.muted,
|
|
103
|
+
'--borderColor-danger-emphasis': danger.emphasis,
|
|
104
|
+
'--borderColor-danger-muted': danger.muted,
|
|
105
|
+
/* ── Severe (orange) ─────────────────────────────────────────── */
|
|
106
|
+
'--fgColor-severe': severe.fg,
|
|
107
|
+
'--bgColor-severe-emphasis': severe.emphasis,
|
|
108
|
+
'--bgColor-severe-muted': severe.subtle ?? severe.muted,
|
|
109
|
+
'--borderColor-severe-emphasis': severe.emphasis,
|
|
110
|
+
'--borderColor-severe-muted': severe.muted,
|
|
111
|
+
/* ── Done (purple) ───────────────────────────────────────────── */
|
|
112
|
+
'--fgColor-done': done.fg,
|
|
113
|
+
'--bgColor-done-emphasis': done.emphasis,
|
|
114
|
+
'--bgColor-done-muted': done.subtle ?? done.muted,
|
|
115
|
+
'--borderColor-done-emphasis': done.emphasis,
|
|
116
|
+
'--borderColor-done-muted': done.muted,
|
|
71
117
|
/* ── Border (generic) ────────────────────────────────────────── */
|
|
72
118
|
'--borderColor-default': defs.border?.default ?? defs.btn.border,
|
|
73
119
|
'--borderColor-muted': defs.border?.muted ?? defs.btn.border,
|
|
@@ -173,6 +219,13 @@ export function colorDefsToCSS(defs) {
|
|
|
173
219
|
'--control-transparent-bgColor-selected': defs.btn.selectedBg,
|
|
174
220
|
'--control-transparent-borderColor-hover': 'transparent',
|
|
175
221
|
'--control-transparent-borderColor-active': 'transparent',
|
|
222
|
+
/* ── Disabled controls / fields ─────────────────────────────── */
|
|
223
|
+
'--control-bgColor-disabled': defs.canvas.subtle ?? defs.btn.bg,
|
|
224
|
+
'--control-borderColor-disabled': defs.border?.default ?? defs.btn.border,
|
|
225
|
+
'--control-fgColor-disabled': defs.fg.muted,
|
|
226
|
+
'--fgColor-disabled': defs.fg.muted,
|
|
227
|
+
'--color-input-disabled-bg': defs.canvas.subtle ?? defs.btn.bg,
|
|
228
|
+
'--color-primer-fg-disabled': defs.fg.muted,
|
|
176
229
|
/* ── Menu ────────────────────────────────────────────────────── */
|
|
177
230
|
'--menu-bgColor-active': defs.btn.hoverBg,
|
|
178
231
|
/* ── Legacy / compat aliases ─────────────────────────────────── */
|
|
@@ -226,7 +279,7 @@ export function buildThemeStyles(light, dark, options) {
|
|
|
226
279
|
color: light.fg.default,
|
|
227
280
|
fontSize: 'var(--text-body-size-medium)',
|
|
228
281
|
...(options?.fontFamily ? { fontFamily: options.fontFamily } : {}),
|
|
229
|
-
...colorDefsToCSS(light),
|
|
282
|
+
...colorDefsToCSS(light, 'light'),
|
|
230
283
|
...fontVars,
|
|
231
284
|
},
|
|
232
285
|
dark: {
|
|
@@ -234,7 +287,7 @@ export function buildThemeStyles(light, dark, options) {
|
|
|
234
287
|
color: dark.fg.default,
|
|
235
288
|
fontSize: 'var(--text-body-size-medium)',
|
|
236
289
|
...(options?.fontFamily ? { fontFamily: options.fontFamily } : {}),
|
|
237
|
-
...colorDefsToCSS(dark),
|
|
290
|
+
...colorDefsToCSS(dark, 'dark'),
|
|
238
291
|
...fontVars,
|
|
239
292
|
},
|
|
240
293
|
};
|
package/lib/theme/index.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export * from './themes/spatialTheme';
|
|
|
8
8
|
export * from './themes/lovelyTheme';
|
|
9
9
|
export * from './themes/matrixTheme';
|
|
10
10
|
export * from './themes/earthTheme';
|
|
11
|
+
export * from './themes/sandTheme';
|
|
12
|
+
export * from './themes/ivoryTheme';
|
|
13
|
+
export * from './themes/sunTheme';
|
|
11
14
|
export * from './themes-brand/spatialBrandTheme';
|
|
12
15
|
export * from './themeRegistry';
|
|
13
16
|
export * from './palettes';
|
package/lib/theme/index.js
CHANGED
|
@@ -12,6 +12,9 @@ export * from './themes/spatialTheme';
|
|
|
12
12
|
export * from './themes/lovelyTheme';
|
|
13
13
|
export * from './themes/matrixTheme';
|
|
14
14
|
export * from './themes/earthTheme';
|
|
15
|
+
export * from './themes/sandTheme';
|
|
16
|
+
export * from './themes/ivoryTheme';
|
|
17
|
+
export * from './themes/sunTheme';
|
|
15
18
|
export * from './themes-brand/spatialBrandTheme';
|
|
16
19
|
export * from './themeRegistry';
|
|
17
20
|
export * from './palettes';
|
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* Shared palette types, theme-aware colour resolution, and reusable
|
|
9
9
|
* gradient / grid definitions.
|
|
10
10
|
*/
|
|
11
|
-
import { datalayerColors, spatialColors, lovelyColors, matrixColors, earthColors, } from '../colors';
|
|
11
|
+
import { datalayerColors, spatialColors, lovelyColors, matrixColors, earthColors, sandColors, ivoryColors, sunColors, } from '../colors';
|
|
12
12
|
import { getBrightPalette, } from '../themeRegistry';
|
|
13
13
|
import { useThemeStore } from '../useThemeStore';
|
|
14
14
|
const dlBrightDark = getBrightPalette('datalayer');
|
|
@@ -21,6 +21,12 @@ const mxBrightDark = getBrightPalette('matrix');
|
|
|
21
21
|
const mxBrightLight = getBrightPalette('matrix', 'light');
|
|
22
22
|
const eaBrightDark = getBrightPalette('earth');
|
|
23
23
|
const eaBrightLight = getBrightPalette('earth', 'light');
|
|
24
|
+
const saBrightDark = getBrightPalette('sand');
|
|
25
|
+
const saBrightLight = getBrightPalette('sand', 'light');
|
|
26
|
+
const ivBrightDark = getBrightPalette('ivory');
|
|
27
|
+
const ivBrightLight = getBrightPalette('ivory', 'light');
|
|
28
|
+
const suBrightDark = getBrightPalette('sun');
|
|
29
|
+
const suBrightLight = getBrightPalette('sun', 'light');
|
|
24
30
|
const palettes = {
|
|
25
31
|
datalayer: {
|
|
26
32
|
light: {
|
|
@@ -212,6 +218,120 @@ const palettes = {
|
|
|
212
218
|
isLight: false,
|
|
213
219
|
},
|
|
214
220
|
},
|
|
221
|
+
sand: {
|
|
222
|
+
light: {
|
|
223
|
+
bg: '#FBF7EF',
|
|
224
|
+
bgPanel: '#ffffff',
|
|
225
|
+
bgAlt: sandColors.sandTint,
|
|
226
|
+
primary: sandColors.sandBrand,
|
|
227
|
+
secondary: sandColors.sandText,
|
|
228
|
+
accent: sandColors.sandAccent,
|
|
229
|
+
glow: saBrightLight.glow,
|
|
230
|
+
pop: saBrightLight.pop,
|
|
231
|
+
spark: saBrightLight.spark,
|
|
232
|
+
blaze: saBrightLight.blaze,
|
|
233
|
+
surge: saBrightLight.surge,
|
|
234
|
+
flame: saBrightLight.flame,
|
|
235
|
+
gold: saBrightLight.gold,
|
|
236
|
+
textLight: '#2B2118',
|
|
237
|
+
textMuted: sandColors.gray,
|
|
238
|
+
isLight: true,
|
|
239
|
+
},
|
|
240
|
+
dark: {
|
|
241
|
+
bg: sandColors.black,
|
|
242
|
+
bgPanel: '#2A2118',
|
|
243
|
+
bgAlt: '#33281A',
|
|
244
|
+
primary: sandColors.sandAccent,
|
|
245
|
+
secondary: sandColors.sandBrand,
|
|
246
|
+
accent: sandColors.sandBright,
|
|
247
|
+
glow: saBrightDark.glow,
|
|
248
|
+
pop: saBrightDark.pop,
|
|
249
|
+
spark: saBrightDark.spark,
|
|
250
|
+
blaze: saBrightDark.blaze,
|
|
251
|
+
surge: saBrightDark.surge,
|
|
252
|
+
flame: saBrightDark.flame,
|
|
253
|
+
gold: saBrightDark.gold,
|
|
254
|
+
textLight: '#EDE3D3',
|
|
255
|
+
textMuted: '#B7A793',
|
|
256
|
+
isLight: false,
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
ivory: {
|
|
260
|
+
light: {
|
|
261
|
+
bg: '#FBF6EC',
|
|
262
|
+
bgPanel: '#ffffff',
|
|
263
|
+
bgAlt: ivoryColors.ivoryTint,
|
|
264
|
+
primary: ivoryColors.ivoryBrand,
|
|
265
|
+
secondary: ivoryColors.ivoryText,
|
|
266
|
+
accent: ivoryColors.ivoryAccent,
|
|
267
|
+
glow: ivBrightLight.glow,
|
|
268
|
+
pop: ivBrightLight.pop,
|
|
269
|
+
spark: ivBrightLight.spark,
|
|
270
|
+
blaze: ivBrightLight.blaze,
|
|
271
|
+
surge: ivBrightLight.surge,
|
|
272
|
+
flame: ivBrightLight.flame,
|
|
273
|
+
gold: ivBrightLight.gold,
|
|
274
|
+
textLight: '#2C2318',
|
|
275
|
+
textMuted: ivoryColors.gray,
|
|
276
|
+
isLight: true,
|
|
277
|
+
},
|
|
278
|
+
dark: {
|
|
279
|
+
bg: ivoryColors.black,
|
|
280
|
+
bgPanel: '#2A2219',
|
|
281
|
+
bgAlt: '#33291B',
|
|
282
|
+
primary: ivoryColors.ivoryAccent,
|
|
283
|
+
secondary: ivoryColors.ivoryBrand,
|
|
284
|
+
accent: ivoryColors.ivoryBright,
|
|
285
|
+
glow: ivBrightDark.glow,
|
|
286
|
+
pop: ivBrightDark.pop,
|
|
287
|
+
spark: ivBrightDark.spark,
|
|
288
|
+
blaze: ivBrightDark.blaze,
|
|
289
|
+
surge: ivBrightDark.surge,
|
|
290
|
+
flame: ivBrightDark.flame,
|
|
291
|
+
gold: ivBrightDark.gold,
|
|
292
|
+
textLight: '#EFE6D6',
|
|
293
|
+
textMuted: '#BBAC97',
|
|
294
|
+
isLight: false,
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
sun: {
|
|
298
|
+
light: {
|
|
299
|
+
bg: '#FFF9EC',
|
|
300
|
+
bgPanel: '#ffffff',
|
|
301
|
+
bgAlt: sunColors.sunTint,
|
|
302
|
+
primary: sunColors.sunBrand,
|
|
303
|
+
secondary: sunColors.sunText,
|
|
304
|
+
accent: sunColors.sunAccent,
|
|
305
|
+
glow: suBrightLight.glow,
|
|
306
|
+
pop: suBrightLight.pop,
|
|
307
|
+
spark: suBrightLight.spark,
|
|
308
|
+
blaze: suBrightLight.blaze,
|
|
309
|
+
surge: suBrightLight.surge,
|
|
310
|
+
flame: suBrightLight.flame,
|
|
311
|
+
gold: suBrightLight.gold,
|
|
312
|
+
textLight: '#2A2210',
|
|
313
|
+
textMuted: sunColors.gray,
|
|
314
|
+
isLight: true,
|
|
315
|
+
},
|
|
316
|
+
dark: {
|
|
317
|
+
bg: sunColors.black,
|
|
318
|
+
bgPanel: '#2A2109',
|
|
319
|
+
bgAlt: '#33290C',
|
|
320
|
+
primary: sunColors.sunAccent,
|
|
321
|
+
secondary: sunColors.sunBrand,
|
|
322
|
+
accent: sunColors.sunBright,
|
|
323
|
+
glow: suBrightDark.glow,
|
|
324
|
+
pop: suBrightDark.pop,
|
|
325
|
+
spark: suBrightDark.spark,
|
|
326
|
+
blaze: suBrightDark.blaze,
|
|
327
|
+
surge: suBrightDark.surge,
|
|
328
|
+
flame: suBrightDark.flame,
|
|
329
|
+
gold: suBrightDark.gold,
|
|
330
|
+
textLight: '#F3E9CF',
|
|
331
|
+
textMuted: '#BEAC82',
|
|
332
|
+
isLight: false,
|
|
333
|
+
},
|
|
334
|
+
},
|
|
215
335
|
};
|
|
216
336
|
export function getColorPalette(theme = 'datalayer', colorMode = 'auto') {
|
|
217
337
|
const mode = colorMode === 'auto'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
2
|
import { type ColorMode } from './DatalayerBrandThemeProvider';
|
|
3
3
|
/** Available theme variants. */
|
|
4
|
-
export type ThemeVariant = 'datalayer' | 'spatial' | 'lovely' | 'matrix' | 'earth';
|
|
4
|
+
export type ThemeVariant = 'datalayer' | 'spatial' | 'lovely' | 'matrix' | 'earth' | 'sand' | 'ivory' | 'sun';
|
|
5
5
|
/** A pair of colours for a two-stop gradient. */
|
|
6
6
|
export interface GradientPair {
|
|
7
7
|
/** Start colour (brighter / brand). */
|
|
@@ -7,11 +7,17 @@ import { spatialTheme, spatialThemeStyles } from './themes/spatialTheme';
|
|
|
7
7
|
import { lovelyTheme, lovelyThemeStyles } from './themes/lovelyTheme';
|
|
8
8
|
import { matrixTheme, matrixThemeStyles } from './themes/matrixTheme';
|
|
9
9
|
import { earthTheme, earthThemeStyles } from './themes/earthTheme';
|
|
10
|
+
import { sandTheme, sandThemeStyles } from './themes/sandTheme';
|
|
11
|
+
import { ivoryTheme, ivoryThemeStyles } from './themes/ivoryTheme';
|
|
12
|
+
import { sunTheme, sunThemeStyles } from './themes/sunTheme';
|
|
10
13
|
import { datalayerColors } from './colors/datalayerColors';
|
|
11
14
|
import { spatialColors } from './colors/spatialColors';
|
|
12
15
|
import { lovelyColors } from './colors/lovelyColors';
|
|
13
16
|
import { matrixColors } from './colors/matrixColors';
|
|
14
17
|
import { earthColors } from './colors/earthColors';
|
|
18
|
+
import { sandColors } from './colors/sandColors';
|
|
19
|
+
import { ivoryColors } from './colors/ivoryColors';
|
|
20
|
+
import { sunColors } from './colors/sunColors';
|
|
15
21
|
/* ─── Registry ────────────────────────────────────────────────────────── */
|
|
16
22
|
export const themeConfigs = {
|
|
17
23
|
datalayer: {
|
|
@@ -174,9 +180,105 @@ export const themeConfigs = {
|
|
|
174
180
|
gold: earthColors.brightLightGold, // #A16207 — deep gold
|
|
175
181
|
},
|
|
176
182
|
},
|
|
183
|
+
sand: {
|
|
184
|
+
label: 'Sand',
|
|
185
|
+
description: 'Warm, pale desert neutrals with a golden accent — calm & editorial.',
|
|
186
|
+
brandColor: sandColors.sandBrand,
|
|
187
|
+
defaultColorMode: 'light',
|
|
188
|
+
primerTheme: sandTheme,
|
|
189
|
+
themeStyles: sandThemeStyles,
|
|
190
|
+
cardGradient: {
|
|
191
|
+
light: { from: sandColors.sandBrand, to: sandColors.sandText }, // #B07A4E → #8A5A34
|
|
192
|
+
dark: { from: sandColors.sandAccent, to: sandColors.sandBrand }, // #C99A6B → #B07A4E
|
|
193
|
+
},
|
|
194
|
+
brightPalette: {
|
|
195
|
+
glow: sandColors.brightGlow, // #E0A15C — warm sand glow
|
|
196
|
+
onGlow: '#211A12', // dark text on warm sand
|
|
197
|
+
pop: sandColors.brightPop, // #D98A5A — clay
|
|
198
|
+
spark: sandColors.brightSpark, // #E7C24E — wheat gold
|
|
199
|
+
blaze: sandColors.brightBlaze, // #E06A45 — terracotta
|
|
200
|
+
surge: sandColors.brightSurge, // #8FA98A — sage
|
|
201
|
+
flame: sandColors.brightFlame, // #E68A34 — amber
|
|
202
|
+
gold: sandColors.brightGold, // #EBCB5E — golden wheat
|
|
203
|
+
},
|
|
204
|
+
brightPaletteLight: {
|
|
205
|
+
glow: sandColors.brightLightGlow, // #8A5A34 — deep clay
|
|
206
|
+
onGlow: '#ffffff', // white text on deep clay
|
|
207
|
+
pop: sandColors.brightLightPop, // #A9633B — deep terracotta-clay
|
|
208
|
+
spark: sandColors.brightLightSpark, // #B08A16 — deep wheat gold
|
|
209
|
+
blaze: sandColors.brightLightBlaze, // #B0432A — deep terracotta
|
|
210
|
+
surge: sandColors.brightLightSurge, // #5E7A5A — deep sage
|
|
211
|
+
flame: sandColors.brightLightFlame, // #B0661E — deep amber
|
|
212
|
+
gold: sandColors.brightLightGold, // #997B1A — deep gold
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
ivory: {
|
|
216
|
+
label: 'Ivory',
|
|
217
|
+
description: 'Soft, warm off-white that creates a calm, refined, and welcoming feeling.',
|
|
218
|
+
brandColor: ivoryColors.ivoryBrand,
|
|
219
|
+
defaultColorMode: 'light',
|
|
220
|
+
primerTheme: ivoryTheme,
|
|
221
|
+
themeStyles: ivoryThemeStyles,
|
|
222
|
+
cardGradient: {
|
|
223
|
+
light: { from: ivoryColors.ivoryBrand, to: ivoryColors.ivoryText }, // #E6D2B5 → #6B5A3E
|
|
224
|
+
dark: { from: ivoryColors.ivoryAccent, to: ivoryColors.ivoryBrand }, // #D8C09B → #E6D2B5
|
|
225
|
+
},
|
|
226
|
+
brightPalette: {
|
|
227
|
+
glow: ivoryColors.brightGlow, // #E6D2B5 — ivory glow
|
|
228
|
+
onGlow: '#211A12', // dark text on warm ivory
|
|
229
|
+
pop: ivoryColors.brightPop, // #D8B27E — warm tan
|
|
230
|
+
spark: ivoryColors.brightSpark, // #EFDFC2 — bright ivory
|
|
231
|
+
blaze: ivoryColors.brightBlaze, // #DD7048 — soft terracotta
|
|
232
|
+
surge: ivoryColors.brightSurge, // #98A783 — sage
|
|
233
|
+
flame: ivoryColors.brightFlame, // #E0912F — amber
|
|
234
|
+
gold: ivoryColors.brightGold, // #EACF6A — soft gold
|
|
235
|
+
},
|
|
236
|
+
brightPaletteLight: {
|
|
237
|
+
glow: ivoryColors.brightLightGlow, // #6B5A3E — deep taupe
|
|
238
|
+
onGlow: '#ffffff', // white text on deep taupe
|
|
239
|
+
pop: ivoryColors.brightLightPop, // #9C6626 — deep amber-tan
|
|
240
|
+
spark: ivoryColors.brightLightSpark, // #8A7320 — deep gold
|
|
241
|
+
blaze: ivoryColors.brightLightBlaze, // #AB4229 — deep terracotta
|
|
242
|
+
surge: ivoryColors.brightLightSurge, // #5C6C4C — deep sage
|
|
243
|
+
flame: ivoryColors.brightLightFlame, // #9C6221 — deep amber
|
|
244
|
+
gold: ivoryColors.brightLightGold, // #836A18 — deep gold
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
sun: {
|
|
248
|
+
label: 'Sun',
|
|
249
|
+
description: 'Warm, radiant theme inspired by golden light, bringing energy, optimism, and a welcoming atmosphere.',
|
|
250
|
+
brandColor: sunColors.sunBrand,
|
|
251
|
+
defaultColorMode: 'light',
|
|
252
|
+
primerTheme: sunTheme,
|
|
253
|
+
themeStyles: sunThemeStyles,
|
|
254
|
+
cardGradient: {
|
|
255
|
+
light: { from: sunColors.sunBrand, to: sunColors.sunText }, // #FFC107 → #8A5300
|
|
256
|
+
dark: { from: sunColors.sunAccent, to: sunColors.sunBrand }, // #F0A800 → #FFC107
|
|
257
|
+
},
|
|
258
|
+
brightPalette: {
|
|
259
|
+
glow: sunColors.brightGlow, // #FFC107 — amber glow
|
|
260
|
+
onGlow: '#211A08', // dark text on radiant amber
|
|
261
|
+
pop: sunColors.brightPop, // #FF9F1C — vivid orange-amber
|
|
262
|
+
spark: sunColors.brightSpark, // #FFD54A — bright sun
|
|
263
|
+
blaze: sunColors.brightBlaze, // #FF6B35 — coral-orange
|
|
264
|
+
surge: sunColors.brightSurge, // #4FB0C6 — sky blue
|
|
265
|
+
flame: sunColors.brightFlame, // #FF8500 — amber flame
|
|
266
|
+
gold: sunColors.brightGold, // #FFD700 — gold
|
|
267
|
+
},
|
|
268
|
+
brightPaletteLight: {
|
|
269
|
+
glow: sunColors.brightLightGlow, // #8A5300 — deep amber-brown
|
|
270
|
+
onGlow: '#ffffff', // white text on deep amber
|
|
271
|
+
pop: sunColors.brightLightPop, // #B8560F — deep orange-amber
|
|
272
|
+
spark: sunColors.brightLightSpark, // #9A7B00 — deep gold
|
|
273
|
+
blaze: sunColors.brightLightBlaze, // #B23A1E — deep coral
|
|
274
|
+
surge: sunColors.brightLightSurge, // #2A7C8E — deep sky-teal
|
|
275
|
+
flame: sunColors.brightLightFlame, // #A85D0C — deep amber
|
|
276
|
+
gold: sunColors.brightLightGold, // #8A6E00 — deep gold
|
|
277
|
+
},
|
|
278
|
+
},
|
|
177
279
|
};
|
|
178
280
|
/** All available theme variants in display order. */
|
|
179
|
-
export const themeVariants = ['datalayer', 'spatial', 'lovely', 'matrix', 'earth'];
|
|
281
|
+
export const themeVariants = ['datalayer', 'spatial', 'lovely', 'matrix', 'earth', 'sand', 'ivory', 'sun'];
|
|
180
282
|
/** Look up a theme config by variant name. */
|
|
181
283
|
export function getThemeConfig(variant) {
|
|
182
284
|
return themeConfigs[variant];
|
|
@@ -313,6 +415,54 @@ const avatarColorPalettes = {
|
|
|
313
415
|
earthColors.brightFlame, // #F59E0B — amber gold
|
|
314
416
|
],
|
|
315
417
|
},
|
|
418
|
+
sand: {
|
|
419
|
+
light: [
|
|
420
|
+
sandColors.sandText, // #8A5A34 — deep clay
|
|
421
|
+
sandColors.sandBrand, // #B07A4E — camel dune
|
|
422
|
+
sandColors.brightLightPop, // #A9633B — deep terracotta-clay
|
|
423
|
+
sandColors.brightLightGold, // #997B1A — deep gold
|
|
424
|
+
sandColors.gray, // #6B5D4F — taupe
|
|
425
|
+
],
|
|
426
|
+
dark: [
|
|
427
|
+
sandColors.sandAccent, // #C99A6B — light tan
|
|
428
|
+
sandColors.sandBright, // #D9B589 — bright sand
|
|
429
|
+
sandColors.brightPop, // #D98A5A — clay
|
|
430
|
+
sandColors.brightSpark, // #E7C24E — wheat gold
|
|
431
|
+
sandColors.brightFlame, // #E68A34 — amber
|
|
432
|
+
],
|
|
433
|
+
},
|
|
434
|
+
ivory: {
|
|
435
|
+
light: [
|
|
436
|
+
ivoryColors.ivoryText, // #6B5A3E — deep taupe
|
|
437
|
+
ivoryColors.ivoryBrand, // #E6D2B5 — light ivory
|
|
438
|
+
ivoryColors.brightLightPop, // #9C6626 — deep amber-tan
|
|
439
|
+
ivoryColors.brightLightGold, // #836A18 — deep gold
|
|
440
|
+
ivoryColors.gray, // #6F6353 — warm taupe
|
|
441
|
+
],
|
|
442
|
+
dark: [
|
|
443
|
+
ivoryColors.ivoryAccent, // #D8C09B — deeper ivory
|
|
444
|
+
ivoryColors.ivoryBright, // #EFDFC2 — bright ivory
|
|
445
|
+
ivoryColors.brightPop, // #D8B27E — warm tan
|
|
446
|
+
ivoryColors.brightSpark, // #EFDFC2 — bright ivory
|
|
447
|
+
ivoryColors.brightFlame, // #E0912F — amber
|
|
448
|
+
],
|
|
449
|
+
},
|
|
450
|
+
sun: {
|
|
451
|
+
light: [
|
|
452
|
+
sunColors.sunText, // #8A5300 — deep amber-brown
|
|
453
|
+
sunColors.sunBrand, // #FFC107 — radiant amber
|
|
454
|
+
sunColors.brightLightPop, // #B8560F — deep orange-amber
|
|
455
|
+
sunColors.brightLightBlaze, // #B23A1E — deep coral
|
|
456
|
+
sunColors.gray, // #7A6A3A — amber-taupe
|
|
457
|
+
],
|
|
458
|
+
dark: [
|
|
459
|
+
sunColors.sunAccent, // #F0A800 — deep amber
|
|
460
|
+
sunColors.sunBright, // #FFD54A — bright sun
|
|
461
|
+
sunColors.brightPop, // #FF9F1C — vivid orange-amber
|
|
462
|
+
sunColors.brightBlaze, // #FF6B35 — coral-orange
|
|
463
|
+
sunColors.brightSurge, // #4FB0C6 — sky blue
|
|
464
|
+
],
|
|
465
|
+
},
|
|
316
466
|
};
|
|
317
467
|
/**
|
|
318
468
|
* Get a 5-colour avatar palette for the given theme variant and colour mode.
|
|
@@ -16,6 +16,7 @@ import { buildThemeStyles } from '../css/createThemeCSSVars';
|
|
|
16
16
|
const datalayerLight = {
|
|
17
17
|
canvas: {
|
|
18
18
|
default: datalayerColors.white,
|
|
19
|
+
subtle: '#f4f5f6',
|
|
19
20
|
},
|
|
20
21
|
fg: {
|
|
21
22
|
default: datalayerColors.black,
|
|
@@ -26,11 +27,37 @@ const datalayerLight = {
|
|
|
26
27
|
fg: datalayerColors.greenText,
|
|
27
28
|
emphasis: datalayerColors.greenBrand,
|
|
28
29
|
muted: datalayerColors.greenAccent,
|
|
30
|
+
subtle: datalayerColors.greenTint,
|
|
29
31
|
},
|
|
30
32
|
success: {
|
|
31
|
-
fg:
|
|
32
|
-
emphasis:
|
|
33
|
-
muted:
|
|
33
|
+
fg: '#1a7f37',
|
|
34
|
+
emphasis: '#2da44e',
|
|
35
|
+
muted: '#4ac26b',
|
|
36
|
+
subtle: '#dafbe1',
|
|
37
|
+
},
|
|
38
|
+
attention: {
|
|
39
|
+
fg: datalayerColors.attentionBrand,
|
|
40
|
+
emphasis: datalayerColors.attentionAccent,
|
|
41
|
+
muted: datalayerColors.attentionBrand,
|
|
42
|
+
subtle: datalayerColors.attentionTint,
|
|
43
|
+
},
|
|
44
|
+
danger: {
|
|
45
|
+
fg: datalayerColors.dangerBrand,
|
|
46
|
+
emphasis: datalayerColors.dangerBrand,
|
|
47
|
+
muted: datalayerColors.dangerAccent,
|
|
48
|
+
subtle: datalayerColors.dangerTint,
|
|
49
|
+
},
|
|
50
|
+
severe: {
|
|
51
|
+
fg: datalayerColors.severeBrand,
|
|
52
|
+
emphasis: datalayerColors.severeBrand,
|
|
53
|
+
muted: datalayerColors.severeAccent,
|
|
54
|
+
subtle: datalayerColors.severeTint,
|
|
55
|
+
},
|
|
56
|
+
done: {
|
|
57
|
+
fg: datalayerColors.doneBrand,
|
|
58
|
+
emphasis: datalayerColors.doneBrand,
|
|
59
|
+
muted: datalayerColors.doneAccent,
|
|
60
|
+
subtle: datalayerColors.doneTint,
|
|
34
61
|
},
|
|
35
62
|
border: {
|
|
36
63
|
default: '#d1d9e0',
|
|
@@ -114,10 +141,34 @@ const datalayerDark = {
|
|
|
114
141
|
subtle: '#1f352d',
|
|
115
142
|
},
|
|
116
143
|
success: {
|
|
117
|
-
fg:
|
|
118
|
-
emphasis:
|
|
119
|
-
muted:
|
|
120
|
-
subtle: '#
|
|
144
|
+
fg: '#3fb950',
|
|
145
|
+
emphasis: '#238636',
|
|
146
|
+
muted: '#2ea043',
|
|
147
|
+
subtle: '#0f2a18',
|
|
148
|
+
},
|
|
149
|
+
attention: {
|
|
150
|
+
fg: '#e3b341',
|
|
151
|
+
emphasis: '#9e6a03',
|
|
152
|
+
muted: '#d4a72c',
|
|
153
|
+
subtle: '#341a00',
|
|
154
|
+
},
|
|
155
|
+
danger: {
|
|
156
|
+
fg: '#ff7b72',
|
|
157
|
+
emphasis: '#da3633',
|
|
158
|
+
muted: datalayerColors.dangerBrand,
|
|
159
|
+
subtle: '#25171c',
|
|
160
|
+
},
|
|
161
|
+
severe: {
|
|
162
|
+
fg: '#f0883e',
|
|
163
|
+
emphasis: '#bd561d',
|
|
164
|
+
muted: datalayerColors.severeBrand,
|
|
165
|
+
subtle: '#2a1801',
|
|
166
|
+
},
|
|
167
|
+
done: {
|
|
168
|
+
fg: '#79c0ff',
|
|
169
|
+
emphasis: '#1f6feb',
|
|
170
|
+
muted: datalayerColors.doneBrand,
|
|
171
|
+
subtle: '#0d1f3a',
|
|
121
172
|
},
|
|
122
173
|
btn: {
|
|
123
174
|
text: '#c9d1d9',
|
|
@@ -16,6 +16,7 @@ import { buildThemeStyles } from '../css/createThemeCSSVars';
|
|
|
16
16
|
const earthLight = {
|
|
17
17
|
canvas: {
|
|
18
18
|
default: earthColors.white,
|
|
19
|
+
subtle: '#EBF0F4',
|
|
19
20
|
},
|
|
20
21
|
fg: {
|
|
21
22
|
default: '#1A2332',
|
|
@@ -26,12 +27,37 @@ const earthLight = {
|
|
|
26
27
|
fg: earthColors.oceanText,
|
|
27
28
|
emphasis: earthColors.oceanBrand,
|
|
28
29
|
muted: earthColors.oceanAccent,
|
|
30
|
+
subtle: earthColors.oceanTint,
|
|
29
31
|
},
|
|
30
32
|
success: {
|
|
31
33
|
fg: earthColors.forestBrand,
|
|
32
34
|
emphasis: earthColors.forestBrand,
|
|
33
35
|
muted: earthColors.forestAccent,
|
|
34
36
|
},
|
|
37
|
+
attention: {
|
|
38
|
+
fg: earthColors.attentionBrand,
|
|
39
|
+
emphasis: earthColors.attentionAccent,
|
|
40
|
+
muted: earthColors.attentionBrand,
|
|
41
|
+
subtle: earthColors.attentionTint,
|
|
42
|
+
},
|
|
43
|
+
danger: {
|
|
44
|
+
fg: earthColors.dangerBrand,
|
|
45
|
+
emphasis: earthColors.dangerBrand,
|
|
46
|
+
muted: earthColors.dangerAccent,
|
|
47
|
+
subtle: earthColors.dangerTint,
|
|
48
|
+
},
|
|
49
|
+
severe: {
|
|
50
|
+
fg: earthColors.severeBrand,
|
|
51
|
+
emphasis: earthColors.severeBrand,
|
|
52
|
+
muted: earthColors.severeAccent,
|
|
53
|
+
subtle: earthColors.severeTint,
|
|
54
|
+
},
|
|
55
|
+
done: {
|
|
56
|
+
fg: earthColors.doneBrand,
|
|
57
|
+
emphasis: earthColors.doneBrand,
|
|
58
|
+
muted: earthColors.doneAccent,
|
|
59
|
+
subtle: earthColors.doneTint,
|
|
60
|
+
},
|
|
35
61
|
border: {
|
|
36
62
|
default: '#C1D0DD',
|
|
37
63
|
muted: '#DAE4ED',
|
|
@@ -119,6 +145,30 @@ const earthDark = {
|
|
|
119
145
|
muted: earthColors.forestBrand,
|
|
120
146
|
subtle: '#0C2D18',
|
|
121
147
|
},
|
|
148
|
+
attention: {
|
|
149
|
+
fg: '#facc15',
|
|
150
|
+
emphasis: '#ca8a04',
|
|
151
|
+
muted: earthColors.attentionAccent,
|
|
152
|
+
subtle: '#352700',
|
|
153
|
+
},
|
|
154
|
+
danger: {
|
|
155
|
+
fg: '#f97066',
|
|
156
|
+
emphasis: '#b42318',
|
|
157
|
+
muted: earthColors.dangerAccent,
|
|
158
|
+
subtle: '#3a1514',
|
|
159
|
+
},
|
|
160
|
+
severe: {
|
|
161
|
+
fg: '#fbbf24',
|
|
162
|
+
emphasis: '#b45309',
|
|
163
|
+
muted: earthColors.severeAccent,
|
|
164
|
+
subtle: '#342100',
|
|
165
|
+
},
|
|
166
|
+
done: {
|
|
167
|
+
fg: '#60a5fa',
|
|
168
|
+
emphasis: '#1d4ed8',
|
|
169
|
+
muted: earthColors.doneAccent,
|
|
170
|
+
subtle: '#112545',
|
|
171
|
+
},
|
|
122
172
|
btn: {
|
|
123
173
|
text: '#D4E4DC',
|
|
124
174
|
bg: '#162236',
|