@tokis/tokens 1.0.1 → 1.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/README.md +5 -5
- package/dist/cjs/css/generate-css-vars.js +242 -39
- package/dist/cjs/primitives/breakpoints.js +10 -0
- package/dist/cjs/primitives/colors.js +64 -16
- package/dist/cjs/primitives/motion.js +16 -3
- package/dist/cjs/primitives/radius.js +9 -2
- package/dist/cjs/primitives/shadows.js +12 -3
- package/dist/cjs/primitives/spacing.js +28 -0
- package/dist/cjs/primitives/typography.js +35 -7
- package/dist/cjs/primitives/zIndex.js +15 -2
- package/dist/css/generate-css-vars.d.ts +46 -1
- package/dist/css/generate-css-vars.d.ts.map +1 -1
- package/dist/css/generate-css-vars.js +239 -39
- package/dist/css/generate-css-vars.js.map +1 -1
- package/dist/primitives/breakpoints.d.ts +10 -0
- package/dist/primitives/breakpoints.d.ts.map +1 -1
- package/dist/primitives/breakpoints.js +10 -0
- package/dist/primitives/breakpoints.js.map +1 -1
- package/dist/primitives/colors.d.ts +52 -16
- package/dist/primitives/colors.d.ts.map +1 -1
- package/dist/primitives/colors.js +64 -16
- package/dist/primitives/colors.js.map +1 -1
- package/dist/primitives/motion.d.ts +14 -3
- package/dist/primitives/motion.d.ts.map +1 -1
- package/dist/primitives/motion.js +16 -3
- package/dist/primitives/motion.js.map +1 -1
- package/dist/primitives/radius.d.ts +9 -2
- package/dist/primitives/radius.d.ts.map +1 -1
- package/dist/primitives/radius.js +9 -2
- package/dist/primitives/radius.js.map +1 -1
- package/dist/primitives/shadows.d.ts +12 -3
- package/dist/primitives/shadows.d.ts.map +1 -1
- package/dist/primitives/shadows.js +12 -3
- package/dist/primitives/shadows.js.map +1 -1
- package/dist/primitives/spacing.d.ts +26 -0
- package/dist/primitives/spacing.d.ts.map +1 -1
- package/dist/primitives/spacing.js +28 -0
- package/dist/primitives/spacing.js.map +1 -1
- package/dist/primitives/typography.d.ts +25 -2
- package/dist/primitives/typography.d.ts.map +1 -1
- package/dist/primitives/typography.js +35 -7
- package/dist/primitives/typography.js.map +1 -1
- package/dist/primitives/zIndex.d.ts +15 -2
- package/dist/primitives/zIndex.d.ts.map +1 -1
- package/dist/primitives/zIndex.js +15 -2
- package/dist/primitives/zIndex.js.map +1 -1
- package/dist/semantic/border.d.ts +1 -1
- package/dist/semantic/color.d.ts +5 -5
- package/dist/semantic/surface.d.ts +1 -1
- package/dist/semantic/text.d.ts +4 -4
- package/dist/themes/dark.d.ts +44 -15
- package/dist/themes/dark.d.ts.map +1 -1
- package/dist/themes/light.d.ts +50 -21
- package/dist/themes/light.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Tokis CSS variable generator.
|
|
3
|
+
*
|
|
4
|
+
* Converts TypeScript primitive token objects into valid CSS custom property
|
|
5
|
+
* declarations. This module serves two purposes:
|
|
6
|
+
*
|
|
7
|
+
* 1. **Build time** — `scripts/generate-tokens-css.ts` calls
|
|
8
|
+
* `generateAllCssVars()` and writes the output to
|
|
9
|
+
* `packages/theme/src/base/variables.css`, keeping CSS and TypeScript
|
|
10
|
+
* in perfect sync. Run with: `pnpm tokens:generate`.
|
|
11
|
+
*
|
|
12
|
+
* 2. **Runtime injection** (escape hatch for CSS-in-JS contexts) — call
|
|
13
|
+
* `generateAllCssVars()` and inject via a `<style>` tag. Not recommended
|
|
14
|
+
* for production; prefer the precompiled static CSS.
|
|
15
|
+
*
|
|
16
|
+
* Generated variable names exactly match those referenced in
|
|
17
|
+
* `packages/theme/src/base/variables.css` and all component CSS files.
|
|
18
|
+
*
|
|
19
|
+
* Zero dependencies — plain TypeScript, no React, no DOM.
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateLightCssVars(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Returns only the CSS custom properties that change in dark mode.
|
|
24
|
+
* Spacing, typography, radius, motion, and z-index are theme-invariant.
|
|
25
|
+
*/
|
|
26
|
+
export declare function generateDarkCssVars(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the complete CSS variable stylesheet:
|
|
29
|
+
* the light `:root` block followed by dark `[data-theme="dark"]` overrides.
|
|
30
|
+
*
|
|
31
|
+
* **Build-time usage** (`scripts/generate-tokens-css.ts`):
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { generateAllCssVars } from '@tokis/tokens';
|
|
34
|
+
* import { writeFileSync } from 'node:fs';
|
|
35
|
+
* writeFileSync(
|
|
36
|
+
* 'packages/theme/src/base/variables.css',
|
|
37
|
+
* generateAllCssVars(),
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function generateAllCssVars(): string;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Use `generateLightCssVars()` or `generateAllCssVars()` instead.
|
|
44
|
+
* The `scope` parameter is ignored; the selector is always `:root`.
|
|
45
|
+
*/
|
|
46
|
+
export declare function generateCssVariables(_scope?: string): string;
|
|
2
47
|
//# sourceMappingURL=generate-css-vars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-css-vars.d.ts","sourceRoot":"","sources":["../../src/css/generate-css-vars.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-css-vars.d.ts","sourceRoot":"","sources":["../../src/css/generate-css-vars.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA6BH,wBAAgB,oBAAoB,IAAI,MAAM,CAwG7C;AAID;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAqE5C;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAc3C;AAID;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,SAAU,GAAG,MAAM,CAE7D"}
|
|
@@ -1,48 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis CSS variable generator.
|
|
3
|
+
*
|
|
4
|
+
* Converts TypeScript primitive token objects into valid CSS custom property
|
|
5
|
+
* declarations. This module serves two purposes:
|
|
6
|
+
*
|
|
7
|
+
* 1. **Build time** — `scripts/generate-tokens-css.ts` calls
|
|
8
|
+
* `generateAllCssVars()` and writes the output to
|
|
9
|
+
* `packages/theme/src/base/variables.css`, keeping CSS and TypeScript
|
|
10
|
+
* in perfect sync. Run with: `pnpm tokens:generate`.
|
|
11
|
+
*
|
|
12
|
+
* 2. **Runtime injection** (escape hatch for CSS-in-JS contexts) — call
|
|
13
|
+
* `generateAllCssVars()` and inject via a `<style>` tag. Not recommended
|
|
14
|
+
* for production; prefer the precompiled static CSS.
|
|
15
|
+
*
|
|
16
|
+
* Generated variable names exactly match those referenced in
|
|
17
|
+
* `packages/theme/src/base/variables.css` and all component CSS files.
|
|
18
|
+
*
|
|
19
|
+
* Zero dependencies — plain TypeScript, no React, no DOM.
|
|
20
|
+
*/
|
|
1
21
|
import { colors } from '../primitives/colors.js';
|
|
2
22
|
import { spacing } from '../primitives/spacing.js';
|
|
3
|
-
import { radius } from '../primitives/radius.js';
|
|
4
23
|
import { typography } from '../primitives/typography.js';
|
|
24
|
+
import { radius } from '../primitives/radius.js';
|
|
5
25
|
import { shadows } from '../primitives/shadows.js';
|
|
6
26
|
import { motion } from '../primitives/motion.js';
|
|
7
27
|
import { zIndex } from '../primitives/zIndex.js';
|
|
8
28
|
import { breakpoints } from '../primitives/breakpoints.js';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
30
|
+
/** camelCase → kebab-case: `primaryHover` → `primary-hover` */
|
|
31
|
+
function kebab(str) {
|
|
32
|
+
return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
|
33
|
+
}
|
|
34
|
+
/** Indent every line of a multi-line string. */
|
|
35
|
+
function indent(str, spaces = 2) {
|
|
36
|
+
const pad = ' '.repeat(spaces);
|
|
37
|
+
return str
|
|
38
|
+
.split('\n')
|
|
39
|
+
.map((l) => (l.trim() ? `${pad}${l}` : ''))
|
|
40
|
+
.join('\n');
|
|
41
|
+
}
|
|
42
|
+
// ─── Light / :root block ─────────────────────────────────────────────────────
|
|
43
|
+
export function generateLightCssVars() {
|
|
44
|
+
const lines = [];
|
|
45
|
+
const v = (name, value) => `--tokis-${name}: ${String(value)};`;
|
|
46
|
+
// ── Primitive colors ──────────────────────────────────────────────────
|
|
47
|
+
lines.push('/* Primitive Colors */');
|
|
48
|
+
for (const [key, value] of Object.entries(colors)) {
|
|
49
|
+
lines.push(v(`color-${kebab(key)}`, value));
|
|
50
|
+
}
|
|
51
|
+
// Legacy flat text-* aliases that component CSS files reference directly
|
|
52
|
+
// (e.g. `--tokis-text-primary`) — kept for backward compat with theme CSS.
|
|
53
|
+
lines.push('');
|
|
54
|
+
lines.push('/* Text — legacy flat aliases */');
|
|
55
|
+
lines.push(v('text-primary', colors.textPrimary));
|
|
56
|
+
lines.push(v('text-secondary', colors.textSecondary));
|
|
57
|
+
lines.push(v('text-tertiary', colors.textTertiary));
|
|
58
|
+
lines.push(v('text-disabled', colors.textDisabled));
|
|
59
|
+
lines.push(v('text-inverse', colors.textInverse));
|
|
60
|
+
lines.push(v('text-on-primary', colors.textOnPrimary));
|
|
61
|
+
lines.push(v('text-link', colors.textLink));
|
|
62
|
+
lines.push(v('text-error', colors.textError));
|
|
63
|
+
lines.push(v('text-success', colors.textSuccess));
|
|
64
|
+
lines.push(v('text-warning', colors.textWarning));
|
|
65
|
+
// ── Spacing ───────────────────────────────────────────────────────────
|
|
66
|
+
lines.push('');
|
|
67
|
+
lines.push('/* Spacing */');
|
|
68
|
+
for (const [key, value] of Object.entries(spacing)) {
|
|
69
|
+
if (!isNaN(Number(key))) {
|
|
70
|
+
lines.push(v(`spacing-${key}`, value));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// ── Typography ────────────────────────────────────────────────────────
|
|
74
|
+
lines.push('');
|
|
75
|
+
lines.push('/* Typography */');
|
|
76
|
+
lines.push(v('font-family', typography.fontFamily.sans));
|
|
77
|
+
lines.push(v('font-family-mono', typography.fontFamily.mono));
|
|
78
|
+
for (const [key, value] of Object.entries(typography.fontSize)) {
|
|
79
|
+
lines.push(v(`font-size-${key}`, value));
|
|
80
|
+
}
|
|
81
|
+
for (const [key, value] of Object.entries(typography.fontWeight)) {
|
|
82
|
+
if (key !== 'normal')
|
|
83
|
+
lines.push(v(`font-weight-${key}`, value));
|
|
84
|
+
}
|
|
85
|
+
for (const [key, value] of Object.entries(typography.lineHeight)) {
|
|
86
|
+
lines.push(v(`line-height-${key}`, value));
|
|
87
|
+
}
|
|
88
|
+
for (const [key, value] of Object.entries(typography.letterSpacing)) {
|
|
89
|
+
lines.push(v(`letter-spacing-${kebab(key)}`, value));
|
|
90
|
+
}
|
|
91
|
+
// ── Border Radius ─────────────────────────────────────────────────────
|
|
92
|
+
lines.push('');
|
|
93
|
+
lines.push('/* Border Radius */');
|
|
94
|
+
for (const [key, value] of Object.entries(radius)) {
|
|
95
|
+
lines.push(v(`radius-${key}`, value));
|
|
96
|
+
}
|
|
97
|
+
// ── Shadows ───────────────────────────────────────────────────────────
|
|
98
|
+
lines.push('');
|
|
99
|
+
lines.push('/* Shadows */');
|
|
100
|
+
for (const [key, value] of Object.entries(shadows)) {
|
|
101
|
+
lines.push(v(`shadow-${key}`, value));
|
|
102
|
+
}
|
|
103
|
+
// ── Focus ─────────────────────────────────────────────────────────────
|
|
104
|
+
lines.push('');
|
|
105
|
+
lines.push('/* Focus */');
|
|
106
|
+
lines.push(v('color-focus-ring', colors.focusRing));
|
|
107
|
+
lines.push(v('color-focus-ring-error', colors.focusRingError));
|
|
108
|
+
// ── Surface interaction states ────────────────────────────────────────
|
|
109
|
+
lines.push('');
|
|
110
|
+
lines.push('/* Surface interaction states */');
|
|
111
|
+
lines.push(v('color-surface-hover', colors.surfaceHover));
|
|
112
|
+
lines.push(v('color-surface-active', colors.surfaceActive));
|
|
113
|
+
// ── Motion ────────────────────────────────────────────────────────────
|
|
114
|
+
lines.push('');
|
|
115
|
+
lines.push('/* Motion */');
|
|
116
|
+
for (const [key, value] of Object.entries(motion.duration)) {
|
|
117
|
+
lines.push(v(`duration-${key}`, value));
|
|
118
|
+
}
|
|
119
|
+
for (const [key, value] of Object.entries(motion.easing)) {
|
|
120
|
+
lines.push(v(`ease-${kebab(key)}`, value));
|
|
121
|
+
}
|
|
122
|
+
// ── Z-index ───────────────────────────────────────────────────────────
|
|
123
|
+
lines.push('');
|
|
124
|
+
lines.push('/* Z-index */');
|
|
125
|
+
for (const [key, value] of Object.entries(zIndex)) {
|
|
126
|
+
lines.push(v(`z-${key}`, value));
|
|
127
|
+
}
|
|
128
|
+
// ── Breakpoints ───────────────────────────────────────────────────────
|
|
129
|
+
lines.push('');
|
|
130
|
+
lines.push('/* Breakpoints (JS reference — not usable in @media queries) */');
|
|
131
|
+
for (const [key, value] of Object.entries(breakpoints)) {
|
|
132
|
+
lines.push(v(`breakpoint-${key}`, value));
|
|
133
|
+
}
|
|
134
|
+
return `:root {\n${indent(lines.join('\n'))}\n}`;
|
|
135
|
+
}
|
|
136
|
+
// ─── Dark theme overrides ────────────────────────────────────────────────────
|
|
137
|
+
/**
|
|
138
|
+
* Returns only the CSS custom properties that change in dark mode.
|
|
139
|
+
* Spacing, typography, radius, motion, and z-index are theme-invariant.
|
|
140
|
+
*/
|
|
141
|
+
export function generateDarkCssVars() {
|
|
142
|
+
const dark = `\
|
|
143
|
+
/* Brand */
|
|
144
|
+
--tokis-color-primary: #3b82f6;
|
|
145
|
+
--tokis-color-primary-hover: #60a5fa;
|
|
146
|
+
--tokis-color-primary-active: #93c5fd;
|
|
147
|
+
--tokis-color-primary-subtle: #1e3a5f;
|
|
148
|
+
--tokis-color-secondary: #a78bfa;
|
|
149
|
+
--tokis-color-secondary-hover: #c4b5fd;
|
|
150
|
+
--tokis-color-secondary-subtle: #2e1065;
|
|
151
|
+
|
|
152
|
+
/* Backgrounds & Surfaces */
|
|
153
|
+
--tokis-color-background: #0f172a;
|
|
154
|
+
--tokis-color-surface: #1e293b;
|
|
155
|
+
--tokis-color-surface-raised: #293548;
|
|
156
|
+
--tokis-color-surface-overlay: #1e293b;
|
|
157
|
+
--tokis-color-surface-hover: #334155;
|
|
158
|
+
--tokis-color-surface-active: #475569;
|
|
159
|
+
|
|
160
|
+
/* Borders */
|
|
161
|
+
--tokis-color-border: #334155;
|
|
162
|
+
--tokis-color-border-strong: #475569;
|
|
163
|
+
|
|
164
|
+
/* Status */
|
|
165
|
+
--tokis-color-error: #f87171;
|
|
166
|
+
--tokis-color-error-subtle: #450a0a;
|
|
167
|
+
--tokis-color-warning: #fbbf24;
|
|
168
|
+
--tokis-color-warning-subtle: #451a03;
|
|
169
|
+
--tokis-color-success: #4ade80;
|
|
170
|
+
--tokis-color-success-subtle: #052e16;
|
|
171
|
+
--tokis-color-info: #38bdf8;
|
|
172
|
+
--tokis-color-info-subtle: #082f49;
|
|
173
|
+
|
|
174
|
+
/* Text */
|
|
175
|
+
--tokis-text-primary: #f1f5f9;
|
|
176
|
+
--tokis-text-secondary: #94a3b8;
|
|
177
|
+
--tokis-text-tertiary: #64748b;
|
|
178
|
+
--tokis-text-disabled: #475569;
|
|
179
|
+
--tokis-text-inverse: #0f172a;
|
|
180
|
+
--tokis-text-on-primary: #ffffff;
|
|
181
|
+
--tokis-text-link: #60a5fa;
|
|
182
|
+
--tokis-text-error: #f87171;
|
|
183
|
+
--tokis-text-success: #4ade80;
|
|
184
|
+
--tokis-text-warning: #fbbf24;
|
|
185
|
+
|
|
186
|
+
/* Neutral scale (inverted for dark) */
|
|
187
|
+
--tokis-color-neutral-50: #0f172a;
|
|
188
|
+
--tokis-color-neutral-100: #1e293b;
|
|
189
|
+
--tokis-color-neutral-200: #334155;
|
|
190
|
+
--tokis-color-neutral-300: #475569;
|
|
191
|
+
--tokis-color-neutral-400: #64748b;
|
|
192
|
+
--tokis-color-neutral-500: #94a3b8;
|
|
193
|
+
--tokis-color-neutral-600: #cbd5e1;
|
|
194
|
+
--tokis-color-neutral-700: #e2e8f0;
|
|
195
|
+
--tokis-color-neutral-800: #f1f5f9;
|
|
196
|
+
--tokis-color-neutral-900: #f8fafc;
|
|
197
|
+
|
|
198
|
+
/* Shadows (higher opacity for dark backgrounds) */
|
|
199
|
+
--tokis-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.30);
|
|
200
|
+
--tokis-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.40), 0 1px 2px -1px rgb(0 0 0 / 0.40);
|
|
201
|
+
--tokis-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.40), 0 2px 4px -2px rgb(0 0 0 / 0.40);
|
|
202
|
+
--tokis-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.40), 0 4px 6px -4px rgb(0 0 0 / 0.40);
|
|
203
|
+
--tokis-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.40), 0 8px 10px -6px rgb(0 0 0 / 0.40);
|
|
204
|
+
|
|
205
|
+
/* Focus rings */
|
|
206
|
+
--tokis-color-focus-ring: rgb(59 130 246 / 0.20);
|
|
207
|
+
--tokis-color-focus-ring-error: rgb(248 113 113 / 0.20);`;
|
|
208
|
+
return `[data-theme="dark"] {\n${indent(dark)}\n}`;
|
|
209
|
+
}
|
|
210
|
+
// ─── Full stylesheet ──────────────────────────────────────────────────────────
|
|
211
|
+
/**
|
|
212
|
+
* Returns the complete CSS variable stylesheet:
|
|
213
|
+
* the light `:root` block followed by dark `[data-theme="dark"]` overrides.
|
|
214
|
+
*
|
|
215
|
+
* **Build-time usage** (`scripts/generate-tokens-css.ts`):
|
|
216
|
+
* ```ts
|
|
217
|
+
* import { generateAllCssVars } from '@tokis/tokens';
|
|
218
|
+
* import { writeFileSync } from 'node:fs';
|
|
219
|
+
* writeFileSync(
|
|
220
|
+
* 'packages/theme/src/base/variables.css',
|
|
221
|
+
* generateAllCssVars(),
|
|
222
|
+
* );
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
export function generateAllCssVars() {
|
|
226
|
+
return [
|
|
227
|
+
'/* ============================================================',
|
|
228
|
+
' Tokis — Design Token CSS Variables',
|
|
229
|
+
' Auto-generated by @tokis/tokens — generate-css-vars.ts',
|
|
230
|
+
' Run `pnpm tokens:generate` to regenerate after editing tokens.',
|
|
231
|
+
' ============================================================ */',
|
|
232
|
+
'',
|
|
233
|
+
generateLightCssVars(),
|
|
234
|
+
'',
|
|
235
|
+
'/* ── Dark Theme ──────────────────────────────────────────── */',
|
|
236
|
+
generateDarkCssVars(),
|
|
237
|
+
'',
|
|
238
|
+
].join('\n');
|
|
239
|
+
}
|
|
240
|
+
// ─── Backward-compat export ───────────────────────────────────────────────────
|
|
241
|
+
/**
|
|
242
|
+
* @deprecated Use `generateLightCssVars()` or `generateAllCssVars()` instead.
|
|
243
|
+
* The `scope` parameter is ignored; the selector is always `:root`.
|
|
244
|
+
*/
|
|
245
|
+
export function generateCssVariables(_scope = ':root') {
|
|
246
|
+
return generateLightCssVars();
|
|
47
247
|
}
|
|
48
248
|
//# sourceMappingURL=generate-css-vars.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-css-vars.js","sourceRoot":"","sources":["../../src/css/generate-css-vars.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oBAAoB,CAAC,MAAM,GAAG,OAAO;IACnD,OAAO,oBAAoB,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis responsive breakpoints.
|
|
3
|
+
* These map to `--tokis-breakpoint-{key}` CSS custom properties (for JS reference)
|
|
4
|
+
* and should be used with `@media (min-width: ...)` in CSS files.
|
|
5
|
+
*
|
|
6
|
+
* Note: CSS custom properties cannot be used inside media query conditions,
|
|
7
|
+
* so the values here serve as the canonical reference — CSS files hardcode
|
|
8
|
+
* the same pixel values directly in `@media` rules.
|
|
9
|
+
*/
|
|
1
10
|
export declare const breakpoints: {
|
|
2
11
|
readonly sm: "640px";
|
|
3
12
|
readonly md: "768px";
|
|
4
13
|
readonly lg: "1024px";
|
|
5
14
|
readonly xl: "1280px";
|
|
15
|
+
readonly '2xl': "1536px";
|
|
6
16
|
};
|
|
7
17
|
//# sourceMappingURL=breakpoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../src/primitives/breakpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../src/primitives/breakpoints.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW;;;;;;CAMd,CAAC"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis responsive breakpoints.
|
|
3
|
+
* These map to `--tokis-breakpoint-{key}` CSS custom properties (for JS reference)
|
|
4
|
+
* and should be used with `@media (min-width: ...)` in CSS files.
|
|
5
|
+
*
|
|
6
|
+
* Note: CSS custom properties cannot be used inside media query conditions,
|
|
7
|
+
* so the values here serve as the canonical reference — CSS files hardcode
|
|
8
|
+
* the same pixel values directly in `@media` rules.
|
|
9
|
+
*/
|
|
1
10
|
export const breakpoints = {
|
|
2
11
|
sm: '640px',
|
|
3
12
|
md: '768px',
|
|
4
13
|
lg: '1024px',
|
|
5
14
|
xl: '1280px',
|
|
15
|
+
'2xl': '1536px',
|
|
6
16
|
};
|
|
7
17
|
//# sourceMappingURL=breakpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoints.js","sourceRoot":"","sources":["../../src/primitives/breakpoints.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,EAAE,
|
|
1
|
+
{"version":3,"file":"breakpoints.js","sourceRoot":"","sources":["../../src/primitives/breakpoints.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,EAAE,EAAI,OAAO;IACb,EAAE,EAAI,OAAO;IACb,EAAE,EAAI,QAAQ;IACd,EAAE,EAAI,QAAQ;IACd,KAAK,EAAE,QAAQ;CACP,CAAC"}
|
|
@@ -1,24 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis primitive color tokens — canonical source of truth.
|
|
3
|
+
* The CSS variable file `theme/src/base/variables.css` is generated from
|
|
4
|
+
* these definitions via `scripts/generate-tokens-css.ts`.
|
|
5
|
+
*
|
|
6
|
+
* All values are plain strings so the object is JSON-serializable.
|
|
7
|
+
*/
|
|
1
8
|
export declare const colors: {
|
|
2
9
|
readonly primary: "#0066ff";
|
|
3
|
-
readonly
|
|
10
|
+
readonly primaryHover: "#0052cc";
|
|
11
|
+
readonly primaryActive: "#003d99";
|
|
12
|
+
readonly primarySubtle: "#e6f0ff";
|
|
13
|
+
readonly secondary: "#7c3aed";
|
|
14
|
+
readonly secondaryHover: "#6d28d9";
|
|
15
|
+
readonly secondarySubtle: "#ede9fe";
|
|
4
16
|
readonly background: "#ffffff";
|
|
5
|
-
readonly surface: "#
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
17
|
+
readonly surface: "#f8f9fa";
|
|
18
|
+
readonly surfaceRaised: "#ffffff";
|
|
19
|
+
readonly surfaceOverlay: "#ffffff";
|
|
20
|
+
readonly surfaceHover: "#f1f5f9";
|
|
21
|
+
readonly surfaceActive: "#e2e8f0";
|
|
22
|
+
readonly border: "#e2e8f0";
|
|
23
|
+
readonly borderStrong: "#cbd5e1";
|
|
24
|
+
readonly error: "#dc2626";
|
|
25
|
+
readonly errorSubtle: "#fef2f2";
|
|
26
|
+
readonly warning: "#d97706";
|
|
27
|
+
readonly warningSubtle: "#fffbeb";
|
|
28
|
+
readonly success: "#16a34a";
|
|
29
|
+
readonly successSubtle: "#f0fdf4";
|
|
30
|
+
readonly info: "#0284c7";
|
|
31
|
+
readonly infoSubtle: "#f0f9ff";
|
|
32
|
+
readonly textPrimary: "#0f172a";
|
|
33
|
+
readonly textSecondary: "#475569";
|
|
34
|
+
readonly textTertiary: "#94a3b8";
|
|
35
|
+
readonly textDisabled: "#cbd5e1";
|
|
36
|
+
readonly textInverse: "#ffffff";
|
|
37
|
+
readonly textOnPrimary: "#ffffff";
|
|
38
|
+
readonly textLink: "#0066ff";
|
|
39
|
+
readonly textError: "#dc2626";
|
|
40
|
+
readonly textSuccess: "#16a34a";
|
|
41
|
+
readonly textWarning: "#d97706";
|
|
42
|
+
readonly neutral50: "#f8fafc";
|
|
43
|
+
readonly neutral100: "#f1f5f9";
|
|
44
|
+
readonly neutral200: "#e2e8f0";
|
|
45
|
+
readonly neutral300: "#cbd5e1";
|
|
46
|
+
readonly neutral400: "#94a3b8";
|
|
47
|
+
readonly neutral500: "#64748b";
|
|
48
|
+
readonly neutral600: "#475569";
|
|
49
|
+
readonly neutral700: "#334155";
|
|
50
|
+
readonly neutral800: "#1e293b";
|
|
51
|
+
readonly neutral900: "#0f172a";
|
|
18
52
|
readonly onPrimary: "#ffffff";
|
|
19
53
|
readonly onSecondary: "#ffffff";
|
|
20
|
-
readonly onBackground: "#
|
|
21
|
-
readonly onSurface: "#
|
|
54
|
+
readonly onBackground: "#0f172a";
|
|
55
|
+
readonly onSurface: "#475569";
|
|
22
56
|
readonly onError: "#ffffff";
|
|
57
|
+
readonly focusRing: "rgb(0 102 255 / 0.15)";
|
|
58
|
+
readonly focusRingError: "rgb(220 38 38 / 0.15)";
|
|
23
59
|
};
|
|
24
60
|
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/primitives/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/primitives/colors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ET,CAAC"}
|
|
@@ -1,24 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis primitive color tokens — canonical source of truth.
|
|
3
|
+
* The CSS variable file `theme/src/base/variables.css` is generated from
|
|
4
|
+
* these definitions via `scripts/generate-tokens-css.ts`.
|
|
5
|
+
*
|
|
6
|
+
* All values are plain strings so the object is JSON-serializable.
|
|
7
|
+
*/
|
|
1
8
|
export const colors = {
|
|
9
|
+
// ── Brand: Primary ────────────────────────────────────────────────────
|
|
2
10
|
primary: '#0066ff',
|
|
3
|
-
|
|
11
|
+
primaryHover: '#0052cc',
|
|
12
|
+
primaryActive: '#003d99',
|
|
13
|
+
primarySubtle: '#e6f0ff',
|
|
14
|
+
// ── Brand: Secondary ──────────────────────────────────────────────────
|
|
15
|
+
secondary: '#7c3aed',
|
|
16
|
+
secondaryHover: '#6d28d9',
|
|
17
|
+
secondarySubtle: '#ede9fe',
|
|
18
|
+
// ── Backgrounds & Surfaces ────────────────────────────────────────────
|
|
4
19
|
background: '#ffffff',
|
|
5
|
-
surface: '#
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
surface: '#f8f9fa',
|
|
21
|
+
surfaceRaised: '#ffffff',
|
|
22
|
+
surfaceOverlay: '#ffffff',
|
|
23
|
+
surfaceHover: '#f1f5f9',
|
|
24
|
+
surfaceActive: '#e2e8f0',
|
|
25
|
+
// ── Borders ───────────────────────────────────────────────────────────
|
|
26
|
+
border: '#e2e8f0',
|
|
27
|
+
borderStrong: '#cbd5e1',
|
|
28
|
+
// ── Status: Error ─────────────────────────────────────────────────────
|
|
29
|
+
error: '#dc2626',
|
|
30
|
+
errorSubtle: '#fef2f2',
|
|
31
|
+
// ── Status: Warning ───────────────────────────────────────────────────
|
|
32
|
+
warning: '#d97706',
|
|
33
|
+
warningSubtle: '#fffbeb',
|
|
34
|
+
// ── Status: Success ───────────────────────────────────────────────────
|
|
35
|
+
success: '#16a34a',
|
|
36
|
+
successSubtle: '#f0fdf4',
|
|
37
|
+
// ── Status: Info ──────────────────────────────────────────────────────
|
|
38
|
+
info: '#0284c7',
|
|
39
|
+
infoSubtle: '#f0f9ff',
|
|
40
|
+
// ── Text ──────────────────────────────────────────────────────────────
|
|
41
|
+
textPrimary: '#0f172a',
|
|
42
|
+
textSecondary: '#475569',
|
|
43
|
+
textTertiary: '#94a3b8',
|
|
44
|
+
textDisabled: '#cbd5e1',
|
|
45
|
+
textInverse: '#ffffff',
|
|
46
|
+
textOnPrimary: '#ffffff',
|
|
47
|
+
textLink: '#0066ff',
|
|
48
|
+
textError: '#dc2626',
|
|
49
|
+
textSuccess: '#16a34a',
|
|
50
|
+
textWarning: '#d97706',
|
|
51
|
+
// ── Neutral scale (Slate) ─────────────────────────────────────────────
|
|
52
|
+
neutral50: '#f8fafc',
|
|
53
|
+
neutral100: '#f1f5f9',
|
|
54
|
+
neutral200: '#e2e8f0',
|
|
55
|
+
neutral300: '#cbd5e1',
|
|
56
|
+
neutral400: '#94a3b8',
|
|
57
|
+
neutral500: '#64748b',
|
|
58
|
+
neutral600: '#475569',
|
|
59
|
+
neutral700: '#334155',
|
|
60
|
+
neutral800: '#1e293b',
|
|
61
|
+
neutral900: '#0f172a',
|
|
62
|
+
// ── On-color ──────────────────────────────────────────────────────────
|
|
18
63
|
onPrimary: '#ffffff',
|
|
19
64
|
onSecondary: '#ffffff',
|
|
20
|
-
onBackground: '#
|
|
21
|
-
onSurface: '#
|
|
65
|
+
onBackground: '#0f172a',
|
|
66
|
+
onSurface: '#475569',
|
|
22
67
|
onError: '#ffffff',
|
|
68
|
+
// ── Focus ─────────────────────────────────────────────────────────────
|
|
69
|
+
focusRing: 'rgb(0 102 255 / 0.15)',
|
|
70
|
+
focusRingError: 'rgb(220 38 38 / 0.15)',
|
|
23
71
|
};
|
|
24
72
|
//# sourceMappingURL=colors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/primitives/colors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/primitives/colors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,yEAAyE;IACzE,OAAO,EAAW,SAAS;IAC3B,YAAY,EAAM,SAAS;IAC3B,aAAa,EAAK,SAAS;IAC3B,aAAa,EAAK,SAAS;IAE3B,yEAAyE;IACzE,SAAS,EAAS,SAAS;IAC3B,cAAc,EAAI,SAAS;IAC3B,eAAe,EAAG,SAAS;IAE3B,yEAAyE;IACzE,UAAU,EAAQ,SAAS;IAC3B,OAAO,EAAW,S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
1
|
+
/**
|
|
2
|
+
* Tokis motion tokens — durations and easing functions.
|
|
3
|
+
* These map to `--tokis-duration-{key}` and `--tokis-ease-{key}` CSS variables.
|
|
4
|
+
*
|
|
5
|
+
* Always reference via CSS variables rather than importing at runtime to
|
|
6
|
+
* preserve zero-runtime guarantee.
|
|
7
|
+
*/
|
|
1
8
|
export declare const motion: {
|
|
2
9
|
readonly duration: {
|
|
3
|
-
readonly fast: "
|
|
4
|
-
readonly normal: "
|
|
5
|
-
readonly slow: "
|
|
10
|
+
readonly fast: "100ms";
|
|
11
|
+
readonly normal: "200ms";
|
|
12
|
+
readonly slow: "300ms";
|
|
13
|
+
readonly slower: "500ms";
|
|
6
14
|
};
|
|
7
15
|
readonly easing: {
|
|
16
|
+
readonly easeIn: "cubic-bezier(0.4, 0, 1, 1)";
|
|
17
|
+
readonly easeOut: "cubic-bezier(0, 0, 0.2, 1)";
|
|
8
18
|
readonly easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
19
|
+
readonly spring: "cubic-bezier(0.175, 0.885, 0.32, 1.275)";
|
|
9
20
|
};
|
|
10
21
|
};
|
|
11
22
|
//# sourceMappingURL=motion.d.ts.map
|