@elvora/tokens 1.0.0-rc.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/LICENSE +21 -0
- package/README.md +30 -0
- package/dist/index.cjs +274 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +406 -0
- package/dist/index.d.ts +406 -0
- package/dist/index.js +251 -0
- package/dist/index.js.map +1 -0
- package/dist/tokens.css +170 -0
- package/package.json +59 -0
- package/src/tokens/breakpoints.ts +10 -0
- package/src/tokens/colors.ts +112 -0
- package/src/tokens/index.ts +30 -0
- package/src/tokens/motion.ts +19 -0
- package/src/tokens/radii.ts +13 -0
- package/src/tokens/shadows.ts +13 -0
- package/src/tokens/spacing.ts +33 -0
- package/src/tokens/typography.ts +64 -0
- package/src/tokens/zIndex.ts +20 -0
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--elvora-colors-slate-50: #f8fafc;
|
|
3
|
+
--elvora-colors-slate-100: #f1f5f9;
|
|
4
|
+
--elvora-colors-slate-200: #e2e8f0;
|
|
5
|
+
--elvora-colors-slate-300: #cbd5e1;
|
|
6
|
+
--elvora-colors-slate-400: #94a3b8;
|
|
7
|
+
--elvora-colors-slate-500: #64748b;
|
|
8
|
+
--elvora-colors-slate-600: #475569;
|
|
9
|
+
--elvora-colors-slate-700: #334155;
|
|
10
|
+
--elvora-colors-slate-800: #1e293b;
|
|
11
|
+
--elvora-colors-slate-900: #0f172a;
|
|
12
|
+
--elvora-colors-blue-50: #eff6ff;
|
|
13
|
+
--elvora-colors-blue-100: #dbeafe;
|
|
14
|
+
--elvora-colors-blue-200: #bfdbfe;
|
|
15
|
+
--elvora-colors-blue-300: #93c5fd;
|
|
16
|
+
--elvora-colors-blue-400: #60a5fa;
|
|
17
|
+
--elvora-colors-blue-500: #3b82f6;
|
|
18
|
+
--elvora-colors-blue-600: #2563eb;
|
|
19
|
+
--elvora-colors-blue-700: #1d4ed8;
|
|
20
|
+
--elvora-colors-blue-800: #1e40af;
|
|
21
|
+
--elvora-colors-blue-900: #1e3a8a;
|
|
22
|
+
--elvora-colors-green-50: #f0fdf4;
|
|
23
|
+
--elvora-colors-green-100: #dcfce7;
|
|
24
|
+
--elvora-colors-green-200: #bbf7d0;
|
|
25
|
+
--elvora-colors-green-300: #86efac;
|
|
26
|
+
--elvora-colors-green-400: #4ade80;
|
|
27
|
+
--elvora-colors-green-500: #22c55e;
|
|
28
|
+
--elvora-colors-green-600: #16a34a;
|
|
29
|
+
--elvora-colors-green-700: #15803d;
|
|
30
|
+
--elvora-colors-green-800: #166534;
|
|
31
|
+
--elvora-colors-green-900: #14532d;
|
|
32
|
+
--elvora-colors-amber-50: #fffbeb;
|
|
33
|
+
--elvora-colors-amber-100: #fef3c7;
|
|
34
|
+
--elvora-colors-amber-200: #fde68a;
|
|
35
|
+
--elvora-colors-amber-300: #fcd34d;
|
|
36
|
+
--elvora-colors-amber-400: #fbbf24;
|
|
37
|
+
--elvora-colors-amber-500: #f59e0b;
|
|
38
|
+
--elvora-colors-amber-600: #d97706;
|
|
39
|
+
--elvora-colors-amber-700: #b45309;
|
|
40
|
+
--elvora-colors-amber-800: #92400e;
|
|
41
|
+
--elvora-colors-amber-900: #78350f;
|
|
42
|
+
--elvora-colors-red-50: #fef2f2;
|
|
43
|
+
--elvora-colors-red-100: #fee2e2;
|
|
44
|
+
--elvora-colors-red-200: #fecaca;
|
|
45
|
+
--elvora-colors-red-300: #fca5a5;
|
|
46
|
+
--elvora-colors-red-400: #f87171;
|
|
47
|
+
--elvora-colors-red-500: #ef4444;
|
|
48
|
+
--elvora-colors-red-600: #dc2626;
|
|
49
|
+
--elvora-colors-red-700: #b91c1c;
|
|
50
|
+
--elvora-colors-red-800: #991b1b;
|
|
51
|
+
--elvora-colors-red-900: #7f1d1d;
|
|
52
|
+
--elvora-colors-violet-50: #f5f3ff;
|
|
53
|
+
--elvora-colors-violet-100: #ede9fe;
|
|
54
|
+
--elvora-colors-violet-200: #ddd6fe;
|
|
55
|
+
--elvora-colors-violet-300: #c4b5fd;
|
|
56
|
+
--elvora-colors-violet-400: #a78bfa;
|
|
57
|
+
--elvora-colors-violet-500: #8b5cf6;
|
|
58
|
+
--elvora-colors-violet-600: #7c3aed;
|
|
59
|
+
--elvora-colors-violet-700: #6d28d9;
|
|
60
|
+
--elvora-colors-violet-800: #5b21b6;
|
|
61
|
+
--elvora-colors-violet-900: #4c1d95;
|
|
62
|
+
--elvora-colors-white: #ffffff;
|
|
63
|
+
--elvora-colors-black: #000000;
|
|
64
|
+
--elvora-colors-transparent: transparent;
|
|
65
|
+
--elvora-spacing-0: 0px;
|
|
66
|
+
--elvora-spacing-1: 4px;
|
|
67
|
+
--elvora-spacing-2: 8px;
|
|
68
|
+
--elvora-spacing-3: 12px;
|
|
69
|
+
--elvora-spacing-4: 16px;
|
|
70
|
+
--elvora-spacing-5: 20px;
|
|
71
|
+
--elvora-spacing-6: 24px;
|
|
72
|
+
--elvora-spacing-7: 28px;
|
|
73
|
+
--elvora-spacing-8: 32px;
|
|
74
|
+
--elvora-spacing-9: 36px;
|
|
75
|
+
--elvora-spacing-10: 40px;
|
|
76
|
+
--elvora-spacing-11: 44px;
|
|
77
|
+
--elvora-spacing-12: 48px;
|
|
78
|
+
--elvora-spacing-14: 56px;
|
|
79
|
+
--elvora-spacing-16: 64px;
|
|
80
|
+
--elvora-spacing-20: 80px;
|
|
81
|
+
--elvora-spacing-24: 96px;
|
|
82
|
+
--elvora-spacing-28: 112px;
|
|
83
|
+
--elvora-spacing-32: 128px;
|
|
84
|
+
--elvora-spacing-px: 1px;
|
|
85
|
+
--elvora-spacing-0_5: 2px;
|
|
86
|
+
--elvora-spacing-1_5: 6px;
|
|
87
|
+
--elvora-spacing-2_5: 10px;
|
|
88
|
+
--elvora-spacing-3_5: 14px;
|
|
89
|
+
--elvora-typography-fontFamilies-sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
|
|
90
|
+
--elvora-typography-fontFamilies-serif: Georgia, "Times New Roman", Times, serif;
|
|
91
|
+
--elvora-typography-fontFamilies-mono: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
|
|
92
|
+
--elvora-typography-fontSizes-xs: 12px;
|
|
93
|
+
--elvora-typography-fontSizes-sm: 14px;
|
|
94
|
+
--elvora-typography-fontSizes-base: 16px;
|
|
95
|
+
--elvora-typography-fontSizes-md: 16px;
|
|
96
|
+
--elvora-typography-fontSizes-lg: 18px;
|
|
97
|
+
--elvora-typography-fontSizes-xl: 20px;
|
|
98
|
+
--elvora-typography-fontSizes-2xl: 24px;
|
|
99
|
+
--elvora-typography-fontSizes-3xl: 30px;
|
|
100
|
+
--elvora-typography-fontSizes-4xl: 36px;
|
|
101
|
+
--elvora-typography-fontSizes-5xl: 48px;
|
|
102
|
+
--elvora-typography-fontSizes-6xl: 60px;
|
|
103
|
+
--elvora-typography-fontWeights-thin: 100;
|
|
104
|
+
--elvora-typography-fontWeights-extralight: 200;
|
|
105
|
+
--elvora-typography-fontWeights-light: 300;
|
|
106
|
+
--elvora-typography-fontWeights-regular: 400;
|
|
107
|
+
--elvora-typography-fontWeights-medium: 500;
|
|
108
|
+
--elvora-typography-fontWeights-semibold: 600;
|
|
109
|
+
--elvora-typography-fontWeights-bold: 700;
|
|
110
|
+
--elvora-typography-fontWeights-extrabold: 800;
|
|
111
|
+
--elvora-typography-fontWeights-black: 900;
|
|
112
|
+
--elvora-typography-lineHeights-none: 1;
|
|
113
|
+
--elvora-typography-lineHeights-tight: 1.2;
|
|
114
|
+
--elvora-typography-lineHeights-snug: 1.35;
|
|
115
|
+
--elvora-typography-lineHeights-normal: 1.5;
|
|
116
|
+
--elvora-typography-lineHeights-relaxed: 1.625;
|
|
117
|
+
--elvora-typography-lineHeights-loose: 2;
|
|
118
|
+
--elvora-typography-letterSpacings-tighter: -0.04em;
|
|
119
|
+
--elvora-typography-letterSpacings-tight: -0.02em;
|
|
120
|
+
--elvora-typography-letterSpacings-normal: 0em;
|
|
121
|
+
--elvora-typography-letterSpacings-wide: 0.02em;
|
|
122
|
+
--elvora-typography-letterSpacings-wider: 0.04em;
|
|
123
|
+
--elvora-typography-letterSpacings-widest: 0.08em;
|
|
124
|
+
--elvora-radii-none: 0;
|
|
125
|
+
--elvora-radii-xs: 2px;
|
|
126
|
+
--elvora-radii-sm: 4px;
|
|
127
|
+
--elvora-radii-md: 6px;
|
|
128
|
+
--elvora-radii-lg: 8px;
|
|
129
|
+
--elvora-radii-xl: 12px;
|
|
130
|
+
--elvora-radii-2xl: 16px;
|
|
131
|
+
--elvora-radii-3xl: 24px;
|
|
132
|
+
--elvora-radii-full: 9999px;
|
|
133
|
+
--elvora-shadows-none: none;
|
|
134
|
+
--elvora-shadows-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
|
|
135
|
+
--elvora-shadows-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.10), 0 1px 2px -1px rgba(15, 23, 42, 0.10);
|
|
136
|
+
--elvora-shadows-md: 0 4px 6px -1px rgba(15, 23, 42, 0.10), 0 2px 4px -2px rgba(15, 23, 42, 0.10);
|
|
137
|
+
--elvora-shadows-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.10), 0 4px 6px -4px rgba(15, 23, 42, 0.10);
|
|
138
|
+
--elvora-shadows-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.10);
|
|
139
|
+
--elvora-shadows-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
|
|
140
|
+
--elvora-shadows-inner: inset 0 2px 4px 0 rgba(15, 23, 42, 0.06);
|
|
141
|
+
--elvora-shadows-focus: 0 0 0 3px rgba(59, 130, 246, 0.45);
|
|
142
|
+
--elvora-motion-durations-instant: 0ms;
|
|
143
|
+
--elvora-motion-durations-fast: 120ms;
|
|
144
|
+
--elvora-motion-durations-normal: 200ms;
|
|
145
|
+
--elvora-motion-durations-slow: 320ms;
|
|
146
|
+
--elvora-motion-durations-slower: 500ms;
|
|
147
|
+
--elvora-motion-easings-linear: linear;
|
|
148
|
+
--elvora-motion-easings-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
149
|
+
--elvora-motion-easings-emphasized: cubic-bezier(0.3, 0, 0, 1);
|
|
150
|
+
--elvora-motion-easings-decelerate: cubic-bezier(0, 0, 0, 1);
|
|
151
|
+
--elvora-motion-easings-accelerate: cubic-bezier(0.3, 0, 1, 1);
|
|
152
|
+
--elvora-zIndex-hide: -1;
|
|
153
|
+
--elvora-zIndex-base: 0;
|
|
154
|
+
--elvora-zIndex-raised: 1;
|
|
155
|
+
--elvora-zIndex-dropdown: 1000;
|
|
156
|
+
--elvora-zIndex-sticky: 1100;
|
|
157
|
+
--elvora-zIndex-banner: 1200;
|
|
158
|
+
--elvora-zIndex-overlay: 1300;
|
|
159
|
+
--elvora-zIndex-modal: 1400;
|
|
160
|
+
--elvora-zIndex-popover: 1500;
|
|
161
|
+
--elvora-zIndex-toast: 1600;
|
|
162
|
+
--elvora-zIndex-tooltip: 1700;
|
|
163
|
+
--elvora-zIndex-max: 2147483647;
|
|
164
|
+
--elvora-breakpoints-xs: 0px;
|
|
165
|
+
--elvora-breakpoints-sm: 640px;
|
|
166
|
+
--elvora-breakpoints-md: 768px;
|
|
167
|
+
--elvora-breakpoints-lg: 1024px;
|
|
168
|
+
--elvora-breakpoints-xl: 1280px;
|
|
169
|
+
--elvora-breakpoints-2xl: 1536px;
|
|
170
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elvora/tokens",
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
|
+
"description": "Elvora design tokens — colors, spacing, typography, radii, shadows, motion. Single source of truth compiled for web, RN, and theming.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Elvora UI Contributors",
|
|
7
|
+
"homepage": "https://github.com/elvora-ui/elvora/tree/main/packages/tokens#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/elvora-ui/elvora.git",
|
|
11
|
+
"directory": "packages/tokens"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/elvora-ui/elvora/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"design-tokens",
|
|
18
|
+
"tokens",
|
|
19
|
+
"style-dictionary",
|
|
20
|
+
"ui",
|
|
21
|
+
"elvora"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "./dist/index.cjs",
|
|
25
|
+
"module": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"require": "./dist/index.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./css": "./dist/tokens.css",
|
|
34
|
+
"./raw": "./src/tokens/index.json"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"src/tokens"
|
|
39
|
+
],
|
|
40
|
+
"sideEffects": [
|
|
41
|
+
"*.css"
|
|
42
|
+
],
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"rimraf": "^6.0.1",
|
|
45
|
+
"tsup": "^8.3.5",
|
|
46
|
+
"typescript": "^5.7.2"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsup && node ./build-tokens.mjs",
|
|
53
|
+
"dev": "tsup --watch",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"lint": "echo 'no lint configured'",
|
|
56
|
+
"test": "echo 'no tests yet'",
|
|
57
|
+
"clean": "rimraf dist"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color tokens — a 10-step ramp per hue (50 → 900), inspired by Tailwind / AntD.
|
|
3
|
+
* Semantic tokens (background, foreground, border, brand, status) consume these.
|
|
4
|
+
*
|
|
5
|
+
* Each ramp is hand-tuned for WCAG 2.2 AA contrast at step 600 against white
|
|
6
|
+
* and step 300 against black. Do not edit step values without re-checking contrast.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export type ColorRamp = {
|
|
10
|
+
50: string;
|
|
11
|
+
100: string;
|
|
12
|
+
200: string;
|
|
13
|
+
300: string;
|
|
14
|
+
400: string;
|
|
15
|
+
500: string;
|
|
16
|
+
600: string;
|
|
17
|
+
700: string;
|
|
18
|
+
800: string;
|
|
19
|
+
900: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const slate: ColorRamp = {
|
|
23
|
+
50: '#f8fafc',
|
|
24
|
+
100: '#f1f5f9',
|
|
25
|
+
200: '#e2e8f0',
|
|
26
|
+
300: '#cbd5e1',
|
|
27
|
+
400: '#94a3b8',
|
|
28
|
+
500: '#64748b',
|
|
29
|
+
600: '#475569',
|
|
30
|
+
700: '#334155',
|
|
31
|
+
800: '#1e293b',
|
|
32
|
+
900: '#0f172a',
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const blue: ColorRamp = {
|
|
36
|
+
50: '#eff6ff',
|
|
37
|
+
100: '#dbeafe',
|
|
38
|
+
200: '#bfdbfe',
|
|
39
|
+
300: '#93c5fd',
|
|
40
|
+
400: '#60a5fa',
|
|
41
|
+
500: '#3b82f6',
|
|
42
|
+
600: '#2563eb',
|
|
43
|
+
700: '#1d4ed8',
|
|
44
|
+
800: '#1e40af',
|
|
45
|
+
900: '#1e3a8a',
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const green: ColorRamp = {
|
|
49
|
+
50: '#f0fdf4',
|
|
50
|
+
100: '#dcfce7',
|
|
51
|
+
200: '#bbf7d0',
|
|
52
|
+
300: '#86efac',
|
|
53
|
+
400: '#4ade80',
|
|
54
|
+
500: '#22c55e',
|
|
55
|
+
600: '#16a34a',
|
|
56
|
+
700: '#15803d',
|
|
57
|
+
800: '#166534',
|
|
58
|
+
900: '#14532d',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const amber: ColorRamp = {
|
|
62
|
+
50: '#fffbeb',
|
|
63
|
+
100: '#fef3c7',
|
|
64
|
+
200: '#fde68a',
|
|
65
|
+
300: '#fcd34d',
|
|
66
|
+
400: '#fbbf24',
|
|
67
|
+
500: '#f59e0b',
|
|
68
|
+
600: '#d97706',
|
|
69
|
+
700: '#b45309',
|
|
70
|
+
800: '#92400e',
|
|
71
|
+
900: '#78350f',
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const red: ColorRamp = {
|
|
75
|
+
50: '#fef2f2',
|
|
76
|
+
100: '#fee2e2',
|
|
77
|
+
200: '#fecaca',
|
|
78
|
+
300: '#fca5a5',
|
|
79
|
+
400: '#f87171',
|
|
80
|
+
500: '#ef4444',
|
|
81
|
+
600: '#dc2626',
|
|
82
|
+
700: '#b91c1c',
|
|
83
|
+
800: '#991b1b',
|
|
84
|
+
900: '#7f1d1d',
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const violet: ColorRamp = {
|
|
88
|
+
50: '#f5f3ff',
|
|
89
|
+
100: '#ede9fe',
|
|
90
|
+
200: '#ddd6fe',
|
|
91
|
+
300: '#c4b5fd',
|
|
92
|
+
400: '#a78bfa',
|
|
93
|
+
500: '#8b5cf6',
|
|
94
|
+
600: '#7c3aed',
|
|
95
|
+
700: '#6d28d9',
|
|
96
|
+
800: '#5b21b6',
|
|
97
|
+
900: '#4c1d95',
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const colors = {
|
|
101
|
+
slate,
|
|
102
|
+
blue,
|
|
103
|
+
green,
|
|
104
|
+
amber,
|
|
105
|
+
red,
|
|
106
|
+
violet,
|
|
107
|
+
white: '#ffffff',
|
|
108
|
+
black: '#000000',
|
|
109
|
+
transparent: 'transparent',
|
|
110
|
+
} as const;
|
|
111
|
+
|
|
112
|
+
export type Colors = typeof colors;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export * from './colors';
|
|
2
|
+
export * from './spacing';
|
|
3
|
+
export * from './typography';
|
|
4
|
+
export * from './radii';
|
|
5
|
+
export * from './shadows';
|
|
6
|
+
export * from './motion';
|
|
7
|
+
export * from './zIndex';
|
|
8
|
+
export * from './breakpoints';
|
|
9
|
+
|
|
10
|
+
import { colors } from './colors';
|
|
11
|
+
import { spacing } from './spacing';
|
|
12
|
+
import { typography } from './typography';
|
|
13
|
+
import { radii } from './radii';
|
|
14
|
+
import { shadows } from './shadows';
|
|
15
|
+
import { motion } from './motion';
|
|
16
|
+
import { zIndex } from './zIndex';
|
|
17
|
+
import { breakpoints } from './breakpoints';
|
|
18
|
+
|
|
19
|
+
export const tokens = {
|
|
20
|
+
colors,
|
|
21
|
+
spacing,
|
|
22
|
+
typography,
|
|
23
|
+
radii,
|
|
24
|
+
shadows,
|
|
25
|
+
motion,
|
|
26
|
+
zIndex,
|
|
27
|
+
breakpoints,
|
|
28
|
+
} as const;
|
|
29
|
+
|
|
30
|
+
export type Tokens = typeof tokens;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const durations = {
|
|
2
|
+
instant: '0ms',
|
|
3
|
+
fast: '120ms',
|
|
4
|
+
normal: '200ms',
|
|
5
|
+
slow: '320ms',
|
|
6
|
+
slower: '500ms',
|
|
7
|
+
} as const;
|
|
8
|
+
|
|
9
|
+
export const easings = {
|
|
10
|
+
linear: 'linear',
|
|
11
|
+
standard: 'cubic-bezier(0.2, 0, 0, 1)',
|
|
12
|
+
emphasized: 'cubic-bezier(0.3, 0, 0, 1)',
|
|
13
|
+
decelerate: 'cubic-bezier(0, 0, 0, 1)',
|
|
14
|
+
accelerate: 'cubic-bezier(0.3, 0, 1, 1)',
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
export const motion = { durations, easings } as const;
|
|
18
|
+
|
|
19
|
+
export type Motion = typeof motion;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const shadows = {
|
|
2
|
+
none: 'none',
|
|
3
|
+
xs: '0 1px 2px 0 rgba(15, 23, 42, 0.05)',
|
|
4
|
+
sm: '0 1px 3px 0 rgba(15, 23, 42, 0.10), 0 1px 2px -1px rgba(15, 23, 42, 0.10)',
|
|
5
|
+
md: '0 4px 6px -1px rgba(15, 23, 42, 0.10), 0 2px 4px -2px rgba(15, 23, 42, 0.10)',
|
|
6
|
+
lg: '0 10px 15px -3px rgba(15, 23, 42, 0.10), 0 4px 6px -4px rgba(15, 23, 42, 0.10)',
|
|
7
|
+
xl: '0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.10)',
|
|
8
|
+
'2xl': '0 25px 50px -12px rgba(15, 23, 42, 0.25)',
|
|
9
|
+
inner: 'inset 0 2px 4px 0 rgba(15, 23, 42, 0.06)',
|
|
10
|
+
focus: '0 0 0 3px rgba(59, 130, 246, 0.45)',
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
export type Shadows = typeof shadows;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spacing scale based on a 4px base unit. Used for padding, margin, gap.
|
|
3
|
+
* Numeric keys (0, 1, 2…) map to multiples of the base; named keys are aliases.
|
|
4
|
+
*/
|
|
5
|
+
export const spacing = {
|
|
6
|
+
0: '0px',
|
|
7
|
+
px: '1px',
|
|
8
|
+
0.5: '2px',
|
|
9
|
+
1: '4px',
|
|
10
|
+
1.5: '6px',
|
|
11
|
+
2: '8px',
|
|
12
|
+
2.5: '10px',
|
|
13
|
+
3: '12px',
|
|
14
|
+
3.5: '14px',
|
|
15
|
+
4: '16px',
|
|
16
|
+
5: '20px',
|
|
17
|
+
6: '24px',
|
|
18
|
+
7: '28px',
|
|
19
|
+
8: '32px',
|
|
20
|
+
9: '36px',
|
|
21
|
+
10: '40px',
|
|
22
|
+
11: '44px',
|
|
23
|
+
12: '48px',
|
|
24
|
+
14: '56px',
|
|
25
|
+
16: '64px',
|
|
26
|
+
20: '80px',
|
|
27
|
+
24: '96px',
|
|
28
|
+
28: '112px',
|
|
29
|
+
32: '128px',
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
32
|
+
export type Spacing = typeof spacing;
|
|
33
|
+
export type SpacingKey = keyof Spacing;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typography tokens — font families, sizes, weights, line heights, letter spacing.
|
|
3
|
+
* Sizes follow a 1.125 (major second) modular scale.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const fontFamilies = {
|
|
7
|
+
sans: '"Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif',
|
|
8
|
+
serif: 'Georgia, "Times New Roman", Times, serif',
|
|
9
|
+
mono: '"JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace',
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export const fontSizes = {
|
|
13
|
+
xs: '12px',
|
|
14
|
+
sm: '14px',
|
|
15
|
+
base: '16px',
|
|
16
|
+
md: '16px',
|
|
17
|
+
lg: '18px',
|
|
18
|
+
xl: '20px',
|
|
19
|
+
'2xl': '24px',
|
|
20
|
+
'3xl': '30px',
|
|
21
|
+
'4xl': '36px',
|
|
22
|
+
'5xl': '48px',
|
|
23
|
+
'6xl': '60px',
|
|
24
|
+
} as const;
|
|
25
|
+
|
|
26
|
+
export const fontWeights = {
|
|
27
|
+
thin: 100,
|
|
28
|
+
extralight: 200,
|
|
29
|
+
light: 300,
|
|
30
|
+
regular: 400,
|
|
31
|
+
medium: 500,
|
|
32
|
+
semibold: 600,
|
|
33
|
+
bold: 700,
|
|
34
|
+
extrabold: 800,
|
|
35
|
+
black: 900,
|
|
36
|
+
} as const;
|
|
37
|
+
|
|
38
|
+
export const lineHeights = {
|
|
39
|
+
none: 1,
|
|
40
|
+
tight: 1.2,
|
|
41
|
+
snug: 1.35,
|
|
42
|
+
normal: 1.5,
|
|
43
|
+
relaxed: 1.625,
|
|
44
|
+
loose: 2,
|
|
45
|
+
} as const;
|
|
46
|
+
|
|
47
|
+
export const letterSpacings = {
|
|
48
|
+
tighter: '-0.04em',
|
|
49
|
+
tight: '-0.02em',
|
|
50
|
+
normal: '0em',
|
|
51
|
+
wide: '0.02em',
|
|
52
|
+
wider: '0.04em',
|
|
53
|
+
widest: '0.08em',
|
|
54
|
+
} as const;
|
|
55
|
+
|
|
56
|
+
export const typography = {
|
|
57
|
+
fontFamilies,
|
|
58
|
+
fontSizes,
|
|
59
|
+
fontWeights,
|
|
60
|
+
lineHeights,
|
|
61
|
+
letterSpacings,
|
|
62
|
+
} as const;
|
|
63
|
+
|
|
64
|
+
export type Typography = typeof typography;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Z-index layering — keep these few and explicit. Components reach for tokens,
|
|
3
|
+
* never magic numbers, to keep stacking predictable.
|
|
4
|
+
*/
|
|
5
|
+
export const zIndex = {
|
|
6
|
+
hide: -1,
|
|
7
|
+
base: 0,
|
|
8
|
+
raised: 1,
|
|
9
|
+
dropdown: 1000,
|
|
10
|
+
sticky: 1100,
|
|
11
|
+
banner: 1200,
|
|
12
|
+
overlay: 1300,
|
|
13
|
+
modal: 1400,
|
|
14
|
+
popover: 1500,
|
|
15
|
+
toast: 1600,
|
|
16
|
+
tooltip: 1700,
|
|
17
|
+
max: 2147483647,
|
|
18
|
+
} as const;
|
|
19
|
+
|
|
20
|
+
export type ZIndex = typeof zIndex;
|