@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.
Files changed (200) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +19 -13
  3. package/dist/components/accordion.js +1 -1
  4. package/dist/components/alert-dialog.js +1 -1
  5. package/dist/components/ascii-field.d.ts +1 -1
  6. package/dist/components/ascii-field.js +2 -1
  7. package/dist/components/bottom-nav.d.ts +86 -0
  8. package/dist/components/bottom-nav.js +175 -0
  9. package/dist/components/breadcrumb.d.ts +9 -0
  10. package/dist/components/breadcrumb.js +6 -1
  11. package/dist/components/button-group.d.ts +1 -1
  12. package/dist/components/button-group.js +2 -2
  13. package/dist/components/button.js +1 -1
  14. package/dist/components/calendar.d.ts +1 -1
  15. package/dist/components/calendar.js +18 -3
  16. package/dist/components/carousel.d.ts +22 -3
  17. package/dist/components/carousel.js +25 -7
  18. package/dist/components/chart.d.ts +20 -0
  19. package/dist/components/chart.js +52 -3
  20. package/dist/components/code-block.d.ts +20 -10
  21. package/dist/components/code-block.js +54 -12
  22. package/dist/components/collapsible.js +3 -3
  23. package/dist/components/color-picker.d.ts +30 -8
  24. package/dist/components/color-picker.js +48 -27
  25. package/dist/components/combobox.d.ts +21 -3
  26. package/dist/components/combobox.js +79 -7
  27. package/dist/components/command.d.ts +23 -3
  28. package/dist/components/command.js +63 -18
  29. package/dist/components/conversation.d.ts +10 -1
  30. package/dist/components/conversation.js +24 -7
  31. package/dist/components/copy-button.d.ts +15 -6
  32. package/dist/components/copy-button.js +27 -10
  33. package/dist/components/data-table.d.ts +66 -6
  34. package/dist/components/data-table.js +376 -23
  35. package/dist/components/date-picker.d.ts +73 -4
  36. package/dist/components/date-picker.js +138 -7
  37. package/dist/components/dialog.d.ts +10 -1
  38. package/dist/components/dialog.js +6 -3
  39. package/dist/components/drawer.d.ts +10 -1
  40. package/dist/components/drawer.js +6 -3
  41. package/dist/components/feature-list.js +2 -2
  42. package/dist/components/field.d.ts +27 -8
  43. package/dist/components/field.js +49 -4
  44. package/dist/components/file-drop.d.ts +26 -4
  45. package/dist/components/file-drop.js +125 -64
  46. package/dist/components/filter-bar.d.ts +50 -3
  47. package/dist/components/filter-bar.js +71 -33
  48. package/dist/components/form.d.ts +4 -2
  49. package/dist/components/form.js +24 -2
  50. package/dist/components/graph.d.ts +41 -0
  51. package/dist/components/graph.js +106 -50
  52. package/dist/components/illustration.js +51 -4
  53. package/dist/components/input-group.d.ts +18 -7
  54. package/dist/components/input-group.js +41 -19
  55. package/dist/components/input.d.ts +2 -2
  56. package/dist/components/input.js +3 -3
  57. package/dist/components/kbd.d.ts +17 -0
  58. package/dist/components/kbd.js +8 -1
  59. package/dist/components/layout.d.ts +2 -1
  60. package/dist/components/layout.js +55 -11
  61. package/dist/components/lightbox.d.ts +100 -0
  62. package/dist/components/lightbox.js +457 -0
  63. package/dist/components/locale.d.ts +44 -0
  64. package/dist/components/locale.js +37 -0
  65. package/dist/components/logo.js +1 -1
  66. package/dist/components/menu.js +3 -1
  67. package/dist/components/menubar.js +60 -13
  68. package/dist/components/message.d.ts +3 -3
  69. package/dist/components/message.js +12 -8
  70. package/dist/components/meter.js +3 -1
  71. package/dist/components/money-input.d.ts +80 -0
  72. package/dist/components/money-input.js +253 -0
  73. package/dist/components/navigation-menu.js +4 -2
  74. package/dist/components/number-field.d.ts +21 -2
  75. package/dist/components/number-field.js +53 -28
  76. package/dist/components/otp-field.d.ts +14 -1
  77. package/dist/components/otp-field.js +10 -2
  78. package/dist/components/pagination.d.ts +13 -7
  79. package/dist/components/pagination.js +18 -7
  80. package/dist/components/pdf-viewer.d.ts +67 -2
  81. package/dist/components/pdf-viewer.js +88 -21
  82. package/dist/components/phone-input.d.ts +79 -0
  83. package/dist/components/phone-input.js +282 -0
  84. package/dist/components/popover.js +1 -1
  85. package/dist/components/progress.js +3 -1
  86. package/dist/components/prompt-input.d.ts +34 -9
  87. package/dist/components/prompt-input.js +37 -17
  88. package/dist/components/radio-group.js +7 -2
  89. package/dist/components/rating.d.ts +73 -0
  90. package/dist/components/rating.js +124 -0
  91. package/dist/components/reasoning.d.ts +16 -1
  92. package/dist/components/reasoning.js +10 -7
  93. package/dist/components/resizable.d.ts +10 -1
  94. package/dist/components/resizable.js +4 -1
  95. package/dist/components/response.d.ts +17 -5
  96. package/dist/components/response.js +58 -18
  97. package/dist/components/scroll-area.d.ts +1 -1
  98. package/dist/components/select.js +14 -3
  99. package/dist/components/separator.js +1 -1
  100. package/dist/components/sidebar.d.ts +20 -4
  101. package/dist/components/sidebar.js +70 -35
  102. package/dist/components/site-header.d.ts +46 -12
  103. package/dist/components/site-header.js +78 -19
  104. package/dist/components/skeleton.d.ts +1 -1
  105. package/dist/components/skeleton.js +1 -1
  106. package/dist/components/slider.js +3 -1
  107. package/dist/components/sortable.d.ts +178 -0
  108. package/dist/components/sortable.js +1282 -0
  109. package/dist/components/sources.d.ts +17 -2
  110. package/dist/components/sources.js +11 -4
  111. package/dist/components/spinner.d.ts +13 -1
  112. package/dist/components/spinner.js +5 -2
  113. package/dist/components/stat.d.ts +91 -0
  114. package/dist/components/stat.js +141 -0
  115. package/dist/components/stepper.d.ts +71 -0
  116. package/dist/components/stepper.js +101 -0
  117. package/dist/components/switch.d.ts +2 -2
  118. package/dist/components/switch.js +2 -2
  119. package/dist/components/table.d.ts +13 -3
  120. package/dist/components/table.js +231 -41
  121. package/dist/components/tabs.js +8 -4
  122. package/dist/components/tags-input.d.ts +18 -2
  123. package/dist/components/tags-input.js +66 -34
  124. package/dist/components/theme.d.ts +16 -2
  125. package/dist/components/theme.js +34 -8
  126. package/dist/components/time-field.d.ts +24 -4
  127. package/dist/components/time-field.js +32 -9
  128. package/dist/components/timeline.d.ts +18 -2
  129. package/dist/components/timeline.js +13 -4
  130. package/dist/components/tippy.d.ts +48 -0
  131. package/dist/components/tippy.js +648 -0
  132. package/dist/components/toast.d.ts +18 -2
  133. package/dist/components/toast.js +12 -3
  134. package/dist/components/toggle-group.js +1 -0
  135. package/dist/components/tool-call.d.ts +19 -8
  136. package/dist/components/tool-call.js +23 -7
  137. package/dist/components/toolbar.d.ts +1 -1
  138. package/dist/components/toolbar.js +10 -2
  139. package/dist/components/tooltip.d.ts +4 -2
  140. package/dist/components/tooltip.js +10 -4
  141. package/dist/components/tour.d.ts +127 -0
  142. package/dist/components/tour.js +673 -0
  143. package/dist/components/tree.js +45 -9
  144. package/dist/components/video-player.d.ts +10 -2
  145. package/dist/components/video-player.js +134 -38
  146. package/dist/illustration.d.ts +2 -0
  147. package/dist/illustration.js +7 -0
  148. package/dist/index.d.ts +11 -3
  149. package/dist/index.js +11 -3
  150. package/dist/lib/code-highlight.d.ts +3 -16
  151. package/dist/lib/code-highlight.js +160 -10
  152. package/dist/lib/code-theme.js +3 -3
  153. package/dist/lib/digit-roll.js +8 -8
  154. package/dist/lib/field-errors.d.ts +28 -0
  155. package/dist/lib/field-errors.js +24 -0
  156. package/dist/lib/field-value.d.ts +13 -0
  157. package/dist/lib/field-value.js +44 -0
  158. package/dist/lib/glide.d.ts +5 -4
  159. package/dist/lib/glide.js +5 -4
  160. package/dist/lib/graph-layout.js +11 -2
  161. package/dist/lib/money.d.ts +73 -0
  162. package/dist/lib/money.js +343 -0
  163. package/dist/lib/phone-countries.d.ts +1 -0
  164. package/dist/lib/phone-countries.js +281 -0
  165. package/dist/lib/phone.d.ts +90 -0
  166. package/dist/lib/phone.js +286 -0
  167. package/dist/lib/platform.d.ts +8 -3
  168. package/dist/lib/platform.js +13 -6
  169. package/dist/lib/row-index.d.ts +15 -0
  170. package/dist/lib/row-index.js +136 -0
  171. package/dist/lib/table-fit.d.ts +3 -2
  172. package/dist/lib/table-fit.js +52 -23
  173. package/dist/lib/theme-script.d.ts +15 -2
  174. package/dist/lib/theme-script.js +23 -3
  175. package/dist/lib/tippy/pixels.d.ts +47 -0
  176. package/dist/lib/tippy/pixels.js +187 -0
  177. package/dist/lib/tippy/sprite.d.ts +86 -0
  178. package/dist/lib/tippy/sprite.js +753 -0
  179. package/dist/messages/de.d.ts +12 -0
  180. package/dist/messages/de.js +326 -0
  181. package/dist/styles/expressive.css +60 -26
  182. package/dist/styles/index.css +11 -2
  183. package/dist/styles/material.css +47 -23
  184. package/dist/styles/parts/ai.css +4 -2
  185. package/dist/styles/parts/controls.css +85 -32
  186. package/dist/styles/parts/data.css +33 -5
  187. package/dist/styles/parts/feedback.css +110 -13
  188. package/dist/styles/parts/foundations.css +1 -1
  189. package/dist/styles/parts/navigation.css +230 -5
  190. package/dist/styles/parts/overlays.css +98 -11
  191. package/dist/styles/parts/pdf.css +13 -7
  192. package/dist/styles/tokens.css +28 -4
  193. package/dist/vite.d.ts +0 -50
  194. package/dist/vite.js +0 -100
  195. package/package.json +28 -33
  196. package/dist/components/code-highlight.d.ts +0 -13
  197. package/dist/components/code-highlight.js +0 -107
  198. package/dist/components/whiteboard.d.ts +0 -80
  199. package/dist/components/whiteboard.js +0 -389
  200. package/dist/styles/parts/whiteboard.css +0 -855
