@datalayer/primer-addons 1.0.26 → 1.0.28

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.
@@ -6,10 +6,11 @@
6
6
  * and a single soft accent that dark text sits on. Nothing else carries
7
7
  * colour, apart from the three colours of a verdict.
8
8
  *
9
- * The accent of the theme itself is green — a lighter relative of
10
- * Datalayer's brand green. An application may take one of five others
11
- * (`loopAccents`); each is four values: the accent, the text that sits on
12
- * it, the tint of the stage behind an application, and a quiet tint.
9
+ * The accent of the theme itself is mint — a soft green, lighter than
10
+ * the platform's (decided 2026-10-03, after a day on sky). An
11
+ * application may take one of five others (`loopAccents`); each is four
12
+ * values: the accent, the text that sits
13
+ * on it, the tint of the stage behind an application, and a quiet tint.
13
14
  * Dark text on every accent: the lowest contrast of the six is 8.8 to 1.
14
15
  */
15
16
  export declare const loopColors: {
@@ -25,6 +26,8 @@ export declare const loopColors: {
25
26
  loopOn: string;
26
27
  loopAccent: string;
27
28
  loopText: string;
29
+ loopEmphasis: string;
30
+ loopEmphasisHover: string;
28
31
  loopTint: string;
29
32
  loopStage: string;
30
33
  loopBright: string;
@@ -80,7 +83,7 @@ export interface LoopAccent {
80
83
  dark: string;
81
84
  };
82
85
  }
83
- /** The six accents. One per application; everything else is neutral. */
86
+ /** The six accents. One per application; everything else is neutral. Green — mint — is the theme's own. */
84
87
  export declare const loopAccents: Record<LoopAccentName, LoopAccent>;
85
88
  /** The names of the accents, in the order a picker shows them. */
86
89
  export declare const loopAccentNames: LoopAccentName[];
@@ -10,28 +10,32 @@
10
10
  * and a single soft accent that dark text sits on. Nothing else carries
11
11
  * colour, apart from the three colours of a verdict.
12
12
  *
13
- * The accent of the theme itself is green — a lighter relative of
14
- * Datalayer's brand green. An application may take one of five others
15
- * (`loopAccents`); each is four values: the accent, the text that sits on
16
- * it, the tint of the stage behind an application, and a quiet tint.
13
+ * The accent of the theme itself is mint — a soft green, lighter than
14
+ * the platform's (decided 2026-10-03, after a day on sky). An
15
+ * application may take one of five others (`loopAccents`); each is four
16
+ * values: the accent, the text that sits
17
+ * on it, the tint of the stage behind an application, and a quiet tint.
17
18
  * Dark text on every accent: the lowest contrast of the six is 8.8 to 1.
18
19
  */
19
20
  export const loopColors = {
20
21
  // Core neutrals
21
22
  black: '#131314', // Near-black — primary dark background
22
- gray: '#6A6A66', // Neutral gray, faintly warm — secondary text
23
+ gray: '#6E6E73', // Secondary text on light: a soft grey, 5.1 to 1 on white
23
24
  white: '#FFFFFF', // White — primary light background
24
- // Neutral surfaces and ink
25
- ink: '#111111', // Text on light
26
- inkDark: '#F3F3F1', // Text on dark
27
- subtle: '#F5F5F3', // Subtle surface on light (a bubble, a chip)
25
+ // Neutral surfaces and ink. The ink is not black: a deep grey with a
26
+ // breath of blue, as a page of a well-set book reads — 16.8 to 1 on white.
27
+ ink: '#1D1D1F', // Text on light
28
+ inkDark: '#F5F5F7', // Text on dark
29
+ subtle: '#F5F5F7', // Subtle surface on light (a bubble, a chip)
28
30
  subtleDark: '#1E1E20', // Subtle surface on dark
29
- grayDark: '#A1A19C', // Secondary text on dark
30
- // Loop palette (Brand) — green
31
+ grayDark: '#A1A1A6', // Secondary text on dark
32
+ // Loop palette (Brand) — mint
31
33
  loopBrand: '#7ADBB8', // The accent — a bubble, a send button, a swatch
32
- loopOn: '#06281E', // Text that sits on the accent
34
+ loopOn: '#06281E', // Text that sits on the accent (9.5 to 1)
33
35
  loopAccent: '#4FC79C', // Deeper accent — charts, highlights
34
- loopText: '#0F6B4F', // Accessible accent text & links on white (AA+)
36
+ loopText: '#0F6B4F', // Accessible accent text & links on white (6.5 to 1)
37
+ loopEmphasis: '#0F6B4F', // The one filled button, and the person's bubble: white text, 6.5 to 1
38
+ loopEmphasisHover: '#0A5640', // The same, pressed
35
39
  loopTint: '#F0FAF6', // Quiet tint — a draft, a callout
36
40
  loopStage: '#DDF5EC', // The stage behind an application
37
41
  loopBright: '#8FE5C6', // Accent text & links on dark
@@ -56,7 +60,7 @@ export const loopColors = {
56
60
  doneAccent: '#C0AEF6',
57
61
  doneTint: '#F6F3FE',
58
62
  // Bright colours for SVG illustrations — the six accents themselves
59
- brightGlow: '#7ADBB8', // Green — the accent
63
+ brightGlow: '#7ADBB8', // Mint — the accent
60
64
  brightPop: '#8CCBF9', // Sky
61
65
  brightSpark: '#BEDC55', // Lime
62
66
  brightBlaze: '#F6A5C1', // Rose
@@ -72,7 +76,7 @@ export const loopColors = {
72
76
  brightLightFlame: '#B4571A', // Deep orange
73
77
  brightLightGold: '#8A6A00', // Deep sun
74
78
  };
75
- /** The six accents. One per application; everything else is neutral. */
79
+ /** The six accents. One per application; everything else is neutral. Green — mint — is the theme's own. */
76
80
  export const loopAccents = {
77
81
  green: {
78
82
  accent: '#7ADBB8',
@@ -6,6 +6,26 @@
6
6
  * motion has three durations and one easing.
7
7
  */
8
8
  export declare const loopShapeVars: Record<string, string>;
9
+ /**
10
+ * Shadows, per mode: how a surface floats. Soft and low in the light —
11
+ * a card is told apart by its shadow more than by a line; in the dark a
12
+ * shadow shows little, so a surface gets a hairline of light and a
13
+ * deeper shadow. Primer's own shadow tokens take the same hand, so a menu
14
+ * or a dialog floats the way a frame does.
15
+ */
16
+ export declare const loopShadows: Record<'light' | 'dark', Record<string, string>>;
17
+ /**
18
+ * Type: titles set tight and a little closer, as a good display face is;
19
+ * the body left alone. The tracking is a token for a component to apply,
20
+ * since a CSS font shorthand carries none.
21
+ */
22
+ export declare const loopTypeVars: (font: string) => Record<string, string>;
23
+ /**
24
+ * The stage, lit: a soft fall from the stage tint at the top to the quiet
25
+ * tint at the bottom, for the page an application sits on. Both tints are
26
+ * the accent's, so an application's own colour lights its stage.
27
+ */
28
+ export declare const loopStageGradient = "radial-gradient(140% 100% at 50% 0%, var(--loop-stage) 0%, var(--loop-quiet) 100%)";
9
29
  /**
10
30
  * The Primer theme object.
11
31
  *
@@ -1107,11 +1127,13 @@ export declare const loopFontFamily = "Inter, ui-sans-serif, system-ui, -apple-s
1107
1127
  export declare const loopMotionVars: Record<string, string>;
1108
1128
  /**
1109
1129
  * The focus ring (LOOP T-15): 3 to 1 against the page and around a pill of
1110
- * any accent, in both modes. In light mode the ink does it. In dark mode no
1111
- * colour clears 3 to 1 against both the near-black page and the six pastels,
1112
- * the light ink least of all (under 1.8 to 1 on the pastels): a mid grey
1113
- * does, at 3.04 to 1 — and 2.77 to 1 on the subtle dark surface, the one
1114
- * place it falls short.
1130
+ * any accent, in both modes. In light mode the deep accent green does it —
1131
+ * a halo in the theme's colour, as a system's own focus ring is — 6.5 to 1
1132
+ * on white and 3.28 or more around every pastel. In dark mode no
1133
+ * colour clears 3 to 1 against both the near-black page and the six
1134
+ * pastels, the light ink least of all (under 1.8 to 1 on the pastels): a
1135
+ * mid grey does, at 3.04 to 1 — and 2.77 to 1 on the subtle dark surface,
1136
+ * the one place it falls short.
1115
1137
  */
1116
1138
  export declare const loopFocusRing: {
1117
1139
  readonly light: string;
@@ -5,10 +5,12 @@
5
5
  /**
6
6
  * Loop Theme for Primer React.
7
7
  *
8
- * Very clean: one accent, neutral everything else. A white (or near-black)
9
- * canvas, near-black (or near-white) text, hairlines for borders, and a
10
- * filled button that is ink on paper rather than a colour. Uses Inter,
11
- * with the system sans-serif stack behind it.
8
+ * Soft and clear, for somebody who is not here for the software: one accent,
9
+ * neutral everything else. A white (or near-black) canvas, a deep-grey ink
10
+ * rather than black, faint hairlines, surfaces that float on soft shadows
11
+ * instead of sitting in boxes, generous rounding, and one filled button in
12
+ * the accent — the thing to press, plain to see. Inter, with the system
13
+ * sans-serif stack behind it, titles set tight.
12
14
  * Theming is applied via **CSS custom-property overrides**.
13
15
  *
14
16
  * Unlike the other themes it also sets **shape**: rounder corners, and
@@ -31,7 +33,7 @@ const loopLight = {
31
33
  },
32
34
  accent: {
33
35
  fg: loopColors.loopText,
34
- emphasis: loopColors.loopText,
36
+ emphasis: loopColors.loopEmphasis,
35
37
  muted: loopColors.loopBrand,
36
38
  subtle: loopColors.loopTint,
37
39
  },
@@ -66,31 +68,32 @@ const loopLight = {
66
68
  subtle: loopColors.doneTint,
67
69
  },
68
70
  border: {
69
- // Hairlines: 9% of the ink, as solid colours on white.
70
- default: '#E9E9E7',
71
- muted: '#F0F0EE',
71
+ // Hairlines: 7% of the ink, as solid colours on white — a surface is
72
+ // told apart by its shadow more than by a line.
73
+ default: '#ECECEE',
74
+ muted: '#F2F2F4',
72
75
  },
73
76
  btn: {
74
77
  text: loopColors.ink,
75
78
  bg: loopColors.subtle,
76
79
  border: 'transparent',
77
- hoverBg: '#ECECE9',
80
+ hoverBg: '#ECECEF',
78
81
  hoverBorder: 'transparent',
79
- activeBg: '#E4E4E1',
82
+ activeBg: '#E3E3E7',
80
83
  activeBorder: 'transparent',
81
- selectedBg: '#E4E4E1',
82
- counterBg: 'rgba(17, 17, 17, 0.08)',
83
- // The one filled button of a screen: ink on paper, not a colour.
84
+ selectedBg: '#E3E3E7',
85
+ counterBg: 'rgba(29, 29, 31, 0.08)',
86
+ // The one filled button of a screen, in the accent: the thing to press.
84
87
  primary: {
85
88
  text: '#FFFFFF',
86
- bg: loopColors.ink,
87
- border: loopColors.ink,
88
- hoverBg: '#2B2B2B',
89
- hoverBorder: '#2B2B2B',
90
- selectedBg: '#2B2B2B',
91
- disabledText: 'rgba(255, 255, 255, 0.8)',
92
- disabledBg: '#B9B9B5',
93
- disabledBorder: '#B9B9B5',
89
+ bg: loopColors.loopEmphasis,
90
+ border: loopColors.loopEmphasis,
91
+ hoverBg: loopColors.loopEmphasisHover,
92
+ hoverBorder: loopColors.loopEmphasisHover,
93
+ selectedBg: loopColors.loopText,
94
+ disabledText: 'rgba(255, 255, 255, 0.85)',
95
+ disabledBg: '#A9D8C6',
96
+ disabledBorder: '#A9D8C6',
94
97
  icon: '#FFFFFF',
95
98
  counterBg: 'rgba(255, 255, 255, 0.2)',
96
99
  },
@@ -144,7 +147,8 @@ const loopDark = {
144
147
  },
145
148
  accent: {
146
149
  fg: loopColors.loopBright,
147
- emphasis: loopColors.loopText,
150
+ // The accent itself, on dark: a pastel that dark text sits on.
151
+ emphasis: loopColors.loopBrand,
148
152
  muted: loopColors.loopBrand,
149
153
  subtle: loopColors.loopTintDark,
150
154
  },
@@ -179,9 +183,9 @@ const loopDark = {
179
183
  subtle: '#1C1A27',
180
184
  },
181
185
  border: {
182
- // Hairlines: 11% of the ink, as solid colours on near-black.
183
- default: '#2C2C2D',
184
- muted: '#232324',
186
+ // Hairlines: 10% of the ink, as solid colours on near-black.
187
+ default: '#2A2A2C',
188
+ muted: '#222224',
185
189
  },
186
190
  btn: {
187
191
  text: loopColors.inkDark,
@@ -192,20 +196,21 @@ const loopDark = {
192
196
  activeBg: '#303033',
193
197
  activeBorder: 'transparent',
194
198
  selectedBg: '#303033',
195
- counterBg: 'rgba(243, 243, 241, 0.12)',
196
- // The one filled button of a screen: paper on ink.
199
+ counterBg: 'rgba(245, 245, 247, 0.12)',
200
+ // The one filled button of a screen, in the accent: the pastel, with
201
+ // its dark text, the brightest thing on a dark page.
197
202
  primary: {
198
- text: loopColors.ink,
199
- bg: loopColors.inkDark,
200
- border: loopColors.inkDark,
201
- hoverBg: '#DCDCD9',
202
- hoverBorder: '#DCDCD9',
203
- selectedBg: '#DCDCD9',
204
- disabledText: 'rgba(17, 17, 17, 0.5)',
205
- disabledBg: 'rgba(243, 243, 241, 0.35)',
206
- disabledBorder: 'rgba(243, 243, 241, 0.2)',
207
- icon: loopColors.ink,
208
- counterBg: 'rgba(0, 0, 0, 0.2)',
203
+ text: loopColors.loopOn,
204
+ bg: loopColors.loopBrand,
205
+ border: loopColors.loopBrand,
206
+ hoverBg: loopColors.loopBright,
207
+ hoverBorder: loopColors.loopBright,
208
+ selectedBg: '#6CCFAA',
209
+ disabledText: 'rgba(6, 40, 30, 0.6)',
210
+ disabledBg: 'rgba(122, 219, 184, 0.35)',
211
+ disabledBorder: 'transparent',
212
+ icon: loopColors.loopOn,
213
+ counterBg: 'rgba(6, 40, 30, 0.15)',
209
214
  },
210
215
  outline: {
211
216
  text: loopColors.loopBright,
@@ -253,15 +258,16 @@ const loopDark = {
253
258
  * motion has three durations and one easing.
254
259
  */
255
260
  export const loopShapeVars = {
256
- '--borderRadius-small': '8px',
257
- '--borderRadius-medium': '12px',
258
- '--borderRadius-large': '16px',
259
- '--borderRadius-default': '12px',
261
+ '--borderRadius-small': '10px',
262
+ '--borderRadius-medium': '14px',
263
+ '--borderRadius-large': '20px',
264
+ '--borderRadius-default': '14px',
260
265
  '--loop-radius-control': '999px',
261
- '--loop-radius-card': '16px',
262
- '--loop-radius-bubble': '20px',
263
- '--loop-radius-frame': '24px',
264
- '--loop-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.07)',
266
+ '--loop-radius-card': '20px',
267
+ '--loop-radius-bubble': '22px',
268
+ '--loop-radius-frame': '28px',
269
+ // Light mode's; `loopShadows` says dark mode's.
270
+ '--loop-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)',
265
271
  '--loop-face-large': '72px',
266
272
  '--loop-face-medium': '40px',
267
273
  '--loop-face-small': '20px',
@@ -272,9 +278,61 @@ export const loopShapeVars = {
272
278
  };
273
279
  /** The hairline between two surfaces, per mode. */
274
280
  const loopHairline = {
275
- light: 'rgba(17, 17, 17, 0.09)',
276
- dark: 'rgba(255, 255, 255, 0.11)',
281
+ light: 'rgba(29, 29, 31, 0.07)',
282
+ dark: 'rgba(255, 255, 255, 0.10)',
283
+ };
284
+ /**
285
+ * Shadows, per mode: how a surface floats. Soft and low in the light —
286
+ * a card is told apart by its shadow more than by a line; in the dark a
287
+ * shadow shows little, so a surface gets a hairline of light and a
288
+ * deeper shadow. Primer's own shadow tokens take the same hand, so a menu
289
+ * or a dialog floats the way a frame does.
290
+ */
291
+ export const loopShadows = {
292
+ light: {
293
+ '--loop-shadow-frame': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)',
294
+ '--theme-shadow': '0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06)',
295
+ '--shadow-resting-xsmall': '0 1px 1px rgba(0, 0, 0, 0.03)',
296
+ '--shadow-resting-small': '0 1px 2px rgba(0, 0, 0, 0.04)',
297
+ '--shadow-resting-medium': '0 2px 8px rgba(0, 0, 0, 0.05)',
298
+ '--shadow-floating-small': '0 0 0 1px rgba(29, 29, 31, 0.04), 0 4px 14px rgba(0, 0, 0, 0.08)',
299
+ '--shadow-floating-medium': '0 0 0 1px rgba(29, 29, 31, 0.04), 0 8px 24px rgba(0, 0, 0, 0.10)',
300
+ '--shadow-floating-large': '0 0 0 1px rgba(29, 29, 31, 0.04), 0 16px 48px rgba(0, 0, 0, 0.14)',
301
+ '--shadow-floating-xlarge': '0 0 0 1px rgba(29, 29, 31, 0.04), 0 24px 64px rgba(0, 0, 0, 0.18)',
302
+ },
303
+ dark: {
304
+ '--loop-shadow-frame': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.45)',
305
+ '--theme-shadow': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.45)',
306
+ '--shadow-resting-xsmall': '0 0 0 1px rgba(255, 255, 255, 0.05)',
307
+ '--shadow-resting-small': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.3)',
308
+ '--shadow-resting-medium': '0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.35)',
309
+ '--shadow-floating-small': '0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.45)',
310
+ '--shadow-floating-medium': '0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.5)',
311
+ '--shadow-floating-large': '0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 48px rgba(0, 0, 0, 0.55)',
312
+ '--shadow-floating-xlarge': '0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 64px rgba(0, 0, 0, 0.6)',
313
+ },
277
314
  };
315
+ /**
316
+ * Type: titles set tight and a little closer, as a good display face is;
317
+ * the body left alone. The tracking is a token for a component to apply,
318
+ * since a CSS font shorthand carries none.
319
+ */
320
+ export const loopTypeVars = (font) => ({
321
+ '--text-display-shorthand': `600 2.75rem/1.15 ${font}`,
322
+ '--text-title-shorthand-large': `600 2rem/1.25 ${font}`,
323
+ '--text-title-shorthand-medium': `600 1.25rem/1.35 ${font}`,
324
+ '--text-title-shorthand-small': `600 1rem/1.4 ${font}`,
325
+ '--text-subtitle-shorthand': `400 1.25rem/1.5 ${font}`,
326
+ '--loop-tracking-display': '-0.02em',
327
+ '--loop-tracking-title': '-0.012em',
328
+ '--loop-tracking-body': '0',
329
+ });
330
+ /**
331
+ * The stage, lit: a soft fall from the stage tint at the top to the quiet
332
+ * tint at the bottom, for the page an application sits on. Both tints are
333
+ * the accent's, so an application's own colour lights its stage.
334
+ */
335
+ export const loopStageGradient = 'radial-gradient(140% 100% at 50% 0%, var(--loop-stage) 0%, var(--loop-quiet) 100%)';
278
336
  /* ── Exports ─────────────────────────────────────────────────────────── */
279
337
  /**
280
338
  * The Primer theme object.
@@ -302,13 +360,15 @@ export const loopMotionVars = {
302
360
  };
303
361
  /**
304
362
  * The focus ring (LOOP T-15): 3 to 1 against the page and around a pill of
305
- * any accent, in both modes. In light mode the ink does it. In dark mode no
306
- * colour clears 3 to 1 against both the near-black page and the six pastels,
307
- * the light ink least of all (under 1.8 to 1 on the pastels): a mid grey
308
- * does, at 3.04 to 1 — and 2.77 to 1 on the subtle dark surface, the one
309
- * place it falls short.
363
+ * any accent, in both modes. In light mode the deep accent green does it —
364
+ * a halo in the theme's colour, as a system's own focus ring is — 6.5 to 1
365
+ * on white and 3.28 or more around every pastel. In dark mode no
366
+ * colour clears 3 to 1 against both the near-black page and the six
367
+ * pastels, the light ink least of all (under 1.8 to 1 on the pastels): a
368
+ * mid grey does, at 3.04 to 1 — and 2.77 to 1 on the subtle dark surface,
369
+ * the one place it falls short.
310
370
  */
311
- export const loopFocusRing = { light: loopColors.ink, dark: '#636363' };
371
+ export const loopFocusRing = { light: loopColors.loopText, dark: '#636363' };
312
372
  /** Comprehensive Primer CSS-variable overrides for light & dark mode. */
313
373
  export const loopThemeStyles = buildThemeStyles(loopLight, loopDark, {
314
374
  fontFamily: loopFontFamily,
@@ -329,6 +389,9 @@ export const loopThemeStyles = buildThemeStyles(loopLight, loopDark, {
329
389
  ...loopShapeVars,
330
390
  ...loopAccentVars('green', 'light'),
331
391
  ...loopMotionVars,
392
+ ...loopShadows.light,
393
+ ...loopTypeVars(loopFontFamily),
394
+ '--loop-stage-gradient': loopStageGradient,
332
395
  '--loop-hairline': loopHairline.light,
333
396
  '--focus-outlineColor': loopFocusRing.light,
334
397
  },
@@ -336,6 +399,9 @@ export const loopThemeStyles = buildThemeStyles(loopLight, loopDark, {
336
399
  ...loopShapeVars,
337
400
  ...loopAccentVars('green', 'dark'),
338
401
  ...loopMotionVars,
402
+ ...loopShadows.dark,
403
+ ...loopTypeVars(loopFontFamily),
404
+ '--loop-stage-gradient': loopStageGradient,
339
405
  '--loop-hairline': loopHairline.dark,
340
406
  '--focus-outlineColor': loopFocusRing.dark,
341
407
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/primer-addons",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "license": "BSD-3-Clause",
5
5
  "scripts": {
6
6
  "build": "npm run build:lib",