@sniptide/ui 0.8.0 → 0.9.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sniptide/ui",
3
- "version": "0.8.0",
4
- "gitHead": "656cc21517d20214ccec78c9bdf7784a2e96e0c1",
3
+ "version": "0.9.1",
4
+ "gitHead": "b5938a1868cb2e6d5500ddfcf3dc02d658e28000",
5
5
  "description": "Sniptide's React components, Tailwind CSS theme and logo, shared by the app and the website.",
6
6
  "license": "AGPL-3.0-only",
7
7
  "homepage": "https://sniptide.com",
@@ -23,7 +23,7 @@ function DropdownMenuContent({
23
23
  <MenuPrimitive.Popup
24
24
  data-slot="dropdown-menu-content"
25
25
  className={cn(
26
- "min-w-48 rounded-lg p-1 border border-border bg-popover text-popover-foreground shadow-(--float-shadow) outline-none origin-[var(--transform-origin)] transition-[scale,opacity] duration-100 data-starting-style:scale-[0.98] data-starting-style:opacity-0 data-ending-style:scale-[0.98] data-ending-style:opacity-0",
26
+ "min-w-48 max-lg:min-w-56 rounded-lg p-1 border border-border bg-popover text-popover-foreground shadow-(--float-shadow) outline-none origin-[var(--transform-origin)] transition-[scale,opacity] duration-100 data-starting-style:scale-[0.98] data-starting-style:opacity-0 data-ending-style:scale-[0.98] data-ending-style:opacity-0",
27
27
  className,
28
28
  )}
29
29
  {...props}
@@ -43,7 +43,7 @@ function DropdownMenuItem({
43
43
  data-slot="dropdown-menu-item"
44
44
  data-variant={variant}
45
45
  className={cn(
46
- "flex h-8 cursor-default items-center gap-2 rounded-md px-3 text-sm outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-muted data-[variant=destructive]:text-destructive [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",
46
+ "flex h-8 max-lg:h-11 cursor-default items-center gap-2 rounded-md px-3 text-sm max-lg:text-base outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-muted data-[variant=destructive]:text-destructive [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",
47
47
  className,
48
48
  )}
49
49
  {...props}
@@ -60,7 +60,7 @@ function DropdownMenuCheckboxItem({
60
60
  <MenuPrimitive.CheckboxItem
61
61
  data-slot="dropdown-menu-checkbox-item"
62
62
  className={cn(
63
- "flex h-8 cursor-default items-center gap-2 rounded-md pr-3 pl-2 text-sm outline-none select-none data-highlighted:bg-muted [&_svg]:size-4 [&_svg]:shrink-0",
63
+ "flex h-8 max-lg:h-11 cursor-default items-center gap-2 rounded-md pr-3 pl-2 text-sm max-lg:text-base outline-none select-none data-highlighted:bg-muted [&_svg]:size-4 [&_svg]:shrink-0",
64
64
  className,
65
65
  )}
66
66
  {...props}
@@ -82,7 +82,7 @@ function DropdownMenuRadioItem({ className, children, ...props }: MenuPrimitive.
82
82
  <MenuPrimitive.RadioItem
83
83
  data-slot="dropdown-menu-radio-item"
84
84
  className={cn(
85
- "grid h-8 cursor-default grid-cols-[1fr_1rem] items-center gap-2 rounded-md px-3 text-sm outline-none select-none data-highlighted:bg-muted",
85
+ "grid h-8 max-lg:h-11 cursor-default grid-cols-[1fr_1rem] items-center gap-2 rounded-md px-3 text-sm max-lg:text-base outline-none select-none data-highlighted:bg-muted",
86
86
  className,
87
87
  )}
88
88
  {...props}
@@ -97,7 +97,12 @@ function DropdownMenuRadioItem({ className, children, ...props }: MenuPrimitive.
97
97
 
98
98
  // A plain heading row. Use MenuPrimitive.GroupLabel inside a DropdownMenuGroup for labelled groups.
99
99
  function DropdownMenuLabel({ className, ...props }: React.ComponentProps<"div">) {
100
- return <div className={cn("px-2 py-1.5 text-xs text-muted-foreground", className)} {...props} />
100
+ return (
101
+ <div
102
+ className={cn("px-2 py-1.5 text-xs text-muted-foreground max-lg:text-[13px]", className)}
103
+ {...props}
104
+ />
105
+ )
101
106
  }
102
107
 
103
108
  // A nested menu: wrap a DropdownMenuSubTrigger and a DropdownMenuContent in DropdownMenuSub.
@@ -112,7 +117,7 @@ function DropdownMenuSubTrigger({
112
117
  <MenuPrimitive.SubmenuTrigger
113
118
  data-slot="dropdown-menu-sub-trigger"
114
119
  className={cn(
115
- "flex h-8 cursor-default items-center gap-2 rounded-md px-3 text-sm outline-none select-none data-highlighted:bg-muted data-popup-open:bg-muted [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",
120
+ "flex h-8 max-lg:h-11 cursor-default items-center gap-2 rounded-md px-3 text-sm max-lg:text-base outline-none select-none data-highlighted:bg-muted data-popup-open:bg-muted [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",
116
121
  className,
117
122
  )}
118
123
  {...props}
@@ -33,6 +33,8 @@
33
33
  --chart-5: #e8e8e8;
34
34
  --radius: 0.375rem;
35
35
  --sidebar: #fafafa;
36
+ /* The canvas of grouped phone screens, under white panels like an iOS grouped table. */
37
+ --grouped: #f4f4f4;
36
38
  --sidebar-foreground: #1b1919;
37
39
  --sidebar-primary: #2a26ec;
38
40
  --sidebar-primary-foreground: #ffffff;
@@ -106,6 +108,7 @@
106
108
  --chart-4: #6b6b6b;
107
109
  --chart-5: #2f2c2c;
108
110
  --sidebar: #0c0b0b;
111
+ --grouped: #0c0b0b;
109
112
  --sidebar-foreground: #f4f4f4;
110
113
  --sidebar-primary: #2a26ec;
111
114
  --sidebar-primary-foreground: #ffffff;
@@ -172,6 +175,7 @@
172
175
  --radius-3xl: calc(var(--radius) * 2.2);
173
176
  --radius-4xl: calc(var(--radius) * 2.6);
174
177
  --color-sidebar: var(--sidebar);
178
+ --color-grouped: var(--grouped);
175
179
  --color-sidebar-foreground: var(--sidebar-foreground);
176
180
  --color-sidebar-primary: var(--sidebar-primary);
177
181
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
@@ -1,7 +1,8 @@
1
1
  /*
2
2
  * Vendored from shadcn@4.21.0 (dist/tailwind.css) so the shadcn CLI and its dependency tree stay
3
- * out of @sniptide/ui's runtime dependencies. Update it by copying the file again after
4
- * upgrading shadcn.
3
+ * out of @sniptide/ui's runtime dependencies. Only the parts Sniptide uses are kept: the custom
4
+ * variants and the vertical `scroll-fade`. After upgrading shadcn, compare those parts with the
5
+ * new file and copy over what changed.
5
6
  *
6
7
  * MIT License
7
8
  *
@@ -38,30 +39,6 @@
38
39
  transform: translateY(-200%);
39
40
  }
40
41
  }
41
-
42
- @keyframes accordion-down {
43
- from {
44
- height: 0;
45
- }
46
- to {
47
- height: var(
48
- --radix-accordion-content-height,
49
- var(--accordion-panel-height, auto)
50
- );
51
- }
52
- }
53
-
54
- @keyframes accordion-up {
55
- from {
56
- height: var(
57
- --radix-accordion-content-height,
58
- var(--accordion-panel-height, auto)
59
- );
60
- }
61
- to {
62
- height: 0;
63
- }
64
- }
65
42
  }
66
43
 
67
44
  /* Custom variants */
@@ -125,15 +102,6 @@
125
102
  }
126
103
  }
127
104
 
128
- @utility no-scrollbar {
129
- -ms-overflow-style: none;
130
- scrollbar-width: none;
131
-
132
- &::-webkit-scrollbar {
133
- display: none;
134
- }
135
- }
136
-
137
105
  /* scroll-fade */
138
106
  @property --scroll-fade-t {
139
107
  syntax: "<length-percentage>";
@@ -145,16 +113,6 @@
145
113
  inherits: false;
146
114
  initial-value: 0px;
147
115
  }
148
- @property --scroll-fade-s {
149
- syntax: "<length-percentage>";
150
- inherits: false;
151
- initial-value: 0px;
152
- }
153
- @property --scroll-fade-e {
154
- syntax: "<length-percentage>";
155
- inherits: false;
156
- initial-value: 0px;
157
- }
158
116
  @property --scroll-fade-mask {
159
117
  syntax: "*";
160
118
  inherits: false;
@@ -177,22 +135,6 @@
177
135
  --scroll-fade-b: 0px;
178
136
  }
179
137
  }
180
- @keyframes scroll-fade-reveal-s {
181
- from {
182
- --scroll-fade-s: 0px;
183
- }
184
- to {
185
- --scroll-fade-s: var(--_scroll-fade-size-s, var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10))));
186
- }
187
- }
188
- @keyframes scroll-fade-reveal-e {
189
- from {
190
- --scroll-fade-e: var(--_scroll-fade-size-e, var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10))));
191
- }
192
- to {
193
- --scroll-fade-e: 0px;
194
- }
195
- }
196
138
  }