@@ -71,7 +71,7 @@
71
71
  }
72
72
  :is([data-slot="checkbox-indicator"], [data-slot="menu-checkbox-indicator"])[data-ending-style] svg {
73
73
  transition-duration: var(--check-undraw);
74
- transition-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
74
+ transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
75
75
  }
76
76
 
77
77
  /* ── Menu: a trigger's down chevron turns up while its menu is open ───────────────────── */
@@ -83,20 +83,22 @@
83
83
  }
84
84
 
85
85
  /* ── Switch: the thumb stretches, then slides ────────────────────────────────
86
- * Hover stretches the thumb from 18 to 22px, a press to 25px, toward the side it will travel.
86
+ * A press stretches the thumb from 18 to 25px, toward the side it will travel. Hover leaves it
87
+ * alone: a stretch is the start of the toggle, and pointing at a switch is not flipping it.
87
88
  * Checked, it sits against the far edge: the track's inner width (34px) minus its own width,
88
89
  * so it stays flush while it stretches.
89
90
  *
90
91
  * Two registered values move, not width and position: the stretch (--thumb-w) and how far on
91
92
  * the switch is (--thumb-on, 0 to 1), each in 2 × --duration. Width and offset are worked out
92
- * from them every frame, both in layout, so the far edge cannot drift — two separate
93
- * transitions fell out of step whenever one was reversed mid-way (hover out, release). */
93
+ * from them every frame, so the far edge cannot drift — two separate transitions fell out of
94
+ * step whenever one was reversed mid-way (hover out, release). Only the stretch is layout; the
95
+ * travel is a translate, mirrored on a right-to-left page, where the thumb starts at the right. */
94
96
  [data-slot="switch-thumb"] {
95
97
  --thumb-w: 18px;
96
98
  --thumb-on: 0;
97
99
  width: var(--thumb-w);
98
100
  height: 18px;
99
- margin-inline-start: calc((34px - var(--thumb-w)) * var(--thumb-on));
101
+ translate: calc((34px - var(--thumb-w)) * var(--thumb-on)) 0;
100
102
  transition:
101
103
  --thumb-w calc(var(--duration) * 2) var(--ease),
102
104
  --thumb-on calc(var(--duration) * 2) var(--ease),
@@ -106,10 +108,8 @@
106
108
  [data-slot="switch-thumb"][data-checked] {
107
109
  --thumb-on: 1;
108
110
  }
109
- @media (hover: hover) {
110
- [data-slot="switch"]:not([data-disabled], [data-readonly]):hover > [data-slot="switch-thumb"] {
111
- --thumb-w: 22px;
112
- }
111
+ [data-slot="switch-thumb"]:dir(rtl) {
112
+ translate: calc((34px - var(--thumb-w)) * var(--thumb-on) * -1) 0;
113
113
  }
114
114
  [data-slot="switch"]:not([data-disabled], [data-readonly]):active > [data-slot="switch-thumb"] {
115
115
  --thumb-w: 25px;
@@ -118,7 +118,7 @@
118
118
  /* ── Button group: how neighbours meet ───────────────────────────────────────
119
119
  * Fields (real borders) overlap by a pixel so their borders merge into one line. Buttons draw
120
120
  * their edge as an outer ring plus inner highlights, which doubled up at the join — a heavy bar
121
- * on a split primary, and the right half seeming to sit on the left. So a joined button trims
121
+ * on a split primary, and the second half seeming to sit on the first. So a joined button trims
122
122
  * 1px of its inner side (ring and highlight with it), the two meet exactly, and the later one
123
123
  * draws a single 1px seam: the edge colour on raised buttons, a soft line on the primary. A
124
124
  * focused or open control drops the trim so its outline and ring show whole. */
@@ -135,7 +135,7 @@
135
135
  )
136
136
  )
137
137
  ) {
138
- margin-left: -1px;
138
+ margin-inline-start: -1px;
139
139
  }
