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.
- 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
package/css/src/blocks.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* Blocks: sign-in, onboarding, pricing, AI chat, checkout, properties and settings panels, team members.
|
|
2
|
-
* Class lists mirror
|
|
2
|
+
* Class lists mirror the React kit. Embedded controls use the core classes (asta-btn, asta-input, asta-field,
|
|
3
3
|
* asta-select, asta-switch, asta-checkbox, asta-avatar, asta-progress). The runtime CSS keys on the data-asta-*
|
|
4
4
|
* attributes, so keep them in the markup. Modifiers come after the base class so they win. */
|
|
5
5
|
|
|
6
|
-
/* ---- Sign-in
|
|
6
|
+
/* ---- Sign-in ----
|
|
7
7
|
* <div id="sign-in" data-asta-sign-in class="asta-sign-in"><form class="asta-sign-in-form" hx-post="/sign-in" hx-target="#sign-in" hx-swap="outerHTML">
|
|
8
8
|
* <h3 class="asta-sign-in-title">Welcome back</h3> … <button type="submit" class="asta-btn asta-sign-in-submit">…</button></form></div>
|
|
9
9
|
* A field with an error: wrap its asta-input in <div class="asta-sign-in-shake">. */
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
/* ---- Onboarding
|
|
94
|
+
/* ---- Onboarding ----
|
|
95
95
|
* <div id="onboarding" data-asta-onboarding class="asta-onboarding"><div data-asta-onboarding-list> <div class="asta-onboarding-head">…</div>
|
|
96
96
|
* <ol class="asta-onboarding-steps"><li data-asta-onboarding-step class="asta-onboarding-step"><button data-asta-onboarding-toggle
|
|
97
97
|
* aria-expanded="true" aria-controls="s1" class="asta-onboarding-toggle">…</button><div id="s1" role="region" class="asta-onboarding-panel">…</div></li></ol></div></div>
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
/* ---- Pricing
|
|
210
|
+
/* ---- Pricing ----
|
|
211
211
|
* <div data-asta-pricing class="asta-plans"><div role="radiogroup" class="asta-plans-period"><span data-asta-pricing-pill class="asta-plans-pill"></span>
|
|
212
212
|
* <label class="asta-plans-option"><input type="radio" name="billing" value="monthly" checked class="sr-only">Monthly</label>…</div>
|
|
213
213
|
* <div class="asta-plans-grid"><div class="asta-plans-card">…</div><div class="asta-plans-card asta-plans-card-featured">…</div></div></div>
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
/* ---- AI chat
|
|
318
|
+
/* ---- AI chat ----
|
|
319
319
|
* <div id="chat" data-asta-chat class="asta-ai-chat"> <header class="asta-ai-chat-header">…</header>
|
|
320
320
|
* <div data-asta-chat-log role="log" class="asta-ai-chat-log"><div data-asta-chat-empty class="asta-ai-chat-empty">…</div><ol data-asta-chat-list class="asta-ai-chat-list">…</ol></div>
|
|
321
321
|
* <form data-asta-chat-form class="asta-ai-chat-form" hx-post="/chat" hx-target="#chat-list" hx-swap="beforeend">…</form></div>
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
@apply mt-2 text-center text-[11.5px] text-mute;
|
|
451
451
|
}
|
|
452
452
|
|
|
453
|
-
/* ---- Checkout
|
|
453
|
+
/* ---- Checkout ----
|
|
454
454
|
* <form id="checkout" data-asta-checkout class="asta-checkout-form" hx-post="/checkout" hx-target="#checkout" hx-swap="outerHTML">
|
|
455
455
|
* <div class="asta-checkout-main"><div class="asta-checkout-steps"><fieldset class="asta-checkout-section">…</fieldset>…</div></div>
|
|
456
456
|
* <aside data-asta-checkout-summary class="asta-checkout-summary">…</aside></form>
|
|
@@ -623,7 +623,7 @@
|
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
-
/* ---- Properties panel
|
|
626
|
+
/* ---- Properties panel ----
|
|
627
627
|
* <form data-asta-props class="asta-properties" hx-post="/props" hx-trigger="change" hx-swap="none"><div class="asta-properties-header">…</div>
|
|
628
628
|
* <div class="asta-properties-body"><details open class="asta-prop-section"><summary class="asta-prop-summary">…Layout</summary>
|
|
629
629
|
* <div data-asta-props-body class="asta-prop-content"><div class="asta-prop-row"><span class="asta-prop-label">Size</span><div class="asta-prop-cells">
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
@apply h-full min-w-0 flex-1 bg-transparent px-2 font-mono text-[11.5px] uppercase outline-none;
|
|
713
713
|
}
|
|
714
714
|
|
|
715
|
-
/* ---- Settings panel
|
|
715
|
+
/* ---- Settings panel ----
|
|
716
716
|
* <form data-asta-settings class="asta-settings-panel" hx-post="/settings" hx-swap="none" hx-indicator="find [data-asta-settings-save]">
|
|
717
717
|
* <div class="asta-settings-body"><section class="asta-settings-section">…<div class="asta-settings-row">…</div></section></div>
|
|
718
718
|
* <div data-asta-settings-bar class="asta-settings-savebar">…</div></form>
|
|
@@ -813,7 +813,7 @@
|
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
/* ---- Team members
|
|
816
|
+
/* ---- Team members ----
|
|
817
817
|
* <div id="team" data-asta-team class="asta-team-members"><header class="asta-team-header">…</header>
|
|
818
818
|
* <form class="asta-team-invite" hx-post="/team/invite" hx-target="#team" hx-swap="outerHTML">…</form>
|
|
819
819
|
* <h4 class="asta-team-heading">Members</h4><ul><li data-asta-team-row="u1" class="asta-team-member"><div class="asta-team-row">…</div></li></ul></div>
|
package/css/src/core.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Core: buttons, fields, dialog, menu, tabs, badges and the other small parts.
|
|
2
|
-
* Class lists mirror
|
|
2
|
+
* Class lists mirror the React kit. Modifiers come after the base class so they win. */
|
|
3
3
|
|
|
4
|
-
/* ---- Button
|
|
4
|
+
/* ---- Button ----
|
|
5
5
|
* <button class="asta-btn asta-btn-accent asta-btn-sm"><span class="asta-btn-label">Save</span></button>
|
|
6
6
|
* Variants: (solid) accent danger outline soft ghost link. Sizes: xs sm (md) lg. Also asta-btn-icon, asta-btn-pill.
|
|
7
7
|
* Loading: aria-busy="true" or htmx's .htmx-request shows .asta-btn-spinner over the label. */
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
/* ---- Input
|
|
79
|
+
/* ---- Input ----
|
|
80
80
|
* <label class="asta-input"><span class="asta-input-icon"><svg/></span><input class="asta-input-control" name="q"></label>
|
|
81
81
|
* Sizes: asta-input-sm, asta-input-lg. States: asta-input-error, asta-input-success, or aria-invalid="true" on the
|
|
82
82
|
* input. A disabled input dims the whole field. */
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
/* ---- Field
|
|
123
|
+
/* ---- Field ----
|
|
124
124
|
* <div class="asta-field"><div class="asta-field-head"><label class="asta-label" for="email">Email</label></div>
|
|
125
125
|
* …control… <p class="asta-hint">We never share it.</p></div>
|
|
126
126
|
* asta-error replaces the hint (role="alert", optional leading svg). asta-counter sits on the right of the head. */
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
@apply text-[12.5px] leading-snug text-mute;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
/* ---- Textarea
|
|
152
|
+
/* ---- Textarea ----
|
|
153
153
|
* <div class="asta-textarea"><textarea class="asta-textarea-control" rows="3"></textarea></div>
|
|
154
154
|
* asta-textarea-error (or aria-invalid="true"). asta-textarea-auto on the control grows with its content. */
|
|
155
155
|
.asta-textarea {
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
@apply [field-sizing:content] overflow-y-auto min-h-[calc(3lh+24px)] max-h-[calc(10lh+24px)];
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
/* ---- Select
|
|
172
|
+
/* ---- Select ----
|
|
173
173
|
* <div class="asta-select"><select class="asta-select-control">…</select><svg class="asta-select-icon"/></div>
|
|
174
174
|
* asta-select-sm, asta-select-error (or aria-invalid="true"). An empty-value option shows as a muted placeholder. */
|
|
175
175
|
.asta-select {
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
/* ---- Checkbox
|
|
203
|
+
/* ---- Checkbox ----
|
|
204
204
|
* <label class="asta-checkbox"><span class="asta-checkbox-box"><input type="checkbox" class="asta-checkbox-input">
|
|
205
205
|
* <svg class="asta-checkbox-check"/><span class="asta-checkbox-dash"></span></span>
|
|
206
206
|
* <span><span class="asta-checkbox-label">Email me</span><span class="asta-checkbox-desc">…</span></span></label>
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
@apply mt-0.5 block text-[13px] leading-snug text-mute;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
/* ---- Radio group
|
|
253
|
+
/* ---- Radio group ----
|
|
254
254
|
* <div role="radiogroup" class="asta-radio-group"><label class="asta-radio"><span class="asta-radio-row">
|
|
255
255
|
* <span class="asta-radio-dot"><input type="radio" class="asta-radio-input" name="plan"><span class="asta-radio-mark"></span></span>
|
|
256
256
|
* <span class="asta-radio-label">Pro</span><span class="asta-radio-aside">$12</span></span>
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
@apply pl-7 text-[13px] leading-snug text-mute;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
/* ---- Switch
|
|
308
|
+
/* ---- Switch ----
|
|
309
309
|
* <label class="asta-switch"><span><span class="asta-switch-label">Alerts</span><span class="asta-switch-desc">…</span></span>
|
|
310
310
|
* <span class="asta-switch-track"><input type="checkbox" role="switch" class="asta-switch-input"><span class="asta-switch-thumb"></span></span></label>
|
|
311
311
|
* A bare asta-switch-track works without a label. Sizes: asta-switch-sm, asta-switch-lg on the label or the track. */
|
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
-
/* ---- Slider
|
|
360
|
+
/* ---- Slider ----
|
|
361
361
|
* <div class="asta-slider"><input type="range" class="asta-slider-input" min="0" max="100" value="40">
|
|
362
362
|
* <div class="asta-slider-ticks" aria-hidden="true"><span class="asta-slider-tick" style="left:0%"></span>…</div></div> */
|
|
363
363
|
.asta-slider {
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
@apply absolute top-0 h-1 w-1 -translate-x-1/2 rounded-full bg-[color-mix(in_srgb,var(--ink)_28%,transparent)];
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
/* ---- Badge
|
|
389
|
+
/* ---- Badge ----
|
|
390
390
|
* <span class="asta-badge asta-badge-success"><span class="asta-badge-dot"></span>Live</span>
|
|
391
391
|
* Variants: (soft) solid outline. Tones: (neutral) accent success warning danger. Size: asta-badge-sm.
|
|
392
392
|
* asta-badge-dot can hold <span class="asta-badge-ping"></span> for a pulse. asta-badge-remove is the × button.
|
|
@@ -454,7 +454,7 @@
|
|
|
454
454
|
@apply inline-flex h-[18px] min-w-[18px] animate-[asta-pop_.4s_cubic-bezier(.16,1,.3,1)] items-center justify-center rounded-[5px] bg-[#e5484d] px-1 text-[10.5px] font-semibold tabular-nums leading-none text-white shadow-[0_0_0_2px_var(--paper)] motion-reduce:animate-none;
|
|
455
455
|
}
|
|
456
456
|
|
|
457
|
-
/* ---- Dialog
|
|
457
|
+
/* ---- Dialog ----
|
|
458
458
|
* <button data-asta-open="invite">Invite</button>
|
|
459
459
|
* <dialog id="invite" class="asta-dialog" aria-labelledby="invite-title">
|
|
460
460
|
* <button type="button" class="asta-dialog-close" data-asta-close aria-label="Close"><svg/></button>
|
|
@@ -485,7 +485,7 @@
|
|
|
485
485
|
@apply mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
/* ---- Menu
|
|
488
|
+
/* ---- Menu ----
|
|
489
489
|
* <div class="asta-menu" data-asta-menu>
|
|
490
490
|
* <button class="asta-btn asta-btn-outline asta-menu-trigger" data-asta-menu-trigger aria-haspopup="menu" aria-expanded="false">
|
|
491
491
|
* Actions<svg class="asta-menu-chevron"/></button>
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
@apply mx-1 my-1.5 h-px bg-[color-mix(in_srgb,var(--ink)_8%,transparent)];
|
|
546
546
|
}
|
|
547
547
|
|
|
548
|
-
/* ---- Tabs
|
|
548
|
+
/* ---- Tabs ----
|
|
549
549
|
* <div class="asta-tabs" data-asta-tabs><div role="tablist" class="asta-tabs-list">
|
|
550
550
|
* <span class="asta-tabs-line" aria-hidden="true"></span><span class="asta-tabs-indicator" data-asta-tab-indicator aria-hidden="true"></span>
|
|
551
551
|
* <button role="tab" class="asta-tab" id="t-a" aria-controls="p-a" aria-selected="true">Overview<span class="asta-tab-count">4</span></button>…</div>
|
|
@@ -617,7 +617,7 @@
|
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
|
|
620
|
-
/* ---- Table
|
|
620
|
+
/* ---- Table ----
|
|
621
621
|
* <div class="asta-table-wrap"><div class="asta-table-scroll"><table class="asta-table">
|
|
622
622
|
* <thead><tr><th class="asta-th" scope="col">Name</th><th class="asta-th asta-th-right">Amount</th></tr></thead>
|
|
623
623
|
* <tbody><tr class="asta-tr"><td class="asta-td">Astabyte</td><td class="asta-td asta-td-right">$1,200</td></tr></tbody></table></div></div>
|
package/css/src/data.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* Data: data table, tree view, timeline, kanban, event calendar, file card, image compare, carousel, notification
|
|
2
|
-
* center, comments, motion button. Class lists mirror
|
|
2
|
+
* center, comments, motion button. Class lists mirror the React kit.
|
|
3
3
|
* Where the runtime CSS already owns .asta-<name> (carousel, comments, kanban, timeline), the semantic root is
|
|
4
4
|
* .asta-<name>-root and the runtime class stays next to it in the markup. Avatars use .asta-avatar, checkboxes
|
|
5
5
|
* .asta-checkbox and tables .asta-table*, from their own groups. */
|
|
6
6
|
|
|
7
|
-
/* ---- Data table
|
|
7
|
+
/* ---- Data table ----
|
|
8
8
|
* <div id="people" class="asta-data-table" data-asta-dt hx-boost="true" hx-target="#people" hx-select="#people">
|
|
9
9
|
* <div class="asta-data-table-toolbar"><form role="search" class="asta-data-table-search">…</form></div>
|
|
10
10
|
* <form class="asta-data-table-rows"><div class="asta-table-wrap"><table class="asta-table">…</table></div></form>
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
@apply focus-visible:ring-2 focus-visible:ring-brand/50 active:scale-90 aria-disabled:pointer-events-none aria-disabled:opacity-30 [&>svg]:h-3.5 [&>svg]:w-3.5;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
/* ---- Tree view
|
|
77
|
+
/* ---- Tree view ----
|
|
78
78
|
* <ul role="tree" class="asta-tree-view" data-asta-tree data-tab="src">
|
|
79
79
|
* <li role="treeitem" class="asta-tree-item" data-id="src" aria-level="1" aria-expanded="true" aria-selected="false" tabindex="0">
|
|
80
80
|
* <div class="asta-tree-row" data-asta-tree-row data-open><span class="asta-tree-chevron" data-asta-tree-chevron>…</span>
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
@apply flex h-8 items-center gap-2 pl-2 text-[12.5px] text-mute [&>svg]:h-3.5 [&>svg]:w-3.5 [&>svg]:animate-spin;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
/* ---- Timeline
|
|
168
|
+
/* ---- Timeline ----
|
|
169
169
|
* <ol class="asta-timeline asta-timeline-root" data-asta-timeline data-inview="false" aria-label="Order history">
|
|
170
170
|
* <li class="asta-timeline-item asta-timeline-a asta-timeline-enter" style="animation-delay:0ms">
|
|
171
171
|
* <div class="asta-timeline-rail"><span class="asta-timeline-marker"><span class="asta-timeline-dot"></span></span>
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
@apply mt-0.5 text-[13px] leading-relaxed text-mute;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
/* ---- Kanban
|
|
238
|
+
/* ---- Kanban ----
|
|
239
239
|
* <form class="asta-kanban asta-kanban-root" data-asta-kanban hx-post="/move" hx-trigger="asta:move" hx-swap="none">
|
|
240
240
|
* <input type="hidden" name="card" data-asta-kanban-field="card">…
|
|
241
241
|
* <div class="asta-kanban-grid" style="--cols:3"><section class="asta-kanban-col" data-asta-kanban-col="todo">
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
@apply ml-auto;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
/* ---- Event calendar
|
|
291
|
+
/* ---- Event calendar ----
|
|
292
292
|
* <div id="cal" class="asta-cal asta-event-calendar" data-asta-cal data-month="2026-11" data-today="2026-11-19" data-week="1"
|
|
293
293
|
* data-tpl="/calendar?month=__M__&day=__D__" hx-boost="true" hx-target="#cal" hx-select="#cal" hx-swap="outerHTML show:none">
|
|
294
294
|
* <div class="asta-event-calendar-main"><header class="asta-event-calendar-head">…</header>
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
@apply mt-4 rounded-[10px] bg-paper-2 px-3 py-4 text-[13px] text-mute;
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
-
/* ---- File card
|
|
406
|
+
/* ---- File card ----
|
|
407
407
|
* <div class="asta-file-card"><a href="/files/1" class="asta-file-card-open" aria-label="Open Q4 plan"></a>
|
|
408
408
|
* <div class="asta-file-card-media"><img class="asta-file-card-thumb" src="…" alt="">
|
|
409
409
|
* <span class="asta-file-card-corner"><button class="asta-file-card-star" data-asta-file-star aria-pressed="false">
|
|
@@ -493,7 +493,7 @@
|
|
|
493
493
|
@apply relative z-[2] flex shrink-0 items-center gap-1;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
/* ---- Image compare
|
|
496
|
+
/* ---- Image compare ----
|
|
497
497
|
* <div class="asta-compare asta-image-compare" data-asta-compare data-step="2" style="--pos:50">
|
|
498
498
|
* <div class="asta-image-compare-layer"><img class="asta-image-compare-img" src="after.webp" alt=""></div>
|
|
499
499
|
* <div class="asta-compare-win asta-image-compare-clip"><div class="asta-compare-pic asta-image-compare-layer"><img class="asta-image-compare-img" src="before.webp" alt=""></div></div>
|
|
@@ -547,7 +547,7 @@
|
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
|
|
550
|
-
/* ---- Carousel
|
|
550
|
+
/* ---- Carousel ----
|
|
551
551
|
* <div class="asta-carousel asta-carousel-root" data-asta-carousel data-index="0" data-autoplay="5000" role="region" aria-roledescription="carousel" tabindex="0">
|
|
552
552
|
* <div class="asta-carousel-track asta-carousel-slides" data-asta-carousel-track aria-live="polite">
|
|
553
553
|
* <div id="c-slide-0" class="asta-carousel-slide" data-asta-carousel-slide role="group" aria-roledescription="slide">…</div>…</div>
|
|
@@ -601,7 +601,7 @@
|
|
|
601
601
|
@apply focus-visible:ring-2 focus-visible:ring-brand/50 active:scale-95 disabled:pointer-events-none disabled:opacity-30 [&>svg]:h-4 [&>svg]:w-4;
|
|
602
602
|
}
|
|
603
603
|
|
|
604
|
-
/* ---- Notification center
|
|
604
|
+
/* ---- Notification center ----
|
|
605
605
|
* <span class="asta-nc asta-notification-center" data-asta-nc data-label="Notifications" data-url="/notifications/read">
|
|
606
606
|
* <button class="asta-notification-center-bell" data-asta-nc-trigger aria-haspopup="dialog" aria-expanded="false" aria-controls="nc">
|
|
607
607
|
* <span class="asta-notification-center-bell-icon">…</span><span class="asta-notification-center-badge" data-asta-nc-badge><span data-asta-nc-count>2</span></span></button>
|
|
@@ -717,7 +717,7 @@
|
|
|
717
717
|
@apply mt-1 text-[12.5px] text-mute;
|
|
718
718
|
}
|
|
719
719
|
|
|
720
|
-
/* ---- Comments
|
|
720
|
+
/* ---- Comments ----
|
|
721
721
|
* <section id="talk" class="asta-comments asta-comments-root" data-asta-comments>
|
|
722
722
|
* <h3 class="asta-comments-title">Discussion <span class="asta-comments-total" data-asta-comments-total>3</span></h3>
|
|
723
723
|
* <div id="talk-list" class="asta-comments-list"><div data-asta-comment-thread="c1">
|
|
@@ -807,7 +807,7 @@
|
|
|
807
807
|
@apply flex items-center justify-end gap-1.5 px-2 pb-2;
|
|
808
808
|
}
|
|
809
809
|
|
|
810
|
-
/* ---- Motion button
|
|
810
|
+
/* ---- Motion button ----
|
|
811
811
|
* <button class="asta-motion asta-motion-button asta-motion-button-fill" data-asta-mb="fill">
|
|
812
812
|
* <span class="asta-mb-fill asta-motion-button-wipe" aria-hidden="true"></span><span class="asta-motion-button-label">Get started</span></button>
|
|
813
813
|
* Variants (set the same name in data-asta-mb): roll (default) fill arrow shine beam press copy confirm.
|
package/css/src/display.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Display: accordion, alert, avatar, breadcrumb, card, empty state, kbd, pagination, progress, skeleton, spinner,
|
|
2
|
-
* stat card and tooltip. Class lists mirror
|
|
2
|
+
* stat card and tooltip. Class lists mirror the React kit. Modifiers come after the base class so they win. */
|
|
3
3
|
|
|
4
|
-
/* ---- Accordion
|
|
4
|
+
/* ---- Accordion ----
|
|
5
5
|
* <div class="asta-accordion"><details class="asta-accordion-item" name="faq" open>
|
|
6
6
|
* <summary class="asta-accordion-trigger">Title<span class="asta-accordion-icon" aria-hidden="true"><span></span><span></span></span></summary>
|
|
7
7
|
* <div class="asta-accordion-content">Answer</div></details></div>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
@apply px-4 pb-4 text-[14px] leading-relaxed text-ink-2;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
/* ---- Alert
|
|
43
|
+
/* ---- Alert ----
|
|
44
44
|
* <div class="asta-alert asta-alert-success" role="status"><span class="asta-alert-icon"><svg…/></span>
|
|
45
45
|
* <div class="asta-alert-body"><p class="asta-alert-title">Saved</p><div class="asta-alert-text">…</div></div>
|
|
46
46
|
* <label class="asta-alert-dismiss"><input type="checkbox" data-asta-dismiss aria-label="Dismiss"><svg…/></label></div>
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/* ---- Avatar
|
|
97
|
+
/* ---- Avatar ----
|
|
98
98
|
* <span class="asta-avatar asta-avatar-sm" role="img" aria-label="Ada Lovelace (online)">
|
|
99
99
|
* <span class="asta-avatar-face asta-avatar-brand">AL<img class="asta-avatar-img" src="…" alt=""></span>
|
|
100
100
|
* <span class="asta-avatar-status" data-status="online" aria-hidden="true"></span></span>
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
/* ---- Avatar group
|
|
182
|
+
/* ---- Avatar group ----
|
|
183
183
|
* <ul class="asta-avatar-group" aria-label="5 people">
|
|
184
184
|
* <li class="asta-avatar-group-item" style="--i:0"><span class="asta-avatar-group-face" role="img" aria-label="Ada Lovelace">
|
|
185
185
|
* <span class="asta-avatar-face">AL</span><span class="asta-avatar-tip" aria-hidden="true">Ada Lovelace</span></span></li>
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
/* ---- Breadcrumb
|
|
244
|
+
/* ---- Breadcrumb ----
|
|
245
245
|
* <nav class="asta-breadcrumb" aria-label="Breadcrumb"><ol class="asta-breadcrumb-list">
|
|
246
246
|
* <li class="asta-breadcrumb-item"><a class="asta-breadcrumb-link" href="/"><span class="asta-breadcrumb-label">Astabyte</span></a><span class="asta-breadcrumb-sep" aria-hidden="true"><svg…/></span></li>
|
|
247
247
|
* <li class="asta-breadcrumb-item"><span class="asta-breadcrumb-page" aria-current="page"><span class="asta-breadcrumb-label">Billing</span></span></li></ol></nav>
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
/* ---- Card
|
|
303
|
+
/* ---- Card ----
|
|
304
304
|
* <div class="asta-card"><div class="asta-card-header"><h3 class="asta-card-title">Plan</h3>
|
|
305
305
|
* <p class="asta-card-description">…</p></div>…<div class="asta-card-footer">buttons</div></div> */
|
|
306
306
|
.asta-card {
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
@apply mt-5 flex flex-wrap items-center justify-end gap-2;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
/* ---- Empty state
|
|
322
|
+
/* ---- Empty state ----
|
|
323
323
|
* <div class="asta-empty-state" role="status"><div class="asta-empty-state-art" aria-hidden="true">
|
|
324
324
|
* <span class="asta-empty-state-blob"></span><svg viewBox="0 0 120 88" …><path d="…"/><path class="asta-empty-state-accent" d="…"/></svg></div>
|
|
325
325
|
* <h3 class="asta-empty-state-title">Nothing here yet</h3><p class="asta-empty-state-description">…</p>
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
-
/* ---- Kbd
|
|
372
|
+
/* ---- Kbd ----
|
|
373
373
|
* <kbd class="asta-kbd">Esc</kbd> · <span class="asta-kbd-combo" aria-label="⌘ + K"><kbd class="asta-kbd">⌘</kbd><span class="asta-kbd-combo-sep" aria-hidden="true">+</span><kbd class="asta-kbd">K</kbd></span>
|
|
374
374
|
* Sizes: sm (md) lg. data-pressed shows the key held down. */
|
|
375
375
|
.asta-kbd {
|
|
@@ -392,7 +392,7 @@
|
|
|
392
392
|
@apply text-[12px] text-mute;
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
-
/* ---- Pagination
|
|
395
|
+
/* ---- Pagination ----
|
|
396
396
|
* <nav class="asta-pagination" aria-label="Pagination"><a class="asta-pagination-link" href="?page=4" aria-label="Previous page"><svg…/></a>
|
|
397
397
|
* <ul class="asta-pagination-list"><li><a class="asta-pagination-link" href="?page=1">1</a></li><li class="asta-pagination-gap" aria-hidden="true">…</li>
|
|
398
398
|
* <li><a class="asta-pagination-link" aria-current="page" href="?page=5">5</a></li></ul>…</nav>
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
-
/* ---- Progress
|
|
428
|
+
/* ---- Progress ----
|
|
429
429
|
* <div class="asta-progress"><div class="asta-progress-header"><span class="asta-progress-label">Upload</span><span class="asta-progress-value">62%</span></div>
|
|
430
430
|
* <div class="asta-progress-track" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="62">
|
|
431
431
|
* <span class="asta-progress-fill" style="transform:translateX(-38%)"></span></div></div>
|
|
@@ -455,7 +455,7 @@
|
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
/* ---- Progress ring
|
|
458
|
+
/* ---- Progress ring ----
|
|
459
459
|
* <span class="asta-progress-ring" role="progressbar" aria-valuenow="70" style="width:44px;height:44px">
|
|
460
460
|
* <svg viewBox="0 0 44 44" width="44" height="44" aria-hidden="true"><circle class="asta-progress-ring-track" cx="22" cy="22" r="20.25" stroke-width="3.5"/>
|
|
461
461
|
* <circle class="asta-progress-ring-bar" cx="22" cy="22" r="20.25" stroke-width="3.5" pathLength="100" stroke-dasharray="100 100" stroke-dashoffset="30"/></svg>
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
@apply relative text-[11px] font-medium tabular-nums text-ink;
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
-
/* ---- Skeleton
|
|
483
|
+
/* ---- Skeleton ----
|
|
484
484
|
* <span class="asta-skeleton" aria-hidden="true" style="width:60%"></span> · asta-skeleton-circle (set width and height) · asta-skeleton-block
|
|
485
485
|
* <span class="asta-skeleton-text"><span class="asta-skeleton"></span><span class="asta-skeleton"></span></span> (last line is 62%)
|
|
486
486
|
* <div class="asta-skeleton-card" role="status" aria-label="Loading">…</div> with .asta-skeleton-row and .asta-skeleton-stack inside. */
|
|
@@ -517,7 +517,7 @@
|
|
|
517
517
|
@apply flex flex-1 flex-col gap-2;
|
|
518
518
|
}
|
|
519
519
|
|
|
520
|
-
/* ---- Spinner
|
|
520
|
+
/* ---- Spinner ----
|
|
521
521
|
* <span class="asta-spinner" role="status" aria-label="Loading"><svg viewBox="0 0 24 24" fill="none" aria-hidden="true">…</svg></span>
|
|
522
522
|
* Variants with empty spans: asta-spinner-dots (3), asta-spinner-bars (4), asta-spinner-orbit (3). Size = font-size, colour = currentColor. */
|
|
523
523
|
.asta-spinner {
|
|
@@ -567,7 +567,7 @@
|
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
|
|
570
|
-
/* ---- Stat card
|
|
570
|
+
/* ---- Stat card ----
|
|
571
571
|
* <div class="asta-stat-card"><p class="asta-stat-card-label">Revenue</p>
|
|
572
572
|
* <div class="asta-stat-card-row"><p class="asta-stat-card-value">$48.2k</p>
|
|
573
573
|
* <svg class="asta-stat-card-spark" viewBox="0 0 96 32" width="96" height="32"><g><path d="…area" class="asta-stat-card-area"/><path d="…line" class="asta-stat-card-line"/></g><circle class="asta-stat-card-dot" cx="94" cy="3" r="2.25"/></svg></div>
|
|
@@ -626,7 +626,7 @@
|
|
|
626
626
|
@apply hidden;
|
|
627
627
|
}
|
|
628
628
|
|
|
629
|
-
/* ---- Tooltip
|
|
629
|
+
/* ---- Tooltip ----
|
|
630
630
|
* <span class="asta-tooltip"><button aria-describedby="tip-copy">Copy</button>
|
|
631
631
|
* <span class="asta-tooltip-bubble" id="tip-copy" role="tooltip">Copy link<kbd class="asta-tooltip-kbd">⌘C</kbd><span class="asta-tooltip-arrow" aria-hidden="true"></span></span></span>
|
|
632
632
|
* Sides: (top) asta-tooltip-bottom, -left, -right. asta-tooltip-instant skips the 400ms hover delay.
|
package/css/src/forms.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* Forms: combobox, date picker, colour picker, number, OTP, password, tags, range, rating, upload, inline edit,
|
|
2
|
-
* segmented control, toggle group, copy button. Class lists mirror
|
|
2
|
+
* segmented control, toggle group, copy button. Class lists mirror the React kit.
|
|
3
3
|
* asta.js finds these parts by their data-asta-* attributes, so keep those. Runtime classes named in
|
|
4
|
-
*
|
|
4
|
+
* runtime/forms.css (asta-combo-chip, asta-date-cal, asta-otp-shake, asta-pw-slash…) stay in the markup too. */
|
|
5
5
|
|
|
6
|
-
/* ---- Combobox
|
|
6
|
+
/* ---- Combobox ----
|
|
7
7
|
* <div class="asta-combobox" data-asta-combo="single" data-name="framework">
|
|
8
8
|
* <div class="asta-combobox-box" data-asta-combo-box><input class="asta-combobox-input" data-asta-combo-input role="combobox" …>
|
|
9
9
|
* <button class="asta-combobox-toggle" data-asta-combo-toggle>…</button></div>
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
/* ---- Date picker
|
|
82
|
+
/* ---- Date picker ----
|
|
83
83
|
* <div class="asta-date-picker" data-asta-date="single" data-placeholder="Pick a date">
|
|
84
84
|
* <button class="asta-date-picker-trigger" data-asta-date-trigger aria-haspopup="dialog" aria-expanded="false" aria-controls="d-cal">
|
|
85
85
|
* <svg class="asta-date-picker-icon">…</svg><span class="asta-date-picker-text asta-date-picker-placeholder" data-asta-date-text>Pick a date</span></button>
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
@apply shadow-[0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_12px_32px_-8px_rgb(0_0_0/0.22),0_4px_8px_-4px_rgb(0_0_0/0.08)];
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
/* ---- Colour picker
|
|
118
|
+
/* ---- Colour picker ----
|
|
119
119
|
* <div class="asta-color-picker" data-asta-color data-columns="5">
|
|
120
120
|
* <div class="asta-color-picker-swatches" role="radiogroup" style="grid-template-columns:repeat(5,28px);gap:10px">
|
|
121
121
|
* <label class="asta-color-picker-swatch"><input type="radio" name="c" value="#2f54eb"><span class="asta-color-picker-ring"></span>
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
@apply w-14 text-[12px] text-mute opacity-0 transition-opacity duration-200 data-[on]:opacity-100;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
/* ---- Number input
|
|
178
|
+
/* ---- Number input ----
|
|
179
179
|
* <div class="asta-number-input" data-asta-number data-min="1" data-max="20" data-step="1">
|
|
180
180
|
* <button class="asta-number-input-step" data-asta-number-step="-1" aria-label="Decrease">…</button>
|
|
181
181
|
* <div class="asta-number-input-view" role="spinbutton" tabindex="0" data-asta-number-view aria-valuenow="4">
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
/* ---- OTP input
|
|
230
|
+
/* ---- OTP input ----
|
|
231
231
|
* <div class="asta-otp-input" data-asta-otp>
|
|
232
232
|
* <div class="asta-otp-input-boxes" aria-hidden="true" data-asta-otp-boxes>
|
|
233
233
|
* <span class="asta-otp-input-wave" data-asta-otp-wave style="--asta-otp-i:0ms"><span class="asta-otp-input-box" data-asta-otp-box></span></span>…
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
@apply absolute inset-0 h-full w-full cursor-text bg-transparent text-[16px] text-transparent caret-transparent opacity-0 outline-none disabled:cursor-not-allowed;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
/* ---- Segmented control
|
|
265
|
+
/* ---- Segmented control ----
|
|
266
266
|
* <div class="asta-segmented" role="radiogroup" data-asta-segmented aria-label="View">
|
|
267
267
|
* <label class="asta-segmented-item"><input type="radio" name="view" value="list" checked>
|
|
268
268
|
* <span class="asta-segmented-pill" data-asta-ind></span><span class="asta-segmented-label">List</span></label>…
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
/* ---- Toggle group
|
|
301
|
+
/* ---- Toggle group ----
|
|
302
302
|
* <div class="asta-toggle-group" role="radiogroup" data-asta-toggle="single" aria-label="Align">
|
|
303
303
|
* <label class="asta-toggle-group-item"><input type="radio" name="align" value="left" checked aria-label="Left">
|
|
304
304
|
* <span class="asta-toggle-group-ind" data-asta-ind></span><span class="asta-toggle-group-icon">svg</span></label>…
|
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
/* ---- Copy button
|
|
363
|
+
/* ---- Copy button ----
|
|
364
364
|
* <button class="asta-copy-button asta-copy-button-text" data-asta-copy="npm i asta-ui" data-timeout="1600" data-state="idle" data-copied="Copied">
|
|
365
365
|
* <span class="asta-copy-button-icons" aria-hidden="true"><svg class="asta-copy-button-copy">…</svg>
|
|
366
366
|
* <svg class="asta-copy-button-done"><path class="asta-copy-tick" pathLength="1" d="m3.5 8.5 3 3 6-7"/></svg></span>
|
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
/* ---- Password input
|
|
447
|
+
/* ---- Password input ----
|
|
448
448
|
* <div class="asta-password" data-asta-password data-strength="0">
|
|
449
449
|
* <label class="asta-password-label" for="pw">Password</label>
|
|
450
450
|
* <div class="asta-password-box"><input class="asta-password-input" id="pw" type="password" data-asta-password-input aria-describedby="pw-help">
|
|
@@ -525,7 +525,7 @@
|
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
|
|
528
|
-
/* ---- Tag input
|
|
528
|
+
/* ---- Tag input ----
|
|
529
529
|
* <div class="asta-tag-input" data-asta-tags data-name="tags" data-max="8" data-placeholder="Add a tag">
|
|
530
530
|
* <div class="asta-tag-input-head"><label class="asta-tag-input-label" for="tags">Tags</label><span class="asta-tag-input-count" data-asta-tags-count aria-live="polite">2/8</span></div>
|
|
531
531
|
* <div class="asta-tag-input-box" data-asta-tags-box><ul class="asta-tag-input-list" data-asta-tags-list>
|
|
@@ -577,7 +577,7 @@
|
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
-
/* ---- Range slider
|
|
580
|
+
/* ---- Range slider ----
|
|
581
581
|
* <div class="asta-range-slider" data-asta-range data-gap="10" data-prefix="$">
|
|
582
582
|
* <div class="asta-range-slider-body"><div class="asta-range-slider-track" data-asta-range-track>
|
|
583
583
|
* <span class="asta-range-slider-rail"></span>
|
|
@@ -634,7 +634,7 @@
|
|
|
634
634
|
@apply z-10;
|
|
635
635
|
}
|
|
636
636
|
|
|
637
|
-
/* ---- Rating
|
|
637
|
+
/* ---- Rating ----
|
|
638
638
|
* <div class="asta-rating" role="radiogroup" aria-label="Rating" data-asta-rating data-value="3" data-clear>
|
|
639
639
|
* <input type="radio" name="stars" value="0" aria-label="No rating">
|
|
640
640
|
* <span class="asta-rating-star" data-asta-star data-fill="full" style="width:24px;height:24px">
|
|
@@ -688,7 +688,7 @@
|
|
|
688
688
|
@apply absolute inset-y-0 right-0 w-1/2 cursor-pointer;
|
|
689
689
|
}
|
|
690
690
|
|
|
691
|
-
/* ---- File upload
|
|
691
|
+
/* ---- File upload ----
|
|
692
692
|
* <div class="asta-file-upload" data-asta-upload data-accept="image/*,.pdf" data-max-size="5242880" data-max-files="4">
|
|
693
693
|
* <label class="asta-file-upload-zone" data-asta-upload-zone><span class="asta-file-upload-icon">svg</span>
|
|
694
694
|
* <span class="asta-file-upload-text"><span class="asta-file-upload-title"><span class="asta-file-upload-idle">Drop files here or <span class="asta-file-upload-browse">browse</span></span>
|
|
@@ -799,7 +799,7 @@
|
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
|
|
802
|
-
/* ---- Inline edit
|
|
802
|
+
/* ---- Inline edit ----
|
|
803
803
|
* <span class="asta-inline-edit" data-asta-inline>
|
|
804
804
|
* <button class="asta-inline-edit-view" data-asta-inline-view aria-label="Name: Astabyte. Edit"><span class="asta-inline-edit-text" data-asta-inline-text>Astabyte</span>
|
|
805
805
|
* <svg class="asta-inline-edit-pencil">…</svg></button>
|