@handamade/psi-tokens 0.3.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/README.md +48 -0
- package/dist/acme.css +47 -0
- package/dist/base.css +92 -0
- package/dist/components/button.vars.css +39 -0
- package/dist/components/card.vars.css +8 -0
- package/dist/components/checkbox.vars.css +11 -0
- package/dist/components/input.vars.css +11 -0
- package/dist/components/media.vars.css +5 -0
- package/dist/components/navbar.vars.css +8 -0
- package/dist/components/select.vars.css +12 -0
- package/dist/components/switch.vars.css +9 -0
- package/dist/components/tag.vars.css +25 -0
- package/dist/components/tooltip.vars.css +6 -0
- package/dist/components.css +143 -0
- package/dist/dark.css +47 -0
- package/dist/dtcg/acme.json +635 -0
- package/dist/dtcg/dark.json +635 -0
- package/dist/dtcg/ember.json +635 -0
- package/dist/dtcg/light.json +635 -0
- package/dist/ember.css +58 -0
- package/dist/guidance.json +129 -0
- package/dist/light.css +47 -0
- package/dist/resolved/acme.json +614 -0
- package/dist/resolved/dark.json +614 -0
- package/dist/resolved/ember.json +614 -0
- package/dist/resolved/light.json +614 -0
- package/dist/types/index.d.ts +65 -0
- package/dist/types/index.js +1 -0
- package/dist/utilities.css +169 -0
- package/llms.txt +46 -0
- package/package.json +32 -0
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# @handamade/psi-tokens
|
|
2
|
+
|
|
3
|
+
OKLCH formula-based design tokens. Code is the source of truth; all artifacts are generated.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
**In workspace:** use `pnpm install` at the root. **@handamade/psi-tokens** is a local workspace dependency.
|
|
8
|
+
|
|
9
|
+
**External packages:** install from the private registry with your configured credentials.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Import tokens in your app's stylesheet:
|
|
14
|
+
|
|
15
|
+
```css
|
|
16
|
+
@import "@handamade/psi-tokens/base.css";
|
|
17
|
+
@import "@handamade/psi-tokens/light.css"; /* or dark.css, acme.css */
|
|
18
|
+
@import "@handamade/psi-tokens/components.css";
|
|
19
|
+
@import "@handamade/psi-tokens/utilities.css";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then set the theme on your root element:
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<html data-psi-theme="light">
|
|
26
|
+
<!-- your app -->
|
|
27
|
+
</html>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
All tokens are CSS custom properties: `--psi-bg-primary`, `--psi-fg-secondary`, `--psi-space-12`, etc.
|
|
31
|
+
|
|
32
|
+
**utilities.css is required**: it carries `.psi-container`, `.psi-text-*`, `.psi-display-*` utility classes and the `prefers-reduced-motion` zeroing for all duration tokens (D30) — required for NavBar rendering and accessibility compliance.
|
|
33
|
+
|
|
34
|
+
## Creating a custom theme
|
|
35
|
+
|
|
36
|
+
Run `pnpm new-theme` to scaffold a customer brand theme (palette + slot mapping).
|
|
37
|
+
|
|
38
|
+
## Machine-readable artifacts
|
|
39
|
+
|
|
40
|
+
For AI and tooling, see [llms.txt](./llms.txt):
|
|
41
|
+
- `dist/resolved/{light,dark,acme}.json` — Every token with OKLCH, hex, and formula
|
|
42
|
+
- `dist/guidance.json` — Variant intent, usage rules, state derivation
|
|
43
|
+
- `dist/dtcg/{theme}.json` — W3C DTCG format export
|
|
44
|
+
- `dist/components/{name}.vars.css` — Component-specific token declarations
|
|
45
|
+
|
|
46
|
+
## Note
|
|
47
|
+
|
|
48
|
+
All files in `dist/` are generated. Never hand-edit. Modify `src/` and rebuild.
|
package/dist/acme.css
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@layer psi.theme {
|
|
2
|
+
[data-psi-theme="acme"] {
|
|
3
|
+
--psi-palette-charcoal: oklch(0.22 0.015 30);
|
|
4
|
+
--psi-palette-cream: oklch(0.96 0.01 80);
|
|
5
|
+
--psi-palette-coral: oklch(0.55 0.2 30);
|
|
6
|
+
--psi-palette-mint: oklch(0.52 0.1176 160);
|
|
7
|
+
--psi-palette-gold: oklch(0.78 0.15 85);
|
|
8
|
+
--psi-palette-crimson: oklch(0.55 0.22 15);
|
|
9
|
+
--psi-palette-white: oklch(1 0 0);
|
|
10
|
+
--psi-palette-black: oklch(0 0 0);
|
|
11
|
+
--psi-bg-primary: var(--psi-palette-cream);
|
|
12
|
+
--psi-bg-secondary: oklch(from var(--psi-palette-cream) calc(l + 0.03) c h);
|
|
13
|
+
--psi-fg-primary: oklch(from var(--psi-palette-charcoal) 0.3 0.03 h);
|
|
14
|
+
--psi-fg-secondary: oklch(from var(--psi-fg-primary) l c h / 0.7);
|
|
15
|
+
--psi-fg-tertiary: oklch(from var(--psi-fg-primary) l c h / 0.5);
|
|
16
|
+
--psi-fg-quaternary: oklch(from var(--psi-fg-primary) l c h / 0.3);
|
|
17
|
+
--psi-fg-primary-inverted: var(--psi-palette-cream);
|
|
18
|
+
--psi-fg-static-white: oklch(from var(--psi-palette-cream) 1 0 h);
|
|
19
|
+
--psi-fg-static-black: oklch(from var(--psi-palette-charcoal) 0.25 min(c, 0.03) h);
|
|
20
|
+
--psi-fg-on-accent: var(--psi-fg-static-white);
|
|
21
|
+
--psi-fg-accent: oklch(from var(--psi-palette-coral) 0.48 min(c, 0.23) h);
|
|
22
|
+
--psi-fg-success: oklch(from var(--psi-palette-mint) 0.48 min(c, 0.1086) h);
|
|
23
|
+
--psi-fg-warning: oklch(from var(--psi-palette-gold) 0.48 min(c, 0.0984) h);
|
|
24
|
+
--psi-fg-danger: oklch(from var(--psi-palette-crimson) 0.48 min(c, 0.1919) h);
|
|
25
|
+
--psi-fill-neutral1: oklch(from var(--psi-palette-cream) calc(l + 0.016) calc(c - 0.001) h);
|
|
26
|
+
--psi-fill-neutral2: var(--psi-palette-cream);
|
|
27
|
+
--psi-fill-neutral3: oklch(from var(--psi-palette-cream) calc(l - 0.017) calc(c + 0.001) h);
|
|
28
|
+
--psi-fill-neutral4: oklch(from var(--psi-palette-cream) calc(l - 0.034) calc(c + 0.002) h);
|
|
29
|
+
--psi-fill-neutral5: oklch(from var(--psi-palette-cream) calc(l - 0.032) calc(c + 0.003) h);
|
|
30
|
+
--psi-fill-neutral6: oklch(from var(--psi-palette-cream) calc(l - 0.048) calc(c + 0.004) h);
|
|
31
|
+
--psi-fill-accent: var(--psi-palette-coral);
|
|
32
|
+
--psi-fill-success: oklch(from var(--psi-palette-mint) l min(c, 0.1285) h);
|
|
33
|
+
--psi-fill-warning: var(--psi-palette-gold);
|
|
34
|
+
--psi-fill-danger: var(--psi-palette-crimson);
|
|
35
|
+
--psi-fill-tint-accent: oklch(from var(--psi-fg-accent) l c h / 0.12);
|
|
36
|
+
--psi-fill-tint-success: oklch(from var(--psi-fg-success) l c h / 0.12);
|
|
37
|
+
--psi-fill-tint-warning: oklch(from var(--psi-fg-warning) l c h / 0.12);
|
|
38
|
+
--psi-fill-tint-danger: oklch(from var(--psi-fg-danger) l c h / 0.12);
|
|
39
|
+
--psi-border-faint: oklch(from var(--psi-fg-primary) l c h / 0.08);
|
|
40
|
+
--psi-border-neutral: oklch(from var(--psi-fg-primary) l c h / 0.15);
|
|
41
|
+
--psi-border-strong: oklch(from var(--psi-fg-primary) l c h / 0.3);
|
|
42
|
+
--psi-border-focus: var(--psi-fg-accent);
|
|
43
|
+
--psi-scrim-soft: oklch(from var(--psi-bg-primary) l c h / 0.25);
|
|
44
|
+
--psi-scrim-medium: oklch(from var(--psi-bg-primary) l c h / 0.35);
|
|
45
|
+
--psi-scrim-heavy: oklch(from var(--psi-bg-primary) l c h / 0.82);
|
|
46
|
+
}
|
|
47
|
+
}
|
package/dist/base.css
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@layer psi.base, psi.theme, psi.components, psi.utilities;
|
|
2
|
+
|
|
3
|
+
@layer psi.base {
|
|
4
|
+
:root {
|
|
5
|
+
--psi-palette-obsidian: oklch(0.25 0.02 250);
|
|
6
|
+
--psi-palette-platinum: oklch(0.95 0.005 250);
|
|
7
|
+
--psi-palette-sapphire: oklch(0.55 0.21 260);
|
|
8
|
+
--psi-palette-ruby: oklch(0.55 0.22 25);
|
|
9
|
+
--psi-palette-amber: oklch(0.75 0.1582 75);
|
|
10
|
+
--psi-palette-emerald: oklch(0.52 0.19 155);
|
|
11
|
+
--psi-palette-white: oklch(1 0 0);
|
|
12
|
+
--psi-palette-black: oklch(0 0 0);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@layer psi.base {
|
|
17
|
+
:root {
|
|
18
|
+
--psi-space-0: 0;
|
|
19
|
+
--psi-space-2: 0.125rem;
|
|
20
|
+
--psi-space-4: 0.25rem;
|
|
21
|
+
--psi-space-6: 0.375rem;
|
|
22
|
+
--psi-space-8: 0.5rem;
|
|
23
|
+
--psi-space-12: 0.75rem;
|
|
24
|
+
--psi-space-16: 1rem;
|
|
25
|
+
--psi-space-20: 1.25rem;
|
|
26
|
+
--psi-space-24: 1.5rem;
|
|
27
|
+
--psi-space-32: 2rem;
|
|
28
|
+
--psi-space-40: 2.5rem;
|
|
29
|
+
--psi-space-48: 3rem;
|
|
30
|
+
--psi-space-64: 4rem;
|
|
31
|
+
--psi-space-80: 5rem;
|
|
32
|
+
--psi-space-96: 6rem;
|
|
33
|
+
--psi-space-120: 7.5rem;
|
|
34
|
+
--psi-space-144: 9rem;
|
|
35
|
+
|
|
36
|
+
--psi-size-24: 1.5rem;
|
|
37
|
+
--psi-size-32: 2rem;
|
|
38
|
+
--psi-size-40: 2.5rem;
|
|
39
|
+
--psi-size-48: 3rem;
|
|
40
|
+
|
|
41
|
+
--psi-radius-4: 0.25rem;
|
|
42
|
+
--psi-radius-6: 0.375rem;
|
|
43
|
+
--psi-radius-8: 0.5rem;
|
|
44
|
+
--psi-radius-12: 0.75rem;
|
|
45
|
+
--psi-radius-full: 9999px;
|
|
46
|
+
|
|
47
|
+
--psi-text-12-16-regular: 400 0.75rem/1rem var(--psi-font-sans);
|
|
48
|
+
--psi-text-12-16-medium: 500 0.75rem/1rem var(--psi-font-sans);
|
|
49
|
+
--psi-text-14-20-regular: 400 0.875rem/1.25rem var(--psi-font-sans);
|
|
50
|
+
--psi-text-14-20-medium: 500 0.875rem/1.25rem var(--psi-font-sans);
|
|
51
|
+
--psi-text-16-20-regular: 400 1rem/1.25rem var(--psi-font-sans);
|
|
52
|
+
--psi-text-16-24-regular: 400 1rem/1.5rem var(--psi-font-sans);
|
|
53
|
+
--psi-text-16-24-medium: 500 1rem/1.5rem var(--psi-font-sans);
|
|
54
|
+
--psi-text-18-28-medium: 500 1.125rem/1.75rem var(--psi-font-sans);
|
|
55
|
+
--psi-text-20-28-semibold: 600 1.25rem/1.75rem var(--psi-font-sans);
|
|
56
|
+
--psi-text-24-32-medium: 500 1.5rem/2rem var(--psi-font-sans);
|
|
57
|
+
--psi-text-30-36-bold: 700 1.875rem/2.25rem var(--psi-font-sans);
|
|
58
|
+
--psi-text-serif-18-28-regular: 400 1.125rem/1.75rem var(--psi-font-serif);
|
|
59
|
+
--psi-text-serif-20-30-regular: 400 1.25rem/1.875rem var(--psi-font-serif);
|
|
60
|
+
--psi-text-serif-20-32-regular: 400 1.25rem/2rem var(--psi-font-serif);
|
|
61
|
+
--psi-text-serif-24-36-regular: 400 1.5rem/2.25rem var(--psi-font-serif);
|
|
62
|
+
--psi-text-serif-28-40-regular: 400 1.75rem/2.5rem var(--psi-font-serif);
|
|
63
|
+
--psi-text-mono-13-20-regular: 400 0.8125rem/1.25rem var(--psi-font-mono);
|
|
64
|
+
--psi-text-mono-14-20-regular: 400 0.875rem/1.25rem var(--psi-font-mono);
|
|
65
|
+
--psi-text-mono-15-24-regular: 400 0.9375rem/1.5rem var(--psi-font-mono);
|
|
66
|
+
--psi-text-mono-15-24-medium: 500 0.9375rem/1.5rem var(--psi-font-mono);
|
|
67
|
+
|
|
68
|
+
--psi-display-56-128-black: 900 clamp(3.5rem, 9vw, 8rem)/0.95 var(--psi-font-display);
|
|
69
|
+
--psi-display-36-64-black: 900 clamp(2.25rem, 5vw, 4rem)/1.05 var(--psi-font-display);
|
|
70
|
+
--psi-display-32-32-extrabold: 800 2rem/1.1 var(--psi-font-display);
|
|
71
|
+
|
|
72
|
+
--psi-duration-150: 150ms;
|
|
73
|
+
--psi-duration-200: 200ms;
|
|
74
|
+
--psi-duration-350: 350ms;
|
|
75
|
+
--psi-duration-450: 450ms;
|
|
76
|
+
--psi-duration-600: 600ms;
|
|
77
|
+
--psi-ease-standard: ease;
|
|
78
|
+
--psi-ease-in-out: ease-in-out;
|
|
79
|
+
--psi-ease-soft: cubic-bezier(0.2, 0.6, 0.2, 1);
|
|
80
|
+
|
|
81
|
+
--psi-container-max: 82rem;
|
|
82
|
+
--psi-gutter: 2.5rem;
|
|
83
|
+
--psi-z-nav: 100;
|
|
84
|
+
--psi-z-overlay: 1000;
|
|
85
|
+
--psi-z-tooltip: 1100;
|
|
86
|
+
|
|
87
|
+
--psi-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
|
88
|
+
--psi-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
89
|
+
--psi-font-serif: Georgia, "Times New Roman", Times, serif;
|
|
90
|
+
--psi-font-display: var(--psi-font-sans);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@layer psi.components {
|
|
2
|
+
:where(:root, [data-psi-theme]) {
|
|
3
|
+
--psi-button-accent-bg: var(--psi-fill-accent);
|
|
4
|
+
--psi-button-accent-bg-hover: oklch(from var(--psi-button-accent-bg) calc(l - 0.04) c h);
|
|
5
|
+
--psi-button-accent-bg-active: oklch(from var(--psi-button-accent-bg) calc(l - 0.08) c h);
|
|
6
|
+
--psi-button-accent-fg: var(--psi-fg-on-accent);
|
|
7
|
+
--psi-button-accent-subtle-bg: var(--psi-fill-tint-accent);
|
|
8
|
+
--psi-button-accent-subtle-bg-hover: oklch(from var(--psi-button-accent-subtle-bg) l c h / 0.18);
|
|
9
|
+
--psi-button-accent-subtle-bg-active: oklch(from var(--psi-button-accent-subtle-bg) l c h / 0.24);
|
|
10
|
+
--psi-button-accent-subtle-fg: var(--psi-fg-accent);
|
|
11
|
+
--psi-button-neutral-bg: var(--psi-fill-neutral3);
|
|
12
|
+
--psi-button-neutral-bg-hover: oklch(from var(--psi-button-neutral-bg) calc(l - 0.04) c h);
|
|
13
|
+
--psi-button-neutral-bg-active: oklch(from var(--psi-button-neutral-bg) calc(l - 0.08) c h);
|
|
14
|
+
--psi-button-neutral-fg: var(--psi-fg-primary);
|
|
15
|
+
--psi-button-neutral-subtle-bg: var(--psi-fill-neutral1);
|
|
16
|
+
--psi-button-neutral-subtle-bg-hover: oklch(from var(--psi-button-neutral-subtle-bg) calc(l - 0.04) c h);
|
|
17
|
+
--psi-button-neutral-subtle-bg-active: oklch(from var(--psi-button-neutral-subtle-bg) calc(l - 0.08) c h);
|
|
18
|
+
--psi-button-neutral-subtle-fg: var(--psi-fg-primary);
|
|
19
|
+
--psi-button-ghost-bg: transparent;
|
|
20
|
+
--psi-button-ghost-bg-hover: var(--psi-fill-neutral3);
|
|
21
|
+
--psi-button-ghost-bg-active: var(--psi-fill-neutral4);
|
|
22
|
+
--psi-button-ghost-fg: var(--psi-fg-primary);
|
|
23
|
+
--psi-button-danger-bg: var(--psi-fill-danger);
|
|
24
|
+
--psi-button-danger-bg-hover: oklch(from var(--psi-button-danger-bg) calc(l - 0.04) c h);
|
|
25
|
+
--psi-button-danger-bg-active: oklch(from var(--psi-button-danger-bg) calc(l - 0.08) c h);
|
|
26
|
+
--psi-button-danger-fg: var(--psi-fg-static-white);
|
|
27
|
+
--psi-button-danger-subtle-bg: var(--psi-fill-tint-danger);
|
|
28
|
+
--psi-button-danger-subtle-bg-hover: oklch(from var(--psi-button-danger-subtle-bg) l c h / 0.18);
|
|
29
|
+
--psi-button-danger-subtle-bg-active: oklch(from var(--psi-button-danger-subtle-bg) l c h / 0.24);
|
|
30
|
+
--psi-button-danger-subtle-fg: var(--psi-fg-danger);
|
|
31
|
+
--psi-button-outline-bg: transparent;
|
|
32
|
+
--psi-button-outline-bg-hover: var(--psi-fill-accent);
|
|
33
|
+
--psi-button-outline-bg-active: oklch(from var(--psi-fill-accent) calc(l - 0.04) c h);
|
|
34
|
+
--psi-button-outline-fg: var(--psi-fg-primary);
|
|
35
|
+
--psi-button-outline-fg-hover: var(--psi-button-accent-fg);
|
|
36
|
+
--psi-button-outline-border: var(--psi-border-strong);
|
|
37
|
+
--psi-button-focus-ring: var(--psi-border-focus);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@layer psi.components {
|
|
2
|
+
:where(:root, [data-psi-theme]) {
|
|
3
|
+
--psi-checkbox-fg: var(--psi-fg-primary);
|
|
4
|
+
--psi-checkbox-box-bg: var(--psi-bg-primary);
|
|
5
|
+
--psi-checkbox-box-border: var(--psi-border-neutral);
|
|
6
|
+
--psi-checkbox-box-bg-checked: var(--psi-fill-accent);
|
|
7
|
+
--psi-checkbox-box-border-checked: var(--psi-fill-accent);
|
|
8
|
+
--psi-checkbox-check-fg: var(--psi-fg-on-accent);
|
|
9
|
+
--psi-checkbox-focus-ring: var(--psi-border-focus);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@layer psi.components {
|
|
2
|
+
:where(:root, [data-psi-theme]) {
|
|
3
|
+
--psi-input-bg: var(--psi-bg-primary);
|
|
4
|
+
--psi-input-fg: var(--psi-fg-primary);
|
|
5
|
+
--psi-input-placeholder: var(--psi-fg-tertiary);
|
|
6
|
+
--psi-input-border: var(--psi-border-neutral);
|
|
7
|
+
--psi-input-border-hover: var(--psi-border-strong);
|
|
8
|
+
--psi-input-border-error: var(--psi-fg-danger);
|
|
9
|
+
--psi-input-focus-ring: var(--psi-border-focus);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@layer psi.components {
|
|
2
|
+
:where(:root, [data-psi-theme]) {
|
|
3
|
+
--psi-select-bg: var(--psi-bg-primary);
|
|
4
|
+
--psi-select-fg: var(--psi-fg-primary);
|
|
5
|
+
--psi-select-placeholder: var(--psi-fg-tertiary);
|
|
6
|
+
--psi-select-border: var(--psi-border-neutral);
|
|
7
|
+
--psi-select-border-hover: var(--psi-border-strong);
|
|
8
|
+
--psi-select-border-error: var(--psi-fg-danger);
|
|
9
|
+
--psi-select-focus-ring: var(--psi-border-focus);
|
|
10
|
+
--psi-select-chevron-fg: var(--psi-fg-secondary);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@layer psi.components {
|
|
2
|
+
:where(:root, [data-psi-theme]) {
|
|
3
|
+
--psi-switch-fg: var(--psi-fg-primary);
|
|
4
|
+
--psi-switch-track-bg: var(--psi-fill-neutral4);
|
|
5
|
+
--psi-switch-track-bg-checked: var(--psi-fill-accent);
|
|
6
|
+
--psi-switch-thumb-bg: var(--psi-fg-static-white);
|
|
7
|
+
--psi-switch-focus-ring: var(--psi-border-focus);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@layer psi.components {
|
|
2
|
+
:where(:root, [data-psi-theme]) {
|
|
3
|
+
--psi-tag-neutral-bg: var(--psi-fill-neutral3);
|
|
4
|
+
--psi-tag-neutral-fg: var(--psi-fg-primary);
|
|
5
|
+
--psi-tag-accent-bg: var(--psi-fill-accent);
|
|
6
|
+
--psi-tag-accent-fg: var(--psi-fg-on-accent);
|
|
7
|
+
--psi-tag-success-bg: var(--psi-fill-success);
|
|
8
|
+
--psi-tag-success-fg: var(--psi-fg-static-white);
|
|
9
|
+
--psi-tag-warning-bg: var(--psi-fill-warning);
|
|
10
|
+
--psi-tag-warning-fg: var(--psi-fg-static-black);
|
|
11
|
+
--psi-tag-danger-bg: var(--psi-fill-danger);
|
|
12
|
+
--psi-tag-danger-fg: var(--psi-fg-static-white);
|
|
13
|
+
--psi-tag-neutral-subtle-bg: var(--psi-fill-neutral2);
|
|
14
|
+
--psi-tag-neutral-subtle-fg: var(--psi-fg-secondary);
|
|
15
|
+
--psi-tag-accent-subtle-bg: var(--psi-fill-tint-accent);
|
|
16
|
+
--psi-tag-accent-subtle-fg: var(--psi-fg-accent);
|
|
17
|
+
--psi-tag-success-subtle-bg: var(--psi-fill-tint-success);
|
|
18
|
+
--psi-tag-success-subtle-fg: var(--psi-fg-success);
|
|
19
|
+
--psi-tag-warning-subtle-bg: var(--psi-fill-tint-warning);
|
|
20
|
+
--psi-tag-warning-subtle-fg: var(--psi-fg-warning);
|
|
21
|
+
--psi-tag-danger-subtle-bg: var(--psi-fill-tint-danger);
|
|
22
|
+
--psi-tag-danger-subtle-fg: var(--psi-fg-danger);
|
|
23
|
+
--psi-tag-focus-ring: var(--psi-border-focus);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
@layer psi.components {
|
|
2
|
+
:where(:root, [data-psi-theme]) {
|
|
3
|
+
--psi-button-accent-bg: var(--psi-fill-accent);
|
|
4
|
+
--psi-button-accent-bg-hover: oklch(from var(--psi-button-accent-bg) calc(l - 0.04) c h);
|
|
5
|
+
--psi-button-accent-bg-active: oklch(from var(--psi-button-accent-bg) calc(l - 0.08) c h);
|
|
6
|
+
--psi-button-accent-fg: var(--psi-fg-on-accent);
|
|
7
|
+
--psi-button-accent-subtle-bg: var(--psi-fill-tint-accent);
|
|
8
|
+
--psi-button-accent-subtle-bg-hover: oklch(from var(--psi-button-accent-subtle-bg) l c h / 0.18);
|
|
9
|
+
--psi-button-accent-subtle-bg-active: oklch(from var(--psi-button-accent-subtle-bg) l c h / 0.24);
|
|
10
|
+
--psi-button-accent-subtle-fg: var(--psi-fg-accent);
|
|
11
|
+
--psi-button-neutral-bg: var(--psi-fill-neutral3);
|
|
12
|
+
--psi-button-neutral-bg-hover: oklch(from var(--psi-button-neutral-bg) calc(l - 0.04) c h);
|
|
13
|
+
--psi-button-neutral-bg-active: oklch(from var(--psi-button-neutral-bg) calc(l - 0.08) c h);
|
|
14
|
+
--psi-button-neutral-fg: var(--psi-fg-primary);
|
|
15
|
+
--psi-button-neutral-subtle-bg: var(--psi-fill-neutral1);
|
|
16
|
+
--psi-button-neutral-subtle-bg-hover: oklch(from var(--psi-button-neutral-subtle-bg) calc(l - 0.04) c h);
|
|
17
|
+
--psi-button-neutral-subtle-bg-active: oklch(from var(--psi-button-neutral-subtle-bg) calc(l - 0.08) c h);
|
|
18
|
+
--psi-button-neutral-subtle-fg: var(--psi-fg-primary);
|
|
19
|
+
--psi-button-ghost-bg: transparent;
|
|
20
|
+
--psi-button-ghost-bg-hover: var(--psi-fill-neutral3);
|
|
21
|
+
--psi-button-ghost-bg-active: var(--psi-fill-neutral4);
|
|
22
|
+
--psi-button-ghost-fg: var(--psi-fg-primary);
|
|
23
|
+
--psi-button-danger-bg: var(--psi-fill-danger);
|
|
24
|
+
--psi-button-danger-bg-hover: oklch(from var(--psi-button-danger-bg) calc(l - 0.04) c h);
|
|
25
|
+
--psi-button-danger-bg-active: oklch(from var(--psi-button-danger-bg) calc(l - 0.08) c h);
|
|
26
|
+
--psi-button-danger-fg: var(--psi-fg-static-white);
|
|
27
|
+
--psi-button-danger-subtle-bg: var(--psi-fill-tint-danger);
|
|
28
|
+
--psi-button-danger-subtle-bg-hover: oklch(from var(--psi-button-danger-subtle-bg) l c h / 0.18);
|
|
29
|
+
--psi-button-danger-subtle-bg-active: oklch(from var(--psi-button-danger-subtle-bg) l c h / 0.24);
|
|
30
|
+
--psi-button-danger-subtle-fg: var(--psi-fg-danger);
|
|
31
|
+
--psi-button-outline-bg: transparent;
|
|
32
|
+
--psi-button-outline-bg-hover: var(--psi-fill-accent);
|
|
33
|
+
--psi-button-outline-bg-active: oklch(from var(--psi-fill-accent) calc(l - 0.04) c h);
|
|
34
|
+
--psi-button-outline-fg: var(--psi-fg-primary);
|
|
35
|
+
--psi-button-outline-fg-hover: var(--psi-button-accent-fg);
|
|
36
|
+
--psi-button-outline-border: var(--psi-border-strong);
|
|
37
|
+
--psi-button-focus-ring: var(--psi-border-focus);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@layer psi.components {
|
|
42
|
+
:where(:root, [data-psi-theme]) {
|
|
43
|
+
--psi-input-bg: var(--psi-bg-primary);
|
|
44
|
+
--psi-input-fg: var(--psi-fg-primary);
|
|
45
|
+
--psi-input-placeholder: var(--psi-fg-tertiary);
|
|
46
|
+
--psi-input-border: var(--psi-border-neutral);
|
|
47
|
+
--psi-input-border-hover: var(--psi-border-strong);
|
|
48
|
+
--psi-input-border-error: var(--psi-fg-danger);
|
|
49
|
+
--psi-input-focus-ring: var(--psi-border-focus);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@layer psi.components {
|
|
54
|
+
:where(:root, [data-psi-theme]) {
|
|
55
|
+
--psi-select-bg: var(--psi-bg-primary);
|
|
56
|
+
--psi-select-fg: var(--psi-fg-primary);
|
|
57
|
+
--psi-select-placeholder: var(--psi-fg-tertiary);
|
|
58
|
+
--psi-select-border: var(--psi-border-neutral);
|
|
59
|
+
--psi-select-border-hover: var(--psi-border-strong);
|
|
60
|
+
--psi-select-border-error: var(--psi-fg-danger);
|
|
61
|
+
--psi-select-focus-ring: var(--psi-border-focus);
|
|
62
|
+
--psi-select-chevron-fg: var(--psi-fg-secondary);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@layer psi.components {
|
|
67
|
+
:where(:root, [data-psi-theme]) {
|
|
68
|
+
--psi-checkbox-fg: var(--psi-fg-primary);
|
|
69
|
+
--psi-checkbox-box-bg: var(--psi-bg-primary);
|
|
70
|
+
--psi-checkbox-box-border: var(--psi-border-neutral);
|
|
71
|
+
--psi-checkbox-box-bg-checked: var(--psi-fill-accent);
|
|
72
|
+
--psi-checkbox-box-border-checked: var(--psi-fill-accent);
|
|
73
|
+
--psi-checkbox-check-fg: var(--psi-fg-on-accent);
|
|
74
|
+
--psi-checkbox-focus-ring: var(--psi-border-focus);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@layer psi.components {
|
|
79
|
+
:where(:root, [data-psi-theme]) {
|
|
80
|
+
--psi-switch-fg: var(--psi-fg-primary);
|
|
81
|
+
--psi-switch-track-bg: var(--psi-fill-neutral4);
|
|
82
|
+
--psi-switch-track-bg-checked: var(--psi-fill-accent);
|
|
83
|
+
--psi-switch-thumb-bg: var(--psi-fg-static-white);
|
|
84
|
+
--psi-switch-focus-ring: var(--psi-border-focus);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@layer psi.components {
|
|
89
|
+
:where(:root, [data-psi-theme]) {
|
|
90
|
+
--psi-tag-neutral-bg: var(--psi-fill-neutral3);
|
|
91
|
+
--psi-tag-neutral-fg: var(--psi-fg-primary);
|
|
92
|
+
--psi-tag-accent-bg: var(--psi-fill-accent);
|
|
93
|
+
--psi-tag-accent-fg: var(--psi-fg-on-accent);
|
|
94
|
+
--psi-tag-success-bg: var(--psi-fill-success);
|
|
95
|
+
--psi-tag-success-fg: var(--psi-fg-static-white);
|
|
96
|
+
--psi-tag-warning-bg: var(--psi-fill-warning);
|
|
97
|
+
--psi-tag-warning-fg: var(--psi-fg-static-black);
|
|
98
|
+
--psi-tag-danger-bg: var(--psi-fill-danger);
|
|
99
|
+
--psi-tag-danger-fg: var(--psi-fg-static-white);
|
|
100
|
+
--psi-tag-neutral-subtle-bg: var(--psi-fill-neutral2);
|
|
101
|
+
--psi-tag-neutral-subtle-fg: var(--psi-fg-secondary);
|
|
102
|
+
--psi-tag-accent-subtle-bg: var(--psi-fill-tint-accent);
|
|
103
|
+
--psi-tag-accent-subtle-fg: var(--psi-fg-accent);
|
|
104
|
+
--psi-tag-success-subtle-bg: var(--psi-fill-tint-success);
|
|
105
|
+
--psi-tag-success-subtle-fg: var(--psi-fg-success);
|
|
106
|
+
--psi-tag-warning-subtle-bg: var(--psi-fill-tint-warning);
|
|
107
|
+
--psi-tag-warning-subtle-fg: var(--psi-fg-warning);
|
|
108
|
+
--psi-tag-danger-subtle-bg: var(--psi-fill-tint-danger);
|
|
109
|
+
--psi-tag-danger-subtle-fg: var(--psi-fg-danger);
|
|
110
|
+
--psi-tag-focus-ring: var(--psi-border-focus);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@layer psi.components {
|
|
115
|
+
:where(:root, [data-psi-theme]) {
|
|
116
|
+
--psi-tooltip-bg: var(--psi-fg-primary);
|
|
117
|
+
--psi-tooltip-fg: var(--psi-bg-primary);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@layer psi.components {
|
|
122
|
+
:where(:root, [data-psi-theme]) {
|
|
123
|
+
--psi-card-border: var(--psi-border-faint);
|
|
124
|
+
--psi-card-bg: transparent;
|
|
125
|
+
--psi-card-gap: var(--psi-space-16);
|
|
126
|
+
--psi-card-radius: var(--psi-radius-8);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@layer psi.components {
|
|
131
|
+
:where(:root, [data-psi-theme]) {
|
|
132
|
+
--psi-navbar-height: 4rem;
|
|
133
|
+
--psi-navbar-bg: var(--psi-scrim-heavy);
|
|
134
|
+
--psi-navbar-blur: 12px;
|
|
135
|
+
--psi-navbar-border: var(--psi-border-faint);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@layer psi.components {
|
|
140
|
+
:where(:root, [data-psi-theme]) {
|
|
141
|
+
--psi-media-tint: none;
|
|
142
|
+
}
|
|
143
|
+
}
|
package/dist/dark.css
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@layer psi.theme {
|
|
2
|
+
[data-psi-theme="dark"] {
|
|
3
|
+
--psi-palette-obsidian: oklch(0.25 0.02 250);
|
|
4
|
+
--psi-palette-platinum: oklch(0.95 0.005 250);
|
|
5
|
+
--psi-palette-sapphire: oklch(0.55 0.21 260);
|
|
6
|
+
--psi-palette-ruby: oklch(0.55 0.22 25);
|
|
7
|
+
--psi-palette-amber: oklch(0.75 0.1582 75);
|
|
8
|
+
--psi-palette-emerald: oklch(0.52 0.19 155);
|
|
9
|
+
--psi-palette-white: oklch(1 0 0);
|
|
10
|
+
--psi-palette-black: oklch(0 0 0);
|
|
11
|
+
--psi-bg-primary: oklch(from var(--psi-palette-obsidian) 0.15 0.01 h);
|
|
12
|
+
--psi-bg-secondary: oklch(from var(--psi-palette-obsidian) 0.2 0.015 h);
|
|
13
|
+
--psi-fg-primary: oklch(from var(--psi-palette-platinum) 0.93 0.01 h);
|
|
14
|
+
--psi-fg-secondary: oklch(from var(--psi-fg-primary) l c h / 0.7);
|
|
15
|
+
--psi-fg-tertiary: oklch(from var(--psi-fg-primary) l c h / 0.5);
|
|
16
|
+
--psi-fg-quaternary: oklch(from var(--psi-fg-primary) l c h / 0.3);
|
|
17
|
+
--psi-fg-primary-inverted: oklch(from var(--psi-palette-obsidian) 0.15 c h);
|
|
18
|
+
--psi-fg-static-white: oklch(from var(--psi-palette-platinum) 1 0 h);
|
|
19
|
+
--psi-fg-static-black: oklch(from var(--psi-palette-obsidian) 0.25 min(c, 0.03) h);
|
|
20
|
+
--psi-fg-on-accent: var(--psi-fg-static-white);
|
|
21
|
+
--psi-fg-accent: oklch(from var(--psi-palette-sapphire) 0.75 min(c, 0.1286) h);
|
|
22
|
+
--psi-fg-success: oklch(from var(--psi-palette-emerald) 0.75 min(c, 0.23) h);
|
|
23
|
+
--psi-fg-warning: oklch(from var(--psi-palette-amber) 0.75 min(c, 0.1582) h);
|
|
24
|
+
--psi-fg-danger: oklch(from var(--psi-palette-ruby) 0.75 min(c, 0.1505) h);
|
|
25
|
+
--psi-fill-neutral1: oklch(from var(--psi-palette-obsidian) 0.18 0.012 h);
|
|
26
|
+
--psi-fill-neutral2: oklch(from var(--psi-palette-obsidian) 0.2 0.015 h);
|
|
27
|
+
--psi-fill-neutral3: oklch(from var(--psi-palette-obsidian) 0.23 0.018 h);
|
|
28
|
+
--psi-fill-neutral4: oklch(from var(--psi-palette-obsidian) 0.26 0.02 h);
|
|
29
|
+
--psi-fill-neutral5: oklch(from var(--psi-palette-obsidian) 0.29 0.022 h);
|
|
30
|
+
--psi-fill-neutral6: oklch(from var(--psi-palette-obsidian) 0.32 0.025 h);
|
|
31
|
+
--psi-fill-accent: var(--psi-palette-sapphire);
|
|
32
|
+
--psi-fill-success: oklch(from var(--psi-palette-emerald) l min(c, 0.1285) h);
|
|
33
|
+
--psi-fill-warning: var(--psi-palette-amber);
|
|
34
|
+
--psi-fill-danger: var(--psi-palette-ruby);
|
|
35
|
+
--psi-fill-tint-accent: oklch(from var(--psi-fg-accent) l c h / 0.15);
|
|
36
|
+
--psi-fill-tint-success: oklch(from var(--psi-fg-success) l c h / 0.15);
|
|
37
|
+
--psi-fill-tint-warning: oklch(from var(--psi-fg-warning) l c h / 0.15);
|
|
38
|
+
--psi-fill-tint-danger: oklch(from var(--psi-fg-danger) l c h / 0.15);
|
|
39
|
+
--psi-border-faint: oklch(from var(--psi-fg-primary) l c h / 0.08);
|
|
40
|
+
--psi-border-neutral: oklch(from var(--psi-fg-primary) l c h / 0.15);
|
|
41
|
+
--psi-border-strong: oklch(from var(--psi-fg-primary) l c h / 0.3);
|
|
42
|
+
--psi-border-focus: var(--psi-fg-accent);
|
|
43
|
+
--psi-scrim-soft: oklch(from var(--psi-bg-primary) l c h / 0.25);
|
|
44
|
+
--psi-scrim-medium: oklch(from var(--psi-bg-primary) l c h / 0.35);
|
|
45
|
+
--psi-scrim-heavy: oklch(from var(--psi-bg-primary) l c h / 0.82);
|
|
46
|
+
}
|
|
47
|
+
}
|