@buffcore/tokens 0.8.40 → 0.8.42

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.
@@ -0,0 +1,29 @@
1
+ import type { Theme } from './theme.ts';
2
+ /** One `@font-face`: a theme family, the file that holds it, its weights and its style. */
3
+ export interface FontFile {
4
+ family: string;
5
+ url: string;
6
+ /** One weight (`700`) or a range (`100 900`, a variable file). */
7
+ weight: string;
8
+ style: 'normal' | 'italic';
9
+ format: 'woff2' | 'woff' | 'truetype' | 'opentype';
10
+ }
11
+ /**
12
+ * What follows a family in a font file's name (`-bold`, `_600`, `variable`), or undefined when
13
+ * the file is not that family's. The stem is the family with its spaces removed, case aside, then
14
+ * nothing, a suffix after `-` or `_`, or `Variable` (`InterVariable`): `RobotoMono-Bold` is not
15
+ * "Roboto".
16
+ */
17
+ export declare function fontFileSuffix(stem: string, family: string): string | undefined;
18
+ /** The families a theme names that the platform does not supply. */
19
+ export declare function themeFamilies(theme: Theme): string[];
20
+ /**
21
+ * Each file named from a family the theme names (`fontFileSuffix`: `JetBrainsMono-Bold.woff2` is
22
+ * "JetBrains Mono" at 700, `RobotoMono.woff2` is not "Roboto"). The rest of the name gives the weight
23
+ * (`Bold`, `600`) and the style (`Italic`). A file named only by its family, or with `Variable` in
24
+ * its name, covers every weight, unless the family also has files for single weights. Other files,
25
+ * and families with no file, are left out: the platform's fonts stand in.
26
+ */
27
+ export declare function themeFontFiles(theme: Theme, urls: readonly string[]): FontFile[];
28
+ /** The `@font-face` rules for the files, shown with `font-display: swap`. */
29
+ export declare function fontFaceCss(files: readonly FontFile[]): string;
@@ -0,0 +1,80 @@
1
+ // The design system's own font files (`design/fonts/`), matched to the families a theme names, so
2
+ // the console, the prototype and the app load them without a list kept by hand.
3
+ import { cssFontFamily, isSystemFont } from './fonts.js';
4
+ const FORMATS = {
5
+ woff2: 'woff2',
6
+ woff: 'woff',
7
+ ttf: 'truetype',
8
+ otf: 'opentype',
9
+ };
10
+ // Longer names first: "semibold" before "bold", "extralight" before "light".
11
+ const WEIGHTS = [
12
+ [/thin|hairline/, 100],
13
+ [/extralight|ultralight/, 200],
14
+ [/semibold|demibold/, 600],
15
+ [/extrabold|ultrabold/, 800],
16
+ [/light/, 300],
17
+ [/medium/, 500],
18
+ [/bold/, 700],
19
+ [/black|heavy/, 900],
20
+ ];
21
+ const squash = (text) => text.toLowerCase().replace(/[^a-z0-9]/g, '');
22
+ /**
23
+ * What follows a family in a font file's name (`-bold`, `_600`, `variable`), or undefined when
24
+ * the file is not that family's. The stem is the family with its spaces removed, case aside, then
25
+ * nothing, a suffix after `-` or `_`, or `Variable` (`InterVariable`): `RobotoMono-Bold` is not
26
+ * "Roboto".
27
+ */
28
+ export function fontFileSuffix(stem, family) {
29
+ const key = family.replace(/\s+/g, '').toLowerCase();
30
+ const name = stem.replace(/\s+/g, '').toLowerCase();
31
+ if (!key || !name.startsWith(key))
32
+ return;
33
+ const rest = name.slice(key.length);
34
+ return /^(?:$|[-_]|variable|vf(?![a-z]))/.test(rest) ? rest : undefined;
35
+ }
36
+ /** The families a theme names that the platform does not supply. */
37
+ export function themeFamilies(theme) {
38
+ const { body, display, mono, fallbacks } = theme.font;
39
+ const named = [...display, ...body, ...mono, ...Object.values(fallbacks)];
40
+ return [...new Set(named.filter((family) => family && !isSystemFont(family)))];
41
+ }
42
+ /**
43
+ * Each file named from a family the theme names (`fontFileSuffix`: `JetBrainsMono-Bold.woff2` is
44
+ * "JetBrains Mono" at 700, `RobotoMono.woff2` is not "Roboto"). The rest of the name gives the weight
45
+ * (`Bold`, `600`) and the style (`Italic`). A file named only by its family, or with `Variable` in
46
+ * its name, covers every weight, unless the family also has files for single weights. Other files,
47
+ * and families with no file, are left out: the platform's fonts stand in.
48
+ */
49
+ export function themeFontFiles(theme, urls) {
50
+ const families = themeFamilies(theme).sort((a, b) => b.length - a.length);
51
+ const found = [];
52
+ for (const url of urls) {
53
+ const name = decodeURIComponent(url.split(/[?#]/)[0]?.split('/').pop() ?? '');
54
+ const dot = name.lastIndexOf('.');
55
+ const format = FORMATS[name.slice(dot + 1).toLowerCase()];
56
+ if (dot < 1 || !format)
57
+ continue;
58
+ const stem = name.slice(0, dot);
59
+ const family = families.find((family) => fontFileSuffix(stem, family) !== undefined);
60
+ if (!family)
61
+ continue;
62
+ const rest = squash(fontFileSuffix(stem, family) ?? '');
63
+ const style = /italic|oblique/.test(rest) ? 'italic' : 'normal';
64
+ const number = /(?:^|\D)([1-9]00)(?:\D|$)/.exec(rest)?.[1];
65
+ const named = WEIGHTS.find(([pattern]) => pattern.test(rest))?.[1];
66
+ const weight = number ?? (named ? String(named) : '');
67
+ found.push({ family, url, weight, style, format, rest });
68
+ }
69
+ return found.map(({ rest, weight, ...file }) => {
70
+ const variable = /variable|vf/.test(rest);
71
+ const single = found.some((other) => other.family === file.family && other.weight);
72
+ return { ...file, weight: weight || (variable || !single ? '100 900' : '400') };
73
+ });
74
+ }
75
+ /** The `@font-face` rules for the files, shown with `font-display: swap`. */
76
+ export function fontFaceCss(files) {
77
+ return files
78
+ .map(({ family, url, weight, style, format }) => `@font-face{font-family:${cssFontFamily(family)};src:url("${url.replace(/["\\\n]/g, encodeURIComponent)}") format("${format}");font-weight:${weight};font-style:${style};font-display:swap}`)
79
+ .join('');
80
+ }
package/dist/index.d.ts CHANGED
@@ -1,12 +1,19 @@
1
1
  export { checkTheme, contrastRatio, setAsideWords } from './checks.ts';
2
2
  export { extendTheme, type ThemeOverrides } from './extend.ts';
3
+ export { type FontFile, fontFaceCss, fontFileSuffix, themeFamilies, themeFontFiles, } from './font-files.ts';
3
4
  export { cssFontFamily, isSystemFont } from './fonts.ts';
4
5
  export { toCss } from './outputs/css.ts';
5
6
  export { type NativeTheme, scaleNative, toNative } from './outputs/native.ts';
6
7
  export * from './semantic.ts';
7
8
  export type { Bezier, Colors, ContrastCheck, Faces, Font, NumberValues, PerMode, ProductColorToken, Shadows, Theme, ThemeAllowance, ThemeTokenNames, } from './theme.ts';
8
- /** The starter themes. A product theme extends one of them with `extendTheme`. */
9
+ /**
10
+ * The starter themes. A product theme extends one of them with `extendTheme`. Clear, Warm and Bold
11
+ * are the directions a new product is offered first; Neutral and Soft stay for products built on them.
12
+ */
9
13
  export declare const themes: {
10
14
  neutral: import("./theme.ts").Theme;
11
15
  soft: import("./theme.ts").Theme;
16
+ clear: import("./theme.ts").Theme;
17
+ warm: import("./theme.ts").Theme;
18
+ bold: import("./theme.ts").Theme;
12
19
  };
package/dist/index.js CHANGED
@@ -1,10 +1,17 @@
1
+ import { bold } from './themes/bold.js';
2
+ import { clear } from './themes/clear.js';
1
3
  import { neutral } from './themes/neutral.js';
2
4
  import { soft } from './themes/soft.js';
5
+ import { warm } from './themes/warm.js';
3
6
  export { checkTheme, contrastRatio, setAsideWords } from './checks.js';
4
7
  export { extendTheme } from './extend.js';
8
+ export { fontFaceCss, fontFileSuffix, themeFamilies, themeFontFiles, } from './font-files.js';
5
9
  export { cssFontFamily, isSystemFont } from './fonts.js';
6
10
  export { toCss } from './outputs/css.js';
7
11
  export { scaleNative, toNative } from './outputs/native.js';
8
12
  export * from './semantic.js';
9
- /** The starter themes. A product theme extends one of them with `extendTheme`. */
10
- export const themes = { neutral, soft };
13
+ /**
14
+ * The starter themes. A product theme extends one of them with `extendTheme`. Clear, Warm and Bold
15
+ * are the directions a new product is offered first; Neutral and Soft stay for products built on them.
16
+ */
17
+ export const themes = { neutral, soft, clear, warm, bold };
@@ -17,7 +17,7 @@ export function toCss(theme, options = {}) {
17
17
  ...theme.tokens?.[mode],
18
18
  });
19
19
  const rules = [rule(root, fixedVars(theme))];
20
- for (const mode of Object.keys(theme.color)) {
20
+ for (const mode of Object.keys(theme.color).filter((name) => CSS_NAME.test(name))) {
21
21
  const selector = mode === 'light'
22
22
  ? `${root}, ${root} [data-mode="light"]`
23
23
  : `${root}[data-mode="${mode}"], ${root} [data-mode="${mode}"]`;
@@ -45,7 +45,43 @@ function fixedVars(theme) {
45
45
  }
46
46
  return vars;
47
47
  }
48
+ /** A name a custom property or a `data-mode` value may have. */
49
+ const CSS_NAME = /^[A-Za-z0-9_-]+$/;
50
+ /**
51
+ * Whether a value stays inside its declaration: no line break or `</`, quotes and brackets closed,
52
+ * and no `{`, `}`, `;`, `<`, `>`, a comment or a trailing escape outside a quoted string.
53
+ */
54
+ function staysInside(value) {
55
+ if (/[\n\r\f]|<\//.test(value))
56
+ return false;
57
+ let quote = '';
58
+ let depth = 0;
59
+ for (let i = 0; i < value.length; i++) {
60
+ const c = value[i];
61
+ if (c === '\\') {
62
+ if (i === value.length - 1)
63
+ return false;
64
+ i++;
65
+ }
66
+ else if (quote) {
67
+ if (c === quote)
68
+ quote = '';
69
+ }
70
+ else if (c === '"' || c === "'")
71
+ quote = c;
72
+ else if ('{};<>'.includes(c) || (c === '/' && value[i + 1] === '*'))
73
+ return false;
74
+ else if (c === '(')
75
+ depth++;
76
+ else if (c === ')' && --depth < 0)
77
+ return false;
78
+ }
79
+ return !quote && depth === 0;
80
+ }
81
+ /** A theme's own values never leave their rule: a declaration that would is left out. */
48
82
  function rule(selector, vars, indent = '') {
49
- const lines = Object.entries(vars).map(([name, value]) => `${indent} --${name}: ${value};`);
83
+ const lines = Object.entries(vars)
84
+ .filter(([name, value]) => CSS_NAME.test(name) && staysInside(String(value)))
85
+ .map(([name, value]) => `${indent} --${name}: ${value};`);
50
86
  return [`${indent}${selector} {`, ...lines, `${indent}}`].join('\n');
51
87
  }
@@ -0,0 +1,6 @@
1
+ import type { Theme } from '../theme.ts';
2
+ /**
3
+ * Bold, a starter theme: short, fast, a little bold. A dark ground, heavy tight headings, a lime
4
+ * pill button. Anything not set here is Neutral's.
5
+ */
6
+ export declare const bold: Theme;
@@ -0,0 +1,93 @@
1
+ import { neutral } from './neutral.js';
2
+ /**
3
+ * The dark ground Bold keeps in both light and dark mode: it is a dark-first look, so a phone in
4
+ * light mode still shows it. Status colors are Neutral's dark ones, except success, moved to teal
5
+ * so the lime main action never reads as "correct".
6
+ */
7
+ const night = {
8
+ ...neutral.color.dark,
9
+ 'surface-canvas': '#08090f',
10
+ 'surface-page': '#0e0f1a',
11
+ 'surface-panel': '#15172a',
12
+ 'surface-sunken': '#0a0b14',
13
+ 'surface-hover': '#23253a',
14
+ 'surface-pressed': '#2c2f47',
15
+ 'surface-selected': '#222a12',
16
+ 'surface-inverse': '#f4f4f8',
17
+ 'surface-overlay': '#1b1d2e',
18
+ 'text-strong': '#f4f4f8',
19
+ 'text-body': '#e4e4ec',
20
+ 'text-muted': '#b4b6c8',
21
+ 'text-subtle': '#a3a5bb',
22
+ 'text-disabled': '#9c9eb4',
23
+ 'text-inverse': '#0e0f1a',
24
+ 'text-link': '#c6f432',
25
+ 'border-hairline': '#23253a',
26
+ 'border-default': '#2a2c40',
27
+ 'border-control': '#7c7f99',
28
+ 'border-strong': '#c9cadb',
29
+ 'focus-ring': '#c6f432',
30
+ 'focus-ring-offset': '#0e0f1a',
31
+ 'brand-solid': '#c6f432',
32
+ 'brand-hover': '#d4f86a',
33
+ 'brand-pressed': '#e1fb98',
34
+ 'brand-on-solid': '#0e0f1a',
35
+ 'brand-tint': '#222a12',
36
+ 'brand-tint-strong': '#33401a',
37
+ 'brand-ink': '#d4f86a',
38
+ 'brand-border': '#8fb51f',
39
+ 'success-tint': '#0f2a2c',
40
+ 'success-tint-strong': '#123a3d',
41
+ 'success-border': '#2a7a80',
42
+ 'success-solid': '#4fd8e0',
43
+ 'success-on-solid': '#062226',
44
+ 'success-ink': '#a8eef2',
45
+ };
46
+ /**
47
+ * Bold, a starter theme: short, fast, a little bold. A dark ground, heavy tight headings, a lime
48
+ * pill button. Anything not set here is Neutral's.
49
+ */
50
+ export const bold = {
51
+ ...neutral,
52
+ key: 'bold',
53
+ label: 'Bold',
54
+ style: { controls: 'pill', surfaces: 'raised', density: 'comfortable', motion: 'lively' },
55
+ color: {
56
+ light: night,
57
+ dark: night,
58
+ contrast: {
59
+ ...neutral.color.contrast,
60
+ 'surface-selected': '#f2f8dc',
61
+ 'text-link': '#334400',
62
+ 'focus-ring': '#3d5200',
63
+ 'brand-solid': '#334400',
64
+ 'brand-hover': '#283600',
65
+ 'brand-pressed': '#1d2700',
66
+ 'brand-on-solid': '#ffffff',
67
+ 'brand-tint': '#f6fbe4',
68
+ 'brand-tint-strong': '#e6f3b8',
69
+ 'brand-ink': '#283600',
70
+ 'brand-border': '#4f6a00',
71
+ 'success-tint': '#ebfbfc',
72
+ 'success-tint-strong': '#cdf1f3',
73
+ 'success-border': '#005a60',
74
+ 'success-solid': '#00474d',
75
+ 'success-on-solid': '#ffffff',
76
+ 'success-ink': '#002e33',
77
+ },
78
+ },
79
+ shadow: {
80
+ ...neutral.shadow,
81
+ light: neutral.shadow.dark,
82
+ },
83
+ radius: {
84
+ ...neutral.radius,
85
+ 'radius-control': 999,
86
+ 'radius-chip': 999,
87
+ 'radius-panel': 16,
88
+ 'radius-overlay': 24,
89
+ },
90
+ border: { ...neutral.border, 'border-width-panel': 0 },
91
+ weight: { ...neutral.weight, 'weight-heading': 800 },
92
+ tracking: { ...neutral.tracking, 'tracking-tight': -0.03 },
93
+ };
@@ -0,0 +1,7 @@
1
+ import type { Theme } from '../theme.ts';
2
+ /**
3
+ * Clear, a starter theme: says what happened, then stops. White and ink, a blue main button,
4
+ * Public Sans with semibold headings, 8 px corners. Status colors and anything not set here are
5
+ * Neutral's.
6
+ */
7
+ export declare const clear: Theme;
@@ -0,0 +1,102 @@
1
+ import { neutral } from './neutral.js';
2
+ /**
3
+ * Clear, a starter theme: says what happened, then stops. White and ink, a blue main button,
4
+ * Public Sans with semibold headings, 8 px corners. Status colors and anything not set here are
5
+ * Neutral's.
6
+ */
7
+ export const clear = {
8
+ ...neutral,
9
+ key: 'clear',
10
+ label: 'Clear',
11
+ style: { controls: 'rounded', surfaces: 'outlined', density: 'comfortable', motion: 'calm' },
12
+ color: {
13
+ light: {
14
+ ...neutral.color.light,
15
+ 'surface-canvas': '#f9fafb',
16
+ 'surface-page': '#ffffff',
17
+ 'surface-panel': '#ffffff',
18
+ 'surface-sunken': '#f3f4f6',
19
+ 'surface-hover': '#f3f4f6',
20
+ 'surface-pressed': '#e5e7eb',
21
+ 'surface-selected': '#eff6ff',
22
+ 'surface-inverse': '#111827',
23
+ 'surface-overlay': '#ffffff',
24
+ 'text-strong': '#111827',
25
+ 'text-body': '#1f2937',
26
+ 'text-muted': '#4b5563',
27
+ 'text-subtle': '#5f6672',
28
+ 'text-disabled': '#5f6672',
29
+ 'text-inverse': '#ffffff',
30
+ 'text-link': '#1d4ed8',
31
+ 'border-hairline': '#e5e7eb',
32
+ 'border-default': '#d1d5db',
33
+ 'border-control': '#6b7280',
34
+ 'border-strong': '#374151',
35
+ 'focus-ring': '#2563eb',
36
+ 'focus-ring-offset': '#ffffff',
37
+ 'brand-solid': '#2563eb',
38
+ 'brand-hover': '#1d4ed8',
39
+ 'brand-pressed': '#1e40af',
40
+ 'brand-on-solid': '#ffffff',
41
+ 'brand-tint': '#eff6ff',
42
+ 'brand-tint-strong': '#dbeafe',
43
+ 'brand-ink': '#1e40af',
44
+ 'brand-border': '#93c5fd',
45
+ },
46
+ dark: {
47
+ ...neutral.color.dark,
48
+ 'surface-canvas': '#030712',
49
+ 'surface-page': '#0b1120',
50
+ 'surface-panel': '#111827',
51
+ 'surface-sunken': '#070b16',
52
+ 'surface-hover': '#1f2937',
53
+ 'surface-pressed': '#273244',
54
+ 'surface-selected': '#172554',
55
+ 'surface-inverse': '#f9fafb',
56
+ 'surface-overlay': '#1f2937',
57
+ 'text-strong': '#f9fafb',
58
+ 'text-body': '#e5e7eb',
59
+ 'text-muted': '#c0c5cd',
60
+ 'text-subtle': '#a7adb7',
61
+ 'text-disabled': '#a1a7b1',
62
+ 'text-inverse': '#111827',
63
+ 'text-link': '#93c5fd',
64
+ 'border-hairline': '#1f2937',
65
+ 'border-default': '#374151',
66
+ 'border-control': '#8b93a1',
67
+ 'border-strong': '#d1d5db',
68
+ 'focus-ring': '#60a5fa',
69
+ 'focus-ring-offset': '#0b1120',
70
+ 'brand-solid': '#60a5fa',
71
+ 'brand-hover': '#93c5fd',
72
+ 'brand-pressed': '#bfdbfe',
73
+ 'brand-on-solid': '#0b1120',
74
+ 'brand-tint': '#172554',
75
+ 'brand-tint-strong': '#1e3a8a',
76
+ 'brand-ink': '#bfdbfe',
77
+ 'brand-border': '#3b82f6',
78
+ },
79
+ contrast: {
80
+ ...neutral.color.contrast,
81
+ 'surface-selected': '#e0ecff',
82
+ 'text-link': '#1e3a8a',
83
+ 'focus-ring': '#1e40af',
84
+ 'brand-solid': '#1e3a8a',
85
+ 'brand-hover': '#172554',
86
+ 'brand-pressed': '#0f1d4a',
87
+ 'brand-on-solid': '#ffffff',
88
+ 'brand-tint': '#eff6ff',
89
+ 'brand-tint-strong': '#dbeafe',
90
+ 'brand-ink': '#172554',
91
+ 'brand-border': '#1d4ed8',
92
+ },
93
+ },
94
+ radius: {
95
+ ...neutral.radius,
96
+ 'radius-control': 8,
97
+ 'radius-chip': 6,
98
+ 'radius-panel': 12,
99
+ 'radius-overlay': 16,
100
+ },
101
+ weight: { ...neutral.weight, 'weight-heading': 600 },
102
+ };
@@ -0,0 +1,7 @@
1
+ import type { Theme } from '../theme.ts';
2
+ /**
3
+ * Warm, a starter theme: friendly and sure, like a good host. Cream grounds, dark brown ink, a
4
+ * rust main button, serif headings (the platform's Georgia or serif, nothing to download) over
5
+ * Public Sans, 14 px corners. Status colors and anything not set here are Neutral's.
6
+ */
7
+ export declare const warm: Theme;
@@ -0,0 +1,110 @@
1
+ import { neutral } from './neutral.js';
2
+ /**
3
+ * Warm, a starter theme: friendly and sure, like a good host. Cream grounds, dark brown ink, a
4
+ * rust main button, serif headings (the platform's Georgia or serif, nothing to download) over
5
+ * Public Sans, 14 px corners. Status colors and anything not set here are Neutral's.
6
+ */
7
+ export const warm = {
8
+ ...neutral,
9
+ key: 'warm',
10
+ label: 'Warm',
11
+ style: { controls: 'rounded', surfaces: 'raised', density: 'comfortable', motion: 'calm' },
12
+ color: {
13
+ light: {
14
+ ...neutral.color.light,
15
+ 'surface-canvas': '#f6efe3',
16
+ 'surface-page': '#fbf6ee',
17
+ 'surface-panel': '#fffaf3',
18
+ 'surface-sunken': '#f4ebdd',
19
+ 'surface-hover': '#efe4d3',
20
+ 'surface-pressed': '#e6d8c3',
21
+ 'surface-selected': '#f8e6dc',
22
+ 'surface-inverse': '#2a1e14',
23
+ 'surface-overlay': '#fffaf3',
24
+ 'text-strong': '#2a1e14',
25
+ 'text-body': '#3a2a1d',
26
+ 'text-muted': '#664630',
27
+ 'text-subtle': '#6f5039',
28
+ 'text-disabled': '#6f5039',
29
+ 'text-inverse': '#fbf6ee',
30
+ 'text-link': '#9a3412',
31
+ 'border-hairline': '#eadcc6',
32
+ 'border-default': '#dfcdb2',
33
+ 'border-control': '#8a6e55',
34
+ 'border-strong': '#5a4330',
35
+ 'focus-ring': '#b4441f',
36
+ 'focus-ring-offset': '#fbf6ee',
37
+ 'brand-solid': '#b4441f',
38
+ 'brand-hover': '#963719',
39
+ 'brand-pressed': '#7a2c13',
40
+ 'brand-on-solid': '#ffffff',
41
+ 'brand-tint': '#f8e6dc',
42
+ 'brand-tint-strong': '#f1d2c1',
43
+ 'brand-ink': '#8a2f12',
44
+ 'brand-border': '#e0a58a',
45
+ },
46
+ dark: {
47
+ ...neutral.color.dark,
48
+ 'surface-canvas': '#120d09',
49
+ 'surface-page': '#1a140f',
50
+ 'surface-panel': '#211912',
51
+ 'surface-sunken': '#150f0b',
52
+ 'surface-hover': '#2c2219',
53
+ 'surface-pressed': '#382b20',
54
+ 'surface-selected': '#3a2116',
55
+ 'surface-inverse': '#fbf6ee',
56
+ 'surface-overlay': '#2a2018',
57
+ 'text-strong': '#fbf6ee',
58
+ 'text-body': '#f1e6d6',
59
+ 'text-muted': '#d2bea4',
60
+ 'text-subtle': '#bfa88f',
61
+ 'text-disabled': '#b39c84',
62
+ 'text-inverse': '#2a1e14',
63
+ 'text-link': '#f4a683',
64
+ 'border-hairline': '#2f241b',
65
+ 'border-default': '#433426',
66
+ 'border-control': '#9a8168',
67
+ 'border-strong': '#e0cdb3',
68
+ 'focus-ring': '#f08a5d',
69
+ 'focus-ring-offset': '#1a140f',
70
+ 'brand-solid': '#f08a5d',
71
+ 'brand-hover': '#f5a785',
72
+ 'brand-pressed': '#f9c4ab',
73
+ 'brand-on-solid': '#2a1209',
74
+ 'brand-tint': '#3a2116',
75
+ 'brand-tint-strong': '#52301f',
76
+ 'brand-ink': '#f9c4ab',
77
+ 'brand-border': '#b4441f',
78
+ },
79
+ contrast: {
80
+ ...neutral.color.contrast,
81
+ 'surface-selected': '#fbe9e0',
82
+ 'text-link': '#6b240c',
83
+ 'focus-ring': '#7a2c13',
84
+ 'brand-solid': '#6b240c',
85
+ 'brand-hover': '#541c09',
86
+ 'brand-pressed': '#3f1506',
87
+ 'brand-on-solid': '#ffffff',
88
+ 'brand-tint': '#fdf3ee',
89
+ 'brand-tint-strong': '#f9ddd0',
90
+ 'brand-ink': '#541c09',
91
+ 'brand-border': '#9a3412',
92
+ },
93
+ },
94
+ shadow: {
95
+ ...neutral.shadow,
96
+ light: {
97
+ ...neutral.shadow.light,
98
+ 'shadow-panel': '0 1px 2px rgba(60,35,15,0.06), 0 6px 18px rgba(60,35,15,0.07)',
99
+ },
100
+ },
101
+ font: { ...neutral.font, display: ['Georgia', 'ui-serif', 'serif'] },
102
+ radius: {
103
+ ...neutral.radius,
104
+ 'radius-control': 14,
105
+ 'radius-chip': 999,
106
+ 'radius-panel': 18,
107
+ 'radius-overlay': 22,
108
+ },
109
+ border: { ...neutral.border, 'border-width-panel': 0 },
110
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buffcore/tokens",
3
- "version": "0.8.40",
3
+ "version": "0.8.42",
4
4
  "description": "BuffCore design tokens, the token pipeline and the starter themes (Neutral and Soft).",
5
5
  "license": "Apache-2.0",
6
6
  "author": "BuffApe",