@codepom/tokens 2.0.0 → 2.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/css/tokens.css +19 -0
- package/package.json +1 -1
- package/tailwind/preset.js +11 -7
package/css/tokens.css
CHANGED
|
@@ -84,6 +84,25 @@
|
|
|
84
84
|
|
|
85
85
|
/* ── Focus ───────────────────────────────────────────────────────── */
|
|
86
86
|
--pom-focus-ring: 0 0 0 2px var(--pom-amber-400);
|
|
87
|
+
|
|
88
|
+
/* ── Interaction surfaces ───────────────────────────────────────── */
|
|
89
|
+
--pom-border-strong: #3A506B; /* hover / emphasized borders */
|
|
90
|
+
--pom-surface-hover: #1C2541; /* hover fill on dark surfaces */
|
|
91
|
+
--pom-primary-hover: #F59E0B;
|
|
92
|
+
--pom-primary-tint: rgba(251,176,64,0.12);
|
|
93
|
+
--pom-accent-tint: rgba(0,223,255,0.12);
|
|
94
|
+
|
|
95
|
+
/* ── Component style knobs — themes override these ──────────────── */
|
|
96
|
+
--pom-border-style: solid; /* blueprint: dashed */
|
|
97
|
+
--pom-font-label: var(--pom-font-sans);/* buttons, badges, labels, nav */
|
|
98
|
+
--pom-label-transform: none; /* blueprint: uppercase */
|
|
99
|
+
--pom-label-tracking: 0; /* blueprint: 0.04em */
|
|
100
|
+
|
|
101
|
+
/* ── Layering ───────────────────────────────────────────────────── */
|
|
102
|
+
--pom-z-sticky: 50;
|
|
103
|
+
--pom-z-drawer: 100;
|
|
104
|
+
--pom-z-modal: 1000;
|
|
105
|
+
--pom-z-toast: 9999;
|
|
87
106
|
}
|
|
88
107
|
|
|
89
108
|
@media (prefers-reduced-motion: reduce) {
|
package/package.json
CHANGED
package/tailwind/preset.js
CHANGED
|
@@ -22,15 +22,19 @@ const preset = {
|
|
|
22
22
|
sans: ['"Space Grotesk"', 'system-ui', 'sans-serif'],
|
|
23
23
|
mono: ['"Space Mono"', '"Courier New"', 'monospace'],
|
|
24
24
|
},
|
|
25
|
+
// Radii and shadows read the CSS variables so themes (e.g. blueprint)
|
|
26
|
+
// flow through to Tailwind utilities like `rounded-md` and `shadow-pom-3`.
|
|
25
27
|
borderRadius: {
|
|
26
|
-
sm: '6px', md: '
|
|
28
|
+
sm: 'var(--pom-radius-sm, 6px)', md: 'var(--pom-radius-md, 8px)',
|
|
29
|
+
lg: 'var(--pom-radius-lg, 12px)', xl: 'var(--pom-radius-xl, 14px)',
|
|
30
|
+
// `rounded-full` stays Tailwind's 9999px: it means "circle/pill", which themes must not square off.
|
|
27
31
|
},
|
|
28
32
|
boxShadow: {
|
|
29
|
-
'pom-1': '0 1px 2px 0 rgba(5,10,24,0.4)',
|
|
30
|
-
'pom-2': '0 2px 8px 0 rgba(5,10,24,0.5), 0 1px 2px 0 rgba(5,10,24,0.3)',
|
|
31
|
-
'pom-3': '0 4px 16px 0 rgba(5,10,24,0.6), 0 2px 4px 0 rgba(5,10,24,0.3)',
|
|
32
|
-
'pom-4': '0 8px 32px 0 rgba(5,10,24,0.7), 0 4px 8px 0 rgba(5,10,24,0.4)',
|
|
33
|
-
'pom-5': '0 16px 48px 0 rgba(5,10,24,0.8), 0 8px 16px 0 rgba(5,10,24,0.5)',
|
|
33
|
+
'pom-1': 'var(--pom-shadow-1, 0 1px 2px 0 rgba(5,10,24,0.4))',
|
|
34
|
+
'pom-2': 'var(--pom-shadow-2, 0 2px 8px 0 rgba(5,10,24,0.5), 0 1px 2px 0 rgba(5,10,24,0.3))',
|
|
35
|
+
'pom-3': 'var(--pom-shadow-3, 0 4px 16px 0 rgba(5,10,24,0.6), 0 2px 4px 0 rgba(5,10,24,0.3))',
|
|
36
|
+
'pom-4': 'var(--pom-shadow-4, 0 8px 32px 0 rgba(5,10,24,0.7), 0 4px 8px 0 rgba(5,10,24,0.4))',
|
|
37
|
+
'pom-5': 'var(--pom-shadow-5, 0 16px 48px 0 rgba(5,10,24,0.8), 0 8px 16px 0 rgba(5,10,24,0.5))',
|
|
34
38
|
},
|
|
35
39
|
spacing: {
|
|
36
40
|
1: '4px', 2: '8px', 3: '12px', 4: '16px', 5: '20px',
|
|
@@ -45,4 +49,4 @@ const preset = {
|
|
|
45
49
|
},
|
|
46
50
|
};
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
export default preset;
|