140
140
  [data-slot="button-group"][data-orientation="vertical"]
141
141
  > :not(
@@ -165,7 +165,7 @@
165
165
  )
166
166
  )
167
167
  ) {
168
- margin-left: -2px;
168
+ margin-inline-start: -2px;
169
169
  }
170
170
  [data-slot="button-group"][data-orientation="vertical"]
171
171
  > [data-variant]:not(
@@ -256,6 +256,56 @@
256
256
  ) {
257
257
  clip-path: inset(-16px 1px);
258
258
  }
259
+ /* Right to left the first control is on the right, so the trims swap sides (clip-path has no
260
+ logical form). Not :dir(rtl), which the CSS build lowers to a list of languages (see the Badge). */
261
+ [data-slot="button-group"][data-orientation="horizontal"]:where([dir="rtl"], [dir="rtl"] *)
262
+ > [data-variant]:nth-child(
263
+ 1
264
+ of
265
+ :not(
266
+ [data-base-ui-focus-guard],
267
+ span[aria-owns],
268
+ [data-slot="button-group-separator"],
269
+ [data-slot="copy-button-status"]
270
+ )
271
+ ):not(
272
+ :nth-last-child(
273
+ 1
274
+ of
275
+ :not(
276
+ [data-base-ui-focus-guard],
277
+ span[aria-owns],
278
+ [data-slot="button-group-separator"],
279
+ [data-slot="copy-button-status"]
280
+ )
281
+ )
282
+ ) {
283
+ clip-path: inset(-16px -16px -16px 1px);
284
+ }
285
+ [data-slot="button-group"][data-orientation="horizontal"]:where([dir="rtl"], [dir="rtl"] *)
286
+ > [data-variant]:nth-last-child(
287
+ 1
288
+ of
289
+ :not(
290
+ [data-base-ui-focus-guard],
291
+ span[aria-owns],
292
+ [data-slot="button-group-separator"],
293
+ [data-slot="copy-button-status"]
294
+ )
295
+ ):not(
296
+ :nth-child(
297
+ 1
298
+ of
299
+ :not(
300
+ [data-base-ui-focus-guard],
301
+ span[aria-owns],
302
+ [data-slot="button-group-separator"],
303
+ [data-slot="copy-button-status"]
304
+ )
305
+ )
306
+ ) {
307
+ clip-path: inset(-16px 1px -16px -16px);
308
+ }
259
309
  [data-slot="button-group"][data-orientation="vertical"]
