@skra/tokens 0.2.0 → 0.3.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.
Files changed (40) hide show
  1. package/LICENSE +201 -201
  2. package/NOTICE +7 -7
  3. package/README.md +99 -64
  4. package/brutal/_theme.scoped.scss +18 -18
  5. package/brutal/_theme.scss +60 -12
  6. package/brutal/skin.config.json +40 -40
  7. package/manifests/accordion.json +52 -52
  8. package/manifests/alert.json +107 -107
  9. package/manifests/avatar.json +78 -78
  10. package/manifests/badge.json +63 -63
  11. package/manifests/box.json +34 -34
  12. package/manifests/button.json +133 -133
  13. package/manifests/chip.json +116 -116
  14. package/manifests/combobox.json +141 -141
  15. package/manifests/datepicker.json +159 -159
  16. package/manifests/dialog.json +104 -104
  17. package/manifests/field.json +267 -267
  18. package/manifests/grid.json +61 -61
  19. package/manifests/icon.json +43 -43
  20. package/manifests/kbd.json +68 -68
  21. package/manifests/link.json +107 -107
  22. package/manifests/menu.json +122 -122
  23. package/manifests/popover.json +104 -104
  24. package/manifests/progress.json +69 -69
  25. package/manifests/select.json +177 -177
  26. package/manifests/skeleton.json +43 -43
  27. package/manifests/stack.json +34 -34
  28. package/manifests/star-rating.json +96 -96
  29. package/manifests/status-dot.json +69 -69
  30. package/manifests/tabs.json +52 -52
  31. package/manifests/toast.json +133 -133
  32. package/manifests/tooltip.json +113 -113
  33. package/manifests/typography.json +169 -169
  34. package/package.json +1 -1
  35. package/skra/_form-controls.scss +74 -74
  36. package/skra/_overlay.scss +42 -42
  37. package/skra/_theme.dark.scss +3 -0
  38. package/skra/_theme.scss +61 -10
  39. package/skra/skin.config.json +37 -37
  40. package/skra/utilities.scss +38 -38
