basecoat-css 1.0.0-beta.6 → 1.0.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/LICENSE.md +21 -0
- package/README.md +82 -35
- package/dist/base/base.css +3 -45
- package/dist/basecoat-base.cdn.css +226 -22
- package/dist/basecoat-base.cdn.min.css +1 -1
- package/dist/basecoat-compat.cdn.css +16 -20
- package/dist/basecoat-compat.cdn.min.css +1 -1
- package/dist/basecoat-components.css +2 -0
- package/dist/basecoat-luma.cdn.css +375 -91
- package/dist/basecoat-luma.cdn.min.css +1 -1
- package/dist/basecoat-lyra.cdn.css +358 -96
- package/dist/basecoat-lyra.cdn.min.css +1 -1
- package/dist/basecoat-maia.cdn.css +364 -84
- package/dist/basecoat-maia.cdn.min.css +1 -1
- package/dist/basecoat-mira.cdn.css +366 -94
- package/dist/basecoat-mira.cdn.min.css +1 -1
- package/dist/basecoat-nova.cdn.css +369 -96
- package/dist/basecoat-nova.cdn.min.css +1 -1
- package/dist/basecoat-rhea.cdn.css +376 -91
- package/dist/basecoat-rhea.cdn.min.css +1 -1
- package/dist/basecoat-sera.cdn.css +342 -71
- package/dist/basecoat-sera.cdn.min.css +1 -1
- package/dist/basecoat-vega.cdn.css +366 -92
- package/dist/basecoat-vega.cdn.min.css +1 -1
- package/dist/basecoat.cdn.css +366 -92
- package/dist/basecoat.cdn.min.css +1 -1
- package/dist/compat/legacy.css +19 -1
- package/dist/components/drawer.css +89 -0
- package/dist/components/input-group.css +1 -1
- package/dist/components/scrollbar.css +46 -0
- package/dist/components/select.css +16 -16
- package/dist/js/all.js +85 -0
- package/dist/js/all.min.js +1 -1
- package/dist/js/drawer.js +84 -0
- package/dist/js/drawer.min.js +1 -0
- package/dist/styles/luma.css +47 -14
- package/dist/styles/lyra.css +64 -14
- package/dist/styles/maia.css +47 -14
- package/dist/styles/mira.css +48 -15
- package/dist/styles/nova.css +64 -14
- package/dist/styles/rhea.css +47 -14
- package/dist/styles/sera.css +66 -16
- package/dist/styles/vega.css +64 -14
- package/package.json +28 -6
- package/templates/jinja/combobox.html.jinja +147 -0
- package/templates/jinja/command.html.jinja +210 -0
- package/templates/jinja/dialog.html.jinja +97 -0
- package/templates/jinja/dropdown-menu.html.jinja +130 -0
- package/templates/jinja/popover.html.jinja +51 -0
- package/templates/jinja/select.html.jinja +191 -0
- package/templates/jinja/sidebar.html.jinja +149 -0
- package/templates/jinja/tabs.html.jinja +82 -0
- package/templates/jinja/toast.html.jinja +139 -0
- package/templates/nunjucks/combobox.njk +157 -0
- package/templates/nunjucks/command.njk +203 -0
- package/templates/nunjucks/dialog.njk +92 -0
- package/templates/nunjucks/dropdown-menu.njk +125 -0
- package/templates/nunjucks/popover.njk +48 -0
- package/templates/nunjucks/select.njk +184 -0
- package/templates/nunjucks/sidebar.njk +144 -0
- package/templates/nunjucks/tabs.njk +39 -0
- package/templates/nunjucks/toast.njk +137 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const toMs = (value) => {
|
|
3
|
+
if (!value) return 0;
|
|
4
|
+
const trimmed = value.trim();
|
|
5
|
+
if (trimmed.endsWith('ms')) return parseFloat(trimmed) || 0;
|
|
6
|
+
if (trimmed.endsWith('s')) return (parseFloat(trimmed) || 0) * 1000;
|
|
7
|
+
return parseFloat(trimmed) || 0;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const maxTransitionMs = (element) => {
|
|
11
|
+
if (!element) return 0;
|
|
12
|
+
const styles = getComputedStyle(element);
|
|
13
|
+
const durations = styles.transitionDuration.split(',').map(toMs);
|
|
14
|
+
const delays = styles.transitionDelay.split(',').map(toMs);
|
|
15
|
+
return Math.max(0, ...durations.map((duration, index) => duration + (delays[index] || delays[0] || 0)));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const initDrawer = (drawer) => {
|
|
19
|
+
if (drawer.dataset.drawerInitialized) return;
|
|
20
|
+
|
|
21
|
+
const nativeClose = drawer.close.bind(drawer);
|
|
22
|
+
let pointerStartedOnBackdrop = false;
|
|
23
|
+
let closeTimer = null;
|
|
24
|
+
|
|
25
|
+
const finishClose = (returnValue) => {
|
|
26
|
+
window.clearTimeout(closeTimer);
|
|
27
|
+
closeTimer = null;
|
|
28
|
+
drawer.removeAttribute('data-closing');
|
|
29
|
+
nativeClose(returnValue);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
drawer.close = (returnValue = '') => {
|
|
33
|
+
if (!drawer.open) return;
|
|
34
|
+
if (drawer.dataset.closing) return;
|
|
35
|
+
|
|
36
|
+
const content = drawer.firstElementChild;
|
|
37
|
+
const duration = maxTransitionMs(content);
|
|
38
|
+
|
|
39
|
+
if (duration === 0 || window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
|
40
|
+
finishClose(returnValue);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
drawer.dataset.closing = 'true';
|
|
45
|
+
closeTimer = window.setTimeout(() => finishClose(returnValue), duration + 50);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const handleCancel = (event) => {
|
|
49
|
+
event.preventDefault();
|
|
50
|
+
drawer.close();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const handlePointerDown = (event) => {
|
|
54
|
+
pointerStartedOnBackdrop = event.target === drawer;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const handlePointerUp = (event) => {
|
|
58
|
+
if (pointerStartedOnBackdrop && event.target === drawer) {
|
|
59
|
+
drawer.close();
|
|
60
|
+
}
|
|
61
|
+
pointerStartedOnBackdrop = false;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
drawer.addEventListener('cancel', handleCancel);
|
|
65
|
+
drawer.addEventListener('pointerdown', handlePointerDown);
|
|
66
|
+
drawer.addEventListener('pointerup', handlePointerUp);
|
|
67
|
+
|
|
68
|
+
drawer._destroy = () => {
|
|
69
|
+
window.clearTimeout(closeTimer);
|
|
70
|
+
drawer.removeEventListener('cancel', handleCancel);
|
|
71
|
+
drawer.removeEventListener('pointerdown', handlePointerDown);
|
|
72
|
+
drawer.removeEventListener('pointerup', handlePointerUp);
|
|
73
|
+
drawer.close = nativeClose;
|
|
74
|
+
delete drawer._destroy;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
drawer.dataset.drawerInitialized = 'true';
|
|
78
|
+
drawer.dispatchEvent(new CustomEvent('basecoat:initialized'));
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
if (window.basecoat) {
|
|
82
|
+
window.basecoat.register('drawer', '.drawer:not([data-drawer-initialized])', initDrawer);
|
|
83
|
+
}
|
|
84
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{const e=e=>{if(!e)return 0;const t=e.trim();return t.endsWith("ms")?parseFloat(t)||0:t.endsWith("s")?1e3*(parseFloat(t)||0):parseFloat(t)||0},t=t=>{if(t.dataset.drawerInitialized)return;const n=t.close.bind(t);let r=!1,i=null;const a=e=>{window.clearTimeout(i),i=null,t.removeAttribute("data-closing"),n(e)};t.close=(n="")=>{if(!t.open)return;if(t.dataset.closing)return;const r=(t=>{if(!t)return 0;const n=getComputedStyle(t),r=n.transitionDuration.split(",").map(e),i=n.transitionDelay.split(",").map(e);return Math.max(0,...r.map(((e,t)=>e+(i[t]||i[0]||0))))})(t.firstElementChild);0===r||window.matchMedia("(prefers-reduced-motion: reduce)").matches?a(n):(t.dataset.closing="true",i=window.setTimeout((()=>a(n)),r+50))};const o=e=>{e.preventDefault(),t.close()},s=e=>{r=e.target===t},d=e=>{r&&e.target===t&&t.close(),r=!1};t.addEventListener("cancel",o),t.addEventListener("pointerdown",s),t.addEventListener("pointerup",d),t._destroy=()=>{window.clearTimeout(i),t.removeEventListener("cancel",o),t.removeEventListener("pointerdown",s),t.removeEventListener("pointerup",d),t.close=n,delete t._destroy},t.dataset.drawerInitialized="true",t.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("drawer",".drawer:not([data-drawer-initialized])",t)})();
|
package/dist/styles/luma.css
CHANGED
|
@@ -480,51 +480,51 @@
|
|
|
480
480
|
@apply mb-1 w-full;
|
|
481
481
|
}
|
|
482
482
|
/* Select */
|
|
483
|
-
|
|
483
|
+
.select:not(select) > button {
|
|
484
484
|
@apply bg-input/50 border-transparent focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 data-[size=sm]:h-8 gap-1.5 rounded-3xl border px-3 py-2 text-sm transition-[color,box-shadow,background-color] focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
|
|
487
|
+
.select:not(select) > button > span {
|
|
488
488
|
@apply gap-1.5;
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
-
|
|
491
|
+
.select:not(select) > button > svg {
|
|
492
492
|
@apply text-muted-foreground size-4;
|
|
493
493
|
}
|
|
494
494
|
|
|
495
|
-
|
|
495
|
+
.select:not(select) [data-popover] {
|
|
496
496
|
@apply bg-popover text-popover-foreground ring-foreground/5 dark:ring-foreground/10 rounded-3xl p-1.5 shadow-lg ring-1 duration-100;
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
|
|
500
500
|
|
|
501
501
|
|
|
502
|
-
|
|
502
|
+
.select:not(select) [role='listbox'] {
|
|
503
503
|
@apply scroll-py-1.5;
|
|
504
504
|
}
|
|
505
505
|
|
|
506
|
-
|
|
506
|
+
.select:not(select) [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
507
507
|
@apply py-6 text-center text-sm;
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
|
|
510
|
+
.select:not(select) [role='heading'] {
|
|
511
511
|
@apply text-muted-foreground px-3 py-2.5 text-xs;
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
-
|
|
514
|
+
.select:not(select) [role='option'] {
|
|
515
515
|
@apply gap-2.5 rounded-2xl py-2 ps-3 pe-8 text-sm font-medium [&_svg:not([class*='size-'])]:size-4;
|
|
516
516
|
}
|
|
517
517
|
|
|
518
|
-
|
|
519
|
-
|
|
518
|
+
.select:not(select) [role='option'].active,
|
|
519
|
+
.select:not(select) [role='option']:focus-visible {
|
|
520
520
|
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
-
|
|
523
|
+
.select:not(select) [role='group'] {
|
|
524
524
|
@apply scroll-my-1.5 p-1.5;
|
|
525
525
|
}
|
|
526
526
|
|
|
527
|
-
|
|
527
|
+
.select:not(select) [role='separator'] {
|
|
528
528
|
@apply bg-border -mx-1.5 my-1.5 h-px;
|
|
529
529
|
}
|
|
530
530
|
|
|
@@ -589,6 +589,39 @@
|
|
|
589
589
|
@apply text-muted-foreground text-sm text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a:hover]:text-foreground;
|
|
590
590
|
}
|
|
591
591
|
|
|
592
|
+
/* Drawer */
|
|
593
|
+
.drawer::backdrop {
|
|
594
|
+
@apply bg-black/30 backdrop-blur-sm;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.drawer > * {
|
|
598
|
+
@apply before:bg-popover before:border-border bg-transparent p-4 text-sm before:absolute before:inset-2 before:-z-10 before:rounded-4xl before:border before:shadow-xl;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.drawer > * > header {
|
|
602
|
+
@apply gap-0.5 p-4 text-start md:gap-1.5;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.drawer:not([data-side]) > * > header,
|
|
606
|
+
.drawer[data-side='bottom'] > * > header,
|
|
607
|
+
.drawer[data-side='top'] > * > header {
|
|
608
|
+
@apply text-center;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.drawer > * > footer {
|
|
612
|
+
@apply gap-2 p-4;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.drawer > * > header > h2,
|
|
616
|
+
.drawer > * > [data-title] {
|
|
617
|
+
@apply text-lg font-semibold leading-none tracking-tight;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.drawer > * > header > p,
|
|
621
|
+
.drawer > * > [data-description] {
|
|
622
|
+
@apply text-muted-foreground text-sm;
|
|
623
|
+
}
|
|
624
|
+
|
|
592
625
|
/* Dropdown Menu */
|
|
593
626
|
.dropdown-menu > [data-popover] {
|
|
594
627
|
@apply bg-popover text-popover-foreground ring-foreground/5 dark:ring-foreground/10 min-w-48 gap-0 overflow-x-hidden overflow-y-auto rounded-3xl p-1.5 shadow-lg ring-1 duration-100;
|
|
@@ -770,11 +803,11 @@
|
|
|
770
803
|
@apply bg-background rounded-full shadow-sm not-dark:bg-clip-padding;
|
|
771
804
|
}
|
|
772
805
|
|
|
773
|
-
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
|
806
|
+
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
|
774
807
|
@apply bg-foreground;
|
|
775
808
|
}
|
|
776
809
|
|
|
777
|
-
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
|
810
|
+
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
|
778
811
|
@apply bg-primary-foreground;
|
|
779
812
|
}
|
|
780
813
|
|
package/dist/styles/lyra.css
CHANGED
|
@@ -460,51 +460,51 @@
|
|
|
460
460
|
@apply mb-1 w-full;
|
|
461
461
|
}
|
|
462
462
|
/* Select */
|
|
463
|
-
|
|
463
|
+
.select:not(select) > button {
|
|
464
464
|
@apply border-input dark:bg-input/30 dark:hover:bg-input/50 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:aria-invalid:border-destructive/50 h-8 data-[size=sm]:h-7 gap-1.5 rounded-none data-[size=sm]:rounded-none border bg-transparent py-2 ps-2.5 pe-2 text-xs transition-colors select-none focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4;
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
|
|
467
|
+
.select:not(select) > button > span {
|
|
468
468
|
@apply gap-1.5;
|
|
469
469
|
}
|
|
470
470
|
|
|
471
|
-
|
|
471
|
+
.select:not(select) > button > svg {
|
|
472
472
|
@apply text-muted-foreground size-4;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
-
|
|
475
|
+
.select:not(select) [data-popover] {
|
|
476
476
|
@apply bg-popover text-popover-foreground ring-foreground/10 rounded-none shadow-md ring-1 duration-100;
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
|
|
480
480
|
|
|
481
481
|
|
|
482
|
-
|
|
482
|
+
.select:not(select) [role='listbox'] {
|
|
483
483
|
@apply scroll-py-1;
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
-
|
|
486
|
+
.select:not(select) [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
487
487
|
@apply py-6 text-center text-xs;
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
-
|
|
490
|
+
.select:not(select) [role='heading'] {
|
|
491
491
|
@apply text-muted-foreground px-2 py-2 text-xs;
|
|
492
492
|
}
|
|
493
493
|
|
|
494
|
-
|
|
494
|
+
.select:not(select) [role='option'] {
|
|
495
495
|
@apply gap-2 rounded-none py-2 ps-2 pe-8 text-xs [&_svg:not([class*='size-'])]:size-4;
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
|
|
499
|
-
|
|
498
|
+
.select:not(select) [role='option'].active,
|
|
499
|
+
.select:not(select) [role='option']:focus-visible {
|
|
500
500
|
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
|
501
501
|
}
|
|
502
502
|
|
|
503
|
-
|
|
503
|
+
.select:not(select) [role='group'] {
|
|
504
504
|
@apply scroll-my-1;
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
-
|
|
507
|
+
.select:not(select) [role='separator'] {
|
|
508
508
|
@apply bg-border -mx-1 h-px;
|
|
509
509
|
}
|
|
510
510
|
|
|
@@ -565,6 +565,56 @@
|
|
|
565
565
|
@apply text-muted-foreground text-xs/relaxed text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a:hover]:text-foreground;
|
|
566
566
|
}
|
|
567
567
|
|
|
568
|
+
/* Drawer */
|
|
569
|
+
.drawer::backdrop {
|
|
570
|
+
@apply bg-black/10 backdrop-blur-xs;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.drawer > * {
|
|
574
|
+
@apply bg-popover text-popover-foreground text-xs/relaxed;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.drawer:not([data-side]) > *,
|
|
578
|
+
.drawer[data-side='bottom'] > * {
|
|
579
|
+
@apply rounded-none border-t;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.drawer[data-side='top'] > * {
|
|
583
|
+
@apply rounded-none border-b;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.drawer[data-side='left'] > * {
|
|
587
|
+
@apply rounded-none border-r;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.drawer[data-side='right'] > * {
|
|
591
|
+
@apply rounded-none border-l;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.drawer > * > header {
|
|
595
|
+
@apply gap-0.5 p-4 text-start;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.drawer:not([data-side]) > * > header,
|
|
599
|
+
.drawer[data-side='bottom'] > * > header,
|
|
600
|
+
.drawer[data-side='top'] > * > header {
|
|
601
|
+
@apply text-center;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.drawer > * > footer {
|
|
605
|
+
@apply gap-2 p-4;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.drawer > * > header > h2,
|
|
609
|
+
.drawer > * > [data-title] {
|
|
610
|
+
@apply text-sm font-medium;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.drawer > * > header > p,
|
|
614
|
+
.drawer > * > [data-description] {
|
|
615
|
+
@apply text-muted-foreground text-xs/relaxed;
|
|
616
|
+
}
|
|
617
|
+
|
|
568
618
|
/* Dropdown Menu */
|
|
569
619
|
.dropdown-menu > [data-popover] {
|
|
570
620
|
@apply bg-popover text-popover-foreground ring-foreground/10 gap-0 overflow-x-hidden overflow-y-auto rounded-none p-0 shadow-md ring-1 duration-100;
|
|
@@ -750,11 +800,11 @@
|
|
|
750
800
|
@apply bg-background rounded-full;
|
|
751
801
|
}
|
|
752
802
|
|
|
753
|
-
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
|
803
|
+
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
|
754
804
|
@apply bg-foreground;
|
|
755
805
|
}
|
|
756
806
|
|
|
757
|
-
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
|
807
|
+
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
|
758
808
|
@apply bg-primary-foreground;
|
|
759
809
|
}
|
|
760
810
|
|
package/dist/styles/maia.css
CHANGED
|
@@ -472,51 +472,51 @@
|
|
|
472
472
|
@apply mb-1 w-full;
|
|
473
473
|
}
|
|
474
474
|
/* Select */
|
|
475
|
-
|
|
475
|
+
.select:not(select) > button {
|
|
476
476
|
@apply border-input bg-input/30 dark:hover:bg-input/50 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:aria-invalid:border-destructive/50 h-9 data-[size=sm]:h-8 gap-1.5 rounded-4xl border px-3 py-2 text-sm transition-colors focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4;
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
-
|
|
479
|
+
.select:not(select) > button > span {
|
|
480
480
|
@apply gap-1.5;
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
-
|
|
483
|
+
.select:not(select) > button > svg {
|
|
484
484
|
@apply text-muted-foreground size-4;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
|
|
487
|
+
.select:not(select) [data-popover] {
|
|
488
488
|
@apply bg-popover text-popover-foreground ring-foreground/5 rounded-2xl p-1 shadow-2xl ring-1 duration-100;
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
|
|
492
492
|
|
|
493
493
|
|
|
494
|
-
|
|
494
|
+
.select:not(select) [role='listbox'] {
|
|
495
495
|
@apply scroll-py-1;
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
|
|
498
|
+
.select:not(select) [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
499
499
|
@apply py-6 text-center text-sm;
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
|
|
502
|
+
.select:not(select) [role='heading'] {
|
|
503
503
|
@apply text-muted-foreground px-3 py-2.5 text-xs;
|
|
504
504
|
}
|
|
505
505
|
|
|
506
|
-
|
|
506
|
+
.select:not(select) [role='option'] {
|
|
507
507
|
@apply gap-2.5 rounded-xl py-2 ps-3 pe-8 text-sm [&_svg:not([class*='size-'])]:size-4;
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
|
|
511
|
-
|
|
510
|
+
.select:not(select) [role='option'].active,
|
|
511
|
+
.select:not(select) [role='option']:focus-visible {
|
|
512
512
|
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
-
|
|
515
|
+
.select:not(select) [role='group'] {
|
|
516
516
|
@apply scroll-my-1 p-1;
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
|
|
519
|
+
.select:not(select) [role='separator'] {
|
|
520
520
|
@apply bg-border/50 -mx-1 my-1 h-px;
|
|
521
521
|
}
|
|
522
522
|
|
|
@@ -577,6 +577,39 @@
|
|
|
577
577
|
@apply text-muted-foreground text-sm text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a:hover]:text-foreground;
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
+
/* Drawer */
|
|
581
|
+
.drawer::backdrop {
|
|
582
|
+
@apply bg-black/80 backdrop-blur-xs;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.drawer > * {
|
|
586
|
+
@apply before:bg-popover text-popover-foreground before:border-border bg-transparent p-4 text-sm before:absolute before:inset-2 before:-z-10 before:rounded-4xl before:border;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.drawer > * > header {
|
|
590
|
+
@apply gap-0.5 p-4 text-start md:gap-1.5;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.drawer:not([data-side]) > * > header,
|
|
594
|
+
.drawer[data-side='bottom'] > * > header,
|
|
595
|
+
.drawer[data-side='top'] > * > header {
|
|
596
|
+
@apply text-center;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.drawer > * > footer {
|
|
600
|
+
@apply gap-2 p-4;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.drawer > * > header > h2,
|
|
604
|
+
.drawer > * > [data-title] {
|
|
605
|
+
@apply text-lg font-semibold leading-none tracking-tight;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.drawer > * > header > p,
|
|
609
|
+
.drawer > * > [data-description] {
|
|
610
|
+
@apply text-muted-foreground text-sm;
|
|
611
|
+
}
|
|
612
|
+
|
|
580
613
|
/* Dropdown Menu */
|
|
581
614
|
.dropdown-menu > [data-popover] {
|
|
582
615
|
@apply bg-popover text-popover-foreground ring-foreground/5 dark:ring-foreground/10 min-w-48 gap-0 overflow-x-hidden overflow-y-auto rounded-2xl p-1 shadow-2xl ring-1 duration-100;
|
|
@@ -758,11 +791,11 @@
|
|
|
758
791
|
@apply bg-background rounded-full;
|
|
759
792
|
}
|
|
760
793
|
|
|
761
|
-
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
|
794
|
+
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
|
762
795
|
@apply bg-foreground;
|
|
763
796
|
}
|
|
764
797
|
|
|
765
|
-
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
|
798
|
+
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
|
766
799
|
@apply bg-primary-foreground;
|
|
767
800
|
}
|
|
768
801
|
|
package/dist/styles/mira.css
CHANGED
|
@@ -472,55 +472,55 @@
|
|
|
472
472
|
@apply mb-1 w-full;
|
|
473
473
|
}
|
|
474
474
|
/* Select */
|
|
475
|
-
|
|
475
|
+
.select:not(select) > button {
|
|
476
476
|
@apply border-input bg-input/20 dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-7 data-[size=sm]:h-6 data-[size=sm]:text-[0.625rem] gap-1.5 rounded-md border px-2 py-1.5 text-xs/relaxed transition-colors focus-visible:ring-2 aria-invalid:ring-2 [&_svg:not([class*='size-'])]:size-3.5;
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
-
|
|
479
|
+
.select:not(select) > button > span {
|
|
480
480
|
@apply gap-1.5;
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
-
|
|
483
|
+
.select:not(select) > button > svg {
|
|
484
484
|
@apply text-muted-foreground size-3.5;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
|
|
487
|
+
.select:not(select) [data-popover] {
|
|
488
488
|
@apply bg-popover text-popover-foreground ring-foreground/10 rounded-lg p-1 shadow-md ring-1 duration-100;
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
|
|
492
492
|
|
|
493
493
|
|
|
494
|
-
|
|
494
|
+
.select:not(select) [role='listbox'] {
|
|
495
495
|
@apply scroll-py-1;
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
|
|
498
|
+
.select:not(select) [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
499
499
|
@apply px-3 py-2 text-center text-xs;
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
|
|
502
|
+
.select:not(select) [role='heading'] {
|
|
503
503
|
@apply text-muted-foreground px-2 py-1.5 text-xs;
|
|
504
504
|
}
|
|
505
505
|
|
|
506
|
-
|
|
506
|
+
.select:not(select) [role='option'] {
|
|
507
507
|
@apply min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5;
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
|
|
510
|
+
.select:not(select) [role='option'][aria-selected='true'] {
|
|
511
511
|
@apply pe-8;
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
-
|
|
515
|
-
|
|
514
|
+
.select:not(select) [role='option'].active,
|
|
515
|
+
.select:not(select) [role='option']:focus-visible {
|
|
516
516
|
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
|
|
519
|
+
.select:not(select) [role='group'] {
|
|
520
520
|
@apply scroll-my-1 p-1;
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
-
|
|
523
|
+
.select:not(select) [role='separator'] {
|
|
524
524
|
@apply bg-border/50 -mx-1 my-1 h-px;
|
|
525
525
|
}
|
|
526
526
|
|
|
@@ -581,6 +581,39 @@
|
|
|
581
581
|
@apply text-muted-foreground text-xs/relaxed text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a:hover]:text-foreground;
|
|
582
582
|
}
|
|
583
583
|
|
|
584
|
+
/* Drawer */
|
|
585
|
+
.drawer::backdrop {
|
|
586
|
+
@apply bg-black/80 backdrop-blur-xs;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.drawer > * {
|
|
590
|
+
@apply before:bg-popover text-popover-foreground before:border-border bg-transparent p-2 text-xs/relaxed before:absolute before:inset-2 before:-z-10 before:rounded-xl before:border;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.drawer > * > header {
|
|
594
|
+
@apply gap-1 p-4 text-start;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.drawer:not([data-side]) > * > header,
|
|
598
|
+
.drawer[data-side='bottom'] > * > header,
|
|
599
|
+
.drawer[data-side='top'] > * > header {
|
|
600
|
+
@apply text-center;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.drawer > * > footer {
|
|
604
|
+
@apply gap-2 p-4;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.drawer > * > header > h2,
|
|
608
|
+
.drawer > * > [data-title] {
|
|
609
|
+
@apply text-sm font-medium;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.drawer > * > header > p,
|
|
613
|
+
.drawer > * > [data-description] {
|
|
614
|
+
@apply text-muted-foreground text-xs/relaxed;
|
|
615
|
+
}
|
|
616
|
+
|
|
584
617
|
/* Dropdown Menu */
|
|
585
618
|
.dropdown-menu > [data-popover] {
|
|
586
619
|
@apply bg-popover text-popover-foreground ring-foreground/10 gap-0 overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100;
|
|
@@ -762,11 +795,11 @@
|
|
|
762
795
|
@apply bg-background rounded-full;
|
|
763
796
|
}
|
|
764
797
|
|
|
765
|
-
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
|
798
|
+
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
|
766
799
|
@apply bg-foreground;
|
|
767
800
|
}
|
|
768
801
|
|
|
769
|
-
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
|
802
|
+
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
|
770
803
|
@apply bg-primary-foreground;
|
|
771
804
|
}
|
|
772
805
|
|