twntyx-css 1.0.1 → 1.0.3
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/llm/components/ai-orb.json +0 -1
- package/llm/components/ai-perl.json +0 -1
- package/llm/components/chat-ai.json +89 -0
- package/llm/components/chat-footer.json +99 -0
- package/llm/components/chat-person-to-person.json +157 -0
- package/llm/components/chat.json +11 -80
- package/llm/components/demo.json +88 -0
- package/llm/components/icons-reference.json +1 -1
- package/llm/components/{skeleton.json → loader-skeleton.json} +7 -5
- package/llm/components/{loader.json → loader-symbol.json} +10 -7
- package/llm/components/loader-text.json +100 -0
- package/llm/components/menu.json +10 -0
- package/llm/examples/chat-ai.html +1 -0
- package/llm/examples/chat-footer.html +1 -0
- package/llm/examples/chat-person-to-person.html +1 -0
- package/llm/examples/chat.html +1 -1
- package/llm/examples/demo.html +1 -0
- package/llm/examples/loader-skeleton.html +1 -0
- package/llm/examples/loader-symbol.html +1 -0
- package/llm/examples/loader-text.html +1 -0
- package/llm/index.json +119 -32
- package/llm/tokens.json +647 -357
- package/package.json +1 -1
- package/styles/ai.css +3 -7
- package/styles/animation.css +203 -91
- package/styles/button.css +50 -39
- package/styles/card.css +3 -3
- package/styles/chat.css +207 -0
- package/styles/colors.css +226 -200
- package/styles/loader.css +32 -24
- package/styles/skeleton.css +2 -1
- package/llm/examples/loader.html +0 -1
- package/llm/examples/skeleton.html +0 -1
package/styles/button.css
CHANGED
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
&.button-primary {
|
|
110
|
-
|
|
110
|
+
&,
|
|
111
111
|
&:hover,
|
|
112
112
|
&:active {
|
|
113
113
|
@apply bg-none text-shadow-none bg-core-ui-100 dark:bg-core-ui-800 text-text-secondary/75 border-line-default;
|
|
@@ -150,9 +150,7 @@
|
|
|
150
150
|
|
|
151
151
|
/* VARIANTS */
|
|
152
152
|
&.button-primary {
|
|
153
|
-
@apply
|
|
154
|
-
surface-interactive-brand
|
|
155
|
-
;
|
|
153
|
+
@apply surface-interactive-brand;
|
|
156
154
|
|
|
157
155
|
&.is-active {
|
|
158
156
|
@apply text-text-default bg-background-brand-active;
|
|
@@ -160,7 +158,7 @@
|
|
|
160
158
|
}
|
|
161
159
|
|
|
162
160
|
/* Text feedback */
|
|
163
|
-
&[data-feedback]:not([data-feedback=
|
|
161
|
+
&[data-feedback]:not([data-feedback='']):not([data-feedback-icon]) {
|
|
164
162
|
@apply overflow-hidden;
|
|
165
163
|
|
|
166
164
|
&::before {
|
|
@@ -174,7 +172,7 @@
|
|
|
174
172
|
}
|
|
175
173
|
|
|
176
174
|
/* Icon feedback */
|
|
177
|
-
&[data-feedback][data-feedback-icon]:not([data-feedback=
|
|
175
|
+
&[data-feedback][data-feedback-icon]:not([data-feedback='']) {
|
|
178
176
|
@apply relative;
|
|
179
177
|
|
|
180
178
|
&::before {
|
|
@@ -191,11 +189,12 @@
|
|
|
191
189
|
}
|
|
192
190
|
|
|
193
191
|
> * {
|
|
194
|
-
animation: button-feedback-icon-label 4s cubic-bezier(1, 0, 0, 0.9)
|
|
192
|
+
animation: button-feedback-icon-label 4s cubic-bezier(1, 0, 0, 0.9)
|
|
193
|
+
forwards;
|
|
195
194
|
}
|
|
196
195
|
|
|
197
196
|
/* Success variant */
|
|
198
|
-
&[data-feedback-icon=
|
|
197
|
+
&[data-feedback-icon='success'] {
|
|
199
198
|
&::after {
|
|
200
199
|
@apply mask-check;
|
|
201
200
|
}
|
|
@@ -209,7 +208,7 @@
|
|
|
209
208
|
}
|
|
210
209
|
|
|
211
210
|
/* Error variant */
|
|
212
|
-
&[data-feedback-icon=
|
|
211
|
+
&[data-feedback-icon='error'] {
|
|
213
212
|
&::after {
|
|
214
213
|
@apply mask-close;
|
|
215
214
|
}
|
|
@@ -223,7 +222,7 @@
|
|
|
223
222
|
}
|
|
224
223
|
|
|
225
224
|
/* Attention variant */
|
|
226
|
-
&[data-feedback-icon=
|
|
225
|
+
&[data-feedback-icon='attention'] {
|
|
227
226
|
&::after {
|
|
228
227
|
@apply mask-exclamation;
|
|
229
228
|
}
|
|
@@ -238,7 +237,7 @@
|
|
|
238
237
|
}
|
|
239
238
|
|
|
240
239
|
/* Hide feedback when empty */
|
|
241
|
-
&[data-feedback=
|
|
240
|
+
&[data-feedback=''] {
|
|
242
241
|
&::before,
|
|
243
242
|
&::after {
|
|
244
243
|
@apply hidden;
|
|
@@ -246,7 +245,7 @@
|
|
|
246
245
|
}
|
|
247
246
|
|
|
248
247
|
/* Icon-only feedback */
|
|
249
|
-
&[data-feedback=
|
|
248
|
+
&[data-feedback='.'] {
|
|
250
249
|
&::before {
|
|
251
250
|
@apply hidden;
|
|
252
251
|
}
|
|
@@ -335,25 +334,39 @@
|
|
|
335
334
|
/* Close */
|
|
336
335
|
.button.button-close,
|
|
337
336
|
.button-close {
|
|
338
|
-
|
|
339
|
-
@apply size-(--close-size) min-w-(--close-size) min-h-(--close-size) p-0 text-transparent! rounded-full
|
|
337
|
+
--close-size: 2.75rem;
|
|
338
|
+
@apply size-(--close-size) min-w-(--close-size) min-h-(--close-size) p-0 text-transparent! rounded-full;
|
|
340
339
|
|
|
341
340
|
> span {
|
|
342
341
|
@apply opacity-0 pointer-events-none;
|
|
343
342
|
}
|
|
344
343
|
|
|
345
344
|
&::before {
|
|
346
|
-
@apply
|
|
345
|
+
@apply content-['']
|
|
346
|
+
block
|
|
347
|
+
size-[calc(var(--close-size)-20%)]
|
|
348
|
+
absolute
|
|
349
|
+
rotate-0
|
|
350
|
+
mask-close
|
|
351
|
+
transition-transform
|
|
352
|
+
duration-300
|
|
353
|
+
ease-out-quint;
|
|
347
354
|
}
|
|
348
|
-
|
|
355
|
+
|
|
356
|
+
&:hover {
|
|
357
|
+
&::before {
|
|
358
|
+
@apply rotate-90;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
349
362
|
&.button-xs {
|
|
350
|
-
--close-size:1.25rem;
|
|
363
|
+
--close-size: 1.25rem;
|
|
351
364
|
}
|
|
352
365
|
&.button-sm {
|
|
353
|
-
--close-size:1.75rem;
|
|
366
|
+
--close-size: 1.75rem;
|
|
354
367
|
}
|
|
355
368
|
&.button-lg {
|
|
356
|
-
--close-size:3.5rem;
|
|
369
|
+
--close-size: 3.5rem;
|
|
357
370
|
}
|
|
358
371
|
|
|
359
372
|
&.button-primary {
|
|
@@ -380,15 +393,6 @@
|
|
|
380
393
|
}
|
|
381
394
|
}
|
|
382
395
|
|
|
383
|
-
&::before {
|
|
384
|
-
@apply content-['']
|
|
385
|
-
absolute
|
|
386
|
-
/* block
|
|
387
|
-
inset-0 */
|
|
388
|
-
transform-gpu
|
|
389
|
-
mask-close;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
396
|
&:not([disabled]),
|
|
393
397
|
&:not(.is-disabled) {
|
|
394
398
|
&:hover,
|
|
@@ -400,8 +404,7 @@
|
|
|
400
404
|
}
|
|
401
405
|
}
|
|
402
406
|
|
|
403
|
-
|
|
404
|
-
/* SIZES */
|
|
407
|
+
/* SIZES */
|
|
405
408
|
.button-xs {
|
|
406
409
|
@apply text-xs
|
|
407
410
|
min-w-5
|
|
@@ -465,21 +468,27 @@
|
|
|
465
468
|
}
|
|
466
469
|
}
|
|
467
470
|
|
|
468
|
-
|
|
469
471
|
/* Button input */
|
|
470
472
|
.button {
|
|
471
|
-
&:is(input[type=
|
|
472
|
-
&:is(input[type=
|
|
473
|
+
&:is(input[type='checkbox']),
|
|
474
|
+
&:is(input[type='radio']) {
|
|
473
475
|
@apply appearance-none;
|
|
476
|
+
|
|
474
477
|
&::after {
|
|
475
478
|
@apply content-[attr(aria-label)];
|
|
476
479
|
}
|
|
477
480
|
|
|
481
|
+
&:checked {
|
|
482
|
+
@apply z-10;
|
|
483
|
+
}
|
|
484
|
+
|
|
478
485
|
&.button-primary {
|
|
479
486
|
&:checked {
|
|
480
487
|
@apply bg-background-inverted border-background-inverted bg-none text-shadow-none shadow-none!;
|
|
481
|
-
|
|
482
|
-
*,
|
|
488
|
+
|
|
489
|
+
*,
|
|
490
|
+
&::before,
|
|
491
|
+
&::after {
|
|
483
492
|
@apply drop-shadow-none!;
|
|
484
493
|
}
|
|
485
494
|
&::after {
|
|
@@ -492,7 +501,9 @@
|
|
|
492
501
|
&:checked {
|
|
493
502
|
@apply surface-brand;
|
|
494
503
|
|
|
495
|
-
*,
|
|
504
|
+
*,
|
|
505
|
+
&::before,
|
|
506
|
+
&::after {
|
|
496
507
|
@apply drop-shadow-none!;
|
|
497
508
|
}
|
|
498
509
|
}
|
|
@@ -501,11 +512,11 @@
|
|
|
501
512
|
}
|
|
502
513
|
|
|
503
514
|
.join > .button.button-plain,
|
|
504
|
-
.button.button-plain:is(input[type=
|
|
505
|
-
.button.button-plain:is(input[type=
|
|
515
|
+
.button.button-plain:is(input[type='checkbox']),
|
|
516
|
+
.button.button-plain:is(input[type='radio']) {
|
|
506
517
|
@apply no-underline include-border-secondary text-text-default;
|
|
507
518
|
&:checked {
|
|
508
|
-
|
|
519
|
+
@apply bg-background-inverted border-background-inverted bg-none text-shadow-none;
|
|
509
520
|
&::after {
|
|
510
521
|
@apply text-text-inverted;
|
|
511
522
|
}
|
package/styles/card.css
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
/*----------------------------*/
|
|
4
4
|
|
|
5
5
|
@utility card {
|
|
6
|
-
&:not([class*=
|
|
6
|
+
&:not([class*='rounded']) {
|
|
7
7
|
@apply rounded-3xl;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
@apply border bg-background-surface border-line-default;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@apply overflow-
|
|
12
|
+
> figure:first-child {
|
|
13
|
+
@apply overflow-clip rounded-ss-[inherit] rounded-se-[inherit];
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
package/styles/chat.css
CHANGED
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
gap-6
|
|
34
34
|
p-4
|
|
35
35
|
w-full;
|
|
36
|
+
|
|
37
|
+
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
/* Message groups */
|
|
@@ -415,9 +417,14 @@
|
|
|
415
417
|
/* AI Chat variant */
|
|
416
418
|
@utility chat-secondary {
|
|
417
419
|
|
|
420
|
+
&:has(.chat-footer-full) {
|
|
421
|
+
@apply bg-background-surface-sunken;
|
|
422
|
+
}
|
|
423
|
+
|
|
418
424
|
.chat-feed {
|
|
419
425
|
@apply
|
|
420
426
|
bg-background-surface-sunken;
|
|
427
|
+
|
|
421
428
|
}
|
|
422
429
|
.chat-group {
|
|
423
430
|
@apply
|
|
@@ -482,6 +489,145 @@
|
|
|
482
489
|
}
|
|
483
490
|
}
|
|
484
491
|
|
|
492
|
+
/* Media attachments inside bubbles */
|
|
493
|
+
@utility chat-media-grid {
|
|
494
|
+
@apply
|
|
495
|
+
grid
|
|
496
|
+
grid-cols-2
|
|
497
|
+
gap-2
|
|
498
|
+
mt-2;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
@utility chat-media-item {
|
|
502
|
+
@apply
|
|
503
|
+
overflow-hidden
|
|
504
|
+
rounded-xl
|
|
505
|
+
border
|
|
506
|
+
border-line-default
|
|
507
|
+
bg-background-surface-sunken;
|
|
508
|
+
|
|
509
|
+
img {
|
|
510
|
+
@apply
|
|
511
|
+
block
|
|
512
|
+
w-full
|
|
513
|
+
h-24
|
|
514
|
+
md:h-28
|
|
515
|
+
object-cover;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/* Loading -> message loop simulation */
|
|
520
|
+
@utility chat-loop-simulation {
|
|
521
|
+
@apply overflow-x-hidden;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
@utility chat-loop-stack {
|
|
525
|
+
@apply
|
|
526
|
+
relative
|
|
527
|
+
mt-6;
|
|
528
|
+
|
|
529
|
+
min-height: 9.25rem;
|
|
530
|
+
|
|
531
|
+
> .chat-group {
|
|
532
|
+
@apply
|
|
533
|
+
absolute
|
|
534
|
+
inset-0
|
|
535
|
+
mt-0;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.chat-loop-loading {
|
|
539
|
+
animation: chat-loop-loading 4.8s ease-in-out infinite;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.chat-loop-message {
|
|
543
|
+
animation: chat-loop-message 4.8s ease-in-out infinite;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
@utility chat-loop-stack-lg {
|
|
548
|
+
min-height: 10.75rem;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/* Extended chat footer demo */
|
|
552
|
+
@utility chat-footer-full {
|
|
553
|
+
|
|
554
|
+
@apply flex flex-col gap-2 w-full rounded-2xl! surface mb-4;
|
|
555
|
+
|
|
556
|
+
.chat-input-full {
|
|
557
|
+
@apply
|
|
558
|
+
flex-wrap
|
|
559
|
+
items-end;
|
|
560
|
+
|
|
561
|
+
.chat-add-menu-trigger,
|
|
562
|
+
.chat-add-menu-button {
|
|
563
|
+
@apply shrink-0;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.chat-footer-actions {
|
|
567
|
+
@apply
|
|
568
|
+
order-3
|
|
569
|
+
flex
|
|
570
|
+
gap-2
|
|
571
|
+
flex-1
|
|
572
|
+
items-center
|
|
573
|
+
justify-end
|
|
574
|
+
sm:order-none
|
|
575
|
+
sm:flex-none
|
|
576
|
+
sm:ml-auto;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.chat-model-select {
|
|
580
|
+
@apply
|
|
581
|
+
w-36
|
|
582
|
+
sm:w-44;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
.chat-dictate {
|
|
587
|
+
@apply
|
|
588
|
+
relative;
|
|
589
|
+
|
|
590
|
+
&.is-listening::after {
|
|
591
|
+
content: "";
|
|
592
|
+
@apply
|
|
593
|
+
absolute
|
|
594
|
+
-top-1
|
|
595
|
+
-right-1
|
|
596
|
+
size-2
|
|
597
|
+
rounded-full
|
|
598
|
+
bg-background-error
|
|
599
|
+
border
|
|
600
|
+
border-background-surface;
|
|
601
|
+
animation: chat-dictate-pulse 1.4s ease-in-out infinite;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.chat-send-button {
|
|
606
|
+
@apply
|
|
607
|
+
shrink-0;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.chat-add-menu {
|
|
612
|
+
@apply min-w-56;
|
|
613
|
+
|
|
614
|
+
.menu {
|
|
615
|
+
@apply gap-0;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.menu > li > button {
|
|
619
|
+
@apply justify-start;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.chat-dictate-hint {
|
|
624
|
+
@apply
|
|
625
|
+
mt-2
|
|
626
|
+
text-xs
|
|
627
|
+
text-text-secondary;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
|
|
485
631
|
/* Loading animation */
|
|
486
632
|
@keyframes loading-gradient {
|
|
487
633
|
0% {
|
|
@@ -504,3 +650,64 @@
|
|
|
504
650
|
transform: scale(1);
|
|
505
651
|
}
|
|
506
652
|
}
|
|
653
|
+
|
|
654
|
+
@keyframes chat-loop-loading {
|
|
655
|
+
0%,
|
|
656
|
+
48% {
|
|
657
|
+
opacity: 1;
|
|
658
|
+
transform: translateY(0);
|
|
659
|
+
visibility: visible;
|
|
660
|
+
}
|
|
661
|
+
52%,
|
|
662
|
+
100% {
|
|
663
|
+
opacity: 0;
|
|
664
|
+
transform: translateY(-0.35rem);
|
|
665
|
+
visibility: hidden;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
@keyframes chat-loop-message {
|
|
670
|
+
0%,
|
|
671
|
+
48% {
|
|
672
|
+
opacity: 0;
|
|
673
|
+
transform: translateY(0.35rem);
|
|
674
|
+
visibility: hidden;
|
|
675
|
+
}
|
|
676
|
+
52%,
|
|
677
|
+
100% {
|
|
678
|
+
opacity: 1;
|
|
679
|
+
transform: translateY(0);
|
|
680
|
+
visibility: visible;
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
@keyframes chat-dictate-pulse {
|
|
685
|
+
0%,
|
|
686
|
+
100% {
|
|
687
|
+
opacity: 1;
|
|
688
|
+
transform: scale(1);
|
|
689
|
+
}
|
|
690
|
+
50% {
|
|
691
|
+
opacity: 0.35;
|
|
692
|
+
transform: scale(1.35);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
@media (prefers-reduced-motion: reduce) {
|
|
697
|
+
.chat-loop-stack .chat-loop-loading,
|
|
698
|
+
.chat-loop-stack .chat-loop-message,
|
|
699
|
+
.chat-footer-full .chat-input-full .chat-dictate.is-listening::after {
|
|
700
|
+
animation: none;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.chat-loop-stack .chat-loop-loading {
|
|
704
|
+
opacity: 0;
|
|
705
|
+
visibility: hidden;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
.chat-loop-stack .chat-loop-message {
|
|
709
|
+
opacity: 1;
|
|
710
|
+
visibility: visible;
|
|
711
|
+
transform: none;
|
|
712
|
+
}
|
|
713
|
+
}
|