@whatsaaaa/design-system 0.8.3 → 0.9.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 +13 -11
- package/dist/index.css +63 -0
- package/dist/tailwind/theme.css +9 -0
- package/dist/tokens.css +77 -1
- package/dist/tokens.d.ts +60 -2
- package/dist/tokens.js +118 -2
- package/docs/usage.md +52 -23
- package/package.json +4 -1
- package/specs/button.spec.json +903 -0
- package/specs/input.spec.json +800 -0
- package/specs/spec.schema.json +347 -0
- package/tokens/components/button.tokens.json +75 -0
- package/tokens/components/control.tokens.json +43 -0
- package/tokens/components/field.tokens.json +40 -0
- package/tokens/contrast.json +12 -0
- package/tokens/core.tokens.json +36 -1
- package/tokens/theme-dark.tokens.json +4 -0
- package/tokens/theme-light.tokens.json +8 -0
- package/tokens/whatsaaaa.resolver.json +17 -1
- package/dist/css/nuxt-ui.css +0 -125
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/whatsaaaa/design-system/blob/main/specs/spec.schema.json",
|
|
4
|
+
"title": "Component spec",
|
|
5
|
+
"description": "What every implementation of a component has to draw alike, whatever its framework: its parts, kinds, sizes and states, the token each part takes in each state, its keyboard and accessibility rules, how each implementation maps onto it and the examples its gallery shows. The design system draws no component: it specifies them.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"$schema",
|
|
10
|
+
"component",
|
|
11
|
+
"title",
|
|
12
|
+
"status",
|
|
13
|
+
"changed",
|
|
14
|
+
"summary",
|
|
15
|
+
"use",
|
|
16
|
+
"notFor",
|
|
17
|
+
"parts",
|
|
18
|
+
"variants",
|
|
19
|
+
"sizes",
|
|
20
|
+
"defaultSize",
|
|
21
|
+
"states",
|
|
22
|
+
"stateTable",
|
|
23
|
+
"keyboard",
|
|
24
|
+
"aria",
|
|
25
|
+
"forcedColors",
|
|
26
|
+
"motion",
|
|
27
|
+
"content",
|
|
28
|
+
"implementations",
|
|
29
|
+
"gallery"
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"$schema": {
|
|
33
|
+
"const": "./spec.schema.json"
|
|
34
|
+
},
|
|
35
|
+
"component": {
|
|
36
|
+
"description": "The name of the component, the file's name before `.spec.json` and the first segment of every gallery id.",
|
|
37
|
+
"$ref": "#/$defs/name"
|
|
38
|
+
},
|
|
39
|
+
"title": {
|
|
40
|
+
"description": "The component's name as a page's heading says it.",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1
|
|
43
|
+
},
|
|
44
|
+
"status": {
|
|
45
|
+
"description": "A draft can still change in any release; a stable spec changes as the versioning policy says.",
|
|
46
|
+
"enum": ["draft", "stable"]
|
|
47
|
+
},
|
|
48
|
+
"changed": {
|
|
49
|
+
"description": "The version of the package in which the spec last changed.",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
52
|
+
},
|
|
53
|
+
"summary": {
|
|
54
|
+
"description": "What the component is, in one sentence.",
|
|
55
|
+
"$ref": "#/$defs/sentence"
|
|
56
|
+
},
|
|
57
|
+
"use": {
|
|
58
|
+
"description": "What the component is for.",
|
|
59
|
+
"$ref": "#/$defs/sentences"
|
|
60
|
+
},
|
|
61
|
+
"notFor": {
|
|
62
|
+
"description": "What it is not for, and what to use instead.",
|
|
63
|
+
"$ref": "#/$defs/sentences"
|
|
64
|
+
},
|
|
65
|
+
"parts": {
|
|
66
|
+
"description": "The anatomy: each part by name, what it is. A name is the part's `data-slot` in every implementation, or what an implementation maps it to.",
|
|
67
|
+
"$ref": "#/$defs/described"
|
|
68
|
+
},
|
|
69
|
+
"variants": {
|
|
70
|
+
"description": "The kinds of the component the spec covers, each with what it is for. An implementation may have others: the spec does not cover them.",
|
|
71
|
+
"$ref": "#/$defs/described"
|
|
72
|
+
},
|
|
73
|
+
"sizes": {
|
|
74
|
+
"description": "The sizes, each with where it is used.",
|
|
75
|
+
"type": "object",
|
|
76
|
+
"minProperties": 1,
|
|
77
|
+
"propertyNames": { "$ref": "#/$defs/size" },
|
|
78
|
+
"additionalProperties": { "$ref": "#/$defs/sentence" }
|
|
79
|
+
},
|
|
80
|
+
"defaultSize": {
|
|
81
|
+
"description": "The size of an example whose gallery id names none.",
|
|
82
|
+
"$ref": "#/$defs/size"
|
|
83
|
+
},
|
|
84
|
+
"states": {
|
|
85
|
+
"description": "The states the spec covers, from the closed list every spec and the component tier share, each with when the component is in it.",
|
|
86
|
+
"type": "object",
|
|
87
|
+
"minProperties": 1,
|
|
88
|
+
"propertyNames": { "$ref": "#/$defs/state" },
|
|
89
|
+
"additionalProperties": { "$ref": "#/$defs/sentence" }
|
|
90
|
+
},
|
|
91
|
+
"icons": {
|
|
92
|
+
"description": "The icons the component draws itself, by what they are for, as Lucide names: `loader-circle`.",
|
|
93
|
+
"type": "object",
|
|
94
|
+
"propertyNames": { "$ref": "#/$defs/name" },
|
|
95
|
+
"additionalProperties": { "$ref": "#/$defs/name" }
|
|
96
|
+
},
|
|
97
|
+
"stateTable": {
|
|
98
|
+
"description": "The complete mapping: for each kind, state and part, the token each CSS property takes. A state lists what it changes from rest. Every implementation's parity test reads it.",
|
|
99
|
+
"type": "array",
|
|
100
|
+
"minItems": 1,
|
|
101
|
+
"items": { "$ref": "#/$defs/row" }
|
|
102
|
+
},
|
|
103
|
+
"keyboard": {
|
|
104
|
+
"description": "Each key or set of keys and what it does.",
|
|
105
|
+
"type": "array",
|
|
106
|
+
"items": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["keys", "effect"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"keys": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"minItems": 1,
|
|
114
|
+
"items": { "type": "string", "minLength": 1 }
|
|
115
|
+
},
|
|
116
|
+
"effect": { "$ref": "#/$defs/sentence" }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"aria": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"required": ["pattern", "rules"],
|
|
124
|
+
"properties": {
|
|
125
|
+
"pattern": {
|
|
126
|
+
"description": "The page of the pattern the component follows, in the ARIA Authoring Practices Guide or the HTML standard.",
|
|
127
|
+
"type": "string",
|
|
128
|
+
"pattern": "^https://"
|
|
129
|
+
},
|
|
130
|
+
"rules": {
|
|
131
|
+
"description": "Its names, descriptions, roles and states.",
|
|
132
|
+
"$ref": "#/$defs/sentences"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"forcedColors": {
|
|
137
|
+
"description": "What keeps each edge and each state when the system's colors replace the page's.",
|
|
138
|
+
"$ref": "#/$defs/sentences"
|
|
139
|
+
},
|
|
140
|
+
"motion": {
|
|
141
|
+
"description": "What moves, how fast, and what a reader who asks for less motion still gets.",
|
|
142
|
+
"$ref": "#/$defs/sentences"
|
|
143
|
+
},
|
|
144
|
+
"content": {
|
|
145
|
+
"description": "How to write what the component says, with examples.",
|
|
146
|
+
"$ref": "#/$defs/sentences"
|
|
147
|
+
},
|
|
148
|
+
"notes": {
|
|
149
|
+
"description": "What the spec leaves out or decides against on purpose, and why.",
|
|
150
|
+
"$ref": "#/$defs/sentences"
|
|
151
|
+
},
|
|
152
|
+
"implementations": {
|
|
153
|
+
"description": "Each implementation, by its package's name.",
|
|
154
|
+
"type": "object",
|
|
155
|
+
"minProperties": 1,
|
|
156
|
+
"propertyNames": { "$ref": "#/$defs/name" },
|
|
157
|
+
"additionalProperties": { "$ref": "#/$defs/implementation" }
|
|
158
|
+
},
|
|
159
|
+
"gallery": {
|
|
160
|
+
"description": "The examples every implementation's gallery shows, each marked with its id in `data-spec`: `<component>.<variant>.<state>`, and `.<size>` at the end for a size other than the default.",
|
|
161
|
+
"type": "array",
|
|
162
|
+
"minItems": 1,
|
|
163
|
+
"uniqueItems": true,
|
|
164
|
+
"items": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*\\.[a-z]+(\\.(xs|sm|md|lg|xl))?$"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"$defs": {
|
|
171
|
+
"name": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
|
|
174
|
+
},
|
|
175
|
+
"sentence": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"minLength": 1
|
|
178
|
+
},
|
|
179
|
+
"sentences": {
|
|
180
|
+
"type": "array",
|
|
181
|
+
"items": { "$ref": "#/$defs/sentence" }
|
|
182
|
+
},
|
|
183
|
+
"described": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"minProperties": 1,
|
|
186
|
+
"propertyNames": { "$ref": "#/$defs/name" },
|
|
187
|
+
"additionalProperties": { "$ref": "#/$defs/sentence" }
|
|
188
|
+
},
|
|
189
|
+
"size": {
|
|
190
|
+
"description": "Nuxt UI's five sizes, which every control of the system has.",
|
|
191
|
+
"enum": ["xs", "sm", "md", "lg", "xl"]
|
|
192
|
+
},
|
|
193
|
+
"state": {
|
|
194
|
+
"description": "The closed list of states, the same list the names of the component tier end in.",
|
|
195
|
+
"enum": [
|
|
196
|
+
"rest",
|
|
197
|
+
"hover",
|
|
198
|
+
"active",
|
|
199
|
+
"focus",
|
|
200
|
+
"disabled",
|
|
201
|
+
"checked",
|
|
202
|
+
"indeterminate",
|
|
203
|
+
"invalid",
|
|
204
|
+
"open",
|
|
205
|
+
"selected",
|
|
206
|
+
"current",
|
|
207
|
+
"loading"
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"property": {
|
|
211
|
+
"description": "The CSS properties a row can set, as `getComputedStyle` reads them. A shorthand is read as one value, which it has when its sides agree.",
|
|
212
|
+
"enum": [
|
|
213
|
+
"background-color",
|
|
214
|
+
"color",
|
|
215
|
+
"border-color",
|
|
216
|
+
"border-style",
|
|
217
|
+
"border-width",
|
|
218
|
+
"border-radius",
|
|
219
|
+
"outline-color",
|
|
220
|
+
"outline-style",
|
|
221
|
+
"outline-width",
|
|
222
|
+
"outline-offset",
|
|
223
|
+
"height",
|
|
224
|
+
"width",
|
|
225
|
+
"padding-inline",
|
|
226
|
+
"column-gap",
|
|
227
|
+
"font-family",
|
|
228
|
+
"font-size",
|
|
229
|
+
"font-weight",
|
|
230
|
+
"line-height",
|
|
231
|
+
"text-decoration-line",
|
|
232
|
+
"text-decoration-thickness",
|
|
233
|
+
"text-underline-offset"
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
"row": {
|
|
237
|
+
"description": "One line of the state table: in this state, this part of these kinds takes this token, or this value, for this property. Without a size it holds at every size.",
|
|
238
|
+
"type": "object",
|
|
239
|
+
"additionalProperties": false,
|
|
240
|
+
"required": ["variant", "state", "part", "property"],
|
|
241
|
+
"oneOf": [{ "required": ["token"] }, { "required": ["value"] }],
|
|
242
|
+
"properties": {
|
|
243
|
+
"variant": {
|
|
244
|
+
"description": "A kind, a list of kinds, or `*` for every kind the spec covers.",
|
|
245
|
+
"oneOf": [
|
|
246
|
+
{ "const": "*" },
|
|
247
|
+
{ "$ref": "#/$defs/name" },
|
|
248
|
+
{
|
|
249
|
+
"type": "array",
|
|
250
|
+
"minItems": 2,
|
|
251
|
+
"uniqueItems": true,
|
|
252
|
+
"items": { "$ref": "#/$defs/name" }
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
"state": { "$ref": "#/$defs/state" },
|
|
257
|
+
"part": { "$ref": "#/$defs/name" },
|
|
258
|
+
"property": { "$ref": "#/$defs/property" },
|
|
259
|
+
"size": { "$ref": "#/$defs/size" },
|
|
260
|
+
"token": {
|
|
261
|
+
"description": "The id of a token, as in the token data: `button.primary.bg.rest` is `--ws-button-primary-bg-rest`. A text style on a font property gives that part of it: `text.label` on `font-size` is `--ws-text-label-font-size`.",
|
|
262
|
+
"type": "string",
|
|
263
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)+$"
|
|
264
|
+
},
|
|
265
|
+
"value": {
|
|
266
|
+
"description": "A value the system writes without a token: `transparent`, the focus ring's offset of `3px`.",
|
|
267
|
+
"type": "string",
|
|
268
|
+
"minLength": 1
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"implementation": {
|
|
273
|
+
"type": "object",
|
|
274
|
+
"additionalProperties": false,
|
|
275
|
+
"required": ["library", "status", "parity"],
|
|
276
|
+
"properties": {
|
|
277
|
+
"library": {
|
|
278
|
+
"description": "The library the implementation is built on, and its version.",
|
|
279
|
+
"$ref": "#/$defs/sentence"
|
|
280
|
+
},
|
|
281
|
+
"status": {
|
|
282
|
+
"description": "Whether it ships the component yet.",
|
|
283
|
+
"enum": ["planned", "shipped"]
|
|
284
|
+
},
|
|
285
|
+
"parity": {
|
|
286
|
+
"description": "Whether its parity test reads this spec yet, and its result.",
|
|
287
|
+
"enum": ["none", "passing", "failing"]
|
|
288
|
+
},
|
|
289
|
+
"components": {
|
|
290
|
+
"description": "The library's components that make it up.",
|
|
291
|
+
"type": "array",
|
|
292
|
+
"minItems": 1,
|
|
293
|
+
"items": { "$ref": "#/$defs/sentence" }
|
|
294
|
+
},
|
|
295
|
+
"today": {
|
|
296
|
+
"description": "What it draws today, in short.",
|
|
297
|
+
"$ref": "#/$defs/sentence"
|
|
298
|
+
},
|
|
299
|
+
"parts": {
|
|
300
|
+
"description": "Each part, as the library's slot that draws it, with a pseudo-element where the slot draws the part as one: `label::after`.",
|
|
301
|
+
"type": "object",
|
|
302
|
+
"propertyNames": { "$ref": "#/$defs/name" },
|
|
303
|
+
"additionalProperties": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9]*(::[a-z-]+)?$"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"variants": {
|
|
309
|
+
"description": "Each kind, as the props that draw it.",
|
|
310
|
+
"$ref": "#/$defs/props"
|
|
311
|
+
},
|
|
312
|
+
"sizes": {
|
|
313
|
+
"description": "Each size, as the props that draw it.",
|
|
314
|
+
"$ref": "#/$defs/props"
|
|
315
|
+
},
|
|
316
|
+
"deviations": {
|
|
317
|
+
"description": "Where it does not meet the spec yet, each with the issue that tracks it where there is one.",
|
|
318
|
+
"type": "array",
|
|
319
|
+
"items": {
|
|
320
|
+
"type": "object",
|
|
321
|
+
"additionalProperties": false,
|
|
322
|
+
"required": ["summary"],
|
|
323
|
+
"properties": {
|
|
324
|
+
"summary": { "$ref": "#/$defs/sentence" },
|
|
325
|
+
"issue": { "type": "string", "pattern": "^https://" }
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"beyond": {
|
|
330
|
+
"description": "What it draws that the spec does not cover, kept working but not checked.",
|
|
331
|
+
"$ref": "#/$defs/sentences"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"if": { "properties": { "status": { "const": "shipped" } } },
|
|
335
|
+
"then": { "required": ["components", "today", "parts", "variants", "sizes", "deviations"] }
|
|
336
|
+
},
|
|
337
|
+
"props": {
|
|
338
|
+
"type": "object",
|
|
339
|
+
"propertyNames": { "$ref": "#/$defs/name" },
|
|
340
|
+
"additionalProperties": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"minProperties": 1,
|
|
343
|
+
"additionalProperties": { "type": ["string", "boolean"] }
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"button": {
|
|
3
|
+
"$description": "The colors of each kind of button, the decisions every implementation of the button's spec makes alike. Its height, gap, radius and icon size are the control's.",
|
|
4
|
+
"primary": {
|
|
5
|
+
"$type": "color",
|
|
6
|
+
"$description": "The one action a view leads to: a fill of the interactive color, a step further from the page on hover and while pressed.",
|
|
7
|
+
"bg": {
|
|
8
|
+
"rest": { "$value": "{color.interactive}" },
|
|
9
|
+
"hover": { "$value": "{color.interactive-hover}" },
|
|
10
|
+
"active": { "$value": "{color.interactive-active}" }
|
|
11
|
+
},
|
|
12
|
+
"text": {
|
|
13
|
+
"rest": { "$value": "{color.on-interactive}" }
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"secondary": {
|
|
17
|
+
"$type": "color",
|
|
18
|
+
"$description": "Every other action: an edge in the field border on the page, raised on hover and while pressed, the edge lighter then.",
|
|
19
|
+
"bg": {
|
|
20
|
+
"hover": { "$value": "{color.raised}" },
|
|
21
|
+
"active": { "$value": "{color.raised}" }
|
|
22
|
+
},
|
|
23
|
+
"border": {
|
|
24
|
+
"rest": { "$value": "{color.field-border}" },
|
|
25
|
+
"hover": { "$value": "{color.text-secondary}" },
|
|
26
|
+
"active": { "$value": "{color.text-secondary}" }
|
|
27
|
+
},
|
|
28
|
+
"text": {
|
|
29
|
+
"rest": { "$value": "{color.text}" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"ghost": {
|
|
33
|
+
"$type": "color",
|
|
34
|
+
"$description": "A minor action next to another: no edge, raised on hover and while pressed.",
|
|
35
|
+
"bg": {
|
|
36
|
+
"hover": { "$value": "{color.raised}" },
|
|
37
|
+
"active": { "$value": "{color.raised}" }
|
|
38
|
+
},
|
|
39
|
+
"text": {
|
|
40
|
+
"rest": { "$value": "{color.text}" }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"quiet": {
|
|
44
|
+
"$type": "color",
|
|
45
|
+
"$description": "An action that reads as a link: the interactive color, underlined.",
|
|
46
|
+
"text": {
|
|
47
|
+
"rest": { "$value": "{color.interactive}" }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"danger": {
|
|
51
|
+
"$type": "color",
|
|
52
|
+
"$description": "An action that deletes or cannot be undone: an outline in the danger color in both themes, with its tint on hover and while pressed.",
|
|
53
|
+
"bg": {
|
|
54
|
+
"hover": { "$value": "{color.danger-tint}" },
|
|
55
|
+
"active": { "$value": "{color.danger-tint}" }
|
|
56
|
+
},
|
|
57
|
+
"border": {
|
|
58
|
+
"rest": { "$value": "{color.danger}" }
|
|
59
|
+
},
|
|
60
|
+
"text": {
|
|
61
|
+
"rest": { "$value": "{color.danger-text}" }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"text": {
|
|
65
|
+
"$type": "color",
|
|
66
|
+
"$description": "The label of a disabled button of every kind.",
|
|
67
|
+
"disabled": { "$value": "{color.text-faint}" }
|
|
68
|
+
},
|
|
69
|
+
"border": {
|
|
70
|
+
"$type": "color",
|
|
71
|
+
"$description": "The edge of a disabled button of every kind that has one.",
|
|
72
|
+
"disabled": { "$value": "{color.text-faint}" }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"control": {
|
|
3
|
+
"$description": "Every one-line control: a button, a text field, a select's trigger, a segmented control, a link tab. Five sizes, Nuxt UI's xs to xl, as ui-vue draws them; md is the default.",
|
|
4
|
+
"height": {
|
|
5
|
+
"$type": "dimension",
|
|
6
|
+
"$description": "28, 32, 40, 44 and 48 px, as ui-vue draws them. Nuxt UI's own are 24 to 40 px; here md is the system's control height.",
|
|
7
|
+
"xs": { "$value": "{size.control-xs}" },
|
|
8
|
+
"sm": { "$value": "{size.control-sm}" },
|
|
9
|
+
"md": { "$value": "{size.control}" },
|
|
10
|
+
"lg": { "$value": "{size.control-lg}" },
|
|
11
|
+
"xl": { "$value": "{size.control-xl}" }
|
|
12
|
+
},
|
|
13
|
+
"gap": {
|
|
14
|
+
"$type": "dimension",
|
|
15
|
+
"$description": "Between an icon and the label or value: 6, 6, 8, 8 and 10 px, as ui-vue draws them. Nuxt UI's own are 4 to 8 px.",
|
|
16
|
+
"xs": { "$value": "{space.6}" },
|
|
17
|
+
"sm": { "$value": "{space.6}" },
|
|
18
|
+
"md": { "$value": "{space.8}" },
|
|
19
|
+
"lg": { "$value": "{space.8}" },
|
|
20
|
+
"xl": { "$value": "{space.10}" }
|
|
21
|
+
},
|
|
22
|
+
"icon-size": {
|
|
23
|
+
"$type": "dimension",
|
|
24
|
+
"$description": "16 px up to md, then 20 px, as ui-vue's fields draw them. Nuxt UI's own are 16, 16, 20, 20 and 24 px.",
|
|
25
|
+
"xs": { "$value": "{size.icon}" },
|
|
26
|
+
"sm": { "$value": "{size.icon}" },
|
|
27
|
+
"md": { "$value": "{size.icon}" },
|
|
28
|
+
"lg": { "$value": "{size.icon-lg}" },
|
|
29
|
+
"xl": { "$value": "{size.icon-lg}" }
|
|
30
|
+
},
|
|
31
|
+
"radius": {
|
|
32
|
+
"$type": "dimension",
|
|
33
|
+
"$description": "The same at every size, as in Nuxt UI.",
|
|
34
|
+
"$value": "{radius.md}"
|
|
35
|
+
},
|
|
36
|
+
"border-width": {
|
|
37
|
+
"$type": "dimension",
|
|
38
|
+
"$description": "The edge, the same at every size: thin, and twice that with an error.",
|
|
39
|
+
"rest": { "$value": "{border-width.thin}" },
|
|
40
|
+
"invalid": { "$value": "{border-width.medium}" }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"field": {
|
|
3
|
+
"$description": "What a text field, a select and a select menu share, and every field's label, help, error and required mark.",
|
|
4
|
+
"bg": { "$type": "color", "$value": "{color.bg}" },
|
|
5
|
+
"text": {
|
|
6
|
+
"$type": "color",
|
|
7
|
+
"$description": "The value.",
|
|
8
|
+
"rest": { "$value": "{color.text}" },
|
|
9
|
+
"disabled": { "$value": "{color.text-faint}" }
|
|
10
|
+
},
|
|
11
|
+
"border": {
|
|
12
|
+
"$type": "color",
|
|
13
|
+
"rest": { "$value": "{color.field-border}" },
|
|
14
|
+
"hover": { "$value": "{color.text-secondary}" },
|
|
15
|
+
"invalid": { "$value": "{color.danger}" },
|
|
16
|
+
"disabled": { "$value": "{color.text-faint}" }
|
|
17
|
+
},
|
|
18
|
+
"icon": {
|
|
19
|
+
"$type": "color",
|
|
20
|
+
"$description": "An icon in the field, such as a select's chevron.",
|
|
21
|
+
"$value": "{color.text-secondary}"
|
|
22
|
+
},
|
|
23
|
+
"label": {
|
|
24
|
+
"text": { "$type": "color", "$value": "{color.text}" }
|
|
25
|
+
},
|
|
26
|
+
"help": {
|
|
27
|
+
"text": { "$type": "color", "$value": "{color.text-secondary}" }
|
|
28
|
+
},
|
|
29
|
+
"error": {
|
|
30
|
+
"$description": "The message under a field in error, a word with the danger icon before it.",
|
|
31
|
+
"text": { "$type": "color", "$value": "{color.danger-text}" },
|
|
32
|
+
"icon": { "$type": "color", "$value": "{color.danger}" },
|
|
33
|
+
"font-weight": { "$type": "fontWeight", "$value": "{font.weight.medium}" }
|
|
34
|
+
},
|
|
35
|
+
"required": {
|
|
36
|
+
"$description": "The asterisk after the label of a field that must be filled in.",
|
|
37
|
+
"text": { "$type": "color", "$value": "{color.brand-text}" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
package/tokens/contrast.json
CHANGED
|
@@ -73,6 +73,18 @@
|
|
|
73
73
|
"min": 3,
|
|
74
74
|
"use": "Brand marks on a panel"
|
|
75
75
|
},
|
|
76
|
+
{
|
|
77
|
+
"foreground": "color.brand-text",
|
|
78
|
+
"background": "color.bg",
|
|
79
|
+
"min": 4.5,
|
|
80
|
+
"use": "Small text in the brand red, such as the required mark of a field"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"foreground": "color.brand-text",
|
|
84
|
+
"background": "color.surface",
|
|
85
|
+
"min": 4.5,
|
|
86
|
+
"use": "The required mark of a field on a panel"
|
|
87
|
+
},
|
|
76
88
|
{
|
|
77
89
|
"foreground": "color.on-brand",
|
|
78
90
|
"background": "color.brand-fill",
|
package/tokens/core.tokens.json
CHANGED
|
@@ -639,12 +639,40 @@
|
|
|
639
639
|
},
|
|
640
640
|
"$description": "Height of the status line."
|
|
641
641
|
},
|
|
642
|
+
"control-xs": {
|
|
643
|
+
"$value": {
|
|
644
|
+
"value": 1.75,
|
|
645
|
+
"unit": "rem"
|
|
646
|
+
},
|
|
647
|
+
"$description": "Height of a one-line control of the extra small size, xs."
|
|
648
|
+
},
|
|
649
|
+
"control-sm": {
|
|
650
|
+
"$value": {
|
|
651
|
+
"value": 2,
|
|
652
|
+
"unit": "rem"
|
|
653
|
+
},
|
|
654
|
+
"$description": "Height of a one-line control of the small size, sm."
|
|
655
|
+
},
|
|
642
656
|
"control": {
|
|
643
657
|
"$value": {
|
|
644
658
|
"value": 2.5,
|
|
645
659
|
"unit": "rem"
|
|
646
660
|
},
|
|
647
|
-
"$description": "Height of a one-line field, a button and a segmented control."
|
|
661
|
+
"$description": "Height of a one-line field, a button and a segmented control. The medium size, md, and the default."
|
|
662
|
+
},
|
|
663
|
+
"control-lg": {
|
|
664
|
+
"$value": {
|
|
665
|
+
"value": 2.75,
|
|
666
|
+
"unit": "rem"
|
|
667
|
+
},
|
|
668
|
+
"$description": "Height of a one-line control of the large size, lg."
|
|
669
|
+
},
|
|
670
|
+
"control-xl": {
|
|
671
|
+
"$value": {
|
|
672
|
+
"value": 3,
|
|
673
|
+
"unit": "rem"
|
|
674
|
+
},
|
|
675
|
+
"$description": "Height of a one-line control of the extra large size, xl."
|
|
648
676
|
},
|
|
649
677
|
"check": {
|
|
650
678
|
"$value": {
|
|
@@ -666,6 +694,13 @@
|
|
|
666
694
|
"unit": "rem"
|
|
667
695
|
},
|
|
668
696
|
"$description": "An icon next to text, such as a tick, the icon of a callout or a calendar."
|
|
697
|
+
},
|
|
698
|
+
"icon-lg": {
|
|
699
|
+
"$value": {
|
|
700
|
+
"value": 1.25,
|
|
701
|
+
"unit": "rem"
|
|
702
|
+
},
|
|
703
|
+
"$description": "An icon in a control of the two large sizes, lg and xl."
|
|
669
704
|
}
|
|
670
705
|
},
|
|
671
706
|
"motion": {
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
"$value": "{palette.main.love}",
|
|
46
46
|
"$description": "The brand accent: tongue, cursor, prompt chevron, active markers. Graphics and large type."
|
|
47
47
|
},
|
|
48
|
+
"brand-text": {
|
|
49
|
+
"$value": "{palette.main.love}",
|
|
50
|
+
"$description": "Brand red as small text, such as the required mark of a field. Love on dark; on light love 0.05 further from the page in OKLab lightness, so it reads at 4.5:1."
|
|
51
|
+
},
|
|
48
52
|
"brand-fill": {
|
|
49
53
|
"$value": "{palette.main.love}",
|
|
50
54
|
"$description": "Solid chip behind small text, such as the mode segment."
|
|
@@ -45,6 +45,14 @@
|
|
|
45
45
|
"$value": "{palette.dawn.love}",
|
|
46
46
|
"$description": "The brand accent: tongue, cursor, prompt chevron, active markers. Graphics and large type."
|
|
47
47
|
},
|
|
48
|
+
"brand-text": {
|
|
49
|
+
"$value": {
|
|
50
|
+
"colorSpace": "srgb",
|
|
51
|
+
"components": [0.6431, 0.3294, 0.4196],
|
|
52
|
+
"hex": "#a4546b"
|
|
53
|
+
},
|
|
54
|
+
"$description": "Brand red as small text, such as the required mark of a field. Love on dark; on light love 0.05 further from the page in OKLab lightness, so it reads at 4.5:1."
|
|
55
|
+
},
|
|
48
56
|
"brand-fill": {
|
|
49
57
|
"$value": "{palette.dawn.text}",
|
|
50
58
|
"$description": "Solid chip behind small text, such as the mode segment."
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "whatsaaaa",
|
|
3
3
|
"version": "2025.10",
|
|
4
|
-
"description": "Rosé Pine primitives and everything that never changes, then the color roles of one theme.",
|
|
4
|
+
"description": "Rosé Pine primitives and everything that never changes, then the color roles of one theme, then the component tier, which aliases them.",
|
|
5
5
|
"sets": {
|
|
6
6
|
"core": {
|
|
7
7
|
"sources": [
|
|
@@ -12,6 +12,19 @@
|
|
|
12
12
|
"$ref": "core.tokens.json"
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
|
+
},
|
|
16
|
+
"components": {
|
|
17
|
+
"sources": [
|
|
18
|
+
{
|
|
19
|
+
"$ref": "components/button.tokens.json"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"$ref": "components/control.tokens.json"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"$ref": "components/field.tokens.json"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
15
28
|
}
|
|
16
29
|
},
|
|
17
30
|
"modifiers": {
|
|
@@ -38,6 +51,9 @@
|
|
|
38
51
|
},
|
|
39
52
|
{
|
|
40
53
|
"$ref": "#/modifiers/theme"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"$ref": "#/sets/components"
|
|
41
57
|
}
|
|
42
58
|
]
|
|
43
59
|
}
|