@datalayer/primer-addons 1.0.47 → 1.0.49

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.
Files changed (37) hide show
  1. package/lib/components/appearance/AppearanceControls.js +2 -1
  2. package/lib/components/appearance/ColorModeCircle.js +2 -1
  3. package/lib/components/appearance/ThemeAccents.d.ts +44 -0
  4. package/lib/components/appearance/ThemeAccents.js +117 -0
  5. package/lib/components/appearance/ThemePalettePreview.d.ts +14 -0
  6. package/lib/components/appearance/ThemePalettePreview.js +24 -0
  7. package/lib/components/appearance/ThemePaletteSwatches.d.ts +33 -0
  8. package/lib/components/appearance/ThemePaletteSwatches.js +28 -0
  9. package/lib/components/appearance/index.d.ts +3 -0
  10. package/lib/components/appearance/index.js +3 -0
  11. package/lib/components/card/Card.d.ts +14 -0
  12. package/lib/components/card/Card.js +29 -3
  13. package/lib/components/card/Card.stories.d.ts +2 -0
  14. package/lib/components/card/Card.stories.js +3 -0
  15. package/lib/components/logo/DatalayerLogo.js +17 -1
  16. package/lib/reactor/AppearancePlugin.d.ts +2 -0
  17. package/lib/reactor/AppearancePlugin.js +2 -0
  18. package/lib/theme/colors/index.d.ts +1 -0
  19. package/lib/theme/colors/index.js +3 -0
  20. package/lib/theme/colors/metalColors.d.ts +78 -0
  21. package/lib/theme/colors/metalColors.js +71 -0
  22. package/lib/theme/index.d.ts +1 -0
  23. package/lib/theme/index.js +1 -0
  24. package/lib/theme/palettes/ColorPalette.js +41 -1
  25. package/lib/theme/themeRegistry.js +2 -0
  26. package/lib/theme/themeTokens.d.ts +1 -1
  27. package/lib/theme/themeTokens.js +50 -0
  28. package/lib/theme/themes/metalTheme.d.ts +1083 -0
  29. package/lib/theme/themes/metalTheme.js +21 -0
  30. package/lib/theme/themes/metalThemeStyles.d.ts +25 -0
  31. package/lib/theme/themes/metalThemeStyles.js +343 -0
  32. package/package.json +2 -2
  33. package/style/fonts/GEIST-LICENSE +93 -0
  34. package/style/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
  35. package/style/fonts/geist-latin-wght-normal.woff2 +0 -0
  36. package/style/fonts/geist-mono-latin-wght-normal.woff2 +0 -0
  37. package/style/metal-face.css +42 -0