260
310
  > [data-variant]:nth-child(
261
311
  1
@@ -381,7 +431,7 @@
381
431
  )::after {
382
432
  top: -1px;
383
433
  bottom: -1px;
384
- left: 0;
434
+ inset-inline-start: 0;
385
435
  width: 1px;
386
436
  }
387
437
  [data-slot="button-group"][data-orientation="vertical"]
@@ -443,7 +493,8 @@
443
493
 
444
494
  /* ── Button, collapsible: the label folds away to leave the icon ─────────────────────────
445
495
  * Like a revealing toggle-group segment: the label is a one-column grid that narrows to 0fr
446
- * with its text clipped, on 2 × --duration, and fades on --duration. The icon–label gap
496
+ * with its text clipped, on 2 × --duration (an expandable button: --expand-time), and fades on
497
+ * --duration. The icon–label gap
447
498
  * travels inside it (a pseudo-element on the icon's side), so nothing of it is left. The
448
499
  * first decision, before the first paint, is drawn without motion (data-collapse-instant; the
449
500
  * button's own transitions are switched off by a utility in Button, above the material). */
@@ -452,8 +503,8 @@
452
503
  grid-template-columns: 1fr;
453
504
  align-items: center;
454
505
  transition:
455
- grid-template-columns calc(var(--duration) * 2) var(--ease),
456
- opacity var(--duration) var(--ease);
506
+ grid-template-columns var(--expand-time, calc(var(--duration) * 2)) var(--ease),
507
+ opacity var(--expand-fade, var(--duration)) var(--ease);
457
508
  }
