basecoat-css 0.1.1 → 0.2.0-beta.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/dist/basecoat.css +209 -126
- package/dist/cdn.css +4601 -0
- package/dist/cdn.min.css +2 -0
- package/dist/js/all.js +701 -0
- package/dist/js/all.min.js +1 -0
- package/dist/js/css-anchor-positioning.js +6340 -0
- package/dist/js/css-anchor-positioning.min.js +1 -0
- package/dist/js/dark-mode.js +10 -0
- package/dist/js/dark-mode.min.js +1 -0
- package/dist/js/dropdown-menu.js +121 -0
- package/dist/js/dropdown-menu.min.js +1 -0
- package/dist/js/select.js +199 -0
- package/dist/js/select.min.js +1 -0
- package/dist/js/sidebar.js +110 -0
- package/dist/js/sidebar.min.js +1 -0
- package/dist/js/tabs.js +75 -0
- package/dist/js/tabs.min.js +1 -0
- package/dist/js/toast.js +196 -0
- package/dist/js/toast.min.js +1 -0
- package/package.json +1 -1
package/dist/basecoat.css
CHANGED
|
@@ -161,7 +161,6 @@
|
|
|
161
161
|
h2 {
|
|
162
162
|
@apply col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight;
|
|
163
163
|
}
|
|
164
|
-
|
|
165
164
|
section {
|
|
166
165
|
@apply text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed;
|
|
167
166
|
|
|
@@ -446,39 +445,84 @@
|
|
|
446
445
|
/* Dialog */
|
|
447
446
|
@layer components {
|
|
448
447
|
.dialog {
|
|
449
|
-
|
|
450
|
-
@apply fixed inset-0 z-50 bg-black/50 opacity-0 invisible transition-all;
|
|
448
|
+
@apply inset-y-0 opacity-0 transition-all transition-discrete;
|
|
451
449
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
450
|
+
&:is([open],:popover-open) {
|
|
451
|
+
@apply opacity-100;
|
|
452
|
+
|
|
453
|
+
&::backdrop {
|
|
454
|
+
@apply opacity-100;
|
|
458
455
|
}
|
|
459
456
|
> article {
|
|
460
|
-
@apply
|
|
457
|
+
@apply scale-100;
|
|
458
|
+
}
|
|
461
459
|
|
|
462
|
-
|
|
463
|
-
|
|
460
|
+
@starting-style {
|
|
461
|
+
@apply opacity-0;
|
|
464
462
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
}
|
|
463
|
+
&::backdrop {
|
|
464
|
+
@apply opacity-0;
|
|
465
|
+
}
|
|
466
|
+
> article {
|
|
467
|
+
@apply scale-95;
|
|
471
468
|
}
|
|
472
|
-
|
|
473
|
-
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
&::backdrop {
|
|
472
|
+
@apply bg-black/50 opacity-0 transition-all transition-discrete;
|
|
473
|
+
}
|
|
474
|
+
> article {
|
|
475
|
+
@apply bg-background fixed top-[50%] left-[50%] z-50 flex flex-col w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border p-6 shadow-lg sm:max-w-lg max-h-[calc(100%-2rem)];
|
|
476
|
+
@apply transition-all scale-95;
|
|
477
|
+
|
|
478
|
+
> header {
|
|
479
|
+
@apply flex flex-col gap-2 text-center sm:text-left;
|
|
480
|
+
|
|
481
|
+
> h2 {
|
|
482
|
+
@apply text-lg leading-none font-semibold;
|
|
474
483
|
}
|
|
475
|
-
>
|
|
476
|
-
@apply
|
|
484
|
+
> p {
|
|
485
|
+
@apply text-muted-foreground text-sm;
|
|
477
486
|
}
|
|
487
|
+
}
|
|
488
|
+
> section {
|
|
489
|
+
@apply flex-1 -mx-6 px-6;
|
|
490
|
+
}
|
|
491
|
+
> footer {
|
|
492
|
+
@apply flex flex-col-reverse gap-2 sm:flex-row sm:justify-end;
|
|
493
|
+
}
|
|
494
|
+
> form[method='dialog'] {
|
|
495
|
+
@apply absolute top-4 right-4;
|
|
478
496
|
> button {
|
|
479
|
-
@apply ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground
|
|
497
|
+
@apply ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/* Dropdown Menu */
|
|
505
|
+
@layer components {
|
|
506
|
+
.dropdown-menu {
|
|
507
|
+
[popover].popover {
|
|
508
|
+
@apply p-1;
|
|
509
|
+
min-width: anchor-size(width);
|
|
510
|
+
|
|
511
|
+
[role='menuitem'],
|
|
512
|
+
[role='menuitemcheckbox'],
|
|
513
|
+
[role='menuitemradio'] {
|
|
514
|
+
@apply aria-hidden:hidden [&_svg]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none [&_svg]:shrink-0 [&_svg]:size-4 aria-disabled:opacity-50 aria-disabled:pointer-events-none disabled:opacity-50 disabled:pointer-events-none w-full truncate;
|
|
515
|
+
@apply focus-visible:bg-accent focus-visible:text-accent-foreground hover:bg-accent hover:text-accent-foreground;
|
|
516
|
+
&.active {
|
|
517
|
+
@apply bg-accent text-accent-foreground;
|
|
480
518
|
}
|
|
481
519
|
}
|
|
520
|
+
[role='menu'] [role='heading'] {
|
|
521
|
+
@apply flex px-2 py-1.5 text-sm font-medium;
|
|
522
|
+
}
|
|
523
|
+
[role='separator'] {
|
|
524
|
+
@apply border-border -mx-1 my-1;
|
|
525
|
+
}
|
|
482
526
|
}
|
|
483
527
|
}
|
|
484
528
|
}
|
|
@@ -532,15 +576,68 @@
|
|
|
532
576
|
|
|
533
577
|
/* Popover */
|
|
534
578
|
@layer components {
|
|
535
|
-
.popover {
|
|
536
|
-
@apply
|
|
579
|
+
[popover].popover {
|
|
580
|
+
@apply absolute inset-auto bg-popover text-popover-foreground overflow-x-hidden overflow-y-auto p-4 rounded-md border shadow-md z-50 visible opacity-0 scale-95 w-max transition-all transition-discrete;
|
|
537
581
|
|
|
538
|
-
|
|
539
|
-
|
|
582
|
+
&:not([data-side]),
|
|
583
|
+
&[data-side='bottom'] {
|
|
584
|
+
@apply -translate-y-2;
|
|
585
|
+
}
|
|
586
|
+
&[data-side='top'] {
|
|
587
|
+
@apply translate-y-2;
|
|
588
|
+
}
|
|
589
|
+
&[data-side='left'] {
|
|
590
|
+
@apply translate-x-2;
|
|
591
|
+
}
|
|
592
|
+
&[data-side='right'] {
|
|
593
|
+
@apply -translate-x-2;
|
|
594
|
+
}
|
|
595
|
+
&:not([data-side]),
|
|
596
|
+
&[data-side='bottom'] {
|
|
597
|
+
@apply mt-1 top-[anchor(bottom)];
|
|
598
|
+
}
|
|
599
|
+
&[data-side='top'] {
|
|
600
|
+
@apply mb-1 bottom-[anchor(top)];
|
|
601
|
+
}
|
|
602
|
+
&[data-side='left'] {
|
|
603
|
+
@apply mr-1 right-[anchor(left)];
|
|
604
|
+
}
|
|
605
|
+
&[data-side='right'] {
|
|
606
|
+
@apply ml-1 left-[anchor(right)];
|
|
607
|
+
}
|
|
608
|
+
&:not([data-side]),
|
|
609
|
+
&[data-side='bottom'],
|
|
610
|
+
&[data-side='top'] {
|
|
611
|
+
&:not([data-align]),
|
|
612
|
+
&[data-align='start'] {
|
|
613
|
+
@apply left-[anchor(left)];
|
|
614
|
+
}
|
|
615
|
+
&[data-align='end'] {
|
|
616
|
+
@apply right-[anchor(right)];
|
|
617
|
+
}
|
|
618
|
+
&[data-align='center'] {
|
|
619
|
+
@apply left-[anchor(center)] -translate-x-1/2;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
&[data-side='left'],
|
|
623
|
+
&[data-side='right'] {
|
|
624
|
+
&:not([data-align]),
|
|
625
|
+
&[data-align='start'] {
|
|
626
|
+
@apply top-[anchor(top)];
|
|
627
|
+
}
|
|
628
|
+
&[data-align='end'] {
|
|
629
|
+
@apply bottom-[anchor(bottom)];
|
|
630
|
+
}
|
|
631
|
+
&[data-align='center'] {
|
|
632
|
+
@apply top-[anchor(center)] -translate-y-1/2;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
&:is(:popover-open) {
|
|
636
|
+
@apply opacity-100 scale-100 translate-x-0 translate-y-0;
|
|
637
|
+
|
|
638
|
+
@starting-style {
|
|
639
|
+
@apply opacity-0 scale-95;
|
|
540
640
|
|
|
541
|
-
&[aria-hidden='true'] {
|
|
542
|
-
@apply invisible opacity-0 scale-95;
|
|
543
|
-
|
|
544
641
|
&:not([data-side]),
|
|
545
642
|
&[data-side='bottom'] {
|
|
546
643
|
@apply -translate-y-2;
|
|
@@ -555,97 +652,8 @@
|
|
|
555
652
|
@apply -translate-x-2;
|
|
556
653
|
}
|
|
557
654
|
}
|
|
558
|
-
&:not([data-side]),
|
|
559
|
-
&[data-side='bottom'] {
|
|
560
|
-
@apply mt-1 top-full;
|
|
561
|
-
}
|
|
562
|
-
&[data-side='top'] {
|
|
563
|
-
@apply mb-1 bottom-full;
|
|
564
|
-
}
|
|
565
|
-
&[data-side='left'] {
|
|
566
|
-
@apply mr-1 right-full;
|
|
567
|
-
}
|
|
568
|
-
&[data-side='right'] {
|
|
569
|
-
@apply ml-1 left-full;
|
|
570
|
-
}
|
|
571
|
-
&:not([data-side]),
|
|
572
|
-
&[data-side='bottom'],
|
|
573
|
-
&[data-side='top'] {
|
|
574
|
-
&:not([data-align]),
|
|
575
|
-
&[data-align='start'] {
|
|
576
|
-
@apply left-0;
|
|
577
|
-
}
|
|
578
|
-
&[data-align='end'] {
|
|
579
|
-
@apply right-0;
|
|
580
|
-
}
|
|
581
|
-
&[data-align='center'] {
|
|
582
|
-
@apply left-1/2 -translate-x-1/2;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
&[data-side='left'],
|
|
586
|
-
&[data-side='right'] {
|
|
587
|
-
&:not([data-align]),
|
|
588
|
-
&[data-align='start'] {
|
|
589
|
-
@apply top-0;
|
|
590
|
-
}
|
|
591
|
-
&[data-align='end'] {
|
|
592
|
-
@apply bottom-0;
|
|
593
|
-
}
|
|
594
|
-
&[data-align='center'] {
|
|
595
|
-
@apply top-1/2 -translate-y-1/2;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
[role='menuitem'],
|
|
599
|
-
[role='menuitemcheckbox'],
|
|
600
|
-
[role='menuitemradio'],
|
|
601
|
-
[role='option'] {
|
|
602
|
-
@apply aria-hidden:hidden [&_svg]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none [&_svg]:shrink-0 [&_svg]:size-4 aria-disabled:opacity-50 aria-disabled:pointer-events-none disabled:opacity-50 disabled:pointer-events-none w-full truncate;
|
|
603
|
-
}
|
|
604
|
-
[role='menuitem'],
|
|
605
|
-
[role='menuitemcheckbox'],
|
|
606
|
-
[role='menuitemradio'] {
|
|
607
|
-
@apply focus-visible:bg-accent focus-visible:text-accent-foreground hover:bg-accent hover:text-accent-foreground;
|
|
608
|
-
}
|
|
609
|
-
[role='option'] {
|
|
610
|
-
@apply data-[focus]:bg-accent data-[focus]:text-accent-foreground pr-7.5;
|
|
611
|
-
|
|
612
|
-
&[aria-selected='true'] {
|
|
613
|
-
@apply bg-[image:var(--check-icon)] bg-no-repeat bg-position-[center_right_0.5rem] bg-size-[0.875rem];
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
[role='menu'] [role='heading'] {
|
|
617
|
-
@apply flex px-2 py-1.5 text-sm font-medium;
|
|
618
|
-
}
|
|
619
|
-
[role='listbox'] [role='heading'] {
|
|
620
|
-
@apply flex text-muted-foreground px-2 py-1.5 text-xs;
|
|
621
|
-
}
|
|
622
|
-
[role='listbox'] [role='group']:not(:has([role='option']:not([aria-hidden='true']))) {
|
|
623
|
-
@apply hidden;
|
|
624
|
-
}
|
|
625
|
-
[role='separator'] {
|
|
626
|
-
@apply border-border -mx-1 my-1;
|
|
627
|
-
}
|
|
628
|
-
/* Combobox */
|
|
629
|
-
> header {
|
|
630
|
-
@apply flex h-9 items-center gap-2 border-b px-3 -mx-1 -mt-1 mb-1;
|
|
631
|
-
|
|
632
|
-
svg {
|
|
633
|
-
@apply size-4 shrink-0 opacity-50;
|
|
634
|
-
}
|
|
635
|
-
input[role='combobox'] {
|
|
636
|
-
@apply placeholder:text-muted-foreground flex h-10 flex-1 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 min-w-0;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
[role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
640
|
-
@apply flex items-center justify-center p-6 text-sm truncate;
|
|
641
|
-
}
|
|
642
|
-
[role='listbox'][data-empty]:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
643
|
-
@apply content-[attr(data-empty)];
|
|
644
|
-
}
|
|
645
|
-
[role='listbox']:not([data-empty]):not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
646
|
-
@apply content-['No_results_found'];
|
|
647
|
-
}
|
|
648
655
|
}
|
|
656
|
+
|
|
649
657
|
}
|
|
650
658
|
}
|
|
651
659
|
|
|
@@ -713,15 +721,67 @@
|
|
|
713
721
|
/* Select */
|
|
714
722
|
@layer components {
|
|
715
723
|
.form select,
|
|
716
|
-
.select {
|
|
724
|
+
select.select {
|
|
717
725
|
@apply appearance-none border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent pl-3 pr-9 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 h-9;
|
|
718
726
|
@apply bg-[image:var(--chevron-down-icon-50)] bg-no-repeat bg-position-[center_right_0.75rem] bg-size-[1rem];
|
|
727
|
+
|
|
728
|
+
option,
|
|
729
|
+
optgroup {
|
|
730
|
+
@apply bg-popover text-popover-foreground;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
*:not(select).select {
|
|
734
|
+
[popover].popover {
|
|
735
|
+
@apply p-1 min-w-[anchor-size(width)];
|
|
736
|
+
|
|
737
|
+
[role='option'] {
|
|
738
|
+
@apply aria-hidden:hidden [&_svg]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm pl-2 py-1.5 pr-7.5 text-sm outline-hidden select-none [&_svg]:shrink-0 [&_svg]:size-4 aria-disabled:opacity-50 aria-disabled:pointer-events-none disabled:opacity-50 disabled:pointer-events-none w-full truncate;
|
|
739
|
+
|
|
740
|
+
&[aria-selected='true'] {
|
|
741
|
+
@apply bg-[image:var(--check-icon)] bg-no-repeat bg-position-[center_right_0.5rem] bg-size-[0.875rem];
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
[role='listbox'] [role='heading'] {
|
|
745
|
+
@apply flex text-muted-foreground px-2 py-1.5 text-xs;
|
|
746
|
+
}
|
|
747
|
+
[role='listbox'] [role='group']:not(:has([role='option']:not([aria-hidden='true']))) {
|
|
748
|
+
@apply hidden;
|
|
749
|
+
}
|
|
750
|
+
[role='separator'] {
|
|
751
|
+
@apply border-border -mx-1 my-1;
|
|
752
|
+
}
|
|
753
|
+
> header {
|
|
754
|
+
@apply flex h-9 items-center gap-2 border-b px-3 -mx-1 -mt-1 mb-1;
|
|
755
|
+
|
|
756
|
+
svg {
|
|
757
|
+
@apply size-4 shrink-0 opacity-50;
|
|
758
|
+
}
|
|
759
|
+
input[role='combobox'] {
|
|
760
|
+
@apply placeholder:text-muted-foreground flex h-10 flex-1 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 min-w-0;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
[role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
764
|
+
@apply flex items-center justify-center p-6 text-sm truncate;
|
|
765
|
+
}
|
|
766
|
+
[role='listbox'][data-empty]:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
767
|
+
@apply content-[attr(data-empty)];
|
|
768
|
+
}
|
|
769
|
+
[role='listbox']:not([data-empty]):not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
770
|
+
@apply content-['No_results_found'];
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
[role='option']:hover,
|
|
775
|
+
&[data-select-initialized] [role='option'].active,
|
|
776
|
+
&[data-select-initialized] [role='option']:focus-visible {
|
|
777
|
+
@apply bg-accent text-accent-foreground;
|
|
778
|
+
}
|
|
719
779
|
}
|
|
720
780
|
}
|
|
721
781
|
|
|
722
782
|
/* Sidebar */
|
|
723
783
|
.sidebar {
|
|
724
|
-
|
|
784
|
+
&:not([data-sidebar-initialized]) {
|
|
725
785
|
@apply max-md:hidden;
|
|
726
786
|
}
|
|
727
787
|
&:not([aria-hidden]),
|
|
@@ -729,7 +789,10 @@
|
|
|
729
789
|
@apply max-md:bg-black/50 max-md:fixed max-md:inset-0 max-md:z-40;
|
|
730
790
|
}
|
|
731
791
|
nav {
|
|
732
|
-
@apply bg-sidebar text-sidebar-foreground flex flex-col w-(--sidebar-mobile-width) md:w-(--sidebar-width) fixed inset-y-0 transition-transform ease-in-out duration-300
|
|
792
|
+
@apply bg-sidebar text-sidebar-foreground flex flex-col w-(--sidebar-mobile-width) md:w-(--sidebar-width) fixed inset-y-0 z-50 transition-transform ease-in-out duration-300;
|
|
793
|
+
}
|
|
794
|
+
& + * {
|
|
795
|
+
@apply transition-[margin] ease-in-out duration-300;
|
|
733
796
|
}
|
|
734
797
|
&:not([data-side]),
|
|
735
798
|
&[data-side=left] {
|
|
@@ -737,7 +800,7 @@
|
|
|
737
800
|
@apply left-0 border-r;
|
|
738
801
|
}
|
|
739
802
|
& + * {
|
|
740
|
-
@apply relative md:ml-(--sidebar-width)
|
|
803
|
+
@apply relative md:ml-(--sidebar-width);
|
|
741
804
|
}
|
|
742
805
|
&[aria-hidden=true] {
|
|
743
806
|
nav {
|
|
@@ -753,7 +816,7 @@
|
|
|
753
816
|
@apply right-0 border-l;
|
|
754
817
|
}
|
|
755
818
|
& + * {
|
|
756
|
-
@apply relative md:mr-(--sidebar-width)
|
|
819
|
+
@apply relative md:mr-(--sidebar-width);
|
|
757
820
|
}
|
|
758
821
|
&[aria-hidden=true] {
|
|
759
822
|
nav {
|
|
@@ -925,7 +988,27 @@
|
|
|
925
988
|
@apply pointer-events-auto w-full mt-4 animate-[toast-up_0.3s_ease-in-out] grid grid-rows-[1fr] transition-[grid-template-rows,opacity,margin] duration-300 ease-in-out;
|
|
926
989
|
|
|
927
990
|
.toast-content {
|
|
928
|
-
@apply text-popover-foreground text-[13px] bg-popover border shadow-lg rounded-lg overflow-hidden;
|
|
991
|
+
@apply text-popover-foreground text-[13px] bg-popover border shadow-lg rounded-lg overflow-hidden flex gap-2.5 p-3 items-center;
|
|
992
|
+
|
|
993
|
+
svg {
|
|
994
|
+
@apply size-4 shrink-0;
|
|
995
|
+
}
|
|
996
|
+
section {
|
|
997
|
+
h2 {
|
|
998
|
+
@apply font-medium tracking-tight;
|
|
999
|
+
}
|
|
1000
|
+
p {
|
|
1001
|
+
@apply text-muted-foreground;
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
footer {
|
|
1005
|
+
@apply ml-auto flex flex-col gap-2;
|
|
1006
|
+
|
|
1007
|
+
[data-toast-action],
|
|
1008
|
+
[data-toast-cancel] {
|
|
1009
|
+
@apply h-6 px-2.5 text-xs;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
929
1012
|
}
|
|
930
1013
|
&[aria-hidden='true'] {
|
|
931
1014
|
@apply grid-rows-[0fr] opacity-0 m-0 border-0 p-0 overflow-hidden;
|