@firstprateek/vastu-tokens 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/LICENSE +15 -0
- package/README.md +35 -2
- package/dist/index.d.ts +43 -0
- package/dist/index.js +189 -0
- package/dist/lekha.css +148 -0
- package/dist/lekha.json +122 -0
- package/dist/tokens.json +187 -0
- package/dist/vastu.css +148 -0
- package/dist/vastu.json +122 -0
- package/package.json +46 -3
- package/src/brands/lekha/base.tokens.json +168 -0
- package/src/brands/lekha/dark.tokens.json +12 -0
- package/src/brands/lekha/high-contrast.tokens.json +12 -0
- package/src/brands/lekha/light.tokens.json +68 -0
- package/src/brands/vastu/base.tokens.json +173 -0
- package/src/brands/vastu/dark.tokens.json +55 -0
- package/src/brands/vastu/high-contrast.tokens.json +55 -0
- package/src/brands/vastu/light.tokens.json +68 -0
- package/src/contrast-pairs.json +17 -0
- package/src/reference.tokens.json +235 -0
package/dist/tokens.json
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
{
|
|
2
|
+
"color.surface.default": {
|
|
3
|
+
"cssVar": "--va-color-surface-default",
|
|
4
|
+
"type": "color",
|
|
5
|
+
"description": "Page and component background"
|
|
6
|
+
},
|
|
7
|
+
"color.surface.subtle": {
|
|
8
|
+
"cssVar": "--va-color-surface-subtle",
|
|
9
|
+
"type": "color",
|
|
10
|
+
"description": "Hover backgrounds, read-only fields, quiet panels"
|
|
11
|
+
},
|
|
12
|
+
"color.text.default": {
|
|
13
|
+
"cssVar": "--va-color-text-default",
|
|
14
|
+
"type": "color",
|
|
15
|
+
"description": "Body text and headings"
|
|
16
|
+
},
|
|
17
|
+
"color.text.muted": {
|
|
18
|
+
"cssVar": "--va-color-text-muted",
|
|
19
|
+
"type": "color",
|
|
20
|
+
"description": "Secondary text: help text, captions, metadata"
|
|
21
|
+
},
|
|
22
|
+
"color.text.on-accent": {
|
|
23
|
+
"cssVar": "--va-color-text-on-accent",
|
|
24
|
+
"type": "color",
|
|
25
|
+
"description": "Text and icons on an accent background"
|
|
26
|
+
},
|
|
27
|
+
"color.text.on-danger": {
|
|
28
|
+
"cssVar": "--va-color-text-on-danger",
|
|
29
|
+
"type": "color",
|
|
30
|
+
"description": "Text and icons on a danger background"
|
|
31
|
+
},
|
|
32
|
+
"color.border.subtle": {
|
|
33
|
+
"cssVar": "--va-color-border-subtle",
|
|
34
|
+
"type": "color",
|
|
35
|
+
"description": "Dividers, card and panel borders"
|
|
36
|
+
},
|
|
37
|
+
"color.border.control": {
|
|
38
|
+
"cssVar": "--va-color-border-control",
|
|
39
|
+
"type": "color",
|
|
40
|
+
"description": "Borders of inputs and secondary buttons"
|
|
41
|
+
},
|
|
42
|
+
"color.accent.default": {
|
|
43
|
+
"cssVar": "--va-color-accent-default",
|
|
44
|
+
"type": "color",
|
|
45
|
+
"description": "Primary actions, links, selected and checked states"
|
|
46
|
+
},
|
|
47
|
+
"color.accent.hover": {
|
|
48
|
+
"cssVar": "--va-color-accent-hover",
|
|
49
|
+
"type": "color",
|
|
50
|
+
"description": "Hover state of accent backgrounds"
|
|
51
|
+
},
|
|
52
|
+
"color.danger.default": {
|
|
53
|
+
"cssVar": "--va-color-danger-default",
|
|
54
|
+
"type": "color",
|
|
55
|
+
"description": "Destructive actions and error text"
|
|
56
|
+
},
|
|
57
|
+
"color.danger.hover": {
|
|
58
|
+
"cssVar": "--va-color-danger-hover",
|
|
59
|
+
"type": "color",
|
|
60
|
+
"description": "Hover state of danger backgrounds"
|
|
61
|
+
},
|
|
62
|
+
"color.focus": {
|
|
63
|
+
"cssVar": "--va-color-focus",
|
|
64
|
+
"type": "color",
|
|
65
|
+
"description": "Keyboard focus ring"
|
|
66
|
+
},
|
|
67
|
+
"font.family.ui": {
|
|
68
|
+
"cssVar": "--va-font-family-ui",
|
|
69
|
+
"type": "fontFamily",
|
|
70
|
+
"description": "Controls and UI text"
|
|
71
|
+
},
|
|
72
|
+
"font.family.reading": {
|
|
73
|
+
"cssVar": "--va-font-family-reading",
|
|
74
|
+
"type": "fontFamily",
|
|
75
|
+
"description": "Headings and long-form text"
|
|
76
|
+
},
|
|
77
|
+
"font.family.mono": {
|
|
78
|
+
"cssVar": "--va-font-family-mono",
|
|
79
|
+
"type": "fontFamily",
|
|
80
|
+
"description": ""
|
|
81
|
+
},
|
|
82
|
+
"font.size.sm": {
|
|
83
|
+
"cssVar": "--va-font-size-sm",
|
|
84
|
+
"type": "dimension",
|
|
85
|
+
"description": ""
|
|
86
|
+
},
|
|
87
|
+
"font.size.md": {
|
|
88
|
+
"cssVar": "--va-font-size-md",
|
|
89
|
+
"type": "dimension",
|
|
90
|
+
"description": ""
|
|
91
|
+
},
|
|
92
|
+
"font.size.lg": {
|
|
93
|
+
"cssVar": "--va-font-size-lg",
|
|
94
|
+
"type": "dimension",
|
|
95
|
+
"description": ""
|
|
96
|
+
},
|
|
97
|
+
"font.weight.regular": {
|
|
98
|
+
"cssVar": "--va-font-weight-regular",
|
|
99
|
+
"type": "fontWeight",
|
|
100
|
+
"description": ""
|
|
101
|
+
},
|
|
102
|
+
"font.weight.medium": {
|
|
103
|
+
"cssVar": "--va-font-weight-medium",
|
|
104
|
+
"type": "fontWeight",
|
|
105
|
+
"description": ""
|
|
106
|
+
},
|
|
107
|
+
"font.weight.bold": {
|
|
108
|
+
"cssVar": "--va-font-weight-bold",
|
|
109
|
+
"type": "fontWeight",
|
|
110
|
+
"description": ""
|
|
111
|
+
},
|
|
112
|
+
"radius.control": {
|
|
113
|
+
"cssVar": "--va-radius-control",
|
|
114
|
+
"type": "dimension",
|
|
115
|
+
"description": "Buttons, fields: near-square, as on the personal site"
|
|
116
|
+
},
|
|
117
|
+
"radius.surface": {
|
|
118
|
+
"cssVar": "--va-radius-surface",
|
|
119
|
+
"type": "dimension",
|
|
120
|
+
"description": ""
|
|
121
|
+
},
|
|
122
|
+
"radius.round": {
|
|
123
|
+
"cssVar": "--va-radius-round",
|
|
124
|
+
"type": "dimension",
|
|
125
|
+
"description": ""
|
|
126
|
+
},
|
|
127
|
+
"space.inline.xs": {
|
|
128
|
+
"cssVar": "--va-space-inline-xs",
|
|
129
|
+
"type": "dimension",
|
|
130
|
+
"description": "Space: extra small (4px), e.g. between an icon and its text"
|
|
131
|
+
},
|
|
132
|
+
"space.inline.sm": {
|
|
133
|
+
"cssVar": "--va-space-inline-sm",
|
|
134
|
+
"type": "dimension",
|
|
135
|
+
"description": "Space: small (8px), e.g. gaps in a tight row"
|
|
136
|
+
},
|
|
137
|
+
"space.inline.md": {
|
|
138
|
+
"cssVar": "--va-space-inline-md",
|
|
139
|
+
"type": "dimension",
|
|
140
|
+
"description": "Space: medium (12px), e.g. padding inside a control"
|
|
141
|
+
},
|
|
142
|
+
"space.inline.lg": {
|
|
143
|
+
"cssVar": "--va-space-inline-lg",
|
|
144
|
+
"type": "dimension",
|
|
145
|
+
"description": "Space: large (20px), e.g. between form fields or sections"
|
|
146
|
+
},
|
|
147
|
+
"space.gap.sm": {
|
|
148
|
+
"cssVar": "--va-space-gap-sm",
|
|
149
|
+
"type": "dimension",
|
|
150
|
+
"description": "Gap between closely related items (4px)"
|
|
151
|
+
},
|
|
152
|
+
"space.gap.md": {
|
|
153
|
+
"cssVar": "--va-space-gap-md",
|
|
154
|
+
"type": "dimension",
|
|
155
|
+
"description": "Gap between items in a row or list (8px)"
|
|
156
|
+
},
|
|
157
|
+
"size.control.sm": {
|
|
158
|
+
"cssVar": "--va-size-control-sm",
|
|
159
|
+
"type": "dimension",
|
|
160
|
+
"description": "32px: still above the 24px WCAG 2.2 target size"
|
|
161
|
+
},
|
|
162
|
+
"size.control.md": {
|
|
163
|
+
"cssVar": "--va-size-control-md",
|
|
164
|
+
"type": "dimension",
|
|
165
|
+
"description": ""
|
|
166
|
+
},
|
|
167
|
+
"size.control.lg": {
|
|
168
|
+
"cssVar": "--va-size-control-lg",
|
|
169
|
+
"type": "dimension",
|
|
170
|
+
"description": ""
|
|
171
|
+
},
|
|
172
|
+
"size.focus-ring": {
|
|
173
|
+
"cssVar": "--va-size-focus-ring",
|
|
174
|
+
"type": "dimension",
|
|
175
|
+
"description": ""
|
|
176
|
+
},
|
|
177
|
+
"motion.duration.fast": {
|
|
178
|
+
"cssVar": "--va-motion-duration-fast",
|
|
179
|
+
"type": "duration",
|
|
180
|
+
"description": ""
|
|
181
|
+
},
|
|
182
|
+
"motion.duration.slow": {
|
|
183
|
+
"cssVar": "--va-motion-duration-slow",
|
|
184
|
+
"type": "duration",
|
|
185
|
+
"description": ""
|
|
186
|
+
}
|
|
187
|
+
}
|
package/dist/vastu.css
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/* Vastu tokens, brand "vastu". Generated by packages/tokens/build.js; do not edit.
|
|
2
|
+
Applies to elements with data-va-brand="vastu", and to the whole page when no element sets
|
|
3
|
+
data-va-brand (load one brand file per page, or set data-va-brand when you load several).
|
|
4
|
+
Light is the default mode. Set data-va-mode="light|dark|high-contrast" on the same element or
|
|
5
|
+
one inside it; without it the mode follows prefers-color-scheme and prefers-contrast. */
|
|
6
|
+
|
|
7
|
+
:root:not([data-va-brand]),
|
|
8
|
+
[data-va-brand="vastu"] {
|
|
9
|
+
color-scheme: light;
|
|
10
|
+
--va-color-surface-default: #faf6ef;
|
|
11
|
+
--va-color-surface-subtle: #f2ebde;
|
|
12
|
+
--va-color-text-default: #1e1b2e;
|
|
13
|
+
--va-color-text-muted: #5b5670;
|
|
14
|
+
--va-color-text-on-accent: #ffffff;
|
|
15
|
+
--va-color-text-on-danger: #ffffff;
|
|
16
|
+
--va-color-border-subtle: #e3d9c6;
|
|
17
|
+
--va-color-border-control: #8a7f6c;
|
|
18
|
+
--va-color-accent-default: #3730a3;
|
|
19
|
+
--va-color-accent-hover: #2e2785;
|
|
20
|
+
--va-color-danger-default: #a8412a;
|
|
21
|
+
--va-color-danger-hover: #8c3522;
|
|
22
|
+
--va-color-focus: #3730a3;
|
|
23
|
+
--va-font-family-ui: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
|
24
|
+
--va-font-family-reading: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
|
25
|
+
--va-font-family-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
26
|
+
--va-font-size-sm: 0.875rem;
|
|
27
|
+
--va-font-size-md: 1rem;
|
|
28
|
+
--va-font-size-lg: 1.125rem;
|
|
29
|
+
--va-font-weight-regular: 400;
|
|
30
|
+
--va-font-weight-medium: 500;
|
|
31
|
+
--va-font-weight-bold: 600;
|
|
32
|
+
--va-radius-control: 6px;
|
|
33
|
+
--va-radius-surface: 10px;
|
|
34
|
+
--va-radius-round: 999px;
|
|
35
|
+
--va-space-inline-xs: 0.25rem;
|
|
36
|
+
--va-space-inline-sm: 0.5rem;
|
|
37
|
+
--va-space-inline-md: 0.75rem;
|
|
38
|
+
--va-space-inline-lg: 1.25rem;
|
|
39
|
+
--va-space-gap-sm: 0.25rem;
|
|
40
|
+
--va-space-gap-md: 0.5rem;
|
|
41
|
+
--va-size-control-sm: 2rem;
|
|
42
|
+
--va-size-control-md: 2.5rem;
|
|
43
|
+
--va-size-control-lg: 3rem;
|
|
44
|
+
--va-size-focus-ring: 2px;
|
|
45
|
+
--va-motion-duration-fast: 120ms;
|
|
46
|
+
--va-motion-duration-slow: 240ms;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (prefers-color-scheme: dark) {
|
|
50
|
+
:root:not([data-va-brand]):not([data-va-mode]),
|
|
51
|
+
[data-va-brand="vastu"]:not([data-va-mode]) {
|
|
52
|
+
color-scheme: dark;
|
|
53
|
+
--va-color-surface-default: #15131f;
|
|
54
|
+
--va-color-surface-subtle: #1e1b2c;
|
|
55
|
+
--va-color-text-default: #ece7dc;
|
|
56
|
+
--va-color-text-muted: #a49fb5;
|
|
57
|
+
--va-color-text-on-accent: #15131f;
|
|
58
|
+
--va-color-text-on-danger: #15131f;
|
|
59
|
+
--va-color-border-subtle: #2c2840;
|
|
60
|
+
--va-color-border-control: #7a7494;
|
|
61
|
+
--va-color-accent-default: #a5b4fc;
|
|
62
|
+
--va-color-accent-hover: #b8c4fd;
|
|
63
|
+
--va-color-danger-default: #f0a08c;
|
|
64
|
+
--va-color-danger-hover: #f5b8a8;
|
|
65
|
+
--va-color-focus: #a5b4fc;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (prefers-contrast: more) {
|
|
70
|
+
:root:not([data-va-brand]):not([data-va-mode]),
|
|
71
|
+
[data-va-brand="vastu"]:not([data-va-mode]) {
|
|
72
|
+
color-scheme: light;
|
|
73
|
+
--va-color-surface-default: #ffffff;
|
|
74
|
+
--va-color-surface-subtle: #ffffff;
|
|
75
|
+
--va-color-text-default: #000000;
|
|
76
|
+
--va-color-text-muted: #1e1b2e;
|
|
77
|
+
--va-color-text-on-accent: #ffffff;
|
|
78
|
+
--va-color-text-on-danger: #ffffff;
|
|
79
|
+
--va-color-border-subtle: #000000;
|
|
80
|
+
--va-color-border-control: #000000;
|
|
81
|
+
--va-color-accent-default: #2e1f8f;
|
|
82
|
+
--va-color-accent-hover: #000000;
|
|
83
|
+
--va-color-danger-default: #7a2a18;
|
|
84
|
+
--va-color-danger-hover: #000000;
|
|
85
|
+
--va-color-focus: #000000;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:root:not([data-va-brand])[data-va-mode="light"],
|
|
90
|
+
:root:not([data-va-brand]) [data-va-mode="light"],
|
|
91
|
+
[data-va-brand="vastu"][data-va-mode="light"],
|
|
92
|
+
[data-va-brand="vastu"] [data-va-mode="light"] {
|
|
93
|
+
color-scheme: light;
|
|
94
|
+
--va-color-surface-default: #faf6ef;
|
|
95
|
+
--va-color-surface-subtle: #f2ebde;
|
|
96
|
+
--va-color-text-default: #1e1b2e;
|
|
97
|
+
--va-color-text-muted: #5b5670;
|
|
98
|
+
--va-color-text-on-accent: #ffffff;
|
|
99
|
+
--va-color-text-on-danger: #ffffff;
|
|
100
|
+
--va-color-border-subtle: #e3d9c6;
|
|
101
|
+
--va-color-border-control: #8a7f6c;
|
|
102
|
+
--va-color-accent-default: #3730a3;
|
|
103
|
+
--va-color-accent-hover: #2e2785;
|
|
104
|
+
--va-color-danger-default: #a8412a;
|
|
105
|
+
--va-color-danger-hover: #8c3522;
|
|
106
|
+
--va-color-focus: #3730a3;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:root:not([data-va-brand])[data-va-mode="dark"],
|
|
110
|
+
:root:not([data-va-brand]) [data-va-mode="dark"],
|
|
111
|
+
[data-va-brand="vastu"][data-va-mode="dark"],
|
|
112
|
+
[data-va-brand="vastu"] [data-va-mode="dark"] {
|
|
113
|
+
color-scheme: dark;
|
|
114
|
+
--va-color-surface-default: #15131f;
|
|
115
|
+
--va-color-surface-subtle: #1e1b2c;
|
|
116
|
+
--va-color-text-default: #ece7dc;
|
|
117
|
+
--va-color-text-muted: #a49fb5;
|
|
118
|
+
--va-color-text-on-accent: #15131f;
|
|
119
|
+
--va-color-text-on-danger: #15131f;
|
|
120
|
+
--va-color-border-subtle: #2c2840;
|
|
121
|
+
--va-color-border-control: #7a7494;
|
|
122
|
+
--va-color-accent-default: #a5b4fc;
|
|
123
|
+
--va-color-accent-hover: #b8c4fd;
|
|
124
|
+
--va-color-danger-default: #f0a08c;
|
|
125
|
+
--va-color-danger-hover: #f5b8a8;
|
|
126
|
+
--va-color-focus: #a5b4fc;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:root:not([data-va-brand])[data-va-mode="high-contrast"],
|
|
130
|
+
:root:not([data-va-brand]) [data-va-mode="high-contrast"],
|
|
131
|
+
[data-va-brand="vastu"][data-va-mode="high-contrast"],
|
|
132
|
+
[data-va-brand="vastu"] [data-va-mode="high-contrast"] {
|
|
133
|
+
color-scheme: light;
|
|
134
|
+
--va-color-surface-default: #ffffff;
|
|
135
|
+
--va-color-surface-subtle: #ffffff;
|
|
136
|
+
--va-color-text-default: #000000;
|
|
137
|
+
--va-color-text-muted: #1e1b2e;
|
|
138
|
+
--va-color-text-on-accent: #ffffff;
|
|
139
|
+
--va-color-text-on-danger: #ffffff;
|
|
140
|
+
--va-color-border-subtle: #000000;
|
|
141
|
+
--va-color-border-control: #000000;
|
|
142
|
+
--va-color-accent-default: #2e1f8f;
|
|
143
|
+
--va-color-accent-hover: #000000;
|
|
144
|
+
--va-color-danger-default: #7a2a18;
|
|
145
|
+
--va-color-danger-hover: #000000;
|
|
146
|
+
--va-color-focus: #000000;
|
|
147
|
+
}
|
|
148
|
+
|
package/dist/vastu.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"brand": "vastu",
|
|
3
|
+
"modes": {
|
|
4
|
+
"light": {
|
|
5
|
+
"color.surface.default": "#faf6ef",
|
|
6
|
+
"color.surface.subtle": "#f2ebde",
|
|
7
|
+
"color.text.default": "#1e1b2e",
|
|
8
|
+
"color.text.muted": "#5b5670",
|
|
9
|
+
"color.text.on-accent": "#ffffff",
|
|
10
|
+
"color.text.on-danger": "#ffffff",
|
|
11
|
+
"color.border.subtle": "#e3d9c6",
|
|
12
|
+
"color.border.control": "#8a7f6c",
|
|
13
|
+
"color.accent.default": "#3730a3",
|
|
14
|
+
"color.accent.hover": "#2e2785",
|
|
15
|
+
"color.danger.default": "#a8412a",
|
|
16
|
+
"color.danger.hover": "#8c3522",
|
|
17
|
+
"color.focus": "#3730a3",
|
|
18
|
+
"font.family.ui": "'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
19
|
+
"font.family.reading": "'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
20
|
+
"font.family.mono": "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
21
|
+
"font.size.sm": "0.875rem",
|
|
22
|
+
"font.size.md": "1rem",
|
|
23
|
+
"font.size.lg": "1.125rem",
|
|
24
|
+
"font.weight.regular": 400,
|
|
25
|
+
"font.weight.medium": 500,
|
|
26
|
+
"font.weight.bold": 600,
|
|
27
|
+
"radius.control": "6px",
|
|
28
|
+
"radius.surface": "10px",
|
|
29
|
+
"radius.round": "999px",
|
|
30
|
+
"space.inline.xs": "0.25rem",
|
|
31
|
+
"space.inline.sm": "0.5rem",
|
|
32
|
+
"space.inline.md": "0.75rem",
|
|
33
|
+
"space.inline.lg": "1.25rem",
|
|
34
|
+
"space.gap.sm": "0.25rem",
|
|
35
|
+
"space.gap.md": "0.5rem",
|
|
36
|
+
"size.control.sm": "2rem",
|
|
37
|
+
"size.control.md": "2.5rem",
|
|
38
|
+
"size.control.lg": "3rem",
|
|
39
|
+
"size.focus-ring": "2px",
|
|
40
|
+
"motion.duration.fast": "120ms",
|
|
41
|
+
"motion.duration.slow": "240ms"
|
|
42
|
+
},
|
|
43
|
+
"dark": {
|
|
44
|
+
"color.surface.default": "#15131f",
|
|
45
|
+
"color.surface.subtle": "#1e1b2c",
|
|
46
|
+
"color.text.default": "#ece7dc",
|
|
47
|
+
"color.text.muted": "#a49fb5",
|
|
48
|
+
"color.text.on-accent": "#15131f",
|
|
49
|
+
"color.text.on-danger": "#15131f",
|
|
50
|
+
"color.border.subtle": "#2c2840",
|
|
51
|
+
"color.border.control": "#7a7494",
|
|
52
|
+
"color.accent.default": "#a5b4fc",
|
|
53
|
+
"color.accent.hover": "#b8c4fd",
|
|
54
|
+
"color.danger.default": "#f0a08c",
|
|
55
|
+
"color.danger.hover": "#f5b8a8",
|
|
56
|
+
"color.focus": "#a5b4fc",
|
|
57
|
+
"font.family.ui": "'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
58
|
+
"font.family.reading": "'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
59
|
+
"font.family.mono": "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
60
|
+
"font.size.sm": "0.875rem",
|
|
61
|
+
"font.size.md": "1rem",
|
|
62
|
+
"font.size.lg": "1.125rem",
|
|
63
|
+
"font.weight.regular": 400,
|
|
64
|
+
"font.weight.medium": 500,
|
|
65
|
+
"font.weight.bold": 600,
|
|
66
|
+
"radius.control": "6px",
|
|
67
|
+
"radius.surface": "10px",
|
|
68
|
+
"radius.round": "999px",
|
|
69
|
+
"space.inline.xs": "0.25rem",
|
|
70
|
+
"space.inline.sm": "0.5rem",
|
|
71
|
+
"space.inline.md": "0.75rem",
|
|
72
|
+
"space.inline.lg": "1.25rem",
|
|
73
|
+
"space.gap.sm": "0.25rem",
|
|
74
|
+
"space.gap.md": "0.5rem",
|
|
75
|
+
"size.control.sm": "2rem",
|
|
76
|
+
"size.control.md": "2.5rem",
|
|
77
|
+
"size.control.lg": "3rem",
|
|
78
|
+
"size.focus-ring": "2px",
|
|
79
|
+
"motion.duration.fast": "120ms",
|
|
80
|
+
"motion.duration.slow": "240ms"
|
|
81
|
+
},
|
|
82
|
+
"high-contrast": {
|
|
83
|
+
"color.surface.default": "#ffffff",
|
|
84
|
+
"color.surface.subtle": "#ffffff",
|
|
85
|
+
"color.text.default": "#000000",
|
|
86
|
+
"color.text.muted": "#1e1b2e",
|
|
87
|
+
"color.text.on-accent": "#ffffff",
|
|
88
|
+
"color.text.on-danger": "#ffffff",
|
|
89
|
+
"color.border.subtle": "#000000",
|
|
90
|
+
"color.border.control": "#000000",
|
|
91
|
+
"color.accent.default": "#2e1f8f",
|
|
92
|
+
"color.accent.hover": "#000000",
|
|
93
|
+
"color.danger.default": "#7a2a18",
|
|
94
|
+
"color.danger.hover": "#000000",
|
|
95
|
+
"color.focus": "#000000",
|
|
96
|
+
"font.family.ui": "'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
97
|
+
"font.family.reading": "'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
98
|
+
"font.family.mono": "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
99
|
+
"font.size.sm": "0.875rem",
|
|
100
|
+
"font.size.md": "1rem",
|
|
101
|
+
"font.size.lg": "1.125rem",
|
|
102
|
+
"font.weight.regular": 400,
|
|
103
|
+
"font.weight.medium": 500,
|
|
104
|
+
"font.weight.bold": 600,
|
|
105
|
+
"radius.control": "6px",
|
|
106
|
+
"radius.surface": "10px",
|
|
107
|
+
"radius.round": "999px",
|
|
108
|
+
"space.inline.xs": "0.25rem",
|
|
109
|
+
"space.inline.sm": "0.5rem",
|
|
110
|
+
"space.inline.md": "0.75rem",
|
|
111
|
+
"space.inline.lg": "1.25rem",
|
|
112
|
+
"space.gap.sm": "0.25rem",
|
|
113
|
+
"space.gap.md": "0.5rem",
|
|
114
|
+
"size.control.sm": "2rem",
|
|
115
|
+
"size.control.md": "2.5rem",
|
|
116
|
+
"size.control.lg": "3rem",
|
|
117
|
+
"size.focus-ring": "2px",
|
|
118
|
+
"motion.duration.fast": "120ms",
|
|
119
|
+
"motion.duration.slow": "240ms"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firstprateek/vastu-tokens",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Design tokens for Vastu: DTCG sources and built CSS, JSON and TypeScript, per brand and mode",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./vastu.css": "./dist/vastu.css",
|
|
8
|
+
"./vastu.json": "./dist/vastu.json",
|
|
9
|
+
"./lekha.css": "./dist/lekha.css",
|
|
10
|
+
"./lekha.json": "./dist/lekha.json",
|
|
11
|
+
"./tokens.json": "./dist/tokens.json",
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"src",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"*.css"
|
|
25
|
+
],
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/firstprateek/vastu.git",
|
|
29
|
+
"directory": "packages/tokens"
|
|
30
|
+
},
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"style-dictionary": "^5.8.0"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://firstprateek.github.io/vastu/",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/firstprateek/vastu/issues"
|
|
38
|
+
},
|
|
39
|
+
"author": "firstprateek",
|
|
40
|
+
"keywords": [
|
|
41
|
+
"vastu",
|
|
42
|
+
"design system",
|
|
43
|
+
"web components",
|
|
44
|
+
"lit"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "node build.js"
|
|
48
|
+
}
|
|
6
49
|
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Lekha brand, mode-independent system tokens: type, shape, space, size, motion.",
|
|
3
|
+
"font": {
|
|
4
|
+
"family": {
|
|
5
|
+
"$type": "fontFamily",
|
|
6
|
+
"ui": {
|
|
7
|
+
"$value": [
|
|
8
|
+
"system-ui",
|
|
9
|
+
"-apple-system",
|
|
10
|
+
"Segoe UI",
|
|
11
|
+
"Roboto",
|
|
12
|
+
"sans-serif"
|
|
13
|
+
],
|
|
14
|
+
"$description": "Controls and UI text"
|
|
15
|
+
},
|
|
16
|
+
"reading": {
|
|
17
|
+
"$value": [
|
|
18
|
+
"Source Serif 4",
|
|
19
|
+
"Source Serif Pro",
|
|
20
|
+
"Georgia",
|
|
21
|
+
"serif"
|
|
22
|
+
],
|
|
23
|
+
"$description": "Headings and long-form text"
|
|
24
|
+
},
|
|
25
|
+
"mono": {
|
|
26
|
+
"$value": [
|
|
27
|
+
"ui-monospace",
|
|
28
|
+
"SFMono-Regular",
|
|
29
|
+
"Menlo",
|
|
30
|
+
"monospace"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"size": {
|
|
35
|
+
"$type": "dimension",
|
|
36
|
+
"sm": {
|
|
37
|
+
"$value": {
|
|
38
|
+
"value": 0.875,
|
|
39
|
+
"unit": "rem"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"md": {
|
|
43
|
+
"$value": {
|
|
44
|
+
"value": 1,
|
|
45
|
+
"unit": "rem"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"lg": {
|
|
49
|
+
"$value": {
|
|
50
|
+
"value": 1.125,
|
|
51
|
+
"unit": "rem"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"weight": {
|
|
56
|
+
"$type": "fontWeight",
|
|
57
|
+
"regular": {
|
|
58
|
+
"$value": 400
|
|
59
|
+
},
|
|
60
|
+
"medium": {
|
|
61
|
+
"$value": 500
|
|
62
|
+
},
|
|
63
|
+
"bold": {
|
|
64
|
+
"$value": 600
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"radius": {
|
|
69
|
+
"$type": "dimension",
|
|
70
|
+
"control": {
|
|
71
|
+
"$value": {
|
|
72
|
+
"value": 2,
|
|
73
|
+
"unit": "px"
|
|
74
|
+
},
|
|
75
|
+
"$description": "Buttons, fields: near-square, as on the personal site"
|
|
76
|
+
},
|
|
77
|
+
"surface": {
|
|
78
|
+
"$value": {
|
|
79
|
+
"value": 4,
|
|
80
|
+
"unit": "px"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"round": {
|
|
84
|
+
"$value": {
|
|
85
|
+
"value": 999,
|
|
86
|
+
"unit": "px"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"space": {
|
|
91
|
+
"$type": "dimension",
|
|
92
|
+
"inline": {
|
|
93
|
+
"xs": {
|
|
94
|
+
"$value": "{dimension.1}",
|
|
95
|
+
"$description": "Space: extra small (4px), e.g. between an icon and its text"
|
|
96
|
+
},
|
|
97
|
+
"sm": {
|
|
98
|
+
"$value": "{dimension.2}",
|
|
99
|
+
"$description": "Space: small (8px), e.g. gaps in a tight row"
|
|
100
|
+
},
|
|
101
|
+
"md": {
|
|
102
|
+
"$value": "{dimension.3}",
|
|
103
|
+
"$description": "Space: medium (12px), e.g. padding inside a control"
|
|
104
|
+
},
|
|
105
|
+
"lg": {
|
|
106
|
+
"$value": "{dimension.5}",
|
|
107
|
+
"$description": "Space: large (20px), e.g. between form fields or sections"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"gap": {
|
|
111
|
+
"sm": {
|
|
112
|
+
"$value": "{dimension.1}",
|
|
113
|
+
"$description": "Gap between closely related items (4px)"
|
|
114
|
+
},
|
|
115
|
+
"md": {
|
|
116
|
+
"$value": "{dimension.2}",
|
|
117
|
+
"$description": "Gap between items in a row or list (8px)"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"size": {
|
|
122
|
+
"$type": "dimension",
|
|
123
|
+
"control": {
|
|
124
|
+
"sm": {
|
|
125
|
+
"$value": {
|
|
126
|
+
"value": 2,
|
|
127
|
+
"unit": "rem"
|
|
128
|
+
},
|
|
129
|
+
"$description": "32px: still above the 24px WCAG 2.2 target size"
|
|
130
|
+
},
|
|
131
|
+
"md": {
|
|
132
|
+
"$value": {
|
|
133
|
+
"value": 2.5,
|
|
134
|
+
"unit": "rem"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"lg": {
|
|
138
|
+
"$value": {
|
|
139
|
+
"value": 3,
|
|
140
|
+
"unit": "rem"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"focus-ring": {
|
|
145
|
+
"$value": {
|
|
146
|
+
"value": 2,
|
|
147
|
+
"unit": "px"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"motion": {
|
|
152
|
+
"duration": {
|
|
153
|
+
"$type": "duration",
|
|
154
|
+
"fast": {
|
|
155
|
+
"$value": {
|
|
156
|
+
"value": 120,
|
|
157
|
+
"unit": "ms"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"slow": {
|
|
161
|
+
"$value": {
|
|
162
|
+
"value": 240,
|
|
163
|
+
"unit": "ms"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Lekha brand, dark mode.",
|
|
3
|
+
"color": {
|
|
4
|
+
"$type": "color",
|
|
5
|
+
"surface": { "default": { "$value": "{color.night.900}" }, "subtle": { "$value": "{color.night.800}" } },
|
|
6
|
+
"text": { "default": { "$value": "{color.night.50}" }, "muted": { "$value": "{color.night.400}" }, "on-accent": { "$value": "{color.teal.950}" }, "on-danger": { "$value": "{color.teal.950}" } },
|
|
7
|
+
"border": { "subtle": { "$value": "{color.night.700}" }, "control": { "$value": "{color.night.500}" } },
|
|
8
|
+
"accent": { "default": { "$value": "{color.teal.300}" }, "hover": { "$value": "{color.teal.400}" } },
|
|
9
|
+
"danger": { "default": { "$value": "{color.brick.300}" }, "hover": { "$value": "{color.brick.400}" } },
|
|
10
|
+
"focus": { "$value": "{color.teal.300}" }
|
|
11
|
+
}
|
|
12
|
+
}
|