@@ -1,267 +1,267 @@
1
- {
2
- "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
- "component": "field",
4
- "skraVersion": ">=1.0.0",
5
- "axes": [
6
- {
7
- "token": "--skra-comp-field-background",
8
- "label": "Field — control background colour",
9
- "group": "Surface",
10
- "type": "color",
11
- "states": ["default"],
12
- "constraint": { "oklch": true },
13
- "overridable": ["overlay", "subtree", "instance"]
14
- },
15
- {
16
- "token": "--skra-comp-field-foreground",
17
- "label": "Field — control text colour",
18
- "group": "Surface",
19
- "type": "color",
20
- "states": ["default"],
21
- "constraint": { "oklch": true },
22
- "overridable": ["overlay", "subtree", "instance"]
23
- },
24
- {
25
- "token": "--skra-comp-field-border-color",
26
- "label": "Field — control border colour (resting)",
27
- "group": "Surface",
28
- "type": "color",
29
- "states": ["default"],
30
- "constraint": { "oklch": true },
31
- "overridable": ["overlay", "subtree"]
32
- },
33
- {
34
- "token": "--skra-comp-field-radius",
35
- "label": "Field — control corner radius",
36
- "group": "Surface",
37
- "type": "dimension",
38
- "states": ["default"],
39
- "constraint": { "unit": "rem", "min": 0, "max": 2 },
40
- "overridable": ["overlay", "subtree"]
41
- },
42
- {
43
- "token": "--skra-comp-field-focus-ring-color",
44
- "label": "Focus ring — outline colour on :focus-visible",
45
- "group": "State",
46
- "type": "color",
47
- "states": ["focus-visible"],
48
- "constraint": { "oklch": true },
49
- "overridable": ["overlay"]
50
- },
51
- {
52
- "token": "--skra-comp-field-focus-ring-width",
53
- "label": "Focus ring — outline thickness on :focus-visible",
54
- "group": "State",
55
- "type": "dimension",
56
- "states": ["focus-visible"],
57
- "constraint": { "unit": "rem", "min": 0.0625, "max": 0.25 },
58
- "overridable": ["overlay"]
59
- },
60
- {
61
- "token": "--skra-comp-field-border-color-validation-invalid",
62
- "label": "Field — border colour when invalid",
63
- "group": "State",
64
- "type": "color",
65
- "states": ["invalid"],
66
- "constraint": { "oklch": true },
67
- "overridable": ["overlay"]
68
- },
69
- {
70
- "token": "--skra-comp-field-background-readonly",
71
- "label": "Field — control background colour when readonly",
72
- "group": "State",
73
- "type": "color",
74
- "states": ["readonly"],
75
- "constraint": { "oklch": true },
76
- "overridable": ["overlay", "subtree"]
77
- },
78
- {
79
- "token": "--skra-comp-field-border-color-readonly",
80
- "label": "Field — control border colour when readonly",
81
- "group": "State",
82
- "type": "color",
83
- "states": ["readonly"],
84
- "constraint": { "oklch": true },
85
- "overridable": ["overlay", "subtree"]
86
- },
87
- {
88
- "token": "--skra-comp-field-required-color",
89
- "label": "Field — required-marker (asterisk) colour",
90
- "group": "State",
91
- "type": "color",
92
- "states": ["required"],
93
- "constraint": { "oklch": true },
94
- "overridable": ["overlay", "subtree"]
95
- },
96
- {
97
- "token": "--skra-comp-field-label-color",
98
- "label": "Field — label text colour",
99
- "group": "Typography",
100
- "type": "color",
101
- "states": ["default"],
102
- "constraint": { "oklch": true },
103
- "overridable": ["overlay", "subtree"]
104
- },
105
- {
106
- "token": "--skra-comp-field-hint-color",
107
- "label": "Field — hint/helper text colour",
108
- "group": "Typography",
109
- "type": "color",
110
- "states": ["default"],
111
- "constraint": { "oklch": true },
112
- "overridable": ["overlay"]
113
- },
114
- {
115
- "token": "--skra-comp-field-error-color",
116
- "label": "Field — error message text colour",
117
- "group": "State",
118
- "type": "color",
119
- "states": ["invalid"],
120
- "constraint": { "oklch": true },
121
- "overridable": ["overlay"]
122
- },
123
- {
124
- "token": "--skra-comp-field-gap",
125
- "label": "Field — vertical gap between label / control / hint / error",
126
- "group": "Spacing",
127
- "type": "dimension",
128
- "states": ["default"],
129
- "constraint": { "unit": "rem", "min": 0, "max": 2 },
130
- "overridable": ["overlay", "subtree"]
131
- },
132
- {
133
- "token": "--skra-comp-field-motion-duration",
134
- "label": "Transition duration for control state changes",
135
- "group": "Motion",
136
- "type": "duration",
137
- "states": ["default"],
138
- "constraint": { "unit": "ms" },
139
- "overridable": ["overlay"]
140
- },
141
- {
142
- "token": "--skra-comp-field-motion-easing",
143
- "label": "Transition easing curve",
144
- "group": "Motion",
145
- "type": "cubic-bezier",
146
- "states": ["default"],
147
- "overridable": ["overlay"]
148
- },
149
- {
150
- "token": "--skra-comp-field-checkbox-border-color",
151
- "label": "Checkbox — box border colour (unchecked)",
152
- "group": "Surface",
153
- "type": "color",
154
- "states": ["default"],
155
- "constraint": { "oklch": true },
156
- "overridable": ["overlay"]
157
- },
158
- {
159
- "token": "--skra-comp-field-checkbox-checked-background",
160
- "label": "Checkbox — fill colour when checked",
161
- "group": "State",
162
- "type": "color",
163
- "states": ["checked"],
164
- "constraint": { "oklch": true },
165
- "overridable": ["overlay"]
166
- },
167
- {
168
- "token": "--skra-comp-field-checkbox-check-color",
169
- "label": "Checkbox — check-mark glyph colour",
170
- "group": "State",
171
- "type": "color",
172
- "states": ["checked"],
173
- "constraint": { "oklch": true },
174
- "overridable": ["overlay"]
175
- },
176
- {
177
- "token": "--skra-comp-field-radio-border-color",
178
- "label": "Radio — ring border colour (unchecked)",
179
- "group": "Surface",
180
- "type": "color",
181
- "states": ["default"],
182
- "constraint": { "oklch": true },
183
- "overridable": ["overlay"]
184
- },
185
- {
186
- "token": "--skra-comp-field-radio-checked-background",
187
- "label": "Radio — fill colour when checked",
188
- "group": "State",
189
- "type": "color",
190
- "states": ["checked"],
191
- "constraint": { "oklch": true },
192
- "overridable": ["overlay"]
193
- },
194
- {
195
- "token": "--skra-comp-field-radio-dot-color",
196
- "label": "Radio — inner dot colour",
197
- "group": "State",
198
- "type": "color",
199
- "states": ["checked"],
200
- "constraint": { "oklch": true },
201
- "overridable": ["overlay"]
202
- },
203
- {
204
- "token": "--skra-comp-field-switch-background",
205
- "label": "Switch — track fill colour (off)",
206
- "group": "Surface",
207
- "type": "color",
208
- "states": ["default"],
209
- "constraint": { "oklch": true },
210
- "overridable": ["overlay"]
211
- },
212
- {
213
- "token": "--skra-comp-field-switch-checked-background",
214
- "label": "Switch — track fill colour (on)",
215
- "group": "State",
216
- "type": "color",
217
- "states": ["checked"],
218
- "constraint": { "oklch": true },
219
- "overridable": ["overlay"]
220
- },
221
- {
222
- "token": "--skra-comp-field-switch-thumb-color",
223
- "label": "Switch — thumb (knob) colour off",
224
- "group": "Surface",
225
- "type": "color",
226
- "states": ["default"],
227
- "constraint": { "oklch": true },
228
- "overridable": ["overlay"]
229
- },
230
- {
231
- "token": "--skra-comp-field-switch-thumb-color-checked",
232
- "label": "Switch — thumb (knob) colour on",
233
- "group": "State",
234
- "type": "color",
235
- "states": ["checked"],
236
- "constraint": { "oklch": true },
237
- "overridable": ["overlay"]
238
- },
239
- {
240
- "token": "--skra-comp-field-select-option-foreground",
241
- "label": "Select — option text colour (dropdown list)",
242
- "group": "Surface",
243
- "type": "color",
244
- "states": ["default"],
245
- "constraint": { "oklch": true },
246
- "overridable": ["overlay"]
247
- },
248
- {
249
- "token": "--skra-comp-field-select-option-background",
250
- "label": "Select — option background colour (dropdown list)",
251
- "group": "Surface",
252
- "type": "color",
253
- "states": ["default"],
254
- "constraint": { "oklch": true },
255
- "overridable": ["overlay"]
256
- },
257
- {
258
- "token": "--skra-comp-field-group-legend-color",
259
- "label": "Fieldset — legend (group label) text colour",
260
- "group": "Typography",
261
- "type": "color",
262
- "states": ["default"],
263
- "constraint": { "oklch": true },
264
- "overridable": ["overlay", "subtree"]
265
- }
266
- ]
267
- }
1
+ {
2
+ "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
+ "component": "field",
4
+ "skraVersion": ">=1.0.0",
5
+ "axes": [
6
+ {
7
+ "token": "--skra-comp-field-background",
8
+ "label": "Field — control background colour",
9
+ "group": "Surface",
10
+ "type": "color",
11
+ "states": ["default"],
12
+ "constraint": { "oklch": true },
13
+ "overridable": ["overlay", "subtree", "instance"]
14
+ },
15
+ {
16
+ "token": "--skra-comp-field-foreground",
17
+ "label": "Field — control text colour",
18
+ "group": "Surface",
19
+ "type": "color",
20
+ "states": ["default"],
21
+ "constraint": { "oklch": true },
22
+ "overridable": ["overlay", "subtree", "instance"]
23
+ },
24
+ {
25
+ "token": "--skra-comp-field-border-color",
26
+ "label": "Field — control border colour (resting)",
27
+ "group": "Surface",
28
+ "type": "color",
29
+ "states": ["default"],
30
+ "constraint": { "oklch": true },
31
+ "overridable": ["overlay", "subtree"]
32
+ },
33
+ {
34
+ "token": "--skra-comp-field-radius",
35
+ "label": "Field — control corner radius",
36
+ "group": "Surface",
37
+ "type": "dimension",
38
+ "states": ["default"],
39
+ "constraint": { "unit": "rem", "min": 0, "max": 2 },
40
+ "overridable": ["overlay", "subtree"]
41
+ },
42
+ {
43
+ "token": "--skra-comp-field-focus-ring-color",
44
+ "label": "Focus ring — outline colour on :focus-visible",
45
+ "group": "State",
46
+ "type": "color",
47
+ "states": ["focus-visible"],
48
+ "constraint": { "oklch": true },
49
+ "overridable": ["overlay"]
50
+ },
51
+ {
52
+ "token": "--skra-comp-field-focus-ring-width",
53
+ "label": "Focus ring — outline thickness on :focus-visible",
54
+ "group": "State",
55
+ "type": "dimension",
56
+ "states": ["focus-visible"],
57
+ "constraint": { "unit": "rem", "min": 0.0625, "max": 0.25 },
58
+ "overridable": ["overlay"]
59
+ },
60
+ {
61
+ "token": "--skra-comp-field-border-color-validation-invalid",
62
+ "label": "Field — border colour when invalid",
63
+ "group": "State",
64
+ "type": "color",
65
+ "states": ["invalid"],
66
+ "constraint": { "oklch": true },
67
+ "overridable": ["overlay"]
68
+ },
69
+ {
70
+ "token": "--skra-comp-field-background-readonly",
71
+ "label": "Field — control background colour when readonly",
72
+ "group": "State",
73
+ "type": "color",
74
+ "states": ["readonly"],
75
+ "constraint": { "oklch": true },
76
+ "overridable": ["overlay", "subtree"]
77
+ },
78
+ {
79
+ "token": "--skra-comp-field-border-color-readonly",
80
+ "label": "Field — control border colour when readonly",
81
+ "group": "State",
82
+ "type": "color",
83
+ "states": ["readonly"],
84
+ "constraint": { "oklch": true },
85
+ "overridable": ["overlay", "subtree"]
86
+ },
87
+ {
88
+ "token": "--skra-comp-field-required-color",
89
+ "label": "Field — required-marker (asterisk) colour",
90
+ "group": "State",
91
+ "type": "color",
92
+ "states": ["required"],
93
+ "constraint": { "oklch": true },
94
+ "overridable": ["overlay", "subtree"]
95
+ },
96
+ {
97
+ "token": "--skra-comp-field-label-color",
98
+ "label": "Field — label text colour",
99
+ "group": "Typography",
100
+ "type": "color",
101
+ "states": ["default"],
102
+ "constraint": { "oklch": true },
103
+ "overridable": ["overlay", "subtree"]
104
+ },
105
+ {
106
+ "token": "--skra-comp-field-hint-color",
107
+ "label": "Field — hint/helper text colour",
108
+ "group": "Typography",
109
+ "type": "color",
110
+ "states": ["default"],
111
+ "constraint": { "oklch": true },
112
+ "overridable": ["overlay"]
113
+ },
114
+ {
115
+ "token": "--skra-comp-field-error-color",
116
+ "label": "Field — error message text colour",
117
+ "group": "State",
118
+ "type": "color",
119
+ "states": ["invalid"],
120
+ "constraint": { "oklch": true },
121
+ "overridable": ["overlay"]
122
+ },
123
+ {
124
+ "token": "--skra-comp-field-gap",
125
+ "label": "Field — vertical gap between label / control / hint / error",
126
+ "group": "Spacing",
127
+ "type": "dimension",
128
+ "states": ["default"],
129
+ "constraint": { "unit": "rem", "min": 0, "max": 2 },
130
+ "overridable": ["overlay", "subtree"]
131
+ },
132
+ {
133
+ "token": "--skra-comp-field-motion-duration",
134
+ "label": "Transition duration for control state changes",
135
+ "group": "Motion",
136
+ "type": "duration",
137
+ "states": ["default"],
138
+ "constraint": { "unit": "ms" },
139
+ "overridable": ["overlay"]
140
+ },
141
+ {
142
+ "token": "--skra-comp-field-motion-easing",
143
+ "label": "Transition easing curve",
144
+ "group": "Motion",
145
+ "type": "cubic-bezier",
146
+ "states": ["default"],
147
+ "overridable": ["overlay"]
148
+ },
149
+ {
150
+ "token": "--skra-comp-field-checkbox-border-color",
151
+ "label": "Checkbox — box border colour (unchecked)",
152
+ "group": "Surface",
153
+ "type": "color",
154
+ "states": ["default"],
155
+ "constraint": { "oklch": true },
156
+ "overridable": ["overlay"]
157
+ },
158
+ {
159
+ "token": "--skra-comp-field-checkbox-checked-background",
160
+ "label": "Checkbox — fill colour when checked",
161
+ "group": "State",
162
+ "type": "color",
163
+ "states": ["checked"],
164
+ "constraint": { "oklch": true },
165
+ "overridable": ["overlay"]
166
+ },
167
+ {
168
+ "token": "--skra-comp-field-checkbox-check-color",
169
+ "label": "Checkbox — check-mark glyph colour",
170
+ "group": "State",
171
+ "type": "color",
172
+ "states": ["checked"],
173
+ "constraint": { "oklch": true },
174
+ "overridable": ["overlay"]
175
+ },
176
+ {
177
+ "token": "--skra-comp-field-radio-border-color",
178
+ "label": "Radio — ring border colour (unchecked)",
179
+ "group": "Surface",
180
+ "type": "color",
181
+ "states": ["default"],
182
+ "constraint": { "oklch": true },
183
+ "overridable": ["overlay"]
184
+ },
185
+ {
186
+ "token": "--skra-comp-field-radio-checked-background",
187
+ "label": "Radio — fill colour when checked",
188
+ "group": "State",
189
+ "type": "color",
190
+ "states": ["checked"],
191
+ "constraint": { "oklch": true },
192
+ "overridable": ["overlay"]
193
+ },
194
+ {
195
+ "token": "--skra-comp-field-radio-dot-color",
196
+ "label": "Radio — inner dot colour",
197
+ "group": "State",
198
+ "type": "color",
199
+ "states": ["checked"],
200
+ "constraint": { "oklch": true },
201
+ "overridable": ["overlay"]
202
+ },
203
+ {
204
+ "token": "--skra-comp-field-switch-background",
205
+ "label": "Switch — track fill colour (off)",
206
+ "group": "Surface",
207
+ "type": "color",
208
+ "states": ["default"],
209
+ "constraint": { "oklch": true },
210
+ "overridable": ["overlay"]
211
+ },
212
+ {
213
+ "token": "--skra-comp-field-switch-checked-background",
214
+ "label": "Switch — track fill colour (on)",
215
+ "group": "State",
216
+ "type": "color",
217
+ "states": ["checked"],
218
+ "constraint": { "oklch": true },
219
+ "overridable": ["overlay"]
220
+ },
221
+ {
222
+ "token": "--skra-comp-field-switch-thumb-color",
223
+ "label": "Switch — thumb (knob) colour off",
224
+ "group": "Surface",
225
+ "type": "color",
226
+ "states": ["default"],
227
+ "constraint": { "oklch": true },
228
+ "overridable": ["overlay"]
229
+ },
230
+ {
231
+ "token": "--skra-comp-field-switch-thumb-color-checked",
232
+ "label": "Switch — thumb (knob) colour on",
233
+ "group": "State",
234
+ "type": "color",
235
+ "states": ["checked"],
236
+ "constraint": { "oklch": true },
237
+ "overridable": ["overlay"]
238
+ },
239
+ {
240
+ "token": "--skra-comp-field-select-option-foreground",
241
+ "label": "Select — option text colour (dropdown list)",
242
+ "group": "Surface",
243
+ "type": "color",
244
+ "states": ["default"],
245
+ "constraint": { "oklch": true },
246
+ "overridable": ["overlay"]
247
+ },
248
+ {
249
+ "token": "--skra-comp-field-select-option-background",
250
+ "label": "Select — option background colour (dropdown list)",
251
+ "group": "Surface",
252
+ "type": "color",
253
+ "states": ["default"],
254
+ "constraint": { "oklch": true },
255
+ "overridable": ["overlay"]
256
+ },
257
+ {
258
+ "token": "--skra-comp-field-group-legend-color",
259
+ "label": "Fieldset — legend (group label) text colour",
260
+ "group": "Typography",
261
+ "type": "color",
262
+ "states": ["default"],
263
+ "constraint": { "oklch": true },
264
+ "overridable": ["overlay", "subtree"]
265
+ }
266
+ ]
267
+ }