197
139
 
198
140
  @utility scroll-fade {
@@ -235,344 +177,6 @@
235
177
  }
236
178
  }
237
179
 
238
- @utility scroll-fade-y {
239
- --_scroll-fade-size-t: var(
240
- --scroll-fade-t-size,
241
- var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
242
- );
243
- --_scroll-fade-size-b: var(
244
- --scroll-fade-b-size,
245
- var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
246
- );
247
- --scroll-fade-block: linear-gradient(
248
- to bottom,
249
- transparent 0,
250
- #000 var(--scroll-fade-t, 0px),
251
- #000 calc(100% - var(--scroll-fade-b, 0px)),
252
- transparent 100%
253
- );
254
- -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
255
- mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
256
- -webkit-mask-composite: source-in;
257
- mask-composite: intersect;
258
- -webkit-mask-repeat: no-repeat;
259
- mask-repeat: no-repeat;
260
-
261
- @supports (animation-timeline: scroll()) {
262
- animation:
263
- scroll-fade-reveal-t 1ms ease-in-out,
264
- scroll-fade-reveal-b 1ms ease-in-out;
265
- animation-timeline: scroll(self y), scroll(self y);
266
- animation-range:
267
- 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
268
- calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
269
- animation-fill-mode: both;
270
- }
271
-
272
- @supports not (animation-timeline: scroll()) {
273
- --scroll-fade-t: var(--_scroll-fade-size-t);
274
- --scroll-fade-b: var(--_scroll-fade-size-b);
275
- }
276
- }
277
-
278
- @utility scroll-fade-x {
279
- --_scroll-fade-size-s: var(
280
- --scroll-fade-s-size,
281
- var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
282
- );
283
- --_scroll-fade-size-e: var(
284
- --scroll-fade-e-size,
285
- var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
286
- );
287
- --scroll-fade-inline: linear-gradient(
288
- to right,
289
- transparent 0,
290
- #000 var(--scroll-fade-s, 0px),
291
- #000 calc(100% - var(--scroll-fade-e, 0px)),
292
- transparent 100%
293
- );
294
- &:where([dir="rtl"], [dir="rtl"] *) {
295
- --scroll-fade-inline: linear-gradient(
296
- to left,
297
- transparent 0,
298
- #000 var(--scroll-fade-s, 0px),
299
- #000 calc(100% - var(--scroll-fade-e, 0px)),
300
- transparent 100%
301
- );
302
- }
303
- -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-inline));
304
- mask-image: var(--scroll-fade-mask, var(--scroll-fade-inline));
305
- -webkit-mask-composite: source-in;
306
- mask-composite: intersect;
307
- -webkit-mask-repeat: no-repeat;
308
- mask-repeat: no-repeat;
309
-
310
- @supports (animation-timeline: scroll()) {
311
- animation:
312
- scroll-fade-reveal-s 1ms ease-in-out,
313
- scroll-fade-reveal-e 1ms ease-in-out;
314
- animation-timeline: scroll(self inline), scroll(self inline);
315
- animation-range:
316
- 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
317
- calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
318
- animation-fill-mode: both;
319
- }
320
-
321
- @supports not (animation-timeline: scroll()) {
322
- --scroll-fade-s: var(--_scroll-fade-size-s);
323
- --scroll-fade-e: var(--_scroll-fade-size-e);
324
- }
325
- }
326
-
327
- @utility scroll-fade-t {
328
- --_scroll-fade-size-t: var(
329
- --scroll-fade-t-size,
330
- var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
331
- );
332
- --scroll-fade-mask: linear-gradient(
333
- to bottom,
334
- transparent 0,
335
- #000 var(--scroll-fade-t, 0px),
336
- #000 100%
337
- );
338
- -webkit-mask-image: var(--scroll-fade-mask);
339
- mask-image: var(--scroll-fade-mask);
340
- -webkit-mask-composite: source-in;
341
- mask-composite: intersect;
342
- -webkit-mask-repeat: no-repeat;
343
- mask-repeat: no-repeat;
344
-
345
- @supports (animation-timeline: scroll()) {
346
- animation: scroll-fade-reveal-t 1ms ease-in-out;
347
- animation-timeline: scroll(self y);
348
- animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
349
- animation-fill-mode: both;
350
- }
351
-
352
- @supports not (animation-timeline: scroll()) {
353
- --scroll-fade-t: var(--_scroll-fade-size-t);
354
- }
355
- }
356
-
357
- @utility scroll-fade-b {
358
- --_scroll-fade-size-b: var(
359
- --scroll-fade-b-size,
360
- var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
361
- );
362
- --scroll-fade-mask: linear-gradient(
363
- to bottom,
364
- #000 0,
365
- #000 calc(100% - var(--scroll-fade-b, 0px)),
366
- transparent 100%
367
- );
368
- -webkit-mask-image: var(--scroll-fade-mask);
369
- mask-image: var(--scroll-fade-mask);
370
- -webkit-mask-composite: source-in;
371
- mask-composite: intersect;
372
- -webkit-mask-repeat: no-repeat;
373
- mask-repeat: no-repeat;
374
-
375
- @supports (animation-timeline: scroll()) {
376
- animation: scroll-fade-reveal-b 1ms ease-in-out;
377
- animation-timeline: scroll(self y);
378
- animation-range: calc(
379
- 100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))
380
- )
381
- 100%;
382
- animation-fill-mode: both;
383
- }
384
-
385
- @supports not (animation-timeline: scroll()) {
386
- --scroll-fade-b: var(--_scroll-fade-size-b);
387
- }
388
- }
389
-
390
- @utility scroll-fade-l {
391
- --_scroll-fade-size-s: var(
392
- --scroll-fade-s-size,
393
- var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
394
- );
395
- --scroll-fade-mask: linear-gradient(
396
- to right,
397
- transparent 0,
398
- #000 var(--scroll-fade-s, 0px),
399
- #000 100%
400
- );
401
- -webkit-mask-image: var(--scroll-fade-mask);
402
- mask-image: var(--scroll-fade-mask);
403
- -webkit-mask-composite: source-in;
404
- mask-composite: intersect;
405
- -webkit-mask-repeat: no-repeat;
406
- mask-repeat: no-repeat;
407
-
408
- @supports (animation-timeline: scroll()) {
409
- animation: scroll-fade-reveal-s 1ms ease-in-out;
410
- animation-timeline: scroll(self x);
411
- animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
412
- animation-fill-mode: both;
413
- }
414
-
415
- @supports not (animation-timeline: scroll()) {
416
- --scroll-fade-s: var(--_scroll-fade-size-s);
417
- }
418
- }
419
-
420
- @utility scroll-fade-r {
421
- --_scroll-fade-size-e: var(
422
- --scroll-fade-e-size,
423
- var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
424
- );
425
- --scroll-fade-mask: linear-gradient(
426
- to right,
427
- #000 0,
428
- #000 calc(100% - var(--scroll-fade-e, 0px)),
429
- transparent 100%
430
- );
431
- -webkit-mask-image: var(--scroll-fade-mask);
432
- mask-image: var(--scroll-fade-mask);
433
- -webkit-mask-composite: source-in;
434
- mask-composite: intersect;
435
- -webkit-mask-repeat: no-repeat;
436
- mask-repeat: no-repeat;
437
-
438
- @supports (animation-timeline: scroll()) {
439
- animation: scroll-fade-reveal-e 1ms ease-in-out;
440
- animation-timeline: scroll(self x);
441
- animation-range: calc(
442
- 100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))
443
- )
444
- 100%;
445
- animation-fill-mode: both;
446
- }
447
-
448
- @supports not (animation-timeline: scroll()) {
449
- --scroll-fade-e: var(--_scroll-fade-size-e);
450
- }
451
- }
452
-
453
- @utility scroll-fade-s {
454
- --_scroll-fade-size-s: var(
455
- --scroll-fade-s-size,
456
- var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
457
- );
458
- --scroll-fade-mask: linear-gradient(
459
- to right,
460
- transparent 0,
461
- #000 var(--scroll-fade-s, 0px),
462
- #000 100%
463
- );
464
- &:where([dir="rtl"], [dir="rtl"] *) {
465
- --scroll-fade-mask: linear-gradient(
466
- to left,
467
- transparent 0,
468
- #000 var(--scroll-fade-s, 0px),
469
- #000 100%
470
- );
471
- }
472
- -webkit-mask-image: var(--scroll-fade-mask);
473
- mask-image: var(--scroll-fade-mask);
474
- -webkit-mask-composite: source-in;
475
- mask-composite: intersect;
476
- -webkit-mask-repeat: no-repeat;
477
- mask-repeat: no-repeat;
478
-
479
- @supports (animation-timeline: scroll()) {
480
- animation: scroll-fade-reveal-s 1ms ease-in-out;
481
- animation-timeline: scroll(self inline);
482
- animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
483
- animation-fill-mode: both;
484
- }
485
-
486
- @supports not (animation-timeline: scroll()) {
487
- --scroll-fade-s: var(--_scroll-fade-size-s);
488
- }
489
- }
490
-
491
- @utility scroll-fade-e {
492
- --_scroll-fade-size-e: var(
493
- --scroll-fade-e-size,
494
- var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
495
- );
496
- --scroll-fade-mask: linear-gradient(
497
- to right,
498
- #000 0,
499
- #000 calc(100% - var(--scroll-fade-e, 0px)),
500
- transparent 100%
501
- );
502
- &:where([dir="rtl"], [dir="rtl"] *) {
503
- --scroll-fade-mask: linear-gradient(
504
- to left,
505
- #000 0,
506
- #000 calc(100% - var(--scroll-fade-e, 0px)),
507
- transparent 100%
508
- );
509
- }
510
- -webkit-mask-image: var(--scroll-fade-mask);
511
- mask-image: var(--scroll-fade-mask);
512
- -webkit-mask-composite: source-in;
513
- mask-composite: intersect;
514
- -webkit-mask-repeat: no-repeat;
515
- mask-repeat: no-repeat;
516
-
517
- @supports (animation-timeline: scroll()) {
518
- animation: scroll-fade-reveal-e 1ms ease-in-out;
519
- animation-timeline: scroll(self inline);
520
- animation-range: calc(
521
- 100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))
522
- )
523
- 100%;
524
- animation-fill-mode: both;
525
- }
526
-
527
- @supports not (animation-timeline: scroll()) {
528
- --scroll-fade-e: var(--_scroll-fade-size-e);
529
- }
530
- }
531
-
532
- @utility scroll-fade-* {
533
- --scroll-fade-size: calc(var(--spacing) * --value(integer));
534
- --scroll-fade-size: --value([length], [percentage]);
535
- }
536
-
537
- @utility scroll-fade-t-* {
538
- --scroll-fade-t-size: calc(var(--spacing) * --value(integer));
539
- --scroll-fade-t-size: --value([length], [percentage]);
540
- }
541
-
542
- @utility scroll-fade-b-* {
543
- --scroll-fade-b-size: calc(var(--spacing) * --value(integer));
544
- --scroll-fade-b-size: --value([length], [percentage]);
545
- }
546
-
547
- @utility scroll-fade-s-* {
548
- --scroll-fade-s-size: calc(var(--spacing) * --value(integer));
549
- --scroll-fade-s-size: --value([length], [percentage]);
550
- }
551
-
552
- @utility scroll-fade-e-* {
553
- --scroll-fade-e-size: calc(var(--spacing) * --value(integer));
554
- --scroll-fade-e-size: --value([length], [percentage]);
555
- }
556
-
557
- @utility scroll-fade-none {
558
- --scroll-fade-mask: none;
559
- }
560
-
561
- /* shimmer */
562
- @property --shimmer-angle {
563
- syntax: "<angle>";
564
- inherits: true;
565
- initial-value: 20deg;
566
- }
567
- @property --shimmer-image {
568
- syntax: "*";
569
- inherits: false;
570
- }
571
- @property --shimmer-text-fill {
572
- syntax: "*";
573
- inherits: false;
574
- }
575
-
576
180
  @theme inline {
577
181
  @keyframes check-draw {
578
182
  from {
@@ -582,96 +186,16 @@
582
186
  stroke-dashoffset: 0;
583
187
  }
584
188
  }
585
- @keyframes tw-shimmer {
586
- from {
587
- background-position: 100% 0;
588
- }
589
- to {
590
- background-position: 0 0;
591
- }
592
- }
593
- }
594
-
595
- @utility shimmer {
596
- --_spread: var(--shimmer-spread, calc(3ch + 40px));
597
- --_base: currentColor;
598
- --_highlight: var(
599
- --shimmer-color,
600
- oklch(from currentColor l c h / calc(alpha* 0.2))
601
- );
602
-
603
- background-image: var(
604
- --shimmer-image,
605
- linear-gradient(
606
- calc(90deg + var(--shimmer-angle)),
607
- var(--_base) calc(50% - var(--_spread)),
608
- color-mix(in oklch, var(--_highlight), var(--_base) 50%)
609
- calc(50% - var(--_spread) * 0.5),
610
- var(--_highlight) 50%,
611
- color-mix(in oklch, var(--_highlight), var(--_base) 50%)
612
- calc(50% + var(--_spread) * 0.5),
613
- var(--_base) calc(50% + var(--_spread))
614
- )
615
- );
616
- background-repeat: no-repeat;
617
- background-size: calc(200% + var(--_spread) * 2) 100%;
618
- background-position: 0 0;
619
- background-clip: text;
620
- -webkit-background-clip: text;
621
- -webkit-text-fill-color: var(--shimmer-text-fill, transparent);
622
- animation: tw-shimmer var(--shimmer-duration, 2s) linear infinite;
623
-
624
- @variant dark {
625
- --_highlight: var(
626
- --shimmer-color,
627
- oklch(from currentColor max(0.8, calc(l + 0.4)) c h / calc(alpha + 0.4))
628
- );
629
- }
630
-
631
- &:where([dir="rtl"], [dir="rtl"] *) {
632
- animation-direction: reverse;
633
- }
634
- }
635
-
636
- @utility shimmer-once {
637
- animation-iteration-count: 1;
638
- }
639
-
640
- @utility shimmer-reverse {
641
- animation-direction: reverse;
642
- }
643
-
644
- @utility shimmer-none {
645
- --shimmer-image: none;
646
- --shimmer-text-fill: currentColor;
647
189
  }
