@locusgraph/tokens 0.4.0 → 0.5.1
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/README.md +8 -2
- package/dist/base.css +4 -0
- package/dist/effects/brand.css +9 -2
- package/dist/effects/utilities.css +4 -5
- package/dist/theme.css +4 -2
- package/dist/values/colors.js +6 -6
- package/dist/values/type.d.ts +4 -4
- package/dist/values/type.js +4 -4
- package/dist/variables/mapping.css +4 -2
- package/dist/variables/palette.css +12 -8
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# @locusgraph/tokens
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@locusgraph/tokens) [](https://github.com/locusgraph/design/blob/master/LICENSE)
|
|
4
|
+
|
|
5
|
+
[Docs](https://design.locusgraph.com/theming) · [Source](https://github.com/locusgraph/design/tree/master/packages/tokens) · [All packages](https://github.com/locusgraph/design#packages)
|
|
6
|
+
|
|
3
7
|
The LocusGraph theme for Tailwind CSS 4, and the same values as TypeScript for places CSS cannot reach, such as email.
|
|
4
8
|
|
|
5
9
|
```bash
|
|
@@ -24,9 +28,11 @@ Everything the theme defines is prefixed with `locus`: variables are `--locus-*`
|
|
|
24
28
|
|
|
25
29
|
- Palette: `--locus-background` for the page, `--locus-surface` for cards and panels, `--locus-foreground`, `--locus-muted-foreground` and `--locus-faint` for text tones, `--locus-muted` for fills, and a dark set under `.dark`. Every text tone passes WCAG AA on background, surface and muted in both themes.
|
|
26
30
|
- Role colors: `interactive` (clickable, on hover), `memory` (remembered), `good`, `warn` (waiting) and `destructive`. Color means state; chart series `--locus-s1` to `--locus-s8` carry no meaning.
|
|
31
|
+
- Fill colors: `--locus-good-fill` and `--locus-warn-fill` (`bg-good-fill`, `bg-warn-fill`) for bars and meters. They are brighter than the role colors in light and equal to them in dark; never use them for text.
|
|
27
32
|
- Hairlines: `--locus-border` is the text color mixed into the surface, 9% light and 10% dark.
|
|
28
33
|
- Square containers: every radius token is 0. Buttons, chips, badges, dots and avatars use `rounded-full`.
|
|
29
|
-
- Fonts:
|
|
34
|
+
- Fonts: IBM Plex Sans for text, inputs and menus, Archivo for headings, `locus-eyebrow` labels, buttons and the brand, IBM Plex Mono for code and ids.
|
|
35
|
+
- Base: interactive elements (buttons, tabs, options, switches, `summary`, `label[for]`) get `cursor: pointer` unless disabled.
|
|
30
36
|
- Type scale: Tailwind's steps plus `text-2xs` (0.6875rem) for badges and counters and `text-code` (0.8125rem) for code.
|
|
31
37
|
- Control heights: `h-control-xs` (1.5rem), `h-control-sm` (2rem), `h-control` (2.25rem) and `h-control-lg` (2.5rem), also as `size-control-*`.
|
|
32
38
|
- Focus: `locus-focus-ring` draws a 2px ring outside the element; `locus-focus-ring-inset` draws it inside for rows, tabs and scroll areas.
|
|
@@ -64,7 +70,7 @@ color). Tailwind classes such as `bg-surface`, `text-soft`, `text-good`, `bg-btn
|
|
|
64
70
|
| `--s1` … `--s8`, `--good`, `--bad`, `--info`, `--warn` | `--locus-s1` … `--locus-s8`, `--locus-good`, `--locus-bad`, `--locus-info`, `--locus-warn` |
|
|
65
71
|
| `--skeleton`, `--scrim`, `--overlay-shadow`, `--radius` | `--locus-skeleton`, `--locus-scrim`, `--locus-overlay-shadow`, `--locus-radius` |
|
|
66
72
|
| `--sidebar`, `--sidebar-*`, `--chart-1` … `--chart-5` | `--locus-sidebar`, `--locus-sidebar-*`, `--locus-chart-1` … `--locus-chart-5` |
|
|
67
|
-
| `--font-
|
|
73
|
+
| `--font-ibm-plex-sans`, `--font-archivo`, `--font-ibm-plex-mono` | `--locus-font-ibm-plex-sans`, `--locus-font-archivo`, `--locus-font-ibm-plex-mono` |
|
|
68
74
|
| `--brand-glow`, `--brand-loop`, `--brand-grid-image`, `--brand-grid-size` | `--locus-brand-glow`, `--locus-brand-loop`, `--locus-brand-grid-image`, `--locus-brand-grid-size` |
|
|
69
75
|
| `--shimmer-spread`, `--shimmer-color`, `--shimmer-duration` | `--locus-shimmer-spread`, `--locus-shimmer-color`, `--locus-shimmer-duration` |
|
|
70
76
|
| `--scroll-fade-size`, `--scroll-fade-reveal` | `--locus-scroll-fade-size`, `--locus-scroll-fade-reveal` |
|
package/dist/base.css
CHANGED
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
:where(p) {
|
|
24
24
|
text-wrap: pretty;
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
:where(button, [role="button"], [role="tab"], [role="option"], [role="menuitem"], [role="switch"], [role="checkbox"], [role="radio"], summary, label[for], select):not(:disabled, [aria-disabled="true"], [data-disabled]) {
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
html {
|
package/dist/effects/brand.css
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--locus-brand-glow: #0099ff;
|
|
3
|
+
--locus-brand-glow-mix: 30%;
|
|
4
|
+
--locus-brand-glow-quiet-mix: 18%;
|
|
3
5
|
--locus-brand-loop: 7s;
|
|
4
6
|
--locus-brand-grid-image:
|
|
5
7
|
radial-gradient(circle, color-mix(in oklch, var(--locus-foreground) 7%, transparent) 1.5px, transparent 1.5px),
|
|
@@ -8,6 +10,11 @@
|
|
|
8
10
|
--locus-brand-grid-size: 24px 24px, 24px 24px, 24px 24px;
|
|
9
11
|
}
|
|
10
12
|
|
|
13
|
+
.dark {
|
|
14
|
+
--locus-brand-glow-mix: 16%;
|
|
15
|
+
--locus-brand-glow-quiet-mix: 9%;
|
|
16
|
+
}
|
|
17
|
+
|
|
11
18
|
.locus-brand-grid {
|
|
12
19
|
position: relative;
|
|
13
20
|
isolation: isolate;
|
|
@@ -37,7 +44,7 @@
|
|
|
37
44
|
aspect-ratio: 1;
|
|
38
45
|
transform: translate(-50%, -50%) scale(0.98);
|
|
39
46
|
transform-origin: center;
|
|
40
|
-
background: radial-gradient(circle, color-mix(in oklch, var(--locus-brand-glow)
|
|
47
|
+
background: radial-gradient(circle, color-mix(in oklch, var(--locus-brand-glow) var(--locus-brand-glow-mix), transparent), transparent 62%);
|
|
41
48
|
filter: blur(14px);
|
|
42
49
|
opacity: 0.55;
|
|
43
50
|
animation: locus-brand-grid-halo var(--locus-brand-loop) ease-in-out infinite;
|
|
@@ -97,7 +104,7 @@
|
|
|
97
104
|
width: min(40rem, 70%);
|
|
98
105
|
aspect-ratio: 1;
|
|
99
106
|
transform: translate(-50%, -50%);
|
|
100
|
-
background: radial-gradient(circle, color-mix(in oklch, var(--locus-brand-glow)
|
|
107
|
+
background: radial-gradient(circle, color-mix(in oklch, var(--locus-brand-glow) var(--locus-brand-glow-quiet-mix), transparent), transparent 66%);
|
|
101
108
|
opacity: 0.4;
|
|
102
109
|
}
|
|
103
110
|
|
|
@@ -56,11 +56,10 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
@utility locus-eyebrow {
|
|
59
|
-
font-family: var(--font-
|
|
60
|
-
font-size: var(--text-
|
|
61
|
-
line-height: var(--text-
|
|
62
|
-
|
|
63
|
-
text-transform: uppercase;
|
|
59
|
+
font-family: var(--font-heading);
|
|
60
|
+
font-size: var(--text-xs);
|
|
61
|
+
line-height: var(--text-xs--line-height);
|
|
62
|
+
font-weight: 500;
|
|
64
63
|
color: var(--locus-muted-foreground);
|
|
65
64
|
}
|
|
66
65
|
|
package/dist/theme.css
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
@import "@fontsource-variable/
|
|
1
|
+
@import "@fontsource-variable/ibm-plex-sans";
|
|
2
2
|
@import "@fontsource-variable/archivo";
|
|
3
|
-
@import "@fontsource-
|
|
3
|
+
@import "@fontsource/ibm-plex-mono/400.css";
|
|
4
|
+
@import "@fontsource/ibm-plex-mono/500.css";
|
|
5
|
+
@import "@fontsource/ibm-plex-mono/600.css";
|
|
4
6
|
@import "./variables/palette.css";
|
|
5
7
|
@import "./variables/mapping.css";
|
|
6
8
|
@import "./base.css";
|
package/dist/values/colors.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export const lightColors = {
|
|
2
2
|
surface: "#ffffff",
|
|
3
|
-
background: "#
|
|
3
|
+
background: "#f4f4f5",
|
|
4
4
|
foreground: "#09090b",
|
|
5
5
|
mutedForeground: "#52525b",
|
|
6
|
-
faint: "#
|
|
6
|
+
faint: "#636369",
|
|
7
7
|
btn: "#18181b",
|
|
8
8
|
btnInk: "#fafafa",
|
|
9
|
-
muted: "#
|
|
9
|
+
muted: "#ebebed",
|
|
10
10
|
interactive: "#1b66c4",
|
|
11
11
|
memory: "#4a3aa7",
|
|
12
|
-
good: "#
|
|
13
|
-
warn: "#
|
|
14
|
-
destructive: "#
|
|
12
|
+
good: "#137a39",
|
|
13
|
+
warn: "#a84b07",
|
|
14
|
+
destructive: "#c81e1e",
|
|
15
15
|
brandGlow: "#0099ff",
|
|
16
16
|
};
|
|
17
17
|
export const darkColors = {
|
package/dist/values/type.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const fonts: {
|
|
2
|
-
readonly sans: '"
|
|
2
|
+
readonly sans: '"IBM Plex Sans Variable", ui-sans-serif, system-ui, sans-serif';
|
|
3
3
|
readonly heading: '"Archivo Variable", ui-sans-serif, system-ui, sans-serif';
|
|
4
|
-
readonly mono: '"
|
|
5
|
-
readonly emailSafeSans: "
|
|
6
|
-
readonly emailSafeMono: "'
|
|
4
|
+
readonly mono: '"IBM Plex Mono", ui-monospace, monospace';
|
|
5
|
+
readonly emailSafeSans: "'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif";
|
|
6
|
+
readonly emailSafeMono: "'IBM Plex Mono', SFMono-Regular, Menlo, Consolas, monospace";
|
|
7
7
|
};
|
|
8
8
|
export declare const radius: {
|
|
9
9
|
readonly container: 0;
|
package/dist/values/type.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const fonts = {
|
|
2
|
-
sans: '"
|
|
2
|
+
sans: '"IBM Plex Sans Variable", ui-sans-serif, system-ui, sans-serif',
|
|
3
3
|
heading: '"Archivo Variable", ui-sans-serif, system-ui, sans-serif',
|
|
4
|
-
mono: '"
|
|
5
|
-
emailSafeSans: "
|
|
6
|
-
emailSafeMono: "'
|
|
4
|
+
mono: '"IBM Plex Mono", ui-monospace, monospace',
|
|
5
|
+
emailSafeSans: "'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif",
|
|
6
|
+
emailSafeMono: "'IBM Plex Mono', SFMono-Regular, Menlo, Consolas, monospace",
|
|
7
7
|
};
|
|
8
8
|
export const radius = { container: 0, pill: 9999 };
|
|
9
9
|
export const headingTracking = "-0.02em";
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
--color-memory: var(--locus-memory);
|
|
10
10
|
--color-good: var(--locus-good);
|
|
11
11
|
--color-warn: var(--locus-warn);
|
|
12
|
+
--color-good-fill: var(--locus-good-fill);
|
|
13
|
+
--color-warn-fill: var(--locus-warn-fill);
|
|
12
14
|
--color-border: var(--locus-border);
|
|
13
15
|
--color-input: var(--locus-input);
|
|
14
16
|
--color-skeleton: var(--locus-skeleton);
|
|
@@ -36,9 +38,9 @@
|
|
|
36
38
|
--color-sidebar-accent-foreground: var(--locus-sidebar-accent-foreground);
|
|
37
39
|
--color-sidebar-border: var(--locus-sidebar-border);
|
|
38
40
|
--color-sidebar-ring: var(--locus-sidebar-ring);
|
|
39
|
-
--font-sans: var(--locus-font-
|
|
41
|
+
--font-sans: var(--locus-font-ibm-plex-sans);
|
|
40
42
|
--font-heading: var(--locus-font-archivo);
|
|
41
|
-
--font-mono: var(--locus-font-
|
|
43
|
+
--font-mono: var(--locus-font-ibm-plex-mono);
|
|
42
44
|
--font-brand: var(--locus-font-archivo);
|
|
43
45
|
--shadow-overlay: var(--locus-overlay-shadow);
|
|
44
46
|
--text-2xs: 0.6875rem;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--locus-surface: #ffffff;
|
|
3
|
-
--locus-background: #
|
|
3
|
+
--locus-background: #f4f4f5;
|
|
4
4
|
--locus-foreground: #09090b;
|
|
5
5
|
--locus-border: color-mix(in oklch, var(--locus-foreground) 9%, var(--locus-surface));
|
|
6
6
|
--locus-muted-foreground: #52525b;
|
|
7
|
-
--locus-faint: #
|
|
7
|
+
--locus-faint: #636369;
|
|
8
8
|
--locus-btn: #18181b;
|
|
9
9
|
--locus-btn-ink: #fafafa;
|
|
10
|
-
--locus-muted: #
|
|
10
|
+
--locus-muted: #ebebed;
|
|
11
11
|
--locus-s1: #2a78d6;
|
|
12
12
|
--locus-s2: #eb6834;
|
|
13
13
|
--locus-s3: #1baf7a;
|
|
@@ -18,9 +18,11 @@
|
|
|
18
18
|
--locus-s8: #e34948;
|
|
19
19
|
--locus-interactive: #1b66c4;
|
|
20
20
|
--locus-memory: #4a3aa7;
|
|
21
|
-
--locus-good: #
|
|
22
|
-
--locus-warn: #
|
|
23
|
-
--locus-destructive: #
|
|
21
|
+
--locus-good: #137a39;
|
|
22
|
+
--locus-warn: #a84b07;
|
|
23
|
+
--locus-destructive: #c81e1e;
|
|
24
|
+
--locus-good-fill: #16a34a;
|
|
25
|
+
--locus-warn-fill: var(--locus-s4);
|
|
24
26
|
--locus-destructive-foreground: #ffffff;
|
|
25
27
|
--locus-popover: var(--locus-surface);
|
|
26
28
|
--locus-input: color-mix(in oklch, var(--locus-foreground) 26%, var(--locus-surface));
|
|
@@ -37,9 +39,9 @@
|
|
|
37
39
|
--locus-sidebar-accent-foreground: var(--locus-foreground);
|
|
38
40
|
--locus-sidebar-border: var(--locus-border);
|
|
39
41
|
--locus-sidebar-ring: var(--locus-interactive);
|
|
40
|
-
--locus-font-
|
|
42
|
+
--locus-font-ibm-plex-sans: "IBM Plex Sans Variable", ui-sans-serif, system-ui, sans-serif;
|
|
41
43
|
--locus-font-archivo: "Archivo Variable", ui-sans-serif, system-ui, sans-serif;
|
|
42
|
-
--locus-font-
|
|
44
|
+
--locus-font-ibm-plex-mono: "IBM Plex Mono", ui-monospace, monospace;
|
|
43
45
|
--locus-chart-1: var(--locus-s1);
|
|
44
46
|
--locus-chart-2: var(--locus-s2);
|
|
45
47
|
--locus-chart-3: var(--locus-s3);
|
|
@@ -70,6 +72,8 @@
|
|
|
70
72
|
--locus-good: #0ca30c;
|
|
71
73
|
--locus-warn: #e0a400;
|
|
72
74
|
--locus-destructive: #e66767;
|
|
75
|
+
--locus-good-fill: var(--locus-good);
|
|
76
|
+
--locus-warn-fill: var(--locus-warn);
|
|
73
77
|
--locus-destructive-foreground: #0a0a0a;
|
|
74
78
|
--locus-input: color-mix(in oklch, var(--locus-foreground) 24%, var(--locus-surface));
|
|
75
79
|
--locus-skeleton: color-mix(in oklch, var(--locus-foreground) 11%, var(--locus-surface));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusgraph/tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "LocusGraph design tokens: theme CSS for Tailwind v4, typography, brand effects and motion, plus the color and type values for places CSS cannot reach.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@fontsource-variable/archivo": "^5.3.0",
|
|
35
|
-
"@fontsource
|
|
36
|
-
"@fontsource-variable/
|
|
35
|
+
"@fontsource/ibm-plex-mono": "5.3.0",
|
|
36
|
+
"@fontsource-variable/ibm-plex-sans": "^5.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@locusgraph/config": "0.1.
|
|
39
|
+
"@locusgraph/config": "0.1.2",
|
|
40
40
|
"@types/node": "^22.0.0",
|
|
41
41
|
"typescript": "^7.0.2",
|
|
42
42
|
"vitest": "^5.0.3"
|