@skra/tokens 0.2.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 (55) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +7 -0
  3. package/README.md +64 -0
  4. package/brutal/_baseline.scss +22 -0
  5. package/brutal/_comp.scss +985 -0
  6. package/brutal/_density.comfortable.scoped.scss +166 -0
  7. package/brutal/_density.comfortable.scss +166 -0
  8. package/brutal/_density.compact.scoped.scss +166 -0
  9. package/brutal/_density.compact.scss +166 -0
  10. package/brutal/_theme.dark.scoped.scss +707 -0
  11. package/brutal/_theme.dark.scss +708 -0
  12. package/brutal/_theme.scoped.scss +1289 -0
  13. package/brutal/_theme.scss +451 -0
  14. package/brutal/skin.config.json +40 -0
  15. package/manifests/accordion.json +52 -0
  16. package/manifests/alert.json +107 -0
  17. package/manifests/avatar.json +78 -0
  18. package/manifests/badge.json +63 -0
  19. package/manifests/box.json +34 -0
  20. package/manifests/button.json +133 -0
  21. package/manifests/chip.json +116 -0
  22. package/manifests/combobox.json +141 -0
  23. package/manifests/datepicker.json +159 -0
  24. package/manifests/dialog.json +104 -0
  25. package/manifests/field.json +267 -0
  26. package/manifests/grid.json +61 -0
  27. package/manifests/icon.json +43 -0
  28. package/manifests/kbd.json +68 -0
  29. package/manifests/link.json +107 -0
  30. package/manifests/menu.json +122 -0
  31. package/manifests/popover.json +104 -0
  32. package/manifests/progress.json +69 -0
  33. package/manifests/select.json +177 -0
  34. package/manifests/skeleton.json +43 -0
  35. package/manifests/stack.json +34 -0
  36. package/manifests/star-rating.json +96 -0
  37. package/manifests/status-dot.json +69 -0
  38. package/manifests/tabs.json +52 -0
  39. package/manifests/toast.json +133 -0
  40. package/manifests/tooltip.json +113 -0
  41. package/manifests/typography.json +169 -0
  42. package/overlays/brand-jade.scss +9 -0
  43. package/overlays/round-corners.scss +8 -0
  44. package/overlays/square-corners.scss +8 -0
  45. package/package.json +19 -0
  46. package/skra/_baseline.scss +22 -0
  47. package/skra/_comp.scss +981 -0
  48. package/skra/_density.comfortable.scss +166 -0
  49. package/skra/_density.compact.scss +166 -0
  50. package/skra/_form-controls.scss +74 -0
  51. package/skra/_overlay.scss +42 -0
  52. package/skra/_theme.dark.scss +698 -0
  53. package/skra/_theme.scss +448 -0
  54. package/skra/skin.config.json +37 -0
  55. package/skra/utilities.scss +38 -0
