@bitsandbricks/tokens 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +2 -2
- package/dist/contrast.d.ts +23 -0
- package/dist/contrast.js +61 -0
- package/dist/css.d.ts +10 -0
- package/dist/css.js +104 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/tokens.css +139 -0
- package/dist/tokens.d.ts +155 -0
- package/dist/tokens.js +83 -0
- package/dist/tokens.json +130 -0
- package/package.json +31 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mike (BitsAndBricks)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @bitsandbricks/tokens
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
See the [repository README](../../README.md).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @param {string} hex */
|
|
2
|
+
export function parseHex(hex: string): number[];
|
|
3
|
+
/** @param {number[]} rgb */
|
|
4
|
+
export function toHex(rgb: number[]): string;
|
|
5
|
+
/** Relative luminance, 0 (black) to 1 (white). @param {string} hex */
|
|
6
|
+
export function luminance(hex: string): number;
|
|
7
|
+
/** Contrast ratio of two colours, 1 to 21. @param {string} a @param {string} b */
|
|
8
|
+
export function contrastRatio(a: string, b: string): number;
|
|
9
|
+
/** `a` mixed towards `b` by `amount` (0 keeps a, 1 gives b). @param {string} a @param {string} b @param {number} amount */
|
|
10
|
+
export function mix(a: string, b: string, amount: number): string;
|
|
11
|
+
/**
|
|
12
|
+
* Text on a fill of `hex`: near-black or white, whichever reads better. Bright accents (amber,
|
|
13
|
+
* green) get dark text, never white. @param {string} hex
|
|
14
|
+
*/
|
|
15
|
+
export function textOn(hex: string): "#0f0f11" | "#ffffff";
|
|
16
|
+
/**
|
|
17
|
+
* The first shade of `hex`, darkened (or lightened) step by step, that reaches `min` contrast on
|
|
18
|
+
* every background. Used for accent text on light pages.
|
|
19
|
+
* @param {string} hex @param {string[]} backgrounds @param {number} [min]
|
|
20
|
+
*/
|
|
21
|
+
export function readableOn(hex: string, backgrounds: string[], min?: number): string;
|
|
22
|
+
export const INK: "#0f0f11";
|
|
23
|
+
export const WHITE: "#ffffff";
|
package/dist/contrast.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// WCAG 2 contrast for #rrggbb colours. Shared by the CSS build, the tests and the Mantine theme.
|
|
2
|
+
|
|
3
|
+
/** @param {string} hex */
|
|
4
|
+
export function parseHex(hex) {
|
|
5
|
+
const m = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(hex.trim())
|
|
6
|
+
if (!m) throw new Error(`not a #rrggbb colour: ${hex}`)
|
|
7
|
+
const h = m[1].length === 3 ? [...m[1]].map((c) => c + c).join('') : m[1]
|
|
8
|
+
return [0, 2, 4].map((i) => parseInt(h.slice(i, i + 2), 16))
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** @param {number[]} rgb */
|
|
12
|
+
export function toHex(rgb) {
|
|
13
|
+
return `#${rgb.map((v) => Math.round(Math.min(255, Math.max(0, v))).toString(16).padStart(2, '0')).join('')}`
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Relative luminance, 0 (black) to 1 (white). @param {string} hex */
|
|
17
|
+
export function luminance(hex) {
|
|
18
|
+
const [r, g, b] = parseHex(hex).map((v) => {
|
|
19
|
+
const c = v / 255
|
|
20
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4
|
|
21
|
+
})
|
|
22
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Contrast ratio of two colours, 1 to 21. @param {string} a @param {string} b */
|
|
26
|
+
export function contrastRatio(a, b) {
|
|
27
|
+
const [hi, lo] = [luminance(a), luminance(b)].sort((x, y) => y - x)
|
|
28
|
+
return (hi + 0.05) / (lo + 0.05)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** `a` mixed towards `b` by `amount` (0 keeps a, 1 gives b). @param {string} a @param {string} b @param {number} amount */
|
|
32
|
+
export function mix(a, b, amount) {
|
|
33
|
+
const x = parseHex(a)
|
|
34
|
+
const y = parseHex(b)
|
|
35
|
+
return toHex(x.map((v, i) => v + (y[i] - v) * amount))
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const INK = '#0f0f11'
|
|
39
|
+
export const WHITE = '#ffffff'
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Text on a fill of `hex`: near-black or white, whichever reads better. Bright accents (amber,
|
|
43
|
+
* green) get dark text, never white. @param {string} hex
|
|
44
|
+
*/
|
|
45
|
+
export function textOn(hex) {
|
|
46
|
+
return contrastRatio(hex, INK) >= contrastRatio(hex, WHITE) ? INK : WHITE
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The first shade of `hex`, darkened (or lightened) step by step, that reaches `min` contrast on
|
|
51
|
+
* every background. Used for accent text on light pages.
|
|
52
|
+
* @param {string} hex @param {string[]} backgrounds @param {number} [min]
|
|
53
|
+
*/
|
|
54
|
+
export function readableOn(hex, backgrounds, min = 4.5) {
|
|
55
|
+
const lighten = backgrounds.every((bg) => luminance(bg) < 0.2)
|
|
56
|
+
for (let step = 0; step <= 20; step++) {
|
|
57
|
+
const c = mix(hex, lighten ? WHITE : INK, step / 20)
|
|
58
|
+
if (backgrounds.every((bg) => contrastRatio(c, bg) >= min)) return c
|
|
59
|
+
}
|
|
60
|
+
return lighten ? WHITE : INK
|
|
61
|
+
}
|
package/dist/css.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The whole stylesheet. */
|
|
2
|
+
export function renderCss(): string;
|
|
3
|
+
/**
|
|
4
|
+
* The CSS an app adds to set its own accent: `accentCss({ light: '#b85a0a', dark: '#f59a23' })`.
|
|
5
|
+
* Text on the fill is worked out per theme. @param {{ light: string, dark: string }} accent @param {string} [selector]
|
|
6
|
+
*/
|
|
7
|
+
export function accentCss(accent: {
|
|
8
|
+
light: string;
|
|
9
|
+
dark: string;
|
|
10
|
+
}, selector?: string): string;
|
package/dist/css.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// Renders the tokens as CSS variables (--bnb-*). Light is the base; dark applies with
|
|
2
|
+
// data-theme="dark" (Vue apps, plain pages), data-mantine-color-scheme="dark" (Mantine apps),
|
|
3
|
+
// or the system setting when the page chose neither.
|
|
4
|
+
import { textOn } from './contrast.js'
|
|
5
|
+
import tokens from './tokens.js'
|
|
6
|
+
|
|
7
|
+
/** @param {Record<string, string | number>} vars @param {string} indent */
|
|
8
|
+
const block = (vars, indent = ' ') =>
|
|
9
|
+
Object.entries(vars)
|
|
10
|
+
.map(([k, v]) => `${indent}${k}: ${v};`)
|
|
11
|
+
.join('\n')
|
|
12
|
+
|
|
13
|
+
/** @param {'light' | 'dark'} scheme */
|
|
14
|
+
function schemeVars(scheme) {
|
|
15
|
+
const n = tokens.neutrals[scheme]
|
|
16
|
+
const s = tokens.status[scheme]
|
|
17
|
+
const sh = tokens.shadow[scheme]
|
|
18
|
+
/** @type {Record<string, string>} */
|
|
19
|
+
const vars = { 'color-scheme': scheme }
|
|
20
|
+
for (const [k, v] of Object.entries(n)) vars[`--bnb-${k}`] = v
|
|
21
|
+
for (const [k, v] of Object.entries(s)) {
|
|
22
|
+
vars[`--bnb-${k}`] = v
|
|
23
|
+
vars[`--bnb-${k}-soft`] = `color-mix(in srgb, var(--bnb-${k}) 14%, transparent)`
|
|
24
|
+
}
|
|
25
|
+
vars['--bnb-accent'] = `var(--bnb-accent-${scheme})`
|
|
26
|
+
vars['--bnb-on-accent'] = `var(--bnb-on-accent-${scheme})`
|
|
27
|
+
vars['--bnb-accent-hover'] = `color-mix(in srgb, var(--bnb-accent), ${scheme === 'light' ? 'black' : 'white'} 12%)`
|
|
28
|
+
vars['--bnb-accent-soft'] = 'color-mix(in srgb, var(--bnb-accent) 14%, transparent)'
|
|
29
|
+
// The accent as text and links: the light accent is chosen to be readable on white already.
|
|
30
|
+
vars['--bnb-accent-text'] = 'var(--bnb-accent)'
|
|
31
|
+
// Text on a filled status colour (a "Failed" badge, a delete button).
|
|
32
|
+
vars['--bnb-on-status'] = scheme === 'light' ? '#ffffff' : '#0f0f11'
|
|
33
|
+
for (const [k, v] of Object.entries(sh)) vars[`--bnb-shadow-${k}`] = v
|
|
34
|
+
vars['--bnb-dot'] = tokens.dotGrid[scheme]
|
|
35
|
+
vars['--bnb-focus-ring'] = '0 0 0 2px var(--bnb-bg), 0 0 0 4px color-mix(in srgb, var(--bnb-accent) 70%, transparent)'
|
|
36
|
+
return vars
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Variables that are the same in both themes. */
|
|
40
|
+
function sharedVars() {
|
|
41
|
+
/** @type {Record<string, string>} */
|
|
42
|
+
const vars = {
|
|
43
|
+
'--bnb-accent-light': tokens.defaultAccent.light,
|
|
44
|
+
'--bnb-accent-dark': tokens.defaultAccent.dark,
|
|
45
|
+
'--bnb-on-accent-light': textOn(tokens.defaultAccent.light),
|
|
46
|
+
'--bnb-on-accent-dark': textOn(tokens.defaultAccent.dark),
|
|
47
|
+
'--bnb-text': '1',
|
|
48
|
+
}
|
|
49
|
+
for (const [k, v] of Object.entries(tokens.space)) vars[`--bnb-space-${k}`] = v
|
|
50
|
+
for (const [k, v] of Object.entries(tokens.radius)) vars[`--bnb-radius-${k}`] = v
|
|
51
|
+
vars['--bnb-font-sans'] = tokens.font.sans
|
|
52
|
+
vars['--bnb-font-mono'] = tokens.font.mono
|
|
53
|
+
for (const [k, v] of Object.entries(tokens.fontSize)) vars[`--bnb-fs-${k}`] = `calc(${v}px * var(--bnb-text))`
|
|
54
|
+
vars['--bnb-lh-tight'] = String(tokens.lineHeight.tight)
|
|
55
|
+
vars['--bnb-lh-normal'] = String(tokens.lineHeight.normal)
|
|
56
|
+
vars['--bnb-dot-size'] = tokens.dotGrid.size
|
|
57
|
+
vars['--bnb-dot-grid'] = `radial-gradient(circle at ${tokens.dotGrid.dot} ${tokens.dotGrid.dot}, var(--bnb-dot) ${tokens.dotGrid.dot}, transparent 0)`
|
|
58
|
+
return vars
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const DARK = ':root[data-theme="dark"], :root[data-mantine-color-scheme="dark"], [data-theme="dark"]'
|
|
62
|
+
const SYSTEM_DARK = ':root:not([data-theme="light"]):not([data-mantine-color-scheme="light"])'
|
|
63
|
+
|
|
64
|
+
/** The whole stylesheet. */
|
|
65
|
+
export function renderCss() {
|
|
66
|
+
const dark = block(schemeVars('dark'))
|
|
67
|
+
return `/* @bitsandbricks/tokens: generated by scripts/build.mjs from src/tokens.js. Do not edit. */
|
|
68
|
+
:root {
|
|
69
|
+
${block(sharedVars())}
|
|
70
|
+
${block(schemeVars('light'))}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
${DARK} {
|
|
74
|
+
${dark}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (prefers-color-scheme: dark) {
|
|
78
|
+
${SYSTEM_DARK} {
|
|
79
|
+
${block(schemeVars('dark'), ' ')}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* The dot grid behind a page's content. */
|
|
84
|
+
.bnb-dot-grid {
|
|
85
|
+
background-color: var(--bnb-bg);
|
|
86
|
+
background-image: var(--bnb-dot-grid);
|
|
87
|
+
background-size: var(--bnb-dot-size) var(--bnb-dot-size);
|
|
88
|
+
}
|
|
89
|
+
`
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The CSS an app adds to set its own accent: `accentCss({ light: '#b85a0a', dark: '#f59a23' })`.
|
|
94
|
+
* Text on the fill is worked out per theme. @param {{ light: string, dark: string }} accent @param {string} [selector]
|
|
95
|
+
*/
|
|
96
|
+
export function accentCss(accent, selector = ':root') {
|
|
97
|
+
return `${selector} {
|
|
98
|
+
--bnb-accent-light: ${accent.light};
|
|
99
|
+
--bnb-accent-dark: ${accent.dark};
|
|
100
|
+
--bnb-on-accent-light: ${textOn(accent.light)};
|
|
101
|
+
--bnb-on-accent-dark: ${textOn(accent.dark)};
|
|
102
|
+
}
|
|
103
|
+
`
|
|
104
|
+
}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/* @bitsandbricks/tokens: generated by scripts/build.mjs from src/tokens.js. Do not edit. */
|
|
2
|
+
:root {
|
|
3
|
+
--bnb-accent-light: #2563eb;
|
|
4
|
+
--bnb-accent-dark: #60a5fa;
|
|
5
|
+
--bnb-on-accent-light: #ffffff;
|
|
6
|
+
--bnb-on-accent-dark: #0f0f11;
|
|
7
|
+
--bnb-text: 1;
|
|
8
|
+
--bnb-space-0: 0;
|
|
9
|
+
--bnb-space-1: 4px;
|
|
10
|
+
--bnb-space-2: 8px;
|
|
11
|
+
--bnb-space-3: 12px;
|
|
12
|
+
--bnb-space-4: 16px;
|
|
13
|
+
--bnb-space-5: 20px;
|
|
14
|
+
--bnb-space-6: 24px;
|
|
15
|
+
--bnb-space-8: 32px;
|
|
16
|
+
--bnb-space-10: 40px;
|
|
17
|
+
--bnb-space-12: 48px;
|
|
18
|
+
--bnb-radius-xs: 4px;
|
|
19
|
+
--bnb-radius-sm: 6px;
|
|
20
|
+
--bnb-radius-md: 8px;
|
|
21
|
+
--bnb-radius-lg: 10px;
|
|
22
|
+
--bnb-radius-xl: 16px;
|
|
23
|
+
--bnb-radius-pill: 999px;
|
|
24
|
+
--bnb-font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
|
|
25
|
+
--bnb-font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
|
|
26
|
+
--bnb-fs-xs: calc(12px * var(--bnb-text));
|
|
27
|
+
--bnb-fs-sm: calc(13px * var(--bnb-text));
|
|
28
|
+
--bnb-fs-md: calc(15px * var(--bnb-text));
|
|
29
|
+
--bnb-fs-lg: calc(17px * var(--bnb-text));
|
|
30
|
+
--bnb-fs-xl: calc(20px * var(--bnb-text));
|
|
31
|
+
--bnb-fs-2xl: calc(26px * var(--bnb-text));
|
|
32
|
+
--bnb-fs-3xl: calc(32px * var(--bnb-text));
|
|
33
|
+
--bnb-lh-tight: 1.2;
|
|
34
|
+
--bnb-lh-normal: 1.5;
|
|
35
|
+
--bnb-dot-size: 20px;
|
|
36
|
+
--bnb-dot-grid: radial-gradient(circle at 1px 1px, var(--bnb-dot) 1px, transparent 0);
|
|
37
|
+
color-scheme: light;
|
|
38
|
+
--bnb-bg: #f6f6f7;
|
|
39
|
+
--bnb-surface: #ffffff;
|
|
40
|
+
--bnb-raised: #efeff1;
|
|
41
|
+
--bnb-line: #e0e0e4;
|
|
42
|
+
--bnb-fg: #18181b;
|
|
43
|
+
--bnb-muted: #52525b;
|
|
44
|
+
--bnb-faint: #6b6b75;
|
|
45
|
+
--bnb-ok: #047857;
|
|
46
|
+
--bnb-ok-soft: color-mix(in srgb, var(--bnb-ok) 14%, transparent);
|
|
47
|
+
--bnb-warn: #a16207;
|
|
48
|
+
--bnb-warn-soft: color-mix(in srgb, var(--bnb-warn) 14%, transparent);
|
|
49
|
+
--bnb-err: #c81e1e;
|
|
50
|
+
--bnb-err-soft: color-mix(in srgb, var(--bnb-err) 14%, transparent);
|
|
51
|
+
--bnb-info: #0e7490;
|
|
52
|
+
--bnb-info-soft: color-mix(in srgb, var(--bnb-info) 14%, transparent);
|
|
53
|
+
--bnb-off: #6b6b75;
|
|
54
|
+
--bnb-off-soft: color-mix(in srgb, var(--bnb-off) 14%, transparent);
|
|
55
|
+
--bnb-accent: var(--bnb-accent-light);
|
|
56
|
+
--bnb-on-accent: var(--bnb-on-accent-light);
|
|
57
|
+
--bnb-accent-hover: color-mix(in srgb, var(--bnb-accent), black 12%);
|
|
58
|
+
--bnb-accent-soft: color-mix(in srgb, var(--bnb-accent) 14%, transparent);
|
|
59
|
+
--bnb-accent-text: var(--bnb-accent);
|
|
60
|
+
--bnb-on-status: #ffffff;
|
|
61
|
+
--bnb-shadow-sm: 0 1px 2px rgb(24 24 27 / 0.06);
|
|
62
|
+
--bnb-shadow-md: 0 2px 4px rgb(24 24 27 / 0.04), 0 12px 28px -12px rgb(24 24 27 / 0.16);
|
|
63
|
+
--bnb-shadow-lg: 0 24px 60px -20px rgb(24 24 27 / 0.28), 0 4px 14px -6px rgb(24 24 27 / 0.12);
|
|
64
|
+
--bnb-dot: rgb(24 24 27 / 0.09);
|
|
65
|
+
--bnb-focus-ring: 0 0 0 2px var(--bnb-bg), 0 0 0 4px color-mix(in srgb, var(--bnb-accent) 70%, transparent);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:root[data-theme="dark"], :root[data-mantine-color-scheme="dark"], [data-theme="dark"] {
|
|
69
|
+
color-scheme: dark;
|
|
70
|
+
--bnb-bg: #0f0f11;
|
|
71
|
+
--bnb-surface: #161618;
|
|
72
|
+
--bnb-raised: #1f1f23;
|
|
73
|
+
--bnb-line: #2c2c31;
|
|
74
|
+
--bnb-fg: #ededef;
|
|
75
|
+
--bnb-muted: #a1a1aa;
|
|
76
|
+
--bnb-faint: #80808a;
|
|
77
|
+
--bnb-ok: #34d399;
|
|
78
|
+
--bnb-ok-soft: color-mix(in srgb, var(--bnb-ok) 14%, transparent);
|
|
79
|
+
--bnb-warn: #fbbf24;
|
|
80
|
+
--bnb-warn-soft: color-mix(in srgb, var(--bnb-warn) 14%, transparent);
|
|
81
|
+
--bnb-err: #f87171;
|
|
82
|
+
--bnb-err-soft: color-mix(in srgb, var(--bnb-err) 14%, transparent);
|
|
83
|
+
--bnb-info: #22d3ee;
|
|
84
|
+
--bnb-info-soft: color-mix(in srgb, var(--bnb-info) 14%, transparent);
|
|
85
|
+
--bnb-off: #80808a;
|
|
86
|
+
--bnb-off-soft: color-mix(in srgb, var(--bnb-off) 14%, transparent);
|
|
87
|
+
--bnb-accent: var(--bnb-accent-dark);
|
|
88
|
+
--bnb-on-accent: var(--bnb-on-accent-dark);
|
|
89
|
+
--bnb-accent-hover: color-mix(in srgb, var(--bnb-accent), white 12%);
|
|
90
|
+
--bnb-accent-soft: color-mix(in srgb, var(--bnb-accent) 14%, transparent);
|
|
91
|
+
--bnb-accent-text: var(--bnb-accent);
|
|
92
|
+
--bnb-on-status: #0f0f11;
|
|
93
|
+
--bnb-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
|
|
94
|
+
--bnb-shadow-md: 0 2px 6px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.45);
|
|
95
|
+
--bnb-shadow-lg: 0 24px 60px rgb(0 0 0 / 0.55), 0 4px 14px rgb(0 0 0 / 0.35);
|
|
96
|
+
--bnb-dot: rgb(255 255 255 / 0.06);
|
|
97
|
+
--bnb-focus-ring: 0 0 0 2px var(--bnb-bg), 0 0 0 4px color-mix(in srgb, var(--bnb-accent) 70%, transparent);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@media (prefers-color-scheme: dark) {
|
|
101
|
+
:root:not([data-theme="light"]):not([data-mantine-color-scheme="light"]) {
|
|
102
|
+
color-scheme: dark;
|
|
103
|
+
--bnb-bg: #0f0f11;
|
|
104
|
+
--bnb-surface: #161618;
|
|
105
|
+
--bnb-raised: #1f1f23;
|
|
106
|
+
--bnb-line: #2c2c31;
|
|
107
|
+
--bnb-fg: #ededef;
|
|
108
|
+
--bnb-muted: #a1a1aa;
|
|
109
|
+
--bnb-faint: #80808a;
|
|
110
|
+
--bnb-ok: #34d399;
|
|
111
|
+
--bnb-ok-soft: color-mix(in srgb, var(--bnb-ok) 14%, transparent);
|
|
112
|
+
--bnb-warn: #fbbf24;
|
|
113
|
+
--bnb-warn-soft: color-mix(in srgb, var(--bnb-warn) 14%, transparent);
|
|
114
|
+
--bnb-err: #f87171;
|
|
115
|
+
--bnb-err-soft: color-mix(in srgb, var(--bnb-err) 14%, transparent);
|
|
116
|
+
--bnb-info: #22d3ee;
|
|
117
|
+
--bnb-info-soft: color-mix(in srgb, var(--bnb-info) 14%, transparent);
|
|
118
|
+
--bnb-off: #80808a;
|
|
119
|
+
--bnb-off-soft: color-mix(in srgb, var(--bnb-off) 14%, transparent);
|
|
120
|
+
--bnb-accent: var(--bnb-accent-dark);
|
|
121
|
+
--bnb-on-accent: var(--bnb-on-accent-dark);
|
|
122
|
+
--bnb-accent-hover: color-mix(in srgb, var(--bnb-accent), white 12%);
|
|
123
|
+
--bnb-accent-soft: color-mix(in srgb, var(--bnb-accent) 14%, transparent);
|
|
124
|
+
--bnb-accent-text: var(--bnb-accent);
|
|
125
|
+
--bnb-on-status: #0f0f11;
|
|
126
|
+
--bnb-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
|
|
127
|
+
--bnb-shadow-md: 0 2px 6px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.45);
|
|
128
|
+
--bnb-shadow-lg: 0 24px 60px rgb(0 0 0 / 0.55), 0 4px 14px rgb(0 0 0 / 0.35);
|
|
129
|
+
--bnb-dot: rgb(255 255 255 / 0.06);
|
|
130
|
+
--bnb-focus-ring: 0 0 0 2px var(--bnb-bg), 0 0 0 4px color-mix(in srgb, var(--bnb-accent) 70%, transparent);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* The dot grid behind a page's content. */
|
|
135
|
+
.bnb-dot-grid {
|
|
136
|
+
background-color: var(--bnb-bg);
|
|
137
|
+
background-image: var(--bnb-dot-grid);
|
|
138
|
+
background-size: var(--bnb-dot-size) var(--bnb-dot-size);
|
|
139
|
+
}
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
export namespace neutrals {
|
|
2
|
+
namespace light {
|
|
3
|
+
let bg: string;
|
|
4
|
+
let surface: string;
|
|
5
|
+
let raised: string;
|
|
6
|
+
let line: string;
|
|
7
|
+
let fg: string;
|
|
8
|
+
let muted: string;
|
|
9
|
+
let faint: string;
|
|
10
|
+
}
|
|
11
|
+
namespace dark {
|
|
12
|
+
let bg_1: string;
|
|
13
|
+
export { bg_1 as bg };
|
|
14
|
+
let surface_1: string;
|
|
15
|
+
export { surface_1 as surface };
|
|
16
|
+
let raised_1: string;
|
|
17
|
+
export { raised_1 as raised };
|
|
18
|
+
let line_1: string;
|
|
19
|
+
export { line_1 as line };
|
|
20
|
+
let fg_1: string;
|
|
21
|
+
export { fg_1 as fg };
|
|
22
|
+
let muted_1: string;
|
|
23
|
+
export { muted_1 as muted };
|
|
24
|
+
let faint_1: string;
|
|
25
|
+
export { faint_1 as faint };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export namespace scales {
|
|
29
|
+
export let gray: string[];
|
|
30
|
+
let dark_1: string[];
|
|
31
|
+
export { dark_1 as dark };
|
|
32
|
+
}
|
|
33
|
+
export namespace status {
|
|
34
|
+
export namespace light_1 {
|
|
35
|
+
let ok: string;
|
|
36
|
+
let warn: string;
|
|
37
|
+
let err: string;
|
|
38
|
+
let info: string;
|
|
39
|
+
let off: string;
|
|
40
|
+
}
|
|
41
|
+
export { light_1 as light };
|
|
42
|
+
export namespace dark_2 {
|
|
43
|
+
let ok_1: string;
|
|
44
|
+
export { ok_1 as ok };
|
|
45
|
+
let warn_1: string;
|
|
46
|
+
export { warn_1 as warn };
|
|
47
|
+
let err_1: string;
|
|
48
|
+
export { err_1 as err };
|
|
49
|
+
let info_1: string;
|
|
50
|
+
export { info_1 as info };
|
|
51
|
+
let off_1: string;
|
|
52
|
+
export { off_1 as off };
|
|
53
|
+
}
|
|
54
|
+
export { dark_2 as dark };
|
|
55
|
+
}
|
|
56
|
+
export namespace defaultAccent {
|
|
57
|
+
let light_2: string;
|
|
58
|
+
export { light_2 as light };
|
|
59
|
+
let dark_3: string;
|
|
60
|
+
export { dark_3 as dark };
|
|
61
|
+
}
|
|
62
|
+
/** Spacing on a 4 px grid. */
|
|
63
|
+
export const space: {
|
|
64
|
+
0: string;
|
|
65
|
+
1: string;
|
|
66
|
+
2: string;
|
|
67
|
+
3: string;
|
|
68
|
+
4: string;
|
|
69
|
+
5: string;
|
|
70
|
+
6: string;
|
|
71
|
+
8: string;
|
|
72
|
+
10: string;
|
|
73
|
+
12: string;
|
|
74
|
+
};
|
|
75
|
+
export namespace radius {
|
|
76
|
+
let xs: string;
|
|
77
|
+
let sm: string;
|
|
78
|
+
let md: string;
|
|
79
|
+
let lg: string;
|
|
80
|
+
let xl: string;
|
|
81
|
+
let pill: string;
|
|
82
|
+
}
|
|
83
|
+
export namespace font {
|
|
84
|
+
let sans: string;
|
|
85
|
+
let mono: string;
|
|
86
|
+
}
|
|
87
|
+
/** Type sizes. Body text is 15 px; apps scale all of them with --bnb-text (a user setting). */
|
|
88
|
+
export const fontSize: {
|
|
89
|
+
xs: number;
|
|
90
|
+
sm: number;
|
|
91
|
+
md: number;
|
|
92
|
+
lg: number;
|
|
93
|
+
xl: number;
|
|
94
|
+
'2xl': number;
|
|
95
|
+
'3xl': number;
|
|
96
|
+
};
|
|
97
|
+
export namespace lineHeight {
|
|
98
|
+
let tight: number;
|
|
99
|
+
let normal: number;
|
|
100
|
+
}
|
|
101
|
+
export namespace shadow {
|
|
102
|
+
export namespace light_3 {
|
|
103
|
+
let sm_1: string;
|
|
104
|
+
export { sm_1 as sm };
|
|
105
|
+
let md_1: string;
|
|
106
|
+
export { md_1 as md };
|
|
107
|
+
let lg_1: string;
|
|
108
|
+
export { lg_1 as lg };
|
|
109
|
+
}
|
|
110
|
+
export { light_3 as light };
|
|
111
|
+
export namespace dark_4 {
|
|
112
|
+
let sm_2: string;
|
|
113
|
+
export { sm_2 as sm };
|
|
114
|
+
let md_2: string;
|
|
115
|
+
export { md_2 as md };
|
|
116
|
+
let lg_2: string;
|
|
117
|
+
export { lg_2 as lg };
|
|
118
|
+
}
|
|
119
|
+
export { dark_4 as dark };
|
|
120
|
+
}
|
|
121
|
+
export namespace dotGrid {
|
|
122
|
+
export let size: string;
|
|
123
|
+
export let dot: string;
|
|
124
|
+
let light_4: string;
|
|
125
|
+
export { light_4 as light };
|
|
126
|
+
let dark_5: string;
|
|
127
|
+
export { dark_5 as dark };
|
|
128
|
+
}
|
|
129
|
+
export namespace breakpoints {
|
|
130
|
+
let xs_1: string;
|
|
131
|
+
export { xs_1 as xs };
|
|
132
|
+
let sm_3: string;
|
|
133
|
+
export { sm_3 as sm };
|
|
134
|
+
let md_3: string;
|
|
135
|
+
export { md_3 as md };
|
|
136
|
+
let lg_3: string;
|
|
137
|
+
export { lg_3 as lg };
|
|
138
|
+
let xl_1: string;
|
|
139
|
+
export { xl_1 as xl };
|
|
140
|
+
}
|
|
141
|
+
export namespace tokens {
|
|
142
|
+
export { neutrals };
|
|
143
|
+
export { scales };
|
|
144
|
+
export { status };
|
|
145
|
+
export { defaultAccent };
|
|
146
|
+
export { space };
|
|
147
|
+
export { radius };
|
|
148
|
+
export { font };
|
|
149
|
+
export { fontSize };
|
|
150
|
+
export { lineHeight };
|
|
151
|
+
export { shadow };
|
|
152
|
+
export { dotGrid };
|
|
153
|
+
export { breakpoints };
|
|
154
|
+
}
|
|
155
|
+
export default tokens;
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// The one source of the BitsAndBricks tokens. scripts/build.mjs writes tokens.css and
|
|
2
|
+
// tokens.json from it; @bitsandbricks/ui reads it for the Mantine theme.
|
|
3
|
+
//
|
|
4
|
+
// Every app shares the neutrals, status colours, spacing, radii, type and the dot grid. An app
|
|
5
|
+
// differs only through its accent (--bnb-accent) and its logo, so the apps read as siblings.
|
|
6
|
+
// The accents live in the apps, not here: nothing app-specific goes into a package.
|
|
7
|
+
|
|
8
|
+
/** Neutrals per theme. Plain greys with no tint, so only the accent carries colour. */
|
|
9
|
+
export const neutrals = {
|
|
10
|
+
light: {
|
|
11
|
+
bg: '#f6f6f7', // page
|
|
12
|
+
surface: '#ffffff', // cards, panels, dialogs
|
|
13
|
+
raised: '#efeff1', // inputs, hover fills
|
|
14
|
+
line: '#e0e0e4', // borders
|
|
15
|
+
fg: '#18181b', // text
|
|
16
|
+
muted: '#52525b', // secondary text (7.7:1 on surface)
|
|
17
|
+
faint: '#6b6b75', // hints, placeholders (5.2:1 on surface)
|
|
18
|
+
},
|
|
19
|
+
dark: {
|
|
20
|
+
bg: '#0f0f11',
|
|
21
|
+
surface: '#161618',
|
|
22
|
+
raised: '#1f1f23',
|
|
23
|
+
line: '#2c2c31',
|
|
24
|
+
fg: '#ededef',
|
|
25
|
+
muted: '#a1a1aa', // 7.4:1 on surface
|
|
26
|
+
faint: '#80808a', // 4.8:1 on surface
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Ten-step grey scales for Mantine's `gray` and `dark` colours (borders, hover fills, dimmed text). */
|
|
31
|
+
export const scales = {
|
|
32
|
+
gray: ['#f7f7f8', '#efeff1', '#e4e4e7', '#d4d4d8', '#a1a1aa', '#8b8b94', '#52525b', '#3f3f46', '#27272a', '#18181b'],
|
|
33
|
+
dark: ['#ededef', '#c8c8ce', '#a8a8b0', '#7c7c85', '#45454c', '#2c2c31', '#1f1f23', '#161618', '#121214', '#0f0f11'],
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Status colours. Fixed on purpose: no app and no theme changes what "failed" looks like, and the
|
|
38
|
+
* accent is never one of them. Each passes 4.5:1 as text on the surface of its theme.
|
|
39
|
+
*/
|
|
40
|
+
export const status = {
|
|
41
|
+
light: { ok: '#047857', warn: '#a16207', err: '#c81e1e', info: '#0e7490', off: '#6b6b75' },
|
|
42
|
+
dark: { ok: '#34d399', warn: '#fbbf24', err: '#f87171', info: '#22d3ee', off: '#80808a' },
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** The default accent where an app sets none: a quiet blue, so a missing accent is noticed. */
|
|
46
|
+
export const defaultAccent = { light: '#2563eb', dark: '#60a5fa' }
|
|
47
|
+
|
|
48
|
+
/** Spacing on a 4 px grid. */
|
|
49
|
+
export const space = { 0: '0', 1: '4px', 2: '8px', 3: '12px', 4: '16px', 5: '20px', 6: '24px', 8: '32px', 10: '40px', 12: '48px' }
|
|
50
|
+
|
|
51
|
+
/** Radii: buttons and inputs 8 px, cards 10 px. */
|
|
52
|
+
export const radius = { xs: '4px', sm: '6px', md: '8px', lg: '10px', xl: '16px', pill: '999px' }
|
|
53
|
+
|
|
54
|
+
export const font = {
|
|
55
|
+
sans: '"Geist", ui-sans-serif, system-ui, sans-serif',
|
|
56
|
+
mono: '"Geist Mono", ui-monospace, "SFMono-Regular", monospace',
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Type sizes. Body text is 15 px; apps scale all of them with --bnb-text (a user setting). */
|
|
60
|
+
export const fontSize = { xs: 12, sm: 13, md: 15, lg: 17, xl: 20, '2xl': 26, '3xl': 32 }
|
|
61
|
+
|
|
62
|
+
export const lineHeight = { tight: 1.2, normal: 1.5 }
|
|
63
|
+
|
|
64
|
+
export const shadow = {
|
|
65
|
+
light: {
|
|
66
|
+
sm: '0 1px 2px rgb(24 24 27 / 0.06)',
|
|
67
|
+
md: '0 2px 4px rgb(24 24 27 / 0.04), 0 12px 28px -12px rgb(24 24 27 / 0.16)',
|
|
68
|
+
lg: '0 24px 60px -20px rgb(24 24 27 / 0.28), 0 4px 14px -6px rgb(24 24 27 / 0.12)',
|
|
69
|
+
},
|
|
70
|
+
dark: {
|
|
71
|
+
sm: '0 1px 2px rgb(0 0 0 / 0.4)',
|
|
72
|
+
md: '0 2px 6px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.45)',
|
|
73
|
+
lg: '0 24px 60px rgb(0 0 0 / 0.55), 0 4px 14px rgb(0 0 0 / 0.35)',
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** The dot grid behind content (never behind the sidebar). */
|
|
78
|
+
export const dotGrid = { size: '20px', dot: '1px', light: 'rgb(24 24 27 / 0.09)', dark: 'rgb(255 255 255 / 0.06)' }
|
|
79
|
+
|
|
80
|
+
export const breakpoints = { xs: '36em', sm: '48em', md: '62em', lg: '75em', xl: '90em' }
|
|
81
|
+
|
|
82
|
+
export const tokens = { neutrals, scales, status, defaultAccent, space, radius, font, fontSize, lineHeight, shadow, dotGrid, breakpoints }
|
|
83
|
+
export default tokens
|
package/dist/tokens.json
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"neutrals": {
|
|
3
|
+
"light": {
|
|
4
|
+
"bg": "#f6f6f7",
|
|
5
|
+
"surface": "#ffffff",
|
|
6
|
+
"raised": "#efeff1",
|
|
7
|
+
"line": "#e0e0e4",
|
|
8
|
+
"fg": "#18181b",
|
|
9
|
+
"muted": "#52525b",
|
|
10
|
+
"faint": "#6b6b75"
|
|
11
|
+
},
|
|
12
|
+
"dark": {
|
|
13
|
+
"bg": "#0f0f11",
|
|
14
|
+
"surface": "#161618",
|
|
15
|
+
"raised": "#1f1f23",
|
|
16
|
+
"line": "#2c2c31",
|
|
17
|
+
"fg": "#ededef",
|
|
18
|
+
"muted": "#a1a1aa",
|
|
19
|
+
"faint": "#80808a"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"scales": {
|
|
23
|
+
"gray": [
|
|
24
|
+
"#f7f7f8",
|
|
25
|
+
"#efeff1",
|
|
26
|
+
"#e4e4e7",
|
|
27
|
+
"#d4d4d8",
|
|
28
|
+
"#a1a1aa",
|
|
29
|
+
"#8b8b94",
|
|
30
|
+
"#52525b",
|
|
31
|
+
"#3f3f46",
|
|
32
|
+
"#27272a",
|
|
33
|
+
"#18181b"
|
|
34
|
+
],
|
|
35
|
+
"dark": [
|
|
36
|
+
"#ededef",
|
|
37
|
+
"#c8c8ce",
|
|
38
|
+
"#a8a8b0",
|
|
39
|
+
"#7c7c85",
|
|
40
|
+
"#45454c",
|
|
41
|
+
"#2c2c31",
|
|
42
|
+
"#1f1f23",
|
|
43
|
+
"#161618",
|
|
44
|
+
"#121214",
|
|
45
|
+
"#0f0f11"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"status": {
|
|
49
|
+
"light": {
|
|
50
|
+
"ok": "#047857",
|
|
51
|
+
"warn": "#a16207",
|
|
52
|
+
"err": "#c81e1e",
|
|
53
|
+
"info": "#0e7490",
|
|
54
|
+
"off": "#6b6b75"
|
|
55
|
+
},
|
|
56
|
+
"dark": {
|
|
57
|
+
"ok": "#34d399",
|
|
58
|
+
"warn": "#fbbf24",
|
|
59
|
+
"err": "#f87171",
|
|
60
|
+
"info": "#22d3ee",
|
|
61
|
+
"off": "#80808a"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"defaultAccent": {
|
|
65
|
+
"light": "#2563eb",
|
|
66
|
+
"dark": "#60a5fa"
|
|
67
|
+
},
|
|
68
|
+
"space": {
|
|
69
|
+
"0": "0",
|
|
70
|
+
"1": "4px",
|
|
71
|
+
"2": "8px",
|
|
72
|
+
"3": "12px",
|
|
73
|
+
"4": "16px",
|
|
74
|
+
"5": "20px",
|
|
75
|
+
"6": "24px",
|
|
76
|
+
"8": "32px",
|
|
77
|
+
"10": "40px",
|
|
78
|
+
"12": "48px"
|
|
79
|
+
},
|
|
80
|
+
"radius": {
|
|
81
|
+
"xs": "4px",
|
|
82
|
+
"sm": "6px",
|
|
83
|
+
"md": "8px",
|
|
84
|
+
"lg": "10px",
|
|
85
|
+
"xl": "16px",
|
|
86
|
+
"pill": "999px"
|
|
87
|
+
},
|
|
88
|
+
"font": {
|
|
89
|
+
"sans": "\"Geist\", ui-sans-serif, system-ui, sans-serif",
|
|
90
|
+
"mono": "\"Geist Mono\", ui-monospace, \"SFMono-Regular\", monospace"
|
|
91
|
+
},
|
|
92
|
+
"fontSize": {
|
|
93
|
+
"xs": 12,
|
|
94
|
+
"sm": 13,
|
|
95
|
+
"md": 15,
|
|
96
|
+
"lg": 17,
|
|
97
|
+
"xl": 20,
|
|
98
|
+
"2xl": 26,
|
|
99
|
+
"3xl": 32
|
|
100
|
+
},
|
|
101
|
+
"lineHeight": {
|
|
102
|
+
"tight": 1.2,
|
|
103
|
+
"normal": 1.5
|
|
104
|
+
},
|
|
105
|
+
"shadow": {
|
|
106
|
+
"light": {
|
|
107
|
+
"sm": "0 1px 2px rgb(24 24 27 / 0.06)",
|
|
108
|
+
"md": "0 2px 4px rgb(24 24 27 / 0.04), 0 12px 28px -12px rgb(24 24 27 / 0.16)",
|
|
109
|
+
"lg": "0 24px 60px -20px rgb(24 24 27 / 0.28), 0 4px 14px -6px rgb(24 24 27 / 0.12)"
|
|
110
|
+
},
|
|
111
|
+
"dark": {
|
|
112
|
+
"sm": "0 1px 2px rgb(0 0 0 / 0.4)",
|
|
113
|
+
"md": "0 2px 6px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.45)",
|
|
114
|
+
"lg": "0 24px 60px rgb(0 0 0 / 0.55), 0 4px 14px rgb(0 0 0 / 0.35)"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"dotGrid": {
|
|
118
|
+
"size": "20px",
|
|
119
|
+
"dot": "1px",
|
|
120
|
+
"light": "rgb(24 24 27 / 0.09)",
|
|
121
|
+
"dark": "rgb(255 255 255 / 0.06)"
|
|
122
|
+
},
|
|
123
|
+
"breakpoints": {
|
|
124
|
+
"xs": "36em",
|
|
125
|
+
"sm": "48em",
|
|
126
|
+
"md": "62em",
|
|
127
|
+
"lg": "75em",
|
|
128
|
+
"xl": "90em"
|
|
129
|
+
}
|
|
130
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitsandbricks/tokens",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "BitsAndBricks design tokens: CSS variables and JSON for every app",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/bitsandbricks-ch/ui.git",
|
|
10
|
+
"directory": "packages/tokens"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public",
|
|
14
|
+
"registry": "https://registry.npmjs.org/"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./tokens.css": "./dist/tokens.css",
|
|
25
|
+
"./tokens.json": "./dist/tokens.json"
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": [
|
|
28
|
+
"*.css"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "node scripts/build.mjs",
|
|
32
|
+
"typecheck": "tsc --noEmit -p ."
|
|
33
|
+
}
|
|
6
34
|
}
|