@glasshome/ui 1.21.1 → 1.22.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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/use-is-mobile.d.ts +3 -1
- package/dist/solid/index.d.ts +9 -9
- package/dist/solid/index.js +5431 -5424
- package/dist/solid/sonner.d.ts +1 -0
- package/dist/{utils-CMk7R3zM.js → utils-D5blHO4O.js} +624 -622
- package/package.json +128 -126
- package/scripts/check-gallery.ts +142 -142
- package/scripts/check-pack.ts +13 -13
- package/scripts/check-structural-classes.ts +20 -20
- package/scripts/check-tokens.ts +27 -27
- package/scripts/check-ui-drift.mjs +103 -103
- package/src/index.ts +75 -80
- package/src/lib/alert-tones.ts +41 -41
- package/src/lib/anchor-placement.ts +21 -21
- package/src/lib/button-variants.ts +28 -28
- package/src/lib/card-classes.ts +9 -9
- package/src/lib/carousel-classes.ts +14 -14
- package/src/lib/glass-tone.ts +11 -11
- package/src/lib/input-classes.ts +6 -6
- package/src/lib/layers.ts +4 -4
- package/src/lib/logo-lockup.ts +8 -8
- package/src/lib/menu-classes.ts +2 -2
- package/src/lib/motion-classes.ts +8 -8
- package/src/lib/motion-window.ts +24 -24
- package/src/lib/overlay-classes.ts +6 -6
- package/src/lib/pill-classes.ts +3 -3
- package/src/lib/position-bar-classes.ts +1 -1
- package/src/lib/spotlight-geometry.ts +67 -67
- package/src/lib/thumb-classes.ts +2 -2
- package/src/lib/tier-badge.ts +16 -16
- package/src/lib/use-is-mobile.ts +17 -14
- package/src/lib/utils.ts +1 -1
- package/src/solid/accordion.tsx +41 -41
- package/src/solid/alert-dialog.tsx +95 -95
- package/src/solid/alert.tsx +88 -88
- package/src/solid/area-picker.tsx +204 -204
- package/src/solid/aspect-ratio.tsx +13 -13
- package/src/solid/avatar.tsx +27 -27
- package/src/solid/badge.tsx +49 -49
- package/src/solid/bottom-sheet/arbitration.ts +22 -22
- package/src/solid/bottom-sheet/bottom-sheet.tsx +394 -394
- package/src/solid/bottom-sheet/drag-controller.ts +201 -201
- package/src/solid/bottom-sheet/focus-trap.ts +51 -47
- package/src/solid/bottom-sheet/index.ts +12 -12
- package/src/solid/bottom-sheet/keyboard.ts +25 -25
- package/src/solid/bottom-sheet/scroll-lock.ts +46 -46
- package/src/solid/bottom-sheet/state-machine.ts +28 -28
- package/src/solid/bottom-sheet/velocity.ts +29 -29
- package/src/solid/breadcrumb.tsx +76 -76
- package/src/solid/button-group.tsx +46 -46
- package/src/solid/button.tsx +19 -19
- package/src/solid/card.tsx +67 -67
- package/src/solid/carousel.tsx +246 -246
- package/src/solid/charts.tsx +253 -253
- package/src/solid/checkbox.tsx +51 -51
- package/src/solid/collapsible.tsx +22 -22
- package/src/solid/color-disc.tsx +213 -213
- package/src/solid/color-slider.tsx +81 -81
- package/src/solid/color-wheel.tsx +61 -61
- package/src/solid/context-menu.tsx +63 -63
- package/src/solid/copy-button.tsx +31 -31
- package/src/solid/count-pill.tsx +11 -11
- package/src/solid/dashboard-preview.tsx +104 -104
- package/src/solid/data-table.tsx +228 -228
- package/src/solid/dialog-parts.tsx +127 -127
- package/src/solid/dialog.tsx +113 -113
- package/src/solid/dock-paging.ts +9 -9
- package/src/solid/dock.tsx +339 -339
- package/src/solid/docked-panel.tsx +35 -35
- package/src/solid/dropdown-menu.tsx +77 -77
- package/src/solid/empty.tsx +70 -70
- package/src/solid/entity-data.ts +38 -38
- package/src/solid/entity-selector.tsx +634 -634
- package/src/solid/field.tsx +205 -205
- package/src/solid/form.tsx +159 -159
- package/src/solid/hero-action.tsx +85 -85
- package/src/solid/hover-card.tsx +11 -11
- package/src/solid/icon-picker.tsx +401 -401
- package/src/solid/icon.tsx +101 -78
- package/src/solid/image-picker.tsx +416 -414
- package/src/solid/index.ts +265 -304
- package/src/solid/input-group.tsx +123 -123
- package/src/solid/input-otp.tsx +143 -143
- package/src/solid/input.tsx +4 -4
- package/src/solid/item.tsx +130 -130
- package/src/solid/kbd.tsx +20 -20
- package/src/solid/label.tsx +12 -12
- package/src/solid/list-reorder.ts +122 -122
- package/src/solid/logo.tsx +60 -60
- package/src/solid/media-copy.ts +21 -21
- package/src/solid/media-store.ts +56 -56
- package/src/solid/media-tile.tsx +85 -85
- package/src/solid/menu-parts.tsx +164 -164
- package/src/solid/number-field.tsx +56 -56
- package/src/solid/option-card.tsx +164 -164
- package/src/solid/ornament.tsx +43 -43
- package/src/solid/overlay.tsx +4 -4
- package/src/solid/page-header.tsx +75 -75
- package/src/solid/pagination.tsx +80 -80
- package/src/solid/password-input.tsx +51 -51
- package/src/solid/picker-row.tsx +83 -83
- package/src/solid/picker-search.tsx +65 -63
- package/src/solid/picker-trigger.tsx +59 -57
- package/src/solid/popover.tsx +54 -54
- package/src/solid/preview-tile.tsx +67 -67
- package/src/solid/progress.tsx +21 -21
- package/src/solid/radio-group.tsx +51 -51
- package/src/solid/resizable.tsx +128 -128
- package/src/solid/responsive-dialog.tsx +134 -134
- package/src/solid/schema-form.tsx +743 -743
- package/src/solid/scope-indicator.tsx +5 -5
- package/src/solid/scroll-area.tsx +16 -16
- package/src/solid/section-card.tsx +281 -281
- package/src/solid/select.tsx +101 -101
- package/src/solid/separator.tsx +25 -25
- package/src/solid/settings-row.tsx +122 -122
- package/src/solid/sheet.tsx +96 -96
- package/src/solid/skeleton.tsx +8 -8
- package/src/solid/slider.tsx +132 -132
- package/src/solid/sliding-indicator.tsx +280 -265
- package/src/solid/sonner.tsx +165 -164
- package/src/solid/spinner.tsx +12 -12
- package/src/solid/spotlight.tsx +140 -140
- package/src/solid/step-indicator.tsx +18 -18
- package/src/solid/swatch-picker.tsx +38 -38
- package/src/solid/switch.tsx +52 -52
- package/src/solid/table.tsx +63 -63
- package/src/solid/tabs.tsx +93 -93
- package/src/solid/textarea.tsx +8 -8
- package/src/solid/toggle-group.tsx +83 -83
- package/src/solid/toggle.tsx +33 -33
- package/src/solid/tooltip.tsx +16 -16
- package/src/solid/widget-card.tsx +90 -90
- package/src/solid/widget-identity.tsx +99 -99
- package/src/solid/widget-trust-badge.tsx +20 -20
- package/src/styles/globals.css +316 -319
- package/src/styles/theme.css +448 -448
- package/src/tokens/hex.ts +29 -29
- package/src/tokens/material.ts +75 -75
- package/src/tokens/presets.ts +303 -303
- package/src/tokens/readability.ts +32 -32
- package/src/tokens/theme-colors.ts +95 -95
- package/src/tokens/theme-css.ts +22 -22
- package/src/tokens/theme-recipe.ts +106 -106
package/src/styles/globals.css
CHANGED
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
/* Typed + inherits:false: a knob never leaks into a nested glass element, each
|
|
13
13
|
* element's calc() resolves against its own value, and typed knobs animate. */
|
|
14
14
|
@property --glass-tone {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
syntax: "<color>";
|
|
16
|
+
inherits: false;
|
|
17
|
+
initial-value: transparent;
|
|
18
18
|
}
|
|
19
19
|
@property --glass-wash {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
syntax: "<percentage>";
|
|
21
|
+
inherits: false;
|
|
22
|
+
initial-value: 28%;
|
|
23
23
|
}
|
|
24
24
|
@property --glass-light {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
syntax: "<number>";
|
|
26
|
+
inherits: false;
|
|
27
|
+
initial-value: 0.05;
|
|
28
28
|
}
|
|
29
29
|
/* Size of the top-left sheen ellipse, `<x> <y>`. Percentages scale with the
|
|
30
30
|
* element, which is right for cards but leaves an edge-anchored panel (a side
|
|
@@ -32,38 +32,38 @@
|
|
|
32
32
|
* Such surfaces pin absolute lengths so the highlight reads the same as on a
|
|
33
33
|
* dialog. Untyped: two values, so no single @property syntax fits. */
|
|
34
34
|
@property --glass-sheen {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
syntax: "*";
|
|
36
|
+
inherits: false;
|
|
37
37
|
}
|
|
38
38
|
@property --glass-shade {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
syntax: "<number>";
|
|
40
|
+
inherits: false;
|
|
41
|
+
initial-value: 0;
|
|
42
42
|
}
|
|
43
43
|
@property --glass-glow {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
syntax: "<percentage>";
|
|
45
|
+
inherits: false;
|
|
46
|
+
initial-value: 16%;
|
|
47
47
|
}
|
|
48
48
|
@property --glass-drop {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
syntax: "<percentage>";
|
|
50
|
+
inherits: false;
|
|
51
|
+
initial-value: 20%;
|
|
52
52
|
}
|
|
53
53
|
@property --glass-lift {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
syntax: "<number>";
|
|
55
|
+
inherits: false;
|
|
56
|
+
initial-value: 0;
|
|
57
57
|
}
|
|
58
58
|
@property --glass-text {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
syntax: "<percentage>";
|
|
60
|
+
inherits: false;
|
|
61
|
+
initial-value: 65%;
|
|
62
62
|
}
|
|
63
63
|
@property --glass-rim {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
syntax: "<number>";
|
|
65
|
+
inherits: false;
|
|
66
|
+
initial-value: 1;
|
|
67
67
|
}
|
|
68
68
|
/* Frost slot: one full background layer (image + position / size + repeat),
|
|
69
69
|
* host-supplied, composited at the BOTTOM of the formula — the static
|
|
@@ -72,75 +72,75 @@
|
|
|
72
72
|
* back to `none`. inherits:false so a surface's viewport-aligned slice never
|
|
73
73
|
* leaks into nested glass (inputs inside a frosted card). */
|
|
74
74
|
@property --glass-frost {
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
syntax: "*";
|
|
76
|
+
inherits: false;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/* Top-most layer: a tiled noise slice over the fill. Untyped for the same
|
|
80
80
|
* reason as --glass-frost. */
|
|
81
81
|
@property --glass-grain {
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
syntax: "*";
|
|
83
|
+
inherits: false;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
/* Tier 2, the material: inheriting, theme-written, multiplied into every
|
|
87
87
|
* surface's own knobs. A knob is a surface's identity; these scale all of them. */
|
|
88
88
|
@property --material-blur {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
syntax: "<length>";
|
|
90
|
+
inherits: true;
|
|
91
|
+
initial-value: 24px;
|
|
92
92
|
}
|
|
93
93
|
@property --material-clarity {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
syntax: "<percentage>";
|
|
95
|
+
inherits: true;
|
|
96
|
+
initial-value: 60%;
|
|
97
97
|
}
|
|
98
98
|
@property --material-depth {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
syntax: "<number>";
|
|
100
|
+
inherits: true;
|
|
101
|
+
initial-value: 1;
|
|
102
102
|
}
|
|
103
103
|
@property --material-tint {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
syntax: "<number>";
|
|
105
|
+
inherits: true;
|
|
106
|
+
initial-value: 1;
|
|
107
107
|
}
|
|
108
108
|
/* Preset terms, inert at their defaults: Paper and Neon raise the edge. */
|
|
109
109
|
@property --material-edge-width {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
syntax: "<length>";
|
|
111
|
+
inherits: true;
|
|
112
|
+
initial-value: 1px;
|
|
113
113
|
}
|
|
114
114
|
/* 0..1, how far the edge colour moves toward the foreground ink. */
|
|
115
115
|
@property --material-edge-ink {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
syntax: "<number>";
|
|
117
|
+
inherits: true;
|
|
118
|
+
initial-value: 0;
|
|
119
119
|
}
|
|
120
120
|
/* 0..1, how far the edge moves toward the surface's own hue (its tone, else
|
|
121
121
|
* the accent). */
|
|
122
122
|
@property --material-edge-accent {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
syntax: "<number>";
|
|
124
|
+
inherits: true;
|
|
125
|
+
initial-value: 0;
|
|
126
126
|
}
|
|
127
127
|
/* An outer bloom in the surface's own hue. */
|
|
128
128
|
@property --material-glow {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
syntax: "<length>";
|
|
130
|
+
inherits: true;
|
|
131
|
+
initial-value: 0px;
|
|
132
132
|
}
|
|
133
133
|
/* 0..1, how far the Ink line moves toward the foreground (Chalk 1). */
|
|
134
134
|
@property --material-ink-lift {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
syntax: "<number>";
|
|
136
|
+
inherits: true;
|
|
137
|
+
initial-value: 0;
|
|
138
138
|
}
|
|
139
139
|
/* Registered so the Ink body's style query compares a computed number. */
|
|
140
140
|
@property --material-ink-level {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
syntax: "<number>";
|
|
142
|
+
inherits: true;
|
|
143
|
+
initial-value: 0;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/* --glass-base and --glass-edge need var() defaults, which @property forbids,
|
|
@@ -148,57 +148,57 @@
|
|
|
148
148
|
* and inline style knobs still win. Rim shadows are declared on .glass (not
|
|
149
149
|
* :root) so calc(var(--glass-rim)) resolves per element, not frozen at :root. */
|
|
150
150
|
:root {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
151
|
+
/* biome-ignore-start lint/correctness/noMissingVarFunction: transition-property takes property names, and these are the registered knobs */
|
|
152
|
+
--glass-transition:
|
|
153
|
+
--glass-tone, --glass-wash, --glass-light, --glass-shade, --glass-rim, --glass-lift,
|
|
154
|
+
--glass-glow, --glass-drop, --glass-text, --material-depth, --material-tint,
|
|
155
|
+
--material-edge-width, --material-edge-ink, --material-edge-accent, --material-glow, color,
|
|
156
|
+
background-color, border-color, box-shadow, opacity, transform, translate, scale, width, height;
|
|
157
|
+
/* biome-ignore-end lint/correctness/noMissingVarFunction: see above */
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
@layer utilities {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
.transition-glass {
|
|
162
|
+
transition-property: var(--glass-transition);
|
|
163
|
+
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
@layer base {
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
:where(.glass) {
|
|
168
|
+
/* State never cuts: the registered knobs interpolate, so a tone, wash or
|
|
169
169
|
* sheen swap (checked, selected, hover) morphs on the state duration.
|
|
170
170
|
* Layered, so a surface that names its own transition keeps it; such a
|
|
171
171
|
* surface says transition-glass, never transition-all: Chromium's `all`
|
|
172
172
|
* does not cover registered custom properties. */
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
173
|
+
transition-property: var(--glass-transition);
|
|
174
|
+
transition-duration: var(--duration-state);
|
|
175
|
+
transition-timing-function: var(--ease-emphasis);
|
|
176
|
+
--glass-base: var(--card);
|
|
177
|
+
--glass-edge: color-mix(in srgb, var(--border) 60%, transparent);
|
|
178
|
+
--glass-rim-raise:
|
|
179
|
+
inset 0 1px 0 oklch(1 0 0 / calc(0.22 * var(--glass-rim) * var(--material-depth))),
|
|
180
|
+
inset 2px 2px 5px -3px oklch(1 0 0 / calc(0.5 * var(--glass-rim) * var(--material-depth))),
|
|
181
|
+
inset -2px -2px 4px -2px oklch(0 0 0 / calc(0.12 * var(--glass-rim) * var(--material-depth)));
|
|
182
|
+
--glass-rim-sink:
|
|
183
|
+
inset 0 2px 3px -1px oklch(0 0 0 / calc(0.28 * var(--glass-rim) * var(--material-depth))),
|
|
184
|
+
inset 2px 2px 5px -3px oklch(0 0 0 / calc(0.22 * var(--glass-rim) * var(--material-depth))),
|
|
185
|
+
inset 0 -1px 0 oklch(1 0 0 / calc(0.12 * var(--glass-rim) * var(--material-depth)));
|
|
186
|
+
--glass-rim-shine: var(--glass-rim-raise);
|
|
187
|
+
}
|
|
188
|
+
:where(.glass-tint) {
|
|
189
|
+
--glass-light: 0.16;
|
|
190
|
+
--glass-edge: oklch(from var(--glass-tone) l c h / 0.45);
|
|
191
|
+
color: color-mix(in oklab, var(--glass-tone) var(--glass-text), var(--foreground));
|
|
192
|
+
}
|
|
193
|
+
:where(.glass-sink) {
|
|
194
|
+
--glass-rim-shine: var(--glass-rim-sink);
|
|
195
|
+
}
|
|
196
|
+
/* Frosted: large translucent panels (dialogs, sheets, menus). A fine grey
|
|
197
197
|
* grain on top breaks the 8-bit banding a wide low-alpha gradient shows,
|
|
198
198
|
* and reads as frost instead of a flat plate. */
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
:where(.glass-frost) {
|
|
200
|
+
--glass-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7 0 0 0 0 0.7 0 0 0 0 0.7 0 0 0 0.05 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
|
|
201
|
+
}
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
/* The ONE glass formula. Neutral by default (--glass-tone transparent makes
|
|
@@ -207,75 +207,75 @@
|
|
|
207
207
|
* mixed toward transparent-black down to mud on light surfaces. Deliberately
|
|
208
208
|
* unlayered so the material owns border/background/box-shadow; tune via knobs. */
|
|
209
209
|
:where(.glass) {
|
|
210
|
-
|
|
210
|
+
/* Descendant-readable mirror of this surface's tone. The --glass-* knobs are
|
|
211
211
|
* @property inherits:false so a nested glass element never picks up an
|
|
212
212
|
* ancestor's tint — correct for surfaces, but it also means a plain child
|
|
213
213
|
* (an icon, a label) reading var(--glass-tone) silently gets `transparent`
|
|
214
214
|
* and paints nothing. --surface-tone is an ordinary inheriting property, so
|
|
215
215
|
* children can read it; a nested .glass re-declares it from its own knob,
|
|
216
216
|
* which resets the chain and keeps the no-leak guarantee. */
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
--surface-tone: var(--glass-tone);
|
|
218
|
+
/* Second tint axis. Ordinary (inheriting) properties, so they are re-declared
|
|
219
219
|
* on every .glass to reset the chain at each glass boundary (same no-leak
|
|
220
220
|
* trick as --surface-tone). Defaults reproduce the single-tone wash exactly;
|
|
221
221
|
* override tone-2/wash-2/angle together for a two-tone tint (slider fills). */
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
222
|
+
--glass-tone-2: var(--glass-tone);
|
|
223
|
+
--glass-wash-2: calc(var(--glass-wash) / 3);
|
|
224
|
+
--glass-wash-angle: 135deg;
|
|
225
|
+
--surface-wash: calc(var(--glass-wash) * var(--material-tint));
|
|
226
|
+
/* The surface's own hue, opaque: its tone when it has one, the accent otherwise
|
|
227
227
|
* (a transparent tone mixes to the accent at low alpha; the /1 restores it). */
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
228
|
+
--material-hue: oklch(from color-mix(in srgb, var(--glass-tone) 99%, var(--primary)) l c h / 1);
|
|
229
|
+
border: var(--material-edge-width) solid
|
|
230
|
+
color-mix(
|
|
231
|
+
in srgb,
|
|
232
|
+
var(--material-hue) calc(var(--material-edge-accent) * 100%),
|
|
233
|
+
color-mix(
|
|
234
|
+
in srgb,
|
|
235
|
+
var(--material-ink) calc(var(--material-edge-ink) * 100%),
|
|
236
|
+
var(--glass-edge)
|
|
237
|
+
)
|
|
238
|
+
);
|
|
239
|
+
/* Base is a gradient layer (not background-color) so the frost slice can sit
|
|
240
240
|
* BELOW it — background-color always paints under every image layer, which
|
|
241
241
|
* would put the frost above the fill. Layer order top→bottom: grain, light,
|
|
242
242
|
* shade, tone wash, base fill, frost. */
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
243
|
+
background:
|
|
244
|
+
var(--glass-grain, none),
|
|
245
|
+
radial-gradient(
|
|
246
|
+
var(--glass-sheen, 120% 120%) at 22% 8%,
|
|
247
|
+
oklch(1 0 0 / calc(var(--glass-light) * var(--material-depth))),
|
|
248
|
+
transparent 58%
|
|
249
|
+
),
|
|
250
|
+
radial-gradient(
|
|
251
|
+
120% 120% at 82% 100%,
|
|
252
|
+
oklch(0 0 0 / calc(var(--glass-shade) * var(--material-depth))),
|
|
253
|
+
transparent 58%
|
|
254
|
+
),
|
|
255
|
+
linear-gradient(
|
|
256
|
+
var(--glass-wash-angle),
|
|
257
|
+
color-mix(
|
|
258
|
+
in srgb,
|
|
259
|
+
var(--glass-tone) calc(var(--glass-wash) * var(--material-tint)),
|
|
260
|
+
transparent
|
|
261
|
+
),
|
|
262
|
+
color-mix(
|
|
263
|
+
in srgb,
|
|
264
|
+
var(--glass-tone-2) calc(var(--glass-wash-2) * var(--material-tint)),
|
|
265
|
+
transparent
|
|
266
|
+
)
|
|
267
|
+
),
|
|
268
|
+
linear-gradient(var(--glass-base), var(--glass-base)), var(--glass-frost, none);
|
|
269
|
+
/* Glow scales with --glass-lift, the knob that already says how big a surface
|
|
270
270
|
* floats: a card (0.45) takes the full bloom, a chip or button (0) about a third. */
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
271
|
+
--material-reach: calc(0.35 + var(--glass-lift) * 1.45);
|
|
272
|
+
box-shadow:
|
|
273
|
+
var(--glass-rim-shine, 0 0 #0000),
|
|
274
|
+
inset 0 -2px 4px color-mix(in srgb, var(--glass-tone) var(--glass-glow), transparent),
|
|
275
|
+
0 1px 3px color-mix(in srgb, var(--glass-tone) var(--glass-drop), transparent),
|
|
276
|
+
0 10px 30px -16px oklch(0 0 0 / calc(var(--glass-lift) * var(--material-depth))),
|
|
277
|
+
0 0 calc(var(--material-glow) * var(--material-reach))
|
|
278
|
+
oklch(from var(--material-hue) l c h / 0.65);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
/* Two-tone edge: border-color cannot gradient, so the border goes transparent
|
|
@@ -284,24 +284,24 @@
|
|
|
284
284
|
* and must read the inheriting mirrors, not the inherits:false knobs, which
|
|
285
285
|
* resolve to initial on a pseudo. Element must be positioned. */
|
|
286
286
|
:where(.glass-edge-gradient) {
|
|
287
|
-
|
|
287
|
+
border-color: transparent;
|
|
288
288
|
}
|
|
289
289
|
:where(.glass-edge-gradient)::before {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
290
|
+
content: "";
|
|
291
|
+
position: absolute;
|
|
292
|
+
inset: 0;
|
|
293
|
+
border-radius: inherit;
|
|
294
|
+
padding: 1px;
|
|
295
|
+
background: linear-gradient(
|
|
296
|
+
var(--glass-wash-angle),
|
|
297
|
+
oklch(from var(--surface-tone) l c h / 0.45),
|
|
298
|
+
oklch(from var(--glass-tone-2) l c h / 0.45)
|
|
299
|
+
);
|
|
300
|
+
mask:
|
|
301
|
+
linear-gradient(#fff 0 0) content-box,
|
|
302
|
+
linear-gradient(#fff 0 0);
|
|
303
|
+
mask-composite: exclude;
|
|
304
|
+
pointer-events: none;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
/* Ink: a hand-drawn line over a hand-laid fill that strays over and under it.
|
|
@@ -310,99 +310,96 @@
|
|
|
310
310
|
* paints above its parent's own background and border; contain: layout anchors
|
|
311
311
|
* them and makes the stacking context without repositioning the surface. */
|
|
312
312
|
@container not style(--material-ink-level: 0) {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
-2px 2px 0 -1.2px color-mix(in srgb, var(--ink-line) 55%, transparent),
|
|
364
|
-
2px -1.5px 0 -1.4px color-mix(in srgb, var(--ink-line) 45%, transparent);
|
|
365
|
-
}
|
|
313
|
+
:where(.glass) {
|
|
314
|
+
--ink-r: var(--radius);
|
|
315
|
+
--ink-line: color-mix(
|
|
316
|
+
in oklch,
|
|
317
|
+
var(--foreground) calc(var(--material-ink-lift) * 100%),
|
|
318
|
+
var(--material-ink)
|
|
319
|
+
);
|
|
320
|
+
contain: layout;
|
|
321
|
+
background: none;
|
|
322
|
+
border-color: transparent;
|
|
323
|
+
box-shadow: none;
|
|
324
|
+
border-radius: calc(var(--ink-r) * 1.7) calc(var(--ink-r) * 0.5) calc(var(--ink-r) * 1.35)
|
|
325
|
+
calc(var(--ink-r) * 0.65) / calc(var(--ink-r) * 0.55) calc(var(--ink-r) * 1.45)
|
|
326
|
+
calc(var(--ink-r) * 0.7) calc(var(--ink-r) * 1.6);
|
|
327
|
+
}
|
|
328
|
+
:where(.glass)::before,
|
|
329
|
+
:where(.glass)::after {
|
|
330
|
+
content: "";
|
|
331
|
+
position: absolute;
|
|
332
|
+
z-index: -1;
|
|
333
|
+
pointer-events: none;
|
|
334
|
+
}
|
|
335
|
+
:where(.glass)::before {
|
|
336
|
+
inset: -5px -3px -2px -6px;
|
|
337
|
+
padding: 0;
|
|
338
|
+
mask: none;
|
|
339
|
+
translate: 3px 2px;
|
|
340
|
+
border-radius: calc(var(--ink-r) * 0.6) calc(var(--ink-r) * 1.6) calc(var(--ink-r) * 0.75)
|
|
341
|
+
calc(var(--ink-r) * 1.5) / calc(var(--ink-r) * 1.4) calc(var(--ink-r) * 0.6)
|
|
342
|
+
calc(var(--ink-r) * 1.5) calc(var(--ink-r) * 0.65);
|
|
343
|
+
background:
|
|
344
|
+
linear-gradient(color-mix(in srgb, var(--surface-tone) var(--surface-wash), transparent) 0 0),
|
|
345
|
+
linear-gradient(var(--glass-base) 0 0);
|
|
346
|
+
}
|
|
347
|
+
/* Above every widget layer (the SDK stacks to 30): full-bleed media would bury the line. */
|
|
348
|
+
:where(.glass)::after {
|
|
349
|
+
z-index: 40;
|
|
350
|
+
inset: 0;
|
|
351
|
+
border: 3px solid var(--ink-line);
|
|
352
|
+
border-radius: inherit;
|
|
353
|
+
rotate: -0.2deg;
|
|
354
|
+
/* Chalk: grain tiled at 1:1, so no browser stretches it; no-clip keeps the passes. */
|
|
355
|
+
mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='c' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='5' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.4 2.55'/></filter><rect width='120' height='120' filter='url(%23c)'/></svg>")
|
|
356
|
+
0 0 / 120px 120px repeat;
|
|
357
|
+
mask-clip: no-clip;
|
|
358
|
+
opacity: var(--material-ink-level);
|
|
359
|
+
box-shadow:
|
|
360
|
+
-2px 2px 0 -1.2px color-mix(in srgb, var(--ink-line) 55%, transparent),
|
|
361
|
+
2px -1.5px 0 -1.4px color-mix(in srgb, var(--ink-line) 45%, transparent);
|
|
362
|
+
}
|
|
366
363
|
}
|
|
367
364
|
|
|
368
365
|
/* A mode's rim: the masked ring of .glass-edge-gradient, but the gradient orbits,
|
|
369
366
|
* so a surface can say a mode is on for as long as it lasts. The mask sits on the
|
|
370
367
|
* parent and the gradient rotates as a child, or the ring would rotate with it. */
|
|
371
368
|
:where(.glass-edge-orbit) {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
369
|
+
position: absolute;
|
|
370
|
+
inset: 0;
|
|
371
|
+
border-radius: inherit;
|
|
372
|
+
padding: 1px;
|
|
373
|
+
overflow: hidden;
|
|
374
|
+
mask:
|
|
375
|
+
linear-gradient(#fff 0 0) content-box,
|
|
376
|
+
linear-gradient(#fff 0 0);
|
|
377
|
+
mask-composite: exclude;
|
|
378
|
+
pointer-events: none;
|
|
379
|
+
/* A conic wedge crosses a wide pill's ends fast and its long edges slowly, so the
|
|
383
380
|
* ring keeps a constant floor and the orbit only adds the travelling highlight. */
|
|
384
|
-
|
|
381
|
+
background: color-mix(in oklab, var(--primary) 30%, transparent);
|
|
385
382
|
}
|
|
386
383
|
:where(.glass-edge-orbit) > * {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
384
|
+
position: absolute;
|
|
385
|
+
top: 50%;
|
|
386
|
+
left: 50%;
|
|
387
|
+
width: 150%;
|
|
388
|
+
aspect-ratio: 1;
|
|
389
|
+
translate: -50% -50%;
|
|
390
|
+
background: conic-gradient(
|
|
391
|
+
from 0deg,
|
|
392
|
+
transparent 0deg,
|
|
393
|
+
color-mix(in oklab, var(--primary) 95%, transparent) 40deg,
|
|
394
|
+
transparent 100deg,
|
|
395
|
+
transparent 360deg
|
|
396
|
+
);
|
|
397
|
+
animation: spin-slow 8s linear infinite;
|
|
401
398
|
}
|
|
402
399
|
@media (prefers-reduced-motion: reduce) {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
400
|
+
:where(.glass-edge-orbit) > * {
|
|
401
|
+
animation: none;
|
|
402
|
+
}
|
|
406
403
|
}
|
|
407
404
|
|
|
408
405
|
/**
|
|
@@ -412,46 +409,46 @@
|
|
|
412
409
|
* scroll surface that isn't a bare page — <ScrollArea>, dialogs, sheets.
|
|
413
410
|
*/
|
|
414
411
|
.gh-scroll {
|
|
415
|
-
|
|
412
|
+
/* The width the bar reserves, published so a scroll container can subtract it
|
|
416
413
|
from its own inset and keep its content column aligned with the panel's
|
|
417
414
|
other parts. Blink and Gecko decide that width from scrollbar-width: thin
|
|
418
415
|
and ignore the pseudo below; 10px is what they reserve, and the pseudo uses
|
|
419
416
|
the same number so a WebKit build without scrollbar-width matches. */
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
417
|
+
--scrollbar-w: 10px;
|
|
418
|
+
scrollbar-width: thin;
|
|
419
|
+
scrollbar-color: color-mix(in srgb, var(--foreground) 22%, transparent) transparent;
|
|
420
|
+
&::-webkit-scrollbar {
|
|
421
|
+
width: var(--scrollbar-w);
|
|
422
|
+
height: var(--scrollbar-w);
|
|
423
|
+
}
|
|
424
|
+
&::-webkit-scrollbar-track {
|
|
425
|
+
background: transparent;
|
|
426
|
+
}
|
|
427
|
+
&::-webkit-scrollbar-thumb {
|
|
428
|
+
background: color-mix(in srgb, var(--foreground) 22%, transparent);
|
|
429
|
+
border-radius: 9999px;
|
|
430
|
+
border: 2px solid transparent;
|
|
431
|
+
background-clip: padding-box;
|
|
432
|
+
}
|
|
433
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
434
|
+
background: color-mix(in srgb, var(--foreground) 38%, transparent);
|
|
435
|
+
}
|
|
439
436
|
}
|
|
440
437
|
|
|
441
438
|
/* Alert/toast icon chrome + description spacing: structural (same rationale as
|
|
442
439
|
* .carousel-stack below), so real CSS instead of [&>svg]: arbitrary variants.
|
|
443
440
|
* Values mirror the former utilities: size-[18px], size-28, mt-0.5. */
|
|
444
441
|
.gh-alert-icon > svg {
|
|
445
|
-
|
|
446
|
-
|
|
442
|
+
width: 18px;
|
|
443
|
+
height: 18px;
|
|
447
444
|
}
|
|
448
445
|
.gh-alert-icon-bg > svg {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
446
|
+
width: 7rem;
|
|
447
|
+
height: 7rem;
|
|
448
|
+
stroke-width: 2.5px;
|
|
452
449
|
}
|
|
453
450
|
.gh-alert-desc:not(:first-child) {
|
|
454
|
-
|
|
451
|
+
margin-top: 0.125rem;
|
|
455
452
|
}
|
|
456
453
|
|
|
457
454
|
/* Carousel `wipe` puts every slide in one grid cell. This is
|
|
@@ -459,11 +456,11 @@
|
|
|
459
456
|
* package source never reaches a consumer, because Tailwind skips node_modules
|
|
460
457
|
* when scanning for class names. */
|
|
461
458
|
.carousel-stack {
|
|
462
|
-
|
|
459
|
+
display: grid;
|
|
463
460
|
}
|
|
464
461
|
.carousel-stack > * {
|
|
465
|
-
|
|
466
|
-
|
|
462
|
+
grid-column: 1;
|
|
463
|
+
grid-row: 1;
|
|
467
464
|
}
|
|
468
465
|
|
|
469
466
|
/* Carousel `wipe`: the incoming slide sweeps in diagonally over the previous
|
|
@@ -473,36 +470,36 @@
|
|
|
473
470
|
* Slides are opaque here; embla's fade plugin only stops the track translating,
|
|
474
471
|
* and its opacity would wash out the sweep. */
|
|
475
472
|
.carousel-wipe {
|
|
476
|
-
|
|
473
|
+
/* Content choreography, not a state change: the motion scale's rungs are for
|
|
477
474
|
* micro-interactions and are far too quick to read as a sweep. Override per
|
|
478
475
|
* instance by setting --carousel-wipe on the carousel. */
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
476
|
+
--carousel-wipe: 1600ms;
|
|
477
|
+
clip-path: polygon(0 0, 300% 0, 0 300%, 0 0);
|
|
478
|
+
/* The fade plugin fades AND parks inactive slides off-screen
|
|
482
479
|
* (transform: translate(containerWidth + 2)), on embla's own short scroll
|
|
483
480
|
* duration. Both have to be neutralised or the sweep reveals empty space
|
|
484
481
|
* once the outgoing slide leaves: in wipe mode clip-path is the only reveal,
|
|
485
482
|
* and z-index alone decides what shows through. Inline styles, hence
|
|
486
483
|
* !important. */
|
|
487
|
-
|
|
488
|
-
|
|
484
|
+
opacity: 1 !important;
|
|
485
|
+
transform: none !important;
|
|
489
486
|
}
|
|
490
487
|
.carousel-wipe[data-prev] {
|
|
491
|
-
|
|
488
|
+
z-index: 1;
|
|
492
489
|
}
|
|
493
490
|
.carousel-wipe[data-selected] {
|
|
494
|
-
|
|
495
|
-
|
|
491
|
+
z-index: 2;
|
|
492
|
+
animation: carousel-wipe-in var(--carousel-wipe) ease-in-out;
|
|
496
493
|
}
|
|
497
494
|
@keyframes carousel-wipe-in {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
495
|
+
from {
|
|
496
|
+
clip-path: polygon(0 0, 0 0, 0 0, 0 0);
|
|
497
|
+
}
|
|
501
498
|
}
|
|
502
499
|
@media (prefers-reduced-motion: reduce) {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
500
|
+
.carousel-wipe[data-selected] {
|
|
501
|
+
animation: none;
|
|
502
|
+
}
|
|
506
503
|
}
|
|
507
504
|
|
|
508
505
|
/* Children arrive one after another. Mount-only (a CSS animation runs when
|
|
@@ -513,44 +510,44 @@
|
|
|
513
510
|
* rows take slots, it does not. Slots come from --i: nth-child below for a
|
|
514
511
|
* flat list, or written inline by a part that knows its true order. */
|
|
515
512
|
@keyframes stagger-in {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
513
|
+
from {
|
|
514
|
+
opacity: 0;
|
|
515
|
+
/* Upward: a child of a scroll container must not extend its scrollable
|
|
519
516
|
* height mid-animation, and rows trail a downward-growing edge. */
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
517
|
+
translate: 0 -8px;
|
|
518
|
+
}
|
|
519
|
+
to {
|
|
520
|
+
opacity: 1;
|
|
521
|
+
translate: 0 0;
|
|
522
|
+
}
|
|
526
523
|
}
|
|
527
524
|
.gh-stagger > :not([role="group"]),
|
|
528
525
|
.gh-stagger > [role="group"] > * {
|
|
529
|
-
|
|
530
|
-
|
|
526
|
+
animation: stagger-in calc(var(--duration-morph) * 0.5) var(--ease-emphasis) both;
|
|
527
|
+
animation-delay: calc(var(--stagger-base, 80ms) + var(--i, 0) * var(--stagger-step, 60ms));
|
|
531
528
|
}
|
|
532
529
|
.gh-stagger > :nth-child(2) {
|
|
533
|
-
|
|
530
|
+
--i: 1;
|
|
534
531
|
}
|
|
535
532
|
.gh-stagger > :nth-child(3) {
|
|
536
|
-
|
|
533
|
+
--i: 2;
|
|
537
534
|
}
|
|
538
535
|
.gh-stagger > :nth-child(4) {
|
|
539
|
-
|
|
536
|
+
--i: 3;
|
|
540
537
|
}
|
|
541
538
|
.gh-stagger > :nth-child(5) {
|
|
542
|
-
|
|
539
|
+
--i: 4;
|
|
543
540
|
}
|
|
544
541
|
.gh-stagger > :nth-child(6) {
|
|
545
|
-
|
|
542
|
+
--i: 5;
|
|
546
543
|
}
|
|
547
544
|
.gh-stagger > :nth-child(n + 7) {
|
|
548
|
-
|
|
545
|
+
--i: 6;
|
|
549
546
|
}
|
|
550
547
|
|
|
551
548
|
/* Icon: the box a glyph sits in, sized by its width/height attributes. */
|
|
552
549
|
svg[data-slot="icon"] {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
550
|
+
display: inline-block;
|
|
551
|
+
vertical-align: 0;
|
|
552
|
+
flex-shrink: 0;
|
|
556
553
|
}
|