@handamade/psi-tokens 0.25.0 → 0.26.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/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.js +13 -0
- package/dist/components/radio-group.vars.css +11 -0
- package/dist/components/registry.js +4 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +18 -0
- package/dist/components/textarea.vars.css +15 -0
- package/dist/components.css +28 -0
- package/dist/scope-map.json +36 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** RadioGroup / Radio component tokens (--psi-radio-group-*) — D104. One
|
|
2
|
+
* module serves both, so one prefix. The checkbox's recipe on a circle: the
|
|
3
|
+
* checked circle fills with the accent and shows a dot in fg-on-accent,
|
|
4
|
+
* exactly the checkbox's checked pair, already gated. No new contrast pair. */
|
|
5
|
+
export declare const radioGroupVars: Record<string, string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** RadioGroup / Radio component tokens (--psi-radio-group-*) — D104. One
|
|
2
|
+
* module serves both, so one prefix. The checkbox's recipe on a circle: the
|
|
3
|
+
* checked circle fills with the accent and shows a dot in fg-on-accent,
|
|
4
|
+
* exactly the checkbox's checked pair, already gated. No new contrast pair. */
|
|
5
|
+
export const radioGroupVars = {
|
|
6
|
+
fg: "var(--psi-fg-primary)",
|
|
7
|
+
"circle-bg": "var(--psi-bg-primary)",
|
|
8
|
+
"circle-border": "var(--psi-border-neutral)",
|
|
9
|
+
"circle-bg-checked": "var(--psi-fill-accent)",
|
|
10
|
+
"circle-border-checked": "var(--psi-fill-accent)",
|
|
11
|
+
"dot-fg": "var(--psi-fg-on-accent)",
|
|
12
|
+
"focus-ring": "var(--psi-border-focus)",
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@layer psi.components {
|
|
2
|
+
:where(:root, [data-psi-theme]) {
|
|
3
|
+
--psi-radio-group-fg: var(--psi-fg-primary);
|
|
4
|
+
--psi-radio-group-circle-bg: var(--psi-bg-primary);
|
|
5
|
+
--psi-radio-group-circle-border: var(--psi-border-neutral);
|
|
6
|
+
--psi-radio-group-circle-bg-checked: var(--psi-fill-accent);
|
|
7
|
+
--psi-radio-group-circle-border-checked: var(--psi-fill-accent);
|
|
8
|
+
--psi-radio-group-dot-fg: var(--psi-fg-on-accent);
|
|
9
|
+
--psi-radio-group-focus-ring: var(--psi-border-focus);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -27,6 +27,8 @@ import { toastVars } from "./toast.js";
|
|
|
27
27
|
import { tabsVars } from "./tabs.js";
|
|
28
28
|
import { fieldVars } from "./field.js";
|
|
29
29
|
import { descriptionListVars } from "./description-list.js";
|
|
30
|
+
import { textareaVars } from "./textarea.js";
|
|
31
|
+
import { radioGroupVars } from "./radio-group.js";
|
|
30
32
|
export const componentVars = {
|
|
31
33
|
"app-shell": appShellVars,
|
|
32
34
|
banner: bannerVars,
|
|
@@ -42,6 +44,7 @@ export const componentVars = {
|
|
|
42
44
|
menu: menuVars,
|
|
43
45
|
navbar: navbarVars,
|
|
44
46
|
panel: panelVars,
|
|
47
|
+
"radio-group": radioGroupVars,
|
|
45
48
|
select: selectVars,
|
|
46
49
|
skeleton: skeletonVars,
|
|
47
50
|
"nav-tree": navTreeVars,
|
|
@@ -52,6 +55,7 @@ export const componentVars = {
|
|
|
52
55
|
tabs: tabsVars,
|
|
53
56
|
"description-list": descriptionListVars,
|
|
54
57
|
tag: tagVars,
|
|
58
|
+
textarea: textareaVars,
|
|
55
59
|
toolbar: toolbarVars,
|
|
56
60
|
toast: toastVars,
|
|
57
61
|
tooltip: tooltipVars,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Textarea component tokens (--psi-textarea-*) — D104. Pure aliases of the
|
|
2
|
+
* input's semantics and the 32px value ramp, so a multi-line field reads as
|
|
3
|
+
* the same control family as Input. Every value is an existing gated
|
|
4
|
+
* semantic; counter-fg is fg-secondary, gated at 4.5 on every surface. No
|
|
5
|
+
* size ramp: a textarea's height is its rows, not a control size. */
|
|
6
|
+
export declare const textareaVars: Record<string, string>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Textarea component tokens (--psi-textarea-*) — D104. Pure aliases of the
|
|
2
|
+
* input's semantics and the 32px value ramp, so a multi-line field reads as
|
|
3
|
+
* the same control family as Input. Every value is an existing gated
|
|
4
|
+
* semantic; counter-fg is fg-secondary, gated at 4.5 on every surface. No
|
|
5
|
+
* size ramp: a textarea's height is its rows, not a control size. */
|
|
6
|
+
export const textareaVars = {
|
|
7
|
+
bg: "var(--psi-bg-primary)",
|
|
8
|
+
fg: "var(--psi-fg-primary)",
|
|
9
|
+
placeholder: "var(--psi-fg-tertiary)",
|
|
10
|
+
border: "var(--psi-border-neutral)",
|
|
11
|
+
"border-hover": "var(--psi-border-strong)",
|
|
12
|
+
"border-error": "var(--psi-fg-danger)",
|
|
13
|
+
"focus-ring": "var(--psi-border-focus)",
|
|
14
|
+
radius: "var(--psi-control-radius)",
|
|
15
|
+
"padding-inline": "var(--psi-control-value-32-padding-inline)",
|
|
16
|
+
font: "var(--psi-control-value-32-font)",
|
|
17
|
+
"counter-fg": "var(--psi-fg-secondary)",
|
|
18
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@layer psi.components {
|
|
2
|
+
:where(:root, [data-psi-theme]) {
|
|
3
|
+
--psi-textarea-bg: var(--psi-bg-primary);
|
|
4
|
+
--psi-textarea-fg: var(--psi-fg-primary);
|
|
5
|
+
--psi-textarea-placeholder: var(--psi-fg-tertiary);
|
|
6
|
+
--psi-textarea-border: var(--psi-border-neutral);
|
|
7
|
+
--psi-textarea-border-hover: var(--psi-border-strong);
|
|
8
|
+
--psi-textarea-border-error: var(--psi-fg-danger);
|
|
9
|
+
--psi-textarea-focus-ring: var(--psi-border-focus);
|
|
10
|
+
--psi-textarea-radius: var(--psi-control-radius);
|
|
11
|
+
--psi-textarea-padding-inline: var(--psi-control-value-32-padding-inline);
|
|
12
|
+
--psi-textarea-font: var(--psi-control-value-32-font);
|
|
13
|
+
--psi-textarea-counter-fg: var(--psi-fg-secondary);
|
|
14
|
+
}
|
|
15
|
+
}
|
package/dist/components.css
CHANGED
|
@@ -257,6 +257,18 @@
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
+
@layer psi.components {
|
|
261
|
+
:where(:root, [data-psi-theme]) {
|
|
262
|
+
--psi-radio-group-fg: var(--psi-fg-primary);
|
|
263
|
+
--psi-radio-group-circle-bg: var(--psi-bg-primary);
|
|
264
|
+
--psi-radio-group-circle-border: var(--psi-border-neutral);
|
|
265
|
+
--psi-radio-group-circle-bg-checked: var(--psi-fill-accent);
|
|
266
|
+
--psi-radio-group-circle-border-checked: var(--psi-fill-accent);
|
|
267
|
+
--psi-radio-group-dot-fg: var(--psi-fg-on-accent);
|
|
268
|
+
--psi-radio-group-focus-ring: var(--psi-border-focus);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
260
272
|
@layer psi.components {
|
|
261
273
|
:where(:root, [data-psi-theme]) {
|
|
262
274
|
--psi-select-bg: var(--psi-bg-primary);
|
|
@@ -411,6 +423,22 @@
|
|
|
411
423
|
}
|
|
412
424
|
}
|
|
413
425
|
|
|
426
|
+
@layer psi.components {
|
|
427
|
+
:where(:root, [data-psi-theme]) {
|
|
428
|
+
--psi-textarea-bg: var(--psi-bg-primary);
|
|
429
|
+
--psi-textarea-fg: var(--psi-fg-primary);
|
|
430
|
+
--psi-textarea-placeholder: var(--psi-fg-tertiary);
|
|
431
|
+
--psi-textarea-border: var(--psi-border-neutral);
|
|
432
|
+
--psi-textarea-border-hover: var(--psi-border-strong);
|
|
433
|
+
--psi-textarea-border-error: var(--psi-fg-danger);
|
|
434
|
+
--psi-textarea-focus-ring: var(--psi-border-focus);
|
|
435
|
+
--psi-textarea-radius: var(--psi-control-radius);
|
|
436
|
+
--psi-textarea-padding-inline: var(--psi-control-value-32-padding-inline);
|
|
437
|
+
--psi-textarea-font: var(--psi-control-value-32-font);
|
|
438
|
+
--psi-textarea-counter-fg: var(--psi-fg-secondary);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
414
442
|
@layer psi.components {
|
|
415
443
|
:where(:root, [data-psi-theme]) {
|
|
416
444
|
--psi-toolbar-control-width: 200px;
|
package/dist/scope-map.json
CHANGED
|
@@ -484,6 +484,24 @@
|
|
|
484
484
|
"panel-border": [
|
|
485
485
|
"border"
|
|
486
486
|
],
|
|
487
|
+
"radio-group-fg": [
|
|
488
|
+
"text"
|
|
489
|
+
],
|
|
490
|
+
"radio-group-circle-bg": [
|
|
491
|
+
"surface"
|
|
492
|
+
],
|
|
493
|
+
"radio-group-circle-border": [
|
|
494
|
+
"border"
|
|
495
|
+
],
|
|
496
|
+
"radio-group-circle-bg-checked": [
|
|
497
|
+
"surface"
|
|
498
|
+
],
|
|
499
|
+
"radio-group-circle-border-checked": [
|
|
500
|
+
"border"
|
|
501
|
+
],
|
|
502
|
+
"radio-group-dot-fg": [
|
|
503
|
+
"text"
|
|
504
|
+
],
|
|
487
505
|
"select-bg": [
|
|
488
506
|
"surface"
|
|
489
507
|
],
|
|
@@ -655,6 +673,24 @@
|
|
|
655
673
|
"tag-danger-subtle-fg": [
|
|
656
674
|
"text"
|
|
657
675
|
],
|
|
676
|
+
"textarea-bg": [
|
|
677
|
+
"surface"
|
|
678
|
+
],
|
|
679
|
+
"textarea-fg": [
|
|
680
|
+
"text"
|
|
681
|
+
],
|
|
682
|
+
"textarea-border": [
|
|
683
|
+
"border"
|
|
684
|
+
],
|
|
685
|
+
"textarea-border-hover": [
|
|
686
|
+
"border"
|
|
687
|
+
],
|
|
688
|
+
"textarea-border-error": [
|
|
689
|
+
"border"
|
|
690
|
+
],
|
|
691
|
+
"textarea-counter-fg": [
|
|
692
|
+
"text"
|
|
693
|
+
],
|
|
658
694
|
"toast-bg": [
|
|
659
695
|
"surface"
|
|
660
696
|
],
|