@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.
- package/LICENSE +201 -201
- package/NOTICE +7 -7
- package/README.md +99 -64
- package/brutal/_theme.scoped.scss +18 -18
- package/brutal/_theme.scss +60 -12
- package/brutal/skin.config.json +40 -40
- package/manifests/accordion.json +52 -52
- package/manifests/alert.json +107 -107
- package/manifests/avatar.json +78 -78
- package/manifests/badge.json +63 -63
- package/manifests/box.json +34 -34
- package/manifests/button.json +133 -133
- package/manifests/chip.json +116 -116
- package/manifests/combobox.json +141 -141
- package/manifests/datepicker.json +159 -159
- package/manifests/dialog.json +104 -104
- package/manifests/field.json +267 -267
- package/manifests/grid.json +61 -61
- package/manifests/icon.json +43 -43
- package/manifests/kbd.json +68 -68
- package/manifests/link.json +107 -107
- package/manifests/menu.json +122 -122
- package/manifests/popover.json +104 -104
- package/manifests/progress.json +69 -69
- package/manifests/select.json +177 -177
- package/manifests/skeleton.json +43 -43
- package/manifests/stack.json +34 -34
- package/manifests/star-rating.json +96 -96
- package/manifests/status-dot.json +69 -69
- package/manifests/tabs.json +52 -52
- package/manifests/toast.json +133 -133
- package/manifests/tooltip.json +113 -113
- package/manifests/typography.json +169 -169
- package/package.json +1 -1
- package/skra/_form-controls.scss +74 -74
- package/skra/_overlay.scss +42 -42
- package/skra/_theme.dark.scss +3 -0
- package/skra/_theme.scss +61 -10
- package/skra/skin.config.json +37 -37
- package/skra/utilities.scss +38 -38
package/skra/_theme.scss
CHANGED
|
@@ -111,15 +111,17 @@
|
|
|
111
111
|
--skra-sys-color-focus-ring-hover: oklch(53.0% 0.15 250);
|
|
112
112
|
--skra-sys-color-focus-ring-active: oklch(49.5% 0.15 250);
|
|
113
113
|
--skra-sys-color-link-active: oklch(41.5% 0.15 250);
|
|
114
|
+
--skra-sys-color-shadow-ink-hover: oklch(7.0% 0 0);
|
|
115
|
+
--skra-sys-color-shadow-ink-active: oklch(10.5% 0 0);
|
|
114
116
|
--skra-sys-icon-size-sm: 1em;
|
|
115
117
|
--skra-sys-icon-size-md: 1.25em;
|
|
116
118
|
--skra-sys-icon-size-lg: 1.5em;
|
|
117
119
|
--skra-sys-radius-none: 0;
|
|
118
120
|
--skra-sys-shadow-none: none;
|
|
119
|
-
--skra-sys-shadow-sm: 0 1px 2px
|
|
120
|
-
--skra-sys-shadow-md: 0 2px 8px
|
|
121
|
-
--skra-sys-shadow-lg: 0 4px 16px
|
|
122
|
-
--skra-sys-shadow-xl: 0 8px 32px
|
|
121
|
+
--skra-sys-shadow-sm: 0 1px 2px color-mix(in oklab, var(--skra-sys-color-shadow-ink) 10%, transparent);
|
|
122
|
+
--skra-sys-shadow-md: 0 2px 8px color-mix(in oklab, var(--skra-sys-color-shadow-ink) 12%, transparent);
|
|
123
|
+
--skra-sys-shadow-lg: 0 4px 16px color-mix(in oklab, var(--skra-sys-color-shadow-ink) 15%, transparent);
|
|
124
|
+
--skra-sys-shadow-xl: 0 8px 32px color-mix(in oklab, var(--skra-sys-color-shadow-ink) 20%, transparent);
|
|
123
125
|
--skra-sys-size-interactive-sm: 2rem;
|
|
124
126
|
--skra-sys-size-interactive-md: 2.5rem;
|
|
125
127
|
--skra-sys-size-interactive-lg: 3rem;
|
|
@@ -129,12 +131,12 @@
|
|
|
129
131
|
--skra-sys-typography-role-headline-large-letter-spacing: -0.0125em;
|
|
130
132
|
--skra-sys-typography-role-headline-medium-letter-spacing: -0.0125em;
|
|
131
133
|
--skra-sys-typography-role-headline-small-letter-spacing: -0.0125em;
|
|
132
|
-
--skra-sys-typography-role-title-large-letter-spacing:
|
|
133
|
-
--skra-sys-typography-role-title-medium-letter-spacing:
|
|
134
|
-
--skra-sys-typography-role-title-small-letter-spacing:
|
|
135
|
-
--skra-sys-typography-role-body-large-letter-spacing:
|
|
136
|
-
--skra-sys-typography-role-body-medium-letter-spacing:
|
|
137
|
-
--skra-sys-typography-role-body-small-letter-spacing:
|
|
134
|
+
--skra-sys-typography-role-title-large-letter-spacing: 0em;
|
|
135
|
+
--skra-sys-typography-role-title-medium-letter-spacing: 0em;
|
|
136
|
+
--skra-sys-typography-role-title-small-letter-spacing: 0em;
|
|
137
|
+
--skra-sys-typography-role-body-large-letter-spacing: 0em;
|
|
138
|
+
--skra-sys-typography-role-body-medium-letter-spacing: 0em;
|
|
139
|
+
--skra-sys-typography-role-body-small-letter-spacing: 0em;
|
|
138
140
|
--skra-sys-typography-role-label-large-letter-spacing: 0.025em;
|
|
139
141
|
--skra-sys-typography-role-label-medium-letter-spacing: 0.025em;
|
|
140
142
|
--skra-sys-typography-role-label-small-letter-spacing: 0.025em;
|
|
@@ -220,6 +222,54 @@
|
|
|
220
222
|
--skra-ref-color-green-bright: oklch(80% 0.182 152);
|
|
221
223
|
--skra-ref-color-amber-bright: oklch(83.7% 0.164 84);
|
|
222
224
|
--skra-ref-color-red-bright: oklch(71.1% 0.166 22);
|
|
225
|
+
--skra-ref-color-magenta-50: oklch(95% 0.035 348);
|
|
226
|
+
--skra-ref-color-magenta-300: oklch(78% 0.16 348);
|
|
227
|
+
--skra-ref-color-magenta-400: oklch(70% 0.2 348);
|
|
228
|
+
--skra-ref-color-magenta-500: oklch(62% 0.22 348);
|
|
229
|
+
--skra-ref-color-magenta-600: oklch(52% 0.2 348);
|
|
230
|
+
--skra-ref-color-magenta-700: oklch(43% 0.16 348);
|
|
231
|
+
--skra-ref-color-magenta-soft-dark: oklch(28% 0.08 348);
|
|
232
|
+
--skra-ref-color-magenta-bright: oklch(74% 0.19 348);
|
|
233
|
+
--skra-ref-color-stone-0: oklch(100% 0 0);
|
|
234
|
+
--skra-ref-color-stone-50: oklch(98% 0.006 85);
|
|
235
|
+
--skra-ref-color-stone-100: oklch(95.5% 0.008 85);
|
|
236
|
+
--skra-ref-color-stone-200: oklch(93.5% 0.01 85);
|
|
237
|
+
--skra-ref-color-stone-300: oklch(88% 0.01 85);
|
|
238
|
+
--skra-ref-color-stone-500: oklch(58% 0.012 85);
|
|
239
|
+
--skra-ref-color-stone-600: oklch(50% 0.012 85);
|
|
240
|
+
--skra-ref-color-stone-700: oklch(40% 0.014 85);
|
|
241
|
+
--skra-ref-color-stone-900: oklch(24% 0.012 85);
|
|
242
|
+
--skra-ref-color-sky-50: oklch(96% 0.025 235);
|
|
243
|
+
--skra-ref-color-sky-300: oklch(84% 0.075 235);
|
|
244
|
+
--skra-ref-color-sky-500: oklch(70% 0.1 235);
|
|
245
|
+
--skra-ref-color-sky-700: oklch(45% 0.11 235);
|
|
246
|
+
--skra-ref-color-sky-900: oklch(30% 0.08 235);
|
|
247
|
+
--skra-ref-color-lilac-50: oklch(96% 0.022 300);
|
|
248
|
+
--skra-ref-color-lilac-300: oklch(84% 0.07 300);
|
|
249
|
+
--skra-ref-color-lilac-500: oklch(70% 0.1 300);
|
|
250
|
+
--skra-ref-color-lilac-700: oklch(45% 0.12 300);
|
|
251
|
+
--skra-ref-color-lilac-900: oklch(30% 0.09 300);
|
|
252
|
+
--skra-ref-color-mist-50: oklch(96% 0.025 215);
|
|
253
|
+
--skra-ref-color-mist-300: oklch(85% 0.065 215);
|
|
254
|
+
--skra-ref-color-mist-500: oklch(72% 0.085 215);
|
|
255
|
+
--skra-ref-color-mist-700: oklch(45% 0.09 215);
|
|
256
|
+
--skra-ref-color-sage-50: oklch(96% 0.025 150);
|
|
257
|
+
--skra-ref-color-sage-300: oklch(85% 0.07 150);
|
|
258
|
+
--skra-ref-color-sage-500: oklch(72% 0.09 150);
|
|
259
|
+
--skra-ref-color-sage-700: oklch(45% 0.09 150);
|
|
260
|
+
--skra-ref-color-sage-900: oklch(30% 0.07 150);
|
|
261
|
+
--skra-ref-color-sand-50: oklch(96% 0.03 85);
|
|
262
|
+
--skra-ref-color-sand-300: oklch(88% 0.075 85);
|
|
263
|
+
--skra-ref-color-sand-500: oklch(80% 0.1 85);
|
|
264
|
+
--skra-ref-color-sand-700: oklch(45% 0.08 85);
|
|
265
|
+
--skra-ref-color-sand-900: oklch(30% 0.06 85);
|
|
266
|
+
--skra-ref-color-petal-50: oklch(96% 0.025 25);
|
|
267
|
+
--skra-ref-color-petal-300: oklch(85% 0.07 25);
|
|
268
|
+
--skra-ref-color-petal-500: oklch(72% 0.12 25);
|
|
269
|
+
--skra-ref-color-petal-700: oklch(45% 0.15 25);
|
|
270
|
+
--skra-ref-color-petal-900: oklch(30% 0.1 25);
|
|
271
|
+
--skra-ref-color-glow-cyan: oklch(80% 0.14 215 / 0.5);
|
|
272
|
+
--skra-ref-color-glow-cyan-strong: oklch(86% 0.13 212 / 0.75);
|
|
223
273
|
--skra-ref-font-size-2xs: 0.6875rem;
|
|
224
274
|
--skra-ref-font-size-xs: 0.75rem;
|
|
225
275
|
--skra-ref-font-size-sm: 0.875rem;
|
|
@@ -340,6 +390,7 @@
|
|
|
340
390
|
--skra-sys-color-link-hover: var(--skra-ref-color-primary-700);
|
|
341
391
|
--skra-sys-color-link-visited: var(--skra-ref-color-violet-500);
|
|
342
392
|
--skra-sys-color-scrim: var(--skra-ref-color-scrim);
|
|
393
|
+
--skra-sys-color-shadow-ink: var(--skra-ref-color-neutral-1000);
|
|
343
394
|
--skra-sys-motion-duration-fast: var(--skra-ref-motion-duration-100);
|
|
344
395
|
--skra-sys-motion-duration-normal: var(--skra-ref-motion-duration-200);
|
|
345
396
|
--skra-sys-motion-duration-slow: var(--skra-ref-motion-duration-300);
|
package/skra/skin.config.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "skra",
|
|
3
|
-
"displayName": "Skra Default",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"publishable": true,
|
|
6
|
-
"defaultDensity": "normal",
|
|
7
|
-
"defaultColorScheme": "light",
|
|
8
|
-
"darkSchemeStrategy": "auto-oklch-with-overrides",
|
|
9
|
-
"visualProfile": {
|
|
10
|
-
"globalProfile": "normal",
|
|
11
|
-
"interactionStrength": "normal"
|
|
12
|
-
},
|
|
13
|
-
"fonts": [
|
|
14
|
-
{
|
|
15
|
-
"family": "body",
|
|
16
|
-
"name": "system",
|
|
17
|
-
"stack": "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
18
|
-
"weights": [400, 500, 600, 700],
|
|
19
|
-
"requiresLoading": false
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"family": "display",
|
|
23
|
-
"name": "system",
|
|
24
|
-
"stack": "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
25
|
-
"weights": [600, 700],
|
|
26
|
-
"requiresLoading": false
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"family": "code",
|
|
30
|
-
"name": "system",
|
|
31
|
-
"stack": "ui-monospace, 'Cascadia Code', 'Fira Code', monospace",
|
|
32
|
-
"weights": [400],
|
|
33
|
-
"requiresLoading": false
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"extends": null
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "skra",
|
|
3
|
+
"displayName": "Skra Default",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"publishable": true,
|
|
6
|
+
"defaultDensity": "normal",
|
|
7
|
+
"defaultColorScheme": "light",
|
|
8
|
+
"darkSchemeStrategy": "auto-oklch-with-overrides",
|
|
9
|
+
"visualProfile": {
|
|
10
|
+
"globalProfile": "normal",
|
|
11
|
+
"interactionStrength": "normal"
|
|
12
|
+
},
|
|
13
|
+
"fonts": [
|
|
14
|
+
{
|
|
15
|
+
"family": "body",
|
|
16
|
+
"name": "system",
|
|
17
|
+
"stack": "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
18
|
+
"weights": [400, 500, 600, 700],
|
|
19
|
+
"requiresLoading": false
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"family": "display",
|
|
23
|
+
"name": "system",
|
|
24
|
+
"stack": "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
25
|
+
"weights": [600, 700],
|
|
26
|
+
"requiresLoading": false
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"family": "code",
|
|
30
|
+
"name": "system",
|
|
31
|
+
"stack": "ui-monospace, 'Cascadia Code', 'Fira Code', monospace",
|
|
32
|
+
"weights": [400],
|
|
33
|
+
"requiresLoading": false
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"extends": null
|
|
37
|
+
}
|
package/skra/utilities.scss
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
// Forge Design System — global utilities layer (per ADR 033 §3.2)
|
|
2
|
-
//
|
|
3
|
-
// This file is the skin's static CSS surface — utilities that have no token
|
|
4
|
-
// dependency and ship identically across skins. Style Dictionary does not
|
|
5
|
-
// process it; `tools/build-tokens.mjs` copies it verbatim into the per-skin
|
|
6
|
-
// `dist/tokens/[skin]/utilities.scss`.
|
|
7
|
-
//
|
|
8
|
-
// Add only utilities that:
|
|
9
|
-
// - are inherently static (no token references), AND
|
|
10
|
-
// - are mandated by a Forge ADR.
|
|
11
|
-
|
|
12
|
-
// ─── Accessible Name Contract (ADR 033) ──────────────────────────────────────
|
|
13
|
-
// Visually-hidden utility for Path 2 (visible text + hidden extension).
|
|
14
|
-
// Canonical clip-path-based technique: kept in DOM, included in textContent,
|
|
15
|
-
// reachable by screen readers, invisible to sighted users. Both forms are
|
|
16
|
-
// equivalent — use whichever is ergonomic in the call site.
|
|
17
|
-
.skra-sr-only,
|
|
18
|
-
[skra-sr-only] {
|
|
19
|
-
position: absolute;
|
|
20
|
-
width: 1px;
|
|
21
|
-
height: 1px;
|
|
22
|
-
padding: 0;
|
|
23
|
-
margin: -1px;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
clip: rect(0, 0, 0, 0);
|
|
26
|
-
white-space: nowrap;
|
|
27
|
-
border-width: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// ─── Content-driven sizing for form controls (SkraAutoResizeDirective) ──────
|
|
31
|
-
// Native CSS `field-sizing: content` lets <textarea> grow in block-size with
|
|
32
|
-
// row count and <input> grow in inline-size with text width. The Angular
|
|
33
|
-
// directive is a marker only — its compiled attribute selector is what these
|
|
34
|
-
// rules hook into. Skin-agnostic, no token dependency.
|
|
35
|
-
textarea[skraAutoResize],
|
|
36
|
-
input[skraAutoResize] {
|
|
37
|
-
field-sizing: content;
|
|
38
|
-
}
|
|
1
|
+
// Forge Design System — global utilities layer (per ADR 033 §3.2)
|
|
2
|
+
//
|
|
3
|
+
// This file is the skin's static CSS surface — utilities that have no token
|
|
4
|
+
// dependency and ship identically across skins. Style Dictionary does not
|
|
5
|
+
// process it; `tools/build-tokens.mjs` copies it verbatim into the per-skin
|
|
6
|
+
// `dist/tokens/[skin]/utilities.scss`.
|
|
7
|
+
//
|
|
8
|
+
// Add only utilities that:
|
|
9
|
+
// - are inherently static (no token references), AND
|
|
10
|
+
// - are mandated by a Forge ADR.
|
|
11
|
+
|
|
12
|
+
// ─── Accessible Name Contract (ADR 033) ──────────────────────────────────────
|
|
13
|
+
// Visually-hidden utility for Path 2 (visible text + hidden extension).
|
|
14
|
+
// Canonical clip-path-based technique: kept in DOM, included in textContent,
|
|
15
|
+
// reachable by screen readers, invisible to sighted users. Both forms are
|
|
16
|
+
// equivalent — use whichever is ergonomic in the call site.
|
|
17
|
+
.skra-sr-only,
|
|
18
|
+
[skra-sr-only] {
|
|
19
|
+
position: absolute;
|
|
20
|
+
width: 1px;
|
|
21
|
+
height: 1px;
|
|
22
|
+
padding: 0;
|
|
23
|
+
margin: -1px;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
clip: rect(0, 0, 0, 0);
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
border-width: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ─── Content-driven sizing for form controls (SkraAutoResizeDirective) ──────
|
|
31
|
+
// Native CSS `field-sizing: content` lets <textarea> grow in block-size with
|
|
32
|
+
// row count and <input> grow in inline-size with text width. The Angular
|
|
33
|
+
// directive is a marker only — its compiled attribute selector is what these
|
|
34
|
+
// rules hook into. Skin-agnostic, no token dependency.
|
|
35
|
+
textarea[skraAutoResize],
|
|
36
|
+
input[skraAutoResize] {
|
|
37
|
+
field-sizing: content;
|
|
38
|
+
}
|