asta-ui 0.8.0 → 0.9.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/css/asta.css +1 -1
- package/css/asta.js +9 -9
- package/css/components.css +88 -88
- package/css/runtime/blocks.css +101 -0
- package/css/runtime/blocks.js +511 -0
- package/css/runtime/core.css +120 -0
- package/css/runtime/core.js +441 -0
- package/css/runtime/data.css +156 -0
- package/css/runtime/data.js +1017 -0
- package/css/runtime/forms.css +116 -0
- package/css/runtime/forms.js +1459 -0
- package/css/runtime/overlays.css +124 -0
- package/css/runtime/overlays.js +1310 -0
- package/css/src/blocks.css +9 -9
- package/css/src/core.css +15 -15
- package/css/src/data.css +12 -12
- package/css/src/display.css +16 -16
- package/css/src/forms.css +16 -16
- package/css/src/overlays.css +15 -15
- package/package.json +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/* Data components: tree, timeline, kanban, calendar, file card, image compare, carousel, notification center,
|
|
2
|
+
* comments, motion button. Transform and opacity only, the kit easing, and nothing moves for reduced motion. */
|
|
3
|
+
|
|
4
|
+
@keyframes asta-tree-in { from { opacity: 0; transform: translateY(-4px) } }
|
|
5
|
+
@keyframes asta-timeline-in { from { opacity: 0; transform: translateY(8px) } }
|
|
6
|
+
@keyframes asta-timeline-line { from { transform: scaleY(0) } }
|
|
7
|
+
@keyframes asta-timeline-ping { 0% { opacity: 0.45; transform: scale(1) } 70%, 100% { opacity: 0; transform: scale(2.6) } }
|
|
8
|
+
@keyframes asta-kanban-count { from { opacity: 0; transform: translateY(4px) } }
|
|
9
|
+
@keyframes asta-kanban-gap { from { opacity: 0 } }
|
|
10
|
+
@keyframes asta-cal-next { from { opacity: 0; transform: translateX(32px) } }
|
|
11
|
+
@keyframes asta-cal-prev { from { opacity: 0; transform: translateX(-32px) } }
|
|
12
|
+
@keyframes asta-cal-up { from { opacity: 0; transform: translateY(6px) } }
|
|
13
|
+
@keyframes asta-file-star { 0% { transform: scale(0.6) } 55% { transform: scale(1.25) } 100% { transform: scale(1) } }
|
|
14
|
+
@keyframes asta-carousel-fill { from { transform: scaleX(0) } to { transform: scaleX(1) } }
|
|
15
|
+
@keyframes asta-nc-ring { 0%, 100% { transform: rotate(0) } 15% { transform: rotate(14deg) } 30% { transform: rotate(-11deg) } 45% { transform: rotate(7deg) } 60% { transform: rotate(-4deg) } 75% { transform: rotate(2deg) } }
|
|
16
|
+
@keyframes asta-nc-count { from { opacity: 0; transform: translateY(70%) } }
|
|
17
|
+
@keyframes asta-nc-in { from { opacity: 0; transform: translateY(6px) } }
|
|
18
|
+
@keyframes asta-comment-in { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
|
|
19
|
+
@keyframes asta-comment-pop { 0% { transform: scale(0.6) } 55% { transform: scale(1.25) } 100% { transform: none } }
|
|
20
|
+
@keyframes asta-comment-roll { from { opacity: 0; transform: translateY(70%) } to { opacity: 1; transform: none } }
|
|
21
|
+
@keyframes asta-mb-beam { to { transform: rotate(1turn) } }
|
|
22
|
+
@keyframes asta-mb-shine { from { transform: translateX(-120%) skewX(-20deg) } to { transform: translateX(340%) skewX(-20deg) } }
|
|
23
|
+
@keyframes asta-mb-shine-2 { from { transform: translateX(-120%) skewX(-20deg) } to { transform: translateX(340%) skewX(-20deg) } }
|
|
24
|
+
@keyframes asta-mb-drain { from { transform: scaleX(1) } to { transform: scaleX(0) } }
|
|
25
|
+
@keyframes asta-mb-pop { 0% { transform: scale(0.4); opacity: 0 } 60% { transform: scale(1.15) } 100% { transform: scale(1); opacity: 1 } }
|
|
26
|
+
|
|
27
|
+
/* Tree: children of a folder the user just opened fade in, one after another. */
|
|
28
|
+
[data-asta-tree] [role="group"][data-opened] > li {
|
|
29
|
+
animation: asta-tree-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
30
|
+
animation-delay: calc(var(--i, 0) * 24ms);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Timeline: hold the reveal until the list is on screen. */
|
|
34
|
+
.asta-timeline[data-inview="false"] .asta-timeline-a { animation-play-state: paused; }
|
|
35
|
+
|
|
36
|
+
/* Kanban */
|
|
37
|
+
[data-asta-kanban-gap] {
|
|
38
|
+
border-radius: 10px;
|
|
39
|
+
background: color-mix(in srgb, var(--brand) 5%, transparent);
|
|
40
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent);
|
|
41
|
+
animation: asta-kanban-gap 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
}
|
|
44
|
+
[data-asta-kanban-count][data-bump] { animation: asta-kanban-count 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
45
|
+
|
|
46
|
+
/* Event calendar: a new month slides in from the side you moved to, the day list rises in. */
|
|
47
|
+
[data-asta-cal-grid][data-dir="next"] { animation: asta-cal-next 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
48
|
+
[data-asta-cal-grid][data-dir="prev"] { animation: asta-cal-prev 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
49
|
+
[data-asta-cal-panel]:not([hidden]) { animation: asta-cal-up 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
50
|
+
[data-asta-cal-panel]:not([hidden]) [data-asta-cal-item] {
|
|
51
|
+
animation: asta-cal-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
52
|
+
animation-delay: calc(var(--i, 0) * 45ms);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* File card: the star pops when it turns on. */
|
|
56
|
+
[data-asta-file-star][aria-pressed="true"][data-popped] .asta-file-star { animation: asta-file-star 0.42s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
57
|
+
|
|
58
|
+
/* Image compare: the before window slides with the handle and its picture slides back, so only transforms move. */
|
|
59
|
+
.asta-compare-win { transform: translateX(calc(var(--pos) * 1% - 100%)); }
|
|
60
|
+
.asta-compare-pic { transform: translateX(calc(100% - var(--pos) * 1%)); }
|
|
61
|
+
.asta-compare-track { transform: translateX(calc(var(--pos) * 1%)); }
|
|
62
|
+
.asta-compare-win,
|
|
63
|
+
.asta-compare-pic,
|
|
64
|
+
.asta-compare-track { transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
65
|
+
[data-asta-compare][data-dragging] :is(.asta-compare-win, .asta-compare-pic, .asta-compare-track) { transition: none; }
|
|
66
|
+
|
|
67
|
+
/* Carousel: native scroll snap with the scrollbar hidden. The active bar fills over the autoplay time. */
|
|
68
|
+
.asta-carousel-track { scrollbar-width: none; }
|
|
69
|
+
.asta-carousel-track::-webkit-scrollbar { display: none; }
|
|
70
|
+
[data-asta-carousel][data-autoplay] [aria-current] .asta-carousel-fill {
|
|
71
|
+
animation: asta-carousel-fill var(--asta-autoplay, 5000ms) linear both;
|
|
72
|
+
}
|
|
73
|
+
[data-asta-carousel][data-autoplay]:not([data-playing]) [aria-current] .asta-carousel-fill { animation-play-state: paused; }
|
|
74
|
+
[data-asta-carousel][data-autoplay] .asta-carousel-fill { transform: scaleX(0); }
|
|
75
|
+
|
|
76
|
+
/* Notification center */
|
|
77
|
+
[data-asta-nc-panel] {
|
|
78
|
+
opacity: 0;
|
|
79
|
+
transform: translateY(-4px) scale(0.98);
|
|
80
|
+
transform-origin: top right;
|
|
81
|
+
transition:
|
|
82
|
+
opacity 0.14s ease-in,
|
|
83
|
+
transform 0.16s ease-in;
|
|
84
|
+
}
|
|
85
|
+
[data-asta-nc][data-align="start"] [data-asta-nc-panel] { transform-origin: top left; }
|
|
86
|
+
[data-asta-nc][data-open] [data-asta-nc-panel] {
|
|
87
|
+
opacity: 1;
|
|
88
|
+
transform: none;
|
|
89
|
+
transition:
|
|
90
|
+
opacity 0.2s ease-out,
|
|
91
|
+
transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
92
|
+
}
|
|
93
|
+
@starting-style {
|
|
94
|
+
[data-asta-nc][data-open] [data-asta-nc-panel] {
|
|
95
|
+
opacity: 0;
|
|
96
|
+
transform: translateY(-4px) scale(0.98);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
[data-asta-nc-panel][data-tab="unread"] .asta-nc-thumb { transform: translateX(100%); }
|
|
100
|
+
[data-asta-nc-panel][data-tab="unread"] [data-asta-nc-entry][data-read]:not([data-keep]),
|
|
101
|
+
[data-asta-nc-panel][data-tab="unread"] [data-asta-nc-group]:not(:has([data-asta-nc-entry]:not([data-read]), [data-keep])) { display: none; }
|
|
102
|
+
[data-asta-nc-list][data-fresh] > li { animation: asta-nc-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
|
|
103
|
+
.asta-nc-ring { animation: asta-nc-ring 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
104
|
+
[data-asta-nc-count][data-bump] { animation: asta-nc-count 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
105
|
+
|
|
106
|
+
/* Comments */
|
|
107
|
+
.asta-comment-new { animation: asta-comment-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
|
|
108
|
+
[data-asta-comment-like][data-popped][aria-pressed="true"] .asta-comment-heart { animation: asta-comment-pop 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
109
|
+
[data-asta-comment-like][data-popped] [data-asta-comment-likes] { animation: asta-comment-roll 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
110
|
+
|
|
111
|
+
/* Motion button */
|
|
112
|
+
.asta-mb-fill {
|
|
113
|
+
clip-path: circle(0% at var(--fx, 50%) var(--fy, 50%));
|
|
114
|
+
transition: clip-path 0.5s cubic-bezier(0.16, 1, 0.3, 1);
|
|
115
|
+
}
|
|
116
|
+
[data-asta-mb="fill"]:hover .asta-mb-fill,
|
|
117
|
+
[data-asta-mb="fill"]:focus-visible .asta-mb-fill { clip-path: circle(150% at var(--fx, 50%) var(--fy, 50%)); }
|
|
118
|
+
.asta-mb-grow {
|
|
119
|
+
clip-path: inset(0 0 0 calc(100% - 32px) round 7px);
|
|
120
|
+
transition: clip-path 0.5s cubic-bezier(0.16, 1, 0.3, 1);
|
|
121
|
+
}
|
|
122
|
+
[data-asta-mb="arrow"]:hover .asta-mb-grow,
|
|
123
|
+
[data-asta-mb="arrow"]:focus-visible .asta-mb-grow { clip-path: inset(0 round 7px); }
|
|
124
|
+
.asta-mb-shine { animation: asta-mb-shine 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
|
|
125
|
+
[data-asta-mb="shine"][data-shine] .asta-mb-shine { animation-name: asta-mb-shine-2; }
|
|
126
|
+
.asta-mb-beam {
|
|
127
|
+
background: conic-gradient(from 0deg, transparent 0 32%, var(--brand) 50%, transparent 50% 82%, var(--brand) 100%);
|
|
128
|
+
animation: asta-mb-beam 3s linear infinite;
|
|
129
|
+
}
|
|
130
|
+
[data-asta-mb="beam"]:hover .asta-mb-beam { animation-duration: 1.2s; }
|
|
131
|
+
[data-asta-mb="beam"][data-offscreen] .asta-mb-beam { animation-play-state: paused; }
|
|
132
|
+
[data-asta-mb] .asta-mb-pop { animation: asta-mb-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
|
|
133
|
+
[data-asta-mb="confirm"][data-stage="ask"] .asta-mb-drain { animation: asta-mb-drain var(--asta-timeout, 3000ms) linear both; }
|
|
134
|
+
|
|
135
|
+
@media (prefers-reduced-motion: reduce) {
|
|
136
|
+
[data-asta-tree] [role="group"][data-opened] > li,
|
|
137
|
+
.asta-timeline .asta-timeline-a,
|
|
138
|
+
.asta-timeline .asta-timeline-ping,
|
|
139
|
+
.asta-kanban *,
|
|
140
|
+
.asta-cal *,
|
|
141
|
+
[data-asta-file-star] *,
|
|
142
|
+
.asta-carousel *,
|
|
143
|
+
.asta-nc *,
|
|
144
|
+
.asta-comments,
|
|
145
|
+
.asta-comments *,
|
|
146
|
+
.asta-motion,
|
|
147
|
+
.asta-motion * {
|
|
148
|
+
animation: none !important;
|
|
149
|
+
transition-duration: 0s !important;
|
|
150
|
+
}
|
|
151
|
+
.asta-compare-win,
|
|
152
|
+
.asta-compare-pic,
|
|
153
|
+
.asta-compare-track,
|
|
154
|
+
[data-asta-nc-panel] { transition: none !important; }
|
|
155
|
+
[data-asta-carousel][data-autoplay] .asta-carousel-fill { transform: none; }
|
|
156
|
+
}
|