@@ -0,0 +1,169 @@
1
+ {
2
+ "$schema": "https://skra-ds/schemas/skin-surface.v1.json",
3
+ "component": "typography",
4
+ "skraVersion": ">=1.0.0",
5
+ "axes": [
6
+ {
7
+ "token": "--skra-comp-typography-display-large-foreground",
8
+ "label": "Display Large — text colour",
9
+ "group": "Surface",
10
+ "type": "color",
11
+ "states": ["default"],
12
+ "constraint": { "oklch": true },
13
+ "overridable": ["overlay"]
14
+ },
15
+ {
16
+ "token": "--skra-comp-typography-display-medium-foreground",
17
+ "label": "Display Medium — text colour",
18
+ "group": "Surface",
19
+ "type": "color",
20
+ "states": ["default"],
21
+ "constraint": { "oklch": true },
22
+ "overridable": ["overlay"]
23
+ },
24
+ {
25
+ "token": "--skra-comp-typography-display-small-foreground",
26
+ "label": "Display Small — text colour",
27
+ "group": "Surface",
28
+ "type": "color",
29
+ "states": ["default"],
30
+ "constraint": { "oklch": true },
31
+ "overridable": ["overlay"]
32
+ },
33
+ {
34
+ "token": "--skra-comp-typography-headline-large-foreground",
35
+ "label": "Headline Large — text colour",
36
+ "group": "Surface",
37
+ "type": "color",
38
+ "states": ["default"],
39
+ "constraint": { "oklch": true },
40
+ "overridable": ["overlay"]
41
+ },
42
+ {
43
+ "token": "--skra-comp-typography-headline-medium-foreground",
44
+ "label": "Headline Medium — text colour",
45
+ "group": "Surface",
46
+ "type": "color",
47
+ "states": ["default"],
48
+ "constraint": { "oklch": true },
49
+ "overridable": ["overlay"]
50
+ },
51
+ {
52
+ "token": "--skra-comp-typography-headline-small-foreground",
53
+ "label": "Headline Small — text colour",
54
+ "group": "Surface",
55
+ "type": "color",
56
+ "states": ["default"],
57
+ "constraint": { "oklch": true },
58
+ "overridable": ["overlay"]
59
+ },
60
+ {
61
+ "token": "--skra-comp-typography-title-large-foreground",
62
+ "label": "Title Large — text colour",
63
+ "group": "Surface",
64
+ "type": "color",
65
+ "states": ["default"],
66
+ "constraint": { "oklch": true },
67
+ "overridable": ["overlay"]
68
+ },
69
+ {
70
+ "token": "--skra-comp-typography-title-medium-foreground",
71
+ "label": "Title Medium — text colour",
72
+ "group": "Surface",
73
+ "type": "color",
74
+ "states": ["default"],
75
+ "constraint": { "oklch": true },
76
+ "overridable": ["overlay"]
77
+ },
78
+ {
79
+ "token": "--skra-comp-typography-title-small-foreground",
80
+ "label": "Title Small — text colour",
81
+ "group": "Surface",
82
+ "type": "color",
83
+ "states": ["default"],
84
+ "constraint": { "oklch": true },
85
+ "overridable": ["overlay"]
86
+ },
87
+ {
88
+ "token": "--skra-comp-typography-body-large-foreground",
89
+ "label": "Body Large — text colour",
90
+ "group": "Surface",
91
+ "type": "color",
92
+ "states": ["default"],
93
+ "constraint": { "oklch": true },
94
+ "overridable": ["overlay", "subtree", "instance"]
95
+ },
96
+ {
97
+ "token": "--skra-comp-typography-body-medium-foreground",
98
+ "label": "Body Medium — text colour",
99
+ "group": "Surface",
100
+ "type": "color",
101
+ "states": ["default"],
102
+ "constraint": { "oklch": true },
103
+ "overridable": ["overlay", "subtree", "instance"]
104
+ },
105
+ {
106
+ "token": "--skra-comp-typography-body-small-foreground",
107
+ "label": "Body Small — text colour",
108
+ "group": "Surface",
109
+ "type": "color",
110
+ "states": ["default"],
111
+ "constraint": { "oklch": true },
112
+ "overridable": ["overlay", "subtree", "instance"]
113
+ },
114
+ {
115
+ "token": "--skra-comp-typography-label-large-foreground",
116
+ "label": "Label Large — text colour",
117
+ "group": "Surface",
118
+ "type": "color",
119
+ "states": ["default"],
120
+ "constraint": { "oklch": true },
121
+ "overridable": ["overlay", "subtree", "instance"]
122
+ },
123
+ {
124
+ "token": "--skra-comp-typography-label-medium-foreground",
125
+ "label": "Label Medium — text colour",
126
+ "group": "Surface",
127
+ "type": "color",
128
+ "states": ["default"],
129
+ "constraint": { "oklch": true },
130
+ "overridable": ["overlay", "subtree", "instance"]
131
+ },
132
+ {
133
+ "token": "--skra-comp-typography-label-small-foreground",
134
+ "label": "Label Small — text colour",
135
+ "group": "Surface",
136
+ "type": "color",
137
+ "states": ["default"],
138
+ "constraint": { "oklch": true },
139
+ "overridable": ["overlay", "subtree", "instance"]
140
+ },
141
+ {
142
+ "token": "--skra-comp-typography-foreground-error",
143
+ "label": "Severity Error — text colour",
144
+ "group": "Surface",
145
+ "type": "color",
146
+ "states": ["default"],
147
+ "constraint": { "oklch": true },
148
+ "overridable": ["overlay"]
149
+ },
150
+ {
151
+ "token": "--skra-comp-typography-foreground-warning",
152
+ "label": "Severity Warning — text colour",
153
+ "group": "Surface",
154
+ "type": "color",
155
+ "states": ["default"],
156
+ "constraint": { "oklch": true },
157
+ "overridable": ["overlay"]
158
+ },
159
+ {
160
+ "token": "--skra-comp-typography-foreground-success",
161
+ "label": "Severity Success — text colour",
162
+ "group": "Surface",
163
+ "type": "color",
164
+ "states": ["default"],
165
+ "constraint": { "oklch": true },
166
+ "overridable": ["overlay"]
167
+ }
168
+ ]
169
+ }
@@ -0,0 +1,9 @@
1
+ /* dist/tokens/overlays/brand-jade.scss — auto-generated by build-tokens.mjs (ADR 029)
2
+ * Skin Overlay Preset. baseSkin: skra. Import AFTER the base skin's
3
+ * _theme.scss, then scope with <div data-skra-overlay="brand-jade">…</div>.
4
+ */
5
+
6
+ [data-skra-overlay="brand-jade"] {
7
+ --skra-comp-button-background-primary-high: oklch(0.72 0.15 162);
8
+ --skra-comp-button-foreground-primary-high: oklch(0.16 0.03 162);
9
+ }
@@ -0,0 +1,8 @@
1
+ /* dist/tokens/overlays/round-corners.scss — auto-generated by build-tokens.mjs (ADR 029)
2
+ * Skin Overlay Preset. baseSkin: skra. Import AFTER the base skin's
3
+ * _theme.scss, then scope with <div data-skra-overlay="round-corners">…</div>.
4
+ */
5
+
6
+ [data-skra-overlay="round-corners"] {
7
+ --skra-comp-button-radius: 1rem;
8
+ }
@@ -0,0 +1,8 @@
1
+ /* dist/tokens/overlays/square-corners.scss — auto-generated by build-tokens.mjs (ADR 029)
2
+ * Skin Overlay Preset. baseSkin: skra. Import AFTER the base skin's
3
+ * _theme.scss, then scope with <div data-skra-overlay="square-corners">…</div>.
4
+ */
5
+
6
+ [data-skra-overlay="square-corners"] {
7
+ --skra-comp-button-radius: 0;
8
+ }
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@skra/tokens",
3
+ "version": "0.2.0",
4
+ "license": "Apache-2.0",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "description": "Skra Design System token artifacts — per-skin CSS value layers, structural slices, overlay presets, and skin-surface manifests. Framework-agnostic (plain CSS / JSON, ADR 000).",
9
+ "keywords": [
10
+ "skra",
11
+ "design-system",
12
+ "design-tokens",
13
+ "css-variables"
14
+ ],
15
+ "exports": {
16
+ "./package.json": "./package.json",
17
+ "./*": "./*"
18
+ }
19
+ }
@@ -0,0 +1,22 @@
1
+ /* dist/tokens/skra/_baseline.scss — auto-generated by build-tokens.mjs
2
+ * Opt-in: import this AFTER `@use '@skra-skin'`, then apply `data-skra-baseline` on the
3
+ * element that should own the baseline — `<html>` (Forge owns the page) or a wrapper `<div>`
4
+ * (Forge is a guest in a foreign shell). The slice is inert until the hook is present.
5
+ * Strict scope (ADR 036 §3.7): rules under [data-skra-baseline] only — typography + the
6
+ * surface/on-surface canvas pair + native code/pre/kbd/samp. NO other colour/layout/margin/box.
7
+ */
8
+
9
+ @use './theme';
10
+
11
+ [data-skra-baseline] {
12
+ font-family: var(--skra-sys-font-family-body);
13
+ font-size: 100%; /* rem-root on <html>; harmless no-op on a wrapper (WCAG 1.4.4) */
14
+ line-height: var(--skra-sys-typography-role-body-medium-line-height);
15
+ color: var(--skra-sys-color-on-surface);
16
+ background-color: var(--skra-sys-color-surface);
17
+ }
18
+
19
+ /* Native code-content elements default to mono font (consolidates browser defaults). */
20
+ [data-skra-baseline] :is(code, pre, kbd, samp) {
21
+ font-family: var(--skra-sys-font-family-code);
22
+ }