@@ -0,0 +1,71 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ /**
6
+ * Metal Color System – cool neutrals, one steel blue, four brushed surfaces.
7
+ *
8
+ * The Loop theme's system with the warmth taken out: a white canvas under a
9
+ * blue-grey wash, hairlines with a little steel in them, and a slate-blue
10
+ * accent. Where Loop has no gradient, Metal has four, for a surface that
11
+ * carries white text and glass on top: sage, steel, mauve and clay.
12
+ * The verdict colours are Loop's.
13
+ */
14
+ import { loopColors } from './loopColors';
15
+ export const metalColors = {
16
+ ...loopColors,
17
+ // Core neutrals
18
+ black: '#1C2A33', // The deep base under the dark mesh
19
+ gray: '#6B7280', // Secondary text on light: 4.8 to 1 on white
20
+ ink: '#2A2F37', // Text on light: softer than Loop's, 13.5 to 1 on white
21
+ inkDark: '#EEF2F7', // Text on dark
22
+ subtle: '#F6F8FC', // Subtle surface on light
23
+ subtleDark: '#25343F', // Subtle surface on dark, and the menus
24
+ grayDark: '#C3CDD8', // Secondary text on dark
25
+ // Metal palette (Brand) — steel blue
26
+ metalBrand: '#4C76BA', // The filled button: white text 4.6 to 1
27
+ metalOn: '#FFFFFF', // Text that sits on the accent
28
+ metalHover: '#3F68AC', // The filled button, hovered: white text 5.5 to 1
29
+ metalActive: '#355A98', // The filled button, pressed
30
+ metalText: '#3A66AC', // Accent text & links on white: 5.7 to 1
31
+ metalRing: '#264F8F', // The focus ring on light: 8 to 1 on white
32
+ metalTint: '#EDF4FC', // The pale stage a product fragment stands on, a chosen row
33
+ metalStage: '#F2F7FC', // The stage behind an application
34
+ metalTintLine: '#C4DAF0', // The line around anything on the tint
35
+ metalBright: '#8FB4E8', // The accent on dark: dark text 8.2 to 1
36
+ metalBrightHover: '#A9C6EE', // The accent on dark, hovered
37
+ metalOnDark: '#0B1A30', // Text that sits on the accent on dark
38
+ metalStageDark: '#152033',
39
+ metalTintDark: '#141A23',
40
+ // Hairlines, with a little steel in them
41
+ line: '#D8E5F2',
42
+ lineMuted: '#E6EEF7',
43
+ controlLine: '#D6E0EE',
44
+ lineDark: '#262D37',
45
+ lineMutedDark: '#1E242C',
46
+ // The four surfaces: the two stops of each gradient
47
+ sageFrom: '#8FA672',
48
+ sageTo: '#4F7A5A',
49
+ steelFrom: '#3F73B5',
50
+ steelTo: '#2396D6',
51
+ mauveFrom: '#A87890',
52
+ mauveTo: '#B04A6E',
53
+ clayFrom: '#C26A4E',
54
+ clayTo: '#A04A2C',
55
+ // Bright colours for SVG illustrations, on dark
56
+ brightGlow: '#8FB4E8', // Steel
57
+ brightPop: '#6FC3E8', // Sky
58
+ brightSpark: '#A8C08A', // Sage
59
+ brightBlaze: '#D98FAE', // Mauve
60
+ brightSurge: '#A9B4E6', // Periwinkle
61
+ brightFlame: '#E09272', // Clay
62
+ brightGold: '#E6C878', // Brass
63
+ // The same, deeper, for light backgrounds
64
+ brightLightGlow: '#3A66AC', // Deep steel
65
+ brightLightPop: '#1F7FB8', // Deep sky
66
+ brightLightSpark: '#56784A', // Deep sage
67
+ brightLightBlaze: '#A8426A', // Deep mauve
68
+ brightLightSurge: '#5A5FB0', // Deep periwinkle
69
+ brightLightFlame: '#A64E2E', // Deep clay
70
+ brightLightGold: '#8A6A1E', // Deep brass
71
+ };
@@ -14,6 +14,7 @@ export * from './themes/sandTheme';
14
14
  export * from './themes/ivoryTheme';
15
15
  export * from './themes/sunTheme';
16
16
  export * from './themes/loopTheme';
17
+ export * from './themes/metalTheme';
17
18
  export * from './themes/vscodeTheme';
18
19
  export * from './themes-brand/spatialBrandTheme';
19
20
  export * from './themeRegistry';
@@ -18,6 +18,7 @@ export * from './themes/sandTheme';
18
18
  export * from './themes/ivoryTheme';
19
19
  export * from './themes/sunTheme';
20
20
  export * from './themes/loopTheme';
21
+ export * from './themes/metalTheme';
21
22
  export * from './themes/vscodeTheme';
22
23
  export * from './themes-brand/spatialBrandTheme';
23
24
  export * from './themeRegistry';
@@ -7,7 +7,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  * Shared palette types, theme-aware colour resolution, and reusable
8
8
  * gradient / grid definitions.
9
9
  */
10
- import { datalayerColors, spatialColors, lovelyColors, matrixColors, earthColors, sandColors, ivoryColors, sunColors, loopColors, vscodeColors, hueColorsOf, hueNames, } from '../colors';
10
+ import { datalayerColors, spatialColors, lovelyColors, matrixColors, earthColors, sandColors, ivoryColors, sunColors, loopColors, metalColors, vscodeColors, hueColorsOf, hueNames, } from '../colors';
11
11
  import { getBrightPalette, } from '../themeRegistry';
12
12
  import { useCallback } from 'react';
13
13
  import { useThemeStore } from '../useThemeStore';
