@zonsh/ui 0.2.0 → 0.5.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/LICENSE +22 -0
- package/README.md +19 -13
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/ascii-field.d.ts +1 -1
- package/dist/components/ascii-field.js +2 -1
- package/dist/components/bottom-nav.d.ts +86 -0
- package/dist/components/bottom-nav.js +175 -0
- package/dist/components/breadcrumb.d.ts +9 -0
- package/dist/components/breadcrumb.js +6 -1
- package/dist/components/button-group.d.ts +1 -1
- package/dist/components/button-group.js +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.d.ts +1 -1
- package/dist/components/calendar.js +18 -3
- package/dist/components/carousel.d.ts +22 -3
- package/dist/components/carousel.js +25 -7
- package/dist/components/chart.d.ts +20 -0
- package/dist/components/chart.js +52 -3
- package/dist/components/code-block.d.ts +20 -10
- package/dist/components/code-block.js +54 -12
- package/dist/components/collapsible.js +3 -3
- package/dist/components/color-picker.d.ts +30 -8
- package/dist/components/color-picker.js +48 -27
- package/dist/components/combobox.d.ts +21 -3
- package/dist/components/combobox.js +79 -7
- package/dist/components/command.d.ts +23 -3
- package/dist/components/command.js +63 -18
- package/dist/components/conversation.d.ts +10 -1
- package/dist/components/conversation.js +24 -7
- package/dist/components/copy-button.d.ts +15 -6
- package/dist/components/copy-button.js +27 -10
- package/dist/components/data-table.d.ts +66 -6
- package/dist/components/data-table.js +376 -23
- package/dist/components/date-picker.d.ts +73 -4
- package/dist/components/date-picker.js +138 -7
- package/dist/components/dialog.d.ts +10 -1
- package/dist/components/dialog.js +6 -3
- package/dist/components/drawer.d.ts +10 -1
- package/dist/components/drawer.js +6 -3
- package/dist/components/feature-list.js +2 -2
- package/dist/components/field.d.ts +27 -8
- package/dist/components/field.js +49 -4
- package/dist/components/file-drop.d.ts +26 -4
- package/dist/components/file-drop.js +125 -64
- package/dist/components/filter-bar.d.ts +50 -3
- package/dist/components/filter-bar.js +71 -33
- package/dist/components/form.d.ts +4 -2
- package/dist/components/form.js +24 -2
- package/dist/components/graph.d.ts +41 -0
- package/dist/components/graph.js +106 -50
- package/dist/components/illustration.js +51 -4
- package/dist/components/input-group.d.ts +18 -7
- package/dist/components/input-group.js +41 -19
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +3 -3
- package/dist/components/kbd.d.ts +17 -0
- package/dist/components/kbd.js +8 -1
- package/dist/components/layout.d.ts +2 -1
- package/dist/components/layout.js +55 -11
- package/dist/components/lightbox.d.ts +100 -0
- package/dist/components/lightbox.js +457 -0
- package/dist/components/locale.d.ts +44 -0
- package/dist/components/locale.js +37 -0
- package/dist/components/logo.js +1 -1
- package/dist/components/menu.js +3 -1
- package/dist/components/menubar.js +60 -13
- package/dist/components/message.d.ts +3 -3
- package/dist/components/message.js +12 -8
- package/dist/components/meter.js +3 -1
- package/dist/components/money-input.d.ts +80 -0
- package/dist/components/money-input.js +253 -0
- package/dist/components/navigation-menu.js +4 -2
- package/dist/components/number-field.d.ts +21 -2
- package/dist/components/number-field.js +53 -28
- package/dist/components/otp-field.d.ts +14 -1
- package/dist/components/otp-field.js +10 -2
- package/dist/components/pagination.d.ts +13 -7
- package/dist/components/pagination.js +18 -7
- package/dist/components/pdf-viewer.d.ts +67 -2
- package/dist/components/pdf-viewer.js +88 -21
- package/dist/components/phone-input.d.ts +79 -0
- package/dist/components/phone-input.js +282 -0
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.js +3 -1
- package/dist/components/prompt-input.d.ts +34 -9
- package/dist/components/prompt-input.js +37 -17
- package/dist/components/radio-group.js +7 -2
- package/dist/components/rating.d.ts +73 -0
- package/dist/components/rating.js +124 -0
- package/dist/components/reasoning.d.ts +16 -1
- package/dist/components/reasoning.js +10 -7
- package/dist/components/resizable.d.ts +10 -1
- package/dist/components/resizable.js +4 -1
- package/dist/components/response.d.ts +17 -5
- package/dist/components/response.js +58 -18
- package/dist/components/scroll-area.d.ts +1 -1
- package/dist/components/select.js +14 -3
- package/dist/components/separator.js +1 -1
- package/dist/components/sidebar.d.ts +20 -4
- package/dist/components/sidebar.js +70 -35
- package/dist/components/site-header.d.ts +46 -12
- package/dist/components/site-header.js +78 -19
- package/dist/components/skeleton.d.ts +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +3 -1
- package/dist/components/sortable.d.ts +178 -0
- package/dist/components/sortable.js +1282 -0
- package/dist/components/sources.d.ts +17 -2
- package/dist/components/sources.js +11 -4
- package/dist/components/spinner.d.ts +13 -1
- package/dist/components/spinner.js +5 -2
- package/dist/components/stat.d.ts +91 -0
- package/dist/components/stat.js +141 -0
- package/dist/components/stepper.d.ts +71 -0
- package/dist/components/stepper.js +101 -0
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +2 -2
- package/dist/components/table.d.ts +13 -3
- package/dist/components/table.js +231 -41
- package/dist/components/tabs.js +8 -4
- package/dist/components/tags-input.d.ts +18 -2
- package/dist/components/tags-input.js +66 -34
- package/dist/components/theme.d.ts +16 -2
- package/dist/components/theme.js +34 -8
- package/dist/components/time-field.d.ts +24 -4
- package/dist/components/time-field.js +32 -9
- package/dist/components/timeline.d.ts +18 -2
- package/dist/components/timeline.js +13 -4
- package/dist/components/tippy.d.ts +48 -0
- package/dist/components/tippy.js +648 -0
- package/dist/components/toast.d.ts +18 -2
- package/dist/components/toast.js +12 -3
- package/dist/components/toggle-group.js +1 -0
- package/dist/components/tool-call.d.ts +19 -8
- package/dist/components/tool-call.js +23 -7
- package/dist/components/toolbar.d.ts +1 -1
- package/dist/components/toolbar.js +10 -2
- package/dist/components/tooltip.d.ts +4 -2
- package/dist/components/tooltip.js +10 -4
- package/dist/components/tour.d.ts +127 -0
- package/dist/components/tour.js +673 -0
- package/dist/components/tree.js +45 -9
- package/dist/components/video-player.d.ts +10 -2
- package/dist/components/video-player.js +134 -38
- package/dist/illustration.d.ts +2 -0
- package/dist/illustration.js +7 -0
- package/dist/index.d.ts +11 -3
- package/dist/index.js +11 -3
- package/dist/lib/code-highlight.d.ts +3 -16
- package/dist/lib/code-highlight.js +160 -10
- package/dist/lib/code-theme.js +3 -3
- package/dist/lib/digit-roll.js +8 -8
- package/dist/lib/field-errors.d.ts +28 -0
- package/dist/lib/field-errors.js +24 -0
- package/dist/lib/field-value.d.ts +13 -0
- package/dist/lib/field-value.js +44 -0
- package/dist/lib/glide.d.ts +5 -4
- package/dist/lib/glide.js +5 -4
- package/dist/lib/graph-layout.js +11 -2
- package/dist/lib/money.d.ts +73 -0
- package/dist/lib/money.js +343 -0
- package/dist/lib/phone-countries.d.ts +1 -0
- package/dist/lib/phone-countries.js +281 -0
- package/dist/lib/phone.d.ts +90 -0
- package/dist/lib/phone.js +286 -0
- package/dist/lib/platform.d.ts +8 -3
- package/dist/lib/platform.js +13 -6
- package/dist/lib/row-index.d.ts +15 -0
- package/dist/lib/row-index.js +136 -0
- package/dist/lib/table-fit.d.ts +3 -2
- package/dist/lib/table-fit.js +52 -23
- package/dist/lib/theme-script.d.ts +15 -2
- package/dist/lib/theme-script.js +23 -3
- package/dist/lib/tippy/pixels.d.ts +47 -0
- package/dist/lib/tippy/pixels.js +187 -0
- package/dist/lib/tippy/sprite.d.ts +86 -0
- package/dist/lib/tippy/sprite.js +753 -0
- package/dist/messages/de.d.ts +12 -0
- package/dist/messages/de.js +326 -0
- package/dist/styles/expressive.css +60 -26
- package/dist/styles/index.css +11 -2
- package/dist/styles/material.css +47 -23
- package/dist/styles/parts/ai.css +4 -2
- package/dist/styles/parts/controls.css +85 -32
- package/dist/styles/parts/data.css +33 -5
- package/dist/styles/parts/feedback.css +110 -13
- package/dist/styles/parts/foundations.css +1 -1
- package/dist/styles/parts/navigation.css +230 -5
- package/dist/styles/parts/overlays.css +98 -11
- package/dist/styles/parts/pdf.css +13 -7
- package/dist/styles/tokens.css +28 -4
- package/dist/vite.d.ts +0 -50
- package/dist/vite.js +0 -100
- package/package.json +28 -33
- package/dist/components/code-highlight.d.ts +0 -13
- package/dist/components/code-highlight.js +0 -107
- package/dist/components/whiteboard.d.ts +0 -80
- package/dist/components/whiteboard.js +0 -389
- package/dist/styles/parts/whiteboard.css +0 -855
|
@@ -51,7 +51,10 @@
|
|
|
51
51
|
mask-repeat: no-repeat;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
/* ── Progress: indeterminate sweep (
|
|
54
|
+
/* ── Progress: indeterminate sweep (a slow fade under reduced motion) ────────────
|
|
55
|
+
* The sweep is a move the interface makes on its own, over and over: ease in and out
|
|
56
|
+
* (--ease-move), so it never lands with a jolt at either end. Reduced motion keeps no movement,
|
|
57
|
+
* only the whole track breathing between two strengths, so it still reads as working. */
|
|
55
58
|
|
|
56
59
|
@keyframes ep-progress-indeterminate {
|
|
57
60
|
from {
|
|
@@ -64,14 +67,23 @@
|
|
|
64
67
|
|
|
65
68
|
[data-slot="progress-indicator"][data-indeterminate] {
|
|
66
69
|
width: 40%;
|
|
67
|
-
animation: ep-progress-indeterminate 1.4s var(--ease) infinite;
|
|
70
|
+
animation: ep-progress-indeterminate 1.4s var(--ease-move) infinite;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@keyframes ep-progress-pulse {
|
|
74
|
+
from {
|
|
75
|
+
opacity: 0.2;
|
|
76
|
+
}
|
|
77
|
+
to {
|
|
78
|
+
opacity: 0.5;
|
|
79
|
+
}
|
|
68
80
|
}
|
|
69
81
|
|
|
70
82
|
@media (prefers-reduced-motion: reduce) {
|
|
71
83
|
[data-slot="progress-indicator"][data-indeterminate] {
|
|
72
|
-
animation: none;
|
|
73
84
|
width: 100%;
|
|
74
85
|
opacity: 0.35;
|
|
86
|
+
animation: ep-progress-pulse 1.4s ease-in-out infinite alternate;
|
|
75
87
|
}
|
|
76
88
|
}
|
|
77
89
|
|
|
@@ -181,10 +193,10 @@
|
|
|
181
193
|
width: calc(var(--sidebar-width) - 8px);
|
|
182
194
|
}
|
|
183
195
|
[data-slot="sidebar-shell"][data-variant="floating"][data-side="left"] > [data-slot="sidebar"] {
|
|
184
|
-
|
|
196
|
+
inset-inline-start: 8px;
|
|
185
197
|
}
|
|
186
198
|
[data-slot="sidebar-shell"][data-variant="floating"][data-side="right"] > [data-slot="sidebar"] {
|
|
187
|
-
|
|
199
|
+
inset-inline-end: 8px;
|
|
188
200
|
}
|
|
189
201
|
[data-slot="sidebar-shell"][data-variant="floating"][data-collapsible="icon"] {
|
|
190
202
|
width: calc(var(--sidebar-width-icon) + 8px);
|
|
@@ -230,3 +242,216 @@
|
|
|
230
242
|
border-width: 2px;
|
|
231
243
|
}
|
|
232
244
|
}
|
|
245
|
+
|
|
246
|
+
/* ── SiteHeader once scrolled: the page ground ─────────────────────────────────
|
|
247
|
+
* A flat fill would be a band of its own: nearly black in dark mode, against a page the grain
|
|
248
|
+
* lifts. So the scrolled bar is the page ground itself — --background with the faint light from
|
|
249
|
+
* above, and the two grain layers over it, all fixed to the viewport like the body's
|
|
250
|
+
* (expressive.css) so they line up with the page's. The fill is opaque on purpose: the grain
|
|
251
|
+
* blends with it as with the body, where a see-through fill would let the raw noise through and
|
|
252
|
+
* turn the bar lighter than the page.
|
|
253
|
+
*
|
|
254
|
+
* The ground (with its grain) and the hairline follow --site-header-ground: 0 until the page has
|
|
255
|
+
* scrolled --site-header-from (the component's scrollThreshold), 1 once it has scrolled the bar's
|
|
256
|
+
* height (--site-header-span) more. Where the browser ties animations to the scroll (Chrome 115+,
|
|
257
|
+
* Safari 26), one animation of that number follows the scroll position; elsewhere the component
|
|
258
|
+
* writes it once a frame. The number is a registered property on purpose: its animation runs on
|
|
259
|
+
* the main thread, where every frame reads one scroll position. Animated on the compositor
|
|
260
|
+
* (opacity), the bar now and then drew a frame from an older scroll offset — see-through over
|
|
261
|
+
* content that had already moved — after it had turned solid. No transition either, which would
|
|
262
|
+
* leave the bar behind the content it covers; only a forced `scrolled` eases. */
|
|
263
|
+
|
|
264
|
+
@property --site-header-ground {
|
|
265
|
+
syntax: "<number>";
|
|
266
|
+
inherits: true;
|
|
267
|
+
initial-value: 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@layer components {
|
|
271
|
+
[data-slot="site-header"] {
|
|
272
|
+
--site-header-span: 4rem;
|
|
273
|
+
isolation: isolate;
|
|
274
|
+
/* Under the status bar on a page that draws there (viewport-fit=cover, an iPhone home-screen
|
|
275
|
+
app): the bar keeps its links clear of it, and its ground runs up behind it. */
|
|
276
|
+
padding-top: env(safe-area-inset-top, 0px);
|
|
277
|
+
border-bottom-color: color-mix(
|
|
278
|
+
in oklab,
|
|
279
|
+
var(--border) calc(60% * var(--site-header-ground)),
|
|
280
|
+
transparent
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
/* The ground and its grain are one layer, isolated and opaque inside, that fades as a whole:
|
|
284
|
+
partly in, the bar is a mix of the content behind it and the finished ground, never lighter
|
|
285
|
+
than either (grain fading over a half-clear fill would let the raw noise through). */
|
|
286
|
+
[data-slot="site-header-ground"] {
|
|
287
|
+
position: absolute;
|
|
288
|
+
inset: 0;
|
|
289
|
+
z-index: -1;
|
|
290
|
+
pointer-events: none;
|
|
291
|
+
isolation: isolate;
|
|
292
|
+
background-color: var(--background);
|
|
293
|
+
background-image: radial-gradient(110% 65% at 50% -10%, var(--page-glow), transparent 60%);
|
|
294
|
+
background-attachment: fixed;
|
|
295
|
+
opacity: var(--site-header-ground);
|
|
296
|
+
}
|
|
297
|
+
[data-slot="site-header-ground"]::before,
|
|
298
|
+
[data-slot="site-header-ground"]::after {
|
|
299
|
+
content: "";
|
|
300
|
+
position: absolute;
|
|
301
|
+
inset: 0;
|
|
302
|
+
background-image: var(--grain-noise);
|
|
303
|
+
background-size: 200px auto;
|
|
304
|
+
background-attachment: fixed;
|
|
305
|
+
}
|
|
306
|
+
[data-slot="site-header-ground"]::before {
|
|
307
|
+
mix-blend-mode: var(--page-grain-blend);
|
|
308
|
+
opacity: var(--page-grain-opacity);
|
|
309
|
+
}
|
|
310
|
+
[data-slot="site-header-ground"]::after {
|
|
311
|
+
mix-blend-mode: screen;
|
|
312
|
+
opacity: calc(var(--grain-opacity) * 0.35);
|
|
313
|
+
background-position: 97px 61px;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* A forced state changes at a time of its own, so it eases (instant under reduced motion). */
|
|
317
|
+
[data-slot="site-header"][data-forced] {
|
|
318
|
+
transition: border-color var(--duration) var(--ease);
|
|
319
|
+
}
|
|
320
|
+
[data-slot="site-header"][data-forced] > [data-slot="site-header-ground"] {
|
|
321
|
+
transition: opacity var(--duration) var(--ease);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
@supports (animation-timeline: scroll()) {
|
|
325
|
+
[data-slot="site-header"]:not([data-forced]) {
|
|
326
|
+
animation-name: ep-site-header-ground;
|
|
327
|
+
animation-duration: auto;
|
|
328
|
+
animation-timing-function: linear;
|
|
329
|
+
animation-fill-mode: both;
|
|
330
|
+
animation-timeline: scroll(root block);
|
|
331
|
+
animation-range: var(--site-header-from, 8px)
|
|
332
|
+
calc(var(--site-header-from, 8px) + var(--site-header-span));
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
@keyframes ep-site-header-ground {
|
|
338
|
+
from {
|
|
339
|
+
--site-header-ground: 0;
|
|
340
|
+
}
|
|
341
|
+
to {
|
|
342
|
+
--site-header-ground: 1;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/* ── BottomNav ────────────────────────────────────────────────────────────────
|
|
347
|
+
* The bar is 12px taller than a prominent control: a 46px tile in the middle of it. While a fixed
|
|
348
|
+
* bar is on screen the page reserves it as --bottom-nav-h — the bar, its hairline and the safe
|
|
349
|
+
* area under it — and scrolls focused things clear of it (WCAG 2.4.11). Zero where it is hidden
|
|
350
|
+
* (its breakpoint) or contained in a preview, so `pb-(--bottom-nav-h)` is always safe to write. */
|
|
351
|
+
|
|
352
|
+
:root {
|
|
353
|
+
--bottom-nav-bar: calc(var(--control-h-lg) + 12px);
|
|
354
|
+
--bottom-nav-h: 0px;
|
|
355
|
+
}
|
|
356
|
+
:root:has([data-slot="bottom-nav"][data-position="fixed"]) {
|
|
357
|
+
--bottom-nav-h: calc(var(--bottom-nav-bar) + 1px + env(safe-area-inset-bottom, 0px));
|
|
358
|
+
scroll-padding-bottom: var(--bottom-nav-h);
|
|
359
|
+
}
|
|
360
|
+
@media (width >= 40rem) {
|
|
361
|
+
:root:has([data-slot="bottom-nav"][data-position="fixed"][data-breakpoint="sm"]) {
|
|
362
|
+
--bottom-nav-h: 0px;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
@media (width >= 48rem) {
|
|
366
|
+
:root:has(
|
|
367
|
+
[data-slot="bottom-nav"][data-position="fixed"]:is([data-breakpoint="sm"], [data-breakpoint="md"])
|
|
368
|
+
) {
|
|
369
|
+
--bottom-nav-h: 0px;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
@media (width >= 64rem) {
|
|
373
|
+
:root:has([data-slot="bottom-nav"][data-position="fixed"][data-breakpoint]) {
|
|
374
|
+
--bottom-nav-h: 0px;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
@layer components {
|
|
379
|
+
/* The page ground, as under a scrolled SiteHeader: --background and the two grain layers,
|
|
380
|
+
fixed to the viewport so they line up with the page's. Opaque, so content scrolling under
|
|
381
|
+
the bar never shows through the grain. */
|
|
382
|
+
[data-slot="bottom-nav-ground"] {
|
|
383
|
+
position: absolute;
|
|
384
|
+
inset: 0;
|
|
385
|
+
z-index: -1;
|
|
386
|
+
pointer-events: none;
|
|
387
|
+
isolation: isolate;
|
|
388
|
+
background-color: var(--background);
|
|
389
|
+
}
|
|
390
|
+
[data-slot="bottom-nav-ground"]::before,
|
|
391
|
+
[data-slot="bottom-nav-ground"]::after {
|
|
392
|
+
content: "";
|
|
393
|
+
position: absolute;
|
|
394
|
+
inset: 0;
|
|
395
|
+
background-image: var(--grain-noise);
|
|
396
|
+
background-size: 200px auto;
|
|
397
|
+
background-attachment: fixed;
|
|
398
|
+
}
|
|
399
|
+
[data-slot="bottom-nav-ground"]::before {
|
|
400
|
+
mix-blend-mode: var(--page-grain-blend);
|
|
401
|
+
opacity: var(--page-grain-opacity);
|
|
402
|
+
}
|
|
403
|
+
[data-slot="bottom-nav-ground"]::after {
|
|
404
|
+
mix-blend-mode: screen;
|
|
405
|
+
opacity: calc(var(--grain-opacity) * 0.35);
|
|
406
|
+
background-position: 97px 61px;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/* An item rests in the muted ink; hovered or current, in the full one. */
|
|
410
|
+
[data-slot="bottom-nav-item-tile"] {
|
|
411
|
+
color: var(--muted-foreground);
|
|
412
|
+
transition:
|
|
413
|
+
color var(--duration-fade) var(--ease),
|
|
414
|
+
background-color var(--duration-fade) var(--ease-glide),
|
|
415
|
+
box-shadow var(--duration-fade) var(--ease);
|
|
416
|
+
}
|
|
417
|
+
/* No tap delay: the bar is tapped all day. */
|
|
418
|
+
[data-slot="bottom-nav-item"] {
|
|
419
|
+
touch-action: manipulation;
|
|
420
|
+
}
|
|
421
|
+
/* A tap answers on touch-down, as a row does: the full ink on a soft fill, sinking in fast and
|
|
422
|
+
rising back gently. The tap highlight is off, so this is the only press feedback there is. */
|
|
423
|
+
[data-slot="bottom-nav-item"]:not([aria-disabled="true"]):active > [data-slot="bottom-nav-item-tile"] {
|
|
424
|
+
color: var(--foreground);
|
|
425
|
+
background-color: var(--ink-ghost);
|
|
426
|
+
transition:
|
|
427
|
+
color calc(var(--duration-fade) * 0.6) var(--ease),
|
|
428
|
+
background-color calc(var(--duration-fade) * 0.6) var(--ease-glide),
|
|
429
|
+
box-shadow calc(var(--duration-fade) * 0.6) var(--ease);
|
|
430
|
+
}
|
|
431
|
+
@media (hover: hover) {
|
|
432
|
+
[data-slot="bottom-nav-item"]:not([aria-disabled="true"]):hover > [data-slot="bottom-nav-item-tile"] {
|
|
433
|
+
color: var(--foreground);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
[data-slot="bottom-nav-item"][aria-current="page"] > [data-slot="bottom-nav-item-tile"] {
|
|
437
|
+
color: var(--foreground);
|
|
438
|
+
}
|
|
439
|
+
/* Until the gliding indicator has measured (server-rendered HTML), the current tile is raised
|
|
440
|
+
itself, like a secondary button. */
|
|
441
|
+
[data-slot="bottom-nav"]:not([data-indicator])
|
|
442
|
+
[data-slot="bottom-nav-item"][aria-current="page"]
|
|
443
|
+
> [data-slot="bottom-nav-item-tile"] {
|
|
444
|
+
background-color: var(--control-surface);
|
|
445
|
+
background-image: linear-gradient(180deg, var(--control-inner-edge), transparent);
|
|
446
|
+
box-shadow:
|
|
447
|
+
0 0 0 1px var(--control-edge),
|
|
448
|
+
inset 0 1px 0 var(--control-highlight),
|
|
449
|
+
inset 0 0 0 1px var(--control-inner-edge);
|
|
450
|
+
}
|
|
451
|
+
@media (forced-colors: active) {
|
|
452
|
+
[data-slot="bottom-nav-indicator"] {
|
|
453
|
+
forced-color-adjust: none;
|
|
454
|
+
border: 2px solid Highlight;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
/*
|
|
4
4
|
* Drawer and toast motion. Both follow the pointer while swiping (Base UI writes the movement
|
|
5
5
|
* into CSS variables), so their transforms compose several variables per side and state, which
|
|
6
|
-
* is clearer here than as arbitrary Tailwind values. Larger travel uses
|
|
7
|
-
* brand ease
|
|
6
|
+
* is clearer here than as arbitrary Tailwind values. Larger travel uses 2 × --duration with the
|
|
7
|
+
* brand ease, and closing takes 0.7 of opening (a swipe sets its own pace). --duration is 0 under
|
|
8
|
+
* prefers-reduced-motion, so nothing moves; the block at the end keeps a --duration-fade fade, so
|
|
9
|
+
* they do not pop in and out either.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
12
|
@layer components {
|
|
@@ -12,14 +14,18 @@
|
|
|
12
14
|
|
|
13
15
|
[data-slot="drawer-backdrop"] {
|
|
14
16
|
opacity: calc(1 - var(--drawer-swipe-progress, 0));
|
|
15
|
-
transition: opacity calc(var(--duration) *
|
|
17
|
+
transition: opacity calc(var(--duration) * 2) var(--ease);
|
|
16
18
|
|
|
17
19
|
&[data-starting-style],
|
|
18
20
|
&[data-ending-style] {
|
|
19
21
|
opacity: 0;
|
|
20
22
|
}
|
|
23
|
+
/* A button or Escape closes in 0.7 of the opening; a swipe keeps the pace of the release. */
|
|
21
24
|
&[data-ending-style] {
|
|
22
|
-
transition-duration: calc(
|
|
25
|
+
transition-duration: calc(0.7 * var(--duration) * 2);
|
|
26
|
+
}
|
|
27
|
+
&[data-ending-style][data-swipe-dismiss] {
|
|
28
|
+
transition-duration: calc(var(--drawer-swipe-strength, 1) * var(--duration) * 2);
|
|
23
29
|
}
|
|
24
30
|
&[data-swiping] {
|
|
25
31
|
transition-duration: 0ms;
|
|
@@ -28,9 +34,11 @@
|
|
|
28
34
|
|
|
29
35
|
[data-slot="drawer-content"] {
|
|
30
36
|
--drawer-bleed: 3rem;
|
|
37
|
+
/* The padding follows the snap offset at once: animating it would re-lay out the body every
|
|
38
|
+
frame. Only the transform moves. */
|
|
31
39
|
transition:
|
|
32
|
-
transform calc(var(--duration) *
|
|
33
|
-
padding-bottom
|
|
40
|
+
transform calc(var(--duration) * 2) var(--ease),
|
|
41
|
+
padding-bottom 0s;
|
|
34
42
|
|
|
35
43
|
/* Fills the gap behind the panel when it is pulled past its resting edge. */
|
|
36
44
|
&::after {
|
|
@@ -45,7 +53,10 @@
|
|
|
45
53
|
user-select: none;
|
|
46
54
|
}
|
|
47
55
|
&[data-ending-style] {
|
|
48
|
-
transition-duration: calc(
|
|
56
|
+
transition-duration: calc(0.7 * var(--duration) * 2), 0s;
|
|
57
|
+
}
|
|
58
|
+
&[data-ending-style][data-swipe-dismiss] {
|
|
59
|
+
transition-duration: calc(var(--drawer-swipe-strength, 1) * var(--duration) * 2), 0s;
|
|
49
60
|
}
|
|
50
61
|
|
|
51
62
|
/*
|
|
@@ -133,17 +144,19 @@
|
|
|
133
144
|
height: var(--height);
|
|
134
145
|
z-index: calc(1000 - var(--toast-index));
|
|
135
146
|
transform-origin: bottom center;
|
|
136
|
-
|
|
147
|
+
/* Where the toast rests in the stack, named so reduced motion can keep it there. */
|
|
148
|
+
--toast-rest: translateX(var(--toast-swipe-movement-x))
|
|
137
149
|
translateY(
|
|
138
150
|
calc(
|
|
139
151
|
var(--toast-swipe-movement-y) - (var(--toast-index) * var(--peek)) - (var(--shrink) * var(--height))
|
|
140
152
|
)
|
|
141
153
|
)
|
|
142
154
|
scale(var(--scale));
|
|
155
|
+
transform: var(--toast-rest);
|
|
143
156
|
user-select: none;
|
|
144
157
|
transition:
|
|
145
|
-
transform calc(var(--duration) *
|
|
146
|
-
opacity calc(var(--duration) *
|
|
158
|
+
transform calc(var(--duration) * 2) var(--ease),
|
|
159
|
+
opacity calc(var(--duration) * 2) var(--ease),
|
|
147
160
|
height var(--duration) var(--ease);
|
|
148
161
|
|
|
149
162
|
/* Bridges the gap between expanded toasts so hover doesn't flicker. */
|
|
@@ -158,7 +171,7 @@
|
|
|
158
171
|
|
|
159
172
|
&[data-expanded] {
|
|
160
173
|
height: var(--toast-height);
|
|
161
|
-
|
|
174
|
+
--toast-rest: translateX(var(--toast-swipe-movement-x)) translateY(var(--offset-y));
|
|
162
175
|
}
|
|
163
176
|
&[data-starting-style] {
|
|
164
177
|
transform: translateY(150%);
|
|
@@ -195,6 +208,80 @@
|
|
|
195
208
|
opacity: 1;
|
|
196
209
|
}
|
|
197
210
|
}
|
|
211
|
+
|
|
212
|
+
/*
|
|
213
|
+
* Reduced motion: --duration is 0, so nothing travels; drawers and toasts fade in and out where
|
|
214
|
+
* they rest instead of popping, with --duration-fade (kept under reduced motion), leaving in 0.7
|
|
215
|
+
* of it. The resting transform is restated for the starting and ending styles so they do not jump
|
|
216
|
+
* off screen before the fade.
|
|
217
|
+
*/
|
|
218
|
+
@media (prefers-reduced-motion: reduce) {
|
|
219
|
+
[data-slot="drawer-backdrop"] {
|
|
220
|
+
transition: opacity var(--duration-fade) var(--ease);
|
|
221
|
+
|
|
222
|
+
&[data-ending-style],
|
|
223
|
+
&[data-ending-style][data-swipe-dismiss] {
|
|
224
|
+
transition-duration: calc(var(--duration-fade) * 0.7);
|
|
225
|
+
}
|
|
226
|
+
&[data-swiping] {
|
|
227
|
+
transition-duration: 0ms;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
[data-slot="drawer-content"] {
|
|
232
|
+
transition:
|
|
233
|
+
opacity var(--duration-fade) var(--ease),
|
|
234
|
+
transform 0s,
|
|
235
|
+
padding-bottom 0s;
|
|
236
|
+
|
|
237
|
+
&[data-starting-style],
|
|
238
|
+
&[data-ending-style] {
|
|
239
|
+
opacity: 0;
|
|
240
|
+
}
|
|
241
|
+
&[data-ending-style],
|
|
242
|
+
&[data-ending-style][data-swipe-dismiss] {
|
|
243
|
+
transition-duration: calc(var(--duration-fade) * 0.7), 0s, 0s;
|
|
244
|
+
}
|
|
245
|
+
&[data-swiping] {
|
|
246
|
+
transition-duration: 0ms;
|
|
247
|
+
}
|
|
248
|
+
&[data-side="bottom"][data-starting-style],
|
|
249
|
+
&[data-side="bottom"][data-ending-style] {
|
|
250
|
+
transform: translateY(
|
|
251
|
+
calc(var(--drawer-snap-point-offset, 0px) + var(--drawer-swipe-movement-y, 0px))
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
&[data-side="right"][data-starting-style],
|
|
255
|
+
&[data-side="right"][data-ending-style],
|
|
256
|
+
&[data-side="left"][data-starting-style],
|
|
257
|
+
&[data-side="left"][data-ending-style] {
|
|
258
|
+
transform: translateX(var(--drawer-swipe-movement-x, 0px));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
[data-slot="toast"] {
|
|
263
|
+
transition:
|
|
264
|
+
opacity var(--duration-fade) var(--ease),
|
|
265
|
+
transform 0s,
|
|
266
|
+
height 0s;
|
|
267
|
+
|
|
268
|
+
&[data-starting-style] {
|
|
269
|
+
opacity: 0;
|
|
270
|
+
}
|
|
271
|
+
/* !important: the swipe-direction exits above are more specific than any plain override. */
|
|
272
|
+
&[data-starting-style],
|
|
273
|
+
&[data-ending-style] {
|
|
274
|
+
transform: var(--toast-rest) !important;
|
|
275
|
+
}
|
|
276
|
+
&[data-ending-style] {
|
|
277
|
+
transition-duration: calc(var(--duration-fade) * 0.7), 0s, 0s;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
[data-slot="toast-content"] {
|
|
282
|
+
transition-duration: var(--duration-fade);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
198
285
|
}
|
|
199
286
|
|
|
200
287
|
/*
|
|
@@ -31,21 +31,27 @@
|
|
|
31
31
|
0 1px 3px rgb(0 0 0 / 0.18);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
/* Until a page or thumbnail is drawn, the paper carries the skeleton's sweep, in ink on paper
|
|
34
|
+
/* Until a page or thumbnail is drawn, the paper carries the skeleton's sweep, in ink on paper: a
|
|
35
|
+
half-wide highlight translated across (the page clips it), or under reduced motion a still
|
|
36
|
+
wash that breathes in opacity. */
|
|
35
37
|
[data-slot="pdf-viewer-page"]:not([data-drawn])::before,
|
|
36
38
|
[data-slot="pdf-viewer-thumbnail-page"]:not([data-drawn])::before {
|
|
37
39
|
content: "";
|
|
38
40
|
position: absolute;
|
|
39
|
-
inset: 0;
|
|
41
|
+
inset-block: 0;
|
|
42
|
+
left: 0;
|
|
43
|
+
width: 50%;
|
|
40
44
|
background-image: linear-gradient(90deg, transparent, rgb(0 0 0 / 0.05), transparent);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
animation: ep-skeleton-sweep 1.6s var(--ease) infinite;
|
|
45
|
+
translate: -100% 0;
|
|
46
|
+
animation: ep-skeleton-sweep 1.6s var(--ease-move) infinite;
|
|
47
|
+
pointer-events: none;
|
|
45
48
|
|
|
46
49
|
@media (prefers-reduced-motion: reduce) {
|
|
47
|
-
|
|
50
|
+
width: 100%;
|
|
51
|
+
translate: none;
|
|
48
52
|
background-image: none;
|
|
53
|
+
background-color: rgb(0 0 0 / 0.04);
|
|
54
|
+
animation: ep-fade-pulse 1.6s var(--ease-move) infinite alternate;
|
|
49
55
|
}
|
|
50
56
|
}
|
|
51
57
|
|
package/dist/styles/tokens.css
CHANGED
|
@@ -67,9 +67,11 @@
|
|
|
67
67
|
--control-thumb-on: #ffffff; /* thumb on a primary-filled (checked) track */
|
|
68
68
|
|
|
69
69
|
/* Internal geometry: controls nested inside a field (steppers, clear buttons, chips, addon
|
|
70
|
-
buttons). Not steps on the 30/38/46 scale — they are the field height minus its inset
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
buttons). Not steps on the 30/38/46 scale — they are the field height minus its inset, so a
|
|
71
|
+
theme that changes the heights moves them too. A theme that sets the heights on part of a page
|
|
72
|
+
sets these there as well: computed here, they follow only the heights on :root. */
|
|
73
|
+
--control-inset: calc(var(--control-h) - 8px); /* 30px inside a 38px field (3px inset + 1px border) */
|
|
74
|
+
--control-inset-sm: calc(var(--control-h-sm) - 6px); /* 24px inside a 30px dense field */
|
|
73
75
|
|
|
74
76
|
/* ── Material: fields (recessed) ──────────────────────────── */
|
|
75
77
|
--field-surface: #ffffff;
|
|
@@ -104,6 +106,11 @@
|
|
|
104
106
|
/* Overlay and screen vanish on a light ground: the page grain multiplies there instead. */
|
|
105
107
|
--page-grain-blend: multiply;
|
|
106
108
|
--page-grain-opacity: 0.1;
|
|
109
|
+
/* The page ground as one flat colour: what the grain over --background averages to. The
|
|
110
|
+
browser's own bars take it (theme-color, kept in step by themeScript and ThemeProvider), and
|
|
111
|
+
so does whatever of the page the browser shows past its edges. Re-measure when the
|
|
112
|
+
background or the grain changes. */
|
|
113
|
+
--page-tone: #f9f9f9;
|
|
107
114
|
|
|
108
115
|
/* ── Isometric illustrations (<Illustration name="iso/…">) ───────────── */
|
|
109
116
|
|
|
@@ -136,9 +143,21 @@
|
|
|
136
143
|
--gutter: 24px;
|
|
137
144
|
--section-pad: clamp(3.5rem, 7vw, 7rem);
|
|
138
145
|
|
|
139
|
-
/* ── Motion
|
|
146
|
+
/* ── Motion (docs/motion.md) ──────────────────────────────── */
|
|
147
|
+
/* Entering, leaving and colour: a strong ease-out, quick to start. */
|
|
140
148
|
--ease: cubic-bezier(0.16, 1, 0.3, 1);
|
|
149
|
+
/* What travels under the pointer's eye and lands softly: the gliding indicators, a height that
|
|
150
|
+
opens, a value that follows the pointer. A milder ease-out, so a long glide does not jump. */
|
|
151
|
+
--ease-glide: cubic-bezier(0.33, 1, 0.68, 1);
|
|
152
|
+
/* A move the interface makes from A to B on its own, and loops: ease in and out. */
|
|
153
|
+
--ease-move: cubic-bezier(0.77, 0, 0.175, 1);
|
|
141
154
|
--duration: 150ms;
|
|
155
|
+
/* Every gliding indicator, one speed. */
|
|
156
|
+
--duration-glide: calc(var(--duration) * 1.6);
|
|
157
|
+
/* Leaving is quicker than arriving. */
|
|
158
|
+
--duration-exit: calc(var(--duration) * 0.7);
|
|
159
|
+
/* Opacity and colour only: kept under reduced motion, which drops movement, not every change. */
|
|
160
|
+
--duration-fade: 150ms;
|
|
142
161
|
--duration-reveal: 420ms;
|
|
143
162
|
|
|
144
163
|
/* ── The zon mark ─────────────────────────────────────────── */
|
|
@@ -225,6 +244,7 @@
|
|
|
225
244
|
--page-glow: rgb(255 255 255 / 0.035);
|
|
226
245
|
--page-grain-blend: overlay;
|
|
227
246
|
--page-grain-opacity: calc(var(--grain-opacity) * 1.5);
|
|
247
|
+
--page-tone: #141414;
|
|
228
248
|
|
|
229
249
|
/* re-declared so var(--background) resolves inside dark regions, not at :root */
|
|
230
250
|
|
|
@@ -276,6 +296,7 @@
|
|
|
276
296
|
--page-glow: rgb(255 255 255 / 0.035);
|
|
277
297
|
--page-grain-blend: overlay;
|
|
278
298
|
--page-grain-opacity: calc(var(--grain-opacity) * 1.5);
|
|
299
|
+
--page-tone: #0f0f0f;
|
|
279
300
|
|
|
280
301
|
--logo: #f6f6f4;
|
|
281
302
|
}
|
|
@@ -285,6 +306,9 @@
|
|
|
285
306
|
:root,
|
|
286
307
|
.theme-light {
|
|
287
308
|
--duration: 0ms;
|
|
309
|
+
--duration-glide: 0ms;
|
|
310
|
+
--duration-exit: 0ms;
|
|
288
311
|
--duration-reveal: 0ms;
|
|
312
|
+
/* --duration-fade stays: a fade is not movement, and things should not pop in and out. */
|
|
289
313
|
}
|
|
290
314
|
}
|
package/dist/vite.d.ts
CHANGED
|
@@ -64,53 +64,3 @@ export declare function zonFonts(options?: {
|
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
-
/**
|
|
68
|
-
* The Licht face each of Excalidraw's drawing fonts is drawn in, by Excalidraw's font folder.
|
|
69
|
-
* Text on the canvas — and in its SVG and PNG exports — is set in Licht: Soft for normal text
|
|
70
|
-
* (the default), Serif in place of the handwriting, Mono for code, Sans for the rest.
|
|
71
|
-
*/
|
|
72
|
-
export declare const EXCALIDRAW_LICHT: Record<string, string>;
|
|
73
|
-
/**
|
|
74
|
-
* Vite helper: serves Excalidraw's fonts — for Whiteboard (`@zonsh/ui/whiteboard`) — from the
|
|
75
|
-
* app's own origin, at /excalidraw/fonts/*, instead of the CDN Excalidraw would use. In
|
|
76
|
-
* development they stream from node_modules; a build writes them beside your assets.
|
|
77
|
-
*
|
|
78
|
-
* import { excalidrawAssets, zonFonts } from "@zonsh/ui/vite";
|
|
79
|
-
* export default defineConfig({ plugins: [react(), tailwindcss(), zonFonts(), excalidrawAssets()] });
|
|
80
|
-
*
|
|
81
|
-
* Its drawing fonts are swapped for Licht (see EXCALIDRAW_LICHT): their requests go to
|
|
82
|
-
* /licht/fonts/*, the same proxy zonFonts() sets up and your host mirrors in production. Only
|
|
83
|
-
* Xiaolai, the CJK fallback, stays Excalidraw's.
|
|
84
|
-
*
|
|
85
|
-
* Pass the same folder to Whiteboard's `assetPath` (default `/excalidraw/`, plus your Vite
|
|
86
|
-
* `base` if the app is not served from the root). Only the fonts a drawing uses are downloaded.
|
|
87
|
-
*/
|
|
88
|
-
export declare function excalidrawAssets(options?: {
|
|
89
|
-
path?: string;
|
|
90
|
-
}): {
|
|
91
|
-
name: string;
|
|
92
|
-
configResolved(config: {
|
|
93
|
-
root: string;
|
|
94
|
-
}): void;
|
|
95
|
-
configureServer(server: {
|
|
96
|
-
middlewares: {
|
|
97
|
-
use: (handler: (req: {
|
|
98
|
-
url?: string;
|
|
99
|
-
}, res: {
|
|
100
|
-
setHeader: (name: string, value: string) => void;
|
|
101
|
-
statusCode: number;
|
|
102
|
-
} & NodeJS.WritableStream, next: () => void) => void) => void;
|
|
103
|
-
};
|
|
104
|
-
}): void;
|
|
105
|
-
transform(code: string, id: string): {
|
|
106
|
-
code: string;
|
|
107
|
-
map: null;
|
|
108
|
-
} | null;
|
|
109
|
-
generateBundle(this: {
|
|
110
|
-
emitFile: (file: {
|
|
111
|
-
type: "asset";
|
|
112
|
-
fileName: string;
|
|
113
|
-
source: Uint8Array;
|
|
114
|
-
}) => void;
|
|
115
|
-
}): void;
|
|
116
|
-
};
|