@gv-tech/design-system 2.1.0 → 2.1.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/.github/CONTRIBUTING.md +14 -10
- package/.github/RELEASING.md +1 -1
- package/.github/copilot-instructions.md +30 -62
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +7 -0
- package/README.md +8 -9
- package/dist/design-system.css +1 -1
- package/dist/favicon.png +0 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +737 -689
- package/dist/index.es.js.map +1 -1
- package/dist/logo192.png +0 -0
- package/dist/logo512.png +0 -0
- package/dist/manifest.json +3 -3
- package/dist/pages/ColorTokensDocs.d.ts.map +1 -1
- package/dist/theme/tokens.d.ts +115 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/index.html +1 -1
- package/package.json +9 -9
- package/public/favicon.png +0 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +3 -3
- package/src/globals.css +2 -1
- package/src/index.ts +1 -1
- package/src/pages/ColorTokensDocs.tsx +173 -136
- package/src/theme/tokens.ts +68 -0
- package/.nvmrc +0 -1
- package/babel.config.js +0 -3
- package/dist/favicon.ico +0 -0
- package/dist/lib/tokens.d.ts +0 -54
- package/dist/lib/tokens.d.ts.map +0 -1
- package/netlify.toml +0 -6
- package/public/favicon.ico +0 -0
- package/serve.json +0 -4
- package/src/lib/tokens.ts +0 -54
- package/temp.md +0 -292
package/dist/logo192.png
CHANGED
|
Binary file
|
package/dist/logo512.png
CHANGED
|
Binary file
|
package/dist/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorTokensDocs.d.ts","sourceRoot":"","sources":["../../src/pages/ColorTokensDocs.tsx"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"ColorTokensDocs.d.ts","sourceRoot":"","sources":["../../src/pages/ColorTokensDocs.tsx"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,4CAoN9B"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design system tokens for Garcia Ventures.
|
|
3
|
+
* This file defines the core palette and semantic tokens for the theme system.
|
|
4
|
+
*/
|
|
5
|
+
export declare const palette: {
|
|
6
|
+
readonly brand: {
|
|
7
|
+
readonly blue: "hsl(225 73% 57%)";
|
|
8
|
+
readonly green: "hsl(151 66% 27%)";
|
|
9
|
+
readonly floralWhite: "hsl(40 100% 97%)";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const theme: {
|
|
13
|
+
readonly light: {
|
|
14
|
+
readonly background: "hsl(0 0% 96%)";
|
|
15
|
+
readonly foreground: "hsl(222 47% 11%)";
|
|
16
|
+
readonly card: "hsl(0 0% 100%)";
|
|
17
|
+
readonly cardForeground: "hsl(222 47% 11%)";
|
|
18
|
+
readonly popover: "hsl(0 0% 100%)";
|
|
19
|
+
readonly popoverForeground: "hsl(222 47% 11%)";
|
|
20
|
+
readonly primary: "hsl(225 73% 57%)";
|
|
21
|
+
readonly primaryForeground: "hsl(0 0% 100%)";
|
|
22
|
+
readonly secondary: "hsl(93 28% 54%)";
|
|
23
|
+
readonly secondaryForeground: "hsl(0 0% 100%)";
|
|
24
|
+
readonly muted: "hsl(0 0% 92%)";
|
|
25
|
+
readonly mutedForeground: "hsl(215 16% 47%)";
|
|
26
|
+
readonly accent: "hsl(0 0% 88%)";
|
|
27
|
+
readonly accentForeground: "hsl(222 47% 11%)";
|
|
28
|
+
readonly destructive: "hsl(0 84.2% 60.2%)";
|
|
29
|
+
readonly destructiveForeground: "hsl(0 0% 100%)";
|
|
30
|
+
readonly border: "hsl(0 0% 89%)";
|
|
31
|
+
readonly input: "hsl(0 0% 89%)";
|
|
32
|
+
readonly ring: "hsl(222 47% 11%)";
|
|
33
|
+
readonly radius: "0.5rem";
|
|
34
|
+
};
|
|
35
|
+
readonly dark: {
|
|
36
|
+
readonly background: "hsl(0 0% 9%)";
|
|
37
|
+
readonly foreground: "hsl(0 0% 100%)";
|
|
38
|
+
readonly card: "hsl(0 0% 14%)";
|
|
39
|
+
readonly cardForeground: "hsl(0 0% 100%)";
|
|
40
|
+
readonly popover: "hsl(0 0% 11%)";
|
|
41
|
+
readonly popoverForeground: "hsl(0 0% 100%)";
|
|
42
|
+
readonly primary: "hsl(227 96% 71%)";
|
|
43
|
+
readonly primaryForeground: "hsl(0 0% 9%)";
|
|
44
|
+
readonly secondary: "hsl(96 44% 61%)";
|
|
45
|
+
readonly secondaryForeground: "hsl(0 0% 9%)";
|
|
46
|
+
readonly muted: "hsl(0 0% 6%)";
|
|
47
|
+
readonly mutedForeground: "hsl(0 0% 70%)";
|
|
48
|
+
readonly accent: "hsl(0 0% 15%)";
|
|
49
|
+
readonly accentForeground: "hsl(0 0% 100%)";
|
|
50
|
+
readonly destructive: "hsl(0 62.8% 30.6%)";
|
|
51
|
+
readonly destructiveForeground: "hsl(0 0% 100%)";
|
|
52
|
+
readonly border: "hsl(0 0% 18%)";
|
|
53
|
+
readonly input: "hsl(0 0% 18%)";
|
|
54
|
+
readonly ring: "hsl(0 0% 90%)";
|
|
55
|
+
readonly radius: "0.5rem";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const tokens: {
|
|
59
|
+
readonly palette: {
|
|
60
|
+
readonly brand: {
|
|
61
|
+
readonly blue: "hsl(225 73% 57%)";
|
|
62
|
+
readonly green: "hsl(151 66% 27%)";
|
|
63
|
+
readonly floralWhite: "hsl(40 100% 97%)";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
readonly theme: {
|
|
67
|
+
readonly light: {
|
|
68
|
+
readonly background: "hsl(0 0% 96%)";
|
|
69
|
+
readonly foreground: "hsl(222 47% 11%)";
|
|
70
|
+
readonly card: "hsl(0 0% 100%)";
|
|
71
|
+
readonly cardForeground: "hsl(222 47% 11%)";
|
|
72
|
+
readonly popover: "hsl(0 0% 100%)";
|
|
73
|
+
readonly popoverForeground: "hsl(222 47% 11%)";
|
|
74
|
+
readonly primary: "hsl(225 73% 57%)";
|
|
75
|
+
readonly primaryForeground: "hsl(0 0% 100%)";
|
|
76
|
+
readonly secondary: "hsl(93 28% 54%)";
|
|
77
|
+
readonly secondaryForeground: "hsl(0 0% 100%)";
|
|
78
|
+
readonly muted: "hsl(0 0% 92%)";
|
|
79
|
+
readonly mutedForeground: "hsl(215 16% 47%)";
|
|
80
|
+
readonly accent: "hsl(0 0% 88%)";
|
|
81
|
+
readonly accentForeground: "hsl(222 47% 11%)";
|
|
82
|
+
readonly destructive: "hsl(0 84.2% 60.2%)";
|
|
83
|
+
readonly destructiveForeground: "hsl(0 0% 100%)";
|
|
84
|
+
readonly border: "hsl(0 0% 89%)";
|
|
85
|
+
readonly input: "hsl(0 0% 89%)";
|
|
86
|
+
readonly ring: "hsl(222 47% 11%)";
|
|
87
|
+
readonly radius: "0.5rem";
|
|
88
|
+
};
|
|
89
|
+
readonly dark: {
|
|
90
|
+
readonly background: "hsl(0 0% 9%)";
|
|
91
|
+
readonly foreground: "hsl(0 0% 100%)";
|
|
92
|
+
readonly card: "hsl(0 0% 14%)";
|
|
93
|
+
readonly cardForeground: "hsl(0 0% 100%)";
|
|
94
|
+
readonly popover: "hsl(0 0% 11%)";
|
|
95
|
+
readonly popoverForeground: "hsl(0 0% 100%)";
|
|
96
|
+
readonly primary: "hsl(227 96% 71%)";
|
|
97
|
+
readonly primaryForeground: "hsl(0 0% 9%)";
|
|
98
|
+
readonly secondary: "hsl(96 44% 61%)";
|
|
99
|
+
readonly secondaryForeground: "hsl(0 0% 9%)";
|
|
100
|
+
readonly muted: "hsl(0 0% 6%)";
|
|
101
|
+
readonly mutedForeground: "hsl(0 0% 70%)";
|
|
102
|
+
readonly accent: "hsl(0 0% 15%)";
|
|
103
|
+
readonly accentForeground: "hsl(0 0% 100%)";
|
|
104
|
+
readonly destructive: "hsl(0 62.8% 30.6%)";
|
|
105
|
+
readonly destructiveForeground: "hsl(0 0% 100%)";
|
|
106
|
+
readonly border: "hsl(0 0% 18%)";
|
|
107
|
+
readonly input: "hsl(0 0% 18%)";
|
|
108
|
+
readonly ring: "hsl(0 0% 90%)";
|
|
109
|
+
readonly radius: "0.5rem";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export type ThemeTokens = typeof theme.light;
|
|
114
|
+
export type PaletteTokens = typeof palette;
|
|
115
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/theme/tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO;;;;;;CAOV,CAAC;AAEX,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CR,CAAC;AAEX,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGT,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,KAAK,CAAC,KAAK,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,OAAO,OAAO,CAAC"}
|
package/index.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/
|
|
5
|
+
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>GV Tech Design System Playground</title>
|
|
8
8
|
</head>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gv-tech/design-system",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Garcia Ventures react design system",
|
|
5
5
|
"repository": "git@github.com:Garcia-Ventures/gvtech-design.git",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,14 +9,20 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/index.es.js",
|
|
12
|
-
"require": "./dist/index.cjs.js"
|
|
12
|
+
"require": "./dist/index.cjs.js",
|
|
13
|
+
"default": "./dist/index.es.js"
|
|
14
|
+
},
|
|
15
|
+
"./style.css": {
|
|
16
|
+
"style": "./dist/design-system.css",
|
|
17
|
+
"import": "./dist/design-system.css",
|
|
18
|
+
"default": "./dist/design-system.css"
|
|
13
19
|
},
|
|
14
|
-
"./style.css": "./dist/design-system.css",
|
|
15
20
|
"./package.json": "./package.json"
|
|
16
21
|
},
|
|
17
22
|
"main": "dist/index.cjs.js",
|
|
18
23
|
"module": "dist/index.es.js",
|
|
19
24
|
"types": "dist/index.d.ts",
|
|
25
|
+
"style": "dist/design-system.css",
|
|
20
26
|
"scripts": {
|
|
21
27
|
"build": "yarn build:registry && tsc -p tsconfig.build.json && VITE_LIB=true vite build",
|
|
22
28
|
"build:registry": "tsx scripts/build-registry.ts",
|
|
@@ -45,12 +51,6 @@
|
|
|
45
51
|
"prettier --write"
|
|
46
52
|
]
|
|
47
53
|
},
|
|
48
|
-
"babel": {
|
|
49
|
-
"presets": [
|
|
50
|
-
"@babel/preset-env",
|
|
51
|
-
"@babel/preset-react"
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
54
|
"browserslist": {
|
|
55
55
|
"development": [
|
|
56
56
|
"last 1 chrome version",
|
|
Binary file
|
package/public/logo192.png
CHANGED
|
Binary file
|
package/public/logo512.png
CHANGED
|
Binary file
|
package/public/manifest.json
CHANGED
package/src/globals.css
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,177 +1,214 @@
|
|
|
1
1
|
import { CodeBlock } from '@/components/docs/CodeBlock';
|
|
2
2
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
|
3
3
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table';
|
|
4
|
-
import { tokens } from '@/
|
|
4
|
+
import { tokens } from '@/theme/tokens';
|
|
5
5
|
|
|
6
6
|
export function ColorTokensDocs() {
|
|
7
7
|
return (
|
|
8
|
-
<div className="space-y-
|
|
9
|
-
<div className="space-y-
|
|
10
|
-
<h1 className="text-
|
|
11
|
-
<p className="text-
|
|
12
|
-
|
|
8
|
+
<div className="space-y-12">
|
|
9
|
+
<div className="space-y-4">
|
|
10
|
+
<h1 className="text-4xl font-extrabold tracking-tight">Color Tokens</h1>
|
|
11
|
+
<p className="text-xl text-muted-foreground max-w-2xl">
|
|
12
|
+
The Garcia Ventures design system is built on a robust token architecture that ensures consistency,
|
|
13
|
+
accessibility, and easy maintenance across all digital products.
|
|
13
14
|
</p>
|
|
14
15
|
</div>
|
|
15
16
|
|
|
16
|
-
<section className="space-y-
|
|
17
|
-
<h2 className="text-
|
|
17
|
+
<section className="space-y-6">
|
|
18
|
+
<h2 className="text-3xl font-bold tracking-tight">Design Philosophy</h2>
|
|
19
|
+
<div className="grid gap-6 md:grid-cols-3">
|
|
20
|
+
<Card className="bg-primary/5 border-primary/20">
|
|
21
|
+
<CardHeader>
|
|
22
|
+
<CardTitle className="text-lg">Intellect</CardTitle>
|
|
23
|
+
</CardHeader>
|
|
24
|
+
<CardContent>
|
|
25
|
+
<p className="text-sm text-muted-foreground">
|
|
26
|
+
Represented by Royal Blue, signaling depth, trust, and professional expertise.
|
|
27
|
+
</p>
|
|
28
|
+
</CardContent>
|
|
29
|
+
</Card>
|
|
30
|
+
<Card className="bg-secondary/5 border-secondary/20">
|
|
31
|
+
<CardHeader>
|
|
32
|
+
<CardTitle className="text-lg">Stability</CardTitle>
|
|
33
|
+
</CardHeader>
|
|
34
|
+
<CardContent>
|
|
35
|
+
<p className="text-sm text-muted-foreground">
|
|
36
|
+
Rooted in Brand Green, reflecting growth, balance, and environmental consciousness.
|
|
37
|
+
</p>
|
|
38
|
+
</CardContent>
|
|
39
|
+
</Card>
|
|
40
|
+
<Card className="bg-accent/5 border-accent/20">
|
|
41
|
+
<CardHeader>
|
|
42
|
+
<CardTitle className="text-lg">Transparency</CardTitle>
|
|
43
|
+
</CardHeader>
|
|
44
|
+
<CardContent>
|
|
45
|
+
<p className="text-sm text-muted-foreground">
|
|
46
|
+
Expressed through Floral White, prioritizing clarity and a clean user experience.
|
|
47
|
+
</p>
|
|
48
|
+
</CardContent>
|
|
49
|
+
</Card>
|
|
50
|
+
</div>
|
|
51
|
+
</section>
|
|
52
|
+
|
|
53
|
+
<section className="space-y-6">
|
|
54
|
+
<h2 className="text-3xl font-bold tracking-tight">Adoption Guide</h2>
|
|
18
55
|
<p className="text-muted-foreground">
|
|
19
|
-
|
|
20
|
-
across light and dark modes to ensure accessibility and professional aesthetics.
|
|
56
|
+
There are three primary ways to consume these tokens depending on your project's technology stack.
|
|
21
57
|
</p>
|
|
22
58
|
|
|
23
|
-
<div className="
|
|
59
|
+
<div className="space-y-8">
|
|
60
|
+
<div className="space-y-4">
|
|
61
|
+
<h3 className="text-xl font-semibold">1. Tailwind CSS (Recommended)</h3>
|
|
62
|
+
<p className="text-sm text-muted-foreground">
|
|
63
|
+
Most projects should use standard Tailwind utility classes. These are automatically mapped to our tokens
|
|
64
|
+
via CSS variables.
|
|
65
|
+
</p>
|
|
66
|
+
<CodeBlock
|
|
67
|
+
language="tsx"
|
|
68
|
+
code={`// Use standard semantic classes
|
|
69
|
+
<button className="bg-primary text-primary-foreground hover:bg-primary/90">
|
|
70
|
+
Primary Action
|
|
71
|
+
</button>
|
|
72
|
+
|
|
73
|
+
<div className="border-border bg-card text-card-foreground">
|
|
74
|
+
Card Content
|
|
75
|
+
</div>`}
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div className="space-y-4">
|
|
80
|
+
<h3 className="text-xl font-semibold">2. TypeScript / React</h3>
|
|
81
|
+
<p className="text-sm text-muted-foreground">
|
|
82
|
+
For logic-heavy styling or CSS-in-JS solutions, import the \`tokens\` object directly.
|
|
83
|
+
</p>
|
|
84
|
+
<CodeBlock
|
|
85
|
+
language="tsx"
|
|
86
|
+
code={`import { tokens } from '@gv-tech/design-system';
|
|
87
|
+
|
|
88
|
+
const MyComponent = () => {
|
|
89
|
+
return (
|
|
90
|
+
<div style={{ color: tokens.palette.brand.blue }}>
|
|
91
|
+
Using Royal Blue directly
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
};`}
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<div className="space-y-4">
|
|
99
|
+
<h3 className="text-xl font-semibold">3. Vanilla CSS</h3>
|
|
100
|
+
<p className="text-sm text-muted-foreground">
|
|
101
|
+
Directly access the CSS variables in your style tags or external stylesheets.
|
|
102
|
+
</p>
|
|
103
|
+
<CodeBlock
|
|
104
|
+
language="css"
|
|
105
|
+
code={`.custom-element {
|
|
106
|
+
background-color: hsl(var(--primary));
|
|
107
|
+
color: hsl(var(--primary-foreground));
|
|
108
|
+
border: 1px solid hsl(var(--border));
|
|
109
|
+
}`}
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</section>
|
|
114
|
+
|
|
115
|
+
<section className="space-y-6">
|
|
116
|
+
<div className="flex items-center justify-between">
|
|
117
|
+
<h2 className="text-3xl font-bold tracking-tight">Core Palette</h2>
|
|
118
|
+
</div>
|
|
119
|
+
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
24
120
|
<Card>
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<div>
|
|
32
|
-
<p className="text-sm font-medium">Primary (Blue)</p>
|
|
33
|
-
<p className="text-xs text-muted-foreground">Royal Blue / Cornflower</p>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
<div className="flex items-center gap-4">
|
|
37
|
-
<div className="h-10 w-10 rounded-md border" style={{ backgroundColor: 'hsl(93 28% 54%)' }} />
|
|
121
|
+
<CardContent className="pt-6 space-y-4">
|
|
122
|
+
<div
|
|
123
|
+
className="h-24 w-full rounded-lg border shadow-inner"
|
|
124
|
+
style={{ backgroundColor: tokens.palette.brand.blue }}
|
|
125
|
+
/>
|
|
126
|
+
<div className="flex justify-between items-start">
|
|
38
127
|
<div>
|
|
39
|
-
<
|
|
40
|
-
<p className="text-xs text-muted-foreground">
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<div className="flex items-center gap-4">
|
|
44
|
-
<div className="h-10 w-10 rounded-md border" style={{ backgroundColor: 'hsl(210 29% 98%)' }} />
|
|
45
|
-
<div>
|
|
46
|
-
<p className="text-sm font-medium">Neutral (Off-White)</p>
|
|
47
|
-
<p className="text-xs text-muted-foreground">Light Neutral / Floral White</p>
|
|
128
|
+
<h4 className="font-bold">Royal Blue</h4>
|
|
129
|
+
<p className="text-xs text-muted-foreground">Intellect & Trust</p>
|
|
48
130
|
</div>
|
|
131
|
+
<code className="text-xs bg-muted px-1.5 py-0.5 rounded">{tokens.palette.brand.blue}</code>
|
|
49
132
|
</div>
|
|
50
133
|
</CardContent>
|
|
51
134
|
</Card>
|
|
52
|
-
|
|
53
135
|
<Card>
|
|
54
|
-
<
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
136
|
+
<CardContent className="pt-6 space-y-4">
|
|
137
|
+
<div
|
|
138
|
+
className="h-24 w-full rounded-lg border shadow-inner"
|
|
139
|
+
style={{ backgroundColor: tokens.palette.brand.green }}
|
|
140
|
+
/>
|
|
141
|
+
<div className="flex justify-between items-start">
|
|
60
142
|
<div>
|
|
61
|
-
<
|
|
62
|
-
<p className="text-xs text-muted-foreground"
|
|
143
|
+
<h4 className="font-bold">Stability Green</h4>
|
|
144
|
+
<p className="text-xs text-muted-foreground">Growth & Balance</p>
|
|
63
145
|
</div>
|
|
146
|
+
<code className="text-xs bg-muted px-1.5 py-0.5 rounded">{tokens.palette.brand.green}</code>
|
|
64
147
|
</div>
|
|
65
|
-
|
|
66
|
-
|
|
148
|
+
</CardContent>
|
|
149
|
+
</Card>
|
|
150
|
+
<Card>
|
|
151
|
+
<CardContent className="pt-6 space-y-4">
|
|
152
|
+
<div
|
|
153
|
+
className="h-24 w-full rounded-lg border shadow-inner"
|
|
154
|
+
style={{ backgroundColor: tokens.palette.brand.floralWhite }}
|
|
155
|
+
/>
|
|
156
|
+
<div className="flex justify-between items-start">
|
|
67
157
|
<div>
|
|
68
|
-
<
|
|
69
|
-
<p className="text-xs text-muted-foreground"
|
|
158
|
+
<h4 className="font-bold">Floral White</h4>
|
|
159
|
+
<p className="text-xs text-muted-foreground">Transparency & Clarity</p>
|
|
70
160
|
</div>
|
|
161
|
+
<code className="text-xs bg-muted px-1.5 py-0.5 rounded">{tokens.palette.brand.floralWhite}</code>
|
|
71
162
|
</div>
|
|
72
163
|
</CardContent>
|
|
73
164
|
</Card>
|
|
74
165
|
</div>
|
|
75
166
|
</section>
|
|
76
167
|
|
|
77
|
-
<section className="space-y-
|
|
78
|
-
<h2 className="text-
|
|
79
|
-
<
|
|
80
|
-
All color tokens are mapped to standard Tailwind colors via CSS variables in our design system.
|
|
81
|
-
</p>
|
|
82
|
-
<CodeBlock
|
|
83
|
-
language="tsx"
|
|
84
|
-
code={`<div className="bg-primary text-primary-foreground">
|
|
85
|
-
Primary Content
|
|
86
|
-
</div>
|
|
87
|
-
<div className="text-secondary">
|
|
88
|
-
Secondary Accent
|
|
89
|
-
</div>
|
|
90
|
-
<div className="border-border bg-muted/30">
|
|
91
|
-
Muted Container
|
|
92
|
-
</div>`}
|
|
93
|
-
/>
|
|
94
|
-
</section>
|
|
95
|
-
|
|
96
|
-
<section className="space-y-4">
|
|
97
|
-
<h2 className="text-2xl font-semibold tracking-tight">Usage: TypeScript Tokens</h2>
|
|
98
|
-
<p className="text-muted-foreground">
|
|
99
|
-
For programmatic usage or non-Tailwind applications, you can import the raw token values.
|
|
100
|
-
</p>
|
|
101
|
-
<CodeBlock
|
|
102
|
-
language="tsx"
|
|
103
|
-
code={`import { tokens } from '@gv-tech/design-system';
|
|
104
|
-
|
|
105
|
-
// Accessing HSL values
|
|
106
|
-
const primary = tokens.colors.light.primary;
|
|
107
|
-
const brandGreen = tokens.colors.brand.green;`}
|
|
108
|
-
/>
|
|
109
|
-
</section>
|
|
110
|
-
|
|
111
|
-
<section className="space-y-4">
|
|
112
|
-
<h2 className="text-2xl font-semibold tracking-tight">CSS Variables Reference</h2>
|
|
113
|
-
<p className="text-muted-foreground">
|
|
114
|
-
Below is a complete reference of all semantic color tokens available in the design system.
|
|
115
|
-
</p>
|
|
116
|
-
<div className="rounded-md border overflow-hidden">
|
|
168
|
+
<section className="space-y-6">
|
|
169
|
+
<h2 className="text-3xl font-bold tracking-tight">Semantic Tokens Reference</h2>
|
|
170
|
+
<div className="rounded-xl border shadow-sm overflow-hidden">
|
|
117
171
|
<Table>
|
|
118
172
|
<TableHeader>
|
|
119
173
|
<TableRow className="bg-muted/50 hover:bg-muted/50">
|
|
120
|
-
<TableHead>
|
|
174
|
+
<TableHead className="w-[200px]">Token</TableHead>
|
|
175
|
+
<TableHead>Variable Name</TableHead>
|
|
121
176
|
<TableHead>Light Mode</TableHead>
|
|
122
177
|
<TableHead>Dark Mode</TableHead>
|
|
123
178
|
</TableRow>
|
|
124
179
|
</TableHeader>
|
|
125
180
|
<TableBody>
|
|
126
|
-
{(Object.keys(tokens.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
</
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
<TableHeader>
|
|
158
|
-
<TableRow className="bg-muted/50 hover:bg-muted/50">
|
|
159
|
-
<TableHead>Token</TableHead>
|
|
160
|
-
<TableHead>Value</TableHead>
|
|
161
|
-
</TableRow>
|
|
162
|
-
</TableHeader>
|
|
163
|
-
<TableBody>
|
|
164
|
-
{Object.entries(tokens.colors.brand).map(([key, value]) => (
|
|
165
|
-
<TableRow key={key}>
|
|
166
|
-
<TableCell className="font-mono text-xs">tokens.colors.brand.{key}</TableCell>
|
|
167
|
-
<TableCell>
|
|
168
|
-
<div className="flex items-center gap-2">
|
|
169
|
-
<div className="h-4 w-4 rounded-sm border" style={{ backgroundColor: value }} />
|
|
170
|
-
<span className="text-muted-foreground">{value}</span>
|
|
171
|
-
</div>
|
|
172
|
-
</TableCell>
|
|
173
|
-
</TableRow>
|
|
174
|
-
))}
|
|
181
|
+
{(Object.keys(tokens.theme.light) as Array<keyof typeof tokens.theme.light>).map((key) => {
|
|
182
|
+
if (key === 'radius') return null;
|
|
183
|
+
return (
|
|
184
|
+
<TableRow key={key} className="group">
|
|
185
|
+
<TableCell className="font-medium group-hover:text-primary transition-colors">
|
|
186
|
+
{key.charAt(0).toUpperCase() + key.slice(1).replace(/([A-Z])/g, ' $1')}
|
|
187
|
+
</TableCell>
|
|
188
|
+
<TableCell className="font-mono text-xs text-muted-foreground">
|
|
189
|
+
--{key.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase())}
|
|
190
|
+
</TableCell>
|
|
191
|
+
<TableCell>
|
|
192
|
+
<div className="flex items-center gap-3">
|
|
193
|
+
<div
|
|
194
|
+
className="h-6 w-6 rounded-md border shadow-sm"
|
|
195
|
+
style={{ backgroundColor: tokens.theme.light[key] as string }}
|
|
196
|
+
/>
|
|
197
|
+
<span className="text-xs font-mono">{tokens.theme.light[key]}</span>
|
|
198
|
+
</div>
|
|
199
|
+
</TableCell>
|
|
200
|
+
<TableCell>
|
|
201
|
+
<div className="flex items-center gap-3">
|
|
202
|
+
<div
|
|
203
|
+
className="h-6 w-6 rounded-md border shadow-sm"
|
|
204
|
+
style={{ backgroundColor: tokens.theme.dark[key] as string }}
|
|
205
|
+
/>
|
|
206
|
+
<span className="text-xs font-mono">{tokens.theme.dark[key]}</span>
|
|
207
|
+
</div>
|
|
208
|
+
</TableCell>
|
|
209
|
+
</TableRow>
|
|
210
|
+
);
|
|
211
|
+
})}
|
|
175
212
|
</TableBody>
|
|
176
213
|
</Table>
|
|
177
214
|
</div>
|