@hanzo/ui 8.0.75 → 8.0.77
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.
|
@@ -154,5 +154,7 @@ function Button({ className, variant = 'default', size = 'default', asChild = fa
|
|
|
154
154
|
// Button-as-link comes out as a styled <a> with valid markup.
|
|
155
155
|
const host = asChild && (0, react_1.isValidElement)(children) ? children : null;
|
|
156
156
|
const body = host ? host.props.children : children;
|
|
157
|
-
return ((0, jsx_runtime_1.jsxs)(Frame, { "data-slot": "button", "data-variant": variant ?? 'default', "data-size": resolved, variant: variant ?? 'default', size: resolved,
|
|
157
|
+
return ((0, jsx_runtime_1.jsxs)(Frame, { "data-slot": "button", "data-variant": variant ?? 'default', "data-size": resolved, variant: variant ?? 'default', size: resolved, ...(host
|
|
158
|
+
? { render: (0, react_1.createElement)(host.type, { ...host.props, children: undefined }) }
|
|
159
|
+
: null), disabled: disabled || isLoading, ...(0, gesture_1.touch)(HEIGHT[resolved], 44, 'y'), className: (0, exports.buttonVariants)({ variant, size, className }), ...props, children: [isLoading && (0, jsx_runtime_1.jsx)(gui_1.Spinner, { size: "small" }), (0, ink_1.ink)(body, gui_1.Button.Text, { fontSize: TYPE[resolved] })] }));
|
|
158
160
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/button.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAiC,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK1F,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,GACN,SAAS,GACT,QAAQ,GACR,WAAW,CAAA;AAEf,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;AAqBjF,QAAA,MAAM,KAAK;;;;;;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AuFT,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,gCAI5B;IAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,WAK1E,CAAA;AAEd,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC,GAAG;IAC9F,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;IAC9B,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,OAAe,EACf,SAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,2CAqCb;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -149,7 +149,9 @@ function Button({ className, variant = 'default', size = 'default', asChild = fa
|
|
|
149
149
|
// Button-as-link comes out as a styled <a> with valid markup.
|
|
150
150
|
const host = asChild && isValidElement(children) ? children : null;
|
|
151
151
|
const body = host ? host.props.children : children;
|
|
152
|
-
return (_jsxs(Frame, { "data-slot": "button", "data-variant": variant ?? 'default', "data-size": resolved, variant: variant ?? 'default', size: resolved,
|
|
152
|
+
return (_jsxs(Frame, { "data-slot": "button", "data-variant": variant ?? 'default', "data-size": resolved, variant: variant ?? 'default', size: resolved, ...(host
|
|
153
|
+
? { render: createElement(host.type, { ...host.props, children: undefined }) }
|
|
154
|
+
: null), disabled: disabled || isLoading, ...touch(HEIGHT[resolved], 44, 'y'), className: buttonVariants({ variant, size, className }), ...props, children: [isLoading && _jsx(Spinner, { size: "small" }), ink(body, GuiButton.Text, { fontSize: TYPE[resolved] })] }));
|
|
153
155
|
}
|
|
154
156
|
export { Button };
|
|
155
157
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/backends/gui/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAuC,MAAM,OAAO,CAAA;AAE1F,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAejC,MAAM,MAAM,GAA+B;IACzC,OAAO,EAAE,EAAE;IACX,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,IAAI,EAAE,EAAE;IACR,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;CACd,CAAA;AAED,gFAAgF;AAChF,MAAM,IAAI,GAA+B;IACvC,OAAO,EAAE,IAAI;IACb,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;CAChB,CAAA;AAED,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE;IACpC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE,QAAQ;IACjB,GAAG,EAAE,IAAI;IACT,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,CAAC;IACd,W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AAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA;IAClE,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAE,IAAI,CAAC,KAAkC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAA;IAChF,OAAO,CACL,MAAC,KAAK,iBACM,QAAQ,kBACJ,OAAO,IAAI,SAAS,eACvB,QAAQ,EACnB,OAAO,EAAE,OAAO,IAAI,SAAS,EAC7B,IAAI,EAAE,QAAQ,KASV,CAAC,IAAI;YACP,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,GAAI,IAAI,CAAC,KAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;YAC1F,CAAC,CAAC,IAAI,CAAC,EACT,QAAQ,EAAE,QAAQ,IAAI,SAAS,KAC3B,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EACpC,SAAS,EAAE,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,KACnD,KAAK,aAER,SAAS,IAAI,KAAC,OAAO,IAAC,IAAI,EAAC,OAAO,GAAG,EACrC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,IAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,IAC3D,CACT,CAAA;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/dist/glass.css
CHANGED
|
@@ -52,19 +52,66 @@
|
|
|
52
52
|
from inside it, and a menu with no background is a menu you read the page
|
|
53
53
|
through. !important beats the compiled atomic background class, which lands
|
|
54
54
|
in an inline <style> a bundler orders after this sheet, and it beats the call
|
|
55
|
-
sites that pin a fill by hand — those become no-ops instead of holes.
|
|
55
|
+
sites that pin a fill by hand — those become no-ops instead of holes.
|
|
56
|
+
|
|
57
|
+
EVERY floating slot the package emits is here. It was seven, and the three it
|
|
58
|
+
left out were not obscure: AlertDialog is a MODAL — the one surface that
|
|
59
|
+
cannot be anything but floating — and it was opaque beside a glass Dialog.
|
|
60
|
+
ContextMenu and HoverCard are anchored menus beside glass DropdownMenu and
|
|
61
|
+
glass Popover. That is precisely the drift this file exists to stop, still
|
|
62
|
+
present in the file that stops it, which is worth stating plainly: a rule
|
|
63
|
+
that attaches the material to the slot only holds if every slot is named.
|
|
64
|
+
The list is checked against what the components actually emit, so the next
|
|
65
|
+
floating slot somebody adds fails the test rather than the eye. */
|
|
56
66
|
@supports (backdrop-filter: blur(8px)) {
|
|
57
67
|
.glass,
|
|
58
68
|
[data-slot="glass"],
|
|
59
69
|
[data-slot="dialog-content"],
|
|
70
|
+
[data-slot="alert-dialog-content"],
|
|
60
71
|
[data-slot="popover-content"],
|
|
61
72
|
[data-slot="select-content"],
|
|
62
73
|
[data-slot="dropdown-menu-content"],
|
|
63
74
|
[data-slot="dropdown-menu-sub-content"],
|
|
75
|
+
[data-slot="context-menu-content"],
|
|
76
|
+
[data-slot="context-menu-sub-content"],
|
|
77
|
+
[data-slot="hover-card-content"],
|
|
64
78
|
[data-slot="tooltip-content"] {
|
|
65
79
|
background-color: color-mix(in oklab, var(--background) 72%, transparent) !important;
|
|
66
80
|
-webkit-backdrop-filter: blur(20px) saturate(1.8);
|
|
67
81
|
backdrop-filter: blur(20px) saturate(1.8);
|
|
82
|
+
/* ── The dispersion ──────────────────────────────────────────────────────
|
|
83
|
+
Glass splits light at the EDGE. That is the whole of the physics and the
|
|
84
|
+
whole of the rule: the body of a pane shows you what is behind it, and the
|
|
85
|
+
rim is where the angle is steep enough to spread the spectrum. So the fill
|
|
86
|
+
stays monochrome — the brand is monochrome and text has to sit on it — and
|
|
87
|
+
the colour lives in one pixel at the top lip.
|
|
88
|
+
|
|
89
|
+
LINEAR, ACROSS THE LIP — never conic around the box. The composer's note
|
|
90
|
+
below records what conic costs on a rectangle: the long edges take a wide
|
|
91
|
+
angular slice and the short sides almost none, so one side wears blue and
|
|
92
|
+
the opposite burnt orange, and the ring reads as off-centre. Swept along
|
|
93
|
+
one edge instead, the stops are evenly spaced at any aspect ratio, so a
|
|
94
|
+
1000px dialog and a 90px tooltip disperse alike.
|
|
95
|
+
|
|
96
|
+
Peak alpha .16, on a band two pixels tall, one pixel DOWN. Both numbers
|
|
97
|
+
were measured rather than chosen. The lit edge is an inset box-shadow, and
|
|
98
|
+
a box-shadow paints over the background — so the first version put the
|
|
99
|
+
spectrum in the same pixel the white lip occupies and the lip won: at ×6
|
|
100
|
+
the rim was a neutral hairline with no colour in it at all. Sitting the
|
|
101
|
+
band one pixel inside puts it where a real pane disperses anyway, just
|
|
102
|
+
behind the specular line, and it is legible there at half the alpha a
|
|
103
|
+
collision would have needed. Three pixels at .22 was tried too and reads
|
|
104
|
+
as a coloured stroke somebody drew, which is a different thing entirely.
|
|
105
|
+
|
|
106
|
+
That is also the difference between this and the full-wheel rainbow that
|
|
107
|
+
was tried and reverted: not a different palette, a different AREA. Colour
|
|
108
|
+
over a whole surface makes that surface the only coloured thing in the
|
|
109
|
+
product; colour along its rim reads as the material catching light, which
|
|
110
|
+
is the one thing chrome is allowed to say. */
|
|
111
|
+
background-image: var(--glass-prism) !important;
|
|
112
|
+
background-repeat: no-repeat !important;
|
|
113
|
+
background-size: 100% 2px !important;
|
|
114
|
+
background-position: 0 1px !important;
|
|
68
115
|
}
|
|
69
116
|
}
|
|
70
117
|
|
|
@@ -118,6 +165,24 @@
|
|
|
118
165
|
--glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .40);
|
|
119
166
|
--glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55);
|
|
120
167
|
--glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .75);
|
|
168
|
+
|
|
169
|
+
/* The spectrum the lip disperses. Declared here for the same reason the drops
|
|
170
|
+
above are: a name this package owns cannot be outranked by a sheet that
|
|
171
|
+
happens to load later. Nothing else ships a --glass-prism.
|
|
172
|
+
|
|
173
|
+
Five stops, blue through violet, rose, amber, to a cool green — the order
|
|
174
|
+
light actually comes apart in, so it reads as refraction rather than as a
|
|
175
|
+
palette somebody chose. Alphas .13-.16: measured at ×6 against the white lip
|
|
176
|
+
that sits a pixel above, high enough to read there and low enough that at
|
|
177
|
+
1:1 it is a tinge. A theme that wants none of it sets this to `none` and the
|
|
178
|
+
rim goes back to being the lit edge alone. */
|
|
179
|
+
--glass-prism:
|
|
180
|
+
linear-gradient(90deg,
|
|
181
|
+
rgb(120 170 255 / .16) 0%,
|
|
182
|
+
rgb(178 142 255 / .15) 24%,
|
|
183
|
+
rgb(255 146 198 / .13) 48%,
|
|
184
|
+
rgb(255 190 124 / .15) 72%,
|
|
185
|
+
rgb(138 228 208 / .16) 100%);
|
|
121
186
|
}
|
|
122
187
|
|
|
123
188
|
.light, :root.t_light, .t_light {
|
|
@@ -137,6 +202,9 @@
|
|
|
137
202
|
[data-slot="select-content"],
|
|
138
203
|
[data-slot="dropdown-menu-content"],
|
|
139
204
|
[data-slot="dropdown-menu-sub-content"],
|
|
205
|
+
[data-slot="context-menu-content"],
|
|
206
|
+
[data-slot="context-menu-sub-content"],
|
|
207
|
+
[data-slot="hover-card-content"],
|
|
140
208
|
[data-slot="tooltip-content"] {
|
|
141
209
|
box-shadow:
|
|
142
210
|
var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
|
|
@@ -144,7 +212,8 @@
|
|
|
144
212
|
}
|
|
145
213
|
|
|
146
214
|
.elevation-3,
|
|
147
|
-
[data-slot="dialog-content"]
|
|
215
|
+
[data-slot="dialog-content"],
|
|
216
|
+
[data-slot="alert-dialog-content"] {
|
|
148
217
|
box-shadow:
|
|
149
218
|
var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
|
|
150
219
|
var(--glass-shadow-3) !important;
|
|
@@ -169,7 +238,8 @@
|
|
|
169
238
|
palette: `rgba(0,0,0,.5)` under `opacity: .5` — a quarter black, exactly the
|
|
170
239
|
double dim these two lines exist to end. A rule written to beat a compiled
|
|
171
240
|
class has to be written with the weight to beat one. */
|
|
172
|
-
[data-slot="dialog-overlay"]
|
|
241
|
+
[data-slot="dialog-overlay"],
|
|
242
|
+
[data-slot="alert-dialog-overlay"] {
|
|
173
243
|
opacity: 1 !important;
|
|
174
244
|
background-color: var(--surface-scrim, rgb(0 0 0 / .8)) !important;
|
|
175
245
|
}
|
package/dist/styles.css
CHANGED
|
@@ -1162,19 +1162,66 @@
|
|
|
1162
1162
|
from inside it, and a menu with no background is a menu you read the page
|
|
1163
1163
|
through. !important beats the compiled atomic background class, which lands
|
|
1164
1164
|
in an inline <style> a bundler orders after this sheet, and it beats the call
|
|
1165
|
-
sites that pin a fill by hand — those become no-ops instead of holes.
|
|
1165
|
+
sites that pin a fill by hand — those become no-ops instead of holes.
|
|
1166
|
+
|
|
1167
|
+
EVERY floating slot the package emits is here. It was seven, and the three it
|
|
1168
|
+
left out were not obscure: AlertDialog is a MODAL — the one surface that
|
|
1169
|
+
cannot be anything but floating — and it was opaque beside a glass Dialog.
|
|
1170
|
+
ContextMenu and HoverCard are anchored menus beside glass DropdownMenu and
|
|
1171
|
+
glass Popover. That is precisely the drift this file exists to stop, still
|
|
1172
|
+
present in the file that stops it, which is worth stating plainly: a rule
|
|
1173
|
+
that attaches the material to the slot only holds if every slot is named.
|
|
1174
|
+
The list is checked against what the components actually emit, so the next
|
|
1175
|
+
floating slot somebody adds fails the test rather than the eye. */
|
|
1166
1176
|
@supports (backdrop-filter: blur(8px)) {
|
|
1167
1177
|
.glass,
|
|
1168
1178
|
[data-slot="glass"],
|
|
1169
1179
|
[data-slot="dialog-content"],
|
|
1180
|
+
[data-slot="alert-dialog-content"],
|
|
1170
1181
|
[data-slot="popover-content"],
|
|
1171
1182
|
[data-slot="select-content"],
|
|
1172
1183
|
[data-slot="dropdown-menu-content"],
|
|
1173
1184
|
[data-slot="dropdown-menu-sub-content"],
|
|
1185
|
+
[data-slot="context-menu-content"],
|
|
1186
|
+
[data-slot="context-menu-sub-content"],
|
|
1187
|
+
[data-slot="hover-card-content"],
|
|
1174
1188
|
[data-slot="tooltip-content"] {
|
|
1175
1189
|
background-color: color-mix(in oklab, var(--background) 72%, transparent) !important;
|
|
1176
1190
|
-webkit-backdrop-filter: blur(20px) saturate(1.8);
|
|
1177
1191
|
backdrop-filter: blur(20px) saturate(1.8);
|
|
1192
|
+
/* ── The dispersion ──────────────────────────────────────────────────────
|
|
1193
|
+
Glass splits light at the EDGE. That is the whole of the physics and the
|
|
1194
|
+
whole of the rule: the body of a pane shows you what is behind it, and the
|
|
1195
|
+
rim is where the angle is steep enough to spread the spectrum. So the fill
|
|
1196
|
+
stays monochrome — the brand is monochrome and text has to sit on it — and
|
|
1197
|
+
the colour lives in one pixel at the top lip.
|
|
1198
|
+
|
|
1199
|
+
LINEAR, ACROSS THE LIP — never conic around the box. The composer's note
|
|
1200
|
+
below records what conic costs on a rectangle: the long edges take a wide
|
|
1201
|
+
angular slice and the short sides almost none, so one side wears blue and
|
|
1202
|
+
the opposite burnt orange, and the ring reads as off-centre. Swept along
|
|
1203
|
+
one edge instead, the stops are evenly spaced at any aspect ratio, so a
|
|
1204
|
+
1000px dialog and a 90px tooltip disperse alike.
|
|
1205
|
+
|
|
1206
|
+
Peak alpha .16, on a band two pixels tall, one pixel DOWN. Both numbers
|
|
1207
|
+
were measured rather than chosen. The lit edge is an inset box-shadow, and
|
|
1208
|
+
a box-shadow paints over the background — so the first version put the
|
|
1209
|
+
spectrum in the same pixel the white lip occupies and the lip won: at ×6
|
|
1210
|
+
the rim was a neutral hairline with no colour in it at all. Sitting the
|
|
1211
|
+
band one pixel inside puts it where a real pane disperses anyway, just
|
|
1212
|
+
behind the specular line, and it is legible there at half the alpha a
|
|
1213
|
+
collision would have needed. Three pixels at .22 was tried too and reads
|
|
1214
|
+
as a coloured stroke somebody drew, which is a different thing entirely.
|
|
1215
|
+
|
|
1216
|
+
That is also the difference between this and the full-wheel rainbow that
|
|
1217
|
+
was tried and reverted: not a different palette, a different AREA. Colour
|
|
1218
|
+
over a whole surface makes that surface the only coloured thing in the
|
|
1219
|
+
product; colour along its rim reads as the material catching light, which
|
|
1220
|
+
is the one thing chrome is allowed to say. */
|
|
1221
|
+
background-image: var(--glass-prism) !important;
|
|
1222
|
+
background-repeat: no-repeat !important;
|
|
1223
|
+
background-size: 100% 2px !important;
|
|
1224
|
+
background-position: 0 1px !important;
|
|
1178
1225
|
}
|
|
1179
1226
|
}
|
|
1180
1227
|
|
|
@@ -1228,6 +1275,24 @@
|
|
|
1228
1275
|
--glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .40);
|
|
1229
1276
|
--glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55);
|
|
1230
1277
|
--glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .75);
|
|
1278
|
+
|
|
1279
|
+
/* The spectrum the lip disperses. Declared here for the same reason the drops
|
|
1280
|
+
above are: a name this package owns cannot be outranked by a sheet that
|
|
1281
|
+
happens to load later. Nothing else ships a --glass-prism.
|
|
1282
|
+
|
|
1283
|
+
Five stops, blue through violet, rose, amber, to a cool green — the order
|
|
1284
|
+
light actually comes apart in, so it reads as refraction rather than as a
|
|
1285
|
+
palette somebody chose. Alphas .13-.16: measured at ×6 against the white lip
|
|
1286
|
+
that sits a pixel above, high enough to read there and low enough that at
|
|
1287
|
+
1:1 it is a tinge. A theme that wants none of it sets this to `none` and the
|
|
1288
|
+
rim goes back to being the lit edge alone. */
|
|
1289
|
+
--glass-prism:
|
|
1290
|
+
linear-gradient(90deg,
|
|
1291
|
+
rgb(120 170 255 / .16) 0%,
|
|
1292
|
+
rgb(178 142 255 / .15) 24%,
|
|
1293
|
+
rgb(255 146 198 / .13) 48%,
|
|
1294
|
+
rgb(255 190 124 / .15) 72%,
|
|
1295
|
+
rgb(138 228 208 / .16) 100%);
|
|
1231
1296
|
}
|
|
1232
1297
|
|
|
1233
1298
|
.light, :root.t_light, .t_light {
|
|
@@ -1247,6 +1312,9 @@
|
|
|
1247
1312
|
[data-slot="select-content"],
|
|
1248
1313
|
[data-slot="dropdown-menu-content"],
|
|
1249
1314
|
[data-slot="dropdown-menu-sub-content"],
|
|
1315
|
+
[data-slot="context-menu-content"],
|
|
1316
|
+
[data-slot="context-menu-sub-content"],
|
|
1317
|
+
[data-slot="hover-card-content"],
|
|
1250
1318
|
[data-slot="tooltip-content"] {
|
|
1251
1319
|
box-shadow:
|
|
1252
1320
|
var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
|
|
@@ -1254,7 +1322,8 @@
|
|
|
1254
1322
|
}
|
|
1255
1323
|
|
|
1256
1324
|
.elevation-3,
|
|
1257
|
-
[data-slot="dialog-content"]
|
|
1325
|
+
[data-slot="dialog-content"],
|
|
1326
|
+
[data-slot="alert-dialog-content"] {
|
|
1258
1327
|
box-shadow:
|
|
1259
1328
|
var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
|
|
1260
1329
|
var(--glass-shadow-3) !important;
|
|
@@ -1279,7 +1348,8 @@
|
|
|
1279
1348
|
palette: `rgba(0,0,0,.5)` under `opacity: .5` — a quarter black, exactly the
|
|
1280
1349
|
double dim these two lines exist to end. A rule written to beat a compiled
|
|
1281
1350
|
class has to be written with the weight to beat one. */
|
|
1282
|
-
[data-slot="dialog-overlay"]
|
|
1351
|
+
[data-slot="dialog-overlay"],
|
|
1352
|
+
[data-slot="alert-dialog-overlay"] {
|
|
1283
1353
|
opacity: 1 !important;
|
|
1284
1354
|
background-color: var(--surface-scrim, rgb(0 0 0 / .8)) !important;
|
|
1285
1355
|
}
|
package/dist/theme.css
CHANGED
|
@@ -1160,19 +1160,66 @@
|
|
|
1160
1160
|
from inside it, and a menu with no background is a menu you read the page
|
|
1161
1161
|
through. !important beats the compiled atomic background class, which lands
|
|
1162
1162
|
in an inline <style> a bundler orders after this sheet, and it beats the call
|
|
1163
|
-
sites that pin a fill by hand — those become no-ops instead of holes.
|
|
1163
|
+
sites that pin a fill by hand — those become no-ops instead of holes.
|
|
1164
|
+
|
|
1165
|
+
EVERY floating slot the package emits is here. It was seven, and the three it
|
|
1166
|
+
left out were not obscure: AlertDialog is a MODAL — the one surface that
|
|
1167
|
+
cannot be anything but floating — and it was opaque beside a glass Dialog.
|
|
1168
|
+
ContextMenu and HoverCard are anchored menus beside glass DropdownMenu and
|
|
1169
|
+
glass Popover. That is precisely the drift this file exists to stop, still
|
|
1170
|
+
present in the file that stops it, which is worth stating plainly: a rule
|
|
1171
|
+
that attaches the material to the slot only holds if every slot is named.
|
|
1172
|
+
The list is checked against what the components actually emit, so the next
|
|
1173
|
+
floating slot somebody adds fails the test rather than the eye. */
|
|
1164
1174
|
@supports (backdrop-filter: blur(8px)) {
|
|
1165
1175
|
.glass,
|
|
1166
1176
|
[data-slot="glass"],
|
|
1167
1177
|
[data-slot="dialog-content"],
|
|
1178
|
+
[data-slot="alert-dialog-content"],
|
|
1168
1179
|
[data-slot="popover-content"],
|
|
1169
1180
|
[data-slot="select-content"],
|
|
1170
1181
|
[data-slot="dropdown-menu-content"],
|
|
1171
1182
|
[data-slot="dropdown-menu-sub-content"],
|
|
1183
|
+
[data-slot="context-menu-content"],
|
|
1184
|
+
[data-slot="context-menu-sub-content"],
|
|
1185
|
+
[data-slot="hover-card-content"],
|
|
1172
1186
|
[data-slot="tooltip-content"] {
|
|
1173
1187
|
background-color: color-mix(in oklab, var(--background) 72%, transparent) !important;
|
|
1174
1188
|
-webkit-backdrop-filter: blur(20px) saturate(1.8);
|
|
1175
1189
|
backdrop-filter: blur(20px) saturate(1.8);
|
|
1190
|
+
/* ── The dispersion ──────────────────────────────────────────────────────
|
|
1191
|
+
Glass splits light at the EDGE. That is the whole of the physics and the
|
|
1192
|
+
whole of the rule: the body of a pane shows you what is behind it, and the
|
|
1193
|
+
rim is where the angle is steep enough to spread the spectrum. So the fill
|
|
1194
|
+
stays monochrome — the brand is monochrome and text has to sit on it — and
|
|
1195
|
+
the colour lives in one pixel at the top lip.
|
|
1196
|
+
|
|
1197
|
+
LINEAR, ACROSS THE LIP — never conic around the box. The composer's note
|
|
1198
|
+
below records what conic costs on a rectangle: the long edges take a wide
|
|
1199
|
+
angular slice and the short sides almost none, so one side wears blue and
|
|
1200
|
+
the opposite burnt orange, and the ring reads as off-centre. Swept along
|
|
1201
|
+
one edge instead, the stops are evenly spaced at any aspect ratio, so a
|
|
1202
|
+
1000px dialog and a 90px tooltip disperse alike.
|
|
1203
|
+
|
|
1204
|
+
Peak alpha .16, on a band two pixels tall, one pixel DOWN. Both numbers
|
|
1205
|
+
were measured rather than chosen. The lit edge is an inset box-shadow, and
|
|
1206
|
+
a box-shadow paints over the background — so the first version put the
|
|
1207
|
+
spectrum in the same pixel the white lip occupies and the lip won: at ×6
|
|
1208
|
+
the rim was a neutral hairline with no colour in it at all. Sitting the
|
|
1209
|
+
band one pixel inside puts it where a real pane disperses anyway, just
|
|
1210
|
+
behind the specular line, and it is legible there at half the alpha a
|
|
1211
|
+
collision would have needed. Three pixels at .22 was tried too and reads
|
|
1212
|
+
as a coloured stroke somebody drew, which is a different thing entirely.
|
|
1213
|
+
|
|
1214
|
+
That is also the difference between this and the full-wheel rainbow that
|
|
1215
|
+
was tried and reverted: not a different palette, a different AREA. Colour
|
|
1216
|
+
over a whole surface makes that surface the only coloured thing in the
|
|
1217
|
+
product; colour along its rim reads as the material catching light, which
|
|
1218
|
+
is the one thing chrome is allowed to say. */
|
|
1219
|
+
background-image: var(--glass-prism) !important;
|
|
1220
|
+
background-repeat: no-repeat !important;
|
|
1221
|
+
background-size: 100% 2px !important;
|
|
1222
|
+
background-position: 0 1px !important;
|
|
1176
1223
|
}
|
|
1177
1224
|
}
|
|
1178
1225
|
|
|
@@ -1226,6 +1273,24 @@
|
|
|
1226
1273
|
--glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .40);
|
|
1227
1274
|
--glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55);
|
|
1228
1275
|
--glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .75);
|
|
1276
|
+
|
|
1277
|
+
/* The spectrum the lip disperses. Declared here for the same reason the drops
|
|
1278
|
+
above are: a name this package owns cannot be outranked by a sheet that
|
|
1279
|
+
happens to load later. Nothing else ships a --glass-prism.
|
|
1280
|
+
|
|
1281
|
+
Five stops, blue through violet, rose, amber, to a cool green — the order
|
|
1282
|
+
light actually comes apart in, so it reads as refraction rather than as a
|
|
1283
|
+
palette somebody chose. Alphas .13-.16: measured at ×6 against the white lip
|
|
1284
|
+
that sits a pixel above, high enough to read there and low enough that at
|
|
1285
|
+
1:1 it is a tinge. A theme that wants none of it sets this to `none` and the
|
|
1286
|
+
rim goes back to being the lit edge alone. */
|
|
1287
|
+
--glass-prism:
|
|
1288
|
+
linear-gradient(90deg,
|
|
1289
|
+
rgb(120 170 255 / .16) 0%,
|
|
1290
|
+
rgb(178 142 255 / .15) 24%,
|
|
1291
|
+
rgb(255 146 198 / .13) 48%,
|
|
1292
|
+
rgb(255 190 124 / .15) 72%,
|
|
1293
|
+
rgb(138 228 208 / .16) 100%);
|
|
1229
1294
|
}
|
|
1230
1295
|
|
|
1231
1296
|
.light, :root.t_light, .t_light {
|
|
@@ -1245,6 +1310,9 @@
|
|
|
1245
1310
|
[data-slot="select-content"],
|
|
1246
1311
|
[data-slot="dropdown-menu-content"],
|
|
1247
1312
|
[data-slot="dropdown-menu-sub-content"],
|
|
1313
|
+
[data-slot="context-menu-content"],
|
|
1314
|
+
[data-slot="context-menu-sub-content"],
|
|
1315
|
+
[data-slot="hover-card-content"],
|
|
1248
1316
|
[data-slot="tooltip-content"] {
|
|
1249
1317
|
box-shadow:
|
|
1250
1318
|
var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
|
|
@@ -1252,7 +1320,8 @@
|
|
|
1252
1320
|
}
|
|
1253
1321
|
|
|
1254
1322
|
.elevation-3,
|
|
1255
|
-
[data-slot="dialog-content"]
|
|
1323
|
+
[data-slot="dialog-content"],
|
|
1324
|
+
[data-slot="alert-dialog-content"] {
|
|
1256
1325
|
box-shadow:
|
|
1257
1326
|
var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
|
|
1258
1327
|
var(--glass-shadow-3) !important;
|
|
@@ -1277,7 +1346,8 @@
|
|
|
1277
1346
|
palette: `rgba(0,0,0,.5)` under `opacity: .5` — a quarter black, exactly the
|
|
1278
1347
|
double dim these two lines exist to end. A rule written to beat a compiled
|
|
1279
1348
|
class has to be written with the weight to beat one. */
|
|
1280
|
-
[data-slot="dialog-overlay"]
|
|
1349
|
+
[data-slot="dialog-overlay"],
|
|
1350
|
+
[data-slot="alert-dialog-overlay"] {
|
|
1281
1351
|
opacity: 1 !important;
|
|
1282
1352
|
background-color: var(--surface-scrim, rgb(0 0 0 / .8)) !important;
|
|
1283
1353
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.77",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
|
|
6
6
|
"exports": {
|