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.
- package/css/asta.css +3 -0
- package/css/asta.js +4748 -0
- package/css/components.css +5805 -0
- 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 +919 -0
- package/css/src/core.css +702 -0
- package/css/src/data.css +965 -0
- package/css/src/display.css +681 -0
- package/css/src/forms.css +861 -0
- package/css/src/overlays.css +1114 -0
- package/css/tokens.css +140 -0
- package/package.json +3 -1
|
@@ -0,0 +1,1114 @@
|
|
|
1
|
+
/* Overlays: drawer, popover, hover card, dropdown and context menus, command palette, navbar, sidebar,
|
|
2
|
+
* workspace switcher, footer, announcement bar, stepper and tool dock.
|
|
3
|
+
* Class lists mirror the React kit. asta.js drives them through data-* and aria-* attributes, and the
|
|
4
|
+
* runtime classes (asta-dialog, asta-drawer, asta-cmd, asta-float, asta-lift, asta-nav-sec) carry the motion,
|
|
5
|
+
* so keep those in the markup. */
|
|
6
|
+
|
|
7
|
+
/* ---- Drawer ----
|
|
8
|
+
* <dialog id="filters" class="asta-dialog asta-drawer" data-side="right"> <div class="asta-drawer-inner">…</div>
|
|
9
|
+
* <button class="asta-drawer-close" data-asta-close aria-label="Close">…</button></dialog>
|
|
10
|
+
* Open it with <button data-asta-open="filters">. data-side: right (default) left bottom. */
|
|
11
|
+
.asta-drawer {
|
|
12
|
+
@apply fixed max-h-none overflow-hidden rounded-[14px] bg-paper p-0 text-ink outline-none;
|
|
13
|
+
@apply shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent),0_24px_64px_-24px_color-mix(in_srgb,var(--ink)_45%,transparent)];
|
|
14
|
+
@apply m-0 max-w-none top-2 bottom-auto right-2 left-auto h-[calc(100%-16px)] w-[min(400px,calc(100%-48px))];
|
|
15
|
+
&[data-side="left"] {
|
|
16
|
+
@apply left-2 right-auto;
|
|
17
|
+
}
|
|
18
|
+
&[data-side="bottom"] {
|
|
19
|
+
@apply my-0 mx-auto top-auto bottom-2 inset-x-2 h-auto w-[calc(100%-16px)] max-w-[520px];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.asta-drawer-inner {
|
|
23
|
+
@apply flex h-full flex-col;
|
|
24
|
+
.asta-drawer[data-side="bottom"] > & {
|
|
25
|
+
@apply h-auto max-h-[calc(100dvh-56px)];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.asta-drawer-handle {
|
|
29
|
+
@apply flex shrink-0 justify-center pb-1 pt-2.5 [touch-action:none];
|
|
30
|
+
&[data-asta-drawer-handle] {
|
|
31
|
+
@apply cursor-grab active:cursor-grabbing;
|
|
32
|
+
}
|
|
33
|
+
& > span {
|
|
34
|
+
@apply h-1 w-9 rounded-full bg-[color-mix(in_srgb,var(--ink)_16%,transparent)];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.asta-drawer-header {
|
|
38
|
+
@apply flex shrink-0 items-start justify-between gap-4 pl-5 pr-14 pt-5;
|
|
39
|
+
.asta-drawer[data-side="bottom"] & {
|
|
40
|
+
@apply pt-2;
|
|
41
|
+
}
|
|
42
|
+
& > div {
|
|
43
|
+
@apply min-w-0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.asta-drawer-title {
|
|
47
|
+
@apply text-[16px] font-medium tracking-[-0.02em] text-ink;
|
|
48
|
+
}
|
|
49
|
+
.asta-drawer-description {
|
|
50
|
+
@apply mt-1 text-[13.5px] leading-relaxed text-mute;
|
|
51
|
+
}
|
|
52
|
+
.asta-drawer-body {
|
|
53
|
+
@apply min-h-0 flex-1 overflow-y-auto overscroll-contain px-5 pb-5 pt-4;
|
|
54
|
+
}
|
|
55
|
+
.asta-drawer-footer {
|
|
56
|
+
@apply flex shrink-0 flex-col-reverse gap-2 px-5 pb-5 sm:flex-row sm:justify-end;
|
|
57
|
+
}
|
|
58
|
+
.asta-drawer-close {
|
|
59
|
+
@apply absolute right-3.5 top-4 flex h-8 w-8 items-center justify-center rounded-lg text-mute outline-none transition-colors duration-200 hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50 [&>svg]:h-3.5 [&>svg]:w-3.5;
|
|
60
|
+
.asta-drawer[data-side="bottom"] > & {
|
|
61
|
+
@apply top-[22px];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* ---- Popover ----
|
|
66
|
+
* <button popovertarget="share" aria-haspopup="dialog">Share</button>
|
|
67
|
+
* <div id="share" popover="auto" role="dialog" data-asta-popover data-side="bottom" data-align="center"
|
|
68
|
+
* class="asta-float asta-popover"><svg class="asta-popover-arrow" data-asta-arrow>…</svg>…</div> */
|
|
69
|
+
.asta-popover {
|
|
70
|
+
@apply fixed inset-auto m-0 w-max max-w-[calc(100vw-16px)] overflow-visible rounded-xl bg-paper p-3 text-ink outline-none;
|
|
71
|
+
@apply shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_14px_36px_-14px_rgb(0_0_0/0.3),0_4px_10px_-6px_rgb(0_0_0/0.12)];
|
|
72
|
+
}
|
|
73
|
+
.asta-popover-arrow {
|
|
74
|
+
@apply pointer-events-none absolute left-0 top-0 origin-center;
|
|
75
|
+
& > path:first-child {
|
|
76
|
+
@apply fill-paper;
|
|
77
|
+
}
|
|
78
|
+
& > path + path {
|
|
79
|
+
@apply fill-none stroke-[color-mix(in_srgb,var(--ink)_12%,transparent)];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* ---- Hover card ----
|
|
84
|
+
* <a href="/sam" data-asta-hovercard-for="sam">Sam</a>
|
|
85
|
+
* <div id="sam" popover="manual" role="dialog" aria-modal="false" data-asta-hovercard data-side="bottom"
|
|
86
|
+
* data-align="center" class="asta-float asta-lift asta-hover-card">…</div> */
|
|
87
|
+
.asta-hover-card {
|
|
88
|
+
@apply fixed inset-auto m-0 w-[300px] max-w-[calc(100vw-16px)] overflow-visible rounded-xl bg-paper p-4 text-ink outline-none;
|
|
89
|
+
@apply shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_18px_44px_-16px_rgb(0_0_0/0.32),0_4px_10px_-6px_rgb(0_0_0/0.12)];
|
|
90
|
+
@apply before:absolute before:inset-x-0 before:h-[var(--asta-gap,10px)] before:content-[''] data-[placed=bottom]:before:bottom-full data-[placed=top]:before:top-full;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ---- Top-layer menu panel ----
|
|
94
|
+
* Shared by dropdowns, submenus, context menus and the workspace switchers. Items are core's .asta-menu-item.
|
|
95
|
+
* <div role="menu" popover="manual" tabindex="-1" data-asta-mpanel class="asta-float asta-dropdown-panel">…</div> */
|
|
96
|
+
.asta-dropdown-panel {
|
|
97
|
+
@apply fixed inset-auto m-0 min-w-[232px] max-w-[calc(100vw-16px)] overflow-visible rounded-xl bg-paper p-1.5 text-left text-ink outline-none;
|
|
98
|
+
@apply shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_12px_32px_-12px_rgb(0_0_0/0.28),0_4px_10px_-6px_rgb(0_0_0/0.12)];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* ---- Dropdown menu ----
|
|
102
|
+
* <div class="asta-dropdown" data-asta-dropdown>
|
|
103
|
+
* <button class="asta-btn asta-btn-outline asta-dropdown-trigger" data-asta-dropdown-trigger aria-haspopup="menu"
|
|
104
|
+
* aria-expanded="false" aria-controls="view">View <svg class="asta-dropdown-chevron">…</svg></button>
|
|
105
|
+
* <div id="view" role="menu" popover="manual" tabindex="-1" data-asta-mpanel class="asta-float asta-dropdown-panel">…</div>
|
|
106
|
+
* </div>
|
|
107
|
+
* data-align="end" on the root pins the panel to the right edge. */
|
|
108
|
+
.asta-dropdown {
|
|
109
|
+
@apply relative inline-flex;
|
|
110
|
+
}
|
|
111
|
+
.asta-dropdown-trigger {
|
|
112
|
+
[data-asta-dropdown][data-open] > & {
|
|
113
|
+
@apply bg-paper-2;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.asta-dropdown-icon {
|
|
117
|
+
@apply -ml-0.5 inline-flex shrink-0 [&_svg]:h-[1.1em] [&_svg]:w-[1.1em];
|
|
118
|
+
.asta-btn-icon > & {
|
|
119
|
+
@apply ml-0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
.asta-dropdown-chevron {
|
|
123
|
+
@apply -mr-1 h-3.5 w-3.5 text-mute transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
|
|
124
|
+
[data-asta-dropdown][data-open] > .asta-dropdown-trigger > & {
|
|
125
|
+
@apply rotate-180;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/* Submenu: <div class="asta-dropdown-sub" data-asta-menu-sub><button role="menuitem" aria-haspopup="menu"
|
|
129
|
+
* aria-expanded="false" class="asta-menu-item asta-dropdown-sub-trigger">…</button><div role="menu" … class="asta-float
|
|
130
|
+
* asta-dropdown-panel asta-dropdown-sub-panel">…</div></div> */
|
|
131
|
+
.asta-dropdown-sub {
|
|
132
|
+
@apply relative;
|
|
133
|
+
}
|
|
134
|
+
.asta-dropdown-sub-trigger {
|
|
135
|
+
@apply aria-expanded:bg-paper-2;
|
|
136
|
+
}
|
|
137
|
+
/* The submenu trigger keeps its icon dark while the submenu is open. */
|
|
138
|
+
.asta-dropdown-sub-trigger[aria-expanded="true"] > .asta-menu-item-icon {
|
|
139
|
+
@apply text-ink;
|
|
140
|
+
}
|
|
141
|
+
.asta-dropdown-sub-chevron {
|
|
142
|
+
@apply -mr-1 h-3.5 w-3.5 text-mute;
|
|
143
|
+
}
|
|
144
|
+
.asta-dropdown-sub-panel {
|
|
145
|
+
@apply min-w-[200px];
|
|
146
|
+
}
|
|
147
|
+
/* Checkbox and radio items: <button role="menuitemcheckbox" aria-checked="true" class="asta-menu-item">
|
|
148
|
+
* <span class="asta-menu-check"><svg>…</svg></span><span class="asta-menu-item-text">Show grid</span></button>
|
|
149
|
+
* <button role="menuitemradio" aria-checked="false" data-group="sort" data-value="date" class="asta-menu-item">
|
|
150
|
+
* <span class="asta-menu-radio"><span></span></span>…</button> */
|
|
151
|
+
.asta-menu-check {
|
|
152
|
+
@apply inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-[5px] text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_18%,transparent)] transition-colors duration-150;
|
|
153
|
+
& > svg {
|
|
154
|
+
@apply h-3 w-3 scale-50 opacity-0 transition-[opacity,transform] duration-200 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
|
|
155
|
+
}
|
|
156
|
+
[aria-checked="true"] > & {
|
|
157
|
+
@apply bg-brand text-white shadow-none;
|
|
158
|
+
& > svg {
|
|
159
|
+
@apply scale-100 opacity-100;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
.asta-menu-radio {
|
|
164
|
+
@apply inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_18%,transparent)] transition-shadow duration-150;
|
|
165
|
+
& > span {
|
|
166
|
+
@apply h-2 w-2 scale-0 rounded-full bg-brand transition-transform duration-200 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
|
|
167
|
+
}
|
|
168
|
+
[aria-checked="true"] > & {
|
|
169
|
+
@apply shadow-[inset_0_0_0_1.5px_var(--brand)];
|
|
170
|
+
& > span {
|
|
171
|
+
@apply scale-100;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/* ---- Context menu ----
|
|
176
|
+
* <div class="asta-context-menu" data-asta-context-menu tabindex="0">Right-click here
|
|
177
|
+
* <div role="menu" popover="manual" tabindex="-1" data-asta-mpanel aria-orientation="vertical"
|
|
178
|
+
* class="asta-float asta-dropdown-panel asta-context-menu-panel">…</div></div> */
|
|
179
|
+
.asta-context-menu {
|
|
180
|
+
@apply outline-none [-webkit-touch-callout:none] focus-visible:ring-2 focus-visible:ring-brand/50;
|
|
181
|
+
}
|
|
182
|
+
.asta-context-menu-panel {
|
|
183
|
+
@apply min-w-[220px] select-none shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_14px_36px_-14px_rgb(0_0_0/0.3),0_4px_10px_-6px_rgb(0_0_0/0.12)];
|
|
184
|
+
@apply [&_[role^=menuitem]]:h-8 [&_[role^=menuitem]]:rounded-lg [&_[role^=menuitem]]:text-[13px];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* ---- Command palette ----
|
|
188
|
+
* <dialog id="cmd" class="asta-dialog asta-cmd" data-asta-command data-hotkey="k" aria-label="Command palette">
|
|
189
|
+
* <div class="asta-cmd-inner"><div class="asta-cmd-search">… <input data-asta-command-input class="asta-cmd-input"></div>
|
|
190
|
+
* <div class="asta-cmd-scroll" data-asta-command-scroll><div role="listbox" data-asta-command-list>
|
|
191
|
+
* <div role="group" data-asta-command-group class="asta-cmd-group">…<div role="option" aria-selected="false"
|
|
192
|
+
* data-asta-command-item class="asta-cmd-item">…</div></div></div></div></div></dialog> */
|
|
193
|
+
.asta-cmd {
|
|
194
|
+
@apply mx-auto mb-auto mt-[10vh] w-[calc(100%-1.5rem)] max-w-[560px] overflow-hidden rounded-xl bg-paper p-0 text-ink outline-none;
|
|
195
|
+
@apply shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_12%,transparent),0_24px_60px_-20px_rgb(0_0_0/0.4)];
|
|
196
|
+
}
|
|
197
|
+
.asta-cmd-inner {
|
|
198
|
+
@apply flex max-h-[min(440px,calc(100dvh-10vh-1rem))] flex-col;
|
|
199
|
+
}
|
|
200
|
+
.asta-cmd-search {
|
|
201
|
+
@apply flex items-center gap-2.5 px-4 shadow-[inset_0_-1px_0_color-mix(in_srgb,var(--ink)_8%,transparent)];
|
|
202
|
+
& > svg {
|
|
203
|
+
@apply h-4 w-4 shrink-0 text-mute;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
.asta-cmd-input {
|
|
207
|
+
@apply h-12 min-w-0 flex-1 bg-transparent text-[15px] text-ink outline-none placeholder:text-mute;
|
|
208
|
+
}
|
|
209
|
+
.asta-cmd-esc {
|
|
210
|
+
@apply rounded-md bg-paper-2 px-1.5 font-sans text-[11px] leading-5 text-mute;
|
|
211
|
+
}
|
|
212
|
+
.asta-cmd-scroll {
|
|
213
|
+
@apply min-h-0 flex-1 overflow-y-auto overscroll-contain p-1.5;
|
|
214
|
+
}
|
|
215
|
+
.asta-cmd-empty {
|
|
216
|
+
@apply flex flex-col items-center px-4 py-10 text-center;
|
|
217
|
+
}
|
|
218
|
+
.asta-cmd-empty-icon {
|
|
219
|
+
@apply flex h-10 w-10 items-center justify-center rounded-full bg-paper-2 text-mute [&>svg]:h-4 [&>svg]:w-4;
|
|
220
|
+
}
|
|
221
|
+
.asta-cmd-empty-title {
|
|
222
|
+
@apply mt-3 text-[14px] text-ink;
|
|
223
|
+
}
|
|
224
|
+
.asta-cmd-empty-hint {
|
|
225
|
+
@apply mt-1 text-[13px] text-mute;
|
|
226
|
+
}
|
|
227
|
+
.asta-cmd-footer {
|
|
228
|
+
@apply flex items-center gap-4 px-4 py-2.5 text-[12px] text-mute shadow-[inset_0_1px_0_color-mix(in_srgb,var(--ink)_8%,transparent)];
|
|
229
|
+
}
|
|
230
|
+
.asta-cmd-hint {
|
|
231
|
+
@apply flex items-center gap-1.5;
|
|
232
|
+
& > kbd {
|
|
233
|
+
@apply min-w-5 rounded-md bg-paper-2 px-1 text-center font-sans text-[11px] leading-5 text-ink-2;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
.asta-cmd-count {
|
|
237
|
+
@apply ml-auto hidden tabular-nums sm:inline;
|
|
238
|
+
}
|
|
239
|
+
.asta-cmd-group {
|
|
240
|
+
@apply mb-1 last:mb-0;
|
|
241
|
+
}
|
|
242
|
+
.asta-cmd-heading {
|
|
243
|
+
@apply px-2.5 pb-1 pt-2 text-[11.5px] font-medium text-mute;
|
|
244
|
+
}
|
|
245
|
+
.asta-cmd-item {
|
|
246
|
+
@apply relative flex h-10 cursor-pointer select-none items-center gap-3 rounded-[10px] px-2.5 text-[14px] text-ink-2 no-underline outline-none transition-colors duration-150;
|
|
247
|
+
@apply aria-selected:bg-paper-2 aria-selected:text-ink;
|
|
248
|
+
@apply before:absolute before:inset-y-2.5 before:left-0 before:w-0.5 before:rounded-full before:bg-brand before:opacity-0 before:content-[''] aria-selected:before:opacity-100;
|
|
249
|
+
}
|
|
250
|
+
.asta-cmd-item-icon {
|
|
251
|
+
@apply flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-paper-2 text-mute [&_svg]:h-3.5 [&_svg]:w-3.5;
|
|
252
|
+
[aria-selected="true"] > & {
|
|
253
|
+
@apply bg-paper text-ink;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
.asta-cmd-item-label {
|
|
257
|
+
@apply min-w-0 flex-1 truncate;
|
|
258
|
+
}
|
|
259
|
+
.asta-cmd-item-kbd {
|
|
260
|
+
@apply font-sans text-[11.5px] text-mute;
|
|
261
|
+
}
|
|
262
|
+
.asta-cmd-item-enter {
|
|
263
|
+
@apply hidden h-3.5 w-3.5 text-mute;
|
|
264
|
+
[aria-selected="true"] > & {
|
|
265
|
+
@apply block;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* ---- Navbar ----
|
|
270
|
+
* <header class="asta-navbar" data-asta-navbar><div class="asta-navbar-bar">brand · nav · actions · surface</div>
|
|
271
|
+
* <div id="nav-sheet" data-asta-nav-sheet hidden class="asta-navbar-sheet">…</div></header>
|
|
272
|
+
* asta.js sets data-open (a mega panel is open), data-scrolled and data-sheet (phone menu) on the header. */
|
|
273
|
+
.asta-navbar {
|
|
274
|
+
@apply @container sticky top-0 z-30 w-full bg-paper/85 backdrop-blur-md;
|
|
275
|
+
@apply after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-[color-mix(in_srgb,var(--ink)_10%,transparent)] after:opacity-0 after:transition-opacity after:duration-300 after:content-[''];
|
|
276
|
+
@apply data-[scrolled]:after:opacity-100 data-[sheet]:after:opacity-100;
|
|
277
|
+
}
|
|
278
|
+
.asta-navbar-bar {
|
|
279
|
+
@apply relative flex h-14 items-center gap-3 px-4;
|
|
280
|
+
}
|
|
281
|
+
.asta-navbar-brand {
|
|
282
|
+
@apply flex flex-1 items-center gap-2 rounded-md text-[15px] font-semibold tracking-[-0.02em] text-ink outline-none focus-visible:ring-2 focus-visible:ring-brand/50;
|
|
283
|
+
}
|
|
284
|
+
.asta-navbar-nav {
|
|
285
|
+
@apply hidden @min-[560px]:block;
|
|
286
|
+
& > ul {
|
|
287
|
+
@apply flex items-center gap-0.5;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
.asta-navbar-trigger {
|
|
291
|
+
@apply flex h-8 items-center gap-1 rounded-md px-2.5 text-[13.5px] font-medium text-ink-2 outline-none transition-colors duration-200 hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50 aria-expanded:bg-paper-2 aria-expanded:text-ink;
|
|
292
|
+
&:is(button) {
|
|
293
|
+
@apply pr-2;
|
|
294
|
+
}
|
|
295
|
+
& > svg {
|
|
296
|
+
@apply h-3.5 w-3.5 rotate-90 text-mute transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)];
|
|
297
|
+
}
|
|
298
|
+
&[aria-expanded="true"] > svg {
|
|
299
|
+
@apply -rotate-90;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
.asta-navbar-actions {
|
|
303
|
+
@apply flex flex-1 items-center justify-end gap-1.5;
|
|
304
|
+
& > div {
|
|
305
|
+
@apply relative flex items-center;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
.asta-navbar-docs {
|
|
309
|
+
@apply absolute right-full mr-1.5 hidden transition-[opacity,translate] duration-500 ease-[cubic-bezier(.16,1,.3,1)] @min-[680px]:inline-flex;
|
|
310
|
+
.asta-navbar[data-scrolled] & {
|
|
311
|
+
@apply pointer-events-none translate-x-2 opacity-0;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
.asta-navbar-cta {
|
|
315
|
+
@apply @max-[399px]:hidden;
|
|
316
|
+
}
|
|
317
|
+
.asta-navbar-burger {
|
|
318
|
+
@apply relative flex h-8 w-8 items-center justify-center rounded-md outline-none transition-colors hover:bg-paper-2 focus-visible:ring-2 focus-visible:ring-brand/50 @min-[560px]:hidden;
|
|
319
|
+
& > span {
|
|
320
|
+
@apply absolute h-[1.5px] w-4 rounded-full bg-ink transition-[translate,rotate] duration-500 ease-[cubic-bezier(.16,1,.3,1)];
|
|
321
|
+
}
|
|
322
|
+
& > span:first-child {
|
|
323
|
+
@apply -translate-y-[3.5px];
|
|
324
|
+
}
|
|
325
|
+
& > span:last-child {
|
|
326
|
+
@apply translate-y-[3.5px];
|
|
327
|
+
}
|
|
328
|
+
.asta-navbar[data-sheet] & > span:first-child {
|
|
329
|
+
@apply translate-y-0 rotate-45;
|
|
330
|
+
}
|
|
331
|
+
.asta-navbar[data-sheet] & > span:last-child {
|
|
332
|
+
@apply translate-y-0 -rotate-45;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
.asta-navbar-surface {
|
|
336
|
+
@apply pointer-events-none absolute left-1/2 top-[calc(100%-2px)] hidden -translate-x-1/2 @min-[560px]:block;
|
|
337
|
+
.asta-navbar[data-open] & {
|
|
338
|
+
@apply pointer-events-auto;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
.asta-navbar-pop {
|
|
342
|
+
@apply relative origin-top -translate-y-1 scale-[.98] opacity-0 transition-[opacity,translate,scale] duration-300 ease-[cubic-bezier(.16,1,.3,1)];
|
|
343
|
+
.asta-navbar[data-open] & {
|
|
344
|
+
@apply translate-y-0 scale-100 opacity-100;
|
|
345
|
+
}
|
|
346
|
+
& > div + div {
|
|
347
|
+
@apply relative;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
.asta-navbar-bg {
|
|
351
|
+
@apply absolute inset-0 origin-top rounded-xl bg-paper shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_12%,transparent),0_16px_40px_-12px_rgb(0_0_0/0.22)] transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)];
|
|
352
|
+
}
|
|
353
|
+
/* One panel per menu: <div data-asta-nav-panel="0" hidden class="asta-navbar-panel" style="width:min(560px,calc(100cqw - 24px))"> */
|
|
354
|
+
.asta-navbar-panel {
|
|
355
|
+
@apply w-max;
|
|
356
|
+
}
|
|
357
|
+
.asta-navbar-menu {
|
|
358
|
+
@apply flex flex-col gap-2 p-2;
|
|
359
|
+
}
|
|
360
|
+
.asta-navbar-grid {
|
|
361
|
+
@apply grid grid-cols-4 gap-2;
|
|
362
|
+
&.asta-navbar-cols-1 {
|
|
363
|
+
@apply grid-cols-1;
|
|
364
|
+
}
|
|
365
|
+
&.asta-navbar-cols-2 {
|
|
366
|
+
@apply grid-cols-2;
|
|
367
|
+
}
|
|
368
|
+
&.asta-navbar-cols-3 {
|
|
369
|
+
@apply grid-cols-3;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
.asta-navbar-tile {
|
|
373
|
+
@apply relative flex min-h-[92px] flex-col gap-1.5 overflow-hidden rounded-[10px] bg-paper-2 p-4 outline-none transition-[opacity,background-color] duration-300 hover:!opacity-100 focus-visible:ring-2 focus-visible:ring-brand/50;
|
|
374
|
+
.asta-navbar-menu:has(a:hover) & {
|
|
375
|
+
@apply opacity-55;
|
|
376
|
+
}
|
|
377
|
+
&.asta-navbar-tile-tall {
|
|
378
|
+
@apply min-h-[184px];
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
.asta-navbar-tile-head {
|
|
382
|
+
@apply flex items-center gap-2 text-[14px] font-medium tracking-[-0.01em] text-ink;
|
|
383
|
+
& > svg {
|
|
384
|
+
@apply h-3.5 w-3.5 -translate-x-0.5 text-mute transition-[translate,color] duration-300 ease-[cubic-bezier(.16,1,.3,1)];
|
|
385
|
+
}
|
|
386
|
+
.asta-navbar-tile:hover & > svg {
|
|
387
|
+
@apply translate-x-0 text-ink;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
.asta-navbar-tile-icon {
|
|
391
|
+
@apply flex h-6 w-6 items-center justify-center rounded-md bg-paper text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_12%,transparent)] [&_svg]:h-3.5 [&_svg]:w-3.5;
|
|
392
|
+
}
|
|
393
|
+
.asta-navbar-tile-desc {
|
|
394
|
+
@apply text-[12.5px] leading-snug text-mute;
|
|
395
|
+
.asta-navbar-tile-tall & {
|
|
396
|
+
@apply max-w-[22ch];
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
/* Tall tiles show a small preview: <div class="asta-navbar-preview"><div class="asta-navbar-chart">
|
|
400
|
+
* <span class="asta-navbar-bar-fill" style="height:40%"></span>…</div></div> (or -list / -lines) */
|
|
401
|
+
.asta-navbar-preview {
|
|
402
|
+
@apply absolute -bottom-px -right-px h-[46%] w-[72%] rounded-tl-xl bg-paper p-3 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_12%,transparent)] transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)];
|
|
403
|
+
.asta-navbar-tile:hover & {
|
|
404
|
+
@apply -translate-x-1 -translate-y-1;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
.asta-navbar-chart {
|
|
408
|
+
@apply flex h-full items-end gap-1.5;
|
|
409
|
+
}
|
|
410
|
+
.asta-navbar-list {
|
|
411
|
+
@apply flex flex-col gap-2;
|
|
412
|
+
& > div {
|
|
413
|
+
@apply flex items-center gap-2;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
.asta-navbar-lines {
|
|
417
|
+
@apply flex flex-col gap-1.5;
|
|
418
|
+
& > div {
|
|
419
|
+
@apply flex gap-1.5;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
.asta-navbar-bar-fill {
|
|
423
|
+
@apply h-1.5 rounded-full bg-[color-mix(in_srgb,var(--ink)_12%,transparent)] transition-colors duration-500;
|
|
424
|
+
.asta-navbar-chart > & {
|
|
425
|
+
@apply h-auto w-full rounded-[3px];
|
|
426
|
+
}
|
|
427
|
+
.asta-navbar-list > div > &:first-child {
|
|
428
|
+
@apply h-3 w-3 shrink-0;
|
|
429
|
+
}
|
|
430
|
+
.asta-navbar-tile:hover :is(.asta-navbar-chart > &, .asta-navbar-list > div > &:first-child, .asta-navbar-lines > div > &:first-child) {
|
|
431
|
+
@apply bg-brand;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
.asta-navbar-col {
|
|
435
|
+
@apply flex flex-col gap-0.5 p-2;
|
|
436
|
+
}
|
|
437
|
+
.asta-navbar-col-heading {
|
|
438
|
+
@apply mb-1.5 px-2 text-[11.5px] text-mute;
|
|
439
|
+
}
|
|
440
|
+
.asta-navbar-col-link {
|
|
441
|
+
@apply flex flex-col rounded-lg px-2 py-1.5 outline-none transition-[background-color,opacity] duration-200 hover:bg-paper-2 hover:!opacity-100 focus-visible:bg-paper-2;
|
|
442
|
+
.asta-navbar-menu:has(a:hover) & {
|
|
443
|
+
@apply opacity-60;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
.asta-navbar-col-title {
|
|
447
|
+
@apply flex items-center gap-1 text-[13.5px] font-medium text-ink;
|
|
448
|
+
& > svg {
|
|
449
|
+
@apply h-3 w-3 -translate-x-1 text-mute opacity-0 transition-[translate,opacity] duration-300 ease-[cubic-bezier(.16,1,.3,1)];
|
|
450
|
+
}
|
|
451
|
+
.asta-navbar-col-link:hover & > svg {
|
|
452
|
+
@apply translate-x-0 opacity-100;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
.asta-navbar-col-desc {
|
|
456
|
+
@apply text-[12px] leading-snug text-mute;
|
|
457
|
+
}
|
|
458
|
+
.asta-navbar-feature {
|
|
459
|
+
@apply relative flex min-h-[200px] flex-col justify-end overflow-hidden rounded-[10px] bg-brand p-4 text-white outline-none transition-opacity duration-300 hover:!opacity-100 focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper;
|
|
460
|
+
.asta-navbar-menu:has(a:hover) & {
|
|
461
|
+
@apply opacity-70;
|
|
462
|
+
}
|
|
463
|
+
/* Two soft circles: <span class="asta-navbar-orb" aria-hidden="true"></span> ×2 */
|
|
464
|
+
& > .asta-navbar-orb {
|
|
465
|
+
@apply absolute -right-10 -top-10 h-40 w-40 rounded-full bg-white/15 transition-transform duration-700 ease-[cubic-bezier(.16,1,.3,1)];
|
|
466
|
+
}
|
|
467
|
+
& > .asta-navbar-orb + .asta-navbar-orb {
|
|
468
|
+
@apply -right-2 top-12 h-20 w-20 bg-white/10;
|
|
469
|
+
}
|
|
470
|
+
&:hover > .asta-navbar-orb {
|
|
471
|
+
@apply scale-125;
|
|
472
|
+
}
|
|
473
|
+
&:hover > .asta-navbar-orb + .asta-navbar-orb {
|
|
474
|
+
@apply -translate-x-3 scale-100;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
.asta-navbar-feature-title {
|
|
478
|
+
@apply relative text-[15px] font-medium tracking-[-0.01em];
|
|
479
|
+
}
|
|
480
|
+
.asta-navbar-feature-desc {
|
|
481
|
+
@apply relative mt-1 text-[12.5px] leading-snug text-white/80;
|
|
482
|
+
}
|
|
483
|
+
.asta-navbar-feature-cta {
|
|
484
|
+
@apply relative mt-3 flex items-center gap-1 text-[13px] font-medium;
|
|
485
|
+
& > svg {
|
|
486
|
+
@apply h-3.5 w-3.5 transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)];
|
|
487
|
+
}
|
|
488
|
+
.asta-navbar-feature:hover & > svg {
|
|
489
|
+
@apply translate-x-0.5;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
/* Phone sheet: <details class="asta-navbar-sec"><summary>Product <svg/></summary><div class="asta-nav-sec
|
|
493
|
+
* asta-navbar-sec-links"><a class="asta-navbar-sheet-link">…</a></div></details> */
|
|
494
|
+
.asta-navbar-sheet {
|
|
495
|
+
@apply absolute inset-x-0 top-full max-h-[calc(100svh-3.5rem)] overflow-y-auto bg-paper px-3 pb-6 pt-2 @min-[560px]:hidden;
|
|
496
|
+
& > ul {
|
|
497
|
+
@apply flex flex-col;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
.asta-navbar-sec {
|
|
501
|
+
& > summary {
|
|
502
|
+
@apply flex h-12 w-full cursor-pointer list-none items-center justify-between rounded-[10px] px-3 text-[15px] font-medium text-ink outline-none focus-visible:bg-paper-2 [&::-webkit-details-marker]:hidden;
|
|
503
|
+
}
|
|
504
|
+
& > summary > svg {
|
|
505
|
+
@apply h-3.5 w-3.5 rotate-90 text-mute transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)];
|
|
506
|
+
}
|
|
507
|
+
&[open] > summary > svg {
|
|
508
|
+
@apply -rotate-90;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
.asta-navbar-sec-links {
|
|
512
|
+
@apply flex flex-col gap-0.5 pb-2 pl-2;
|
|
513
|
+
}
|
|
514
|
+
.asta-navbar-sheet-link {
|
|
515
|
+
@apply flex items-center gap-3 rounded-lg px-3 py-2 outline-none hover:bg-paper-2 focus-visible:bg-paper-2;
|
|
516
|
+
& > span:last-child {
|
|
517
|
+
@apply flex flex-col;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
.asta-navbar-sheet-icon {
|
|
521
|
+
@apply flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-paper-2 text-ink [&_svg]:h-3.5 [&_svg]:w-3.5;
|
|
522
|
+
}
|
|
523
|
+
.asta-navbar-sheet-title {
|
|
524
|
+
@apply text-[14px] text-ink;
|
|
525
|
+
}
|
|
526
|
+
.asta-navbar-sheet-desc {
|
|
527
|
+
@apply text-[12px] leading-snug text-mute;
|
|
528
|
+
}
|
|
529
|
+
.asta-navbar-sheet-item {
|
|
530
|
+
@apply flex h-12 items-center rounded-[10px] px-3 text-[15px] font-medium text-ink outline-none focus-visible:bg-paper-2;
|
|
531
|
+
}
|
|
532
|
+
.asta-navbar-sheet-actions {
|
|
533
|
+
@apply mt-4 flex flex-col gap-2 px-1 [&>*]:w-full;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/* ---- Sidebar ----
|
|
537
|
+
* <aside class="asta-sidebar" data-asta-sidebar data-auto-rail aria-label="Sidebar">
|
|
538
|
+
* <nav class="asta-sidebar-nav" data-asta-sidebar-nav>…<button class="asta-sidebar-link" data-asta-sidebar-item="inbox"
|
|
539
|
+
* aria-current="page"><span class="asta-sidebar-icon">…</span><span class="asta-sidebar-label">Inbox</span>
|
|
540
|
+
* <span class="asta-sidebar-tip" aria-hidden="true">Inbox</span></button>…</nav>
|
|
541
|
+
* <button class="asta-sidebar-item asta-sidebar-toggle" data-asta-sidebar-toggle aria-pressed="false">…</button></aside>
|
|
542
|
+
* data-collapsed on the root shrinks it to an icon rail. */
|
|
543
|
+
.asta-sidebar {
|
|
544
|
+
@apply relative flex h-full w-[248px] shrink-0 flex-col bg-paper-2 px-3 py-3 data-[collapsed]:w-16;
|
|
545
|
+
}
|
|
546
|
+
.asta-sidebar-item,
|
|
547
|
+
.asta-sidebar-link {
|
|
548
|
+
@apply relative flex h-9 w-full items-center rounded-lg text-left text-[13.5px] outline-none transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-brand/50;
|
|
549
|
+
}
|
|
550
|
+
.asta-sidebar-link {
|
|
551
|
+
@apply text-ink-2 hover:bg-[color-mix(in_srgb,var(--ink)_4%,transparent)] hover:text-ink;
|
|
552
|
+
@apply aria-[current=page]:text-ink aria-[current=page]:hover:bg-transparent;
|
|
553
|
+
}
|
|
554
|
+
.asta-sidebar-slot {
|
|
555
|
+
@apply flex w-10 shrink-0 justify-center;
|
|
556
|
+
}
|
|
557
|
+
.asta-sidebar-label {
|
|
558
|
+
@apply min-w-0 flex-1 overflow-hidden whitespace-nowrap text-left transition-[opacity,translate] duration-300 ease-[cubic-bezier(.16,1,.3,1)] delay-75;
|
|
559
|
+
.asta-sidebar[data-collapsed] & {
|
|
560
|
+
@apply pointer-events-none -translate-x-1 opacity-0 delay-0;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
.asta-sidebar-tip {
|
|
564
|
+
@apply pointer-events-none absolute left-[calc(100%+10px)] top-1/2 z-20 hidden -translate-x-1 -translate-y-1/2 whitespace-nowrap rounded-md bg-ink px-2 py-1 text-[12px] text-paper opacity-0 transition-[opacity,translate] duration-200 ease-[cubic-bezier(.16,1,.3,1)];
|
|
565
|
+
.asta-sidebar[data-collapsed] & {
|
|
566
|
+
@apply block;
|
|
567
|
+
}
|
|
568
|
+
:is(.asta-sidebar-item, .asta-sidebar-link):is(:hover, :focus-visible) > & {
|
|
569
|
+
@apply translate-x-0 opacity-100;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
/* Workspace menu at the top: <div class="asta-sidebar-ws" data-asta-dropdown data-asta-ws>… */
|
|
573
|
+
.asta-sidebar-ws {
|
|
574
|
+
@apply relative;
|
|
575
|
+
}
|
|
576
|
+
.asta-sidebar-ws-trigger {
|
|
577
|
+
@apply h-11 hover:bg-[color-mix(in_srgb,var(--ink)_5%,transparent)];
|
|
578
|
+
[data-asta-dropdown][data-open] > & {
|
|
579
|
+
@apply bg-[color-mix(in_srgb,var(--ink)_5%,transparent)];
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
.asta-sidebar-ws-logo {
|
|
583
|
+
@apply flex h-7 w-7 shrink-0 items-center justify-center rounded-[7px] bg-ink text-[12.5px] font-semibold tracking-[-0.02em] text-paper;
|
|
584
|
+
}
|
|
585
|
+
.asta-sidebar-ws-text {
|
|
586
|
+
@apply flex flex-col leading-tight;
|
|
587
|
+
}
|
|
588
|
+
.asta-sidebar-ws-name {
|
|
589
|
+
@apply truncate text-[13.5px] font-medium text-ink;
|
|
590
|
+
}
|
|
591
|
+
.asta-sidebar-ws-plan {
|
|
592
|
+
@apply truncate text-[11.5px] text-mute;
|
|
593
|
+
}
|
|
594
|
+
.asta-sidebar-ws-chevron {
|
|
595
|
+
@apply mr-2 h-4 w-4 shrink-0 text-mute transition-opacity duration-300;
|
|
596
|
+
.asta-sidebar[data-collapsed] & {
|
|
597
|
+
@apply opacity-0;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
.asta-sidebar-ws-panel {
|
|
601
|
+
@apply w-[232px] min-w-0;
|
|
602
|
+
}
|
|
603
|
+
.asta-sidebar-ws-heading {
|
|
604
|
+
@apply px-2 pb-1.5 pt-1 text-[11.5px] text-mute;
|
|
605
|
+
}
|
|
606
|
+
.asta-sidebar-ws-option {
|
|
607
|
+
@apply flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left outline-none transition-colors hover:bg-paper-2 focus:bg-paper-2;
|
|
608
|
+
& > svg {
|
|
609
|
+
@apply hidden h-4 w-4 shrink-0 text-brand;
|
|
610
|
+
}
|
|
611
|
+
&[aria-checked="true"] > svg {
|
|
612
|
+
@apply block;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
.asta-sidebar-ws-option-logo {
|
|
616
|
+
@apply flex h-7 w-7 shrink-0 items-center justify-center rounded-[7px] bg-paper text-[12.5px] font-semibold tracking-[-0.02em] text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)];
|
|
617
|
+
[aria-checked="true"] > & {
|
|
618
|
+
@apply bg-ink text-paper shadow-none;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
.asta-sidebar-ws-option-text {
|
|
622
|
+
@apply flex min-w-0 flex-1 flex-col leading-tight;
|
|
623
|
+
& > span:first-child {
|
|
624
|
+
@apply truncate text-[13.5px] text-ink;
|
|
625
|
+
}
|
|
626
|
+
& > span + span {
|
|
627
|
+
@apply truncate text-[11.5px] text-mute;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
.asta-sidebar-nav {
|
|
631
|
+
@apply mt-4 min-h-0 flex-1;
|
|
632
|
+
& > div {
|
|
633
|
+
@apply relative;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
.asta-sidebar-indicator {
|
|
637
|
+
@apply absolute inset-x-0 top-0 h-9 rounded-lg bg-paper opacity-0 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent),0_1px_2px_rgb(0_0_0/0.06)] transition-[transform,opacity] duration-500 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
|
|
638
|
+
}
|
|
639
|
+
.asta-sidebar-group {
|
|
640
|
+
& + & {
|
|
641
|
+
@apply mt-3;
|
|
642
|
+
}
|
|
643
|
+
& > ul {
|
|
644
|
+
@apply flex flex-col gap-0.5;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
.asta-sidebar-group-label {
|
|
648
|
+
@apply relative flex h-7 items-center px-3;
|
|
649
|
+
& > span:first-child {
|
|
650
|
+
@apply text-[11.5px] text-mute transition-opacity duration-300;
|
|
651
|
+
}
|
|
652
|
+
/* The dash that stands in for the label on the rail. */
|
|
653
|
+
& > span + span {
|
|
654
|
+
@apply absolute left-1/2 h-px w-3 -translate-x-1/2 bg-[color-mix(in_srgb,var(--ink)_14%,transparent)] opacity-0 transition-opacity duration-300;
|
|
655
|
+
}
|
|
656
|
+
.asta-sidebar[data-collapsed] & > span:first-child {
|
|
657
|
+
@apply opacity-0;
|
|
658
|
+
}
|
|
659
|
+
.asta-sidebar[data-collapsed] & > span + span {
|
|
660
|
+
@apply opacity-100;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
.asta-sidebar-icon {
|
|
664
|
+
@apply relative flex w-10 shrink-0 justify-center text-mute transition-colors duration-300 [&_svg]:h-4 [&_svg]:w-4;
|
|
665
|
+
.asta-sidebar-link:hover > & {
|
|
666
|
+
@apply text-ink;
|
|
667
|
+
}
|
|
668
|
+
.asta-sidebar-link[aria-current="page"] > & {
|
|
669
|
+
@apply text-brand;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
.asta-sidebar-dot {
|
|
673
|
+
@apply absolute right-2 top-0 h-1.5 w-1.5 scale-50 rounded-full bg-brand opacity-0 shadow-[0_0_0_2px_var(--paper-2)] transition-[opacity,transform] duration-300 ease-[cubic-bezier(.16,1,.3,1)];
|
|
674
|
+
.asta-sidebar[data-collapsed] & {
|
|
675
|
+
@apply scale-100 opacity-100;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
.asta-sidebar-badge {
|
|
679
|
+
@apply relative mr-2 rounded-md bg-[color-mix(in_srgb,var(--ink)_6%,transparent)] px-1.5 text-[11.5px] tabular-nums leading-5 text-mute transition-opacity duration-300;
|
|
680
|
+
.asta-sidebar[data-collapsed] & {
|
|
681
|
+
@apply opacity-0;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
.asta-sidebar-toggle {
|
|
685
|
+
@apply text-mute hover:bg-[color-mix(in_srgb,var(--ink)_4%,transparent)] hover:text-ink;
|
|
686
|
+
& svg {
|
|
687
|
+
@apply h-4 w-4 transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)];
|
|
688
|
+
}
|
|
689
|
+
.asta-sidebar[data-collapsed] & svg {
|
|
690
|
+
@apply -scale-x-100;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
.asta-sidebar-user {
|
|
694
|
+
@apply mt-2 flex h-12 items-center rounded-lg;
|
|
695
|
+
}
|
|
696
|
+
.asta-sidebar-user-text {
|
|
697
|
+
@apply flex flex-col pl-1 leading-tight;
|
|
698
|
+
& > span:first-child {
|
|
699
|
+
@apply truncate text-[13px] font-medium text-ink;
|
|
700
|
+
}
|
|
701
|
+
& > span + span {
|
|
702
|
+
@apply truncate text-[11.5px] text-mute;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/* ---- Workspace switcher ----
|
|
707
|
+
* <div class="asta-ws" data-asta-dropdown data-asta-ws data-match><button class="asta-ws-trigger"
|
|
708
|
+
* data-asta-dropdown-trigger aria-haspopup="menu" aria-expanded="false">…</button>
|
|
709
|
+
* <div role="menu" popover="manual" data-asta-mpanel class="asta-float asta-dropdown-panel asta-ws-panel">
|
|
710
|
+
* <button role="menuitemradio" aria-checked="true" data-group="workspace" data-value="studio"
|
|
711
|
+
* data-ws-name="Astabyte" data-ws-plan="Pro" class="asta-ws-row">…</button></div></div> */
|
|
712
|
+
.asta-ws {
|
|
713
|
+
@apply relative;
|
|
714
|
+
}
|
|
715
|
+
.asta-ws-trigger {
|
|
716
|
+
@apply flex w-full cursor-pointer items-center gap-2.5 rounded-[9px] px-2 py-1.5 text-left outline-none transition-colors duration-150 hover:bg-[color-mix(in_srgb,var(--ink)_6%,transparent)] focus-visible:shadow-[0_0_0_2px_var(--brand)];
|
|
717
|
+
[data-asta-dropdown][data-open] > & {
|
|
718
|
+
@apply bg-[color-mix(in_srgb,var(--ink)_6%,transparent)];
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
/* Logo boxes size whatever logo is inside (asta.js copies the picked one into the trigger). */
|
|
722
|
+
.asta-ws-logo-sm {
|
|
723
|
+
@apply flex shrink-0 [&>*]:h-6 [&>*]:w-6 [&>*]:rounded-[6px] [&>*]:text-[11.5px];
|
|
724
|
+
}
|
|
725
|
+
.asta-ws-logo {
|
|
726
|
+
@apply flex shrink-0 [&>*]:h-8 [&>*]:w-8 [&>*]:rounded-[8px] [&>*]:text-[13px];
|
|
727
|
+
}
|
|
728
|
+
.asta-ws-initial {
|
|
729
|
+
@apply grid shrink-0 place-items-center bg-brand font-semibold text-white;
|
|
730
|
+
}
|
|
731
|
+
.asta-ws-name {
|
|
732
|
+
@apply min-w-0 flex-1 truncate text-[13.5px] font-medium text-ink;
|
|
733
|
+
}
|
|
734
|
+
.asta-ws-plan {
|
|
735
|
+
@apply shrink-0 rounded-[5px] bg-[color-mix(in_srgb,var(--brand)_12%,transparent)] px-1.5 py-0.5 text-[11px] font-medium text-brand;
|
|
736
|
+
}
|
|
737
|
+
.asta-ws-chevron {
|
|
738
|
+
@apply h-3.5 w-3.5 shrink-0 text-mute transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
|
|
739
|
+
[data-asta-dropdown][data-open] > .asta-ws-trigger > & {
|
|
740
|
+
@apply rotate-180;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
.asta-ws-panel {
|
|
744
|
+
@apply min-w-[240px] rounded-[12px];
|
|
745
|
+
}
|
|
746
|
+
.asta-ws-account {
|
|
747
|
+
@apply px-2.5 pb-2 pt-1.5;
|
|
748
|
+
& > p:first-child {
|
|
749
|
+
@apply truncate text-[13px] font-medium text-ink;
|
|
750
|
+
}
|
|
751
|
+
& > p + p {
|
|
752
|
+
@apply truncate text-[12px] text-mute;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
.asta-ws-row {
|
|
756
|
+
@apply flex w-full cursor-pointer items-center gap-2.5 rounded-[8px] px-2 py-1.5 text-left no-underline outline-none transition-colors duration-100 hover:bg-[color-mix(in_srgb,var(--ink)_6%,transparent)] focus:bg-[color-mix(in_srgb,var(--ink)_6%,transparent)];
|
|
757
|
+
& > svg {
|
|
758
|
+
@apply hidden h-4 w-4 shrink-0 text-brand;
|
|
759
|
+
}
|
|
760
|
+
&[aria-checked="true"] > svg {
|
|
761
|
+
@apply block;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
.asta-ws-row-text {
|
|
765
|
+
@apply min-w-0 flex-1;
|
|
766
|
+
& > span:first-child {
|
|
767
|
+
@apply flex items-center gap-1.5;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
.asta-ws-row-name {
|
|
771
|
+
@apply truncate text-[13px] font-medium text-ink;
|
|
772
|
+
}
|
|
773
|
+
.asta-ws-row-plan {
|
|
774
|
+
@apply shrink-0 text-[11px] text-mute;
|
|
775
|
+
}
|
|
776
|
+
.asta-ws-row-meta {
|
|
777
|
+
@apply block truncate text-[12px] text-mute;
|
|
778
|
+
}
|
|
779
|
+
/* "New workspace": a core menu item made to line up with the rows. */
|
|
780
|
+
.asta-ws-create {
|
|
781
|
+
@apply mt-1 !h-auto gap-2.5 !rounded-[8px] !px-2 py-1.5 text-[13px] text-ink-2 focus:text-ink;
|
|
782
|
+
}
|
|
783
|
+
.asta-ws-create-icon {
|
|
784
|
+
@apply grid h-8 w-8 place-items-center rounded-[8px] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] [&>svg]:h-4 [&>svg]:w-4;
|
|
785
|
+
}
|
|
786
|
+
.asta-ws-footer {
|
|
787
|
+
@apply mt-1 pt-1;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
/* ---- Footer ----
|
|
791
|
+
* <footer class="asta-footer"><div class="asta-footer-grid"><div class="asta-footer-intro">…newsletter…</div>
|
|
792
|
+
* <nav class="asta-footer-nav" aria-label="Footer"><div><p class="asta-footer-heading">Product</p><ul class="asta-footer-links">
|
|
793
|
+
* <li><a class="asta-footer-link" href="/docs">Docs <span aria-hidden="true">↗</span></a></li></ul></div></nav></div>
|
|
794
|
+
* <div class="asta-footer-legal">…</div><div class="asta-footer-wordmark" data-asta-wordmark aria-hidden="true">
|
|
795
|
+
* <span data-l>A</span>…</div></footer> */
|
|
796
|
+
.asta-footer {
|
|
797
|
+
@apply @container overflow-hidden rounded-2xl bg-ink px-6 pt-8 text-paper sm:px-8;
|
|
798
|
+
}
|
|
799
|
+
.asta-footer-grid {
|
|
800
|
+
@apply grid gap-8 @min-[620px]:grid-cols-[1.3fr_2fr];
|
|
801
|
+
}
|
|
802
|
+
.asta-footer-intro {
|
|
803
|
+
@apply flex min-w-0 flex-col gap-4;
|
|
804
|
+
}
|
|
805
|
+
.asta-footer-brand {
|
|
806
|
+
@apply flex items-center gap-2 text-[15px] font-semibold tracking-[-0.02em];
|
|
807
|
+
}
|
|
808
|
+
.asta-footer-tagline {
|
|
809
|
+
@apply max-w-[30ch] text-[13.5px] leading-relaxed text-paper/60;
|
|
810
|
+
}
|
|
811
|
+
.asta-footer-nav {
|
|
812
|
+
@apply grid grid-cols-2 gap-6 @min-[420px]:grid-cols-3;
|
|
813
|
+
}
|
|
814
|
+
.asta-footer-heading {
|
|
815
|
+
@apply text-[12px] text-paper/45;
|
|
816
|
+
}
|
|
817
|
+
.asta-footer-links {
|
|
818
|
+
@apply mt-3 flex flex-col gap-2;
|
|
819
|
+
}
|
|
820
|
+
.asta-footer-link {
|
|
821
|
+
@apply inline-flex items-center gap-1 rounded text-[13.5px] text-paper/80 outline-none transition-colors hover:text-paper focus-visible:ring-2 focus-visible:ring-brand/60;
|
|
822
|
+
& > span {
|
|
823
|
+
@apply -translate-x-1 text-[11px] opacity-0 transition-[translate,opacity] duration-300 ease-[cubic-bezier(.16,1,.3,1)];
|
|
824
|
+
}
|
|
825
|
+
&:hover > span {
|
|
826
|
+
@apply translate-x-0 opacity-60;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
.asta-footer-legal {
|
|
830
|
+
@apply mt-8 flex flex-wrap justify-between gap-2 text-[12px] text-paper/45;
|
|
831
|
+
& a {
|
|
832
|
+
@apply hover:text-paper;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
.asta-footer-wordmark {
|
|
836
|
+
@apply relative -mb-[0.18em] mt-6 flex select-none justify-center overflow-hidden pt-[0.1em] text-[clamp(3rem,19.5cqw,13rem)] font-semibold leading-[0.9] tracking-[-0.06em];
|
|
837
|
+
& > span {
|
|
838
|
+
@apply inline-block text-[color-mix(in_srgb,var(--paper)_24%,var(--ink))] transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)];
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
/* Newsletter: <div class="asta-newsletter" data-asta-newsletter data-state="idle"><form class="asta-newsletter-form">
|
|
842
|
+
* <input class="asta-newsletter-input"> <button class="asta-btn asta-btn-accent asta-btn-sm asta-btn-pill">…</button></form>
|
|
843
|
+
* <p class="asta-newsletter-done" data-asta-newsletter-done aria-hidden="true">…</p><p class="asta-newsletter-msg" role="status">
|
|
844
|
+
* <span class="asta-newsletter-error">…</span></p></div>. data-state: idle done error. */
|
|
845
|
+
.asta-newsletter {
|
|
846
|
+
@apply relative;
|
|
847
|
+
}
|
|
848
|
+
.asta-newsletter-form {
|
|
849
|
+
@apply flex h-11 items-center gap-1 rounded-[10px] bg-paper/10 p-1 pl-4 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--paper)_14%,transparent)] transition-[opacity,transform,box-shadow] duration-500 ease-[cubic-bezier(.16,1,.3,1)] focus-within:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--paper)_45%,transparent)];
|
|
850
|
+
& .asta-btn {
|
|
851
|
+
@apply shadow-none;
|
|
852
|
+
}
|
|
853
|
+
[data-state="done"] > & {
|
|
854
|
+
@apply pointer-events-none -translate-y-2 opacity-0;
|
|
855
|
+
}
|
|
856
|
+
[data-state="error"] > & {
|
|
857
|
+
@apply shadow-[inset_0_0_0_1px_#e5484d];
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
.asta-newsletter-input {
|
|
861
|
+
@apply min-w-0 flex-1 bg-transparent text-[14px] text-paper outline-none placeholder:text-paper/40;
|
|
862
|
+
}
|
|
863
|
+
.asta-newsletter-done {
|
|
864
|
+
@apply pointer-events-none absolute inset-0 flex translate-y-2 items-center gap-2 pl-1 text-[14px] text-paper opacity-0 transition-[opacity,transform] duration-500 ease-[cubic-bezier(.16,1,.3,1)];
|
|
865
|
+
& > span {
|
|
866
|
+
@apply flex h-6 w-6 items-center justify-center rounded-full bg-brand text-white [&>svg]:h-3.5 [&>svg]:w-3.5;
|
|
867
|
+
}
|
|
868
|
+
& path {
|
|
869
|
+
@apply [stroke-dashoffset:1] transition-[stroke-dashoffset] delay-200 duration-500;
|
|
870
|
+
}
|
|
871
|
+
[data-state="done"] > & {
|
|
872
|
+
@apply pointer-events-auto translate-y-0 opacity-100;
|
|
873
|
+
& path {
|
|
874
|
+
@apply [stroke-dashoffset:0];
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
.asta-newsletter-msg {
|
|
879
|
+
@apply mt-2 h-4 text-[12px] text-[#ff8a8d];
|
|
880
|
+
}
|
|
881
|
+
.asta-newsletter-error {
|
|
882
|
+
@apply hidden;
|
|
883
|
+
[data-state="error"] & {
|
|
884
|
+
@apply inline;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
.asta-newsletter-done-sr {
|
|
888
|
+
@apply sr-only hidden;
|
|
889
|
+
[data-state="done"] & {
|
|
890
|
+
@apply inline;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/* ---- Announcement bar ----
|
|
895
|
+
* <div class="asta-announcement" role="region" aria-label="Announcement" data-asta-announce data-interval="5000">
|
|
896
|
+
* <span class="asta-announcement-spacer" aria-hidden="true"></span><div class="asta-announcement-track"
|
|
897
|
+
* data-asta-announce-track><div class="asta-announcement-slide" data-asta-announce-msg data-state="cur">
|
|
898
|
+
* <p class="asta-announcement-text">…</p></div>…</div><button class="asta-announcement-close" data-asta-announce-close
|
|
899
|
+
* aria-label="Dismiss announcement">…</button></div>
|
|
900
|
+
* Tones: (ink) asta-announcement-brand asta-announcement-subtle. One message: .asta-announcement-single instead of the track. */
|
|
901
|
+
.asta-announcement {
|
|
902
|
+
@apply relative flex min-h-10 w-full items-center gap-2 bg-ink px-3 text-paper sm:px-4;
|
|
903
|
+
}
|
|
904
|
+
.asta-announcement-brand {
|
|
905
|
+
@apply bg-brand text-white;
|
|
906
|
+
}
|
|
907
|
+
.asta-announcement-subtle {
|
|
908
|
+
@apply bg-paper-2 text-ink;
|
|
909
|
+
}
|
|
910
|
+
.asta-announcement-spacer {
|
|
911
|
+
@apply w-7 shrink-0;
|
|
912
|
+
}
|
|
913
|
+
.asta-announcement-single {
|
|
914
|
+
@apply min-w-0 flex-1 py-2.5;
|
|
915
|
+
}
|
|
916
|
+
.asta-announcement-track {
|
|
917
|
+
@apply relative h-10 min-w-0 flex-1 overflow-hidden;
|
|
918
|
+
}
|
|
919
|
+
.asta-announcement-slide {
|
|
920
|
+
@apply absolute inset-0 flex items-center justify-center;
|
|
921
|
+
}
|
|
922
|
+
.asta-announcement-text {
|
|
923
|
+
@apply flex min-w-0 items-center justify-center gap-2.5 text-[13px] leading-snug;
|
|
924
|
+
& > span:not(.asta-announcement-badge) {
|
|
925
|
+
@apply min-w-0 truncate;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
.asta-announcement-badge {
|
|
929
|
+
@apply shrink-0 rounded-md bg-brand px-1.5 py-0.5 text-[11px] font-medium text-white;
|
|
930
|
+
.asta-announcement-brand & {
|
|
931
|
+
@apply bg-white/15 text-white;
|
|
932
|
+
}
|
|
933
|
+
.asta-announcement-subtle & {
|
|
934
|
+
@apply bg-[color-mix(in_srgb,var(--brand)_14%,transparent)] text-brand;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
.asta-announcement-link {
|
|
938
|
+
@apply inline-flex shrink-0 items-center gap-1 rounded-sm font-medium text-paper underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-brand/60;
|
|
939
|
+
.asta-announcement-brand & {
|
|
940
|
+
@apply text-white;
|
|
941
|
+
}
|
|
942
|
+
.asta-announcement-subtle & {
|
|
943
|
+
@apply text-brand;
|
|
944
|
+
}
|
|
945
|
+
& > svg {
|
|
946
|
+
@apply h-3.5 w-3.5 transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)];
|
|
947
|
+
}
|
|
948
|
+
&:hover > svg {
|
|
949
|
+
@apply translate-x-0.5;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
.asta-announcement-close {
|
|
953
|
+
@apply grid h-7 w-7 shrink-0 place-items-center rounded-md text-paper/60 outline-none transition-[background-color,color,transform] duration-200 hover:bg-paper/10 hover:text-paper active:scale-90 focus-visible:ring-2 focus-visible:ring-brand/60 [&>svg]:h-3.5 [&>svg]:w-3.5;
|
|
954
|
+
.asta-announcement-brand & {
|
|
955
|
+
@apply text-white/70 hover:bg-white/10 hover:text-white;
|
|
956
|
+
}
|
|
957
|
+
.asta-announcement-subtle & {
|
|
958
|
+
@apply text-mute hover:bg-paper hover:text-ink;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
/* ---- Stepper ----
|
|
963
|
+
* <div class="asta-stepper" data-asta-stepper data-step="0" data-count="3" data-first>
|
|
964
|
+
* <ol class="asta-stepper-steps" aria-label="Progress"><li class="asta-stepper-step" data-asta-step="0"
|
|
965
|
+
* data-state="current" aria-current="step"><button class="asta-stepper-goto" data-asta-step-goto="0" disabled>
|
|
966
|
+
* <span class="asta-stepper-mark"><span>1</span><svg>…</svg></span><span class="asta-stepper-text">…</span></button>
|
|
967
|
+
* <span class="asta-stepper-line" aria-hidden="true"><span></span></span></li>…</ol>
|
|
968
|
+
* <div class="asta-stepper-panels"><div role="region" data-asta-step-panel="0">…</div>…</div>
|
|
969
|
+
* <div class="asta-stepper-actions"><div class="asta-stepper-controls">…</div></div></div>
|
|
970
|
+
* Step data-state: done current todo. Buttons: data-asta-step-back, data-asta-step-next, data-asta-step-goto="n". */
|
|
971
|
+
.asta-stepper {
|
|
972
|
+
@apply flex w-full flex-col;
|
|
973
|
+
}
|
|
974
|
+
.asta-stepper-steps {
|
|
975
|
+
@apply flex items-start;
|
|
976
|
+
}
|
|
977
|
+
.asta-stepper-step {
|
|
978
|
+
@apply flex min-w-0 items-center;
|
|
979
|
+
&:not(:last-child) {
|
|
980
|
+
@apply flex-1;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
.asta-stepper-goto {
|
|
984
|
+
@apply -m-1 flex min-w-0 items-center gap-2.5 rounded-lg p-1 text-left outline-none transition-[opacity,transform] duration-200 hover:opacity-80 focus-visible:ring-2 focus-visible:ring-brand/50 active:scale-[0.98] disabled:cursor-default disabled:hover:opacity-100 disabled:active:scale-100;
|
|
985
|
+
}
|
|
986
|
+
.asta-stepper-mark {
|
|
987
|
+
@apply relative flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-[13px] font-medium tabular-nums transition-[background-color,box-shadow,color] duration-300;
|
|
988
|
+
@apply bg-paper text-mute shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_16%,transparent)];
|
|
989
|
+
& > span {
|
|
990
|
+
@apply transition-[opacity,transform] duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
|
|
991
|
+
}
|
|
992
|
+
& > svg {
|
|
993
|
+
@apply absolute h-4 w-4;
|
|
994
|
+
}
|
|
995
|
+
& > svg path {
|
|
996
|
+
@apply [stroke-dashoffset:1] transition-[stroke-dashoffset] delay-150 duration-[450ms] ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
|
|
997
|
+
}
|
|
998
|
+
[data-state="current"] & {
|
|
999
|
+
@apply text-brand shadow-[inset_0_0_0_1.5px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_14%,transparent)];
|
|
1000
|
+
}
|
|
1001
|
+
[data-state="done"] & {
|
|
1002
|
+
@apply bg-brand text-white shadow-none;
|
|
1003
|
+
& > span {
|
|
1004
|
+
@apply scale-50 opacity-0;
|
|
1005
|
+
}
|
|
1006
|
+
& > svg path {
|
|
1007
|
+
@apply [stroke-dashoffset:0];
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
.asta-stepper-text {
|
|
1012
|
+
@apply hidden min-w-0 flex-col text-left sm:flex;
|
|
1013
|
+
[data-state="current"] & {
|
|
1014
|
+
@apply flex;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
.asta-stepper-title {
|
|
1018
|
+
@apply truncate text-[13px] font-medium tracking-[-0.01em] text-ink transition-colors duration-300;
|
|
1019
|
+
[data-state="todo"] & {
|
|
1020
|
+
@apply text-mute;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
.asta-stepper-desc {
|
|
1024
|
+
@apply truncate text-[12px] text-mute;
|
|
1025
|
+
}
|
|
1026
|
+
/* Screen-reader suffixes: <span class="asta-stepper-sr" data-for="done">, done</span><span class="asta-stepper-sr"
|
|
1027
|
+
* data-for="todo">, not started</span> */
|
|
1028
|
+
.asta-stepper-sr {
|
|
1029
|
+
@apply sr-only hidden;
|
|
1030
|
+
[data-state="done"] > * > &[data-for="done"],
|
|
1031
|
+
[data-state="todo"] > * > &[data-for="todo"] {
|
|
1032
|
+
@apply inline;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
.asta-stepper-line {
|
|
1036
|
+
@apply relative mx-3 h-[2px] min-w-6 flex-1 overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--ink)_10%,transparent)];
|
|
1037
|
+
& > span {
|
|
1038
|
+
@apply absolute inset-0 origin-left scale-x-0 rounded-full bg-brand transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
|
|
1039
|
+
}
|
|
1040
|
+
[data-state="done"] > & > span {
|
|
1041
|
+
@apply scale-x-100;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
.asta-stepper-panels {
|
|
1045
|
+
@apply mt-6 overflow-hidden;
|
|
1046
|
+
}
|
|
1047
|
+
.asta-stepper-actions {
|
|
1048
|
+
@apply mt-6 empty:hidden;
|
|
1049
|
+
}
|
|
1050
|
+
/* Controls: <div class="asta-stepper-controls"><button class="asta-btn asta-btn-outline asta-stepper-back"
|
|
1051
|
+
* data-asta-step-back>Back</button><button class="asta-btn asta-btn-accent" data-asta-step-next>
|
|
1052
|
+
* <span class="asta-stepper-next-label">Continue</span><span class="asta-stepper-finish-label">Finish</span></button></div> */
|
|
1053
|
+
.asta-stepper-controls {
|
|
1054
|
+
@apply flex items-center justify-between gap-2;
|
|
1055
|
+
[data-asta-stepper][data-complete] & {
|
|
1056
|
+
@apply hidden;
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
.asta-stepper-back {
|
|
1060
|
+
[data-asta-stepper][data-first] & {
|
|
1061
|
+
@apply pointer-events-none opacity-45;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
.asta-stepper-next-label {
|
|
1065
|
+
[data-asta-stepper][data-last] & {
|
|
1066
|
+
@apply hidden;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
.asta-stepper-finish-label {
|
|
1070
|
+
@apply hidden;
|
|
1071
|
+
[data-asta-stepper][data-last] & {
|
|
1072
|
+
@apply inline;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
/* ---- Tool dock ----
|
|
1077
|
+
* <div class="asta-tool-dock" role="toolbar" aria-label="Tools" data-asta-tooldock data-hotkeys>
|
|
1078
|
+
* <span class="asta-tool-dock-pill" data-asta-tooldock-pill aria-hidden="true"></span>
|
|
1079
|
+
* <span class="asta-tool-dock-tool"><button class="asta-tool-dock-btn" data-tool="move" aria-label="Move"
|
|
1080
|
+
* aria-pressed="true" data-shortcut="V" aria-keyshortcuts="V" tabindex="0"><span>…svg…</span></button>
|
|
1081
|
+
* <span class="asta-tool-dock-tip" aria-hidden="true">Move <span>V</span></span></span>
|
|
1082
|
+
* <span class="asta-tool-dock-sep" aria-hidden="true"></span>…</div>
|
|
1083
|
+
* Add asta-tool-dock-tips-below to the root to show the tooltips under the dock. */
|
|
1084
|
+
.asta-tool-dock {
|
|
1085
|
+
@apply relative inline-flex items-center gap-0.5 rounded-[12px] bg-paper p-1;
|
|
1086
|
+
@apply shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_12px_32px_-14px_rgb(0_0_0/0.3),0_2px_6px_-3px_rgb(0_0_0/0.12)];
|
|
1087
|
+
}
|
|
1088
|
+
.asta-tool-dock-pill {
|
|
1089
|
+
@apply pointer-events-none absolute left-0 top-1 h-[calc(100%-8px)] w-9 rounded-[8px] bg-brand opacity-0 transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none;
|
|
1090
|
+
}
|
|
1091
|
+
.asta-tool-dock-sep {
|
|
1092
|
+
@apply mx-1 h-5 w-px bg-[color-mix(in_srgb,var(--ink)_12%,transparent)];
|
|
1093
|
+
}
|
|
1094
|
+
.asta-tool-dock-tool {
|
|
1095
|
+
@apply relative;
|
|
1096
|
+
}
|
|
1097
|
+
.asta-tool-dock-btn {
|
|
1098
|
+
@apply relative grid h-9 w-9 cursor-pointer place-items-center rounded-[8px] text-ink-2 outline-none transition-colors duration-150 hover:bg-[color-mix(in_srgb,var(--ink)_7%,transparent)] hover:text-ink focus-visible:shadow-[0_0_0_2px_var(--paper),0_0_0_4px_var(--brand)] disabled:cursor-not-allowed disabled:opacity-35 aria-pressed:text-white aria-pressed:hover:bg-transparent aria-pressed:hover:text-white;
|
|
1099
|
+
& > span {
|
|
1100
|
+
@apply h-[18px] w-[18px] [&>svg]:h-full [&>svg]:w-full;
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
.asta-tool-dock-tip {
|
|
1104
|
+
@apply pointer-events-none absolute bottom-full left-1/2 z-10 mb-2 flex -translate-x-1/2 translate-y-1 items-center gap-2 whitespace-nowrap rounded-[7px] bg-ink px-2 py-1 text-[12px] text-paper opacity-0 transition-[opacity,translate] duration-150;
|
|
1105
|
+
.asta-tool-dock-tips-below & {
|
|
1106
|
+
@apply bottom-auto top-full mb-0 mt-2 -translate-y-1;
|
|
1107
|
+
}
|
|
1108
|
+
.asta-tool-dock-tool:is(:hover, :has(:focus-visible)) > & {
|
|
1109
|
+
@apply translate-y-0 opacity-100;
|
|
1110
|
+
}
|
|
1111
|
+
& > span {
|
|
1112
|
+
@apply rounded-[4px] bg-[color-mix(in_srgb,var(--paper)_18%,transparent)] px-1 font-mono text-[10.5px];
|
|
1113
|
+
}
|
|
1114
|
+
}
|