@nswds/ui 8.1.0 → 8.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nswds/ui",
3
- "version": "8.1.0",
3
+ "version": "8.2.0",
4
4
  "description": "UI components for NSW Government digital products, providing reusable design elements and patterns for consistent user interfaces.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/digitalnsw/nswds-ui#readme",
@@ -33,7 +33,10 @@
33
33
  "files": [
34
34
  "dist",
35
35
  "postcss.config.mjs",
36
- "src/styles/globals.css.d.ts"
36
+ "src/styles/globals.css.d.ts",
37
+ "src/styles/theme.css",
38
+ "src/styles/tailwind.css",
39
+ "src/styles/nswds-shadcn.css"
37
40
  ],
38
41
  "sideEffects": [
39
42
  "**/*.css"
@@ -45,12 +48,13 @@
45
48
  "verify:dist": "node scripts/verify-dist.mjs",
46
49
  "test": "node --test \"tests/**/*.test.mjs\"",
47
50
  "check:cascade": "node scripts/check-cascade-safety.mjs",
51
+ "check:theme-parity": "node scripts/check-theme-parity.mjs",
48
52
  "check:drift": "node scripts/check-component-drift.mjs",
49
53
  "check:radius": "node scripts/check-radius.mjs",
50
54
  "check:portal-boundary": "node scripts/check-portal-boundary.mjs",
51
55
  "check:registry-resolves": "node scripts/check-registry-resolves.mjs",
52
56
  "check:icons": "node scripts/generate-icons.mjs check",
53
- "check:package": "publint --strict && attw --pack . --profile esm-only --exclude-entrypoints ./postcss.config",
57
+ "check:package": "publint --strict && attw --pack . --profile esm-only --exclude-entrypoints ./postcss.config ./theme.css ./tailwind.css",
54
58
  "lint": "eslint --max-warnings 0",
55
59
  "registry:build": "npm run registry:validate && shadcn build registry.json --cwd . --output ../../apps/registry/public/r && node scripts/rewrite-registry-aliases.mjs ../../apps/registry/public/r && npm run check:registry-resolves",
56
60
  "registry:validate": "shadcn registry validate registry.json --cwd .",
@@ -70,7 +74,21 @@
70
74
  },
71
75
  "peerDependencies": {
72
76
  "react": "^19.0.0",
73
- "react-dom": "^19.0.0"
77
+ "react-dom": "^19.0.0",
78
+ "tailwindcss": "^4.1.18",
79
+ "@nswds/tokens": "^5.0.0",
80
+ "tw-animate-css": "^1.4.0"
81
+ },
82
+ "peerDependenciesMeta": {
83
+ "tailwindcss": {
84
+ "optional": true
85
+ },
86
+ "@nswds/tokens": {
87
+ "optional": true
88
+ },
89
+ "tw-animate-css": {
90
+ "optional": true
91
+ }
74
92
  },
75
93
  "devDependencies": {
76
94
  "@arethetypeswrong/cli": "^0.18.3",
@@ -105,6 +123,8 @@
105
123
  "types": "./src/styles/globals.css.d.ts",
106
124
  "default": "./dist/styles.css"
107
125
  },
126
+ "./theme.css": "./src/styles/theme.css",
127
+ "./tailwind.css": "./src/styles/tailwind.css",
108
128
  "./postcss.config": "./postcss.config.mjs",
