@robomous/ui-core 0.1.1 → 0.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.
Files changed (135) hide show
  1. package/README.md +15 -7
  2. package/dist/{primitives → components}/alert.js +1 -1
  3. package/dist/{primitives → components}/badge.js +1 -1
  4. package/dist/{primitives → components}/button.d.ts +1 -1
  5. package/dist/{primitives → components}/button.js +4 -1
  6. package/dist/{primitives → components}/card.d.ts +1 -1
  7. package/dist/{primitives → components}/card.js +2 -2
  8. package/dist/{primitives → components}/combobox.js +3 -3
  9. package/dist/{primitives → components}/dialog.js +1 -1
  10. package/dist/{primitives → components}/dropdown-menu.js +11 -6
  11. package/dist/{primitives → components}/field.js +2 -4
  12. package/dist/{primitives → components}/input-group.js +1 -1
  13. package/dist/{primitives → components}/input.js +1 -1
  14. package/dist/{primitives → components}/label.js +1 -1
  15. package/dist/components/progress.js +7 -0
  16. package/dist/{primitives → components}/select.d.ts +3 -1
  17. package/dist/{primitives → components}/select.js +6 -4
  18. package/dist/{primitives → components}/separator.js +1 -1
  19. package/dist/{primitives → components}/sheet.js +1 -1
  20. package/dist/{primitives → components}/skeleton.js +1 -1
  21. package/dist/{primitives → components}/sonner.js +17 -12
  22. package/dist/{primitives → components}/table.d.ts +1 -1
  23. package/dist/{primitives → components}/table.js +3 -3
  24. package/dist/{primitives → components}/tabs.js +1 -1
  25. package/dist/{primitives → components}/textarea.js +1 -1
  26. package/dist/{primitives → components}/tooltip.js +1 -1
  27. package/dist/gates/index.d.ts +28 -0
  28. package/dist/gates/index.js +142 -0
  29. package/dist/index.d.ts +31 -32
  30. package/dist/index.js +32 -33
  31. package/dist/{tokens.d.ts → theme/tokens.d.ts} +5 -5
  32. package/dist/{tokens.js → theme/tokens.js} +12 -12
  33. package/package.json +23 -12
  34. package/{shadcn → src/components}/alert.tsx +14 -21
  35. package/src/{primitives → components}/badge.tsx +15 -21
  36. package/src/{primitives → components}/button.tsx +13 -10
  37. package/{shadcn → src/components}/card.tsx +16 -31
  38. package/src/{primitives → components}/combobox.test.tsx +15 -2
  39. package/src/{primitives → components}/combobox.tsx +45 -74
  40. package/src/{primitives/primitives.test.tsx → components/components.test.tsx} +106 -69
  41. package/src/{primitives → components}/dialog.tsx +31 -54
  42. package/src/{primitives → components}/dropdown-menu.tsx +51 -65
  43. package/src/{primitives → components}/field.tsx +48 -62
  44. package/src/{primitives → components}/input-group.tsx +37 -49
  45. package/{shadcn → src/components}/input.tsx +5 -5
  46. package/{shadcn → src/components}/label.tsx +7 -10
  47. package/src/{primitives → components}/progress.tsx +7 -6
  48. package/{shadcn → src/components}/select.tsx +39 -41
  49. package/{shadcn → src/components}/separator.tsx +7 -7
  50. package/src/{primitives → components}/sheet.tsx +27 -44
  51. package/{shadcn → src/components}/skeleton.tsx +3 -3
  52. package/src/{primitives → components}/sonner.test.tsx +12 -4
  53. package/src/components/sonner.tsx +67 -0
  54. package/{shadcn → src/components}/table.tsx +17 -44
  55. package/{shadcn → src/components}/tabs.tsx +16 -26
  56. package/{shadcn → src/components}/textarea.tsx +5 -5
  57. package/{shadcn → src/components}/tooltip.tsx +12 -16
  58. package/src/gates/design.test.ts +188 -0
  59. package/src/gates/index.test.ts +11 -0
  60. package/src/gates/index.ts +165 -0
  61. package/src/gates/tokens.test.ts +215 -0
  62. package/src/harness.test.tsx +1 -1
  63. package/src/index.ts +63 -33
  64. package/src/theme/imports.test.ts +160 -0
  65. package/src/{statusTone.test.ts → theme/statusTone.test.ts} +5 -1
  66. package/src/{styles.css → theme/styles.css} +45 -31
  67. package/src/theme/tailwind.css +646 -0
  68. package/src/{tokens.test.ts → theme/tokens.test.ts} +30 -23
  69. package/src/{tokens.ts → theme/tokens.ts} +12 -12
  70. package/components.json +0 -13
  71. package/dist/lib/button.d.ts +0 -1
  72. package/dist/lib/button.js +0 -4
  73. package/dist/lib/cn.d.ts +0 -18
  74. package/dist/lib/cn.js +0 -21
  75. package/dist/lib/menu.d.ts +0 -1
  76. package/dist/lib/menu.js +0 -16
  77. package/dist/lib/progress.d.ts +0 -3
  78. package/dist/lib/progress.js +0 -6
  79. package/dist/lib/select.d.ts +0 -1
  80. package/dist/lib/select.js +0 -3
  81. package/dist/primitives/progress.js +0 -7
  82. package/gates/canonical.test.mjs +0 -71
  83. package/gates/extensions.test.mjs +0 -373
  84. package/gates/index.d.mts +0 -51
  85. package/gates/index.mjs +0 -514
  86. package/gates/tokens.test.mjs +0 -276
  87. package/shadcn/README.md +0 -13
  88. package/shadcn/badge.tsx +0 -49
  89. package/shadcn/button.tsx +0 -67
  90. package/shadcn/combobox.tsx +0 -299
  91. package/shadcn/dialog.tsx +0 -166
  92. package/shadcn/dropdown-menu.tsx +0 -267
  93. package/shadcn/field.tsx +0 -236
  94. package/shadcn/input-group.tsx +0 -154
  95. package/shadcn/progress.tsx +0 -29
  96. package/shadcn/sheet.tsx +0 -145
  97. package/shadcn/sonner.tsx +0 -49
  98. package/src/lib/button.ts +0 -4
  99. package/src/lib/cn.test.ts +0 -33
  100. package/src/lib/cn.ts +0 -23
  101. package/src/lib/menu.ts +0 -16
  102. package/src/lib/progress.ts +0 -6
  103. package/src/lib/select.ts +0 -4
  104. package/src/primitives/alert.tsx +0 -76
  105. package/src/primitives/card.tsx +0 -103
  106. package/src/primitives/input.tsx +0 -19
  107. package/src/primitives/label.tsx +0 -22
  108. package/src/primitives/select.tsx +0 -192
  109. package/src/primitives/separator.tsx +0 -28
  110. package/src/primitives/skeleton.tsx +0 -13
  111. package/src/primitives/sonner.tsx +0 -65
  112. package/src/primitives/table.tsx +0 -114
  113. package/src/primitives/tabs.tsx +0 -88
  114. package/src/primitives/textarea.tsx +0 -18
  115. package/src/primitives/tooltip.tsx +0 -57
  116. /package/dist/{primitives → components}/alert.d.ts +0 -0
  117. /package/dist/{primitives → components}/badge.d.ts +0 -0
  118. /package/dist/{primitives → components}/combobox.d.ts +0 -0
  119. /package/dist/{primitives → components}/dialog.d.ts +0 -0
  120. /package/dist/{primitives → components}/dropdown-menu.d.ts +0 -0
  121. /package/dist/{primitives → components}/field.d.ts +0 -0
  122. /package/dist/{primitives → components}/input-group.d.ts +0 -0
  123. /package/dist/{primitives → components}/input.d.ts +0 -0
  124. /package/dist/{primitives → components}/label.d.ts +0 -0
  125. /package/dist/{primitives → components}/progress.d.ts +0 -0
  126. /package/dist/{primitives → components}/separator.d.ts +0 -0
  127. /package/dist/{primitives → components}/sheet.d.ts +0 -0
  128. /package/dist/{primitives → components}/skeleton.d.ts +0 -0
  129. /package/dist/{primitives → components}/sonner.d.ts +0 -0
  130. /package/dist/{primitives → components}/tabs.d.ts +0 -0
  131. /package/dist/{primitives → components}/textarea.d.ts +0 -0
  132. /package/dist/{primitives → components}/tooltip.d.ts +0 -0
  133. /package/dist/{statusTone.d.ts → theme/statusTone.d.ts} +0 -0
  134. /package/dist/{statusTone.js → theme/statusTone.js} +0 -0
  135. /package/src/{statusTone.ts → theme/statusTone.ts} +0 -0
