@hanzo/design 0.5.15 → 0.5.16
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/tokens.gen.d.ts +4 -1
- package/dist/tokens.gen.d.ts.map +1 -1
- package/dist/tokens.gen.js +4 -1
- package/package.json +1 -1
- package/src/tokens.gen.ts +2 -1
- package/styles.css +22 -1
- package/tailwind.css +22 -1
- package/tokens/base.css +22 -1
package/dist/tokens.gen.d.ts
CHANGED
|
@@ -304,7 +304,9 @@ export declare const fonts: {
|
|
|
304
304
|
readonly 'font-feature-settings': "\"ss01\",\"ss02\",\"cv01\",\"cv02\",\"cv03\"";
|
|
305
305
|
};
|
|
306
306
|
/** base tokens (from tokens/base.css). Values are raw CSS. */
|
|
307
|
-
export declare const base: {
|
|
307
|
+
export declare const base: {
|
|
308
|
+
readonly 'ring-offset': "-2px";
|
|
309
|
+
};
|
|
308
310
|
/** Every token, keyed by its literal CSS custom-property name ('--background', …). */
|
|
309
311
|
export declare const cssVars: {
|
|
310
312
|
readonly '--neutral-50': "#FAFAFA";
|
|
@@ -585,6 +587,7 @@ export declare const cssVars: {
|
|
|
585
587
|
readonly '--font-mono': "\"Geist Mono\",ui-monospace,SFMono-Regular,monospace";
|
|
586
588
|
readonly '--font-serif': "Georgia,serif";
|
|
587
589
|
readonly '--font-feature-settings': "\"ss01\",\"ss02\",\"cv01\",\"cv02\",\"cv03\"";
|
|
590
|
+
readonly '--ring-offset': "-2px";
|
|
588
591
|
};
|
|
589
592
|
export type CssVarName = keyof typeof cssVars;
|
|
590
593
|
//# sourceMappingURL=tokens.gen.d.ts.map
|
package/dist/tokens.gen.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.gen.d.ts","sourceRoot":"","sources":["../src/tokens.gen.ts"],"names":[],"mappings":"AAIA,kEAAkE;AAClE,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;CA+CV,CAAA;AAEV,8DAA8D;AAC9D,eAAO,MAAM,IAAI;;;;;;;;;;;;CAYP,CAAA;AAEV,kEAAkE;AAClE,eAAO,MAAM,MAAM;;;;;;;;;CAST,CAAA;AAEV,wEAAwE;AACxE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BZ,CAAA;AAEV,kEAAkE;AAClE,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAaT,CAAA;AAEV,6DAA6D;AAC7D,eAAO,MAAM,MAAM;;;;;;;;;;;;CAYT,CAAA;AAEV,gEAAgE;AAChE,eAAO,MAAM,KAAK;;;;;;CAMR,CAAA;AAEV,8DAA8D;AAC9D,eAAO,MAAM,IAAI;;CAEP,CAAA;AAEV,sFAAsF;AACtF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwRV,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAA"}
|
package/dist/tokens.gen.js
CHANGED
|
@@ -307,7 +307,9 @@ export const fonts = {
|
|
|
307
307
|
'font-feature-settings': '"ss01","ss02","cv01","cv02","cv03"',
|
|
308
308
|
};
|
|
309
309
|
/** base tokens (from tokens/base.css). Values are raw CSS. */
|
|
310
|
-
export const base = {
|
|
310
|
+
export const base = {
|
|
311
|
+
'ring-offset': '-2px',
|
|
312
|
+
};
|
|
311
313
|
/** Every token, keyed by its literal CSS custom-property name ('--background', …). */
|
|
312
314
|
export const cssVars = {
|
|
313
315
|
'--neutral-50': '#FAFAFA',
|
|
@@ -588,4 +590,5 @@ export const cssVars = {
|
|
|
588
590
|
'--font-mono': '"Geist Mono",ui-monospace,SFMono-Regular,monospace',
|
|
589
591
|
'--font-serif': 'Georgia,serif',
|
|
590
592
|
'--font-feature-settings': '"ss01","ss02","cv01","cv02","cv03"',
|
|
593
|
+
'--ring-offset': '-2px',
|
|
591
594
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/design",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.16",
|
|
4
4
|
"packageManager": "pnpm@11.17.0",
|
|
5
5
|
"description": "Hanzo Design System \u2014 monochrome, dark-default tokens + components + brand assets, the single source of truth for every Hanzo surface. CSS + typed programmatic tokens.",
|
|
6
6
|
"license": "MIT OR Apache-2.0",
|
package/src/tokens.gen.ts
CHANGED
|
@@ -318,7 +318,7 @@ export const fonts = {
|
|
|
318
318
|
|
|
319
319
|
/** base tokens (from tokens/base.css). Values are raw CSS. */
|
|
320
320
|
export const base = {
|
|
321
|
-
|
|
321
|
+
'ring-offset': '-2px',
|
|
322
322
|
} as const
|
|
323
323
|
|
|
324
324
|
/** Every token, keyed by its literal CSS custom-property name ('--background', …). */
|
|
@@ -601,6 +601,7 @@ export const cssVars = {
|
|
|
601
601
|
'--font-mono': '"Geist Mono",ui-monospace,SFMono-Regular,monospace',
|
|
602
602
|
'--font-serif': 'Georgia,serif',
|
|
603
603
|
'--font-feature-settings': '"ss01","ss02","cv01","cv02","cv03"',
|
|
604
|
+
'--ring-offset': '-2px',
|
|
604
605
|
} as const
|
|
605
606
|
|
|
606
607
|
export type CssVarName = keyof typeof cssVars
|
package/styles.css
CHANGED
|
@@ -979,6 +979,22 @@
|
|
|
979
979
|
its buttons at 8-10px and nothing at 6px except 22px chips. */
|
|
980
980
|
border-radius:var(--radius-md);
|
|
981
981
|
padding:0 var(--space-3);
|
|
982
|
+
/* A field's ring is drawn INSIDE its own box. The one focus rule below
|
|
983
|
+
reads this; nothing else about the indicator changes.
|
|
984
|
+
|
|
985
|
+
A field lives in containers a button does not — composers, palettes and
|
|
986
|
+
panels that round their corners with `overflow:hidden`. An outline at a
|
|
987
|
+
POSITIVE offset is painted outside the border box, so any such ancestor
|
|
988
|
+
clips it, and the computed style still says `2px solid` while nothing is
|
|
989
|
+
drawn: a chat composer measured byte-identical screenshots focused and
|
|
990
|
+
unfocused, and a search pill kept only its left and right edges. A
|
|
991
|
+
negative offset cannot be clipped by anything, so a field needs to know
|
|
992
|
+
nothing about what contains it.
|
|
993
|
+
|
|
994
|
+
-2 against a 2px ring lays the outline over the outermost 2px of the box,
|
|
995
|
+
so it REPLACES the 1px edge for as long as focus is there rather than
|
|
996
|
+
drawing a second line a pixel inside the first. */
|
|
997
|
+
--ring-offset:-2px;
|
|
982
998
|
}
|
|
983
999
|
:where(textarea){padding:var(--space-2) var(--space-3);resize:vertical}
|
|
984
1000
|
/* A field has NO focus rule of its own — see the ring at the bottom of this
|
|
@@ -1045,6 +1061,11 @@
|
|
|
1045
1061
|
canvas and clears the 2px perimeter WCAG 2.4.13 asks for; the gate in
|
|
1046
1062
|
check-tokens holds --ring to that and nothing else here may weaken it.
|
|
1047
1063
|
|
|
1064
|
+
WHERE the ring sits is the one thing that varies, and it varies as a VALUE
|
|
1065
|
+
the element carries, never as a second rule: `--ring-offset` defaults to 2
|
|
1066
|
+
and a field sets it to -2 (see the field block above). Two rules is what
|
|
1067
|
+
0.4.9 removed, and a second one here would be the same defect again.
|
|
1068
|
+
|
|
1048
1069
|
There were two rules until 0.4.9, and they collided invisibly. Both computed
|
|
1049
1070
|
to (0,1,0) — :where() zeroes whatever it wraps, leaving one pseudo-class on
|
|
1050
1071
|
each side — so the cascade fell through to SOURCE ORDER inside this layer,
|
|
@@ -1053,7 +1074,7 @@
|
|
|
1053
1074
|
drew BOTH the ring and the edge+halo. Each rule read as correct alone, which
|
|
1054
1075
|
is why it survived review in both files; the defect existed only in their
|
|
1055
1076
|
order. One rule cannot disagree with itself. */
|
|
1056
|
-
:focus-visible{outline:2px solid var(--ring);outline-offset:2px}
|
|
1077
|
+
:focus-visible{outline:2px solid var(--ring);outline-offset:var(--ring-offset,2px)}
|
|
1057
1078
|
/* --white-20 is white-on-white in the light theme, so selection reads through
|
|
1058
1079
|
--selection, which BOTH themes define. */
|
|
1059
1080
|
::selection{background:var(--selection);color:var(--text-primary)}
|
package/tailwind.css
CHANGED
|
@@ -1002,6 +1002,22 @@
|
|
|
1002
1002
|
its buttons at 8-10px and nothing at 6px except 22px chips. */
|
|
1003
1003
|
border-radius:var(--radius-md);
|
|
1004
1004
|
padding:0 var(--space-3);
|
|
1005
|
+
/* A field's ring is drawn INSIDE its own box. The one focus rule below
|
|
1006
|
+
reads this; nothing else about the indicator changes.
|
|
1007
|
+
|
|
1008
|
+
A field lives in containers a button does not — composers, palettes and
|
|
1009
|
+
panels that round their corners with `overflow:hidden`. An outline at a
|
|
1010
|
+
POSITIVE offset is painted outside the border box, so any such ancestor
|
|
1011
|
+
clips it, and the computed style still says `2px solid` while nothing is
|
|
1012
|
+
drawn: a chat composer measured byte-identical screenshots focused and
|
|
1013
|
+
unfocused, and a search pill kept only its left and right edges. A
|
|
1014
|
+
negative offset cannot be clipped by anything, so a field needs to know
|
|
1015
|
+
nothing about what contains it.
|
|
1016
|
+
|
|
1017
|
+
-2 against a 2px ring lays the outline over the outermost 2px of the box,
|
|
1018
|
+
so it REPLACES the 1px edge for as long as focus is there rather than
|
|
1019
|
+
drawing a second line a pixel inside the first. */
|
|
1020
|
+
--ring-offset:-2px;
|
|
1005
1021
|
}
|
|
1006
1022
|
:where(textarea){padding:var(--space-2) var(--space-3);resize:vertical}
|
|
1007
1023
|
/* A field has NO focus rule of its own — see the ring at the bottom of this
|
|
@@ -1068,6 +1084,11 @@
|
|
|
1068
1084
|
canvas and clears the 2px perimeter WCAG 2.4.13 asks for; the gate in
|
|
1069
1085
|
check-tokens holds --ring to that and nothing else here may weaken it.
|
|
1070
1086
|
|
|
1087
|
+
WHERE the ring sits is the one thing that varies, and it varies as a VALUE
|
|
1088
|
+
the element carries, never as a second rule: `--ring-offset` defaults to 2
|
|
1089
|
+
and a field sets it to -2 (see the field block above). Two rules is what
|
|
1090
|
+
0.4.9 removed, and a second one here would be the same defect again.
|
|
1091
|
+
|
|
1071
1092
|
There were two rules until 0.4.9, and they collided invisibly. Both computed
|
|
1072
1093
|
to (0,1,0) — :where() zeroes whatever it wraps, leaving one pseudo-class on
|
|
1073
1094
|
each side — so the cascade fell through to SOURCE ORDER inside this layer,
|
|
@@ -1076,7 +1097,7 @@
|
|
|
1076
1097
|
drew BOTH the ring and the edge+halo. Each rule read as correct alone, which
|
|
1077
1098
|
is why it survived review in both files; the defect existed only in their
|
|
1078
1099
|
order. One rule cannot disagree with itself. */
|
|
1079
|
-
:focus-visible{outline:2px solid var(--ring);outline-offset:2px}
|
|
1100
|
+
:focus-visible{outline:2px solid var(--ring);outline-offset:var(--ring-offset,2px)}
|
|
1080
1101
|
/* --white-20 is white-on-white in the light theme, so selection reads through
|
|
1081
1102
|
--selection, which BOTH themes define. */
|
|
1082
1103
|
::selection{background:var(--selection);color:var(--text-primary)}
|
package/tokens/base.css
CHANGED
|
@@ -97,6 +97,22 @@
|
|
|
97
97
|
its buttons at 8-10px and nothing at 6px except 22px chips. */
|
|
98
98
|
border-radius:var(--radius-md);
|
|
99
99
|
padding:0 var(--space-3);
|
|
100
|
+
/* A field's ring is drawn INSIDE its own box. The one focus rule below
|
|
101
|
+
reads this; nothing else about the indicator changes.
|
|
102
|
+
|
|
103
|
+
A field lives in containers a button does not — composers, palettes and
|
|
104
|
+
panels that round their corners with `overflow:hidden`. An outline at a
|
|
105
|
+
POSITIVE offset is painted outside the border box, so any such ancestor
|
|
106
|
+
clips it, and the computed style still says `2px solid` while nothing is
|
|
107
|
+
drawn: a chat composer measured byte-identical screenshots focused and
|
|
108
|
+
unfocused, and a search pill kept only its left and right edges. A
|
|
109
|
+
negative offset cannot be clipped by anything, so a field needs to know
|
|
110
|
+
nothing about what contains it.
|
|
111
|
+
|
|
112
|
+
-2 against a 2px ring lays the outline over the outermost 2px of the box,
|
|
113
|
+
so it REPLACES the 1px edge for as long as focus is there rather than
|
|
114
|
+
drawing a second line a pixel inside the first. */
|
|
115
|
+
--ring-offset:-2px;
|
|
100
116
|
}
|
|
101
117
|
:where(textarea){padding:var(--space-2) var(--space-3);resize:vertical}
|
|
102
118
|
/* A field has NO focus rule of its own — see the ring at the bottom of this
|
|
@@ -163,6 +179,11 @@
|
|
|
163
179
|
canvas and clears the 2px perimeter WCAG 2.4.13 asks for; the gate in
|
|
164
180
|
check-tokens holds --ring to that and nothing else here may weaken it.
|
|
165
181
|
|
|
182
|
+
WHERE the ring sits is the one thing that varies, and it varies as a VALUE
|
|
183
|
+
the element carries, never as a second rule: `--ring-offset` defaults to 2
|
|
184
|
+
and a field sets it to -2 (see the field block above). Two rules is what
|
|
185
|
+
0.4.9 removed, and a second one here would be the same defect again.
|
|
186
|
+
|
|
166
187
|
There were two rules until 0.4.9, and they collided invisibly. Both computed
|
|
167
188
|
to (0,1,0) — :where() zeroes whatever it wraps, leaving one pseudo-class on
|
|
168
189
|
each side — so the cascade fell through to SOURCE ORDER inside this layer,
|
|
@@ -171,7 +192,7 @@
|
|
|
171
192
|
drew BOTH the ring and the edge+halo. Each rule read as correct alone, which
|
|
172
193
|
is why it survived review in both files; the defect existed only in their
|
|
173
194
|
order. One rule cannot disagree with itself. */
|
|
174
|
-
:focus-visible{outline:2px solid var(--ring);outline-offset:2px}
|
|
195
|
+
:focus-visible{outline:2px solid var(--ring);outline-offset:var(--ring-offset,2px)}
|
|
175
196
|
/* --white-20 is white-on-white in the light theme, so selection reads through
|
|
176
197
|
--selection, which BOTH themes define. */
|
|
177
198
|
::selection{background:var(--selection);color:var(--text-primary)}
|