458
509
  [data-slot="button-label"] > span {
459
510
  display: flex;
@@ -473,7 +524,7 @@
473
524
  }
474
525
  /* An expandable button is the fold in reverse: folded at rest, open on hover or keyboard
475
526
  focus. Touch screens have no hover, so there it stays an icon. */
476
- @media (hover: hover) {
527
+ @media (hover: hover) and (pointer: fine) {
477
528
  [data-slot="button"][data-expandable="label"]:hover > [data-slot="button-label"] {
478
529
  grid-template-columns: 1fr;
479
530
  opacity: 1;
@@ -484,19 +535,18 @@
484
535
  opacity: 1;
485
536
  }
486
537
  /* Hover intent: an expandable button opens once the pointer rests on it (70ms), so passing over
487
- it on the way somewhere does nothing, and stays open a moment after it leaves (140ms), so
488
- the button the pointer is heading for does not move away under it. Keyboard focus and
489
- reduced motion are immediate. */
538
+ it on the way somewhere does nothing, and stays open a moment after it leaves (70ms), so the
539
+ button the pointer is heading for does not move away under it. It unfolds in 1.5 × --duration,
540
+ so the whole of it stays under 300ms. Keyboard focus unfolds it at once (a keyboard action
541
+ never animates), and reduced motion has no delay. */
490
542
  [data-slot="button"][data-expandable] {
491
- --expand-delay: 140ms;
492
- }
493
- @media (hover: hover) {
494
- [data-slot="button"][data-expandable]:hover {
495
- --expand-delay: 70ms;
496
- }
543
+ --expand-delay: 70ms;
544
+ --expand-time: calc(var(--duration) * 1.5);
497
545
  }
498
546
  [data-slot="button"][data-expandable]:focus-visible {
499
547
  --expand-delay: 0s;
548
+ --expand-time: 0s;
549
+ --expand-fade: 0s;
500
550
  }
501
551
  @media (prefers-reduced-motion: reduce) {
502
552
  [data-slot="button"][data-expandable] {
@@ -515,8 +565,8 @@
515
565
  grid-template-columns: 1fr;
516
566
  align-items: center;
517
567
  transition:
518
- grid-template-columns calc(var(--duration) * 2) var(--ease),
519
- opacity var(--duration) var(--ease);
568
+ grid-template-columns var(--expand-time, calc(var(--duration) * 2)) var(--ease),
569
+ opacity var(--expand-fade, var(--duration)) var(--ease);
520
570
  }
521
571
  [data-slot="button-icon"] > span {
522
572
  display: flex;
@@ -534,7 +584,7 @@
534
584
  grid-template-columns: 0fr;
535
585
  opacity: 0;
536
586
  }
537
- @media (hover: hover) {
587
+ @media (hover: hover) and (pointer: fine) {
538
588
  [data-slot="button"][data-expandable="icon"]:hover > [data-slot="button-icon"] {
539
589
  grid-template-columns: 1fr;
540
590
  opacity: 1;
@@ -590,10 +640,13 @@
590
640
  bottom: var(--badge-inset);
591
641
  translate: 50% 50%;
592
642
  }
593
- [data-slot="badge-anchor"]:dir(rtl) > [data-slot="badge"] {
643
+ /* Not :dir(rtl): the CSS build lowers it to a list of right-to-left languages, which misses a
644
+ page set right to left by its dir attribute alone. */
645
+ [data-slot="badge-anchor"]:where([dir="rtl"], [dir="rtl"] *) > [data-slot="badge"] {
594
646
  translate: -50% -50%;
595
647
  }
596
- [data-slot="badge-anchor"][data-placement="bottom-end"]:dir(rtl) > [data-slot="badge"] {
648
+ [data-slot="badge-anchor"][data-placement="bottom-end"]:where([dir="rtl"], [dir="rtl"] *)
649
+ > [data-slot="badge"] {
597
650
  translate: -50% 50%;
598
651
  }
599
652
  }
@@ -674,7 +727,7 @@
674
727
  }
675
728
 
676
729
  /* An expandable Button opens to its size's padding and corners on hover or keyboard focus. */
677
- @media (hover: hover) {
730
+ @media (hover: hover) and (pointer: fine) {
678
731
  [data-slot="button"][data-expandable="label"][data-collapsed]:hover {
679
732
  padding-inline: var(--expanded-pad, 1rem);
680
733
  border-radius: var(--radius-button);
@@ -8,10 +8,11 @@
8
8
  */
9
9
  @layer components {
10
10
  [data-slot="chart"] {
11
- /* What follows the pointer — the cursor, the active dot, the tooltip — glides on a softer
12
- ease-out than --ease: that curve covers most of the way in the first frame, so a move
13
- across the chart read as a jump and then a slow settle. 0 under reduced motion. */
14
- --chart-glide: calc(var(--duration) * 1.2) cubic-bezier(0.33, 1, 0.68, 1);
11
+ /* What follows the pointer — the cursor, the active dot, the tooltip — glides on
12
+ --ease-glide, a softer ease-out than --ease: that curve covers most of the way in the first
13
+ frame, so a move across the chart read as a jump and then a slow settle. 0 under reduced
14
+ motion. */
15
+ --chart-glide: calc(var(--duration) * 1.2) var(--ease-glide);
15
16
 
16
17
  /* Axes and ticks */
17
18
  & .recharts-cartesian-axis-tick-value,
@@ -120,7 +121,7 @@
120
121
  /* Tooltip follows the pointer with the cursor (0 under reduced motion). */
121
122
  & .recharts-tooltip-wrapper {
122
123
  transition-duration: calc(var(--duration) * 1.2) !important;
123
- transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1) !important;
124
+ transition-timing-function: var(--ease-glide) !important;
124
125
  z-index: 10;
125
126
  }
126
127
 
@@ -220,3 +221,30 @@ tbody[data-slot="table-sizer"] > tr {
220
221
  > [data-slot="data-table-search"] {
221
222
  min-width: 0;
222
223
  }
224
+
225
+ /*
226
+ * Sortable: the copy under the pointer is lifted as it is picked up — 2% larger, its shadows (a
227
+ * part's shadow-overlay, its material's own) coming in with it — and set down to its size as it
228
+ * lands. Unlayered, so it outranks the copy's own transition utilities: the copy does not slide
229
+ * or recolour, it only lifts. The overlay itself is moved by inline styles, so the lift is its
230
+ * child's. Under reduced motion it is simply lifted.
231
+ */
232
+ [data-slot="sortable-overlay"] * {
233
+ transition:
234
+ scale var(--duration) var(--ease),
235
+ box-shadow var(--duration) var(--ease);
236
+
237
+ @starting-style {
238
+ box-shadow: none;
239
+ }
240
+ }
241
+ [data-slot="sortable-overlay"] > * {
242
+ scale: 1.02;
243
+
244
+ @starting-style {
245
+ scale: 1;
246
+ }
247
+ }
248
+ [data-slot="sortable-overlay"][data-phase="settle"] > * {
249
+ scale: 1;
250
+ }
@@ -3,40 +3,67 @@
3
3
  @layer components {
4
4
  /* ── Skeleton ─────────────────────────────────────────────────────────────
5
5
  * A --control-surface block with one soft highlight sweeping across it every 1.6s.
6
- * The sweep is a 50%-wide gradient image moved from fully left to fully right; it runs
7
- * the other way in RTL. Static under prefers-reduced-motion. */
6
+ * The sweep is a half-wide gradient on ::after, translated from fully left to fully right
7
+ * (transform only: no repaint each frame) on --ease-move; it runs the other way in RTL.
8
+ * Under prefers-reduced-motion nothing travels: the block breathes in opacity instead. */
8
9
 
9
10
  [data-slot="skeleton"] {
11
+ position: relative;
12
+ overflow: hidden;
10
13
  background-color: var(--control-surface);
11
- background-image: linear-gradient(90deg, transparent, var(--control-highlight), transparent);
12
- background-repeat: no-repeat;
13
- background-size: 50% 100%;
14
- background-position: -100% 0;
15
14
  box-shadow: inset 0 0 0 1px var(--control-inner-edge);
16
- animation: ep-skeleton-sweep 1.6s var(--ease) infinite;
17
15
 
18
- &:dir(rtl) {
16
+ &::after {
17
+ content: "";
18
+ position: absolute;
19
+ inset-block: 0;
20
+ left: 0;
21
+ width: 50%;
22
+ background-image: linear-gradient(90deg, transparent, var(--control-highlight), transparent);
23
+ translate: -100% 0;
24
+ animation: ep-skeleton-sweep 1.6s var(--ease-move) infinite;
25
+ pointer-events: none;
26
+ }
27
+
28
+ /* Not :dir(rtl), which the CSS build lowers to a list of languages (see the Badge). */
29
+ &:where([dir="rtl"], [dir="rtl"] *)::after {
19
30
  animation-direction: reverse;
20
31
  }
21
32
  @media (prefers-reduced-motion: reduce) {
22
- animation: none;
23
- background-image: none;
33
+ animation: ep-fade-pulse 1.6s var(--ease-move) infinite alternate;
34
+
35
+ &::after {
36
+ content: none;
37
+ }
24
38
  }
25
39
  }
26
40
 
41
+ /* From fully before the box (-100% of the half-wide highlight) to fully past it (200%), in
42
+ physical left-to-right terms (the highlight sits at the left edge); RTL plays it reversed. */
27
43
  @keyframes ep-skeleton-sweep {
28
44
  from {
29
- background-position: -100% 0;
45
+ translate: -100% 0;
46
+ }
47
+ to {
48
+ translate: 200% 0;
49
+ }
50
+ }
51
+
52
+ /* The reduced-motion stand-in for a sweep or a shimmer: a slow, gentle breath in opacity. */
53
+ @keyframes ep-fade-pulse {
54
+ from {
55
+ opacity: 1;
30
56
  }
31
57
  to {
32
- background-position: 200% 0;
58
+ opacity: 0.55;
33
59
  }
34
60
  }
35
61
 
36
62
  /* ── Spinner ──────────────────────────────────────────────────────────────
37
63
  * Every face is CSS-driven: no JavaScript, identical on the server. Parts animate transform
38
64
  * and opacity only (the arc also animates its dash, on a 24-unit SVG). Each part's resting
39
- * style is its reduced-motion pose, so `animation: none` leaves a meaningful still. */
65
+ * style is its reduced-motion pose, so `animation: none` leaves a meaningful still, which
66
+ * breathes in opacity so it still reads as busy. */
40
67
 
41
68
  [data-slot="spinner"] [data-part] {
42
69
  transform-box: fill-box;
@@ -269,5 +296,75 @@
269
296
  [data-slot="spinner"] [data-slot="spinner-art"] {
270
297
  animation: none;
271
298
  }
299
+ /* Still, but not frozen: a pause would read as a hang. Opacity is not movement. */
300
+ [data-slot="spinner"] {
301
+ animation: ep-fade-pulse 0.8s var(--ease-move) infinite alternate;
302
+ }
303
+ }
304
+
305
+ /* ── Stepper ──────────────────────────────────────────────────────────────
306
+ * The connector's fill is a transition in stepper.tsx; these are the markers of the step whose
307
+ * status changed last (data-changed): a finished step's check pops in, an error's "!" shakes
308
+ * once, and the new current step settles as the line reaches it. A vertical stepper's content
309
+ * slides in, all of it within 300ms. The durations are 0 under reduced motion, so every state is
310
+ * simply there. */
311
+
312
+ [data-slot="stepper-marker"][data-changed][data-status="complete"] > svg {
313
+ animation: ep-stepper-pop calc(var(--duration) * 1.3) cubic-bezier(0.34, 1.56, 0.64, 1) both;
314
+ }
315
+ [data-slot="stepper-marker"][data-changed][data-status="error"] > span {
316
+ animation: ep-stepper-shake calc(var(--duration) * 1.6) var(--ease) both;
317
+ }
318
+ /* Settles as the line arrives: 120ms in, done at 300ms. */
319
+ [data-slot="stepper-marker"][data-changed][data-status="current"] {
320
+ animation: ep-stepper-arrive calc(var(--duration) * 1.2) cubic-bezier(0.34, 1.56, 0.64, 1)
321
+ calc(var(--duration) * 0.8) both;
322
+ }
323
+ [data-slot="stepper-content"][data-changed] {
324
+ animation: ep-stepper-content calc(var(--duration) * 1.6) var(--ease) calc(var(--duration) * 0.4) both;
325
+ }
326
+
327
+ @keyframes ep-stepper-pop {
328
+ from {
329
+ opacity: 0;
330
+ scale: 0.3;
331
+ }
332
+ to {
333
+ opacity: 1;
334
+ scale: 1;
335
+ }
336
+ }
337
+ @keyframes ep-stepper-shake {
338
+ 0%,
339
+ 100% {
340
+ translate: 0;
341
+ }
342
+ 25% {
343
+ translate: -2px;
344
+ }
345
+ 50% {
346
+ translate: 2px;
347
+ }
348
+ 75% {
349
+ translate: -1px;
350
+ }
351
+ }
352
+ @keyframes ep-stepper-arrive {
353
+ from {
354
+ scale: 0.8;
355
+ }
356
+ to {
357
+ scale: 1;
358
+ }
359
+ }
360
+ @keyframes ep-stepper-content {
361
+ from {
362
+ opacity: 0;
363
+ translate: 0 -4px;
364
+ }
365
+ to {
366
+ opacity: 1;
367
+ translate: 0;
368
+ }
272
369
  }
273
370
  }
@@ -140,7 +140,7 @@
140
140
  }
141
141
 
142
142
  /*
143
- * CodeBlock's syntax colours (with `highlight`, inside CodeHighlightProvider). The zon code theme
143
+ * CodeBlock's syntax colours (a block with a `language`). The zon code theme
144
144
  * names these properties instead of colours, so it follows light, dark and a forced local theme:
145
145
  * they are set on the block (and on Shiki's own `pre.shiki` output), where the tones resolve. One tone per kind of token; comments and
146
146
  * punctuation recede to the greys; added and removed diff lines take the status colours. Each is