@@ -0,0 +1,646 @@
1
+ /*
2
+ * The variant and utility layer `styles.css` imports, ahead of the token
3
+ * blocks. Everything here has to exist before a component's class string can
4
+ * name it.
5
+ *
6
+ * **The `data-*` custom variants are the load-bearing part** — `data-open`,
7
+ * `data-closed`, `data-active`, `data-checked`, `data-unchecked`,
8
+ * `data-selected`, `data-disabled`, `data-horizontal`, `data-vertical`. Each
9
+ * one matches *both* spellings a behaviour library might emit: the
10
+ * `[data-state="open"]` attribute Radix and Base UI actually set, and a bare
11
+ * `[data-open]`. Declaring them is not a convenience. Tailwind reads `data-open:`
12
+ * as its own shorthand for the bare attribute alone, so without these it would
13
+ * still emit a rule for every one of them — a rule that never matches the
14
+ * markup. Every open, closed, active and disabled state style in this package
15
+ * resolves through this file, and losing it is invisible: the CSS compiles, the
16
+ * build passes, and the components simply stop reacting.
17
+ *
18
+ * The rest is the scroll-mask, shimmer and `no-scrollbar` utilities, with the
19
+ * `@property` declarations that make their custom properties animatable.
20
+ *
21
+ * The stylesheet ships as **source**, so this file ships beside it under
22
+ * `files: ["src"]`. `imports.test.ts` holds it to both halves of that: it
23
+ * exists, and it is committed.
24
+ */
25
+
26
+ @theme inline {
27
+ @keyframes accordion-down {
28
+ from {
29
+ height: 0;
30
+ }
31
+ to {
32
+ height: var(--radix-accordion-content-height, var(--accordion-panel-height, auto));
33
+ }
34
+ }
35
+
36
+ @keyframes accordion-up {
37
+ from {
38
+ height: var(--radix-accordion-content-height, var(--accordion-panel-height, auto));
39
+ }
40
+ to {
41
+ height: 0;
42
+ }
43
+ }
44
+ }
45
+
46
+ /* Custom variants */
47
+ @custom-variant data-open {
48
+ &:where([data-state="open"]),
49
+ &:where([data-open]:not([data-open="false"])) {
50
+ @slot;
51
+ }
52
+ }
53
+
54
+ @custom-variant data-closed {
55
+ &:where([data-state="closed"]),
56
+ &:where([data-closed]:not([data-closed="false"])) {
57
+ @slot;
58
+ }
59
+ }
60
+
61
+ @custom-variant data-checked {
62
+ &:where([data-state="checked"]),
63
+ &:where([data-checked]:not([data-checked="false"])) {
64
+ @slot;
65
+ }
66
+ }
67
+
68
+ @custom-variant data-unchecked {
69
+ &:where([data-state="unchecked"]),
70
+ &:where([data-unchecked]:not([data-unchecked="false"])) {
71
+ @slot;
72
+ }
73
+ }
74
+
75
+ @custom-variant data-selected {
76
+ &:where([data-selected="true"]) {
77
+ @slot;
78
+ }
79
+ }
80
+
81
+ @custom-variant data-disabled {
82
+ &:where([data-disabled="true"]),
83
+ &:where([data-disabled]:not([data-disabled="false"])) {
84
+ @slot;
85
+ }
86
+ }
87
+
88
+ @custom-variant data-active {
89
+ &:where([data-state="active"]),
90
+ &:where([data-active]:not([data-active="false"])) {
91
+ @slot;
92
+ }
93
+ }
94
+
95
+ @custom-variant data-horizontal {
96
+ &:where([data-orientation="horizontal"]) {
97
+ @slot;
98
+ }
99
+ }
100
+
101
+ @custom-variant data-vertical {
102
+ &:where([data-orientation="vertical"]) {
103
+ @slot;
104
+ }
105
+ }
106
+
107
+ @utility no-scrollbar {
108
+ -ms-overflow-style: none;
109
+ scrollbar-width: none;
110
+
111
+ &::-webkit-scrollbar {
112
+ display: none;
113
+ }
114
+ }
115
+
116
+ /* scroll-fade */
117
+ @property --scroll-fade-t {
118
+ syntax: "<length-percentage>";
119
+ inherits: false;
120
+ initial-value: 0px;
121
+ }
122
+ @property --scroll-fade-b {
123
+ syntax: "<length-percentage>";
124
+ inherits: false;
125
+ initial-value: 0px;
126
+ }
127
+ @property --scroll-fade-s {
128
+ syntax: "<length-percentage>";
129
+ inherits: false;
130
+ initial-value: 0px;
131
+ }
132
+ @property --scroll-fade-e {
133
+ syntax: "<length-percentage>";
134
+ inherits: false;
135
+ initial-value: 0px;
136
+ }
137
+ @property --scroll-fade-mask {
138
+ syntax: "*";
139
+ inherits: false;
140
+ }
141
+
142
+ @theme inline {
143
+ @keyframes scroll-fade-reveal-t {
144
+ from {
145
+ --scroll-fade-t: 0px;
146
+ }
147
+ to {
148
+ --scroll-fade-t: var(
149
+ --_scroll-fade-size-t,
150
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
151
+ );
152
+ }
153
+ }
154
+ @keyframes scroll-fade-reveal-b {
155
+ from {
156
+ --scroll-fade-b: var(
157
+ --_scroll-fade-size-b,
158
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
159
+ );
160
+ }
161
+ to {
162
+ --scroll-fade-b: 0px;
163
+ }
164
+ }
165
+ @keyframes scroll-fade-reveal-s {
166
+ from {
167
+ --scroll-fade-s: 0px;
168
+ }
169
+ to {
170
+ --scroll-fade-s: var(
171
+ --_scroll-fade-size-s,
172
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
173
+ );
174
+ }
175
+ }
176
+ @keyframes scroll-fade-reveal-e {
177
+ from {
178
+ --scroll-fade-e: var(
179
+ --_scroll-fade-size-e,
180
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
181
+ );
182
+ }
183
+ to {
184
+ --scroll-fade-e: 0px;
185
+ }
186
+ }
187
+ }
188
+
189
+ @utility scroll-fade {
190
+ --_scroll-fade-size-t: var(
191
+ --scroll-fade-t-size,
192
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
193
+ );
194
+ --_scroll-fade-size-b: var(
195
+ --scroll-fade-b-size,
196
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
197
+ );
198
+ --scroll-fade-block: linear-gradient(
199
+ to bottom,
200
+ transparent 0,
201
+ #000 var(--scroll-fade-t, 0px),
202
+ #000 calc(100% - var(--scroll-fade-b, 0px)),
203
+ transparent 100%
204
+ );
205
+ -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
206
+ mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
207
+ -webkit-mask-composite: source-in;
208
+ mask-composite: intersect;
209
+ -webkit-mask-repeat: no-repeat;
210
+ mask-repeat: no-repeat;
211
+
212
+ @supports (animation-timeline: scroll()) {
213
+ animation:
214
+ scroll-fade-reveal-t 1ms ease-in-out,
215
+ scroll-fade-reveal-b 1ms ease-in-out;
216
+ animation-timeline: scroll(self y), scroll(self y);
217
+ animation-range:
218
+ 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
219
+ calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
220
+ animation-fill-mode: both;
221
+ }
222
+
223
+ @supports not (animation-timeline: scroll()) {
224
+ --scroll-fade-t: var(--_scroll-fade-size-t);
225
+ --scroll-fade-b: var(--_scroll-fade-size-b);
226
+ }
227
+ }
228
+
229
+ @utility scroll-fade-y {
230
+ --_scroll-fade-size-t: var(
231
+ --scroll-fade-t-size,
232
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
233
+ );
234
+ --_scroll-fade-size-b: var(
235
+ --scroll-fade-b-size,
236
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
237
+ );
238
+ --scroll-fade-block: linear-gradient(
239
+ to bottom,
240
+ transparent 0,
241
+ #000 var(--scroll-fade-t, 0px),
242
+ #000 calc(100% - var(--scroll-fade-b, 0px)),
243
+ transparent 100%
244
+ );
245
+ -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
246
+ mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
247
+ -webkit-mask-composite: source-in;
248
+ mask-composite: intersect;
249
+ -webkit-mask-repeat: no-repeat;
250
+ mask-repeat: no-repeat;
251
+
252
+ @supports (animation-timeline: scroll()) {
253
+ animation:
254
+ scroll-fade-reveal-t 1ms ease-in-out,
255
+ scroll-fade-reveal-b 1ms ease-in-out;
256
+ animation-timeline: scroll(self y), scroll(self y);
257
+ animation-range:
258
+ 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
259
+ calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
260
+ animation-fill-mode: both;
261
+ }
262
+
263
+ @supports not (animation-timeline: scroll()) {
264
+ --scroll-fade-t: var(--_scroll-fade-size-t);
265
+ --scroll-fade-b: var(--_scroll-fade-size-b);
266
+ }
267
+ }
268
+
269
+ @utility scroll-fade-x {
270
+ --_scroll-fade-size-s: var(
271
+ --scroll-fade-s-size,
272
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
273
+ );
274
+ --_scroll-fade-size-e: var(
275
+ --scroll-fade-e-size,
276
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
277
+ );
278
+ --scroll-fade-inline: linear-gradient(
279
+ to right,
280
+ transparent 0,
281
+ #000 var(--scroll-fade-s, 0px),
282
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
283
+ transparent 100%
284
+ );
285
+ &:where([dir="rtl"], [dir="rtl"] *) {
286
+ --scroll-fade-inline: linear-gradient(
287
+ to left,
288
+ transparent 0,
289
+ #000 var(--scroll-fade-s, 0px),
290
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
291
+ transparent 100%
292
+ );
293
+ }
294
+ -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-inline));
295
+ mask-image: var(--scroll-fade-mask, var(--scroll-fade-inline));
296
+ -webkit-mask-composite: source-in;
297
+ mask-composite: intersect;
298
+ -webkit-mask-repeat: no-repeat;
299
+ mask-repeat: no-repeat;
300
+
301
+ @supports (animation-timeline: scroll()) {
302
+ animation:
303
+ scroll-fade-reveal-s 1ms ease-in-out,
304
+ scroll-fade-reveal-e 1ms ease-in-out;
305
+ animation-timeline: scroll(self inline), scroll(self inline);
306
+ animation-range:
307
+ 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
308
+ calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
309
+ animation-fill-mode: both;
310
+ }
311
+
312
+ @supports not (animation-timeline: scroll()) {
313
+ --scroll-fade-s: var(--_scroll-fade-size-s);
314
+ --scroll-fade-e: var(--_scroll-fade-size-e);
315
+ }
316
+ }
317
+
318
+ @utility scroll-fade-t {
319
+ --_scroll-fade-size-t: var(
320
+ --scroll-fade-t-size,
321
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
322
+ );
323
+ --scroll-fade-mask: linear-gradient(
324
+ to bottom,
325
+ transparent 0,
326
+ #000 var(--scroll-fade-t, 0px),
327
+ #000 100%
328
+ );
329
+ -webkit-mask-image: var(--scroll-fade-mask);
330
+ mask-image: var(--scroll-fade-mask);
331
+ -webkit-mask-composite: source-in;
332
+ mask-composite: intersect;
333
+ -webkit-mask-repeat: no-repeat;
334
+ mask-repeat: no-repeat;
335
+
336
+ @supports (animation-timeline: scroll()) {
337
+ animation: scroll-fade-reveal-t 1ms ease-in-out;
338
+ animation-timeline: scroll(self y);
339
+ animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
340
+ animation-fill-mode: both;
341
+ }
342
+
343
+ @supports not (animation-timeline: scroll()) {
344
+ --scroll-fade-t: var(--_scroll-fade-size-t);
345
+ }
346
+ }
347
+
348
+ @utility scroll-fade-b {
349
+ --_scroll-fade-size-b: var(
350
+ --scroll-fade-b-size,
351
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
352
+ );
353
+ --scroll-fade-mask: linear-gradient(
354
+ to bottom,
355
+ #000 0,
356
+ #000 calc(100% - var(--scroll-fade-b, 0px)),
357
+ transparent 100%
358
+ );
359
+ -webkit-mask-image: var(--scroll-fade-mask);
360
+ mask-image: var(--scroll-fade-mask);
361
+ -webkit-mask-composite: source-in;
362
+ mask-composite: intersect;
363
+ -webkit-mask-repeat: no-repeat;
364
+ mask-repeat: no-repeat;
365
+
366
+ @supports (animation-timeline: scroll()) {
367
+ animation: scroll-fade-reveal-b 1ms ease-in-out;
368
+ animation-timeline: scroll(self y);
369
+ animation-range: calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
370
+ animation-fill-mode: both;
371
+ }
372
+
373
+ @supports not (animation-timeline: scroll()) {
374
+ --scroll-fade-b: var(--_scroll-fade-size-b);
375
+ }
376
+ }
377
+
378
+ @utility scroll-fade-l {
379
+ --_scroll-fade-size-s: var(
380
+ --scroll-fade-s-size,
381
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
382
+ );
383
+ --scroll-fade-mask: linear-gradient(
384
+ to right,
385
+ transparent 0,
386
+ #000 var(--scroll-fade-s, 0px),
387
+ #000 100%
388
+ );
389
+ -webkit-mask-image: var(--scroll-fade-mask);
390
+ mask-image: var(--scroll-fade-mask);
391
+ -webkit-mask-composite: source-in;
392
+ mask-composite: intersect;
393
+ -webkit-mask-repeat: no-repeat;
394
+ mask-repeat: no-repeat;
395
+
396
+ @supports (animation-timeline: scroll()) {
397
+ animation: scroll-fade-reveal-s 1ms ease-in-out;
398
+ animation-timeline: scroll(self x);
399
+ animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
400
+ animation-fill-mode: both;
401
+ }
402
+
403
+ @supports not (animation-timeline: scroll()) {
404
+ --scroll-fade-s: var(--_scroll-fade-size-s);
405
+ }
406
+ }
407
+
408
+ @utility scroll-fade-r {
409
+ --_scroll-fade-size-e: var(
410
+ --scroll-fade-e-size,
411
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
412
+ );
413
+ --scroll-fade-mask: linear-gradient(
414
+ to right,
415
+ #000 0,
416
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
417
+ transparent 100%
418
+ );
419
+ -webkit-mask-image: var(--scroll-fade-mask);
420
+ mask-image: var(--scroll-fade-mask);
421
+ -webkit-mask-composite: source-in;
422
+ mask-composite: intersect;
423
+ -webkit-mask-repeat: no-repeat;
424
+ mask-repeat: no-repeat;
425
+
426
+ @supports (animation-timeline: scroll()) {
427
+ animation: scroll-fade-reveal-e 1ms ease-in-out;
428
+ animation-timeline: scroll(self x);
429
+ animation-range: calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
430
+ animation-fill-mode: both;
431
+ }
432
+
433
+ @supports not (animation-timeline: scroll()) {
434
+ --scroll-fade-e: var(--_scroll-fade-size-e);
435
+ }
436
+ }
437
+
438
+ @utility scroll-fade-s {
439
+ --_scroll-fade-size-s: var(
440
+ --scroll-fade-s-size,
441
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
442
+ );
443
+ --scroll-fade-mask: linear-gradient(
444
+ to right,
445
+ transparent 0,
446
+ #000 var(--scroll-fade-s, 0px),
447
+ #000 100%
448
+ );
449
+ &:where([dir="rtl"], [dir="rtl"] *) {
450
+ --scroll-fade-mask: linear-gradient(
451
+ to left,
452
+ transparent 0,
453
+ #000 var(--scroll-fade-s, 0px),
454
+ #000 100%
455
+ );
456
+ }
457
+ -webkit-mask-image: var(--scroll-fade-mask);
458
+ mask-image: var(--scroll-fade-mask);
459
+ -webkit-mask-composite: source-in;
460
+ mask-composite: intersect;
461
+ -webkit-mask-repeat: no-repeat;
462
+ mask-repeat: no-repeat;
463
+
464
+ @supports (animation-timeline: scroll()) {
465
+ animation: scroll-fade-reveal-s 1ms ease-in-out;
466
+ animation-timeline: scroll(self inline);
467
+ animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
468
+ animation-fill-mode: both;
469
+ }
470
+
471
+ @supports not (animation-timeline: scroll()) {
472
+ --scroll-fade-s: var(--_scroll-fade-size-s);
473
+ }
474
+ }
475
+
476
+ @utility scroll-fade-e {
477
+ --_scroll-fade-size-e: var(
478
+ --scroll-fade-e-size,
479
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
480
+ );
481
+ --scroll-fade-mask: linear-gradient(
482
+ to right,
483
+ #000 0,
484
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
485
+ transparent 100%
486
+ );
487
+ &:where([dir="rtl"], [dir="rtl"] *) {
488
+ --scroll-fade-mask: linear-gradient(
489
+ to left,
490
+ #000 0,
491
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
492
+ transparent 100%
493
+ );
494
+ }
495
+ -webkit-mask-image: var(--scroll-fade-mask);
496
+ mask-image: var(--scroll-fade-mask);
497
+ -webkit-mask-composite: source-in;
498
+ mask-composite: intersect;
499
+ -webkit-mask-repeat: no-repeat;
500
+ mask-repeat: no-repeat;
501
+
502
+ @supports (animation-timeline: scroll()) {
503
+ animation: scroll-fade-reveal-e 1ms ease-in-out;
504
+ animation-timeline: scroll(self inline);
505
+ animation-range: calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
506
+ animation-fill-mode: both;
507
+ }
508
+
509
+ @supports not (animation-timeline: scroll()) {
510
+ --scroll-fade-e: var(--_scroll-fade-size-e);
511
+ }
512
+ }
513
+
514
+ @utility scroll-fade-* {
515
+ --scroll-fade-size: calc(var(--spacing) * --value(integer));
516
+ --scroll-fade-size: --value([length], [percentage]);
517
+ }
518
+
519
+ @utility scroll-fade-t-* {
520
+ --scroll-fade-t-size: calc(var(--spacing) * --value(integer));
521
+ --scroll-fade-t-size: --value([length], [percentage]);
522
+ }
523
+
524
+ @utility scroll-fade-b-* {
525
+ --scroll-fade-b-size: calc(var(--spacing) * --value(integer));
526
+ --scroll-fade-b-size: --value([length], [percentage]);
527
+ }
528
+
529
+ @utility scroll-fade-s-* {
530
+ --scroll-fade-s-size: calc(var(--spacing) * --value(integer));
531
+ --scroll-fade-s-size: --value([length], [percentage]);
532
+ }
533
+
534
+ @utility scroll-fade-e-* {
535
+ --scroll-fade-e-size: calc(var(--spacing) * --value(integer));
536
+ --scroll-fade-e-size: --value([length], [percentage]);
537
+ }
538
+
539
+ @utility scroll-fade-none {
540
+ --scroll-fade-mask: none;
541
+ }
542
+
543
+ /* shimmer */
544
+ @property --shimmer-angle {
545
+ syntax: "<angle>";
546
+ inherits: true;
547
+ initial-value: 20deg;
548
+ }
549
+ @property --shimmer-image {
550
+ syntax: "*";
551
+ inherits: false;
552
+ }
553
+ @property --shimmer-text-fill {
554
+ syntax: "*";
555
+ inherits: false;
556
+ }
557
+
558
+ @theme inline {
559
+ @keyframes tw-shimmer {
560
+ from {
561
+ background-position: 100% 0;
562
+ }
563
+ to {
564
+ background-position: 0 0;
565
+ }
566
+ }
567
+ }
568
+
569
+ @utility shimmer {
570
+ --_spread: var(--shimmer-spread, calc(3ch + 40px));
571
+ --_base: currentColor;
572
+ --_highlight: var(--shimmer-color, oklch(from currentColor l c h / calc(alpha* 0.2)));
573
+
574
+ background-image: var(
575
+ --shimmer-image,
576
+ linear-gradient(
577
+ calc(90deg + var(--shimmer-angle)),
578
+ var(--_base) calc(50% - var(--_spread)),
579
+ color-mix(in oklch, var(--_highlight), var(--_base) 50%) calc(50% - var(--_spread) * 0.5),
580
+ var(--_highlight) 50%,
581
+ color-mix(in oklch, var(--_highlight), var(--_base) 50%) calc(50% + var(--_spread) * 0.5),
582
+ var(--_base) calc(50% + var(--_spread))
583
+ )
584
+ );
585
+ background-repeat: no-repeat;
586
+ background-size: calc(200% + var(--_spread) * 2) 100%;
587
+ background-position: 0 0;
588
+ background-clip: text;
589
+ -webkit-background-clip: text;
590
+ -webkit-text-fill-color: var(--shimmer-text-fill, transparent);
591
+ animation: tw-shimmer var(--shimmer-duration, 2s) linear infinite;
592
+
593
+ @variant dark {
594
+ --_highlight: var(
595
+ --shimmer-color,
596
+ oklch(from currentColor max(0.8, calc(l + 0.4)) c h / calc(alpha + 0.4))
597
+ );
598
+ }
599
+
600
+ &:where([dir="rtl"], [dir="rtl"] *) {
601
+ animation-direction: reverse;
602
+ }
603
+ }
604
+
605
+ @utility shimmer-once {
606
+ animation-iteration-count: 1;
607
+ }
608
+
609
+ @utility shimmer-reverse {
610
+ animation-direction: reverse;
611
+ }
612
+
613
+ @utility shimmer-none {
614
+ --shimmer-image: none;
615
+ --shimmer-text-fill: currentColor;
616
+ }
617
+
618
+ @utility shimmer-color-* {
619
+ --shimmer-color: --value(--color, [color]);
620
+ --shimmer-color: color-mix(
621
+ in oklch,
622
+ --value(--color, [color]) calc(--modifier(integer) * 1%),
623
+ transparent
624
+ );
625
+ }
626
+
627
+ @utility shimmer-duration-* {
628
+ --shimmer-duration: calc(--value(integer) * 1ms);
629
+ }
630
+
631
+ @utility shimmer-spread-* {
632
+ --shimmer-spread: calc(var(--spacing) * --value(integer));
633
+ --shimmer-spread: --value([length], [percentage]);
634
+ }
635
+
636
+ @utility shimmer-angle-* {
637
+ --shimmer-angle: calc(--value(integer) * 1deg);
638
+ }
639
+
640
+ @media (prefers-reduced-motion: reduce) {
641
+ .shimmer {
642
+ animation: none;
643
+ background-image: none;
644
+ -webkit-text-fill-color: currentColor;
645
+ }
646
+ }