@kornorg/design-system 0.7.1 → 0.8.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 +12 -6
- package/dist/index.d.ts +87 -103
- package/dist/index.mjs +405 -579
- package/dist/themes/cobalt.css +2 -2
- package/dist/themes/gestplate.css +2 -2
- package/dist/themes/modern-neutral.css +2 -2
- package/dist/themes/spartan.css +2 -2
- package/dist/themes/sprout.css +2 -2
- package/dist/themes/warm.css +2 -2
- package/dist/tokens.d.ts +135 -159
- package/dist/tokens.mjs +130 -84
- package/package.json +9 -9
package/dist/tokens.d.ts
CHANGED
|
@@ -1,172 +1,148 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Design tokens — typed source of truth
|
|
2
|
+
* Design tokens — typed source of truth for the values that have no CSS
|
|
3
|
+
* backing (spacing scale, type scale, font weights).
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Color, radius, and font-family values live in a theme's CSS custom
|
|
6
|
+
* properties (`src/styles/themes/<feel>.css`) instead — components consume
|
|
7
|
+
* those through Tailwind utility classes (e.g. `bg-primary`), which is the
|
|
8
|
+
* only place a `var(--x)` reference resolves. The published `tokens` export
|
|
9
|
+
* needs to work without a DOM (chart libraries, canvas/SVG rendering, email
|
|
10
|
+
* templates), so `scripts/build-css.mjs` resolves the default theme's CSS to
|
|
11
|
+
* literal values at build time and appends them to this file's build output
|
|
12
|
+
* as `light` / `dark` (see `scripts/generate-tokens.mjs`), plus `radii` and
|
|
13
|
+
* `fontFamily`. Import them from `@kornorg/design-system/tokens` alongside
|
|
14
|
+
* the tokens defined here — this source file only has the pieces below.
|
|
10
15
|
*/
|
|
11
|
-
/** Semantic color tokens. Values are the light-mode references; the dark
|
|
12
|
-
* variant is applied at runtime via the `.dark` class in globals.css. */
|
|
13
|
-
declare const colors: {
|
|
14
|
-
readonly background: "var(--background)";
|
|
15
|
-
readonly foreground: "var(--foreground)";
|
|
16
|
-
readonly card: "var(--card)";
|
|
17
|
-
readonly cardForeground: "var(--card-foreground)";
|
|
18
|
-
readonly popover: "var(--popover)";
|
|
19
|
-
readonly popoverForeground: "var(--popover-foreground)";
|
|
20
|
-
readonly muted: "var(--muted)";
|
|
21
|
-
readonly mutedForeground: "var(--muted-foreground)";
|
|
22
|
-
readonly primary: "var(--primary)";
|
|
23
|
-
readonly primaryForeground: "var(--primary-foreground)";
|
|
24
|
-
readonly secondary: "var(--secondary)";
|
|
25
|
-
readonly secondaryForeground: "var(--secondary-foreground)";
|
|
26
|
-
readonly accent: "var(--accent)";
|
|
27
|
-
readonly accentForeground: "var(--accent-foreground)";
|
|
28
|
-
readonly destructive: "var(--destructive)";
|
|
29
|
-
readonly destructiveForeground: "var(--destructive-foreground)";
|
|
30
|
-
readonly success: "var(--success)";
|
|
31
|
-
readonly successForeground: "var(--success-foreground)";
|
|
32
|
-
readonly warning: "var(--warning)";
|
|
33
|
-
readonly warningForeground: "var(--warning-foreground)";
|
|
34
|
-
readonly border: "var(--border)";
|
|
35
|
-
readonly input: "var(--input)";
|
|
36
|
-
readonly ring: "var(--ring)";
|
|
37
|
-
readonly overlay: "var(--overlay)";
|
|
38
|
-
};
|
|
39
|
-
/** Border-radius scale. Base radius is 0.5rem (8px). */
|
|
40
|
-
declare const radii: {
|
|
41
|
-
readonly sm: "var(--radius-sm)";
|
|
42
|
-
readonly md: "var(--radius-md)";
|
|
43
|
-
readonly lg: "var(--radius-lg)";
|
|
44
|
-
readonly xl: "var(--radius-xl)";
|
|
45
|
-
readonly full: "9999px";
|
|
46
|
-
};
|
|
47
|
-
/** Soft elevation shadow scale. */
|
|
48
|
-
declare const shadows: {
|
|
49
|
-
readonly xs: "var(--shadow-xs)";
|
|
50
|
-
readonly sm: "var(--shadow-sm)";
|
|
51
|
-
readonly md: "var(--shadow-md)";
|
|
52
|
-
readonly lg: "var(--shadow-lg)";
|
|
53
|
-
};
|
|
54
16
|
/**
|
|
55
17
|
* Spacing scale (rem). Matches Tailwind's default 4px step so utility classes
|
|
56
18
|
* (`p-4`, `gap-2`, …) and token references stay aligned.
|
|
57
19
|
*/
|
|
58
|
-
declare const spacing: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
20
|
+
export declare const spacing: {
|
|
21
|
+
readonly 0: "0rem";
|
|
22
|
+
readonly 0.5: "0.125rem";
|
|
23
|
+
readonly 1: "0.25rem";
|
|
24
|
+
readonly 2: "0.5rem";
|
|
25
|
+
readonly 3: "0.75rem";
|
|
26
|
+
readonly 4: "1rem";
|
|
27
|
+
readonly 5: "1.25rem";
|
|
28
|
+
readonly 6: "1.5rem";
|
|
29
|
+
readonly 8: "2rem";
|
|
30
|
+
readonly 10: "2.5rem";
|
|
31
|
+
readonly 12: "3rem";
|
|
32
|
+
readonly 16: "4rem";
|
|
71
33
|
};
|
|
72
34
|
/** Typography scale: [font-size, line-height]. */
|
|
73
|
-
declare const fontSize: {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
35
|
+
export declare const fontSize: {
|
|
36
|
+
readonly xs: readonly ["0.75rem", "1rem"];
|
|
37
|
+
readonly sm: readonly ["0.875rem", "1.25rem"];
|
|
38
|
+
readonly base: readonly ["1rem", "1.5rem"];
|
|
39
|
+
readonly lg: readonly ["1.125rem", "1.75rem"];
|
|
40
|
+
readonly xl: readonly ["1.25rem", "1.75rem"];
|
|
41
|
+
readonly "2xl": readonly ["1.5rem", "2rem"];
|
|
42
|
+
readonly "3xl": readonly ["1.875rem", "2.25rem"];
|
|
43
|
+
readonly "4xl": readonly ["2.25rem", "2.5rem"];
|
|
44
|
+
readonly "5xl": readonly ["3rem", "1"];
|
|
45
|
+
};
|
|
46
|
+
export declare const fontWeight: {
|
|
47
|
+
readonly normal: "400";
|
|
48
|
+
readonly medium: "500";
|
|
49
|
+
readonly semibold: "600";
|
|
50
|
+
readonly bold: "700";
|
|
51
|
+
};
|
|
52
|
+
// --- Generated by scripts/build-css.mjs from src/styles/themes/modern-neutral.css. ---
|
|
53
|
+
/** Resolved literal values (colors, shadows) for the default theme's light
|
|
54
|
+
* mode — no var(--x) — usable outside a DOM styling context: chart
|
|
55
|
+
* libraries, canvas/SVG rendering, email templates. */
|
|
56
|
+
export declare const light: {
|
|
57
|
+
readonly colors: {
|
|
58
|
+
readonly background: "oklch(1 0 0)";
|
|
59
|
+
readonly foreground: "oklch(0.21 0.006 285.9)";
|
|
60
|
+
readonly card: "oklch(1 0 0)";
|
|
61
|
+
readonly cardForeground: "oklch(0.21 0.006 285.9)";
|
|
62
|
+
readonly popover: "oklch(1 0 0)";
|
|
63
|
+
readonly popoverForeground: "oklch(0.21 0.006 285.9)";
|
|
64
|
+
readonly muted: "oklch(0.967 0.001 286.4)";
|
|
65
|
+
readonly mutedForeground: "oklch(0.543 0.016 285.9)";
|
|
66
|
+
readonly primary: "oklch(0.585 0.233 277.1)";
|
|
67
|
+
readonly primaryForeground: "oklch(0.985 0 0)";
|
|
68
|
+
readonly secondary: "oklch(0.967 0.001 286.4)";
|
|
69
|
+
readonly secondaryForeground: "oklch(0.21 0.006 285.9)";
|
|
70
|
+
readonly accent: "oklch(0.967 0.001 286.4)";
|
|
71
|
+
readonly accentForeground: "oklch(0.21 0.006 285.9)";
|
|
72
|
+
readonly destructive: "oklch(0.577 0.245 27.3)";
|
|
73
|
+
readonly destructiveForeground: "oklch(0.985 0 0)";
|
|
74
|
+
readonly success: "oklch(0.596 0.145 163.2)";
|
|
75
|
+
readonly successForeground: "oklch(0.985 0 0)";
|
|
76
|
+
readonly warning: "oklch(0.769 0.166 70.1)";
|
|
77
|
+
readonly warningForeground: "oklch(0.21 0.006 285.9)";
|
|
78
|
+
readonly border: "oklch(0.92 0.004 286.3)";
|
|
79
|
+
readonly input: "oklch(0.92 0.004 286.3)";
|
|
80
|
+
readonly ring: "oklch(0.585 0.233 277.1)";
|
|
81
|
+
readonly overlay: "oklch(0.21 0.006 285.9 / 0.5)";
|
|
82
|
+
};
|
|
83
|
+
readonly shadows: {
|
|
84
|
+
readonly xs: "0 1px 2px 0 oklch(0.21 0.006 285.9 / 0.05)";
|
|
85
|
+
readonly sm: "0 1px 3px 0 oklch(0.21 0.006 285.9 / 0.1), 0 1px 2px -1px oklch(0.21 0.006 285.9 / 0.1)";
|
|
86
|
+
readonly md: "0 4px 6px -1px oklch(0.21 0.006 285.9 / 0.1), 0 2px 4px -2px oklch(0.21 0.006 285.9 / 0.1)";
|
|
87
|
+
readonly lg: "0 10px 15px -3px oklch(0.21 0.006 285.9 / 0.1), 0 4px 6px -4px oklch(0.21 0.006 285.9 / 0.1)";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
/** Same as `light`, resolved from the theme's `.dark` block. */
|
|
91
|
+
export declare const dark: {
|
|
92
|
+
readonly colors: {
|
|
93
|
+
readonly background: "oklch(0.21 0.006 285.9)";
|
|
94
|
+
readonly foreground: "oklch(0.985 0 0)";
|
|
95
|
+
readonly card: "oklch(0.27 0.006 286)";
|
|
96
|
+
readonly cardForeground: "oklch(0.985 0 0)";
|
|
97
|
+
readonly popover: "oklch(0.27 0.006 286)";
|
|
98
|
+
readonly popoverForeground: "oklch(0.985 0 0)";
|
|
99
|
+
readonly muted: "oklch(0.27 0.006 286)";
|
|
100
|
+
readonly mutedForeground: "oklch(0.712 0.013 286.1)";
|
|
101
|
+
readonly primary: "oklch(0.673 0.182 276.9)";
|
|
102
|
+
readonly primaryForeground: "oklch(0.21 0.006 285.9)";
|
|
103
|
+
readonly secondary: "oklch(0.27 0.006 286)";
|
|
104
|
+
readonly secondaryForeground: "oklch(0.985 0 0)";
|
|
105
|
+
readonly accent: "oklch(0.37 0.012 285.8)";
|
|
106
|
+
readonly accentForeground: "oklch(0.985 0 0)";
|
|
107
|
+
readonly destructive: "oklch(0.677 0.191 22.2)";
|
|
108
|
+
readonly destructiveForeground: "oklch(0.985 0 0)";
|
|
109
|
+
readonly success: "oklch(0.696 0.17 162.5)";
|
|
110
|
+
readonly successForeground: "oklch(0.21 0.006 285.9)";
|
|
111
|
+
readonly warning: "oklch(0.828 0.189 84.4)";
|
|
112
|
+
readonly warningForeground: "oklch(0.21 0.006 285.9)";
|
|
113
|
+
readonly border: "oklch(1 0 0 / 0.1)";
|
|
114
|
+
readonly input: "oklch(1 0 0 / 0.15)";
|
|
115
|
+
readonly ring: "oklch(0.673 0.182 276.9)";
|
|
116
|
+
readonly overlay: "oklch(0 0 0 / 0.7)";
|
|
117
|
+
};
|
|
118
|
+
readonly shadows: {
|
|
119
|
+
readonly xs: "0 1px 2px 0 oklch(0 0 0 / 0.3)";
|
|
120
|
+
readonly sm: "0 1px 3px 0 oklch(0 0 0 / 0.4), 0 1px 2px -1px oklch(0 0 0 / 0.4)";
|
|
121
|
+
readonly md: "0 4px 6px -1px oklch(0 0 0 / 0.4), 0 2px 4px -2px oklch(0 0 0 / 0.4)";
|
|
122
|
+
readonly lg: "0 10px 15px -3px oklch(0 0 0 / 0.5), 0 4px 6px -4px oklch(0 0 0 / 0.5)";
|
|
123
|
+
};
|
|
83
124
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
125
|
+
/** Border-radius scale, resolved to literal pixel values. Mode-independent —
|
|
126
|
+
* the theme has no `.dark` override for radius. */
|
|
127
|
+
export declare const radii: {
|
|
128
|
+
readonly sm: "4px";
|
|
129
|
+
readonly md: "6px";
|
|
130
|
+
readonly lg: "8px";
|
|
131
|
+
readonly xl: "12px";
|
|
132
|
+
readonly full: "9999px";
|
|
89
133
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
134
|
+
/** Font stacks, resolved to literal face names. Mode-independent. */
|
|
135
|
+
export declare const fontFamily: {
|
|
136
|
+
readonly sans: "\"Geist\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif";
|
|
137
|
+
readonly mono: "\"Geist Mono\", ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, monospace";
|
|
93
138
|
};
|
|
94
|
-
declare const tokens: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
readonly muted: "var(--muted)";
|
|
103
|
-
readonly mutedForeground: "var(--muted-foreground)";
|
|
104
|
-
readonly primary: "var(--primary)";
|
|
105
|
-
readonly primaryForeground: "var(--primary-foreground)";
|
|
106
|
-
readonly secondary: "var(--secondary)";
|
|
107
|
-
readonly secondaryForeground: "var(--secondary-foreground)";
|
|
108
|
-
readonly accent: "var(--accent)";
|
|
109
|
-
readonly accentForeground: "var(--accent-foreground)";
|
|
110
|
-
readonly destructive: "var(--destructive)";
|
|
111
|
-
readonly destructiveForeground: "var(--destructive-foreground)";
|
|
112
|
-
readonly success: "var(--success)";
|
|
113
|
-
readonly successForeground: "var(--success-foreground)";
|
|
114
|
-
readonly warning: "var(--warning)";
|
|
115
|
-
readonly warningForeground: "var(--warning-foreground)";
|
|
116
|
-
readonly border: "var(--border)";
|
|
117
|
-
readonly input: "var(--input)";
|
|
118
|
-
readonly ring: "var(--ring)";
|
|
119
|
-
readonly overlay: "var(--overlay)";
|
|
120
|
-
};
|
|
121
|
-
readonly radii: {
|
|
122
|
-
readonly sm: "var(--radius-sm)";
|
|
123
|
-
readonly md: "var(--radius-md)";
|
|
124
|
-
readonly lg: "var(--radius-lg)";
|
|
125
|
-
readonly xl: "var(--radius-xl)";
|
|
126
|
-
readonly full: "9999px";
|
|
127
|
-
};
|
|
128
|
-
readonly shadows: {
|
|
129
|
-
readonly xs: "var(--shadow-xs)";
|
|
130
|
-
readonly sm: "var(--shadow-sm)";
|
|
131
|
-
readonly md: "var(--shadow-md)";
|
|
132
|
-
readonly lg: "var(--shadow-lg)";
|
|
133
|
-
};
|
|
134
|
-
readonly spacing: {
|
|
135
|
-
readonly 0: "0rem";
|
|
136
|
-
readonly 0.5: "0.125rem";
|
|
137
|
-
readonly 1: "0.25rem";
|
|
138
|
-
readonly 2: "0.5rem";
|
|
139
|
-
readonly 3: "0.75rem";
|
|
140
|
-
readonly 4: "1rem";
|
|
141
|
-
readonly 5: "1.25rem";
|
|
142
|
-
readonly 6: "1.5rem";
|
|
143
|
-
readonly 8: "2rem";
|
|
144
|
-
readonly 10: "2.5rem";
|
|
145
|
-
readonly 12: "3rem";
|
|
146
|
-
readonly 16: "4rem";
|
|
147
|
-
};
|
|
148
|
-
readonly fontSize: {
|
|
149
|
-
readonly xs: readonly ["0.75rem", "1rem"];
|
|
150
|
-
readonly sm: readonly ["0.875rem", "1.25rem"];
|
|
151
|
-
readonly base: readonly ["1rem", "1.5rem"];
|
|
152
|
-
readonly lg: readonly ["1.125rem", "1.75rem"];
|
|
153
|
-
readonly xl: readonly ["1.25rem", "1.75rem"];
|
|
154
|
-
readonly "2xl": readonly ["1.5rem", "2rem"];
|
|
155
|
-
readonly "3xl": readonly ["1.875rem", "2.25rem"];
|
|
156
|
-
readonly "4xl": readonly ["2.25rem", "2.5rem"];
|
|
157
|
-
readonly "5xl": readonly ["3rem", "1"];
|
|
158
|
-
};
|
|
159
|
-
readonly fontWeight: {
|
|
160
|
-
readonly normal: "400";
|
|
161
|
-
readonly medium: "500";
|
|
162
|
-
readonly semibold: "600";
|
|
163
|
-
readonly bold: "700";
|
|
164
|
-
};
|
|
165
|
-
readonly fontFamily: {
|
|
166
|
-
readonly sans: "var(--font-geist-sans), system-ui, sans-serif";
|
|
167
|
-
readonly mono: "var(--font-geist-mono), ui-monospace, monospace";
|
|
168
|
-
};
|
|
139
|
+
export declare const tokens: {
|
|
140
|
+
readonly light: typeof light;
|
|
141
|
+
readonly dark: typeof dark;
|
|
142
|
+
readonly radii: typeof radii;
|
|
143
|
+
readonly spacing: typeof spacing;
|
|
144
|
+
readonly fontSize: typeof fontSize;
|
|
145
|
+
readonly fontWeight: typeof fontWeight;
|
|
146
|
+
readonly fontFamily: typeof fontFamily;
|
|
169
147
|
};
|
|
170
|
-
type Tokens = typeof tokens;
|
|
171
|
-
|
|
172
|
-
export { type Tokens, colors, fontFamily, fontSize, fontWeight, radii, shadows, spacing, tokens };
|
|
148
|
+
export type Tokens = typeof tokens;
|
package/dist/tokens.mjs
CHANGED
|
@@ -1,101 +1,147 @@
|
|
|
1
1
|
// src/tokens.ts
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Design tokens — typed source of truth for the values that have no CSS
|
|
4
|
+
* backing (spacing scale, type scale, font weights).
|
|
5
|
+
*
|
|
6
|
+
* Color, radius, and font-family values live in a theme's CSS custom
|
|
7
|
+
* properties (`src/styles/themes/<feel>.css`) instead — components consume
|
|
8
|
+
* those through Tailwind utility classes (e.g. `bg-primary`), which is the
|
|
9
|
+
* only place a `var(--x)` reference resolves. The published `tokens` export
|
|
10
|
+
* needs to work without a DOM (chart libraries, canvas/SVG rendering, email
|
|
11
|
+
* templates), so `scripts/build-css.mjs` resolves the default theme's CSS to
|
|
12
|
+
* literal values at build time and appends them to this file's build output
|
|
13
|
+
* as `light` / `dark` (see `scripts/generate-tokens.mjs`), plus `radii` and
|
|
14
|
+
* `fontFamily`. Import them from `@kornorg/design-system/tokens` alongside
|
|
15
|
+
* the tokens defined here — this source file only has the pieces below.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Spacing scale (rem). Matches Tailwind's default 4px step so utility classes
|
|
19
|
+
* (`p-4`, `gap-2`, …) and token references stay aligned.
|
|
20
|
+
*/
|
|
21
|
+
const spacing = {
|
|
22
|
+
0: "0rem",
|
|
23
|
+
.5: "0.125rem",
|
|
24
|
+
1: "0.25rem",
|
|
25
|
+
2: "0.5rem",
|
|
26
|
+
3: "0.75rem",
|
|
27
|
+
4: "1rem",
|
|
28
|
+
5: "1.25rem",
|
|
29
|
+
6: "1.5rem",
|
|
30
|
+
8: "2rem",
|
|
31
|
+
10: "2.5rem",
|
|
32
|
+
12: "3rem",
|
|
33
|
+
16: "4rem"
|
|
27
34
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
/** Typography scale: [font-size, line-height]. */
|
|
36
|
+
const fontSize = {
|
|
37
|
+
xs: ["0.75rem", "1rem"],
|
|
38
|
+
sm: ["0.875rem", "1.25rem"],
|
|
39
|
+
base: ["1rem", "1.5rem"],
|
|
40
|
+
lg: ["1.125rem", "1.75rem"],
|
|
41
|
+
xl: ["1.25rem", "1.75rem"],
|
|
42
|
+
"2xl": ["1.5rem", "2rem"],
|
|
43
|
+
"3xl": ["1.875rem", "2.25rem"],
|
|
44
|
+
"4xl": ["2.25rem", "2.5rem"],
|
|
45
|
+
"5xl": ["3rem", "1"]
|
|
38
46
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
const fontWeight = {
|
|
48
|
+
normal: "400",
|
|
49
|
+
medium: "500",
|
|
50
|
+
semibold: "600",
|
|
51
|
+
bold: "700"
|
|
44
52
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
export { fontSize, fontWeight, spacing };
|
|
54
|
+
|
|
55
|
+
// --- Generated by scripts/build-css.mjs from src/styles/themes/modern-neutral.css. ---
|
|
56
|
+
// Resolved literal values — no var(--x) — for canvas/SVG/email use, where
|
|
57
|
+
// there's no DOM to resolve a CSS custom property against.
|
|
58
|
+
var light = {
|
|
59
|
+
colors: {
|
|
60
|
+
background: "oklch(1 0 0)",
|
|
61
|
+
foreground: "oklch(0.21 0.006 285.9)",
|
|
62
|
+
card: "oklch(1 0 0)",
|
|
63
|
+
cardForeground: "oklch(0.21 0.006 285.9)",
|
|
64
|
+
popover: "oklch(1 0 0)",
|
|
65
|
+
popoverForeground: "oklch(0.21 0.006 285.9)",
|
|
66
|
+
muted: "oklch(0.967 0.001 286.4)",
|
|
67
|
+
mutedForeground: "oklch(0.543 0.016 285.9)",
|
|
68
|
+
primary: "oklch(0.585 0.233 277.1)",
|
|
69
|
+
primaryForeground: "oklch(0.985 0 0)",
|
|
70
|
+
secondary: "oklch(0.967 0.001 286.4)",
|
|
71
|
+
secondaryForeground: "oklch(0.21 0.006 285.9)",
|
|
72
|
+
accent: "oklch(0.967 0.001 286.4)",
|
|
73
|
+
accentForeground: "oklch(0.21 0.006 285.9)",
|
|
74
|
+
destructive: "oklch(0.577 0.245 27.3)",
|
|
75
|
+
destructiveForeground: "oklch(0.985 0 0)",
|
|
76
|
+
success: "oklch(0.596 0.145 163.2)",
|
|
77
|
+
successForeground: "oklch(0.985 0 0)",
|
|
78
|
+
warning: "oklch(0.769 0.166 70.1)",
|
|
79
|
+
warningForeground: "oklch(0.21 0.006 285.9)",
|
|
80
|
+
border: "oklch(0.92 0.004 286.3)",
|
|
81
|
+
input: "oklch(0.92 0.004 286.3)",
|
|
82
|
+
ring: "oklch(0.585 0.233 277.1)",
|
|
83
|
+
overlay: "oklch(0.21 0.006 285.9 / 0.5)",
|
|
84
|
+
},
|
|
85
|
+
shadows: {
|
|
86
|
+
xs: "0 1px 2px 0 oklch(0.21 0.006 285.9 / 0.05)",
|
|
87
|
+
sm: "0 1px 3px 0 oklch(0.21 0.006 285.9 / 0.1), 0 1px 2px -1px oklch(0.21 0.006 285.9 / 0.1)",
|
|
88
|
+
md: "0 4px 6px -1px oklch(0.21 0.006 285.9 / 0.1), 0 2px 4px -2px oklch(0.21 0.006 285.9 / 0.1)",
|
|
89
|
+
lg: "0 10px 15px -3px oklch(0.21 0.006 285.9 / 0.1), 0 4px 6px -4px oklch(0.21 0.006 285.9 / 0.1)",
|
|
90
|
+
}
|
|
69
91
|
};
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
var dark = {
|
|
93
|
+
colors: {
|
|
94
|
+
background: "oklch(0.21 0.006 285.9)",
|
|
95
|
+
foreground: "oklch(0.985 0 0)",
|
|
96
|
+
card: "oklch(0.27 0.006 286)",
|
|
97
|
+
cardForeground: "oklch(0.985 0 0)",
|
|
98
|
+
popover: "oklch(0.27 0.006 286)",
|
|
99
|
+
popoverForeground: "oklch(0.985 0 0)",
|
|
100
|
+
muted: "oklch(0.27 0.006 286)",
|
|
101
|
+
mutedForeground: "oklch(0.712 0.013 286.1)",
|
|
102
|
+
primary: "oklch(0.673 0.182 276.9)",
|
|
103
|
+
primaryForeground: "oklch(0.21 0.006 285.9)",
|
|
104
|
+
secondary: "oklch(0.27 0.006 286)",
|
|
105
|
+
secondaryForeground: "oklch(0.985 0 0)",
|
|
106
|
+
accent: "oklch(0.37 0.012 285.8)",
|
|
107
|
+
accentForeground: "oklch(0.985 0 0)",
|
|
108
|
+
destructive: "oklch(0.677 0.191 22.2)",
|
|
109
|
+
destructiveForeground: "oklch(0.985 0 0)",
|
|
110
|
+
success: "oklch(0.696 0.17 162.5)",
|
|
111
|
+
successForeground: "oklch(0.21 0.006 285.9)",
|
|
112
|
+
warning: "oklch(0.828 0.189 84.4)",
|
|
113
|
+
warningForeground: "oklch(0.21 0.006 285.9)",
|
|
114
|
+
border: "oklch(1 0 0 / 0.1)",
|
|
115
|
+
input: "oklch(1 0 0 / 0.15)",
|
|
116
|
+
ring: "oklch(0.673 0.182 276.9)",
|
|
117
|
+
overlay: "oklch(0 0 0 / 0.7)",
|
|
118
|
+
},
|
|
119
|
+
shadows: {
|
|
120
|
+
xs: "0 1px 2px 0 oklch(0 0 0 / 0.3)",
|
|
121
|
+
sm: "0 1px 3px 0 oklch(0 0 0 / 0.4), 0 1px 2px -1px oklch(0 0 0 / 0.4)",
|
|
122
|
+
md: "0 4px 6px -1px oklch(0 0 0 / 0.4), 0 2px 4px -2px oklch(0 0 0 / 0.4)",
|
|
123
|
+
lg: "0 10px 15px -3px oklch(0 0 0 / 0.5), 0 4px 6px -4px oklch(0 0 0 / 0.5)",
|
|
124
|
+
}
|
|
80
125
|
};
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
126
|
+
var radii = {
|
|
127
|
+
sm: "4px",
|
|
128
|
+
md: "6px",
|
|
129
|
+
lg: "8px",
|
|
130
|
+
xl: "12px",
|
|
131
|
+
full: "9999px",
|
|
86
132
|
};
|
|
87
133
|
var fontFamily = {
|
|
88
|
-
sans: "
|
|
89
|
-
mono: "
|
|
134
|
+
sans: "\"Geist\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif",
|
|
135
|
+
mono: "\"Geist Mono\", ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, monospace",
|
|
90
136
|
};
|
|
91
137
|
var tokens = {
|
|
92
|
-
|
|
138
|
+
light,
|
|
139
|
+
dark,
|
|
93
140
|
radii,
|
|
94
|
-
shadows,
|
|
95
141
|
spacing,
|
|
96
142
|
fontSize,
|
|
97
143
|
fontWeight,
|
|
98
144
|
fontFamily
|
|
99
145
|
};
|
|
100
146
|
|
|
101
|
-
export {
|
|
147
|
+
export { dark, fontFamily, light, radii, tokens };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kornorg/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Modern Neutral — a React + Tailwind CSS design system (components, tokens, Geist fonts).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://kornsour.github.io/design-system/",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
],
|
|
44
44
|
"scripts": {
|
|
45
45
|
"dev": "next dev --turbopack",
|
|
46
|
-
"build": "
|
|
46
|
+
"build": "tsdown && node scripts/postbuild.mjs && pnpm run build:css",
|
|
47
47
|
"build:css": "node scripts/build-css.mjs",
|
|
48
48
|
"build:showcase": "next build",
|
|
49
49
|
"prepack": "pnpm run build",
|
|
@@ -83,15 +83,15 @@
|
|
|
83
83
|
"@types/react-dom": "^19",
|
|
84
84
|
"@vitejs/plugin-react": "^6.1.0",
|
|
85
85
|
"geist": "^1.7.2",
|
|
86
|
-
"jsdom": "^
|
|
87
|
-
"next": "16.
|
|
88
|
-
"react": "19.
|
|
89
|
-
"react-dom": "19.
|
|
86
|
+
"jsdom": "^31.0.1",
|
|
87
|
+
"next": "16.4.5",
|
|
88
|
+
"react": "19.3.1",
|
|
89
|
+
"react-dom": "19.3.1",
|
|
90
90
|
"tailwindcss": "^4",
|
|
91
|
-
"
|
|
91
|
+
"tsdown": "^0.23.7",
|
|
92
92
|
"tw-animate-css": "^1.4.0",
|
|
93
|
-
"typescript": "^
|
|
94
|
-
"vitest": "^
|
|
93
|
+
"typescript": "^7.0.2",
|
|
94
|
+
"vitest": "^5.0.1"
|
|
95
95
|
},
|
|
96
96
|
"pnpm": {
|
|
97
97
|
"overrides": {
|