twntyx-css 1.0.7 → 1.0.8

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/styles/chat.css CHANGED
@@ -4,8 +4,7 @@
4
4
 
5
5
  /* Base chat container */
6
6
  .chat {
7
- @apply
8
- flex
7
+ @apply flex
9
8
  /* overflow-x-hidden */
10
9
  relative
11
10
  flex-col
@@ -20,8 +19,7 @@
20
19
 
21
20
  /* Chat feed - messages container */
22
21
  @utility chat-feed {
23
- @apply
24
- flex-1
22
+ @apply flex-1
25
23
  overflow-y-auto
26
24
  overflow-x-hidden
27
25
  mx-auto
@@ -33,14 +31,11 @@
33
31
  gap-6
34
32
  p-4
35
33
  w-full;
36
-
37
-
38
34
  }
39
35
 
40
36
  /* Message groups */
41
37
  @utility chat-group {
42
- @apply
43
- flex
38
+ @apply flex
44
39
  relative
45
40
  gap-4
46
41
  items-start
@@ -49,8 +44,7 @@
49
44
 
50
45
  /* Author section with avatar and timestamp */
51
46
  .chat-author {
52
- @apply
53
- flex
47
+ @apply flex
54
48
  relative
55
49
  flex-col
56
50
  gap-2
@@ -60,12 +54,11 @@
60
54
  &,
61
55
  .avatar,
62
56
  .avatar > * {
63
- @apply size-12;
57
+ @apply size-11;
64
58
  }
65
59
 
66
60
  time {
67
- @apply
68
- text-xs
61
+ @apply text-xs
69
62
  leading-none
70
63
  whitespace-nowrap
71
64
  text-text-tertiary
@@ -77,8 +70,7 @@
77
70
 
78
71
  /* Messages container */
79
72
  .chat-messages {
80
- @apply
81
- flex
73
+ @apply flex
82
74
  flex-col
83
75
  flex-1
84
76
  gap-2
@@ -87,16 +79,14 @@
87
79
  lg:max-w-[60%];
88
80
 
89
81
  .chat-name {
90
- @apply
91
- text-sm
82
+ @apply text-sm
92
83
  font-medium
93
84
  text-text-secondary;
94
85
  }
95
86
 
96
87
  /* Individual message */
97
88
  .chat-message {
98
- @apply
99
- relative
89
+ @apply relative
100
90
  max-w-full
101
91
  w-fit
102
92
  flex
@@ -110,17 +100,14 @@
110
100
  @apply z-20;
111
101
 
112
102
  .chat-actions {
113
- @apply
114
- opacity-100
103
+ @apply opacity-100
115
104
  scale-100
116
- pointer-events-auto
117
- ;
105
+ pointer-events-auto;
118
106
  }
119
107
  }
120
108
 
121
109
  .chat-bubble {
122
- @apply
123
- px-4
110
+ @apply px-4
124
111
  py-3
125
112
  rounded-2xl
126
113
  break-words
@@ -140,49 +127,41 @@
140
127
 
141
128
  b,
142
129
  strong {
143
- @apply
144
- font-semibold;
130
+ @apply font-semibold;
145
131
  }
146
132
 
147
133
  i,
148
134
  em {
149
- @apply
150
- italic;
135
+ @apply italic;
151
136
  }
152
137
 
153
138
  ul,
154
139
  ol {
155
- @apply
156
- pl-6
140
+ @apply pl-6
157
141
  mb-4
158
142
  last:mb-0;
159
143
  }
160
144
 
161
145
  ul {
162
- @apply
163
- list-disc;
146
+ @apply list-disc;
164
147
  }
165
148
 
166
149
  ol {
167
- @apply
168
- list-decimal;
150
+ @apply list-decimal;
169
151
  }
170
152
 
171
153
  li {
172
- @apply
173
- mb-2 last:mb-0;
154
+ @apply mb-2 last:mb-0;
174
155
  }
175
156
 
176
157
  a {
177
- @apply
178
- underline
158
+ @apply underline
179
159
  text-text-link
180
160
  hover:text-text-link-hover;
181
161
  }
182
162
 
183
163
  code {
184
- @apply
185
- px-1.5
164
+ @apply px-1.5
186
165
  py-0.5
187
166
  text-xs
188
167
  rounded
@@ -190,8 +169,7 @@
190
169
  }
191
170
 
192
171
  pre {
193
- @apply
194
- overflow-x-auto
172
+ @apply overflow-x-auto
195
173
  p-4
196
174
  mb-4
197
175
  rounded
@@ -199,14 +177,12 @@
199
177
  bg-background-surface-elevated;
200
178
 
201
179
  code {
202
- @apply
203
- p-0 bg-transparent;
180
+ @apply p-0 bg-transparent;
204
181
  }
205
182
  }
206
183
 
207
184
  blockquote {
208
- @apply
209
- pl-4
185
+ @apply pl-4
210
186
  my-4
211
187
  italic
212
188
  border-l-2
@@ -214,8 +190,7 @@
214
190
  }
215
191
 
216
192
  .chat-bubble-actions {
217
- @apply
218
- flex
193
+ @apply flex
219
194
  flex-wrap
220
195
  gap-2;
221
196
 
@@ -223,7 +198,7 @@
223
198
  @apply
224
199
  pointer-events-none;
225
200
  } */
226
- /*
201
+ /*
227
202
  > :where(button, .button) {
228
203
  @apply
229
204
  opacity-0
@@ -275,8 +250,7 @@
275
250
 
276
251
  /* Message actions */
277
252
  .chat-actions {
278
- @apply
279
- flex
253
+ @apply flex
280
254
  absolute
281
255
  right-0
282
256
  -top-7
@@ -294,8 +268,7 @@
294
268
  surface;
295
269
 
296
270
  button {
297
- @apply
298
- border
271
+ @apply border
299
272
  button
300
273
  include-border-secondary
301
274
  bg-background-surface
@@ -304,14 +277,12 @@
304
277
  shrink-0;
305
278
 
306
279
  &:hover {
307
- @apply
308
- border-line-default
280
+ @apply border-line-default
309
281
  text-text-default;
310
282
  }
311
283
 
312
284
  svg {
313
- @apply
314
- w-4
285
+ @apply w-4
315
286
  h-4;
316
287
  }
317
288
  }
@@ -321,8 +292,7 @@
321
292
 
322
293
  /* Owner messages styling */
323
294
  &.is-owner {
324
- @apply
325
- flex-row-reverse
295
+ @apply flex-row-reverse
326
296
  text-right;
327
297
 
328
298
  .chat-messages {
@@ -332,18 +302,15 @@
332
302
  @apply ml-auto;
333
303
 
334
304
  .chat-bubble {
335
- @apply
336
- border-none
305
+ @apply border-none
337
306
  bg-core-black
338
307
  dark:bg-core-white
339
308
  text-core-white
340
- dark:text-core-black
341
- ;
309
+ dark:text-core-black;
342
310
  }
343
311
 
344
312
  .chat-actions {
345
- @apply
346
- left-0
313
+ @apply left-0
347
314
  right-auto;
348
315
  }
349
316
  }
@@ -360,8 +327,7 @@
360
327
  @apply opacity-0 pointer-events-none;
361
328
  }
362
329
  &::before {
363
- @apply
364
- content-[attr(data-loading)]
330
+ @apply content-[attr(data-loading)]
365
331
  absolute
366
332
  top-0
367
333
  md:top-3.5
@@ -374,8 +340,7 @@
374
340
 
375
341
  /* Chat input area */
376
342
  @utility chat-footer {
377
- @apply
378
- sticky
343
+ @apply sticky
379
344
  right-0
380
345
  bottom-0
381
346
  left-0
@@ -387,22 +352,19 @@
387
352
  rounded-b-[inherit];
388
353
 
389
354
  .chat-input {
390
- @apply
391
- flex
355
+ @apply flex
392
356
  gap-2
393
357
  items-end
394
358
  max-w-full;
395
359
 
396
360
  .input-control {
397
- @apply
398
- overflow-y-auto
361
+ @apply overflow-y-auto
399
362
  flex-1
400
363
  min-w-0
401
364
  max-h-32;
402
365
 
403
366
  .input-textarea {
404
- @apply
405
- py-2
367
+ @apply py-2
406
368
  min-h-[40px]
407
369
  max-h-full;
408
370
  }
@@ -416,44 +378,38 @@
416
378
 
417
379
  /* AI Chat variant */
418
380
  @utility chat-secondary {
419
-
420
- &:has(.chat-footer-full) {
381
+ &:has(.chat-footer-full):not([class*='bg-']) {
421
382
  @apply bg-background-surface-sunken;
422
383
  }
423
384
 
424
385
  .chat-feed {
425
- @apply
426
- bg-background-surface-sunken;
427
-
386
+ &:not([class*='bg-']) {
387
+ @apply bg-background-surface-sunken;
388
+ }
428
389
  }
429
390
  .chat-group {
430
- @apply
431
- flex-col
391
+ @apply flex-col
432
392
  items-stretch
433
393
  md:flex-row
434
394
  md:items-start;
435
395
  .chat-messages {
436
- @apply
437
- px-0
396
+ @apply px-0
438
397
  w-full
439
398
  lg:w-auto
440
399
  lg:max-w-full;
441
400
 
442
401
  .chat-message {
443
- @apply
444
- items-start
402
+ @apply items-start
445
403
  w-full;
446
404
 
447
405
  .chat-bubble {
448
- @apply
449
- py-2
406
+ @apply py-2
450
407
  space-y-2
451
408
  w-full
452
409
  max-w-fit;
453
410
  }
454
411
  .chat-actions {
455
- @apply
456
- top-auto
412
+ @apply top-auto
457
413
  -bottom-5
458
414
  left-auto
459
415
  right-0;
@@ -464,8 +420,7 @@
464
420
  &:not(.is-owner) {
465
421
  .chat-message {
466
422
  .chat-bubble {
467
- @apply
468
- p-0
423
+ @apply p-0
469
424
  bg-transparent
470
425
  border-none;
471
426
  }
@@ -473,16 +428,13 @@
473
428
  }
474
429
 
475
430
  &.is-owner {
476
- @apply
477
- text-left;
431
+ @apply text-left;
478
432
 
479
433
  .chat-messages {
480
- @apply
481
- items-start;
434
+ @apply items-start;
482
435
 
483
436
  .chat-message {
484
- @apply
485
- flex-row;
437
+ @apply flex-row;
486
438
  }
487
439
  }
488
440
  }
@@ -491,24 +443,21 @@
491
443
 
492
444
  /* Media attachments inside bubbles */
493
445
  @utility chat-media-grid {
494
- @apply
495
- grid
446
+ @apply grid
496
447
  grid-cols-2
497
448
  gap-2
498
449
  mt-2;
499
450
  }
500
451
 
501
452
  @utility chat-media-item {
502
- @apply
503
- overflow-hidden
453
+ @apply overflow-hidden
504
454
  rounded-xl
505
455
  border
506
456
  border-line-default
507
457
  bg-background-surface-sunken;
508
458
 
509
459
  img {
510
- @apply
511
- block
460
+ @apply block
512
461
  w-full
513
462
  h-24
514
463
  md:h-28
@@ -522,15 +471,13 @@
522
471
  }
523
472
 
524
473
  @utility chat-loop-stack {
525
- @apply
526
- relative
474
+ @apply relative
527
475
  mt-6;
528
476
 
529
477
  min-height: 9.25rem;
530
478
 
531
479
  > .chat-group {
532
- @apply
533
- absolute
480
+ @apply absolute
534
481
  inset-0
535
482
  mt-0;
536
483
  }
@@ -550,12 +497,33 @@
550
497
 
551
498
  /* Extended chat footer demo */
552
499
  @utility chat-footer-full {
553
-
554
500
  @apply flex flex-col gap-2 w-full rounded-2xl! surface mb-4;
555
501
 
502
+ .chat-attachment-preview {
503
+ @apply flex;
504
+ }
505
+
506
+ .chat-attachment-thumbnail {
507
+ @apply relative size-20 rounded-xl border-line-default;
508
+
509
+ &:has(.button:hover) {
510
+ @apply border-line-highlight;
511
+ img {
512
+ @apply brightness-110;
513
+ }
514
+ }
515
+
516
+ img {
517
+ @apply size-full object-cover rounded-[inherit];
518
+ }
519
+ }
520
+
521
+ .chat-attachment-remove {
522
+ @apply absolute -top-2 -right-2 shadow-sm;
523
+ }
524
+
556
525
  .chat-input-full {
557
- @apply
558
- flex-wrap
526
+ @apply flex-wrap
559
527
  items-end;
560
528
 
561
529
  .chat-add-menu-trigger,
@@ -564,47 +532,76 @@
564
532
  }
565
533
 
566
534
  .chat-footer-actions {
567
- @apply
568
- order-3
535
+ @apply order-3
569
536
  flex
570
537
  gap-2
571
538
  flex-1
572
539
  items-center
573
540
  justify-end
574
- sm:order-none
575
541
  sm:flex-none
576
542
  sm:ml-auto;
577
543
  }
578
544
 
579
- .chat-model-select {
580
- @apply
581
- w-36
582
- sm:w-44;
583
- }
545
+ .chat-dictate {
546
+ @apply relative px-0.5!;
547
+
548
+ .chat-dictate-indicator {
549
+ @apply flex items-center justify-center gap-0.75 min-h-4 pointer-events-none;
550
+
551
+ &::before {
552
+ @apply content-['']
553
+ absolute
554
+ inset-1
555
+ rounded-full
556
+ bg-current
557
+ transition-all
558
+ duration-150
559
+ ease-out;
560
+ mask-image: url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%20-960%20960%20960%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cpath%20d%3D%22M409.04-449.04Q380-478.08%20380-520v-240q0-41.92%2029.04-70.96Q438.08-860%20480-860q41.92%200%2070.96%2029.04Q580-801.92%20580-760v240q0%2041.92-29.04%2070.96Q521.92-420%20480-420q-41.92%200-70.96-29.04ZM480-640Zm-30%20480v-101.85q-89.31-10.31-153.08-73.38-63.76-63.08-74.69-153.77-1.61-12.77%206.69-21.88Q237.23-520%20250-520q12.77%200%2021.38%208.81%208.62%208.8%2011.47%2021.57%2010.92%2073.47%2067.19%20121.54Q406.31-320%20480-320q74.69%200%20130.46-48.58%2055.77-48.57%2066.69-121.04%202.85-12.77%2011.47-21.57Q697.23-520%20710-520t21.08%209.12q8.3%209.11%206.69%2021.88-10.93%2088.69-74.19%20152.58-63.27%2063.88-153.58%2074.57V-160q0%2012.77-8.62%2021.38Q492.77-130%20480-130t-21.38-8.62Q450-147.23%20450-160Zm58.5-331.5Q520-503%20520-520v-240q0-17-11.5-28.5T480-800q-17%200-28.5%2011.5T440-760v240q0%2017%2011.5%2028.5T480-480q17%200%2028.5-11.5Z%22%20fill%3D%22currentColor%22%20%2F%3E%0A%3C%2Fsvg%3E');
561
+ mask-size: contain;
562
+ mask-repeat: no-repeat;
563
+ mask-position: center;
564
+ }
565
+ }
584
566
 
567
+ .chat-dictate-bar {
568
+ @apply block size-0.5 rounded-full bg-current transition-all duration-150 ease-out opacity-0;
569
+ }
585
570
 
586
- .chat-dictate {
587
- @apply
588
- relative;
571
+ &.is-listening {
572
+ .chat-dictate-indicator {
573
+ @apply items-end;
574
+ &::before {
575
+ @apply opacity-0;
576
+ }
577
+ }
589
578
 
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;
579
+ .chat-dictate-bar {
580
+ @apply h-4 w-0.5 rounded-full opacity-100;
581
+ animation: chat-dictate-listen 1s ease-in-out infinite;
582
+ transform-origin: center;
583
+ }
584
+
585
+ .chat-dictate-bar:nth-child(2) {
586
+ animation-delay: 0.1s;
587
+ }
588
+
589
+ .chat-dictate-bar:nth-child(3) {
590
+ animation-delay: 0.2s;
591
+ }
592
+
593
+ .chat-dictate-bar:nth-child(4) {
594
+ animation-delay: 0.3s;
595
+ }
596
+
597
+ .chat-dictate-bar:nth-child(5) {
598
+ animation-delay: 0.4s;
599
+ }
602
600
  }
603
601
  }
604
602
 
605
603
  .chat-send-button {
606
- @apply
607
- shrink-0;
604
+ @apply shrink-0;
608
605
  }
609
606
  }
610
607
 
@@ -621,8 +618,7 @@
621
618
  }
622
619
 
623
620
  .chat-dictate-hint {
624
- @apply
625
- mt-2
621
+ @apply mt-2
626
622
  text-xs
627
623
  text-text-secondary;
628
624
  }
@@ -681,22 +677,26 @@
681
677
  }
682
678
  }
683
679
 
684
- @keyframes chat-dictate-pulse {
680
+ @keyframes chat-dictate-listen {
685
681
  0%,
686
682
  100% {
687
- opacity: 1;
688
- transform: scale(1);
683
+ transform: scaleY(0.35);
689
684
  }
690
- 50% {
691
- opacity: 0.35;
692
- transform: scale(1.35);
685
+ 30% {
686
+ transform: scaleY(1);
687
+ }
688
+ 65% {
689
+ transform: scaleY(0.55);
693
690
  }
694
691
  }
695
692
 
696
693
  @media (prefers-reduced-motion: reduce) {
697
694
  .chat-loop-stack .chat-loop-loading,
698
695
  .chat-loop-stack .chat-loop-message,
699
- .chat-footer-full .chat-input-full .chat-dictate.is-listening::after {
696
+ .chat-footer-full
697
+ .chat-input-full
698
+ .chat-dictate.is-listening
699
+ .chat-dictate-bar {
700
700
  animation: none;
701
701
  }
702
702
 
@@ -710,4 +710,11 @@
710
710
  visibility: visible;
711
711
  transform: none;
712
712
  }
713
+
714
+ .chat-footer-full
715
+ .chat-input-full
716
+ .chat-dictate.is-listening
717
+ .chat-dictate-bar {
718
+ transform: none;
719
+ }
713
720
  }
@@ -61,7 +61,7 @@
61
61
  }
62
62
  }
63
63
 
64
- &:not([class*="rounded"]) {
64
+ &:not([class*='rounded']) {
65
65
  --roundness: 1.5rem;
66
66
  }
67
67
  &.rounded-none {
@@ -81,7 +81,11 @@
81
81
  }
82
82
 
83
83
  .collapsible-header {
84
- @apply rounded-[calc(var(--roundness)-0.125rem-1px)] flex items-center gap-2 include-interactive cursor-pointer include-interactive text-text-default;
84
+ @apply rounded-[calc(var(--roundness)-0.125rem-1px)] flex-1 flex items-center gap-2 cursor-pointer include-interactive text-text-default;
85
+
86
+ > span {
87
+ @apply flex-1;
88
+ }
85
89
  }
86
90
 
87
91
  .collapsible-content {