@biza-gov/token-css 0.0.0-stage → 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 +543 -3
- package/base.css +204 -0
- package/globals.css +20 -0
- package/package.json +44 -4
- package/theme.css +521 -0
- package/tokens.css +800 -0
- package/typography.css +648 -0
package/base.css
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/* ========================================
|
|
2
|
+
GOV TOKEN CSS - BASE
|
|
3
|
+
shadcn/UI variables, base styles, dark mode
|
|
4
|
+
Standalone - no imports needed
|
|
5
|
+
======================================== */
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--background: oklch(1 0 0);
|
|
9
|
+
--foreground: oklch(0.145 0 0);
|
|
10
|
+
--radius: 0.625rem;
|
|
11
|
+
--card: oklch(1 0 0);
|
|
12
|
+
--card-foreground: oklch(0.145 0 0);
|
|
13
|
+
--popover: oklch(1 0 0);
|
|
14
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
15
|
+
--primary: oklch(0.205 0 0);
|
|
16
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
17
|
+
--secondary: oklch(0.97 0 0);
|
|
18
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
19
|
+
--muted: oklch(0.97 0 0);
|
|
20
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
21
|
+
--accent: oklch(0.97 0 0);
|
|
22
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
23
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
24
|
+
--border: oklch(0.922 0 0);
|
|
25
|
+
--input: oklch(0.922 0 0);
|
|
26
|
+
--ring: oklch(0.708 0 0);
|
|
27
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
28
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
29
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
30
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
31
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
32
|
+
--sidebar: oklch(0.985 0 0);
|
|
33
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
34
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
35
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
36
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
37
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
38
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
39
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@layer base {
|
|
43
|
+
button:not(:disabled),
|
|
44
|
+
[role="button"]:not(:disabled) {
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
body {
|
|
49
|
+
background-color: var(--background);
|
|
50
|
+
color: var(--foreground);
|
|
51
|
+
font-family: var(--font-inter), "Noto Sans Thai", sans-serif;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
body {
|
|
56
|
+
color: var(--foreground);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@layer utilities {
|
|
60
|
+
.text-text-primary {
|
|
61
|
+
color: var(--color-text-primary);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.text-text-secondary {
|
|
65
|
+
color: var(--color-text-secondary);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.text-text-tertiary {
|
|
69
|
+
color: var(--color-text-tertiary);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.text-text-placeholder {
|
|
73
|
+
color: var(--color-text-placeholder);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.text-text-critical {
|
|
77
|
+
color: var(--color-text-critical);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* ========================================
|
|
82
|
+
DARK MODE
|
|
83
|
+
======================================== */
|
|
84
|
+
.dark {
|
|
85
|
+
--background: oklch(0.145 0 0);
|
|
86
|
+
--foreground: oklch(0.985 0 0);
|
|
87
|
+
--card: oklch(0.205 0 0);
|
|
88
|
+
--card-foreground: oklch(0.985 0 0);
|
|
89
|
+
--popover: oklch(0.205 0 0);
|
|
90
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
91
|
+
--primary: oklch(0.922 0 0);
|
|
92
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
93
|
+
--secondary: oklch(0.269 0 0);
|
|
94
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
95
|
+
--muted: oklch(0.269 0 0);
|
|
96
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
97
|
+
--accent: oklch(0.269 0 0);
|
|
98
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
99
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
100
|
+
--border: oklch(1 0 0 / 10%);
|
|
101
|
+
--input: oklch(1 0 0 / 15%);
|
|
102
|
+
--ring: oklch(0.556 0 0);
|
|
103
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
104
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
105
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
106
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
107
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
108
|
+
--sidebar: oklch(0.205 0 0);
|
|
109
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
110
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
111
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
112
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
113
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
114
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
115
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
116
|
+
|
|
117
|
+
/* Design Token Dark Mode Overrides */
|
|
118
|
+
--color-text-primary: var(--color-alias-text-colors-primary-dark);
|
|
119
|
+
--color-text-secondary: var(--color-alias-text-colors-secondary-dark);
|
|
120
|
+
--color-text-tertiary: var(--color-alias-text-colors-tertiary-dark);
|
|
121
|
+
--color-text-critical: var(--color-alias-text-colors-critical-dark);
|
|
122
|
+
--color-border-default: var(--color-border-colors-default-dark);
|
|
123
|
+
--color-border-tags: var(--color-border-colors-tags-dark);
|
|
124
|
+
--color-icon-default: var(--color-icon-color-default-dark);
|
|
125
|
+
--color-field-default: var(--color-text-field-default-dark);
|
|
126
|
+
|
|
127
|
+
/* Additional Dark Mode Overrides */
|
|
128
|
+
--color-alias-text-colors-placeholder: #6b7280;
|
|
129
|
+
--color-text-field-disable: #1f2937;
|
|
130
|
+
--color-border-colors-neutral: #374151;
|
|
131
|
+
--color-alias-color-brand-text-dark: #f1f5f9;
|
|
132
|
+
|
|
133
|
+
/* Dark mode shadows */
|
|
134
|
+
--shadow-smooth-low: var(--effect-shadow-smooth-low-dark-0-offsetx)
|
|
135
|
+
var(--effect-shadow-smooth-low-dark-0-offsety)
|
|
136
|
+
var(--effect-shadow-smooth-low-dark-0-radius)
|
|
137
|
+
var(--effect-shadow-smooth-low-dark-0-spread)
|
|
138
|
+
color-mix(
|
|
139
|
+
in srgb,
|
|
140
|
+
var(--effect-shadow-smooth-low-dark-0-color) 25%,
|
|
141
|
+
transparent
|
|
142
|
+
),
|
|
143
|
+
var(--effect-shadow-smooth-low-dark-1-offsetx)
|
|
144
|
+
var(--effect-shadow-smooth-low-dark-1-offsety)
|
|
145
|
+
var(--effect-shadow-smooth-low-dark-1-radius)
|
|
146
|
+
var(--effect-shadow-smooth-low-dark-1-spread)
|
|
147
|
+
color-mix(
|
|
148
|
+
in srgb,
|
|
149
|
+
var(--effect-shadow-smooth-low-dark-1-color) 20%,
|
|
150
|
+
transparent
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
--shadow-smooth-medium: var(--effect-shadow-smooth-medium-dark-0-offsetx)
|
|
154
|
+
var(--effect-shadow-smooth-medium-dark-0-offsety)
|
|
155
|
+
var(--effect-shadow-smooth-medium-dark-0-radius)
|
|
156
|
+
var(--effect-shadow-smooth-medium-dark-0-spread)
|
|
157
|
+
color-mix(
|
|
158
|
+
in srgb,
|
|
159
|
+
var(--effect-shadow-smooth-medium-dark-0-color) 30%,
|
|
160
|
+
transparent
|
|
161
|
+
),
|
|
162
|
+
var(--effect-shadow-smooth-medium-dark-1-offsetx)
|
|
163
|
+
var(--effect-shadow-smooth-medium-dark-1-offsety)
|
|
164
|
+
var(--effect-shadow-smooth-medium-dark-1-radius)
|
|
165
|
+
var(--effect-shadow-smooth-medium-dark-1-spread)
|
|
166
|
+
color-mix(
|
|
167
|
+
in srgb,
|
|
168
|
+
var(--effect-shadow-smooth-medium-dark-1-color) 20%,
|
|
169
|
+
transparent
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
--shadow-smooth-high: var(--effect-shadow-smooth-high-dark-0-offsetx)
|
|
173
|
+
var(--effect-shadow-smooth-high-dark-0-offsety)
|
|
174
|
+
var(--effect-shadow-smooth-high-dark-0-radius)
|
|
175
|
+
var(--effect-shadow-smooth-high-dark-0-spread)
|
|
176
|
+
color-mix(
|
|
177
|
+
in srgb,
|
|
178
|
+
var(--effect-shadow-smooth-high-dark-0-color) 35%,
|
|
179
|
+
transparent
|
|
180
|
+
),
|
|
181
|
+
var(--effect-shadow-smooth-high-dark-1-offsetx)
|
|
182
|
+
var(--effect-shadow-smooth-high-dark-1-offsety)
|
|
183
|
+
var(--effect-shadow-smooth-high-dark-1-radius)
|
|
184
|
+
var(--effect-shadow-smooth-high-dark-1-spread)
|
|
185
|
+
color-mix(
|
|
186
|
+
in srgb,
|
|
187
|
+
var(--effect-shadow-smooth-high-dark-1-color) 20%,
|
|
188
|
+
transparent
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* ========================================
|
|
193
|
+
DARK MODE - Form Elements
|
|
194
|
+
======================================== */
|
|
195
|
+
.dark label {
|
|
196
|
+
color: #d1d5db;
|
|
197
|
+
}
|
|
198
|
+
.dark input,
|
|
199
|
+
.dark select,
|
|
200
|
+
.dark textarea {
|
|
201
|
+
background-color: #1f2937;
|
|
202
|
+
color: #f3f4f6;
|
|
203
|
+
border-color: #374151;
|
|
204
|
+
}
|
package/globals.css
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* ========================================
|
|
2
|
+
GOV TOKEN CSS - GLOBALS (All-in-One Bundle)
|
|
3
|
+
Convenience import: loads everything
|
|
4
|
+
|
|
5
|
+
For selective imports, use:
|
|
6
|
+
@import "gov-token-css/tokens"; → CSS variables only
|
|
7
|
+
@import "gov-token-css/base"; → shadcn vars + dark mode
|
|
8
|
+
@import "gov-token-css/theme"; → Tailwind v4 theme mappings
|
|
9
|
+
@import "gov-token-css/typography"; → responsive typography classes
|
|
10
|
+
|
|
11
|
+
Optional: add @import "tw-animate-css"; for animations
|
|
12
|
+
======================================== */
|
|
13
|
+
|
|
14
|
+
@import "tailwindcss";
|
|
15
|
+
@import "./tokens.css";
|
|
16
|
+
@import "./base.css";
|
|
17
|
+
@import "./theme.css";
|
|
18
|
+
@import "./typography.css";
|
|
19
|
+
|
|
20
|
+
@custom-variant dark (&:is(.dark *));
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@biza-gov/token-css",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Government Design System - CSS Design Tokens, Typography, Shadows, and Dark Mode (Modular)",
|
|
5
|
+
"main": "globals.css",
|
|
6
|
+
"style": "globals.css",
|
|
7
|
+
"files": [
|
|
8
|
+
"tokens.css",
|
|
9
|
+
"base.css",
|
|
10
|
+
"theme.css",
|
|
11
|
+
"typography.css",
|
|
12
|
+
"globals.css",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./globals.css",
|
|
17
|
+
"./tokens": "./tokens.css",
|
|
18
|
+
"./base": "./base.css",
|
|
19
|
+
"./theme": "./theme.css",
|
|
20
|
+
"./typography": "./typography.css",
|
|
21
|
+
"./globals": "./globals.css"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"test": "node __tests__/dark-tokens.test.mjs"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"design-tokens",
|
|
28
|
+
"css",
|
|
29
|
+
"government",
|
|
30
|
+
"tailwind",
|
|
31
|
+
"shadcn",
|
|
32
|
+
"typography",
|
|
33
|
+
"dark-mode",
|
|
34
|
+
"modular"
|
|
35
|
+
],
|
|
36
|
+
"author": "Jakprim",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public",
|
|
40
|
+
"tag": "latest"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"tailwindcss": "^4",
|
|
44
|
+
"@tailwindcss/postcss": "^4"
|
|
45
|
+
}
|
|
46
|
+
}
|