asta-ui 0.8.0 → 0.9.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.
@@ -0,0 +1,124 @@
1
+ /* Overlays: what Tailwind can't say. Keyframes, @starting-style, ::backdrop and top-layer transitions. */
2
+
3
+ @keyframes asta-nav-slide {
4
+ from { opacity: 0; transform: translateX(calc(var(--asta-dir, 1) * 24px)); }
5
+ }
6
+ @keyframes asta-nav-sheet { from { opacity: 0; transform: translateY(-6px); } }
7
+ @keyframes asta-nav-rise { from { opacity: 0; transform: translateY(6px); } }
8
+ @keyframes asta-announce-in { from { opacity: 0; transform: translateY(100%); } }
9
+ @keyframes asta-announce-out { to { opacity: 0; transform: translateY(-100%); } }
10
+ @keyframes asta-announce-close { to { opacity: 0; transform: translateY(-100%); } }
11
+ @keyframes asta-step-next { from { opacity: 0; transform: translateX(24px); } }
12
+ @keyframes asta-step-back { from { opacity: 0; transform: translateX(-24px); } }
13
+
14
+ /* Anchored panels in the top layer (popover, hover card, dropdown, context menu): grow from the trigger. */
15
+ .asta-float {
16
+ opacity: 0;
17
+ transform: translate(var(--asta-nx, 0px), var(--asta-ny, -4px)) scale(0.96);
18
+ transition:
19
+ opacity 0.14s ease-in,
20
+ transform 0.16s ease-in,
21
+ overlay 0.16s allow-discrete,
22
+ display 0.16s allow-discrete;
23
+ }
24
+ .asta-float:popover-open {
25
+ opacity: 1;
26
+ transform: none;
27
+ transition:
28
+ opacity 0.2s ease-out,
29
+ transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
30
+ overlay 0.32s allow-discrete,
31
+ display 0.32s allow-discrete;
32
+ }
33
+ @starting-style {
34
+ .asta-float:popover-open {
35
+ opacity: 0;
36
+ transform: translate(var(--asta-nx, 0px), var(--asta-ny, -4px)) scale(0.96);
37
+ }
38
+ }
39
+ /* The hover card rises a little more softly. */
40
+ .asta-float.asta-lift { transform: translateY(6px) scale(0.98); }
41
+ .asta-float.asta-lift:popover-open { transform: none; }
42
+ @starting-style {
43
+ .asta-float.asta-lift:popover-open { transform: translateY(6px) scale(0.98); }
44
+ }
45
+ .asta-float::backdrop { display: none; }
46
+
47
+ /* Drawer: slides in from its edge. Opacity stays 1 so only the slide shows; core's 320ms fallback ends the close. */
48
+ .asta-dialog.asta-drawer,
49
+ .asta-dialog.asta-drawer[open]:not([data-closing]) {
50
+ opacity: 1;
51
+ }
52
+ .asta-dialog.asta-drawer {
53
+ transform: translateX(calc(100% + 16px));
54
+ transition:
55
+ transform 0.3s cubic-bezier(0.7, 0, 0.84, 0),
56
+ overlay 0.32s allow-discrete,
57
+ display 0.32s allow-discrete;
58
+ }
59
+ .asta-dialog.asta-drawer[data-side="left"] { transform: translateX(calc(-100% - 16px)); }
60
+ .asta-dialog.asta-drawer[data-side="bottom"] { transform: translateY(calc(100% + 16px)); }
61
+ .asta-dialog.asta-drawer[open]:not([data-closing]) {
62
+ transform: none;
63
+ transition:
64
+ transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
65
+ overlay 0.5s allow-discrete,
66
+ display 0.5s allow-discrete;
67
+ }
68
+ @starting-style {
69
+ .asta-dialog.asta-drawer[open] { opacity: 1; transform: translateX(calc(100% + 16px)); }
70
+ .asta-dialog.asta-drawer[data-side="left"][open] { transform: translateX(calc(-100% - 16px)); }
71
+ .asta-dialog.asta-drawer[data-side="bottom"][open] { transform: translateY(calc(100% + 16px)); }
72
+ }
73
+ .asta-dialog.asta-drawer[open]:not([data-closing])::backdrop {
74
+ opacity: var(--asta-drawer-fade, 1);
75
+ }
76
+ :root:has(dialog.asta-drawer[open]) { overflow: hidden; }
77
+
78
+ /* Command palette drops in from above. */
79
+ .asta-dialog.asta-cmd { transform: translateY(-8px) scale(0.97); }
80
+ .asta-dialog.asta-cmd[open]:not([data-closing]) { transform: none; }
81
+ @starting-style {
82
+ .asta-dialog.asta-cmd[open] { transform: translateY(-8px) scale(0.97); }
83
+ }
84
+
85
+ /* Navbar: the background scales between panel sizes, new content slides in from the side you moved toward. */
86
+ [data-asta-nav-bg] {
87
+ transform-origin: top center;
88
+ transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
89
+ }
90
+ .asta-nav-slide { animation: asta-nav-slide 0.36s cubic-bezier(0.16, 1, 0.3, 1); }
91
+ [data-asta-nav-sheet]:not([hidden]) { animation: asta-nav-sheet 0.32s cubic-bezier(0.16, 1, 0.3, 1); }
92
+ details[open] > .asta-nav-sec { animation: asta-nav-rise 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
93
+
94
+ /* Announcement bar: messages rise in, the old one leaves upward; closing lifts the bar away. */
95
+ [data-asta-announce-msg] { opacity: 0; pointer-events: none; }
96
+ [data-asta-announce-msg][data-state="cur"],
97
+ [data-asta-announce-msg][data-state="in"] { opacity: 1; pointer-events: auto; }
98
+ [data-asta-announce-msg][data-state="in"] { animation: asta-announce-in 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
99
+ [data-asta-announce-msg][data-state="out"] { animation: asta-announce-out 0.4s cubic-bezier(0.7, 0, 0.84, 0); }
100
+ [data-asta-announce][data-state="closed"] {
101
+ pointer-events: none;
102
+ animation: asta-announce-close 0.36s cubic-bezier(0.7, 0, 0.84, 0) forwards;
103
+ }
104
+
105
+ /* Stepper: the next panel comes from the side you're heading. */
106
+ .asta-step-next { animation: asta-step-next 0.42s cubic-bezier(0.16, 1, 0.3, 1); }
107
+ .asta-step-back { animation: asta-step-back 0.42s cubic-bezier(0.16, 1, 0.3, 1); }
108
+
109
+ @media (prefers-reduced-motion: reduce) {
110
+ .asta-float,
111
+ .asta-dialog.asta-drawer,
112
+ .asta-dialog.asta-cmd,
113
+ [data-asta-nav-bg],
114
+ .asta-nav-slide,
115
+ [data-asta-nav-sheet],
116
+ details[open] > .asta-nav-sec,
117
+ [data-asta-announce-msg],
118
+ [data-asta-announce],
119
+ .asta-step-next,
120
+ .asta-step-back {
121
+ transition: none !important;
122
+ animation: none !important;
123
+ }
124
+ }