rechta-ds 0.0.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/.changeset/config.json +11 -0
- package/.github/workflows/release.yml +53 -0
- package/.github/workflows/storybook.yml +34 -0
- package/.storybook/main.ts +17 -0
- package/.storybook/preview.ts +35 -0
- package/CHANGELOG.md +65 -0
- package/CONTRIBUTING.md +106 -0
- package/README.md +206 -0
- package/package.json +30 -0
- package/packages/tokens/build.js +357 -0
- package/packages/tokens/package.json +44 -0
- package/packages/tokens/src/tokens.json +1538 -0
- package/packages/ui/.storybook/main.ts +17 -0
- package/packages/ui/.storybook/preview.tsx +37 -0
- package/packages/ui/package.json +109 -0
- package/packages/ui/postcss.config.js +6 -0
- package/packages/ui/src/components/atoms/Avatar.tsx +139 -0
- package/packages/ui/src/components/atoms/Badge.tsx +62 -0
- package/packages/ui/src/components/atoms/Button.tsx +125 -0
- package/packages/ui/src/components/atoms/Input.tsx +116 -0
- package/packages/ui/src/components/atoms/Misc.tsx +128 -0
- package/packages/ui/src/components/atoms/Toggle.tsx +191 -0
- package/packages/ui/src/components/atoms/Typography.tsx +178 -0
- package/packages/ui/src/components/atoms/index.ts +7 -0
- package/packages/ui/src/components/charts/Charts.tsx +380 -0
- package/packages/ui/src/components/charts/DataTable.tsx +222 -0
- package/packages/ui/src/components/charts/index.ts +19 -0
- package/packages/ui/src/components/molecules/Accordion.tsx +93 -0
- package/packages/ui/src/components/molecules/Card.tsx +100 -0
- package/packages/ui/src/components/molecules/PricingCard.tsx +196 -0
- package/packages/ui/src/components/molecules/TestimonialCard.tsx +85 -0
- package/packages/ui/src/components/molecules/Tooltip.tsx +71 -0
- package/packages/ui/src/components/molecules/index.ts +5 -0
- package/packages/ui/src/components/organisms/FeatureTabs.tsx +196 -0
- package/packages/ui/src/components/organisms/LogoMarquee.tsx +119 -0
- package/packages/ui/src/components/organisms/Navbar.tsx +194 -0
- package/packages/ui/src/components/organisms/index.ts +3 -0
- package/packages/ui/src/index.ts +15 -0
- package/packages/ui/src/lib/utils.ts +12 -0
- package/packages/ui/src/stories/atoms/Avatar.stories.tsx +49 -0
- package/packages/ui/src/stories/atoms/Badge.stories.tsx +68 -0
- package/packages/ui/src/stories/atoms/Button.stories.tsx +98 -0
- package/packages/ui/src/stories/atoms/Input.stories.tsx +66 -0
- package/packages/ui/src/stories/atoms/Toggle.stories.tsx +36 -0
- package/packages/ui/src/stories/molecules/Accordion.stories.tsx +47 -0
- package/packages/ui/src/stories/molecules/Card.stories.tsx +84 -0
- package/packages/ui/src/stories/molecules/PricingCard.stories.tsx +62 -0
- package/packages/ui/src/stories/molecules/TestimonialCard.stories.tsx +52 -0
- package/packages/ui/src/stories/molecules/Tooltip.stories.tsx +66 -0
- package/packages/ui/src/stories/organisms/LogoMarquee.stories.tsx +33 -0
- package/packages/ui/src/stories/organisms/Navbar.stories.tsx +37 -0
- package/packages/ui/src/styles/globals.css +220 -0
- package/packages/ui/tailwind.config.ts +68 -0
- package/packages/ui/tsconfig.json +23 -0
- package/packages/ui/tsup.config.ts +24 -0
- package/packages/ui/vite.config.ts +17 -0
- package/pnpm-workspace.yaml +2 -0
- package/turbo.json +33 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Rechta Design System — Token Build Script
|
|
4
|
+
* Generates: CSS custom properties, JS/TS tokens, Tailwind config
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const path = require('path');
|
|
9
|
+
|
|
10
|
+
const tokens = require('./src/tokens.json');
|
|
11
|
+
|
|
12
|
+
const distDir = path.join(__dirname, 'dist');
|
|
13
|
+
if (!fs.existsSync(distDir)) fs.mkdirSync(distDir, { recursive: true });
|
|
14
|
+
|
|
15
|
+
// ── Resolve token references ─────────────────────────────────────────────────
|
|
16
|
+
function resolveReference(value, tokens) {
|
|
17
|
+
if (typeof value !== 'string') return value;
|
|
18
|
+
const match = value.match(/^\{(.+)\}$/);
|
|
19
|
+
if (!match) return value;
|
|
20
|
+
const parts = match[1].split('.');
|
|
21
|
+
let resolved = tokens;
|
|
22
|
+
for (const key of parts) {
|
|
23
|
+
resolved = resolved?.[key];
|
|
24
|
+
if (!resolved) return value;
|
|
25
|
+
}
|
|
26
|
+
return resolveReference(resolved?.value ?? resolved, tokens);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ── Flatten tokens ────────────────────────────────────────────────────────────
|
|
30
|
+
function flattenTokens(obj, prefix = '', result = {}) {
|
|
31
|
+
for (const [key, val] of Object.entries(obj)) {
|
|
32
|
+
const newKey = prefix ? `${prefix}-${key}` : key;
|
|
33
|
+
if (val && typeof val === 'object' && 'value' in val) {
|
|
34
|
+
result[newKey] = resolveReference(val.value, tokens);
|
|
35
|
+
} else if (val && typeof val === 'object') {
|
|
36
|
+
flattenTokens(val, newKey, result);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const flat = flattenTokens(tokens);
|
|
43
|
+
|
|
44
|
+
// ── CSS ───────────────────────────────────────────────────────────────────────
|
|
45
|
+
function generateCSS(flat) {
|
|
46
|
+
const vars = Object.entries(flat)
|
|
47
|
+
.map(([key, val]) => ` --${key}: ${val};`)
|
|
48
|
+
.join('\n');
|
|
49
|
+
|
|
50
|
+
return `/* Rechta Design System — CSS Custom Properties */
|
|
51
|
+
/* Auto-generated. Do not edit manually. */
|
|
52
|
+
/* Generated: ${new Date().toISOString()} */
|
|
53
|
+
|
|
54
|
+
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Playfair+Display:wght@400;700&display=swap');
|
|
55
|
+
|
|
56
|
+
:root {
|
|
57
|
+
${vars}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Dark mode is the default — light mode overrides */
|
|
61
|
+
[data-theme="light"] {
|
|
62
|
+
--color-semantic-bg-base: var(--color-primitive-porcelain);
|
|
63
|
+
--color-semantic-bg-subtle: #F0F0EE;
|
|
64
|
+
--color-semantic-bg-muted: #E0E0DE;
|
|
65
|
+
--color-semantic-bg-elevated: #FFFFFC;
|
|
66
|
+
--color-semantic-surface-default: #F0F0EE;
|
|
67
|
+
--color-semantic-surface-raised: #FFFFFC;
|
|
68
|
+
--color-semantic-surface-sunken: #E0E0DE;
|
|
69
|
+
--color-semantic-border-default: #CCCCCA;
|
|
70
|
+
--color-semantic-border-subtle: #DDDDDB;
|
|
71
|
+
--color-semantic-border-strong: #AAAAAA;
|
|
72
|
+
--color-semantic-text-primary: var(--color-primitive-black);
|
|
73
|
+
--color-semantic-text-secondary: #444442;
|
|
74
|
+
--color-semantic-text-tertiary: #666664;
|
|
75
|
+
--color-semantic-text-disabled: #999997;
|
|
76
|
+
--color-semantic-text-inverse: var(--color-primitive-porcelain);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Base reset */
|
|
80
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
81
|
+
|
|
82
|
+
html {
|
|
83
|
+
font-family: var(--typography-fontFamily-body);
|
|
84
|
+
font-size: var(--typography-fontSize-base);
|
|
85
|
+
color: var(--color-semantic-text-primary);
|
|
86
|
+
background-color: var(--color-semantic-bg-base);
|
|
87
|
+
-webkit-font-smoothing: antialiased;
|
|
88
|
+
-moz-osx-font-smoothing: grayscale;
|
|
89
|
+
}
|
|
90
|
+
`;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ── TypeScript ────────────────────────────────────────────────────────────────
|
|
94
|
+
function generateTS(flat) {
|
|
95
|
+
const entries = Object.entries(flat)
|
|
96
|
+
.map(([key, val]) => {
|
|
97
|
+
const tsKey = key.replace(/-([a-z0-9])/g, (_, c) => c.toUpperCase());
|
|
98
|
+
return ` '${tsKey}': '${val}'`;
|
|
99
|
+
})
|
|
100
|
+
.join(',\n');
|
|
101
|
+
|
|
102
|
+
return `/* Rechta Design System — TypeScript Token Exports */
|
|
103
|
+
/* Auto-generated. Do not edit manually. */
|
|
104
|
+
|
|
105
|
+
export const tokens = {
|
|
106
|
+
${entries}
|
|
107
|
+
} as const;
|
|
108
|
+
|
|
109
|
+
export type TokenKey = keyof typeof tokens;
|
|
110
|
+
export type TokenValue = typeof tokens[TokenKey];
|
|
111
|
+
|
|
112
|
+
export const color = {
|
|
113
|
+
bg: {
|
|
114
|
+
base: tokens['colorSemanticBgBase'],
|
|
115
|
+
subtle: tokens['colorSemanticBgSubtle'],
|
|
116
|
+
muted: tokens['colorSemanticBgMuted'],
|
|
117
|
+
elevated: tokens['colorSemanticBgElevated'],
|
|
118
|
+
overlay: tokens['colorSemanticBgOverlay'],
|
|
119
|
+
inverse: tokens['colorSemanticBgInverse'],
|
|
120
|
+
},
|
|
121
|
+
surface: {
|
|
122
|
+
default: tokens['colorSemanticSurfaceDefault'],
|
|
123
|
+
raised: tokens['colorSemanticSurfaceRaised'],
|
|
124
|
+
sunken: tokens['colorSemanticSurfaceSunken'],
|
|
125
|
+
},
|
|
126
|
+
border: {
|
|
127
|
+
default: tokens['colorSemanticBorderDefault'],
|
|
128
|
+
subtle: tokens['colorSemanticBorderSubtle'],
|
|
129
|
+
strong: tokens['colorSemanticBorderStrong'],
|
|
130
|
+
brand: tokens['colorSemanticBorderBrand'],
|
|
131
|
+
blue: tokens['colorSemanticBorderBlue'],
|
|
132
|
+
},
|
|
133
|
+
text: {
|
|
134
|
+
primary: tokens['colorSemanticTextPrimary'],
|
|
135
|
+
secondary: tokens['colorSemanticTextSecondary'],
|
|
136
|
+
tertiary: tokens['colorSemanticTextTertiary'],
|
|
137
|
+
disabled: tokens['colorSemanticTextDisabled'],
|
|
138
|
+
inverse: tokens['colorSemanticTextInverse'],
|
|
139
|
+
brand: tokens['colorSemanticTextBrand'],
|
|
140
|
+
blue: tokens['colorSemanticTextBlue'],
|
|
141
|
+
},
|
|
142
|
+
brand: {
|
|
143
|
+
default: tokens['colorSemanticBrandDefault'],
|
|
144
|
+
hover: tokens['colorSemanticBrandHover'],
|
|
145
|
+
active: tokens['colorSemanticBrandActive'],
|
|
146
|
+
subtle: tokens['colorSemanticBrandSubtle'],
|
|
147
|
+
muted: tokens['colorSemanticBrandMuted'],
|
|
148
|
+
},
|
|
149
|
+
blue: {
|
|
150
|
+
default: tokens['colorSemanticBlueDefault'],
|
|
151
|
+
hover: tokens['colorSemanticBlueHover'],
|
|
152
|
+
active: tokens['colorSemanticBlueActive'],
|
|
153
|
+
subtle: tokens['colorSemanticBlueSubtle'],
|
|
154
|
+
muted: tokens['colorSemanticBlueMuted'],
|
|
155
|
+
},
|
|
156
|
+
} as const;
|
|
157
|
+
|
|
158
|
+
export const typography = {
|
|
159
|
+
fontFamily: {
|
|
160
|
+
display: tokens['typographyFontFamilyDisplay'],
|
|
161
|
+
body: tokens['typographyFontFamilyBody'],
|
|
162
|
+
mono: tokens['typographyFontFamilyMono'],
|
|
163
|
+
editorial: tokens['typographyFontFamilyEditorial'],
|
|
164
|
+
},
|
|
165
|
+
} as const;
|
|
166
|
+
|
|
167
|
+
export const spacing = Object.fromEntries(
|
|
168
|
+
Object.entries(tokens).filter(([k]) => k.startsWith('spacing'))
|
|
169
|
+
) as Record<string, string>;
|
|
170
|
+
|
|
171
|
+
export default tokens;
|
|
172
|
+
`;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// ── Tailwind ──────────────────────────────────────────────────────────────────
|
|
176
|
+
function generateTailwindConfig() {
|
|
177
|
+
return `/* Rechta Design System — Tailwind Config Extension */
|
|
178
|
+
/* Auto-generated. Do not edit manually. */
|
|
179
|
+
|
|
180
|
+
/** @type {import('tailwindcss').Config} */
|
|
181
|
+
module.exports = {
|
|
182
|
+
darkMode: ['class'],
|
|
183
|
+
theme: {
|
|
184
|
+
extend: {
|
|
185
|
+
colors: {
|
|
186
|
+
brand: {
|
|
187
|
+
50: 'var(--color-primitive-brand-50)',
|
|
188
|
+
100: 'var(--color-primitive-brand-100)',
|
|
189
|
+
200: 'var(--color-primitive-brand-200)',
|
|
190
|
+
300: 'var(--color-primitive-brand-300)',
|
|
191
|
+
400: 'var(--color-primitive-brand-400)',
|
|
192
|
+
500: 'var(--color-primitive-brand-500)',
|
|
193
|
+
600: 'var(--color-primitive-brand-600)',
|
|
194
|
+
700: 'var(--color-primitive-brand-700)',
|
|
195
|
+
DEFAULT: 'var(--color-semantic-brand-default)',
|
|
196
|
+
},
|
|
197
|
+
blue: {
|
|
198
|
+
50: 'var(--color-primitive-blue-50)',
|
|
199
|
+
100: 'var(--color-primitive-blue-100)',
|
|
200
|
+
200: 'var(--color-primitive-blue-200)',
|
|
201
|
+
300: 'var(--color-primitive-blue-300)',
|
|
202
|
+
400: 'var(--color-primitive-blue-400)',
|
|
203
|
+
500: 'var(--color-primitive-blue-500)',
|
|
204
|
+
600: 'var(--color-primitive-blue-600)',
|
|
205
|
+
DEFAULT: 'var(--color-semantic-blue-default)',
|
|
206
|
+
},
|
|
207
|
+
malachite: 'var(--color-primitive-malachite)',
|
|
208
|
+
emerald: 'var(--color-primitive-emerald)',
|
|
209
|
+
porcelain: 'var(--color-primitive-porcelain)',
|
|
210
|
+
bg: {
|
|
211
|
+
base: 'var(--color-semantic-bg-base)',
|
|
212
|
+
subtle: 'var(--color-semantic-bg-subtle)',
|
|
213
|
+
muted: 'var(--color-semantic-bg-muted)',
|
|
214
|
+
elevated: 'var(--color-semantic-bg-elevated)',
|
|
215
|
+
overlay: 'var(--color-semantic-bg-overlay)',
|
|
216
|
+
inverse: 'var(--color-semantic-bg-inverse)',
|
|
217
|
+
},
|
|
218
|
+
surface: {
|
|
219
|
+
DEFAULT: 'var(--color-semantic-surface-default)',
|
|
220
|
+
raised: 'var(--color-semantic-surface-raised)',
|
|
221
|
+
sunken: 'var(--color-semantic-surface-sunken)',
|
|
222
|
+
},
|
|
223
|
+
border: {
|
|
224
|
+
DEFAULT: 'var(--color-semantic-border-default)',
|
|
225
|
+
subtle: 'var(--color-semantic-border-subtle)',
|
|
226
|
+
strong: 'var(--color-semantic-border-strong)',
|
|
227
|
+
brand: 'var(--color-semantic-border-brand)',
|
|
228
|
+
blue: 'var(--color-semantic-border-blue)',
|
|
229
|
+
},
|
|
230
|
+
text: {
|
|
231
|
+
primary: 'var(--color-semantic-text-primary)',
|
|
232
|
+
secondary: 'var(--color-semantic-text-secondary)',
|
|
233
|
+
tertiary: 'var(--color-semantic-text-tertiary)',
|
|
234
|
+
disabled: 'var(--color-semantic-text-disabled)',
|
|
235
|
+
inverse: 'var(--color-semantic-text-inverse)',
|
|
236
|
+
brand: 'var(--color-semantic-text-brand)',
|
|
237
|
+
blue: 'var(--color-semantic-text-blue)',
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
fontFamily: {
|
|
241
|
+
display: ['Syne', 'DM Serif Display', 'Georgia', 'serif'],
|
|
242
|
+
body: ['DM Sans', 'Helvetica Neue', 'Arial', 'sans-serif'],
|
|
243
|
+
mono: ['JetBrains Mono', 'Fira Code', 'monospace'],
|
|
244
|
+
editorial: ['Playfair Display', 'Georgia', 'serif'],
|
|
245
|
+
sans: ['DM Sans', 'Helvetica Neue', 'Arial', 'sans-serif'],
|
|
246
|
+
},
|
|
247
|
+
fontSize: {
|
|
248
|
+
xs: ['0.75rem', { lineHeight: '1.5' }],
|
|
249
|
+
sm: ['0.875rem', { lineHeight: '1.5' }],
|
|
250
|
+
base: ['1rem', { lineHeight: '1.5' }],
|
|
251
|
+
md: ['1.125rem', { lineHeight: '1.5' }],
|
|
252
|
+
lg: ['1.25rem', { lineHeight: '1.25' }],
|
|
253
|
+
xl: ['1.5rem', { lineHeight: '1.25' }],
|
|
254
|
+
'2xl': ['1.875rem', { lineHeight: '1.1' }],
|
|
255
|
+
'3xl': ['2.25rem', { lineHeight: '1.1' }],
|
|
256
|
+
'4xl': ['3rem', { lineHeight: '1' }],
|
|
257
|
+
'5xl': ['3.75rem', { lineHeight: '1' }],
|
|
258
|
+
'6xl': ['4.5rem', { lineHeight: '1' }],
|
|
259
|
+
'7xl': ['6rem', { lineHeight: '0.95' }],
|
|
260
|
+
'8xl': ['8rem', { lineHeight: '0.9' }],
|
|
261
|
+
},
|
|
262
|
+
letterSpacing: {
|
|
263
|
+
tighter: '-0.04em',
|
|
264
|
+
tight: '-0.02em',
|
|
265
|
+
normal: '0em',
|
|
266
|
+
wide: '0.04em',
|
|
267
|
+
wider: '0.08em',
|
|
268
|
+
widest: '0.16em',
|
|
269
|
+
},
|
|
270
|
+
spacing: {
|
|
271
|
+
px: '1px', 0: '0rem', 0.5: '0.125rem', 1: '0.25rem', 1.5: '0.375rem',
|
|
272
|
+
2: '0.5rem', 2.5: '0.625rem', 3: '0.75rem', 3.5: '0.875rem', 4: '1rem',
|
|
273
|
+
5: '1.25rem', 6: '1.5rem', 7: '1.75rem', 8: '2rem', 9: '2.25rem',
|
|
274
|
+
10: '2.5rem', 11: '2.75rem', 12: '3rem', 14: '3.5rem', 16: '4rem',
|
|
275
|
+
18: '4.5rem', 20: '5rem', 24: '6rem', 28: '7rem', 32: '8rem',
|
|
276
|
+
36: '9rem', 40: '10rem', 48: '12rem', 56: '14rem', 64: '16rem',
|
|
277
|
+
72: '18rem', 80: '20rem', 96: '24rem',
|
|
278
|
+
},
|
|
279
|
+
borderRadius: {
|
|
280
|
+
none: '0px', sm: '2px', base: '4px', DEFAULT: '4px',
|
|
281
|
+
md: '6px', lg: '8px', xl: '12px', '2xl': '16px', '3xl': '24px', full: '9999px',
|
|
282
|
+
},
|
|
283
|
+
boxShadow: {
|
|
284
|
+
sm: '0 1px 2px 0 rgba(0,0,0,0.5)',
|
|
285
|
+
DEFAULT: '0 1px 3px 0 rgba(0,0,0,0.6), 0 1px 2px -1px rgba(0,0,0,0.5)',
|
|
286
|
+
md: '0 4px 6px -1px rgba(0,0,0,0.6), 0 2px 4px -2px rgba(0,0,0,0.5)',
|
|
287
|
+
lg: '0 10px 15px -3px rgba(0,0,0,0.6), 0 4px 6px -4px rgba(0,0,0,0.5)',
|
|
288
|
+
xl: '0 20px 25px -5px rgba(0,0,0,0.65), 0 8px 10px -6px rgba(0,0,0,0.5)',
|
|
289
|
+
'2xl': '0 25px 50px -12px rgba(0,0,0,0.8)',
|
|
290
|
+
'glow-brand': '0 0 20px rgba(9,232,94,0.28), 0 0 60px rgba(9,232,94,0.1)',
|
|
291
|
+
'glow-blue': '0 0 20px rgba(53,144,243,0.25), 0 0 50px rgba(53,144,243,0.08)',
|
|
292
|
+
inner: 'inset 0 2px 4px 0 rgba(0,0,0,0.5)',
|
|
293
|
+
none: 'none',
|
|
294
|
+
},
|
|
295
|
+
transitionDuration: {
|
|
296
|
+
instant: '50ms', fast: '100ms', normal: '200ms',
|
|
297
|
+
slow: '300ms', slower: '500ms', slowest: '700ms',
|
|
298
|
+
},
|
|
299
|
+
transitionTimingFunction: {
|
|
300
|
+
default: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
301
|
+
spring: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',
|
|
302
|
+
sharp: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',
|
|
303
|
+
},
|
|
304
|
+
keyframes: {
|
|
305
|
+
'fade-in': { from: { opacity: '0' }, to: { opacity: '1' } },
|
|
306
|
+
'fade-up': { from: { opacity: '0', transform: 'translateY(16px)' }, to: { opacity: '1', transform: 'translateY(0)' } },
|
|
307
|
+
'fade-down': { from: { opacity: '0', transform: 'translateY(-16px)' }, to: { opacity: '1', transform: 'translateY(0)' } },
|
|
308
|
+
'slide-in-right':{ from: { opacity: '0', transform: 'translateX(24px)' }, to: { opacity: '1', transform: 'translateX(0)' } },
|
|
309
|
+
'slide-in-left': { from: { opacity: '0', transform: 'translateX(-24px)' }, to: { opacity: '1', transform: 'translateX(0)' } },
|
|
310
|
+
'scale-in': { from: { opacity: '0', transform: 'scale(0.95)' }, to: { opacity: '1', transform: 'scale(1)' } },
|
|
311
|
+
'shimmer': { '0%': { backgroundPosition: '-200% 0' }, '100%': { backgroundPosition: '200% 0' } },
|
|
312
|
+
'marquee': { from: { transform: 'translateX(0)' }, to: { transform: 'translateX(-50%)' } },
|
|
313
|
+
'pulse-glow': { '0%, 100%': { boxShadow: '0 0 10px rgba(9,232,94,0.3)' }, '50%': { boxShadow: '0 0 30px rgba(9,232,94,0.6), 0 0 60px rgba(9,232,94,0.2)' } },
|
|
314
|
+
'accordion-down':{ from: { height: '0' }, to: { height: 'var(--radix-accordion-content-height)' } },
|
|
315
|
+
'accordion-up': { from: { height: 'var(--radix-accordion-content-height)' }, to: { height: '0' } },
|
|
316
|
+
},
|
|
317
|
+
animation: {
|
|
318
|
+
'fade-in': 'fade-in 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
|
|
319
|
+
'fade-up': 'fade-up 0.4s cubic-bezier(0.4, 0, 0.2, 1)',
|
|
320
|
+
'fade-down': 'fade-down 0.4s cubic-bezier(0.4, 0, 0.2, 1)',
|
|
321
|
+
'slide-right': 'slide-in-right 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
|
|
322
|
+
'slide-left': 'slide-in-left 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
|
|
323
|
+
'scale-in': 'scale-in 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275)',
|
|
324
|
+
'shimmer': 'shimmer 2s linear infinite',
|
|
325
|
+
'marquee': 'marquee 30s linear infinite',
|
|
326
|
+
'pulse-glow': 'pulse-glow 2s ease-in-out infinite',
|
|
327
|
+
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
328
|
+
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
};
|
|
333
|
+
`;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// ── Write all outputs ─────────────────────────────────────────────────────────
|
|
337
|
+
const css = generateCSS(flat);
|
|
338
|
+
fs.writeFileSync(path.join(distDir, 'tokens.css'), css);
|
|
339
|
+
console.log('✓ tokens.css');
|
|
340
|
+
|
|
341
|
+
const tsContent = generateTS(flat);
|
|
342
|
+
fs.writeFileSync(path.join(distDir, 'index.esm.js'), tsContent);
|
|
343
|
+
fs.writeFileSync(path.join(distDir, 'index.d.ts'), tsContent);
|
|
344
|
+
fs.writeFileSync(path.join(distDir, 'index.js'),
|
|
345
|
+
'"use strict";\nObject.defineProperty(exports, "__esModule", { value: true });\n' +
|
|
346
|
+
tsContent.replace(/^export /gm, 'exports.').replace(/^import /gm, '// import '));
|
|
347
|
+
console.log('✓ index.js / index.esm.js / index.d.ts');
|
|
348
|
+
|
|
349
|
+
const tailwindConfig = generateTailwindConfig();
|
|
350
|
+
fs.writeFileSync(path.join(distDir, 'tailwind.config.js'), tailwindConfig);
|
|
351
|
+
console.log('✓ tailwind.config.js');
|
|
352
|
+
|
|
353
|
+
fs.copyFileSync(path.join(__dirname, 'src/tokens.json'), path.join(distDir, 'tokens.json'));
|
|
354
|
+
console.log('✓ tokens.json');
|
|
355
|
+
|
|
356
|
+
console.log('\n✅ @rechta/tokens build complete!');
|
|
357
|
+
console.log(` Output: ${distDir}`);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rechta/tokens",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "Rechta DS design tokens — malachite×porcelain color system, Ruda+Inter+JetBrains Mono fonts",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.esm.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.esm.js",
|
|
12
|
+
"require": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./css": "./dist/tokens.css",
|
|
16
|
+
"./json": "./dist/tokens.json",
|
|
17
|
+
"./tailwind": "./dist/tailwind.config.js"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "node build.js",
|
|
21
|
+
"watch": "node build.js --watch",
|
|
22
|
+
"clean": "rm -rf dist"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"src/tokens.json",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"keywords": [
|
|
30
|
+
"design-tokens",
|
|
31
|
+
"rechta",
|
|
32
|
+
"css-variables",
|
|
33
|
+
"tailwind",
|
|
34
|
+
"shadcn"
|
|
35
|
+
],
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/your-org/rechta-ds",
|
|
39
|
+
"directory": "packages/tokens"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
}
|
|
44
|
+
}
|