648
190
 
649
- @utility shimmer-color-* {
650
- --shimmer-color: --value(--color, [color]);
651
- --shimmer-color: color-mix(
652
- in oklch,
653
- --value(--color, [color]) calc(--modifier(integer) * 1%),
654
- transparent
655
- );
656
- }
657
-
658
- @utility shimmer-duration-* {
659
- --shimmer-duration: calc(--value(integer) * 1ms);
660
- }
661
-
662
- @utility shimmer-spread-* {
663
- --shimmer-spread: calc(var(--spacing) * --value(integer));
664
- --shimmer-spread: --value([length], [percentage]);
665
- }
666
-
667
- @utility shimmer-angle-* {
668
- --shimmer-angle: calc(--value(integer) * 1deg);
669
- }
191
+ /* The phone's sticky top bars: content scrolling under them shows through a blurred tint of the
192
+ canvas, like an iOS navigation bar. Grouped screens tint with the grouped canvas. */
193
+ @utility bar-translucent {
194
+ background-color: color-mix(in oklab, var(--background) 80%, transparent);
195
+ -webkit-backdrop-filter: blur(20px) saturate(1.8);
196
+ backdrop-filter: blur(20px) saturate(1.8);
670
197
 
671
- @media (prefers-reduced-motion: reduce) {
672
- .shimmer {
673
- animation: none;
674
- background-image: none;
675
- -webkit-text-fill-color: currentColor;
198
+ :root:has([data-grouped]) & {
199
+ background-color: color-mix(in oklab, var(--grouped) 80%, transparent);
676
200
  }
677
201
  }