@correlaid/design-tokens 1.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/README.md ADDED
@@ -0,0 +1,111 @@
1
+ # CorrelAid Design Tokens
2
+
3
+ Design tokens for CorrelAid, built with [Style Dictionary](https://github.com/style-dictionary/style-dictionary).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @correlaid/design-tokens
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### CSS
14
+
15
+ ```css
16
+ @import '@correlaid/design-tokens/css';
17
+
18
+ .button {
19
+ background-color: var(--color-primary-800);
20
+ padding: var(--space-4);
21
+ border-radius: var(--radius-base);
22
+ }
23
+ ```
24
+
25
+ ### SCSS
26
+
27
+ ```scss
28
+ @import '@correlaid/design-tokens/scss';
29
+
30
+ .button {
31
+ background-color: $color-primary-800;
32
+ padding: $space-4;
33
+ border-radius: $radius-base;
34
+ }
35
+ ```
36
+
37
+ ### JavaScript/TypeScript
38
+
39
+ ```javascript
40
+ import tokens from '@correlaid/design-tokens';
41
+
42
+ const Button = styled.button`
43
+ background-color: ${tokens.color.primary['800']};
44
+ padding: ${tokens.space['4']};
45
+ border-radius: ${tokens.radius.base};
46
+ `;
47
+ ```
48
+
49
+ ### JSON
50
+
51
+ ```javascript
52
+ import tokens from '@correlaid/design-tokens/json';
53
+ ```
54
+
55
+ ## Available Tokens
56
+
57
+ ### Colors
58
+ - **Primary**: 50-900 scale
59
+ - **Gray**: 50-900 scale
60
+ - **Green**: extra-light, light, base, dark
61
+ - **Lab Colors**: blue (light, medium, dark), pink (medium, light), muted
62
+ - **Semantic**: success, warning, error, info
63
+ - **Base**: white, black, black-light, black-muted
64
+
65
+ ### Typography
66
+ - **Font Families**: main (Roboto), accent (Inter), mono
67
+ - **Font Sizes**: xs, sm, base, lg, xl, 2xl, 3xl, 4xl, 5xl
68
+ - **Font Weights**: light, normal, medium, semibold, bold, black, heavy
69
+ - **Line Heights**: tight, normal, relaxed, loose
70
+
71
+ ### Spacing
72
+ - **Scale**: 1-20 (based on 4px/8px system)
73
+
74
+ ### Border Radius
75
+ - **Sizes**: sm, base, md, lg, xl, 2xl, full
76
+
77
+ ### Shadows
78
+ - **Levels**: sm, base, md, lg, xl, 2xl
79
+
80
+ ### Gradients
81
+ - **lr**: Left to right gradient
82
+ - **rl**: Right to left gradient
83
+
84
+ ## Development
85
+
86
+ ### Build tokens
87
+
88
+ ```bash
89
+ npm run build
90
+ ```
91
+
92
+ ### Clean build directory
93
+
94
+ ```bash
95
+ npm run clean
96
+ ```
97
+
98
+ ## Token Structure
99
+
100
+ Tokens are defined in JSON files following the [W3C Design Token Format](https://design-tokens.github.io/community-group/format/) in the `tokens/` directory:
101
+
102
+ - `color.json` - Color palette
103
+ - `typography.json` - Typography settings
104
+ - `spacing.json` - Spacing scale
105
+ - `border.json` - Border radius values
106
+ - `shadow.json` - Shadow definitions
107
+ - `gradient.json` - Gradient definitions
108
+
109
+ ## License
110
+
111
+ ISC
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ :root {
6
+ --radius-sm: 0.125rem;
7
+ --radius-base: 0.25rem;
8
+ --radius-md: 0.375rem;
9
+ --radius-lg: 0.5rem;
10
+ --radius-xl: 0.75rem;
11
+ --radius-2xl: 1rem;
12
+ --radius-full: 9999px;
13
+ --color-white: #fff;
14
+ --color-primary-50: #eff6ff;
15
+ --color-primary-100: #dbeafe;
16
+ --color-primary-200: #bfdbfe;
17
+ --color-primary-300: #93c5fd;
18
+ --color-primary-400: #60a5fa;
19
+ --color-primary-600: #2563eb;
20
+ --color-primary-700: #1d4ed8;
21
+ --color-primary-800: #1e40af;
22
+ --color-primary-900: #0f4799;
23
+ --color-gray-50: #f9fafb;
24
+ --color-gray-100: #f3f4f6;
25
+ --color-gray-200: #e5e7eb;
26
+ --color-gray-300: #d1d5db;
27
+ --color-gray-400: #9ca3af;
28
+ --color-gray-500: #6b7280;
29
+ --color-gray-600: #4b5563;
30
+ --color-gray-700: #374151;
31
+ --color-gray-800: #1f2937;
32
+ --color-gray-900: #111827;
33
+ --color-green-extra-light: #e4f3e7;
34
+ --color-green-light: #c4e38a;
35
+ --color-green-base: #89cc96;
36
+ --color-green-dark: #26541b;
37
+ --color-bg-light: #f2f7fd;
38
+ --color-lab-blue-light: #4787e5;
39
+ --color-lab-blue-medium: #5582dc;
40
+ --color-lab-pink-medium: #ffa4be;
41
+ --color-lab-pink-light: #f6f2ff;
42
+ --color-lab-muted: #6f91c2;
43
+ --color-success: #10b981;
44
+ --color-warning: #f59e0b;
45
+ --color-error: #ef4444;
46
+ --gradient-lr: linear-gradient(to right, hsl(0deg, 0%, 100%) 0%, hsla(0deg, 0%, 100%, 0.738) 19%, hsla(0deg, 0%, 100%, 0.541) 34%, hsla(0deg, 0%, 100%, 0.382) 47%, hsla(0deg, 0%, 100%, 0.278) 56.5%, hsla(0deg, 0%, 100%, 0.194) 65%, hsla(0deg, 0%, 100%, 0.126) 73%, hsla(0deg, 0%, 100%, 0.075) 80.2%, hsla(0deg, 0%, 100%, 0.042) 86.1%, hsla(0deg, 0%, 100%, 0.021) 91%, hsla(0deg, 0%, 100%, 0.008) 95.2%, hsla(0deg, 0%, 100%, 0.002) 98.2%, hsla(0deg, 0%, 100%, 0) 100%);
47
+ --gradient-rl: linear-gradient(to left, hsl(0deg, 0%, 100%) 0%, hsla(0deg, 0%, 100%, 0.738) 19%, hsla(0deg, 0%, 100%, 0.541) 34%, hsla(0deg, 0%, 100%, 0.382) 47%, hsla(0deg, 0%, 100%, 0.278) 56.5%, hsla(0deg, 0%, 100%, 0.194) 65%, hsla(0deg, 0%, 100%, 0.126) 73%, hsla(0deg, 0%, 100%, 0.075) 80.2%, hsla(0deg, 0%, 100%, 0.042) 86.1%, hsla(0deg, 0%, 100%, 0.021) 91%, hsla(0deg, 0%, 100%, 0.008) 95.2%, hsla(0deg, 0%, 100%, 0.002) 98.2%, hsla(0deg, 0%, 100%, 0) 100%);
48
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.03);
49
+ --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px -1px rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
50
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.12), 0 2px 4px -2px rgba(0, 0, 0, 0.08), 0 8px 12px -2px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
51
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.12), 0 4px 6px -4px rgba(0, 0, 0, 0.08), 0 16px 24px -4px rgba(0, 0, 0, 0.06), 0 2px 8px 0 rgba(0, 0, 0, 0.04);
52
+ --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.14), 0 8px 10px -6px rgba(0, 0, 0, 0.1), 0 32px 48px -8px rgba(0, 0, 0, 0.08), 0 4px 12px 0 rgba(0, 0, 0, 0.05);
53
+ --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 12px 24px -8px rgba(0, 0, 0, 0.12), 0 48px 64px -12px rgba(0, 0, 0, 0.1), 0 8px 16px 0 rgba(0, 0, 0, 0.06);
54
+ --space-1: 0.25rem;
55
+ --space-2: 0.5rem;
56
+ --space-3: 0.75rem;
57
+ --space-4: 1rem;
58
+ --space-5: 1.25rem;
59
+ --space-6: 1.5rem;
60
+ --space-8: 2rem;
61
+ --space-10: 2.5rem;
62
+ --space-12: 3rem;
63
+ --space-16: 4rem;
64
+ --space-20: 5rem;
65
+ --font-family-main: var(--font-roboto), -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, oxygen, ubuntu, cantarell, sans-serif;
66
+ --font-family-accent: var(--font-inter), -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, oxygen, ubuntu, cantarell, sans-serif;
67
+ --font-family-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', menlo, consolas, 'DejaVu Sans Mono', monospace;
68
+ --font-size-xs: 0.75rem;
69
+ --font-size-sm: 0.875rem;
70
+ --font-size-base: 18px;
71
+ --font-size-lg: 1.125rem;
72
+ --font-size-xl: 1.25rem;
73
+ --font-size-2xl: 1.5rem;
74
+ --font-size-3xl: 1.875rem;
75
+ --font-size-4xl: 2.25rem;
76
+ --font-size-5xl: 3rem;
77
+ --font-weight-light: 300;
78
+ --font-weight-normal: 400;
79
+ --font-weight-medium: 500;
80
+ --font-weight-semibold: 600;
81
+ --font-weight-bold: 700;
82
+ --font-weight-black: 800;
83
+ --font-weight-heavy: 900;
84
+ --font-line-height-tight: 1.25;
85
+ --font-line-height-normal: 1.5;
86
+ --font-line-height-relaxed: 1.75;
87
+ --font-line-height-loose: 2;
88
+ --color-primary-500: var(--color-primary-800);
89
+ --color-key: var(--color-primary-800);
90
+ --color-lab-blue-dark: var(--color-primary-900);
91
+ --color-black: var(--color-gray-900);
92
+ --color-black-light: var(--color-gray-800);
93
+ --color-black-muted: var(--color-gray-700);
94
+ --color-gray-muted: var(--color-gray-500);
95
+ --card-title-size: var(--font-size-xl);
96
+ --color-text: var(--color-black-light);
97
+ --color-info: var(--color-key);
98
+ }