@@ -63,6 +63,8 @@ const suBrightDark = getBrightPalette('sun');
63
63
  const suBrightLight = getBrightPalette('sun', 'light');
64
64
  const loBrightDark = getBrightPalette('loop');
65
65
  const loBrightLight = getBrightPalette('loop', 'light');
66
+ const meBrightDark = getBrightPalette('metal');
67
+ const meBrightLight = getBrightPalette('metal', 'light');
66
68
  const vsBrightDark = getBrightPalette('vscode');
67
69
  const vsBrightLight = getBrightPalette('vscode', 'light');
68
70
  const rolePalettes = {
@@ -408,6 +410,44 @@ const rolePalettes = {
408
410
  isLight: false,
409
411
  },
410
412
  },
413
+ metal: {
414
+ light: {
415
+ bg: metalColors.white,
416
+ bgPanel: '#ffffff',
417
+ bgAlt: metalColors.subtle,
418
+ primary: metalColors.metalBrand,
419
+ secondary: metalColors.metalText,
420
+ accent: metalColors.steelTo,
421
+ glow: meBrightLight.glow,
422
+ pop: meBrightLight.pop,
423
+ spark: meBrightLight.spark,
424
+ blaze: meBrightLight.blaze,
425
+ surge: meBrightLight.surge,
426
+ flame: meBrightLight.flame,
427
+ gold: meBrightLight.gold,
428
+ textLight: metalColors.ink,
429
+ textMuted: metalColors.gray,
430
+ isLight: true,
431
+ },
432
+ dark: {
433
+ bg: metalColors.black,
434
+ bgPanel: '#141920',
435
+ bgAlt: metalColors.subtleDark,
436
+ primary: metalColors.metalBrand,
437
+ secondary: metalColors.metalBright,
438
+ accent: metalColors.steelTo,
439
+ glow: meBrightDark.glow,
440
+ pop: meBrightDark.pop,
441
+ spark: meBrightDark.spark,
442
+ blaze: meBrightDark.blaze,
443
+ surge: meBrightDark.surge,
444
+ flame: meBrightDark.flame,
445
+ gold: meBrightDark.gold,
446
+ textLight: metalColors.inkDark,
447
+ textMuted: metalColors.grayDark,
448
+ isLight: false,
449
+ },
450
+ },
411
451
  vscode: {
412
452
  light: {
413
453
  bg: vscodeColors.white,
@@ -17,6 +17,7 @@ import { sandTheme } from './themes/sandTheme';
17
17
  import { ivoryTheme } from './themes/ivoryTheme';
18
18
  import { sunTheme } from './themes/sunTheme';
19
19
  import { loopTheme } from './themes/loopTheme';
20
+ import { metalTheme } from './themes/metalTheme';
20
21
  import { vscodeTheme, vscodeThemeStyles } from './themes/vscodeTheme';
21
22
  import { avatarColorsOf, brightPaletteOf, themeTokens, } from './themeTokens';
22
23
  export { avatarColorsOf, brightPaletteOf, getCardGradient, getThemeTokens, themeTokens, themeVariants, } from './themeTokens';
@@ -30,6 +31,7 @@ const primerThemes = {
30
31
  ivory: ivoryTheme,
31
32
  sun: sunTheme,
32
33
  loop: loopTheme,
34
+ metal: metalTheme,
33
35
  vscode: vscodeTheme,
34
36
  };
35
37
  export const themeConfigs = Object.fromEntries(Object.keys(themeTokens).map(variant => [
@@ -7,7 +7,7 @@
7
7
  import { type ColorMode } from './DatalayerBrandThemeProvider';
8
8
  import { type ThemeStyles } from './css/createThemeCSSVars';
9
9
  /** Available theme variants. */
10
- export type ThemeVariant = 'datalayer' | 'spatial' | 'lovely' | 'matrix' | 'earth' | 'sand' | 'ivory' | 'sun' | 'loop' | 'vscode';
10
+ export type ThemeVariant = 'datalayer' | 'spatial' | 'lovely' | 'matrix' | 'earth' | 'sand' | 'ivory' | 'sun' | 'loop' | 'metal' | 'vscode';
11
11
  /** A pair of colours for a two-stop gradient. */
12
12
  export interface GradientPair {
13
13
  /** Start colour (brighter / brand). */
@@ -11,6 +11,7 @@ import { sandThemeStyles } from './themes/sandThemeStyles';
11
11
  import { ivoryThemeStyles } from './themes/ivoryThemeStyles';
12
12
  import { sunThemeStyles } from './themes/sunThemeStyles';
13
13
  import { loopThemeStyles } from './themes/loopThemeStyles';
14
+ import { metalThemeStyles } from './themes/metalThemeStyles';
14
15
  import { vscodePortableThemeStyles } from './themes/vscodeThemeStyles';
15
16
  import { datalayerColors } from './colors/datalayerColors';
16
17
  import { spatialColors } from './colors/spatialColors';
@@ -21,6 +22,7 @@ import { sandColors } from './colors/sandColors';
21
22
  import { ivoryColors } from './colors/ivoryColors';
22
23
  import { sunColors } from './colors/sunColors';
23
24
  import { loopColors } from './colors/loopColors';
25
+ import { metalColors } from './colors/metalColors';
24
26
  import { vscodeColors } from './colors/vscodeColors';
25
27
  /* ─── Registry ────────────────────────────────────────────────────────── */
26
28
  export const themeTokens = {
@@ -304,6 +306,37 @@ export const themeTokens = {
304
306
  gold: loopColors.brightLightGold, // #8A6A00 — deep sun
305
307
  },
306
308
  },
309
+ metal: {
310
+ label: 'Metal',
311
+ description: 'Loop’s curves, on a page of its own: a dotted wash on light, a deep gradient and frosted glass on dark.',
312
+ brandColor: metalColors.metalBrand,
313
+ defaultColorMode: 'light',
314
+ themeStyles: metalThemeStyles,
315
+ cardGradient: {
316
+ light: { from: metalColors.steelFrom, to: metalColors.steelTo },
317
+ dark: { from: metalColors.steelFrom, to: metalColors.steelTo },
318
+ },
319
+ brightPalette: {
320
+ glow: metalColors.brightGlow,
321
+ onGlow: metalColors.metalOnDark,
322
+ pop: metalColors.brightPop,
323
+ spark: metalColors.brightSpark,
324
+ blaze: metalColors.brightBlaze,
325
+ surge: metalColors.brightSurge,
326
+ flame: metalColors.brightFlame,
327
+ gold: metalColors.brightGold,
328
+ },
329
+ brightPaletteLight: {
330
+ glow: metalColors.brightLightGlow,
331
+ onGlow: '#ffffff',
332
+ pop: metalColors.brightLightPop,
333
+ spark: metalColors.brightLightSpark,
334
+ blaze: metalColors.brightLightBlaze,
335
+ surge: metalColors.brightLightSurge,
336
+ flame: metalColors.brightLightFlame,
337
+ gold: metalColors.brightLightGold,
338
+ },
339
+ },
307
340
  vscode: {
308
341
  label: 'VS Code',
309
342
  description: 'The editor’s own colours: in a Visual Studio Code webview it follows the colour theme in use, and changes with it; elsewhere, Dark Modern and Light Modern.',
@@ -347,6 +380,7 @@ export const themeVariants = [
347
380
  'ivory',
348
381
  'sun',
349
382
  'loop',
383
+ 'metal',
350
384
  'vscode',
351
385
  ];
352
386
  /** Look up a theme's tokens by variant name. */
@@ -527,6 +561,22 @@ const avatarColorPalettes = {
527
561
  loopColors.brightGold, // #F8D469 — sun
528
562
  ],
529
563
  },
564
+ metal: {
565
+ light: [
566
+ metalColors.brightLightGlow,
567
+ metalColors.brightLightPop,
568
+ metalColors.brightLightBlaze,
569
+ metalColors.brightLightSurge,
570
+ metalColors.gray,
571
+ ],
572
+ dark: [
573
+ metalColors.loopBrand,
574
+ metalColors.brightPop,
575
+ metalColors.brightBlaze,
576
+ metalColors.brightSurge,
577
+ metalColors.brightGold,
578
+ ],
579
+ },
530
580
  vscode: {
531
581
  light: [
532
582
  vscodeColors.brightLightGlow, // #005FB8 — deep blue