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.
Files changed (58) hide show
  1. package/.changeset/config.json +11 -0
  2. package/.github/workflows/release.yml +53 -0
  3. package/.github/workflows/storybook.yml +34 -0
  4. package/.storybook/main.ts +17 -0
  5. package/.storybook/preview.ts +35 -0
  6. package/CHANGELOG.md +65 -0
  7. package/CONTRIBUTING.md +106 -0
  8. package/README.md +206 -0
  9. package/package.json +30 -0
  10. package/packages/tokens/build.js +357 -0
  11. package/packages/tokens/package.json +44 -0
  12. package/packages/tokens/src/tokens.json +1538 -0
  13. package/packages/ui/.storybook/main.ts +17 -0
  14. package/packages/ui/.storybook/preview.tsx +37 -0
  15. package/packages/ui/package.json +109 -0
  16. package/packages/ui/postcss.config.js +6 -0
  17. package/packages/ui/src/components/atoms/Avatar.tsx +139 -0
  18. package/packages/ui/src/components/atoms/Badge.tsx +62 -0
  19. package/packages/ui/src/components/atoms/Button.tsx +125 -0
  20. package/packages/ui/src/components/atoms/Input.tsx +116 -0
  21. package/packages/ui/src/components/atoms/Misc.tsx +128 -0
  22. package/packages/ui/src/components/atoms/Toggle.tsx +191 -0
  23. package/packages/ui/src/components/atoms/Typography.tsx +178 -0
  24. package/packages/ui/src/components/atoms/index.ts +7 -0
  25. package/packages/ui/src/components/charts/Charts.tsx +380 -0
  26. package/packages/ui/src/components/charts/DataTable.tsx +222 -0
  27. package/packages/ui/src/components/charts/index.ts +19 -0
  28. package/packages/ui/src/components/molecules/Accordion.tsx +93 -0
  29. package/packages/ui/src/components/molecules/Card.tsx +100 -0
  30. package/packages/ui/src/components/molecules/PricingCard.tsx +196 -0
  31. package/packages/ui/src/components/molecules/TestimonialCard.tsx +85 -0
  32. package/packages/ui/src/components/molecules/Tooltip.tsx +71 -0
  33. package/packages/ui/src/components/molecules/index.ts +5 -0
  34. package/packages/ui/src/components/organisms/FeatureTabs.tsx +196 -0
  35. package/packages/ui/src/components/organisms/LogoMarquee.tsx +119 -0
  36. package/packages/ui/src/components/organisms/Navbar.tsx +194 -0
  37. package/packages/ui/src/components/organisms/index.ts +3 -0
  38. package/packages/ui/src/index.ts +15 -0
  39. package/packages/ui/src/lib/utils.ts +12 -0
  40. package/packages/ui/src/stories/atoms/Avatar.stories.tsx +49 -0
  41. package/packages/ui/src/stories/atoms/Badge.stories.tsx +68 -0
  42. package/packages/ui/src/stories/atoms/Button.stories.tsx +98 -0
  43. package/packages/ui/src/stories/atoms/Input.stories.tsx +66 -0
  44. package/packages/ui/src/stories/atoms/Toggle.stories.tsx +36 -0
  45. package/packages/ui/src/stories/molecules/Accordion.stories.tsx +47 -0
  46. package/packages/ui/src/stories/molecules/Card.stories.tsx +84 -0
  47. package/packages/ui/src/stories/molecules/PricingCard.stories.tsx +62 -0
  48. package/packages/ui/src/stories/molecules/TestimonialCard.stories.tsx +52 -0
  49. package/packages/ui/src/stories/molecules/Tooltip.stories.tsx +66 -0
  50. package/packages/ui/src/stories/organisms/LogoMarquee.stories.tsx +33 -0
  51. package/packages/ui/src/stories/organisms/Navbar.stories.tsx +37 -0
  52. package/packages/ui/src/styles/globals.css +220 -0
  53. package/packages/ui/tailwind.config.ts +68 -0
  54. package/packages/ui/tsconfig.json +23 -0
  55. package/packages/ui/tsup.config.ts +24 -0
  56. package/packages/ui/vite.config.ts +17 -0
  57. package/pnpm-workspace.yaml +2 -0
  58. package/turbo.json +33 -0
