asta-ui 0.7.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,116 @@
1
+ /* Forms group: keyframes and the few states Tailwind classes can't express. Transform and opacity only,
2
+ * with the kit's easing. */
3
+
4
+ @keyframes asta-otp-drop { from { opacity: 0; transform: translateY(-7px) scale(0.9) } }
5
+ @keyframes asta-otp-caret { 0%, 100% { opacity: 1 } 50% { opacity: 0 } }
6
+ @keyframes asta-otp-wave { 0%, 100% { transform: translateY(0) } 35% { transform: translateY(-7px) } }
7
+ @keyframes asta-otp-shake { 0%, 100% { transform: translateX(0) } 20% { transform: translateX(-7px) } 40% { transform: translateX(6px) } 60% { transform: translateX(-4px) } 80% { transform: translateX(2px) } }
8
+ @keyframes asta-tag-in { from { transform: scale(0.6); opacity: 0 } }
9
+ @keyframes asta-tag-shake { 0%, 100% { transform: none } 20% { transform: translateX(-4px) } 40% { transform: translateX(4px) } 60% { transform: translateX(-3px) } 80% { transform: translateX(2px) } }
10
+ @keyframes asta-rating-pop { 0% { transform: scale(1) } 40% { transform: scale(1.3) } 100% { transform: scale(1) } }
11
+ @keyframes asta-combo-in { from { opacity: 0; transform: translateY(-4px) scale(0.97) } }
12
+ @keyframes asta-combo-chip { from { opacity: 0; transform: scale(0.8) } }
13
+ @keyframes asta-dp-in { from { opacity: 0; transform: translateY(-4px) scale(0.97) } }
14
+ @keyframes asta-dp-next { from { opacity: 0; transform: translateX(28px) } }
15
+ @keyframes asta-dp-prev { from { opacity: 0; transform: translateX(-28px) } }
16
+ @keyframes asta-dp-pop { 0% { opacity: 0; transform: scale(0.55) } 60% { opacity: 1; transform: scale(1.06) } 100% { transform: scale(1) } }
17
+ @keyframes asta-upload-row { from { opacity: 0; transform: translateY(8px) } }
18
+ @keyframes asta-upload-msg { from { opacity: 0; transform: translateY(-3px) } }
19
+ @keyframes asta-inline-tick { 0% { opacity: 0; transform: scale(0.6) } 18% { opacity: 1; transform: scale(1) } 80% { opacity: 1; transform: scale(1) } 100% { opacity: 0; transform: scale(1) } }
20
+
21
+ /* Copy button: the check draws itself in. */
22
+ .asta-copy-tick {
23
+ stroke-dasharray: 1;
24
+ stroke-dashoffset: 1;
25
+ transition: stroke-dashoffset 0.15s cubic-bezier(0.16, 1, 0.3, 1);
26
+ }
27
+ [data-state="copied"] .asta-copy-tick {
28
+ stroke-dashoffset: 0;
29
+ transition-duration: 0.42s;
30
+ transition-delay: 75ms;
31
+ }
32
+
33
+ /* Password: the eye's slash draws while the text is hidden, and each rule's tick draws when it passes. */
34
+ .asta-pw-slash {
35
+ stroke-dasharray: 1;
36
+ stroke-dashoffset: 0;
37
+ transition: stroke-dashoffset 0.3s cubic-bezier(0.16, 1, 0.3, 1);
38
+ }
39
+ [aria-pressed="true"] .asta-pw-slash { stroke-dashoffset: 1; }
40
+ .asta-pw-tick {
41
+ stroke-dasharray: 1;
42
+ stroke-dashoffset: 1;
43
+ transition: stroke-dashoffset 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
44
+ }
45
+ [data-on] .asta-pw-tick { stroke-dashoffset: 0; }
46
+
47
+ /* OTP */
48
+ .asta-otp-shake { animation: asta-otp-shake 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
49
+ [data-asta-otp-boxes][data-wave] [data-asta-otp-wave] { animation: asta-otp-wave 0.55s cubic-bezier(0.16, 1, 0.3, 1) var(--asta-otp-i, 0ms) both; }
50
+ .asta-otp-ch { animation: asta-otp-drop 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
51
+ .asta-otp-caret {
52
+ display: block;
53
+ width: 1.5px;
54
+ height: 1.5rem;
55
+ border-radius: 9999px;
56
+ background: var(--ink);
57
+ animation: asta-otp-caret 1.05s steps(1) infinite;
58
+ }
59
+
60
+ /* Tags */
61
+ .asta-tag-in { animation: asta-tag-in 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
62
+ .asta-tag-shake { animation: asta-tag-shake 0.4s ease; }
63
+
64
+ /* Rating: filled stars pop one after another. Each star carries its own animation-delay. */
65
+ .asta-rating-pop { animation: asta-rating-pop 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
66
+
67
+ /* Combobox */
68
+ [data-asta-combo] > [role="listbox"]:not([hidden]) { animation: asta-combo-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) both; }
69
+ .asta-combo-chip { animation: asta-combo-chip 0.24s cubic-bezier(0.16, 1, 0.3, 1) both; }
70
+
71
+ /* Date picker */
72
+ .asta-date-cal:not([hidden]) { animation: asta-dp-in 0.24s cubic-bezier(0.16, 1, 0.3, 1) both; }
73
+ .asta-dp-next { animation: asta-dp-next 0.34s cubic-bezier(0.16, 1, 0.3, 1) both; }
74
+ .asta-dp-prev { animation: asta-dp-prev 0.34s cubic-bezier(0.16, 1, 0.3, 1) both; }
75
+ .asta-dp-pop { animation: asta-dp-pop 0.36s cubic-bezier(0.16, 1, 0.3, 1) both; }
76
+
77
+ /* Range slider: a click on the track glides, a drag follows the pointer exactly. */
78
+ [data-asta-range][data-glide] [data-asta-range-fill],
79
+ [data-asta-range][data-glide] [data-asta-range-at] {
80
+ transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
81
+ }
82
+
83
+ /* File upload */
84
+ .asta-upload-row { animation: asta-upload-row 0.38s cubic-bezier(0.16, 1, 0.3, 1) both; }
85
+ [data-asta-upload-error]:not([hidden]) { animation: asta-upload-msg 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
86
+
87
+ /* Inline edit */
88
+ .asta-inline-tick { display: block; animation: asta-inline-tick 1.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
89
+
90
+ @media (prefers-reduced-motion: reduce) {
91
+ .asta-copy-tick,
92
+ .asta-pw-slash,
93
+ .asta-pw-tick,
94
+ [data-asta-range][data-glide] [data-asta-range-fill],
95
+ [data-asta-range][data-glide] [data-asta-range-at] {
96
+ transition: none !important;
97
+ }
98
+ .asta-otp-shake,
99
+ [data-asta-otp-boxes][data-wave] [data-asta-otp-wave],
100
+ .asta-otp-ch,
101
+ .asta-otp-caret,
102
+ .asta-tag-in,
103
+ .asta-tag-shake,
104
+ .asta-rating-pop,
105
+ [data-asta-combo] > [role="listbox"],
106
+ .asta-combo-chip,
107
+ .asta-date-cal,
108
+ .asta-dp-next,
109
+ .asta-dp-prev,
110
+ .asta-dp-pop,
111
+ .asta-upload-row,
112
+ [data-asta-upload-error] {
113
+ animation: none !important;
114
+ }
115
+ .asta-inline-tick { animation-name: none !important; opacity: 1; }
116
+ }