@skra/tokens 0.2.0 → 0.3.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.
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,61 +1,61 @@
1
- {
2
- "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
- "component": "grid",
4
- "skraVersion": ">=1.0.0",
5
- "axes": [
6
- {
7
- "token": "--skra-comp-grid-gap-sm",
8
- "label": "Grid — small gap preset",
9
- "group": "Spacing",
10
- "type": "dimension",
11
- "states": ["default"],
12
- "constraint": { "unit": "rem", "min": 0, "max": 4 },
13
- "overridable": ["overlay", "subtree", "instance"]
14
- },
15
- {
16
- "token": "--skra-comp-grid-gap-md",
17
- "label": "Grid — medium gap preset",
18
- "group": "Spacing",
19
- "type": "dimension",
20
- "states": ["default"],
21
- "constraint": { "unit": "rem", "min": 0, "max": 4 },
22
- "overridable": ["overlay", "subtree", "instance"]
23
- },
24
- {
25
- "token": "--skra-comp-grid-gap-lg",
26
- "label": "Grid — large gap preset",
27
- "group": "Spacing",
28
- "type": "dimension",
29
- "states": ["default"],
30
- "constraint": { "unit": "rem", "min": 0, "max": 4 },
31
- "overridable": ["overlay", "subtree", "instance"]
32
- },
33
- {
34
- "token": "--skra-comp-grid-min-sm",
35
- "label": "Grid — small auto-fit track minimum",
36
- "group": "Layout",
37
- "type": "dimension",
38
- "states": ["default"],
39
- "constraint": { "unit": "rem", "min": 4, "max": 40 },
40
- "overridable": ["overlay", "subtree", "instance"]
41
- },
42
- {
43
- "token": "--skra-comp-grid-min-md",
44
- "label": "Grid — medium auto-fit track minimum",
45
- "group": "Layout",
46
- "type": "dimension",
47
- "states": ["default"],
48
- "constraint": { "unit": "rem", "min": 4, "max": 40 },
49
- "overridable": ["overlay", "subtree", "instance"]
50
- },
51
- {
52
- "token": "--skra-comp-grid-min-lg",
53
- "label": "Grid — large auto-fit track minimum",
54
- "group": "Layout",
55
- "type": "dimension",
56
- "states": ["default"],
57
- "constraint": { "unit": "rem", "min": 4, "max": 40 },
58
- "overridable": ["overlay", "subtree", "instance"]
59
- }
60
- ]
61
- }
1
+ {
2
+ "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
+ "component": "grid",
4
+ "skraVersion": ">=1.0.0",
5
+ "axes": [
6
+ {
7
+ "token": "--skra-comp-grid-gap-sm",
8
+ "label": "Grid — small gap preset",
9
+ "group": "Spacing",
10
+ "type": "dimension",
11
+ "states": ["default"],
12
+ "constraint": { "unit": "rem", "min": 0, "max": 4 },
13
+ "overridable": ["overlay", "subtree", "instance"]
14
+ },
15
+ {
16
+ "token": "--skra-comp-grid-gap-md",
17
+ "label": "Grid — medium gap preset",
18
+ "group": "Spacing",
19
+ "type": "dimension",
20
+ "states": ["default"],
21
+ "constraint": { "unit": "rem", "min": 0, "max": 4 },
22
+ "overridable": ["overlay", "subtree", "instance"]
23
+ },
24
+ {
25
+ "token": "--skra-comp-grid-gap-lg",
26
+ "label": "Grid — large gap preset",
27
+ "group": "Spacing",
28
+ "type": "dimension",
29
+ "states": ["default"],
30
+ "constraint": { "unit": "rem", "min": 0, "max": 4 },
31
+ "overridable": ["overlay", "subtree", "instance"]
32
+ },
33
+ {
34
+ "token": "--skra-comp-grid-min-sm",
35
+ "label": "Grid — small auto-fit track minimum",
36
+ "group": "Layout",
37
+ "type": "dimension",
38
+ "states": ["default"],
39
+ "constraint": { "unit": "rem", "min": 4, "max": 40 },
40
+ "overridable": ["overlay", "subtree", "instance"]
41
+ },
42
+ {
43
+ "token": "--skra-comp-grid-min-md",
44
+ "label": "Grid — medium auto-fit track minimum",
45
+ "group": "Layout",
46
+ "type": "dimension",
47
+ "states": ["default"],
48
+ "constraint": { "unit": "rem", "min": 4, "max": 40 },
49
+ "overridable": ["overlay", "subtree", "instance"]
50
+ },
51
+ {
52
+ "token": "--skra-comp-grid-min-lg",
53
+ "label": "Grid — large auto-fit track minimum",
54
+ "group": "Layout",
55
+ "type": "dimension",
56
+ "states": ["default"],
57
+ "constraint": { "unit": "rem", "min": 4, "max": 40 },
58
+ "overridable": ["overlay", "subtree", "instance"]
59
+ }
60
+ ]
61
+ }
@@ -1,43 +1,43 @@
1
- {
2
- "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
- "component": "icon",
4
- "skraVersion": ">=1.0.0",
5
- "axes": [
6
- {
7
- "token": "--skra-comp-icon-size-default",
8
- "label": "Icon — default size (when no size preset and no host cascade)",
9
- "group": "Layout",
10
- "type": "dimension",
11
- "states": ["default"],
12
- "constraint": { "unit": "rem", "min": 0.5, "max": 6 },
13
- "overridable": ["overlay", "subtree", "instance"]
14
- },
15
- {
16
- "token": "--skra-comp-icon-size-sm",
17
- "label": "Icon — small size preset",
18
- "group": "Layout",
19
- "type": "dimension",
20
- "states": ["default"],
21
- "constraint": { "unit": "rem", "min": 0.5, "max": 6 },
22
- "overridable": ["overlay", "subtree", "instance"]
23
- },
24
- {
25
- "token": "--skra-comp-icon-size-md",
26
- "label": "Icon — medium size preset",
27
- "group": "Layout",
28
- "type": "dimension",
29
- "states": ["default"],
30
- "constraint": { "unit": "rem", "min": 0.5, "max": 6 },
31
- "overridable": ["overlay", "subtree", "instance"]
32
- },
33
- {
34
- "token": "--skra-comp-icon-size-lg",
35
- "label": "Icon — large size preset",
36
- "group": "Layout",
37
- "type": "dimension",
38
- "states": ["default"],
39
- "constraint": { "unit": "rem", "min": 0.5, "max": 6 },
40
- "overridable": ["overlay", "subtree", "instance"]
41
- }
42
- ]
43
- }
1
+ {
2
+ "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
+ "component": "icon",
4
+ "skraVersion": ">=1.0.0",
5
+ "axes": [
6
+ {
7
+ "token": "--skra-comp-icon-size-default",
8
+ "label": "Icon — default size (when no size preset and no host cascade)",
9
+ "group": "Layout",
10
+ "type": "dimension",
11
+ "states": ["default"],
12
+ "constraint": { "unit": "rem", "min": 0.5, "max": 6 },
13
+ "overridable": ["overlay", "subtree", "instance"]
14
+ },
15
+ {
16
+ "token": "--skra-comp-icon-size-sm",
17
+ "label": "Icon — small size preset",
18
+ "group": "Layout",
19
+ "type": "dimension",
20
+ "states": ["default"],
21
+ "constraint": { "unit": "rem", "min": 0.5, "max": 6 },
22
+ "overridable": ["overlay", "subtree", "instance"]
23
+ },
24
+ {
25
+ "token": "--skra-comp-icon-size-md",
26
+ "label": "Icon — medium size preset",
27
+ "group": "Layout",
28
+ "type": "dimension",
29
+ "states": ["default"],
30
+ "constraint": { "unit": "rem", "min": 0.5, "max": 6 },
31
+ "overridable": ["overlay", "subtree", "instance"]
32
+ },
33
+ {
34
+ "token": "--skra-comp-icon-size-lg",
35
+ "label": "Icon — large size preset",
36
+ "group": "Layout",
37
+ "type": "dimension",
38
+ "states": ["default"],
39
+ "constraint": { "unit": "rem", "min": 0.5, "max": 6 },
40
+ "overridable": ["overlay", "subtree", "instance"]
41
+ }
42
+ ]
43
+ }
@@ -1,68 +1,68 @@
1
- {
2
- "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
- "component": "kbd",
4
- "skraVersion": ">=1.0.0",
5
- "axes": [
6
- {
7
- "token": "--skra-comp-kbd-background",
8
- "label": "Kbd — key-cap fill 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-kbd-foreground",
17
- "label": "Kbd — key 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-kbd-border-color",
26
- "label": "Kbd — key-cap edge colour",
27
- "group": "Surface",
28
- "type": "color",
29
- "states": ["default"],
30
- "constraint": { "oklch": true },
31
- "overridable": ["overlay", "subtree"]
32
- },
33
- {
34
- "token": "--skra-comp-kbd-border-width",
35
- "label": "Kbd — key-cap edge width",
36
- "group": "Surface",
37
- "type": "dimension",
38
- "states": ["default"],
39
- "constraint": { "unit": "rem", "min": 0, "max": 0.5 },
40
- "overridable": ["overlay", "subtree"]
41
- },
42
- {
43
- "token": "--skra-comp-kbd-radius",
44
- "label": "Kbd — key corner radius",
45
- "group": "Surface",
46
- "type": "dimension",
47
- "states": ["default"],
48
- "constraint": { "unit": "rem", "min": 0, "max": 2 },
49
- "overridable": ["overlay", "subtree"]
50
- },
51
- {
52
- "token": "--skra-comp-kbd-shadow",
53
- "label": "Kbd — key-cap depth shadow (flat in forge; offset in brutal)",
54
- "group": "Surface",
55
- "type": "shadow",
56
- "states": ["default"],
57
- "overridable": ["overlay", "subtree"]
58
- },
59
- {
60
- "token": "--skra-comp-kbd-font-family",
61
- "label": "Kbd — key typeface (monospace; the defining cue)",
62
- "group": "Typography",
63
- "type": "string",
64
- "states": ["default"],
65
- "overridable": ["overlay", "subtree"]
66
- }
67
- ]
68
- }
1
+ {
2
+ "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
+ "component": "kbd",
4
+ "skraVersion": ">=1.0.0",
5
+ "axes": [
6
+ {
7
+ "token": "--skra-comp-kbd-background",
8
+ "label": "Kbd — key-cap fill 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-kbd-foreground",
17
+ "label": "Kbd — key 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-kbd-border-color",
26
+ "label": "Kbd — key-cap edge colour",
27
+ "group": "Surface",
28
+ "type": "color",
29
+ "states": ["default"],
30
+ "constraint": { "oklch": true },
31
+ "overridable": ["overlay", "subtree"]
32
+ },
33
+ {
34
+ "token": "--skra-comp-kbd-border-width",
35
+ "label": "Kbd — key-cap edge width",
36
+ "group": "Surface",
37
+ "type": "dimension",
38
+ "states": ["default"],
39
+ "constraint": { "unit": "rem", "min": 0, "max": 0.5 },
40
+ "overridable": ["overlay", "subtree"]
41
+ },
42
+ {
43
+ "token": "--skra-comp-kbd-radius",
44
+ "label": "Kbd — key corner radius",
45
+ "group": "Surface",
46
+ "type": "dimension",
47
+ "states": ["default"],
48
+ "constraint": { "unit": "rem", "min": 0, "max": 2 },
49
+ "overridable": ["overlay", "subtree"]
50
+ },
51
+ {
52
+ "token": "--skra-comp-kbd-shadow",
53
+ "label": "Kbd — key-cap depth shadow (flat in forge; offset in brutal)",
54
+ "group": "Surface",
55
+ "type": "shadow",
56
+ "states": ["default"],
57
+ "overridable": ["overlay", "subtree"]
58
+ },
59
+ {
60
+ "token": "--skra-comp-kbd-font-family",
61
+ "label": "Kbd — key typeface (monospace; the defining cue)",
62
+ "group": "Typography",
63
+ "type": "string",
64
+ "states": ["default"],
65
+ "overridable": ["overlay", "subtree"]
66
+ }
67
+ ]
68
+ }
@@ -1,107 +1,107 @@
1
- {
2
- "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
- "component": "link",
4
- "skraVersion": ">=1.0.0",
5
- "axes": [
6
- {
7
- "token": "--skra-comp-link-foreground",
8
- "label": "Link — text colour (default / unvisited)",
9
- "group": "Surface",
10
- "type": "color",
11
- "states": ["default"],
12
- "constraint": { "oklch": true },
13
- "overridable": ["overlay", "subtree", "instance"]
14
- },
15
- {
16
- "token": "--skra-comp-link-foreground-hover",
17
- "label": "Link — text colour on hover",
18
- "group": "State",
19
- "type": "color",
20
- "states": ["hover"],
21
- "constraint": { "oklch": true },
22
- "overridable": ["overlay"]
23
- },
24
- {
25
- "token": "--skra-comp-link-foreground-active",
26
- "label": "Link — text colour while pressed",
27
- "group": "State",
28
- "type": "color",
29
- "states": ["active"],
30
- "constraint": { "oklch": true },
31
- "overridable": ["overlay"]
32
- },
33
- {
34
- "token": "--skra-comp-link-foreground-visited",
35
- "label": "Link — text colour after the URL has been visited (UA history state)",
36
- "group": "State",
37
- "type": "color",
38
- "states": ["visited"],
39
- "constraint": { "oklch": true },
40
- "overridable": ["overlay"]
41
- },
42
- {
43
- "token": "--skra-comp-link-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-link-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-link-text-decoration-line",
62
- "label": "Underline mode — none / underline / dotted / dashed",
63
- "group": "Typography",
64
- "type": "string",
65
- "states": ["default"],
66
- "constraint": {
67
- "enum": ["none", "underline", "overline", "dotted", "dashed", "wavy"]
68
- },
69
- "overridable": ["overlay", "subtree"]
70
- },
71
- {
72
- "token": "--skra-comp-link-text-decoration-thickness",
73
- "label": "Underline thickness",
74
- "group": "Typography",
75
- "type": "dimension",
76
- "states": ["default"],
77
- "constraint": { "unit": "rem", "min": 0.0625, "max": 0.1875 },
78
- "overridable": ["overlay"]
79
- },
80
- {
81
- "token": "--skra-comp-link-text-underline-offset",
82
- "label": "Underline vertical offset from text baseline",
83
- "group": "Typography",
84
- "type": "dimension",
85
- "states": ["default"],
86
- "constraint": { "unit": "rem", "min": 0.0625, "max": 0.5 },
87
- "overridable": ["overlay"]
88
- },
89
- {
90
- "token": "--skra-comp-link-motion-duration",
91
- "label": "Transition duration for colour state changes",
92
- "group": "Motion",
93
- "type": "duration",
94
- "states": ["default"],
95
- "constraint": { "unit": "ms" },
96
- "overridable": ["overlay"]
97
- },
98
- {
99
- "token": "--skra-comp-link-motion-easing",
100
- "label": "Transition easing curve",
101
- "group": "Motion",
102
- "type": "cubic-bezier",
103
- "states": ["default"],
104
- "overridable": ["overlay"]
105
- }
106
- ]
107
- }
1
+ {
2
+ "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
+ "component": "link",
4
+ "skraVersion": ">=1.0.0",
5
+ "axes": [
6
+ {
7
+ "token": "--skra-comp-link-foreground",
8
+ "label": "Link — text colour (default / unvisited)",
9
+ "group": "Surface",
10
+ "type": "color",
11
+ "states": ["default"],
12
+ "constraint": { "oklch": true },
13
+ "overridable": ["overlay", "subtree", "instance"]
14
+ },
15
+ {
16
+ "token": "--skra-comp-link-foreground-hover",
17
+ "label": "Link — text colour on hover",
18
+ "group": "State",
19
+ "type": "color",
20
+ "states": ["hover"],
21
+ "constraint": { "oklch": true },
22
+ "overridable": ["overlay"]
23
+ },
24
+ {
25
+ "token": "--skra-comp-link-foreground-active",
26
+ "label": "Link — text colour while pressed",
27
+ "group": "State",
28
+ "type": "color",
29
+ "states": ["active"],
30
+ "constraint": { "oklch": true },
31
+ "overridable": ["overlay"]
32
+ },
33
+ {
34
+ "token": "--skra-comp-link-foreground-visited",
35
+ "label": "Link — text colour after the URL has been visited (UA history state)",
36
+ "group": "State",
37
+ "type": "color",
38
+ "states": ["visited"],
39
+ "constraint": { "oklch": true },
40
+ "overridable": ["overlay"]
41
+ },
42
+ {
43
+ "token": "--skra-comp-link-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-link-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-link-text-decoration-line",
62
+ "label": "Underline mode — none / underline / dotted / dashed",
63
+ "group": "Typography",
64
+ "type": "string",
65
+ "states": ["default"],
66
+ "constraint": {
67
+ "enum": ["none", "underline", "overline", "dotted", "dashed", "wavy"]
68
+ },
69
+ "overridable": ["overlay", "subtree"]
70
+ },
71
+ {
72
+ "token": "--skra-comp-link-text-decoration-thickness",
73
+ "label": "Underline thickness",
74
+ "group": "Typography",
75
+ "type": "dimension",
76
+ "states": ["default"],
77
+ "constraint": { "unit": "rem", "min": 0.0625, "max": 0.1875 },
78
+ "overridable": ["overlay"]
79
+ },
80
+ {
81
+ "token": "--skra-comp-link-text-underline-offset",
82
+ "label": "Underline vertical offset from text baseline",
83
+ "group": "Typography",
84
+ "type": "dimension",
85
+ "states": ["default"],
86
+ "constraint": { "unit": "rem", "min": 0.0625, "max": 0.5 },
87
+ "overridable": ["overlay"]
88
+ },
89
+ {
90
+ "token": "--skra-comp-link-motion-duration",
91
+ "label": "Transition duration for colour state changes",
92
+ "group": "Motion",
93
+ "type": "duration",
94
+ "states": ["default"],
95
+ "constraint": { "unit": "ms" },
96
+ "overridable": ["overlay"]
97
+ },
98
+ {
99
+ "token": "--skra-comp-link-motion-easing",
100
+ "label": "Transition easing curve",
101
+ "group": "Motion",
102
+ "type": "cubic-bezier",
103
+ "states": ["default"],
104
+ "overridable": ["overlay"]
105
+ }
106
+ ]
107
+ }