@@ -0,0 +1,220 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Ruda:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
2
+
3
+ @tailwind base;
4
+ @tailwind components;
5
+ @tailwind utilities;
6
+
7
+ /* ─── Dark theme (default) ───────────────────────────────────────────────── */
8
+ :root,
9
+ [data-theme="dark"] {
10
+ color-scheme: dark;
11
+
12
+ /* Backgrounds */
13
+ --c-bg: #000000;
14
+ --c-bg-subtle: #090909;
15
+ --c-bg-muted: #0F0F0F;
16
+ --c-bg-elevated: #161616;
17
+ --c-bg-overlay: #1E1E1E;
18
+ --c-bg-inverse: #FFFFFC;
19
+
20
+ /* Surfaces */
21
+ --c-bg-surface: #111111;
22
+ --c-bg-surface-raised: #1A1A1A;
23
+ --c-bg-surface-sunken: #080808;
24
+ --c-bg-surface-hover: #222222;
25
+ --c-bg-surface-active: #2A2A2A;
26
+ --c-bg-surface-selected: #1C2E1C;
27
+
28
+ /* Borders */
29
+ --c-border-subtle: #1E1E1E;
30
+ --c-border: #2A2A2A;
31
+ --c-border-mid: #333333;
32
+ --c-border-strong: #444444;
33
+ --c-border-brand: rgba(9,232,94,0.30);
34
+ --c-border-brand-hover: rgba(9,232,94,0.50);
35
+ --c-border-blue: rgba(53,144,243,0.30);
36
+ --c-border-blue-hover: rgba(53,144,243,0.50);
37
+ --c-border-error: rgba(239,68,68,0.50);
38
+ --c-border-error-hover: rgba(239,68,68,0.70);
39
+ --c-border-warning: rgba(245,158,11,0.40);
40
+
41
+ /* Text */
42
+ --c-text: #FFFFFC;
43
+ --c-text-2: #B0B0AE;
44
+ --c-text-3: #888886;
45
+ --c-text-muted: #6E6E6C;
46
+ --c-text-disabled: #555553;
47
+ --c-text-inverse: #000000;
48
+ --c-text-brand: #09E85E;
49
+ --c-text-brand-hover: #0CF568;
50
+ --c-text-blue: #5BABFF;
51
+ --c-text-blue-hover:#7FC0FF;
52
+ --c-text-error: #F87171;
53
+ --c-text-warning: #FBBF24;
54
+ --c-text-success: #09E85E;
55
+
56
+ /* Brand (malachite green) */
57
+ --c-brand: #09E85E;
58
+ --c-brand-hover: #0CF568;
59
+ --c-brand-active: #07C44F;
60
+ --c-brand-focus: rgba(9,232,94,0.25);
61
+ --c-brand-subtle: rgba(9,232,94,0.08);
62
+ --c-brand-subtle-hover: rgba(9,232,94,0.14);
63
+ --c-brand-muted: rgba(9,232,94,0.04);
64
+ --c-brand-emphasis: #16C172;
65
+
66
+ /* Emerald */
67
+ --c-emerald: #16C172;
68
+ --c-emerald-hover: #1AD47F;
69
+ --c-emerald-active: #0FAD63;
70
+ --c-emerald-focus: rgba(22,193,114,0.25);
71
+ --c-emerald-subtle: rgba(22,193,114,0.08);
72
+
73
+ /* Blue */
74
+ --c-blue: #3590F3;
75
+ --c-blue-hover: #4FA0FF;
76
+ --c-blue-active: #2478D4;
77
+ --c-blue-focus: rgba(53,144,243,0.25);
78
+ --c-blue-subtle: rgba(53,144,243,0.08);
79
+
80
+ /* Status */
81
+ --c-status-success: #09E85E;
82
+ --c-status-info: #5BABFF;
83
+ --c-status-warning: #FBBF24;
84
+ --c-status-error: #F87171;
85
+ --c-status-success-bg: rgba(9,232,94,0.08);
86
+ --c-status-info-bg: rgba(53,144,243,0.08);
87
+ --c-status-warning-bg: rgba(245,158,11,0.08);
88
+ --c-status-error-bg: rgba(239,68,68,0.08);
89
+
90
+ /* Primitives */
91
+ --color-porcelain: #FFFFFC;
92
+ --color-black: #000000;
93
+
94
+ /* Shadows (dark) */
95
+ --shadow-xs: 0 1px 2px rgba(0,0,0,0.5);
96
+ --shadow-sm: 0 1px 4px rgba(0,0,0,0.6);
97
+ --shadow-md: 0 4px 10px rgba(0,0,0,0.7);
98
+ --shadow-lg: 0 10px 24px rgba(0,0,0,0.75);
99
+ --shadow-xl: 0 20px 40px rgba(0,0,0,0.8);
100
+ --shadow-glow-brand: 0 0 20px rgba(9,232,94,0.28), 0 0 60px rgba(9,232,94,0.08);
101
+ --shadow-glow-brand-lg: 0 0 40px rgba(9,232,94,0.35), 0 0 80px rgba(9,232,94,0.12);
102
+ --shadow-glow-blue: 0 0 20px rgba(53,144,243,0.25), 0 0 50px rgba(53,144,243,0.07);
103
+
104
+ /* Border radius (matches tokens) */
105
+ --radius-none: 0px;
106
+ --radius-sm: 2px;
107
+ --radius-base: 4px;
108
+ --radius-md: 6px;
109
+ --radius-lg: 8px;
110
+ --radius-xl: 12px;
111
+ --radius-2xl: 16px;
112
+ --radius-3xl: 24px;
113
+ --radius-full: 9999px;
114
+
115
+ /* Typography */
116
+ --font-display: 'Ruda', sans-serif;
117
+ --font-sans: 'Inter', system-ui, sans-serif;
118
+ --font-mono: 'JetBrains Mono', monospace;
119
+ }
120
+
121
+ /* ─── Light theme ─────────────────────────────────────────────────────────── */
122
+ [data-theme="light"] {
123
+ color-scheme: light;
124
+
125
+ --c-bg: #FFFFFC;
126
+ --c-bg-subtle: #F4F4F2;
127
+ --c-bg-muted: #EBEBEA;
128
+ --c-bg-elevated: #FFFFFF;
129
+ --c-bg-overlay: #E0E0DE;
130
+ --c-bg-inverse: #111110;
131
+
132
+ --c-bg-surface: #F8F8F6;
133
+ --c-bg-surface-raised: #FFFFFF;
134
+ --c-bg-surface-sunken: #EBEBEA;
135
+ --c-bg-surface-hover: #EFEFED;
136
+ --c-bg-surface-active: #E5E5E3;
137
+ --c-bg-surface-selected: #EDFFF5;
138
+
139
+ --c-border-subtle: #E8E8E6;
140
+ --c-border: #D0D0CE;
141
+ --c-border-mid: #BBBBBA;
142
+ --c-border-strong: #9A9A98;
143
+ --c-border-brand: rgba(5,163,65,0.40);
144
+ --c-border-brand-hover: rgba(5,163,65,0.65);
145
+ --c-border-blue: rgba(26,99,198,0.40);
146
+ --c-border-blue-hover: rgba(26,99,198,0.65);
147
+ --c-border-error: rgba(196,29,29,0.45);
148
+ --c-border-error-hover: rgba(196,29,29,0.70);
149
+ --c-border-warning: rgba(146,87,10,0.40);
150
+
151
+ --c-text: #111110;
152
+ --c-text-2: #3A3A38;
153
+ --c-text-3: #555553;
154
+ --c-text-muted: #6E6E6C;
155
+ --c-text-disabled: #9A9A98;
156
+ --c-text-inverse: #FFFFFC;
157
+ --c-text-brand: #047A2B;
158
+ --c-text-brand-hover: #038A30;
159
+ --c-text-blue: #1A5EB8;
160
+ --c-text-blue-hover:#1553A8;
161
+ --c-text-error: #C41D1D;
162
+ --c-text-warning: #92570A;
163
+ --c-text-success: #047A2B;
164
+
165
+ --c-brand: #07C44F;
166
+ --c-brand-hover: #09E85E;
167
+ --c-brand-active: #05A341;
168
+ --c-brand-focus: rgba(5,163,65,0.22);
169
+ --c-brand-subtle: rgba(5,163,65,0.08);
170
+ --c-brand-subtle-hover: rgba(5,163,65,0.14);
171
+ --c-brand-muted: rgba(5,163,65,0.04);
172
+ --c-brand-emphasis: #0FAD63;
173
+
174
+ --c-emerald: #0FAD63;
175
+ --c-emerald-hover: #16C172;
176
+ --c-emerald-active: #0A8F50;
177
+ --c-emerald-focus: rgba(15,173,99,0.22);
178
+ --c-emerald-subtle: rgba(15,173,99,0.08);
179
+
180
+ --c-blue: #2572D6;
181
+ --c-blue-hover: #3590F3;
182
+ --c-blue-active: #1A5EB8;
183
+ --c-blue-focus: rgba(26,94,184,0.22);
184
+ --c-blue-subtle: rgba(26,94,184,0.08);
185
+
186
+ --c-status-success: #047A2B;
187
+ --c-status-info: #1A5EB8;
188
+ --c-status-warning: #92570A;
189
+ --c-status-error: #C41D1D;
190
+ --c-status-success-bg: rgba(5,163,65,0.08);
191
+ --c-status-info-bg: rgba(26,94,184,0.08);
192
+ --c-status-warning-bg: rgba(146,87,10,0.08);
193
+ --c-status-error-bg: rgba(196,29,29,0.08);
194
+
195
+ --shadow-xs: 0 1px 2px rgba(0,0,0,0.07);
196
+ --shadow-sm: 0 1px 4px rgba(0,0,0,0.10);
197
+ --shadow-md: 0 4px 10px rgba(0,0,0,0.12);
198
+ --shadow-lg: 0 10px 24px rgba(0,0,0,0.14);
199
+ --shadow-xl: 0 20px 40px rgba(0,0,0,0.18);
200
+ --shadow-glow-brand: 0 0 18px rgba(7,196,79,0.22), 0 0 50px rgba(7,196,79,0.06);
201
+ --shadow-glow-brand-lg: 0 0 32px rgba(7,196,79,0.30), 0 0 70px rgba(7,196,79,0.10);
202
+ --shadow-glow-blue: 0 0 18px rgba(37,114,214,0.20), 0 0 40px rgba(37,114,214,0.05);
203
+ }
204
+
205
+ /* ─── Base resets ─────────────────────────────────────────────────────────── */
206
+ *, *::before, *::after { box-sizing: border-box; }
207
+
208
+ body {
209
+ font-family: var(--font-sans);
210
+ background-color: var(--c-bg);
211
+ color: var(--c-text);
212
+ -webkit-font-smoothing: antialiased;
213
+ -moz-osx-font-smoothing: grayscale;
214
+ }
215
+
216
+ /* ─── Scrollbar (dark) ────────────────────────────────────────────────────── */
217
+ ::-webkit-scrollbar { width: 6px; height: 6px; }
218
+ ::-webkit-scrollbar-track { background: transparent; }
219
+ ::-webkit-scrollbar-thumb { background: var(--c-border-mid); border-radius: 9999px; }
220
+ ::-webkit-scrollbar-thumb:hover { background: var(--c-border-strong); }
@@ -0,0 +1,68 @@
1
+ import type { Config } from 'tailwindcss';
2
+
3
+ const config: Config = {
4
+ darkMode: ['class', '[data-theme="dark"]'],
5
+ content: ['./src/**/*.{ts,tsx}'],
6
+ theme: {
7
+ extend: {
8
+ colors: {
9
+ // Brand — malachite green
10
+ brand: {
11
+ 50: '#EDFFF5',
12
+ 100: '#C9FFE1',
13
+ 200: '#63F5A8',
14
+ 300: '#20F07A',
15
+ 400: '#09E85E', // malachite — primary
16
+ 450: '#0CF568',
17
+ 500: '#07C44F',
18
+ 550: '#16C172', // emerald
19
+ 600: '#0FAD63',
20
+ 700: '#0A8048',
21
+ 800: '#055230',
22
+ 900: '#022818',
23
+ },
24
+ // Porcelain (off-white)
25
+ porcelain: '#FFFFFC',
26
+ // Token-mapped (rely on CSS vars)
27
+ surface: 'var(--c-bg-surface)',
28
+ border: 'var(--c-border)',
29
+ },
30
+ fontFamily: {
31
+ display: ['Ruda', 'sans-serif'],
32
+ sans: ['Inter', 'system-ui', 'sans-serif'],
33
+ mono: ['JetBrains Mono', 'monospace'],
34
+ },
35
+ boxShadow: {
36
+ 'glow-brand': '0 0 20px rgba(9,232,94,0.28), 0 0 60px rgba(9,232,94,0.08)',
37
+ 'glow-brand-lg': '0 0 40px rgba(9,232,94,0.35), 0 0 80px rgba(9,232,94,0.12)',
38
+ 'glow-blue': '0 0 20px rgba(53,144,243,0.25), 0 0 50px rgba(53,144,243,0.07)',
39
+ },
40
+ borderRadius: {
41
+ sm: '2px',
42
+ base: '4px',
43
+ md: '6px',
44
+ lg: '8px',
45
+ xl: '12px',
46
+ '2xl': '16px',
47
+ '3xl': '24px',
48
+ },
49
+ keyframes: {
50
+ 'marquee-x': {
51
+ from: { transform: 'translateX(0)' },
52
+ to: { transform: 'translateX(-50%)' },
53
+ },
54
+ shimmer: {
55
+ '0%': { backgroundPosition: '-400px 0' },
56
+ '100%': { backgroundPosition: '400px 0' },
57
+ },
58
+ },
59
+ animation: {
60
+ 'marquee-x': 'marquee-x 30s linear infinite',
61
+ shimmer: 'shimmer 1.5s ease-in-out infinite',
62
+ },
63
+ },
64
+ },
65
+ plugins: [],
66
+ };
67
+
68
+ export default config;
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "lib": ["ESNext", "DOM", "DOM.Iterable"],
5
+ "module": "ESNext",
6
+ "moduleResolution": "Bundler",
7
+ "jsx": "react-jsx",
8
+ "strict": true,
9
+ "skipLibCheck": true,
10
+ "esModuleInterop": true,
11
+ "allowSyntheticDefaultImports": true,
12
+ "declaration": true,
13
+ "declarationMap": true,
14
+ "sourceMap": true,
15
+ "outDir": "dist",
16
+ "baseUrl": ".",
17
+ "paths": {
18
+ "@rechta/tokens": ["../tokens/dist/index.d.ts"]
19
+ }
20
+ },
21
+ "include": ["src"],
22
+ "exclude": ["node_modules", "dist", "src/stories"]
23
+ }
@@ -0,0 +1,24 @@
1
+ import { defineConfig } from 'tsup';
2
+
3
+ export default defineConfig({
4
+ entry: {
5
+ index: 'src/index.ts',
6
+ 'atoms/index': 'src/components/atoms/index.ts',
7
+ 'molecules/index': 'src/components/molecules/index.ts',
8
+ 'organisms/index': 'src/components/organisms/index.ts',
9
+ 'charts/index': 'src/components/charts/index.ts',
10
+ },
11
+ format: ['esm'],
12
+ dts: true,
13
+ splitting: true,
14
+ sourcemap: true,
15
+ clean: true,
16
+ treeshake: true,
17
+ external: ['react', 'react-dom'],
18
+ banner: {
19
+ js: '"use client";',
20
+ },
21
+ esbuildOptions(options) {
22
+ options.jsx = 'automatic';
23
+ },
24
+ });
@@ -0,0 +1,17 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+ import path from 'path';
4
+
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ resolve: {
8
+ alias: {
9
+ '@rechta/tokens': path.resolve(__dirname, '../tokens/dist/index.js'),
10
+ },
11
+ },
12
+ css: {
13
+ postcss: {
14
+ plugins: [],
15
+ },
16
+ },
17
+ });
@@ -0,0 +1,2 @@
1
+ packages:
2
+ - 'packages/*'
package/turbo.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://turbo.build/schema.json",
3
+ "ui": "tui",
4
+ "tasks": {
5
+ "build": {
6
+ "dependsOn": ["^build"],
7
+ "inputs": ["$TURBO_DEFAULT$", ".env*"],
8
+ "outputs": ["dist/**"]
9
+ },
10
+ "dev": {
11
+ "cache": false,
12
+ "persistent": true
13
+ },
14
+ "storybook": {
15
+ "cache": false,
16
+ "persistent": true
17
+ },
18
+ "build-storybook": {
19
+ "dependsOn": ["^build"],
20
+ "outputs": ["storybook-static/**"]
21
+ },
22
+ "lint": {
23
+ "dependsOn": ["^build"]
24
+ },
25
+ "test": {
26
+ "dependsOn": ["^build"],
27
+ "outputs": ["coverage/**"]
28
+ },
29
+ "clean": {
30
+ "cache": false
31
+ }
32
+ }
33
+ }