109
129
  "./components/*": {
110
130
  "types": "./dist/components/*.d.ts",
@@ -0,0 +1,638 @@
1
+ /*
2
+ * nswds-shadcn.css — the custom-variant + @utility layer, owned by @nswds/ui.
3
+ *
4
+ * Adapted verbatim from the `shadcn` CLI's dist/tailwind.css (shadcn@4.8.0) and
5
+ * maintained here as our own source, so a consumer compiling the theme in their
6
+ * own Tailwind build (via `@nswds/ui/tailwind.css`) does not need the ~6.4 MB
7
+ * shadcn CLI installed just to resolve one stylesheet.
8
+ *
9
+ * Provides the data-* custom variants (data-open, data-vertical, …), no-scrollbar,
10
+ * the scroll-fade* / shimmer* utilities, and the accordion keyframes the
11
+ * components rely on.
12
+ *
13
+ * Owned as of 2026-09-22. Trimming this to only the utilities the components
14
+ * actually use is tracked as a follow-up to #207. Do NOT re-point theme.css back
15
+ * at 'shadcn/tailwind.css'.
16
+ */
17
+
18
+ @theme inline {
19
+ @keyframes accordion-down {
20
+ from {
21
+ height: 0;
22
+ }
23
+ to {
24
+ height: var(--radix-accordion-content-height, var(--accordion-panel-height, auto));
25
+ }
26
+ }
27
+
28
+ @keyframes accordion-up {
29
+ from {
30
+ height: var(--radix-accordion-content-height, var(--accordion-panel-height, auto));
31
+ }
32
+ to {
33
+ height: 0;
34
+ }
35
+ }
36
+ }
37
+
38
+ /* Custom variants */
39
+ @custom-variant data-open {
40
+ &:where([data-state='open']),
41
+ &:where([data-open]:not([data-open='false'])) {
42
+ @slot;
43
+ }
44
+ }
45
+
46
+ @custom-variant data-closed {
47
+ &:where([data-state='closed']),
48
+ &:where([data-closed]:not([data-closed='false'])) {
49
+ @slot;
50
+ }
51
+ }
52
+
53
+ @custom-variant data-checked {
54
+ &:where([data-state='checked']),
55
+ &:where([data-checked]:not([data-checked='false'])) {
56
+ @slot;
57
+ }
58
+ }
59
+
60
+ @custom-variant data-unchecked {
61
+ &:where([data-state='unchecked']),
62
+ &:where([data-unchecked]:not([data-unchecked='false'])) {
63
+ @slot;
64
+ }
65
+ }
66
+
67
+ @custom-variant data-selected {
68
+ &:where([data-selected='true']) {
69
+ @slot;
70
+ }
71
+ }
72
+
73
+ @custom-variant data-disabled {
74
+ &:where([data-disabled='true']),
75
+ &:where([data-disabled]:not([data-disabled='false'])) {
76
+ @slot;
77
+ }
78
+ }
79
+
80
+ @custom-variant data-active {
81
+ &:where([data-state='active']),
82
+ &:where([data-active]:not([data-active='false'])) {
83
+ @slot;
84
+ }
85
+ }
86
+
87
+ @custom-variant data-horizontal {
88
+ &:where([data-orientation='horizontal']) {
89
+ @slot;
90
+ }
91
+ }
92
+
93
+ @custom-variant data-vertical {
94
+ &:where([data-orientation='vertical']) {
95
+ @slot;
96
+ }
97
+ }
98
+
99
+ @utility no-scrollbar {
100
+ -ms-overflow-style: none;
101
+ scrollbar-width: none;
102
+
103
+ &::-webkit-scrollbar {
104
+ display: none;
105
+ }
106
+ }
107
+
108
+ /* scroll-fade */
109
+ @property --scroll-fade-t {
110
+ syntax: '<length-percentage>';
111
+ inherits: false;
112
+ initial-value: 0px;
113
+ }
114
+ @property --scroll-fade-b {
115
+ syntax: '<length-percentage>';
116
+ inherits: false;
117
+ initial-value: 0px;
118
+ }
119
+ @property --scroll-fade-s {
120
+ syntax: '<length-percentage>';
121
+ inherits: false;
122
+ initial-value: 0px;
123
+ }
124
+ @property --scroll-fade-e {
125
+ syntax: '<length-percentage>';
126
+ inherits: false;
127
+ initial-value: 0px;
128
+ }
129
+ @property --scroll-fade-mask {
130
+ syntax: '*';
131
+ inherits: false;
132
+ }
133
+
134
+ @theme inline {
135
+ @keyframes scroll-fade-reveal-t {
136
+ from {
137
+ --scroll-fade-t: 0px;
138
+ }
139
+ to {
140
+ --scroll-fade-t: var(
141
+ --_scroll-fade-size-t,
142
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
143
+ );
144
+ }
145
+ }
146
+ @keyframes scroll-fade-reveal-b {
147
+ from {
148
+ --scroll-fade-b: var(
149
+ --_scroll-fade-size-b,
150
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
151
+ );
152
+ }
153
+ to {
154
+ --scroll-fade-b: 0px;
155
+ }
156
+ }
157
+ @keyframes scroll-fade-reveal-s {
158
+ from {
159
+ --scroll-fade-s: 0px;
160
+ }
161
+ to {
162
+ --scroll-fade-s: var(
163
+ --_scroll-fade-size-s,
164
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
165
+ );
166
+ }
167
+ }
168
+ @keyframes scroll-fade-reveal-e {
169
+ from {
170
+ --scroll-fade-e: var(
171
+ --_scroll-fade-size-e,
172
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
173
+ );
174
+ }
175
+ to {
176
+ --scroll-fade-e: 0px;
177
+ }
178
+ }
179
+ }
180
+
181
+ @utility scroll-fade {
182
+ --_scroll-fade-size-t: var(
183
+ --scroll-fade-t-size,
184
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
185
+ );
186
+ --_scroll-fade-size-b: var(
187
+ --scroll-fade-b-size,
188
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
189
+ );
190
+ --scroll-fade-block: linear-gradient(
191
+ to bottom,
192
+ transparent 0,
193
+ #000 var(--scroll-fade-t, 0px),
194
+ #000 calc(100% - var(--scroll-fade-b, 0px)),
195
+ transparent 100%
196
+ );
197
+ -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
198
+ mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
199
+ -webkit-mask-composite: source-in;
200
+ mask-composite: intersect;
201
+ -webkit-mask-repeat: no-repeat;
202
+ mask-repeat: no-repeat;
203
+
204
+ @supports (animation-timeline: scroll()) {
205
+ animation:
206
+ scroll-fade-reveal-t 1ms ease-in-out,
207
+ scroll-fade-reveal-b 1ms ease-in-out;
208
+ animation-timeline: scroll(self y), scroll(self y);
209
+ animation-range:
210
+ 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
211
+ calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
212
+ animation-fill-mode: both;
213
+ }
214
+
215
+ @supports not (animation-timeline: scroll()) {
216
+ --scroll-fade-t: var(--_scroll-fade-size-t);
217
+ --scroll-fade-b: var(--_scroll-fade-size-b);
218
+ }
219
+ }
220
+
221
+ @utility scroll-fade-y {
222
+ --_scroll-fade-size-t: var(
223
+ --scroll-fade-t-size,
224
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
225
+ );
226
+ --_scroll-fade-size-b: var(
227
+ --scroll-fade-b-size,
228
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
229
+ );
230
+ --scroll-fade-block: linear-gradient(
231
+ to bottom,
232
+ transparent 0,
233
+ #000 var(--scroll-fade-t, 0px),
234
+ #000 calc(100% - var(--scroll-fade-b, 0px)),
235
+ transparent 100%
236
+ );
237
+ -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
238
+ mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
239
+ -webkit-mask-composite: source-in;
240
+ mask-composite: intersect;
241
+ -webkit-mask-repeat: no-repeat;
242
+ mask-repeat: no-repeat;
243
+
244
+ @supports (animation-timeline: scroll()) {
245
+ animation:
246
+ scroll-fade-reveal-t 1ms ease-in-out,
247
+ scroll-fade-reveal-b 1ms ease-in-out;
248
+ animation-timeline: scroll(self y), scroll(self y);
249
+ animation-range:
250
+ 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
251
+ calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
252
+ animation-fill-mode: both;
253
+ }
254
+
255
+ @supports not (animation-timeline: scroll()) {
256
+ --scroll-fade-t: var(--_scroll-fade-size-t);
257
+ --scroll-fade-b: var(--_scroll-fade-size-b);
258
+ }
259
+ }
260
+
261
+ @utility scroll-fade-x {
262
+ --_scroll-fade-size-s: var(
263
+ --scroll-fade-s-size,
264
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
265
+ );
266
+ --_scroll-fade-size-e: var(
267
+ --scroll-fade-e-size,
268
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
269
+ );
270
+ --scroll-fade-inline: linear-gradient(
271
+ to right,
272
+ transparent 0,
273
+ #000 var(--scroll-fade-s, 0px),
274
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
275
+ transparent 100%
276
+ );
277
+ &:where([dir='rtl'], [dir='rtl'] *) {
278
+ --scroll-fade-inline: linear-gradient(
279
+ to left,
280
+ transparent 0,
281
+ #000 var(--scroll-fade-s, 0px),
282
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
283
+ transparent 100%
284
+ );
285
+ }
286
+ -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-inline));
287
+ mask-image: var(--scroll-fade-mask, var(--scroll-fade-inline));
288
+ -webkit-mask-composite: source-in;
289
+ mask-composite: intersect;
290
+ -webkit-mask-repeat: no-repeat;
291
+ mask-repeat: no-repeat;
292
+
293
+ @supports (animation-timeline: scroll()) {
294
+ animation:
295
+ scroll-fade-reveal-s 1ms ease-in-out,
296
+ scroll-fade-reveal-e 1ms ease-in-out;
297
+ animation-timeline: scroll(self inline), scroll(self inline);
298
+ animation-range:
299
+ 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
300
+ calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
301
+ animation-fill-mode: both;
302
+ }
303
+
304
+ @supports not (animation-timeline: scroll()) {
305
+ --scroll-fade-s: var(--_scroll-fade-size-s);
306
+ --scroll-fade-e: var(--_scroll-fade-size-e);
307
+ }
308
+ }
309
+
310
+ @utility scroll-fade-t {
311
+ --_scroll-fade-size-t: var(
312
+ --scroll-fade-t-size,
313
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
314
+ );
315
+ --scroll-fade-mask: linear-gradient(
316
+ to bottom,
317
+ transparent 0,
318
+ #000 var(--scroll-fade-t, 0px),
319
+ #000 100%
320
+ );
321
+ -webkit-mask-image: var(--scroll-fade-mask);
322
+ mask-image: var(--scroll-fade-mask);
323
+ -webkit-mask-composite: source-in;
324
+ mask-composite: intersect;
325
+ -webkit-mask-repeat: no-repeat;
326
+ mask-repeat: no-repeat;
327
+
328
+ @supports (animation-timeline: scroll()) {
329
+ animation: scroll-fade-reveal-t 1ms ease-in-out;
330
+ animation-timeline: scroll(self y);
331
+ animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
332
+ animation-fill-mode: both;
333
+ }
334
+
335
+ @supports not (animation-timeline: scroll()) {
336
+ --scroll-fade-t: var(--_scroll-fade-size-t);
337
+ }
338
+ }
339
+
340
+ @utility scroll-fade-b {
341
+ --_scroll-fade-size-b: var(
342
+ --scroll-fade-b-size,
343
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
344
+ );
345
+ --scroll-fade-mask: linear-gradient(
346
+ to bottom,
347
+ #000 0,
348
+ #000 calc(100% - var(--scroll-fade-b, 0px)),
349
+ transparent 100%
350
+ );
351
+ -webkit-mask-image: var(--scroll-fade-mask);
352
+ mask-image: var(--scroll-fade-mask);
353
+ -webkit-mask-composite: source-in;
354
+ mask-composite: intersect;
355
+ -webkit-mask-repeat: no-repeat;
356
+ mask-repeat: no-repeat;
357
+
358
+ @supports (animation-timeline: scroll()) {
359
+ animation: scroll-fade-reveal-b 1ms ease-in-out;
360
+ animation-timeline: scroll(self y);
361
+ animation-range: calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
362
+ animation-fill-mode: both;
363
+ }
364
+
365
+ @supports not (animation-timeline: scroll()) {
366
+ --scroll-fade-b: var(--_scroll-fade-size-b);
367
+ }
368
+ }
369
+
370
+ @utility scroll-fade-l {
371
+ --_scroll-fade-size-s: var(
372
+ --scroll-fade-s-size,
373
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
374
+ );
375
+ --scroll-fade-mask: linear-gradient(
376
+ to right,
377
+ transparent 0,
378
+ #000 var(--scroll-fade-s, 0px),
379
+ #000 100%
380
+ );
381
+ -webkit-mask-image: var(--scroll-fade-mask);
382
+ mask-image: var(--scroll-fade-mask);
383
+ -webkit-mask-composite: source-in;
384
+ mask-composite: intersect;
385
+ -webkit-mask-repeat: no-repeat;
386
+ mask-repeat: no-repeat;
387
+
388
+ @supports (animation-timeline: scroll()) {
389
+ animation: scroll-fade-reveal-s 1ms ease-in-out;
390
+ animation-timeline: scroll(self x);
391
+ animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
392
+ animation-fill-mode: both;
393
+ }
394
+
395
+ @supports not (animation-timeline: scroll()) {
396
+ --scroll-fade-s: var(--_scroll-fade-size-s);
397
+ }
398
+ }
399
+
400
+ @utility scroll-fade-r {
401
+ --_scroll-fade-size-e: var(
402
+ --scroll-fade-e-size,
403
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
404
+ );
405
+ --scroll-fade-mask: linear-gradient(
406
+ to right,
407
+ #000 0,
408
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
409
+ transparent 100%
410
+ );
411
+ -webkit-mask-image: var(--scroll-fade-mask);
412
+ mask-image: var(--scroll-fade-mask);
413
+ -webkit-mask-composite: source-in;
414
+ mask-composite: intersect;
415
+ -webkit-mask-repeat: no-repeat;
416
+ mask-repeat: no-repeat;
417
+
418
+ @supports (animation-timeline: scroll()) {
419
+ animation: scroll-fade-reveal-e 1ms ease-in-out;
420
+ animation-timeline: scroll(self x);
421
+ animation-range: calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
422
+ animation-fill-mode: both;
423
+ }
424
+
425
+ @supports not (animation-timeline: scroll()) {
426
+ --scroll-fade-e: var(--_scroll-fade-size-e);
427
+ }
428
+ }
429
+
430
+ @utility scroll-fade-s {
431
+ --_scroll-fade-size-s: var(
432
+ --scroll-fade-s-size,
433
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
434
+ );
435
+ --scroll-fade-mask: linear-gradient(
436
+ to right,
437
+ transparent 0,
438
+ #000 var(--scroll-fade-s, 0px),
439
+ #000 100%
440
+ );
441
+ &:where([dir='rtl'], [dir='rtl'] *) {
442
+ --scroll-fade-mask: linear-gradient(
443
+ to left,
444
+ transparent 0,
445
+ #000 var(--scroll-fade-s, 0px),
446
+ #000 100%
447
+ );
448
+ }
449
+ -webkit-mask-image: var(--scroll-fade-mask);
450
+ mask-image: var(--scroll-fade-mask);
451
+ -webkit-mask-composite: source-in;
452
+ mask-composite: intersect;
453
+ -webkit-mask-repeat: no-repeat;
454
+ mask-repeat: no-repeat;
455
+
456
+ @supports (animation-timeline: scroll()) {
457
+ animation: scroll-fade-reveal-s 1ms ease-in-out;
458
+ animation-timeline: scroll(self inline);
459
+ animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
460
+ animation-fill-mode: both;
461
+ }
462
+
463
+ @supports not (animation-timeline: scroll()) {
464
+ --scroll-fade-s: var(--_scroll-fade-size-s);
465
+ }
466
+ }
467
+
468
+ @utility scroll-fade-e {
469
+ --_scroll-fade-size-e: var(
470
+ --scroll-fade-e-size,
471
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
472
+ );
473
+ --scroll-fade-mask: linear-gradient(
474
+ to right,
475
+ #000 0,
476
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
477
+ transparent 100%
478
+ );
479
+ &:where([dir='rtl'], [dir='rtl'] *) {
480
+ --scroll-fade-mask: linear-gradient(
481
+ to left,
482
+ #000 0,
483
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
484
+ transparent 100%
485
+ );
486
+ }
487
+ -webkit-mask-image: var(--scroll-fade-mask);
488
+ mask-image: var(--scroll-fade-mask);
489
+ -webkit-mask-composite: source-in;
490
+ mask-composite: intersect;
491
+ -webkit-mask-repeat: no-repeat;
492
+ mask-repeat: no-repeat;
493
+
494
+ @supports (animation-timeline: scroll()) {
495
+ animation: scroll-fade-reveal-e 1ms ease-in-out;
496
+ animation-timeline: scroll(self inline);
497
+ animation-range: calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
498
+ animation-fill-mode: both;
499
+ }
500
+
501
+ @supports not (animation-timeline: scroll()) {
502
+ --scroll-fade-e: var(--_scroll-fade-size-e);
503
+ }
504
+ }
505
+
506
+ @utility scroll-fade-* {
507
+ --scroll-fade-size: calc(var(--spacing) * --value(integer));
508
+ --scroll-fade-size: --value([length], [percentage]);
509
+ }
510
+
511
+ @utility scroll-fade-t-* {
512
+ --scroll-fade-t-size: calc(var(--spacing) * --value(integer));
513
+ --scroll-fade-t-size: --value([length], [percentage]);
514
+ }
515
+
516
+ @utility scroll-fade-b-* {
517
+ --scroll-fade-b-size: calc(var(--spacing) * --value(integer));
518
+ --scroll-fade-b-size: --value([length], [percentage]);
519
+ }
520
+
521
+ @utility scroll-fade-s-* {
522
+ --scroll-fade-s-size: calc(var(--spacing) * --value(integer));
523
+ --scroll-fade-s-size: --value([length], [percentage]);
524
+ }
525
+
526
+ @utility scroll-fade-e-* {
527
+ --scroll-fade-e-size: calc(var(--spacing) * --value(integer));
528
+ --scroll-fade-e-size: --value([length], [percentage]);
529
+ }
530
+
531
+ @utility scroll-fade-none {
532
+ --scroll-fade-mask: none;
533
+ }
534
+
535
+ /* shimmer */
536
+ @property --shimmer-angle {
537
+ syntax: '<angle>';
538
+ inherits: true;
539
+ initial-value: 20deg;
540
+ }
541
+ @property --shimmer-image {
542
+ syntax: '*';
543
+ inherits: false;
544
+ }
545
+ @property --shimmer-text-fill {
546
+ syntax: '*';
547
+ inherits: false;
548
+ }
549
+
550
+ @theme inline {
551
+ @keyframes tw-shimmer {
552
+ from {
553
+ background-position: 100% 0;
554
+ }
555
+ to {
556
+ background-position: 0 0;
557
+ }
558
+ }
559
+ }
560
+
561
+ @utility shimmer {
562
+ --_spread: var(--shimmer-spread, calc(3ch + 40px));
563
+ --_base: currentColor;
564
+ --_highlight: var(--shimmer-color, oklch(from currentColor l c h / calc(alpha* 0.2)));
565
+
566
+ background-image: var(
567
+ --shimmer-image,
568
+ linear-gradient(
569
+ calc(90deg + var(--shimmer-angle)),
570
+ var(--_base) calc(50% - var(--_spread)),
571
+ color-mix(in oklch, var(--_highlight), var(--_base) 50%) calc(50% - var(--_spread) * 0.5),
572
+ var(--_highlight) 50%,
573
+ color-mix(in oklch, var(--_highlight), var(--_base) 50%) calc(50% + var(--_spread) * 0.5),
574
+ var(--_base) calc(50% + var(--_spread))
575
+ )
576
+ );
577
+ background-repeat: no-repeat;
578
+ background-size: calc(200% + var(--_spread) * 2) 100%;
579
+ background-position: 0 0;
580
+ background-clip: text;
581
+ -webkit-background-clip: text;
582
+ -webkit-text-fill-color: var(--shimmer-text-fill, transparent);
583
+ animation: tw-shimmer var(--shimmer-duration, 2s) linear infinite;
584
+
585
+ @variant dark {
586
+ --_highlight: var(
587
+ --shimmer-color,
588
+ oklch(from currentColor max(0.8, calc(l + 0.4)) c h / calc(alpha + 0.4))
589
+ );
590
+ }
591
+
592
+ &:where([dir='rtl'], [dir='rtl'] *) {
593
+ animation-direction: reverse;
594
+ }
595
+ }
596
+
597
+ @utility shimmer-once {
598
+ animation-iteration-count: 1;
599
+ }
600
+
601
+ @utility shimmer-reverse {
602
+ animation-direction: reverse;
603
+ }
604
+
605
+ @utility shimmer-none {
606
+ --shimmer-image: none;
607
+ --shimmer-text-fill: currentColor;
608
+ }
609
+
610
+ @utility shimmer-color-* {
611
+ --shimmer-color: --value(--color, [color]);
612
+ --shimmer-color: color-mix(
613
+ in oklch,
614
+ --value(--color, [color]) calc(--modifier(integer) * 1%),
615
+ transparent
616
+ );
617
+ }
618
+
619
+ @utility shimmer-duration-* {
620
+ --shimmer-duration: calc(--value(integer) * 1ms);
621
+ }
622
+
623
+ @utility shimmer-spread-* {
624
+ --shimmer-spread: calc(var(--spacing) * --value(integer));
625
+ --shimmer-spread: --value([length], [percentage]);
626
+ }
627
+
628
+ @utility shimmer-angle-* {
629
+ --shimmer-angle: calc(--value(integer) * 1deg);
630
+ }
631
+
632
+ @media (prefers-reduced-motion: reduce) {
633
+ .shimmer {
634
+ animation: none;
635
+ background-image: none;
636
+ -webkit-text-fill-color: currentColor;
637
+ }
638
+ }