@handamade/psi-tokens 0.16.0 → 0.17.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/guidance.json +10 -1
- package/dist/utilities.css +2 -0
- package/llms.txt +3 -0
- package/package.json +1 -1
package/dist/guidance.json
CHANGED
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"radius": "Control radius is size-invariant (D56) — it does NOT ride the size ramp, because border-radius sits on each component's base rule and all four sizes resolve to radius-8. One dial, --psi-control-radius, is the layer to override, aliased per component: --psi-button-radius (Button, and IconButton via the same token), --psi-input-radius, --psi-select-radius, --psi-checkbox-box-radius, and --psi-tooltip-radius. Checkbox and Tooltip cap themselves with min(var(--psi-control-radius), var(--psi-radius-4)) and min(…, var(--psi-radius-6)) respectively so neither over-rounds a small object — but the published radius scale's floor is radius-4, so Checkbox's cap is a no-op for every on-scale value a theme can set; it only bites at an off-scale value like 0px. Tooltip's higher ceiling does track a sharper theme, down to radius-4. Tag and Switch stay --psi-radius-full: pill-ness is component identity, not theme expression. A theme retunes every control's shape by setting --psi-control-radius once. Psi now has two radius dials, not one: --psi-control-radius (here, for interactive controls) and --psi-surface-radius (for elevated surfaces — Dialog, Panel, Menu). --psi-card-radius sits on neither dial, so a theme that retunes controls or surfaces leaves Card at its own default of radius-8."
|
|
191
191
|
},
|
|
192
192
|
"utilities": {
|
|
193
|
-
"note": "Every utility class shipped in utilities.css, generated from the same source as the CSS (D79).
|
|
193
|
+
"note": "Every utility class shipped in utilities.css, generated from the same source as the CSS (D79). Scaled utility families set one property each and create no layout context: .psi-gap-* sets gap only, so pair it with display:flex or grid yourself. The bare/fixed utilities (.psi-container, .psi-media-tint, .psi-sr-only) set several. Import @handamade/psi-tokens/utilities.css — it is required, not optional; .psi-container and the reduced-motion duration zeroing live there.",
|
|
194
194
|
"families": [
|
|
195
195
|
{
|
|
196
196
|
"prefix": "psi-gap-*",
|
|
@@ -547,6 +547,14 @@
|
|
|
547
547
|
"classes": [
|
|
548
548
|
"psi-media-tint"
|
|
549
549
|
]
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
"prefix": "psi-sr-only",
|
|
553
|
+
"property": "position, width, height, padding, margin, overflow, clip, clip-path, white-space, border",
|
|
554
|
+
"scale": null,
|
|
555
|
+
"classes": [
|
|
556
|
+
"psi-sr-only"
|
|
557
|
+
]
|
|
550
558
|
}
|
|
551
559
|
],
|
|
552
560
|
"classes": [
|
|
@@ -674,6 +682,7 @@
|
|
|
674
682
|
"psi-py-8",
|
|
675
683
|
"psi-py-80",
|
|
676
684
|
"psi-py-96",
|
|
685
|
+
"psi-sr-only",
|
|
677
686
|
"psi-tabular",
|
|
678
687
|
"psi-text-12-16-medium",
|
|
679
688
|
"psi-text-12-16-regular",
|
package/dist/utilities.css
CHANGED
|
@@ -158,6 +158,8 @@
|
|
|
158
158
|
.psi-media-tint { filter: var(--psi-media-tint); transition: filter var(--psi-duration-450) var(--psi-ease-soft); }
|
|
159
159
|
.psi-media-tint:hover, .psi-media-tint:focus-visible { filter: none; }
|
|
160
160
|
|
|
161
|
+
.psi-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
162
|
+
|
|
161
163
|
/* Reduced motion (D30): zero every duration token; anything driven by
|
|
162
164
|
--psi-duration-* complies for free. psi.utilities wins over psi.base. */
|
|
163
165
|
@media (prefers-reduced-motion: reduce) {
|
package/llms.txt
CHANGED
|
@@ -40,6 +40,9 @@ OKLCH formula-based design tokens. Code is the source of truth; all artifacts ge
|
|
|
40
40
|
## Tabular numerals (--psi-font-variant-numeric, .psi-tabular)
|
|
41
41
|
- --psi-font-variant-numeric is tabular-nums (D62); apply the .psi-tabular utility class to numeric content for fixed-width digits that don't jitter between rows. Table's own numeric columns (TableCell/TableHeaderCell `numeric` prop) bind the token directly in CSS — reach for the utility class for numeric content outside Table.
|
|
42
42
|
|
|
43
|
+
## Visually hidden (.psi-sr-only)
|
|
44
|
+
- .psi-sr-only hides content visually while keeping it in the accessibility tree — position/size/clip only, never display:none or visibility:hidden, so screen readers still announce it and it stays in the tab order if focusable. Use it for status-word prefixes, icon-only-control labels not carried by aria-label, or a native input replaced by a custom visual control.
|
|
45
|
+
|
|
43
46
|
## Dark-first brands
|
|
44
47
|
- A brand theme can declare `base: "dark"` (see ember) so its formulas derive from the dark palette instead of light — use this for brands whose primary surface is a dark canvas rather than treating dark as an inverted afterthought.
|
|
45
48
|
|